/**
 * Admin Dashboard Styles
 * PHP Base Platform - Admin UI
 * Bootstrap 5.3 + Glass Morphism + CSS Variables
 */

/* ============================================
   1. CSS VARIABLES (Light Theme - Default)
   ============================================ */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --primary-color: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #4338ca;
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --primary-gradient-hover: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    --secondary-color: #64748b;
    --secondary-light: #94a3b8;
    --accent-color: #06b6d4;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --bg-color: #f1f5f9;
    --bg-secondary: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.72);
    --card-bg-solid: #ffffff;
    --text-color: #334155;
    --text-muted: #64748b;
    --text-heading: #1e293b;
    --border-color: rgba(148, 163, 184, 0.2);
    --border-color-solid: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.45);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --navbar-height: 68px;
    --footer-height: 56px;
    --content-padding: 28px;
}

/* ============================================
   2. BASE & RESET
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9375rem;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

::selection {
    background: var(--primary-light);
    color: #fff;
}

/* ============================================
   3. LAYOUT WRAPPER
   ============================================ */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ============================================
   4. SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-slow), transform var(--transition-slow);
    overflow: hidden;
}

.sidebar-brand {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.sidebar-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    white-space: nowrap;
}

.sidebar-brand .brand-link i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.sidebar-brand .brand-text {
    transition: opacity var(--transition-base), width var(--transition-base);
}

.sidebar-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
}

.sidebar-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-heading);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 10px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section {
    margin-bottom: 4px;
}

.sidebar-section-label {
    display: block;
    padding: 16px 16px 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    opacity: 0.6;
}

.sidebar-item {
    margin-bottom: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    cursor: pointer;
    min-height: 44px;
}

.sidebar-link:hover {
    background: rgba(79, 70, 229, 0.06);
    color: var(--primary-color);
}

.sidebar-link.active {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.sidebar-link.active .sidebar-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link .sidebar-text {
    white-space: nowrap;
    flex: 1;
    transition: opacity var(--transition-base), width var(--transition-base);
}

.sidebar-link .sidebar-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

.sidebar-link[aria-expanded="true"] .sidebar-arrow {
    transform: rotate(90deg);
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: #fff;
    margin-left: auto;
    flex-shrink: 0;
    transition: opacity var(--transition-base);
}

/* Submenu */
.sidebar-submenu {
    list-style: none;
    padding: 4px 0 4px 38px;
    margin: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height var(--transition-slow), opacity var(--transition-base);
}

.sidebar-submenu.show {
    max-height: 500px;
    opacity: 1;
}

.sidebar-submenu .sidebar-link {
    padding: 9px 14px;
    font-size: 0.8125rem;
    font-weight: 400;
    border-radius: var(--radius-sm);
}

.sidebar-submenu .sidebar-link::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-color-solid);
    margin-right: 10px;
    flex-shrink: 0;
    transition: background var(--transition-fast);
}

.sidebar-submenu .sidebar-link:hover::before,
.sidebar-submenu .sidebar-link.active::before {
    background: var(--primary-color);
}

.sidebar-submenu .sidebar-link.active {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary-color);
    box-shadow: none;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.sidebar-footer .sidebar-link {
    padding: 10px 14px;
}

/* ============================================
   5. COLLAPSED SIDEBAR (Icon Only)
   ============================================ */
.admin-wrapper.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

.admin-wrapper.sidebar-collapsed .sidebar .brand-text,
.admin-wrapper.sidebar-collapsed .sidebar .sidebar-text,
.admin-wrapper.sidebar-collapsed .sidebar .sidebar-arrow,
.admin-wrapper.sidebar-collapsed .sidebar .sidebar-badge {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

.admin-wrapper.sidebar-collapsed .sidebar .sidebar-brand {
    justify-content: center;
    padding: 0;
}

.admin-wrapper.sidebar-collapsed .sidebar .sidebar-brand .brand-link {
    justify-content: center;
}

.admin-wrapper.sidebar-collapsed .sidebar .sidebar-brand .sidebar-toggle {
    display: none;
}

.admin-wrapper.sidebar-collapsed .sidebar-submenu {
    display: none;
}

.admin-wrapper.sidebar-collapsed .sidebar-nav {
    padding: 12px 8px;
}

.admin-wrapper.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 14px;
}

