/* ====================================
   ULTRA PREMIUM SMM PANEL v2.0
   Ana CSS Dosyası - GÜNCELLENMİŞ
==================================== */

/* ====================================
   CSS DEĞİŞKENLERİ (TOKENS)
==================================== */
:root {
    /* Renk Paleti - Referansın ötesinde, daha derin ve zengin */
    --bg-primary: #05070c;
    --bg-secondary: #0a0d14;
    --bg-tertiary: #0f131c;
    --bg-card: rgba(12, 15, 24, 0.88);
    --bg-card-hover: rgba(18, 22, 34, 0.98);
    --bg-input: rgba(0, 0, 0, 0.4);
    --surface: rgba(255, 255, 255, 0.025);
    
    --accent: #8b7cff;
    --accent-light: #b4a4ff;
    --accent-dark: #6b5ce8;
    --accent-glow: rgba(139, 124, 255, 0.4);
    --accent-glow-strong: rgba(139, 124, 255, 0.25);
    
    --success: #00e8a4;
    --success-dim: rgba(0, 232, 164, 0.15);
    --warning: #ffb84d;
    --danger: #ff6b7a;
    --info: #5eb8ff;
    
    --text-primary: #f6f6fa;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-disabled: rgba(255, 255, 255, 0.32);
    
    --border: rgba(255, 255, 255, 0.055);
    --border-hover: rgba(139, 124, 255, 0.4);
    --border-focus: var(--accent);
    
    /* Gradients - daha canlı, daha premium */
    --gradient-primary: linear-gradient(135deg, #7c6bff 0%, #a78fff 40%, #8b7cff 100%);
    --gradient-primary-soft: linear-gradient(135deg, rgba(124, 107, 255, 0.25) 0%, rgba(167, 143, 255, 0.12) 100%);
    --gradient-success: linear-gradient(135deg, #00e8a4, #34f0b8);
    --gradient-warning: linear-gradient(135deg, #ffb84d, #ffd666);
    --gradient-danger: linear-gradient(135deg, #ff6b7a, #ff8e9a);
    --gradient-info: linear-gradient(135deg, #5eb8ff, #8bceff);
    
    /* Shadows - daha katmanlı, glow vurgulu */
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
    --shadow-lg: 0 28px 56px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,0.04);
    --shadow-xl: 0 36px 72px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 48px var(--accent-glow), 0 0 96px rgba(139, 124, 255, 0.12);
    --shadow-glow-subtle: 0 0 24px rgba(139, 124, 255, 0.15);
    --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    
    /* Border Radius - daha yuvarlak, premium */
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 26px;
    --radius-3xl: 34px;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    
    /* Typography - Plus Jakarta Sans */
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-md: 13px;
    --font-size-lg: 14px;
    --font-size-xl: 16px;
    --font-size-2xl: 18px;
    --font-size-3xl: 20px;
    --font-size-4xl: 24px;
    --font-size-5xl: 28px;
    --font-size-6xl: 32px;
    
    /* Premium Typography Scale - tüm başlık ve kart yazıları için */
    --typo-hero: 30px;
    --typo-hero-label: 14px;
    --typo-hero-sub: 15px;
    --typo-card-header: 14px;
    --typo-kpi-label: 11px;
    --typo-kpi-value: 20px;
    --typo-stat-label: 11px;
    --typo-stat-value: 20px;
    --typo-body: 13px;
    --typo-table-th: 11px;
    --typo-table-td: 13px;
    --typo-weight-header: 700;
    --typo-weight-value: 700;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ====================================
   FOCUS & ACCESSIBILITY
==================================== */
.btn:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 0;
}

/* Auth & empty states */
.auth-card {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    padding: var(--space-6);
}

.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-5);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.6;
}

.empty-state h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

/* ====================================
   RESET & BASE STYLES
==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: #040609;
    background-image:
        radial-gradient(ellipse 120% 70% at 30% -20%, rgba(139, 124, 255, 0.22), transparent 50%),
        radial-gradient(ellipse 80% 50% at 90% 30%, rgba(94, 184, 255, 0.08), transparent 45%),
        radial-gradient(ellipse 60% 40% at 10% 80%, rgba(0, 232, 164, 0.06), transparent 40%);
    color: var(--text-primary);
    line-height: 1.55;
    font-size: var(--font-size-md);
    min-height: 100vh;
    transition: background var(--transition-base), color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====================================
   TYPOGRAPHY
==================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-4);
}

h1 { font-size: var(--font-size-6xl); }
h2 { font-size: var(--font-size-5xl); }
h3 { font-size: var(--font-size-4xl); }
h4 { font-size: var(--font-size-3xl); }
h5 { font-size: var(--font-size-2xl); }
h6 { font-size: var(--font-size-xl); }

p {
    margin-bottom: var(--space-4);
}

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-accent { color: var(--accent); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

/* ====================================
   LAYOUT
==================================== */
.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 1;
}

.main-content {
    flex: 1;
    padding: 0 var(--space-8) var(--space-8);
    overflow-x: auto;
    background: transparent;
    transition: padding var(--transition-base);
    display: flex;
    flex-direction: column;
}

/* Üst bar - dashboard üst şeridi */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6);
    margin: 0 calc(var(--space-8) * -1) var(--space-5) calc(var(--space-8) * -1);
    padding-left: var(--space-8);
    padding-right: var(--space-8);
    background: rgba(10, 13, 20, 0.95);
    border-bottom: 2px solid rgba(139, 124, 255, 0.25);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.top-bar-date {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.top-bar-divider {
    width: 1px;
    height: 18px;
    background: linear-gradient(180deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

.top-bar-label {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.top-bar-user {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all var(--transition-base);
}

.top-bar-user:hover {
    background: rgba(139, 124, 255, 0.15);
    border-color: rgba(139, 124, 255, 0.4);
    color: var(--text-primary);
}

.top-bar-user i {
    font-size: 1.1rem;
    color: var(--accent);
}

.top-bar-tenant-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    background: rgba(139, 124, 255, 0.12);
    border: 1px solid rgba(139, 124, 255, 0.25);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.top-bar-tenant-badge i {
    color: var(--accent);
}

.top-bar-tenant-switcher .tenant-select {
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    cursor: pointer;
}

.top-bar-tenant-switcher .tenant-select:focus {
    outline: none;
    border-color: var(--accent);
}

.breadcrumb {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border);
}

/* ====================================
   SIDEBAR
==================================== */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0c0f18 0%, #060810 100%);
    border-right: 2px solid rgba(139, 124, 255, 0.2);
    padding: var(--space-5) var(--space-4);
    position: sticky;
    top: 0;
    min-height: 100vh;
    align-self: stretch;
    overflow-y: auto;
    transition: all var(--transition-base);
    z-index: var(--z-sticky);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.02);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: var(--space-3);
}

.sidebar.collapsed .nav-link i {
    margin: 0;
    font-size: 20px;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: var(--radius-full);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    position: relative;
    gap: 10px;
    padding-right: 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: all var(--transition-base);
    min-width: 0;
    flex: 1;
}

.brand:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 24px var(--accent-glow);
}

