/* ============================================================
   SaleFlowPro - Master Stylesheet
   glassmorphism + animations + mobile-first
   ============================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --primary:        #1a237e;
    --primary-mid:    #283593;
    --primary-light:  #3949ab;
    --accent:         #00b0ff;
    --accent2:        #7c4dff;
    --success:        #00c853;
    --warning:        #ffab00;
    --danger:         #ff1744;
    --text-main:      #1a1a2e;
    --text-muted:     #6b7280;
    --bg-main:        #f0f4ff;
    --bg-card:        rgba(255,255,255,0.75);
    --border:         rgba(26,35,126,0.12);
    --shadow:         0 8px 32px rgba(26,35,126,0.10);
    --shadow-hover:   0 16px 48px rgba(26,35,126,0.18);
    --radius:         14px;
    --radius-sm:      8px;
    --radius-lg:      22px;
    --transition:     all 0.28s cubic-bezier(.4,0,.2,1);
    --glass:          blur(16px) saturate(180%);
    --sidebar-w:      256px;
    --header-h:       64px;
    --font-main:      'Inter', sans-serif;
    --font-head:      'Poppins', sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: var(--font-main); }
table { border-collapse: collapse; width: 100%; }

/* ── Animated Gradient Background ─────────────────────────── */
.bg-animated {
    background: linear-gradient(135deg, #1a237e, #283593, #1565c0, #0d47a1);
    background-size: 300% 300%;
    animation: gradShift 12s ease infinite;
}
@keyframes gradShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Glassmorphism Cards ───────────────────────────────────── */
.glass {
    background: var(--bg-card);
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}
.glass-dark {
    background: rgba(26,35,126,0.15);
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
    border: 1px solid rgba(255,255,255,0.18);
}

/* ── Layout ────────────────────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
}
.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    margin-top: var(--header-h);
    padding: 1.5rem;
    padding-bottom: 80px; /* space for mobile bottom nav */
    max-width: 1400px;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-mid) 100%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(26,35,126,0.15);
    transition: var(--transition);
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-logo .logo-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.sidebar-logo .logo-text {
    font-family: var(--font-head);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -.3px;
}
.sidebar-logo .logo-text span { color: var(--accent); }
.sidebar-nav { flex: 1; padding: 1rem 0.75rem; }
.nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    padding: 1rem 0.75rem 0.4rem;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 0.75rem;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.75);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}
.nav-item:hover, .nav-item.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    transform: translateX(4px);
}
.nav-item.active {
    background: rgba(0,176,255,0.25);
    color: var(--accent);
    font-weight: 600;
}
.nav-item .material-symbols-outlined { font-size: 20px; }
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
}
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}
.user-pill-info p { margin: 0; color: #fff; font-size: 0.8rem; font-weight: 600; }
.user-pill-info span { color: rgba(255,255,255,0.5); font-size: 0.7rem; }

/* ── Top Header Bar ────────────────────────────────────────── */
.top-header {
    position: fixed;
    top: 0; left: var(--sidebar-w); right: 0;
    height: var(--header-h);
    background: rgba(240,244,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 90;
}
.page-title h1 {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition);
    position: relative;
}
.icon-btn:hover { background: var(--border); color: var(--primary); }
.badge-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid #f0f4ff;
}

/* ── Stats Cards ───────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.blue::before  { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.stat-card.green::before { background: linear-gradient(90deg, #00c853, #69f0ae); }
.stat-card.purple::before{ background: linear-gradient(90deg, var(--accent2), #e040fb); }
.stat-card.orange::before{ background: linear-gradient(90deg, #ff6d00, var(--warning)); }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}
.stat-icon.blue   { background: rgba(26,35,126,0.1);   color: var(--primary); }
.stat-icon.green  { background: rgba(0,200,83,0.1);    color: #00c853; }
.stat-icon.purple { background: rgba(124,77,255,0.1);  color: var(--accent2); }
.stat-icon.orange { background: rgba(255,109,0,0.1);   color: #ff6d00; }
.stat-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; }
.stat-value { font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; color: var(--text-main); margin: 0.2rem 0; }
.stat-sub   { font-size: 0.75rem; color: var(--text-muted); }
.stat-sub.up   { color: var(--success); }
.stat-sub.down { color: var(--danger); }

/* ── Responsive Table ──────────────────────────────────────── */
.table-container {
    background: var(--bg-card);
    backdrop-filter: var(--glass);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.75rem;
}
.table-header h3 { font-family: var(--font-head); font-size: 1rem; font-weight: 700; color: var(--primary); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; min-width: 600px; }
.data-table thead tr { background: rgba(26,35,126,0.04); }
.data-table th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(26,35,126,0.05);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(26,35,126,0.03); }