.admin-wrapper.sidebar-collapsed .sidebar-link i {
    width: auto;
    font-size: 1.2rem;
}

/* Tooltip for collapsed sidebar */
.admin-wrapper.sidebar-collapsed .sidebar-link {
    position: relative;
}

.admin-wrapper.sidebar-collapsed .sidebar-link:hover::after {
    content: attr(data-title);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-heading);
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1050;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease;
}

.admin-wrapper.sidebar-collapsed .sidebar-link:hover::before {
    content: '';
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: var(--text-heading);
    z-index: 1050;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(-50%) translateX(-4px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* ============================================
   6. MAIN CONTENT AREA
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition-slow);
}

.admin-wrapper.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* ============================================
   7. TOP NAVBAR
   ============================================ */
.top-navbar {
    height: var(--navbar-height);
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 var(--content-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-heading);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    touch-action: manipulation;
}

.mobile-toggle:hover {
    background: var(--bg-secondary);
}

/* Quick Search */
.navbar-search {
    position: relative;
    width: 320px;
}

.navbar-search .search-input {
    width: 100%;
    height: 42px;
    padding: 0 42px 0 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.navbar-search .search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.navbar-search .search-input::placeholder {
    color: var(--text-muted);
}

.navbar-search .search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.navbar-search .search-btn:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Navbar Icons */
.nav-icon-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    touch-action: manipulation;
}

.nav-icon-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-heading);
}

.nav-icon-btn .nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    background: var(--danger);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--glass-bg);
}

.nav-icon-btn .nav-badge.success {
    background: var(--success);
}

.nav-icon-btn .nav-badge.warning {
    background: var(--warning);
}

/* Theme Toggle */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }

[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Profile Dropdown */
.nav-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    border: none;
    background: transparent;
}

.nav-profile:hover {
    background: var(--bg-secondary);
}

.nav-profile .profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--glass-border);
}

.nav-profile .profile-info {
    text-align: left;
    line-height: 1.3;
}

.nav-profile .profile-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-heading);
    display: block;
}

.nav-profile .profile-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.nav-profile .profile-arrow {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 4px;
}

/* ============================================
   8. DROPDOWN MENUS (Glass Effect)
   ============================================ */
.dropdown-menu-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 8px;
    min-width: 220px;
}

.dropdown-menu-glass .dropdown-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
}

.dropdown-menu-glass .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    min-height: 40px;
}

.dropdown-menu-glass .dropdown-item:hover {
    background: rgba(79, 70, 229, 0.06);
    color: var(--primary-color);
}

.dropdown-menu-glass .dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 0.9375rem;
}

.dropdown-menu-glass .dropdown-divider {
    margin: 6px 8px;
    border-top: 1px solid var(--border-color);
    opacity: 0.5;
}

/* Notification Dropdown */
.dropdown-notifications {
    min-width: 360px;
    max-height: 420px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dropdown-notifications .notification-list {
    overflow-y: auto;
    max-height: 340px;
    padding: 4px;
}

.dropdown-notifications .notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    position: relative;
}

.dropdown-notifications .notification-item:hover {
    background: rgba(79, 70, 229, 0.04);
}

.dropdown-notifications .notification-item.unread {
    background: rgba(59, 130, 246, 0.04);
}

.dropdown-notifications .notification-item.unread::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
}

.notification-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.notification-icon.icon-primary { background: var(--info-light); color: var(--info); }
.notification-icon.icon-success { background: var(--success-light); color: var(--success); }
.notification-icon.icon-warning { background: var(--warning-light); color: var(--warning); }
.notification-icon.icon-danger { background: var(--danger-light); color: var(--danger); }

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content .notification-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-content .notification-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-content .notification-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   9. CONTENT AREA
   ============================================ */
