/* ============================================
   MUSE INSTITUT - Admin Panel Styles
   ============================================ */

.admin-body {
    background: var(--cream-light);
}

/* ---- Login Screen ---- */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--warm-white) 0%, var(--cream) 100%);
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-medium);
    text-align: center;
}

.login-logo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.login-logo span {
    color: var(--wood-medium);
}

.login-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

/* ---- Dashboard Layout ---- */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.admin-sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-header h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-header h2 span {
    color: var(--wood-medium);
}

.sidebar-header small {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 4px;
    transition: var(--transition);
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: var(--cream-light);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(184, 149, 106, 0.1);
    color: var(--wood-medium);
    font-weight: 500;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-light);
}

/* ---- Mobile Header ---- */
.admin-mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    z-index: 99;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}

.admin-menu-toggle {
    background: none;
    padding: 4px;
    display: flex;
    align-items: center;
}

.admin-mobile-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
}

/* ---- Main Content ---- */
.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-header h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-header p {
    color: var(--text-light);
    font-size: 0.85rem;
}

.admin-header .btn-primary {
    padding: 10px 24px;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
}

/* ---- Stats Grid ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-soft);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ---- Admin Cards ---- */
.admin-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.admin-card h3 {
    padding: 20px 24px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.admin-filters {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-filters select {
    padding: 8px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--warm-white);
}

/* ---- Admin Table ---- */
.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 12px 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-light);
    background: var(--warm-white);
    white-space: nowrap;
}

.admin-table td {
    padding: 14px 20px;
    font-size: 0.88rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--cream-light);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.table-btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 500;
}

.table-btn-edit {
    background: rgba(184, 149, 106, 0.1);
    color: var(--wood-medium);
}

.table-btn-edit:hover {
    background: var(--wood-medium);
    color: var(--white);
}

.table-btn-delete {
    background: rgba(155, 34, 38, 0.1);
    color: #9b2226;
}

.table-btn-delete:hover {
    background: #9b2226;
    color: var(--white);
}

.table-btn-success {
    background: rgba(45, 106, 79, 0.1);
    color: #2d6a4f;
}

.table-btn-success:hover {
    background: #2d6a4f;
    color: var(--white);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-active {
    background: rgba(45, 106, 79, 0.1);
    color: #2d6a4f;
}

.badge-inactive {
    background: rgba(155, 34, 38, 0.1);
    color: #9b2226;
}

.badge-category {
    background: rgba(184, 149, 106, 0.1);
    color: var(--wood-dark);
}

/* ---- Admin Sections ---- */
.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

/* ---- Mobile Responsive ---- */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-strong);
    }

    .admin-mobile-header {
        display: flex;
    }

    .admin-main {
        margin-left: 0;
        padding: 80px 16px 24px;
    }

    .admin-header h1 {
        font-size: 1.4rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    .login-card {
        padding: 32px 24px;
    }

    .admin-header .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

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

    .admin-filters input {
        width: 100% !important;
    }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}