.brand-logo {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    box-shadow: 0 8px 20px var(--accent-glow);
}

.brand-text {
    flex: 1;
}

.brand-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.brand-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
    letter-spacing: 0.02em;
}

.collapse-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    pointer-events: auto;
    flex-shrink: 0;
}

.collapse-btn:hover {
    border-color: var(--accent);
    background: rgba(109, 94, 252, 0.1);
}

.collapse-btn i {
    transition: transform var(--transition-base);
}

.sidebar.collapsed .collapse-btn i {
    transform: rotate(180deg);
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-5) 0;
}

.nav-item {
    margin: var(--space-1) 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-left-color: var(--border-hover);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(139, 124, 255, 0.2), rgba(139, 124, 255, 0.06));
    border-color: rgba(139, 124, 255, 0.3);
    border-left-color: var(--accent);
    color: white;
    box-shadow: inset 0 0 0 1px rgba(139, 124, 255, 0.12), 0 0 24px rgba(139, 124, 255, 0.08);
}

.nav-link.active i {
    color: var(--accent-light);
}

.nav-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: var(--accent);
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-4) 0;
}

.sidebar-footer {
    margin-top: var(--space-8);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    transform: rotate(15deg);
}

/* Duyuru Modal - Ultra Premium */
.announcement-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: announcementFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.announcement-modal.announcement-hidden {
    display: none !important;
}
.announcement-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 12, 0.75);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    animation: announcementBackdropIn 0.4s ease;
}
.announcement-modal-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 460px;
    width: calc(100% - 48px);
    background: 
        linear-gradient(135deg, rgba(18, 20, 32, 0.98) 0%, rgba(10, 12, 22, 0.99) 50%, rgba(14, 16, 28, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.24);
    border-radius: 20px;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 32px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(212, 175, 55, 0.22),
        0 0 60px rgba(212, 175, 55, 0.08),
        0 0 120px rgba(139, 124, 255, 0.06);
    overflow: hidden;
    animation: announcementBoxIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.announcement-modal-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(212, 175, 55, 0.06) 0%, transparent 60%);
    pointer-events: none;
}
.announcement-modal-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}
.announcement-modal-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d4af37 0%, #f0d47a 50%, #c9a227 100%);
    border-radius: 14px;
    color: rgba(10, 12, 22, 0.95);
    font-size: 20px;
    box-shadow: 
        0 4px 16px rgba(212, 175, 55, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}