.content-area {
    flex: 1;
    padding: var(--content-padding);
}

/* Breadcrumbs */
.admin-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.admin-breadcrumb a {
    color: var(--text-muted);
}

.admin-breadcrumb a:hover {
    color: var(--primary-color);
}

.admin-breadcrumb .breadcrumb-separator {
    font-size: 0.625rem;
    opacity: 0.5;
}

.admin-breadcrumb .breadcrumb-active {
    color: var(--text-heading);
    font-weight: 500;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header .page-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
    letter-spacing: -0.02em;
}

.page-header .page-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   10. CARDS (Glass Morphism)
   ============================================ */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
}

.glass-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(148, 163, 184, 0.3);
}

.glass-card.lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header-glass {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: 12px;
}

.card-header-glass .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
}

.card-body-glass {
    padding: 24px;
}

.card-footer-glass {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
    background: rgba(148, 163, 184, 0.03);
}

/* ============================================
   11. STAT CARDS
   ============================================ */
.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    height: 100%;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 16px;
}

.stat-icon.icon-primary { background: linear-gradient(135deg, rgba(79,70,229,0.12), rgba(124,58,237,0.12)); color: var(--primary-color); }
.stat-icon.icon-success { background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(52,211,153,0.12)); color: var(--success); }
.stat-icon.icon-warning { background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(251,191,36,0.12)); color: var(--warning); }
.stat-icon.icon-danger { background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(248,113,113,0.12)); color: var(--danger); }
.stat-icon.icon-info { background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(96,165,250,0.12)); color: var(--info); }
.stat-icon.icon-accent { background: linear-gradient(135deg, rgba(6,182,212,0.12), rgba(34,211,238,0.12)); color: var(--accent-color); }

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.2;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.stat-card .stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.stat-card .stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.stat-trend.trend-up {
    color: var(--success);
    background: var(--success-light);
}

.stat-trend.trend-down {
    color: var(--danger);
    background: var(--danger-light);
}

.stat-trend.trend-neutral {
    color: var(--secondary-color);
    background: var(--bg-secondary);
}

.stat-trend i {
    font-size: 0.6875rem;
}

/* Stat Card Gradient Background Variant */
.stat-card-gradient {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
}

.stat-card-gradient .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.stat-card-gradient .stat-value,
.stat-card-gradient .stat-label {
    color: #fff;
}

.stat-card-gradient .stat-label {
    opacity: 0.85;
}

.stat-card-gradient .stat-trend {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ============================================
   12. TABLES
   ============================================ */
.glass-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.glass-table thead th {
    padding: 14px 18px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.05);
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
    user-select: none;
}

.glass-table thead th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

.glass-table thead th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.glass-table tbody td {
    padding: 14px 18px;
    font-size: 0.875rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.glass-table tbody tr {
    transition: background var(--transition-fast);
}

.glass-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.02);
}

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

.glass-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 var(--radius-sm);
}

.glass-table tbody tr:last-child td:last-child {
    border-radius: 0 0 var(--radius-sm) 0;
}

/* Table actions */
.table-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.table-actions .btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    touch-action: manipulation;
}

