@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --danger: #ef4444;
    --danger-light: #f87171;
    --info: #3b82f6;
    --info-light: #60a5fa;
    --cyan: #06b6d4;
    --purple: #8b5cf6;
    --pink: #ec4899;

    --bg: #060a14;
    --bg-pattern:
        radial-gradient(ellipse 80% 50% at 15% 15%, rgba(99, 102, 241, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 85% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 70%);
    --surface: #0d1320;
    --surface-elevated: #141c2e;
    --surface-hover: #1a2540;
    --surface-active: #223050;
    --text-primary: #eef2f7;
    --text-secondary: #8b9ab5;
    --text-muted: #5a6a82;
    --border: rgba(99, 130, 180, 0.1);
    --border-hover: rgba(99, 130, 180, 0.2);
    --border-active: rgba(99, 102, 241, 0.5);
    --accent-line: linear-gradient(90deg, var(--primary), var(--cyan));

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 22px;

    --shadow-xs: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.35);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 36px rgba(0,0,0,0.45);
    --shadow-xl: 0 16px 56px rgba(0,0,0,0.55);
    --shadow-glow: 0 0 28px var(--primary-glow);
    --shadow-glow-sm: 0 0 14px var(--primary-glow);

    --sidebar-width: 260px;
    --header-height: 0px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    background-image: var(--bg-pattern);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(99, 130, 180, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 130, 180, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.25); }

::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #fff;
}

/* ==================== SIDEBAR ==================== */
.sidebar,
.nav-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(8, 13, 24, 0.95);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-right: 1px solid var(--border);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::after,
.nav-sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, transparent 30%, transparent 70%, var(--cyan) 100%);
    opacity: 0.3;
}

.sidebar-header,
.nav-sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    border-radius: inherit;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.logo-subtitle {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 2px;
    text-transform: uppercase;
}

.sidebar-nav,
.nav-sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 12px 16px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
    letter-spacing: -0.01em;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    transition: transform var(--transition-fast);
}

.nav-link:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.nav-link:hover i {
    transform: scale(1.1);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: rgba(255,255,255,0.8);
    border-radius: 0 3px 3px 0;
}

.nav-link.active i {
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.3));
}

.sidebar-footer,
.nav-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: border-color var(--transition-normal);
}

.user:hover {
    border-color: var(--border-hover);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    position: relative;
}

.user-avatar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    background: var(--success);
    border: 2px solid var(--surface-elevated);
    border-radius: 50%;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==================== MAIN CONTENT ==================== */
.main {
    margin-left: var(--sidebar-width);
    padding: 28px 32px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 28px;
}

.page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
    position: relative;
}

.page-title i {
    color: var(--primary);
    font-size: 22px;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--cyan));
    border-radius: 2px;
}

.page-subtitle,
.page-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 400;
}

/* ==================== STAT CARDS ==================== */
.stats-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
}