.announcement-modal-header h4 {
    flex: 1;
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f6f6fa;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.announcement-modal-close {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.announcement-modal-close:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(239, 71, 111, 0.4);
    color: #ef476f;
    transform: scale(1.05);
}
.announcement-modal-body {
    position: relative;
    padding: 24px;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.01em;
}
.announcement-modal-footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.35) 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.12);
}
.announcement-modal-footer .btn-primary {
    background: linear-gradient(135deg, #7c6bff 0%, #a78fff 100%);
    border: none;
    box-shadow: 0 4px 20px rgba(124, 107, 255, 0.35);
}
.announcement-modal-footer .btn-primary:hover {
    box-shadow: 0 6px 28px rgba(124, 107, 255, 0.45);
    transform: translateY(-1px);
}
.announcement-dismiss-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
}
.announcement-dismiss-label input { cursor: pointer; }
@keyframes announcementFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes announcementBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes announcementBoxIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.92);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    display: block;
    font-weight: 700;
    font-size: var(--font-size-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-plan-badge {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
}

/* ====================================
   PAGE HEADER
==================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding: var(--space-5) var(--space-6);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    animation: fadeIn var(--transition-slow);
}

.page-header h1 {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.page-header .text-muted {
    color: var(--text-muted);
    margin-top: var(--space-1);
    font-size: var(--font-size-sm);
}

.header-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

/* ====================================
   PAGE HERO (Premium)
==================================== */
.page-hero,
.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    margin-bottom: var(--space-6);
    padding: var(--space-8) var(--space-8);
}

.card-gradient {
    background:
        linear-gradient(135deg, rgba(139, 124, 255, 0.18) 0%, transparent 50%),
        radial-gradient(140% 140% at 0% 0%, rgba(139, 124, 255, 0.35), transparent 50%),
        radial-gradient(110% 110% at 100% 100%, rgba(0, 232, 164, 0.12), transparent 48%),
        var(--bg-card);
    border-radius: var(--radius-2xl);
    border: 2px solid rgba(139, 124, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.06), 0 0 60px rgba(139, 124, 255, 0.15);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    animation: fadeInUp 0.5s ease-out;
}