.table-actions .btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.table-actions .btn-icon.btn-danger:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* Table status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.status-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-badge.status-active { background: var(--success-light); color: #047857; }
.status-badge.status-active::before { background: var(--success); }
.status-badge.status-inactive { background: var(--secondary-light); color: var(--secondary-color); }
.status-badge.status-inactive::before { background: var(--secondary-color); }
.status-badge.status-pending { background: var(--warning-light); color: #b45309; }
.status-badge.status-pending::before { background: var(--warning); }
.status-badge.status-suspended { background: var(--danger-light); color: #b91c1c; }
.status-badge.status-suspended::before { background: var(--danger); }
.status-badge.status-draft { background: var(--info-light); color: #1d4ed8; }
.status-badge.status-draft::before { background: var(--info); }
.status-badge.status-published { background: var(--success-light); color: #047857; }
.status-badge.status-published::before { background: var(--success); }

/* ============================================
   13. FORMS
   ============================================ */
.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 8px;
    display: block;
}

.form-control-glass {
    width: 100%;
    padding: 11px 16px;
    font-size: 0.9375rem;
    color: var(--text-color);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-control-glass:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: var(--card-bg-solid);
}

.form-control-glass::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-control-glass:disabled,
.form-control-glass[readonly] {
    background: var(--bg-secondary);
    cursor: not-allowed;
    opacity: 0.7;
}

select.form-control-glass {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

textarea.form-control-glass {
    min-height: 120px;
    resize: vertical;
}

/* Floating Labels */
.form-floating-glass {
    position: relative;
}

.form-floating-glass .form-control-glass {
    padding-top: 18px;
    padding-bottom: 6px;
}

.form-floating-glass label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    font-size: 0.9375rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all var(--transition-fast);
    background: transparent;
    padding: 0 4px;
}

.form-floating-glass .form-control-glass:focus ~ label,
.form-floating-glass .form-control-glass:not(:placeholder-shown) ~ label {
    top: 0;
    left: 12px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--card-bg-solid);
}

/* Input Group */
.input-group-glass {
    display: flex;
    align-items: stretch;
}

.input-group-glass .input-group-text {
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 0.875rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.input-group-glass .input-group-text:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border-right: none;
}

.input-group-glass .input-group-text:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    border-left: none;
}

.input-group-glass .form-control-glass:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group-glass .form-control-glass:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group-glass .form-control-glass:not(:first-child):not(:last-child) {
    border-radius: 0;
}

.input-group-glass .form-control-glass:focus {
    z-index: 1;
}

/* Form Check */
.form-check-glass {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    min-height: 44px;
}

.form-check-glass input[type="checkbox"],
.form-check-glass input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-glass label {
    font-size: 0.875rem;
    color: var(--text-color);
    cursor: pointer;
    margin: 0;
    user-select: none;
}

/* ============================================
   14. BUTTONS
   ============================================ */
.btn-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    line-height: 1.5;
    min-height: 42px;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}

.btn-glass:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-glass.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-glass.btn-primary:hover:not(:disabled) {
    background: var(--primary-gradient-hover);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.btn-glass.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-glass.btn-secondary:hover:not(:disabled) {
    background: var(--border-color-solid);
}

.btn-glass.btn-success {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-glass.btn-success:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

.btn-glass.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-glass.btn-danger:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

.btn-glass.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-glass.btn-info {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-glass.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-glass.btn-outline-primary:hover:not(:disabled) {
    background: var(--primary-color);
    color: #fff;
}

.btn-glass.btn-sm {
    padding: 7px 14px;
    font-size: 0.8125rem;
    min-height: 34px;
}

.btn-glass.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    min-height: 50px;
}

.btn-glass.btn-icon-only {
    width: 42px;
    height: 42px;
    padding: 0;
    min-height: 42px;
}

/* ============================================
   15. MODALS
   ============================================ */
.modal-glass .modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

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

.modal-glass .modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-heading);
}

.modal-glass .modal-body {
    padding: 24px;
}

.modal-glass .modal-footer {
    border-top: 1px solid var(--glass-border);
    padding: 16px 24px;
}

.modal-glass .btn-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.modal-glass .btn-close:hover {
    opacity: 1;
}

.modal-backdrop-glass {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ============================================
   16. TABS
   ============================================ */
.nav-tabs-glass {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--glass-border);
    padding: 0;
    margin: 0 0 24px 0;
    list-style: none;
}

.nav-tabs-glass .nav-link {
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-height: 44px;
}

.nav-tabs-glass .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: rgba(79, 70, 229, 0.2);
}

