/* ============================================
   ADMIN PANEL RESPONSIVE CSS - YENI NAILS
   ============================================ */

/* === ADMIN HEADER === */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    position: relative;
}

.admin-nav h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-nav h1 i {
    color: var(--primary);
}

/* === ADMIN MENU DESKTOP === */
.admin-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.admin-menu a {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.admin-menu a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.admin-menu a.active {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(217, 70, 166, 0.3);
}

.admin-menu span {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* === MOBILE MENU TOGGLE === */
.admin-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
    position: relative;
    z-index: 1003;
}

.admin-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.admin-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.admin-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.admin-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* === RESPONSIVE BREAKPOINTS === */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    .admin-menu {
        gap: 1rem;
    }

    .admin-menu a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .admin-nav h1 {
        font-size: 1.3rem;
    }
}

/* Móviles y tablets pequeñas */
@media (max-width: 768px) {
    .admin-menu-toggle {
        display: flex;
        order: 3;
        margin-left: auto;
    }

    .admin-nav {
        gap: 1rem;
    }

    .admin-nav h1 {
        font-size: 1.1rem;
        order: 1;
    }

    .admin-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 5rem 1.5rem 2rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
        transition: right 0.3s ease;
        z-index: 1002;
        overflow-y: auto;
    }

    .admin-menu.active {
        right: 0;
    }

    .admin-menu a {
        width: 100%;
        padding: 1rem;
        border-radius: var(--radius-md);
        font-size: 1rem;
        border-bottom: 1px solid var(--gray-100);
    }

    .admin-menu span {
        width: 100%;
        padding: 1rem;
        border-bottom: 1px solid var(--gray-100);
        font-size: 0.9rem;
    }

    .admin-menu .btn-logout {
        margin-top: 1rem;
        width: 100%;
        justify-content: center;
    }
}

/* === CALENDAR RESPONSIVE === */
@media (max-width: 768px) {
    .calendar-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch !important;
    }

    .calendar-header h2 {
        text-align: center;
        font-size: 1.3rem;
    }

    .calendar-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .calendar-nav .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .calendar-day {
        min-height: 70px !important;
        padding: 0.25rem !important;
    }

    .day-number {
        font-size: 0.75rem !important;
    }

    .appointment-dot {
        font-size: 0.55rem !important;
        padding: 1px 3px !important;
    }

    .calendar-day-header {
        font-size: 0.7rem !important;
        padding: 0.5rem 0.25rem !important;
    }
}

@media (max-width: 480px) {
    .calendar-day {
        min-height: 60px !important;
        padding: 0.2rem !important;
    }

    .day-number {
        font-size: 0.7rem !important;
        margin-bottom: 0.1rem !important;
    }

    .appointment-dot {
        font-size: 0.5rem !important;
        padding: 1px 2px !important;
    }

    .calendar-day-header {
        font-size: 0.65rem !important;
        padding: 0.4rem 0.1rem !important;
    }
}

/* === TABLES RESPONSIVE === */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 0.5rem !important;
    }
}

/* === FORMS RESPONSIVE === */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr !important;
    }

    .form-control {
        font-size: 16px !important;
        /* Evita zoom en iOS */
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* === CARDS RESPONSIVE === */
@media (max-width: 768px) {
    .card-admin {
        padding: 1rem !important;
        margin-bottom: 1rem;
    }

    .content-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* === GALLERY RESPONSIVE === */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .gallery-item img {
        height: 150px !important;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }
}

/* === UTILITY CLASSES === */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }

    .container {
        padding: 0 1rem !important;
    }
}

/* === BUTTONS RESPONSIVE === */
@media (max-width: 768px) {
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }

    .btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .btn i {
        font-size: 0.9rem;
    }
}

/* === OVERLAY FOR MOBILE MENU === */
.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    body.menu-open {
        overflow: hidden;
    }
}

/* === ANIMATIONS === */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === PRINT STYLES === */
@media print {

    .admin-header,
    .admin-menu,
    .admin-menu-toggle,
    .btn {
        display: none !important;
    }

    .card-admin {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}