.card-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.card-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    pointer-events: none;
}

.hero-main {
    position: relative;
    z-index: 1;
    text-align: left;
}

.hero-label {
    font-size: var(--font-size-xs);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
    font-weight: 600;
}

.hero-title {
    margin: 0 0 var(--space-2) 0;
    font-size: var(--font-size-5xl);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.12;
}

.hero-title span {
    background: linear-gradient(135deg, #fff 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: 500;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    position: relative;
    z-index: 1;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.kpi-card {
    background: linear-gradient(180deg, rgba(18, 22, 34, 0.95), rgba(10, 13, 22, 0.98));
    border: 2px solid rgba(139, 124, 255, 0.15);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-xl);
    padding: var(--space-5) var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    cursor: pointer;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-base);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.04);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    animation: fadeInUp 0.45s ease-out backwards;
}

.kpi-grid .kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-grid .kpi-card:nth-child(2) { animation-delay: 0.1s; border-left-color: #00e8a4; }
.kpi-grid .kpi-card:nth-child(3) { animation-delay: 0.15s; border-left-color: #5eb8ff; }
.kpi-grid .kpi-card:nth-child(4) { animation-delay: 0.2s; border-left-color: #ffb84d; }

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    opacity: 0.8;
}

.kpi-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary-soft);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.kpi-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 124, 255, 0.4);
    border-left-width: 4px;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.06), 0 0 48px rgba(139, 124, 255, 0.2);
}

.kpi-card:hover::after {
    opacity: 1;
}

.kpi-card.stat-mini {
    cursor: default;
}

.kpi-card.stat-mini:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.kpi-card.stat-mini:hover::after {
    opacity: 0;
}

.kpi-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: white;
    box-shadow: 0 12px 32px var(--accent-glow);
    position: relative;
    z-index: 1;
}

.kpi-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.kpi-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.card-elevated {
    background: linear-gradient(180deg, rgba(14, 18, 28, 0.95), rgba(8, 11, 18, 0.98));
    border-radius: var(--radius-xl);
    border: 2px solid rgba(139, 124, 255, 0.12);
    border-left: 4px solid rgba(139, 124, 255, 0.35);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.03);
    transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
    backdrop-filter: blur(12px);
    position: relative;
}

.card-elevated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(139, 124, 255, 0.3), transparent);
    pointer-events: none;
    opacity: 0.8;
}

.card-elevated:hover {
    border-color: rgba(139, 124, 255, 0.3);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.05), 0 0 40px rgba(139, 124, 255, 0.12);
}

@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .page-hero, .dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: var(--space-5);
    }
    .hero-actions {
        width: 100%;
    }
}