.nav-tabs-glass .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

/* ============================================
   17. TOAST NOTIFICATIONS
   ============================================ */
.toast-container-glass {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-glass {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 320px;
    max-width: 440px;
    animation: toastSlideIn 0.35s ease;
    overflow: hidden;
    position: relative;
}

.toast-glass.toast-hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

.toast-glass::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast-glass.toast-success::before { background: var(--success); }
.toast-glass.toast-error::before { background: var(--danger); }
.toast-glass.toast-warning::before { background: var(--warning); }
.toast-glass.toast-info::before { background: var(--info); }

.toast-glass .toast-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.toast-glass.toast-success .toast-icon { background: var(--success-light); color: var(--success); }
.toast-glass.toast-error .toast-icon { background: var(--danger-light); color: var(--danger); }
.toast-glass.toast-warning .toast-icon { background: var(--warning-light); color: var(--warning); }
.toast-glass.toast-info .toast-icon { background: var(--info-light); color: var(--info); }

.toast-glass .toast-content {
    flex: 1;
    min-width: 0;
}

.toast-glass .toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 2px;
}

.toast-glass .toast-message {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.toast-glass .toast-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-glass .toast-close:hover {
    background: var(--bg-secondary);
    color: var(--text-heading);
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ============================================
   18. SCROLL TO TOP
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    z-index: 1020;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    touch-action: manipulation;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    box-shadow: 0 6px 24px rgba(79, 70, 229, 0.45);
    transform: translateY(-2px);
}

/* ============================================
   19. FOOTER
   ============================================ */
.admin-footer {
    padding: 18px var(--content-padding);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 8px;
    background: var(--card-bg);
}

.admin-footer a {
    color: var(--text-muted);
}

.admin-footer a:hover {
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    gap: 20px;
}

/* ============================================
   20. FILE UPLOAD
   ============================================ */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
    background: rgba(148, 163, 184, 0.02);
}

.file-upload-zone:hover,
.file-upload-zone.drag-over {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.03);
}

.file-upload-zone.drag-over {
    transform: scale(1.01);
}

.file-upload-zone .upload-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.file-upload-zone .upload-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.file-upload-zone .upload-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Image Preview */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.image-preview-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid var(--glass-border);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--danger);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.image-preview-item:hover .remove-btn {
    opacity: 1;
}

/* ============================================
   21. LIGHTBOX
   ============================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1070;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform var(--transition-slow);
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   22. PROGRESS & LOADING
   ============================================ */
.progress-glass {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-glass .progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    transition: width 0.4s ease;
}

.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-color-solid) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spinner-glass {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   23. ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fadeIn { animation: fadeIn 0.4s ease forwards; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }
.animate-fadeInDown { animation: fadeInDown 0.3s ease forwards; }
.animate-scaleIn { animation: scaleIn 0.3s ease forwards; }

/* Stagger animation delays */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }

/* ============================================
   24. QUICK ACTIONS
   ============================================ */
.quick-action-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    color: inherit;
}

.quick-action-card .quick-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.quick-action-card .quick-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 2px;
}

.quick-action-card .quick-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ============================================
   25. MOBILE OVERLAY
   ============================================ */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   26. RESPONSIVE BREAKPOINTS
   ============================================ */

/* Ultra-wide screens (2560px+) */
@media (min-width: 2560px) {
    :root {
        --content-padding: 40px;
        --sidebar-width: 300px;
    }
    .content-area {
        max-width: 2400px;
        margin: 0 auto;
    }
}

/* Large Desktop (1201px - 1920px) */
@media (min-width: 1201px) and (max-width: 1920px) {
    /* Default styles apply */
}

/* Tablet (769px - 1200px) */
@media (min-width: 769px) and (max-width: 1200px) {
    .navbar-search {
        width: 240px;
    }
    .nav-profile .profile-info,
    .nav-profile .profile-arrow {
        display: none;
    }
}

