@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5A4BD1;
    --primary-glow: rgba(108, 92, 231, 0.3);
    --accent: #00CEC9;
    --accent-light: #81ECEC;
    --success: #00B894;
    --success-bg: rgba(0, 184, 148, 0.1);
    --warning: #FDCB6E;
    --warning-bg: rgba(253, 203, 110, 0.1);
    --danger: #E17055;
    --danger-bg: rgba(225, 112, 85, 0.1);
    --info: #74B9FF;

    --bg-primary: #0F0E17;
    --bg-secondary: #1A1928;
    --bg-tertiary: #232236;
    --bg-card: #1E1D2F;
    --bg-card-hover: #262540;
    --bg-input: #2A2942;
    --bg-glass: rgba(30, 29, 47, 0.7);

    --text-primary: #FFFFFE;
    --text-secondary: #A7A6C5;
    --text-muted: #6B6A8A;
    --text-accent: #A29BFE;

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(108, 92, 231, 0.3);
    --border-active: rgba(108, 92, 231, 0.6);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255,255,255,0.03);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(108, 92, 231, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(0, 206, 201, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(108, 92, 231, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

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

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    text-align: center;
    animation: fadeInUp 0.6s ease;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.3);
}

.login-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--bg-tertiary);
}

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

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23A7A6C5' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: var(--transition-fast);
}

.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(108, 92, 231, 0.5);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #00A884);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}
.btn-success:hover {
    box-shadow: 0 6px 25px rgba(0, 184, 148, 0.5);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #D63031);
    color: white;
    box-shadow: 0 4px 15px rgba(225, 112, 85, 0.3);
}
.btn-danger:hover {
    box-shadow: 0 6px 25px rgba(225, 112, 85, 0.5);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(108, 92, 231, 0.05);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { padding: 10px; width: 40px; height: 40px; }

/* ============================================
   APP LAYOUT
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    transition: var(--transition);
}

.sidebar-header {
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
    flex-shrink: 0;
}

.sidebar-logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-logo-text small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
}

.nav-item:hover {
    background: rgba(108, 92, 231, 0.08);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.15), rgba(0, 206, 201, 0.08));
    color: var(--primary-light);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-icon { font-size: 18px; width: 24px; text-align: center; }

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

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    min-height: 100vh;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-title span {
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.page-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    transform: translate(30%, -30%);
    opacity: 0.5;
}

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

.stat-icon.purple { background: rgba(108, 92, 231, 0.15); color: var(--primary-light); }
.stat-icon.green { background: rgba(0, 184, 148, 0.15); color: var(--success); }
.stat-icon.orange { background: rgba(225, 112, 85, 0.15); color: var(--danger); }
.stat-icon.blue { background: rgba(116, 185, 255, 0.15); color: var(--info); }

.stat-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   CARDS & PANELS
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
}

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

.card-title {
    font-size: 16px;
    font-weight: 700;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   TABLE
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

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

th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition-fast);
}

tr:hover td {
    background: rgba(108, 92, 231, 0.03);
}

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

.cell-success { color: var(--success); font-weight: 600; }
.cell-danger { color: var(--danger); font-weight: 600; }
.cell-highlight {
    background: rgba(108, 92, 231, 0.08);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-weight: 600;
}

/* ============================================
   BADGES & CHIPS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-primary { background: rgba(108, 92, 231, 0.15); color: var(--primary-light); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* ============================================
   DROPZONE (File Upload)
   ============================================ */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    background: rgba(108, 92, 231, 0.02);
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.05);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.1);
}

.dropzone-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.dropzone-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.dropzone-subtext {
    font-size: 13px;
    color: var(--text-muted);
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
    padding: 20px;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.3s ease;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   COMPARISON MATRIX
   ============================================ */
.comparison-grid {
    display: grid;
    gap: 2px;
    background: var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.comparison-cell {
    background: var(--bg-card);
    padding: 12px 16px;
    font-size: 14px;
}

.comparison-cell.header {
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
}

.comparison-cell.cheapest {
    background: rgba(0, 184, 148, 0.08);
    border-left: 3px solid var(--success);
}

.comparison-cell.expensive {
    background: rgba(225, 112, 85, 0.05);
}

.price-tag {
    font-weight: 700;
    font-size: 16px;
}

.price-tag.best { color: var(--success); }
.price-tag.worst { color: var(--danger); }

/* ============================================
   CHART CONTAINER
   ============================================ */
.chart-container {
    position: relative;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 64px 32px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state-text {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    font-size: 14px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }

/* ============================================
   PROJECT LIST
   ============================================ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

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

.project-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.project-card-desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.project-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.project-card-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   QUOTE LIST (inside project)
   ============================================ */
.quote-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition-fast);
    gap: 16px;
}

.quote-item:hover {
    background: rgba(108, 92, 231, 0.03);
}

.quote-item:last-child { border-bottom: none; }

.quote-info {
    flex: 1;
    min-width: 0;
}

.quote-company {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.quote-file {
    font-size: 12px;
    color: var(--text-muted);
}

.quote-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-light);
    white-space: nowrap;
}

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

/* ============================================
   EDITABLE TABLE (Quote items)
   ============================================ */
.editable-table input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13px;
    width: 100%;
    transition: var(--transition-fast);
}

.editable-table input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 14, 23, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    z-index: 9999;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

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

@keyframes fadeInUp {
    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); }
}

.fade-in { animation: fadeIn 0.4s ease; }
.fade-in-up { animation: fadeInUp 0.5s ease; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .sidebar.open { transform: translateX(0); }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .stats-grid { grid-template-columns: 1fr 1fr; }
    .project-grid { grid-template-columns: 1fr; }
    .charts-grid { grid-template-columns: 1fr; }

    .page-header { flex-direction: column; align-items: flex-start; }

    .modal { max-width: 100%; margin: 16px; }
}

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

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary-light); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