/* Dashboard page specifics */
.dashboard-page { padding: 12px 0 24px; }
.kpi-trend { display: flex; align-items: center; gap: 6px; font-size: var(--font-size-xs); }
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }
.trend-stable { color: var(--text-muted); }
.progress-badge { display: block; height: 4px; background: var(--accent); border-radius: var(--radius-full); margin-top: 4px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-4); margin-bottom: var(--space-4); }
.recent-orders-list { max-height: 280px; overflow-y: auto; }
.recent-order-item { display: flex; align-items: center; padding: 10px 12px; margin-bottom: 8px; background: rgba(12, 16, 27, 0.9); border: 1px solid var(--border); border-radius: var(--radius-lg); text-decoration: none; color: var(--text-primary); transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease; }
.recent-order-item:hover { transform: translateX(4px); border-color: var(--accent); background: rgba(20, 24, 38, 0.95); }
.order-id { font-weight: 700; color: var(--accent); min-width: 72px; }
.order-paket { flex: 1; font-size: var(--font-size-sm); color: var(--text-secondary); }
.order-status { padding: 3px 8px; border-radius: var(--radius-full); font-size: 10px; font-weight: 600; margin: 0 8px; }
.order-time { font-size: var(--font-size-xs); color: var(--text-muted); }
.balance-list { display: flex; flex-direction: column; gap: 12px; }
.balance-item { display: flex; flex-direction: column; gap: 4px; }
.balance-info { display: flex; justify-content: space-between; align-items: center; }
.site-name { font-size: var(--font-size-md); font-weight: 600; }
.balance-value { font-weight: 700; }
.balance-critical { color: var(--danger); }
.balance-low { color: var(--warning); }
.balance-normal { color: var(--success); }
.balance-high { color: var(--accent); }
.balance-bar { height: 6px; background: var(--bg-primary); border-radius: var(--radius-full); overflow: hidden; }
.balance-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.3s ease; }
.balance-fill.balance-critical { background: var(--danger); }
.balance-fill.balance-low { background: var(--warning); }
.balance-fill.balance-normal { background: var(--success); }
.balance-fill.balance-high { background: var(--accent); }
.alerts-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-lg); border: 1px solid transparent; }
.alert-item.warning { background: rgba(255, 209, 102, 0.06); border-color: rgba(255, 209, 102, 0.32); }
.alert-item.danger { background: rgba(255, 107, 107, 0.06); border-color: rgba(255, 107, 107, 0.35); }
.alert-item i { font-size: 18px; }
.alert-item.warning i { color: var(--warning); }
.alert-item.danger i { color: var(--danger); }
.alert-content { flex: 1; }
.alert-title { display: block; font-weight: 700; margin-bottom: 2px; }
.alert-message { font-size: var(--font-size-xs); opacity: 0.8; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.quick-action { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 13px 10px; background: rgba(10, 12, 18, 0.96); border: 1px solid var(--border); border-radius: var(--radius-lg); text-decoration: none; color: var(--text-primary); transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease; }
.quick-action:hover { transform: translateY(-2px); border-color: var(--accent); background: rgba(18, 22, 32, 0.98); }
.quick-action i { font-size: 22px; color: var(--accent); }
.quick-action span { font-size: var(--font-size-xs); font-weight: 600; text-align: center; }
.bottom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-4); margin-top: var(--space-4); }
.popular-list { display: flex; flex-direction: column; gap: 8px; }
.popular-item { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.rank { width: 24px; height: 24px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: var(--font-size-sm); font-weight: 700; color: white; }
.package-name { flex: 1; font-size: var(--font-size-sm); }
.package-count { font-size: var(--font-size-xs); color: var(--text-muted); }
.activity-list { max-height: 200px; overflow-y: auto; }
.activity-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid var(--border); font-size: var(--font-size-sm); }
.activity-time { min-width: 45px; color: var(--text-muted); }
.activity-icon { width: 20px; }
.activity-message { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.health-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.health-item:last-child { border-bottom: none; }
.health-label { font-size: var(--font-size-md); }
.health-status.ok { color: var(--success); }

@media (max-width: 1200px) {
    .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
    .bottom-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .page-hero,
    .dashboard-hero { flex-direction: column; align-items: flex-start; gap: var(--space-5); padding: var(--space-5) var(--space-5); }
    .hero-actions { width: 100%; flex-direction: column; align-items: stretch; }
}
@media (max-width: 768px) {
    .quick-actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .quick-actions-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ====================================
   CARDS
==================================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-5);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 2px solid rgba(139, 124, 255, 0.2);
}

.card-header h1, 
.card-header h2, 
.card-header h3, 
.card-header h4, 
.card-header h5 {
    margin: 0;
    font-size: var(--typo-card-header);
    font-weight: var(--typo-weight-header);
}