/* Mobile and Tablet below 768px */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
    }
    .mobile-toggle {
        display: flex;
    }
    .navbar-search {
        display: none;
    }
    .nav-profile .profile-info,
    .nav-profile .profile-arrow {
        display: none;
    }
    .content-area {
        padding: 16px;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .page-header .page-title {
        font-size: 1.375rem;
    }
    .admin-footer {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    .footer-links {
        gap: 16px;
    }
    .toast-container-glass {
        left: 16px;
        right: 16px;
        top: 16px;
    }
    .toast-glass {
        min-width: unset;
        max-width: unset;
    }
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    /* Collapsed sidebar shouldn't affect mobile */
    .admin-wrapper.sidebar-collapsed .sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%);
    }
    .admin-wrapper.sidebar-collapsed .sidebar.open {
        transform: translateX(0);
    }
    .admin-wrapper.sidebar-collapsed .main-content {
        margin-left: 0;
    }
    .admin-wrapper.sidebar-collapsed .sidebar-link:hover::after,
    .admin-wrapper.sidebar-collapsed .sidebar-link:hover::before {
        display: none;
    }
}

/* Small Mobile (576px and below) */
@media (max-width: 576px) {
    .stat-card {
        padding: 18px;
    }
    .glass-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .card-header-glass {
        padding: 16px 18px;
    }
    .card-body-glass {
        padding: 18px;
    }
    .dropdown-notifications {
        min-width: 280px;
    }
    .nav-tabs-glass {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .scroll-top {
        width: 42px;
        height: 42px;
        bottom: 16px;
        right: 16px;
    }
    .quick-action-card {
        padding: 14px;
    }
    .quick-action-card .quick-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Foldable screens / Very small (280px) */
@media (max-width: 280px) {
    :root {
        --content-padding: 10px;
    }
    .sidebar {
        width: 240px;
    }
    .content-area {
        padding: 10px;
    }
    .stat-card .stat-value {
        font-size: 1.25rem;
    }
    .stat-card .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    .top-navbar {
        padding: 0 10px;
        height: 56px;
    }
    .btn-glass {
        padding: 8px 14px;
        font-size: 0.8125rem;
        min-height: 38px;
    }
    .card-header-glass {
        padding: 14px 14px;
    }
    .card-body-glass {
        padding: 14px;
    }
    .form-control-glass {
        padding: 9px 12px;
        font-size: 0.875rem;
    }
    .page-header .page-title {
        font-size: 1.125rem;
    }
    .dropdown-notifications {
        min-width: 240px;
    }
}

/* ============================================
   27. PRINT STYLES
   ============================================ */
@media print {
    .sidebar,
    .top-navbar,
    .admin-footer,
    .scroll-top,
    .sidebar-overlay,
    .btn-glass:not(.btn-print),
    .table-actions,
    .nav-icon-btn,
    .sidebar-toggle,
    .mobile-toggle {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
    .content-area {
        padding: 0;
    }
    .glass-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    body {
        background: #fff;
        color: #000;
    }
    .page-header {
        margin-bottom: 16px;
    }
    .glass-table thead th {
        background: #f5f5f5;
    }
    a[href]:after {
        content: none;
    }
}

/* ============================================
   28. ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .glass-card,
    .stat-card,
    .sidebar,
    .top-navbar {
        border-width: 2px;
    }
    .sidebar-link.active {
        outline: 2px solid #fff;
        outline-offset: -2px;
    }
}

/* ============================================
   29. SCROLL ANIMATIONS (IntersectionObserver)
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   30. AVATARS
   ============================================ */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-xs { width: 24px; height: 24px; font-size: 0.625rem; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md { width: 40px; height: 40px; font-size: 0.875rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.125rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 1.5rem; }

.avatar-text {
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 600;
}

/* ============================================
   31. DIVIDERS & HELPERS
   ============================================ */
.divider-glass {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 16px 0;
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state .empty-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state .empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.empty-state .empty-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