.stats-grid.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stats-grid.grid-5 { grid-template-columns: repeat(5, 1fr); }

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.stat-card.total::before { background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--cyan)); }
.stat-card.pending::before { background: linear-gradient(90deg, var(--warning), var(--warning-light)); }
.stat-card.approved::before { background: linear-gradient(90deg, var(--success), var(--success-light)); }
.stat-card.progress::before { background: linear-gradient(90deg, var(--purple), #a78bfa); }
.stat-card.completed::before { background: linear-gradient(90deg, var(--cyan), #22d3ee); }
.stat-card.warning::before { background: linear-gradient(90deg, var(--info), var(--info-light)); }
.stat-card.rejected::before { background: linear-gradient(90deg, var(--danger), var(--danger-light)); }
.stat-card.testing::before { background: linear-gradient(90deg, var(--cyan), var(--primary)); }

.stat-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.04;
}

.stat-card.total::after { background: var(--primary); }
.stat-card.pending::after { background: var(--warning); }
.stat-card.approved::after { background: var(--success); }
.stat-card.progress::after { background: var(--purple); }
.stat-card.completed::after { background: var(--cyan); }
.stat-card.testing::after { background: var(--cyan); }

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-active);
    box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
}

.stat-card:hover::after {
    opacity: 0.08;
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.stat-card.total .stat-icon { background: rgba(99, 102, 241, 0.12); color: var(--primary); }
.stat-card.pending .stat-icon { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.stat-card.approved .stat-icon { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.stat-card.progress .stat-icon { background: rgba(139, 92, 246, 0.12); color: var(--purple); }
.stat-card.completed .stat-icon { background: rgba(6, 182, 212, 0.12); color: var(--cyan); }
.stat-card.warning .stat-icon { background: rgba(59, 130, 246, 0.12); color: var(--info); }
.stat-card.rejected .stat-icon { background: rgba(239, 68, 68, 0.12); color: var(--danger); }

.stat-trend {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
}

.stat-trend.up { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.stat-trend.down { background: rgba(239, 68, 68, 0.12); color: var(--danger); }

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--cyan), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card:hover::before {
    opacity: 0.6;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(99, 102, 241, 0.02);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.card-title i {
    color: var(--primary);
    font-size: 15px;
}

.card-body {
    padding: 20px 24px;
}

/* ==================== TABLES ==================== */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 14px 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(99, 102, 241, 0.04);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 14px 20px;
    font-size: 13.5px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    transition: background var(--transition-fast);
}

tr:hover td {
    background: rgba(99, 102, 241, 0.06);
}

tr {
    transition: all var(--transition-fast);
}

th {
    position: sticky;
    top: 0;
    z-index: 10;
}

tr:last-child td {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
    display: block;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==================== STATUS BADGES ==================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-badge.pending_operation,
.status-badge.pending { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.status-badge.pending_operation .status-dot,
.status-badge.pending .status-dot { background: var(--warning); }

.status-badge.operation_rejected,
.status-badge.rejected { background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.status-badge.operation_rejected .status-dot,
.status-badge.rejected .status-dot { background: var(--danger); }

.status-badge.operation_approved,
.status-badge.approved { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.status-badge.operation_approved .status-dot,
.status-badge.approved .status-dot { background: var(--success); }

.status-badge.test_plan_pending { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.status-badge.test_plan_pending .status-dot { background: var(--warning); }

.status-badge.test_plan_created { background: rgba(139, 92, 246, 0.12); color: var(--purple); }
.status-badge.test_plan_created .status-dot { background: var(--purple); }

.status-badge.pushed_to_tester { background: rgba(59, 130, 246, 0.12); color: var(--info); }
.status-badge.pushed_to_tester .status-dot { background: var(--info); }

.status-badge.testing { background: rgba(6, 182, 212, 0.12); color: var(--cyan); }
.status-badge.testing .status-dot { background: var(--cyan); }

.status-badge.testing_completed { background: rgba(236, 72, 153, 0.12); color: var(--pink); }
.status-badge.testing_completed .status-dot { background: var(--pink); }

.status-badge.pushed_to_reviewer { background: rgba(139, 92, 246, 0.12); color: var(--purple); }
.status-badge.pushed_to_reviewer .status-dot { background: var(--purple); }

.status-badge.review_completed { background: rgba(20, 184, 166, 0.12); color: #14b8a6; }
.status-badge.review_completed .status-dot { background: #14b8a6; }

.status-badge.completed { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.status-badge.completed .status-dot { background: var(--success); }

.status-badge.flight_plan_created { background: rgba(99, 102, 241, 0.12); color: var(--primary); }
.status-badge.flight_plan_created .status-dot { background: var(--primary); }

.status-badge.customer_confirmed { background: rgba(139, 92, 246, 0.12); color: var(--purple); }
.status-badge.customer_confirmed .status-dot { background: var(--purple); }

/* ==================== BUTTONS ==================== */
.btn,
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.btn:hover,
.action-btn:hover {
    border-color: var(--border-active);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.btn-primary,
.action-btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover,
.action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    color: white;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.btn-success,
.action-btn.success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-color: transparent;
    color: white;
}

.btn-success:hover,
.action-btn.success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    color: white;
}

.btn-danger,
.action-btn.reject,
.action-btn.danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    border-color: transparent;
    color: white;
}

.btn-danger:hover,
.action-btn.reject:hover,
.action-btn.danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
    color: white;
}

.btn-secondary {
    background: var(--surface-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-sm,
.action-btn.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 12px 28px;
    font-size: 15px;
    border-radius: var(--radius-lg);
}

/* ==================== TABS ==================== */
.tabs,
.main-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface);
    padding: 4px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.tab,
.main-tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.tab:hover,
.main-tab:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
}

.tab.active,
.main-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 1;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.modal-title,
.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.modal-title i,
.modal-header h3 i {
    color: var(--primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--surface-elevated);
    color: var(--text-muted);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    font-size: 14px;
}

.modal-close:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-normal);
    outline: none;
}

.form-input:focus,
input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 20px;
}

.page-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==================== ANIMATIONS ==================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(99, 102, 241, 0.2); }
    50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); }
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(99, 102, 241, 0.2); }
    50% { border-color: rgba(99, 102, 241, 0.5); }
}

@keyframes scanLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

@keyframes dataFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.animate-slide-in {
    animation: slideInLeft 0.4s ease forwards;
}

.animate-glow {
    animation: glowPulse 2s ease-in-out infinite;
}

.tech-border {
    position: relative;
}

.tech-border::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--primary), var(--cyan), var(--primary));
    background-size: 200% 200%;
    animation: dataFlow 3s ease infinite;
    z-index: -1;
    opacity: 0.3;
}

/* ==================== UTILITY ==================== */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1600px) {
    .stats-grid.grid-5 { grid-template-columns: repeat(3, 1fr); }
    .stats-grid.grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1200px) {
    .stats-grid.grid-5 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid.grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar,
    .nav-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }

    .sidebar.open,
    .nav-sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
        padding: 16px;
    }

    .stats-grid.grid-5,
    .stats-grid.grid-4 {
        grid-template-columns: 1fr;
    }
}