.card-header h1 i,
.card-header h2 i,
.card-header h3 i,
.card-header h4 i,
.card-header h5 i {
    margin-right: var(--space-2);
    color: var(--accent);
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-tools {
    display: flex;
    gap: var(--space-2);
}

.card-body {
    padding: var(--space-5);
}

.card-footer {
    padding: var(--space-4) var(--space-5);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: var(--space-5);
}

/* ====================================
   BUTTONS
==================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    line-height: 1;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-primary:hover {
    box-shadow: 0 10px 36px var(--accent-glow), 0 0 0 1px rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--gradient-success);
    border: none;
    color: white;
}

.btn-warning {
    background: var(--gradient-warning);
    border: none;
    color: white;
}

.btn-danger {
    background: var(--gradient-danger);
    border: none;
    color: white;
}

.btn-info {
    background: var(--gradient-info);
    border: none;
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--font-size-lg);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: var(--space-2);
    border-radius: var(--radius-full);
}

/* ====================================
   FORMS
==================================== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label i {
    margin-right: var(--space-1);
    color: var(--accent);
}

.form-control {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
    line-height: 1.5;
}

.form-control:hover {
    border-color: var(--border-hover);
}

.form-control:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(0, 0, 0, 0.45);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-valid {
    border-color: var(--success);
}

.form-control::placeholder {
    color: var(--text-disabled);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c6bff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    padding-right: var(--space-8);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.input-group {
    display: flex;
    gap: var(--space-2);
}

.input-group .form-control {
    flex: 1;
}

.form-text {
    display: block;
    margin-top: var(--space-1);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: var(--space-3) 0;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.form-check-label {
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Checkbox Custom */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all var(--transition-base);
}

.checkbox-container:hover .checkmark {
    border-color: var(--accent);
}

.checkbox-container input:checked ~ .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

/* Radio Custom */
.radio-container {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    user-select: none;
}

.radio-container input {
    position: absolute;
    opacity: 0;
}