/* ── Badges / Pills ────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success { background: #d4fce7; color: #065f46; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-gray    { background: #f3f4f6; color: #6b7280; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; box-shadow: 0 4px 12px rgba(26,35,126,0.3); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(26,35,126,0.4); transform: translateY(-1px); }
.btn-accent  { background: linear-gradient(135deg, var(--accent), #0091ea); color: #fff; box-shadow: 0 4px 12px rgba(0,176,255,0.3); }
.btn-danger  { background: linear-gradient(135deg, #ff1744, #f50057); color: #fff; }
.btn-success { background: linear-gradient(135deg, #00c853, #00bfa5); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.78rem; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 0.5rem; border-radius: 8px; background: transparent; border: 1px solid var(--border); }

/* ── Form Styles ───────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; letter-spacing: .3px; }
.form-label.required::after { content: ' *'; color: var(--danger); }
.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.7);
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}
.form-control:focus {
    border-color: var(--primary-light);
    background: rgba(255,255,255,0.95);
    box-shadow: 0 0 0 3px rgba(57,73,171,0.12);
}
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid   { border-color: var(--success); }
.input-group { position: relative; }
.input-group .form-control { padding-left: 2.8rem; }
.input-group .input-icon {
    position: absolute;
    left: 0.85rem; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}
.input-group .input-action {
    position: absolute;
    right: 0.85rem; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-muted);
    cursor: pointer;
}
.form-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 4px; display: none; }
.form-error.show { display: block; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%236b7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.85rem center; padding-right: 2.5rem; }
textarea.form-control { resize: vertical; min-height: 90px; }

/* ── Card ──────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-hover); }
.card-header {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.card-header h3 { font-family: var(--font-head); font-size: 1rem; font-weight: 700; color: var(--primary); }
.card-body { padding: 1.5rem; }

/* ── Flash Messages ────────────────────────────────────────── */
.flash-msg {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.bg-green  { background: #d4fce7; color: #065f46; border: 1px solid #6ee7b7; }
.bg-red    { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.bg-yellow { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.bg-blue   { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ── CSS Bar Chart ─────────────────────────────────────────── */
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 160px; padding: 0 0 1rem; position: relative; }
.bar-chart::before {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 1rem; top: 0;
    background: repeating-linear-gradient(to top, var(--border) 0, var(--border) 1px, transparent 1px, transparent 25%);
    pointer-events: none;
}
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-fill {
    width: 100%; max-width: 32px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, var(--accent), var(--primary));
    transition: height 0.8s cubic-bezier(.4,0,.2,1);
    animation: barGrow 1s ease forwards;
    transform-origin: bottom;
    position: relative;
}
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.bar-fill:hover { filter: brightness(1.15); cursor: pointer; }
.bar-label { font-size: 0.68rem; color: var(--text-muted); font-weight: 600; text-align: center; }
.bar-val { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 0.65rem; font-weight: 700; color: var(--primary); white-space: nowrap; }

/* ── CSS Pie / Donut Chart ─────────────────────────────────── */
.donut-wrap { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.donut-chart {
    width: 120px; height: 120px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}
.donut-legend { flex: 1; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; margin-bottom: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Sales Row Form ────────────────────────────────────────── */
.sales-table-form { overflow-x: auto; }
.sales-table-form table { min-width: 700px; }
.sales-table-form thead th { background: rgba(26,35,126,0.07); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .7px; color: var(--text-muted); padding: 0.7rem 0.9rem; }
.sales-table-form td { padding: 0.5rem 0.5rem; }
.sales-table-form .form-control { border-radius: 6px; font-size: 0.82rem; padding: 0.5rem 0.6rem; }
.remove-row-btn { background: none; border: none; color: var(--danger); cursor: pointer; padding: 6px; border-radius: 6px; }
.remove-row-btn:hover { background: #fee2e2; }
.add-row-btn {
    display: flex; align-items: center; gap: 6px;
    background: rgba(26,35,126,0.06);
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
    width: 100%;
    justify-content: center;
    transition: var(--transition);
}
.add-row-btn:hover { background: rgba(26,35,126,0.1); border-color: var(--primary-light); }

/* ── Auth/Login Page ───────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}
.auth-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, var(--primary) 0%, #0d47a1 50%, var(--accent2) 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
.auth-left::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    top: -100px; right: -100px;
    animation: pulse 6s ease-in-out infinite;
}
.auth-left::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: rgba(0,176,255,0.1);
    border-radius: 50%;
    bottom: -80px; left: -80px;
    animation: pulse 8s ease-in-out infinite reverse;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.auth-right {
    width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background: #fff;
    overflow-y: auto;
}
.auth-logo { font-family: var(--font-head); font-size: 2.5rem; font-weight: 800; color: #fff; z-index: 1; text-align: center; }
.auth-logo span { color: var(--accent); }
.auth-tagline { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-top: 0.5rem; z-index: 1; text-align: center; }
.auth-features { margin-top: 2.5rem; z-index: 1; }
.auth-feature-item { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.85); font-size: 0.9rem; margin-bottom: 1rem; }
.auth-feature-item .material-symbols-outlined { color: var(--accent); font-size: 1.2rem; }
.auth-form-title { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--primary); margin-bottom: 0.25rem; }
.auth-form-sub { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.75rem; }
.captcha-box {
    background: rgba(26,35,126,0.05);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.captcha-question { font-size: 1.1rem; font-weight: 700; color: var(--primary); letter-spacing: 2px; }

/* ── Password Strength Meter ───────────────────────────────── */
.strength-bar { height: 4px; border-radius: 2px; background: #e5e7eb; margin-top: 6px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 2px; transition: width 0.4s ease, background 0.4s ease; width: 0%; }
.strength-text { font-size: 0.7rem; margin-top: 3px; font-weight: 600; }

/* ── Profile Image Upload ──────────────────────────────────── */
.img-upload-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    background: rgba(26,35,126,0.02);
}
.img-upload-wrap:hover { border-color: var(--primary-light); background: rgba(26,35,126,0.05); }
.img-preview { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary-light); }
.img-upload-label { font-size: 0.8rem; color: var(--text-muted); text-align: center; }

/* ── Mobile Bottom Navigation ──────────────────────────────── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 0.4rem 0 env(safe-area-inset-bottom);
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(26,35,126,0.08);
}
.mobile-nav-inner { display: flex; justify-content: space-around; align-items: center; }
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: var(--transition);
    background: none;
    border: none;
    min-width: 48px;
}
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-item .material-symbols-outlined { font-size: 1.4rem; }
.mobile-nav-item.active .material-symbols-outlined {
    background: rgba(26,35,126,0.1);
    padding: 4px;
    border-radius: 8px;
    color: var(--primary);
}

/* ── Mobile Sidebar Toggle ─────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
    backdrop-filter: blur(2px);
}
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
}
.mobile-brand { display: none; font-family: var(--font-head); font-weight: 700; color: var(--primary); font-size: 1rem; }

/* ── Alert Banner ──────────────────────────────────────────── */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #ff6d00, var(--warning));
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}
.alert-banner .material-symbols-outlined { font-size: 1.2rem; flex-shrink: 0; }

/* ── Filter Bar ────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filter-btn { padding: 0.45rem 1rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; border: 1.5px solid var(--border); background: rgba(255,255,255,0.7); color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.filter-btn.active, .filter-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Progress Bar ──────────────────────────────────────────── */
.progress-wrap { background: rgba(26,35,126,0.08); border-radius: 20px; height: 8px; overflow: hidden; }
.progress-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 1s cubic-bezier(.4,0,.2,1);
    animation: progressAnim 1s ease forwards;
}
@keyframes progressAnim { from { width: 0 !important; } }

/* ── Utility ───────────────────────────────────────────────── */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.fw-bold { font-weight: 700; }
.fw-600  { font-weight: 600; }
.d-flex  { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2   { gap: 0.5rem; }
.gap-3   { gap: 0.75rem; }
.gap-4   { gap: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.p-0  { padding: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar-initials {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state .material-symbols-outlined { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state p { font-size: 0.9rem; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .main-content { margin-left: 0; }
    .top-header  { left: 0; }
    .sidebar-toggle { display: flex; }
    .mobile-brand { display: block; }
}
@media (max-width: 768px) {
    .mobile-bottom-nav { display: block; }
    .auth-left { display: none; }
    .auth-right { width: 100%; padding: 2rem 1.5rem; background: var(--bg-main); }
    .auth-page { background: var(--bg-main); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .main-content { padding: 1rem; padding-bottom: 80px; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .table-header { flex-direction: column; align-items: flex-start; }
}

/* ── Print styles for PDF ──────────────────────────────────── */
@media print {
    .sidebar, .top-header, .mobile-bottom-nav, .btn, .no-print { display: none !important; }
    .main-content { margin: 0; padding: 0; }
    .card, .table-container { box-shadow: none; border: 1px solid #ddd; }
    body { background: #fff; }
    .data-table th, .data-table td { padding: 0.5rem; }
}