.radio-mark {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.radio-container:hover .radio-mark {
    border-color: var(--accent);
}

.radio-container input:checked ~ .radio-mark {
    border-color: var(--accent);
}

.radio-mark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-container input:checked ~ .radio-mark:after {
    display: block;
    left: 4px;
    top: 4px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

/* ====================================
   TABLES
==================================== */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.table th {
    text-align: left;
    padding: var(--space-4) var(--space-3);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: var(--space-3) var(--space-3);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr {
    transition: all var(--transition-fast);
}

.table tbody tr:hover {
    background: rgba(109, 94, 252, 0.05);
}

.table tbody tr.selected {
    background: rgba(109, 94, 252, 0.1);
}

.table th.sortable {
    cursor: pointer;
    transition: color var(--transition-base);
}

.table th.sortable:hover {
    color: var(--accent);
}

.th-content {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.sort-icons {
    color: var(--text-muted);
    font-size: 12px;
}

/* ====================================
   BADGES
==================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge i {
    font-size: 10px;
}

.badge-success {
    background: rgba(6, 214, 160, 0.15);
    color: var(--success);
    border: 1px solid rgba(6, 214, 160, 0.3);
}

.badge-warning {
    background: rgba(255, 209, 102, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 209, 102, 0.3);
}

.badge-danger {
    background: rgba(255, 107, 107, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.badge-info {
    background: rgba(74, 158, 255, 0.15);
    color: var(--info);
    border: 1px solid rgba(74, 158, 255, 0.3);
}

.badge-primary {
    background: rgba(109, 94, 252, 0.15);
    color: var(--accent);
    border: 1px solid rgba(109, 94, 252, 0.3);
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* ====================================
   ALERTS
==================================== */
.alert {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
    border: 1px solid transparent;
    animation: slideIn var(--transition-slow);
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background: rgba(6, 214, 160, 0.1);
    border-color: rgba(6, 214, 160, 0.3);
    color: var(--success);
}

.alert-warning {
    background: rgba(255, 209, 102, 0.1);
    border-color: rgba(255, 209, 102, 0.3);
    color: var(--warning);
}

.alert-danger {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
    color: var(--danger);
}

.alert-info {
    background: rgba(74, 158, 255, 0.1);
    border-color: rgba(74, 158, 255, 0.3);
    color: var(--info);
}

/* ====================================
   TOAST
==================================== */
.toast-container {
    position: fixed;
    top: var(--space-5);
    right: var(--space-5);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    width: 350px;
    max-width: calc(100vw - var(--space-8));
    pointer-events: none;
}

.toast {
    position: relative;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-left: 4px solid;
    border-radius: var(--radius-md);
    padding: var(--space-4);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    transform: translateX(120%);
    opacity: 0;
    transition: all var(--transition-base);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    animation: slideInRight var(--transition-base);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-warning {
    border-left-color: var(--warning);
}

.toast-info {
    border-left-color: var(--accent);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: var(--font-size-sm);
    margin-bottom: 2px;
}

.toast-message {
    font-size: var(--font-size-xs);
    opacity: 0.9;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    width: 100%;
    animation: progress 4s linear forwards;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ====================================
   MODALS
==================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.modal.show {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn var(--transition-base);
}

.modal-container {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: calc(var(--z-modal) + 1);
    animation: scaleIn var(--transition-base);
    box-shadow: var(--shadow-xl);
}

.modal-lg {
    max-width: 700px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.modal-header h3 i {
    margin-right: var(--space-2);
    color: var(--accent);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color var(--transition-base);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
}

.modal-close:hover {
    color: var(--danger);
    background: rgba(255, 107, 107, 0.1);
}

.modal-body {
    margin-bottom: var(--space-5);
}

.modal-footer {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

/* ====================================
   PAGINATION
==================================== */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-5);
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.pagination-info {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.pagination-info strong {
    color: var(--text-primary);
}

.pagination {
    display: flex;
    gap: var(--space-1);
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--space-2);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
}

.page-link:hover:not(.disabled):not(.active) {
    background: rgba(109, 94, 252, 0.2);
    border-color: var(--accent);
    color: white;
}

.page-link.active {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.page-link.dots {
    border: none;
    background: transparent;
    cursor: default;
}

/* ====================================
   GRID SYSTEM
==================================== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(-1 * var(--space-3));
}

.col {
    flex: 1;
    padding: 0 var(--space-3);
}

.col-1 { width: 8.33%; }
.col-2 { width: 16.66%; }
.col-3 { width: 25%; }
.col-4 { width: 33.33%; }
.col-5 { width: 41.66%; }
.col-6 { width: 50%; }
.col-7 { width: 58.33%; }
.col-8 { width: 66.66%; }
.col-9 { width: 75%; }
.col-10 { width: 83.33%; }
.col-11 { width: 91.66%; }
.col-12 { width: 100%; }

@media (max-width: 768px) {
    .col-3, .col-4, .col-6 {
        width: 100%;
    }
}

/* ====================================
   ANIMATIONS
==================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.fade-in {
    animation: fadeIn var(--transition-base);
}

.slide-in {
    animation: slideIn var(--transition-slow);
}

.scale-in {
    animation: scaleIn var(--transition-base);
}

.spinner {
    animation: spin 1s linear infinite;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ====================================
   PAGE LOADER & GLOBAL
==================================== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader .loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Global scrollbar (body / main) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-light);
}

.main-content {
    animation: slideIn 0.5s ease;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent); }
    70% { box-shadow: 0 0 0 10px rgba(109, 94, 252, 0); }
    100% { box-shadow: 0 0 0 0 rgba(109, 94, 252, 0); }
}

.notification-badge {
    animation: pulse-glow 2s infinite;
}

/* ====================================
   LOADING STATES
==================================== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        rgba(255, 255, 255, 0.05) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

/* ====================================
   UTILITY CLASSES
==================================== */
/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-grid { display: grid; }

/* Flex */
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-1 { flex: 1; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }
.align-center { align-items: center; }
.align-stretch { align-items: stretch; }

/* Grid */
.grid {
    display: grid;
    gap: var(--space-4);
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* Margins */
.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-5 { margin: var(--space-5); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: var(--space-1); }
.ml-2 { margin-left: var(--space-2); }
.ml-3 { margin-left: var(--space-3); }
.ml-4 { margin-left: var(--space-4); }
.ml-5 { margin-left: var(--space-5); }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: var(--space-1); }
.mr-2 { margin-right: var(--space-2); }
.mr-3 { margin-right: var(--space-3); }
.mr-4 { margin-right: var(--space-4); }
.mr-5 { margin-right: var(--space-5); }

.mx-auto { margin-left: auto; margin-right: auto; }

/* Paddings */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: var(--space-1); }
.pt-2 { padding-top: var(--space-2); }
.pt-3 { padding-top: var(--space-3); }
.pt-4 { padding-top: var(--space-4); }
.pt-5 { padding-top: var(--space-5); }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: var(--space-1); }
.pb-2 { padding-bottom: var(--space-2); }
.pb-3 { padding-bottom: var(--space-3); }
.pb-4 { padding-bottom: var(--space-4); }
.pb-5 { padding-bottom: var(--space-5); }

.pl-0 { padding-left: 0; }
.pl-1 { padding-left: var(--space-1); }
.pl-2 { padding-left: var(--space-2); }
.pl-3 { padding-left: var(--space-3); }
.pl-4 { padding-left: var(--space-4); }
.pl-5 { padding-left: var(--space-5); }

.pr-0 { padding-right: 0; }
.pr-1 { padding-right: var(--space-1); }
.pr-2 { padding-right: var(--space-2); }
.pr-3 { padding-right: var(--space-3); }
.pr-4 { padding-right: var(--space-4); }
.pr-5 { padding-right: var(--space-5); }

/* Width/Height */
.w-100 { width: 100%; }
.w-75 { width: 75%; }
.w-50 { width: 50%; }
.w-25 { width: 25%; }
.w-auto { width: auto; }

.h-100 { height: 100%; }
.h-75 { height: 75%; }
.h-50 { height: 50%; }
.h-25 { height: 25%; }
.h-auto { height: auto; }

/* Border */
.border { border: 1px solid var(--border); }
.border-top { border-top: 1px solid var(--border); }
.border-bottom { border-bottom: 1px solid var(--border); }
.border-left { border-left: 1px solid var(--border); }
.border-right { border-right: 1px solid var(--border); }
.border-0 { border: none; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-glow { box-shadow: var(--shadow-glow); }
.shadow-none { box-shadow: none; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-help { cursor: help; }
.cursor-wait { cursor: wait; }
.cursor-not-allowed { cursor: not-allowed; }

/* Overflow */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-scroll { overflow: scroll; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Position */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

/* Z-index */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-auto { z-index: auto; }

/* ====================================
   RESPONSIVE
==================================== */
@media (max-width: 1200px) {
    :root {
        --space-6: 20px;
        --space-8: 28px;
    }
    
    .grid-cols-4,
    .grid-cols-5,
    .grid-cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar .brand-text,
    .sidebar .nav-link span,
    .sidebar .user-info {
        display: none;
    }
    
    .sidebar .nav-link {
        justify-content: center;
        padding: var(--space-3);
    }
    
    .sidebar .nav-link i {
        margin: 0;
        font-size: 20px;
    }
    
    .grid-cols-3,
    .grid-cols-4,
    .grid-cols-5,
    .grid-cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --space-5: 16px;
        --space-6: 16px;
        --font-size-4xl: 22px;
    }
    
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        padding: var(--space-4);
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4,
    .grid-cols-5,
    .grid-cols-6 {
        grid-template-columns: 1fr;
    }
    
    .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .header-actions .btn {
        width: 100%;
    }
    
    .modal-container {
        padding: var(--space-4);
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* ====================================
   PRINT STYLES
==================================== */
@media print {
    .sidebar,
    .page-header .btn,
    .btn,
    .modal,
    .toast-container {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .card {
        break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }
    
    table {
        break-inside: auto;
    }
    
    tr {
        break-inside: avoid;
    }
}