/* ==========================================
   GariKhata — Clean Corporate Data Theme
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Mono:wght@400;700&display=swap');

:root {
    /* Brand Colors */
    --primary: #1e3a8a;
    --primary-light: #2563eb;
    --primary-dark: #172554;
    --accent: #2563eb;
    --accent-light: #60a5fa;

    /* Functional Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Pastel Accents (for charts and gradients) */
    --pastel-blue: #bfdbfe;
    --pastel-peach: #ffedd5;
    --pastel-mint: #d1fae5;
    --pastel-lavender: #e0e7ff;

    /* Light Theme Neutrals */
    --bg: #f4f6f9;
    --bg-warm: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: #e2e8f0;

    /* Kept for compatibility */
    --glass: #ffffff;
    --glass-border: #e2e8f0;

    /* Sizing & Structure */
    --radius: 4px;
    --radius-sm: 2px;
    --radius-lg: 8px;
    --sidebar-width: 250px;
    --header-height: 60px;

    /* Shadows (Faint) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glow: none;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode (Solid Clean) */
[data-theme="dark"] {
    --bg: #0f172a;
    --bg-warm: #1e293b;
    --surface: #1e293b;
    --surface-hover: #334155;
    --glass: #1e293b;
    --glass-border: #334155;
    --text: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);

    /* Dark Mode Pastels */
    --pastel-blue: #1e3a8a;
    --pastel-peach: #7c2d12;
    --pastel-mint: #064e3b;
    --pastel-lavender: #312e81;
}

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

html,
body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

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



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

img {
    max-width: 100%;
}

input,
select,
textarea,
button {
    font-family: inherit;
}

/* ========== TYPOGRAPHY ========== */
h1,
h2,
h3 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.35rem;
}

h3 {
    font-size: 1.1rem;
}

/* ========== AUTH SCREENS ========== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s var(--ease);
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .logo .auth-logo {
    height: 56px;
    width: auto;
    margin-bottom: 8px;
}

.auth-card .logo h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card .logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Google Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #444;
    border: 1px solid #ddd;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.btn-google:hover {
    background: #f7f7f7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .btn-google {
    background: #2a2a3e;
    color: #e0e0e0;
    border-color: #444;
}

[data-theme="dark"] .btn-google:hover {
    background: #333350;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    gap: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Onboarding Steps Indicator */
.onboarding-steps {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.onboarding-steps .step {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.onboarding-steps .step.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.onboarding-steps .step.done {
    background: var(--pastel-mint);
    color: #2d7a4f;
    border-color: var(--pastel-mint);
}

/* Terms Box */
.terms-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.terms-box h3 {
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.terms-scroll {
    max-height: 220px;
    overflow-y: auto;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-right: 8px;
}

.terms-scroll::-webkit-scrollbar {
    width: 4px;
}

.terms-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.terms-scroll p {
    margin-bottom: 10px;
}

/* Consent Checkboxes */
.consent-checks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
}

.consent-check input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.consent-check em {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    transition: all 0.25s var(--ease);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(124, 108, 175, 0.12);
    background: var(--surface-hover);
}

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

select.form-control {
    cursor: pointer;
    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='none' stroke='%236e6a80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Checkbox / Toggle */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    transition: 0.3s var(--ease);
    flex-shrink: 0;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: 0.3s var(--ease-bounce);
    box-shadow: var(--shadow-sm);
}

.toggle.active {
    background: var(--primary);
}

.toggle.active::after {
    left: 23px;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.92rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s var(--ease);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.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(124, 108, 175, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(124, 108, 175, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--primary-light);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #d4726a);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 14px;
}

.btn-ghost:hover {
    color: var(--primary);
    background: var(--surface);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 10px;
    border-radius: var(--radius-sm);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

/* ========== LAYOUT ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s var(--ease);
    overflow-y: auto;
}

.sidebar-brand {
    padding: 24px 22px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    height: 36px;
    width: auto;
    display: block;
    margin-bottom: 4px;
    align-items: center;
    text-align: center;
}

.sidebar-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'Space Mono', monospace;
    letter-spacing: 0.3px;
}

.sidebar-brand h1 {
    font-size: 1.35rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-brand span {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'Space Mono', monospace;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 8px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--surface);
    color: var(--text);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 108, 175, 0.25);
}

.nav-item.active svg {
    stroke: white;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    flex-shrink: 0;
}

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

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: 0.2s;
}

.user-pill:hover {
    background: var(--surface);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text);
}

.header-title h2 {
    font-size: 1.2rem;
}

.header-title p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vehicle-selector {
    padding: 8px 14px;
    background: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    padding-right: 30px;
    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='none' stroke='%236e6a80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    box-shadow: var(--shadow-sm);
}

.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface);
    border: 1.5px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: var(--surface-hover);
    color: var(--primary);
}

/* Sub Header */
.sub-header {
    background: var(--bg-warm);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    z-index: 40;
    position: sticky;
    top: var(--header-height);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.sub-header-left,
.sub-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sub-header-label {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.8px;
}

/* Page wrapper */
.page-content {
    padding: 20px;
    max-width: 1400px;
    animation: fadeIn 0.35s var(--ease);
}

/* ========== CARDS ========== */
.glass-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s var(--ease);
    min-width: 0;
}

.glass-card:hover {
    box-shadow: var(--shadow-lg);
}

.glass-card.clickable:hover {
    transform: translateY(-2px);
    cursor: pointer;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.card-header h3 {
    font-size: 1rem;
}

/* ========== STAT CARDS (PHASE 3 REDESIGN) ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: all 0.2s var(--ease);
    min-width: 0;
}

.stat-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

/* Big Number / KPI Board Style */
.kpi-board {
    padding: 18px 20px;
    text-align: center;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
}

.kpi-board .kpi-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 4px;
}

.kpi-board .kpi-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Key-Value Lists (for Mini Stats) */
.kv-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kv-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.kv-list li:last-child {
    border-bottom: none;
}

.kv-list .kv-key {
    color: var(--text-secondary);
}

.kv-list .kv-val {
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.kv-val .trend-up {
    color: var(--success);
    font-size: 0.75rem;
}

.kv-val .trend-down {
    color: var(--danger);
    font-size: 0.75rem;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    color: var(--text);
    line-height: 1.2;
}

.stat-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ========== DASHBOARD GRID ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-grid.triple {
    grid-template-columns: 1fr 1fr 1fr;
}

/* ========== TABLES ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 12px 14px;
    border-bottom: 1.5px solid var(--border);
}

.data-table td {
    padding: 14px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

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

.data-table tr:hover td {
    background: var(--surface);
}

.data-table .mono {
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-primary {
    background: rgba(124, 108, 175, 0.12);
    color: var(--primary);
}

.badge-success {
    background: rgba(122, 185, 122, 0.12);
    color: var(--success);
}

.badge-warning {
    background: rgba(228, 185, 90, 0.12);
    color: var(--warning);
}

.badge-danger {
    background: rgba(212, 114, 106, 0.12);
    color: var(--danger);
}

.badge-info {
    background: rgba(106, 168, 212, 0.12);
    color: var(--info);
}

/* ========== TABS ========== */
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border: 1px solid var(--border);
    overflow-x: auto;
}

.tab {
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
    border: none;
    background: none;
}

.tab:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.tab.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

[data-theme="dark"] .tab.active {
    background: var(--primary);
    color: white;
}

/* ========== MODALS ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s var(--ease);
}

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

.modal {
    background: var(--bg-warm);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.97);
    transition: all 0.3s var(--ease-bounce);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

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

.modal-header h3 {
    font-size: 1.1rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: 0.2s;
}

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

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

.modal-footer {
    padding: 16px 28px 22px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

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

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    background: var(--bg-warm);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    min-width: 280px;
    animation: slideRight 0.3s var(--ease-bounce);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success {
    border-left: 4px solid var(--success);
}

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

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 30px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    stroke: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.88rem;
    margin-bottom: 20px;
}

/* ========== CHART CONTAINER ========== */
.chart-container {
    position: relative;
    width: 100%;
    height: 280px;
}

/* ========== REMINDER CARDS ========== */
.reminder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.reminder-item:last-child {
    border: none;
}

.reminder-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
}

.reminder-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ========== ACTIVITY LIST ========== */
.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-dot.refueling {
    background: var(--accent);
}

.activity-dot.expense {
    background: var(--primary);
}

.activity-dot.service {
    background: var(--success);
}

.activity-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.activity-amount {
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}

/* ========== LOADING ========== */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 40px auto;
}

.page-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

/* ========== SKELETON ========== */
.skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ========== VEHICLE CARDS ========== */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.vehicle-card {
    position: relative;
}

.vehicle-card .default-badge {
    position: absolute;
    top: 14px;
    right: 14px;
}

.vehicle-card h3 {
    margin-bottom: 4px;
}

.vehicle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.vehicle-meta span {
    font-size: 0.78rem;
    padding: 4px 10px;
    background: var(--surface-hover);
    border-radius: 6px;
    color: var(--text-secondary);
}

.vehicle-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

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

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

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

    100% {
        background-position: -200% 0;
    }
}

/* ========== MOBILE ========== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .menu-toggle {
        display: flex;
    }

    .page-content {
        padding: 14px;
    }

    .app-header {
        padding: 0 14px;
    }

    .header-right {
        gap: 6px;
    }

    .vehicle-selector {
        max-width: 120px;
        font-size: .78rem;
        padding: 6px 28px 6px 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .dashboard-grid,
    .dashboard-grid.triple {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    /* Ensure form groups have breathing room on mobile so date pickers don't overlap */
    .form-group {
        margin-bottom: 12px;
    }

    .form-control,
    select.form-control {
        font-size: 16px;
        /* prevents iOS zoom on focus */
    }

    /* Fix sidebar transparency on mobile — needs solid bg */
    .sidebar {
        background: var(--bg);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    [data-theme="dark"] .sidebar {
        background: var(--bg);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        border-right-color: rgba(255, 255, 255, 0.1);
    }

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

    .auth-card {
        padding: 28px 18px;
        margin: 10px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .stat-card {
        padding: 14px;
    }

    /* Tables: scrollable wrapper */
    .glass-card,
    .card {
        overflow-x: hidden;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        margin-bottom: 1px;
    }

    .data-table {
        font-size: 0.8rem;
        min-width: 500px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    .vehicle-grid {
        grid-template-columns: 1fr;
    }

    /* Modals */
    .modal {
        max-width: calc(100vw - 24px);
        max-height: 90vh;
        margin: 12px;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .modal-footer {
        padding: 12px 16px;
    }

    .modal-body .form-row {
        grid-template-columns: 1fr;
    }

    /* Tabs */
    .tabs {
        overflow-x: auto;
    }

    .tab {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: .8rem;
    }

    /* Toast */
    .toast-container {
        left: 12px;
        right: 12px;
        top: 12px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    /* Buttons inline */
    .btn-group {
        flex-wrap: wrap;
        gap: 4px;
    }

    .btn {
        padding: 8px 14px;
        font-size: .82rem;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

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

    .header-title h2 {
        font-size: 1rem;
    }

    .header-title p {
        display: none;
    }

    .page-content {
        padding: 10px;
    }

    .data-table {
        font-size: 0.75rem;
    }
}

/* ===== STATION PICKER ===== */
.station-picker {
    position: relative;
}

.station-map {
    display: none;
    height: 250px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    position: relative;
    z-index: 1;
    overflow: hidden;
    background: #e8e4f0;
}

.station-map .leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
}

.station-marker-icon {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.station-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    gap: 10px;
}

.station-selected-info {
    flex: 1;
}

.station-selected-name {
    font-weight: 600;
    font-size: .92rem;
    display: block;
}

.station-selected-addr {
    font-size: .75rem;
    opacity: .8;
}

.station-selected .btn-ghost {
    color: #fff;
    opacity: .7;
}

.station-selected .btn-ghost:hover {
    opacity: 1;
}

.station-loading {
    padding: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: .85rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.station-nearby-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.station-nearby-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all .15s;
    background: var(--card-bg);
}

.station-nearby-card:hover {
    border-color: var(--primary);
    background: rgba(124, 108, 175, .1);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .1);
}

.station-nearby-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

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

.station-nearby-name {
    font-weight: 600;
    font-size: .88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-nearby-brand {
    font-size: .72rem;
    color: var(--primary);
}

.station-nearby-addr {
    font-size: .72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-nearby-dist {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.station-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    color: var(--text-muted);
    font-size: .75rem;
}

.station-divider::before,
.station-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--border);
}

.station-saved-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.station-chip {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: .8rem;
    cursor: pointer;
    transition: all .15s;
    background: var(--card-bg);
    white-space: nowrap;
}

.station-chip:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
}

/* ===== GAS STATION CARDS ===== */
.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

.station-card {
    padding: 16px;
}

.station-card h3 {
    color: var(--text-primary);
}

.star-picker {
    display: flex;
    gap: 2px;
}

@media (max-width: 768px) {
    .station-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ANOMALY DETECTION ===== */
.anomaly-panel {
    border-left: 3px solid var(--primary);
}

.anomaly-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
    padding: 6px 12px;
    background: var(--bg);
    border-radius: var(--radius-md);
}

.anomaly-item {
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: var(--radius-md);
    background: var(--bg);
}

/* ===== REMINDER CARDS ===== */
.reminder-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 8px;
    transition: all 0.2s var(--ease);
    flex-wrap: wrap;
}

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

.reminder-card.escalation-yellow {
    border-left: 3px solid #e4b95a;
    background: rgba(228, 185, 90, 0.04);
}

.reminder-card.escalation-orange {
    border-left: 3px solid #f59e0b;
    background: rgba(245, 158, 11, 0.06);
}

.reminder-card.escalation-red {
    border-left: 3px solid var(--danger);
    background: rgba(239, 68, 68, 0.06);
}

/* ===== TAB BAR ===== */
.tab-bar {
    display: flex;
    gap: 4px;
    background: var(--surface);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: calc(var(--radius-md) - 2px);
    transition: all 0.2s var(--ease);
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
}

.tab-btn:hover:not(.active) {
    background: var(--border);
}

/* Mini stats row */
.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.mini-stat {
    flex: 1;
    min-width: 80px;
}

.mini-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-stat-value {
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'Space Mono', monospace;
}

/* ===== DOCUMENT VAULT ===== */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    padding: 4px 0;
}

.doc-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.2s var(--ease);
}

.doc-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.doc-card.doc-expired {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.04);
}

.doc-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

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

.doc-title {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-type {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.doc-ref {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-family: 'Space Mono', monospace;
}

.doc-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .doc-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== FOOTER ===== */
.app-footer {
    margin-top: auto;
    padding: 32px 24px 24px;
}

.footer-inner {
    text-align: center;
    padding: 24px 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(124, 108, 175, 0.06) 0%, rgba(232, 146, 124, 0.06) 50%, rgba(106, 168, 212, 0.06) 100%);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.footer-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--pastel-lavender), var(--primary), var(--pastel-peach), var(--pastel-mint), var(--pastel-blue));
    background-size: 200% 100%;
    animation: shimmer 6s ease infinite;
}

.footer-brand {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.footer-brand span {
    background: linear-gradient(135deg, var(--primary), var(--pastel-peach));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-copy {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.footer-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 4px;
    font-style: italic;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .footer-inner {
    background: linear-gradient(135deg, rgba(124, 108, 175, 0.1) 0%, rgba(232, 146, 124, 0.08) 50%, rgba(106, 168, 212, 0.1) 100%);
}

/* ===== NOTIFICATION CENTER ===== */
.notif-bell-wrap {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger, #e53e3e);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    border: 2px solid var(--bg, #fff);
    animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {

    0%,
    100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.1)
    }
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 440px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius, 16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    font-weight: 700;
    font-size: .92rem;
}

.notif-dropdown-header button {
    background: none;
    border: none;
    color: var(--primary, #7c6caf);
    cursor: pointer;
    font-size: .78rem;
    font-weight: 600;
}

.notif-dropdown-header button:hover {
    text-decoration: underline;
}

.notif-dropdown-list {
    overflow-y: auto;
    flex: 1;
    max-height: 360px;
}

.notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light, rgba(0, 0, 0, .04));
    cursor: pointer;
    transition: background .15s;
}

.notif-item:hover {
    background: var(--hover-bg, rgba(124, 108, 175, .04));
}

.notif-item.unread {
    background: rgba(124, 108, 175, .06);
}

.notif-item.unread .notif-title {
    font-weight: 700;
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.notif-icon.subscription {
    background: rgba(124, 108, 175, .12);
}

.notif-icon.reminder {
    background: rgba(255, 152, 0, .12);
}

.notif-icon.ticket {
    background: rgba(33, 150, 243, .12);
}

.notif-icon.document {
    background: rgba(76, 175, 80, .12);
}

.notif-icon.system {
    background: rgba(156, 39, 176, .12);
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: .82rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.notif-time {
    font-size: .7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.notif-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: .85rem;
}

@media (max-width: 480px) {
    .notif-dropdown {
        width: calc(100vw - 24px);
        right: -60px;
    }
}

/* ========== GRID UTILITY SYSTEM (PHASE 1) ========== */
.grid-masonry {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 16px;
    align-items: start;
}

.col-12,
.col-lg-12,
.col-md-12 {
    grid-column: span 12;
}

.col-11,
.col-lg-11,
.col-md-11 {
    grid-column: span 11;
}

.col-10,
.col-lg-10,
.col-md-10 {
    grid-column: span 10;
}

.col-9,
.col-lg-9,
.col-md-9 {
    grid-column: span 9;
}

.col-8,
.col-lg-8,
.col-md-8 {
    grid-column: span 8;
}

.col-7,
.col-lg-7,
.col-md-7 {
    grid-column: span 7;
}

.col-6,
.col-lg-6,
.col-md-6 {
    grid-column: span 6;
}

.col-5,
.col-lg-5,
.col-md-5 {
    grid-column: span 5;
}

.col-4,
.col-lg-4,
.col-md-4 {
    grid-column: span 4;
}

.col-3,
.col-lg-3,
.col-md-3 {
    grid-column: span 3;
}

.col-2,
.col-lg-2,
.col-md-2 {
    grid-column: span 2;
}

.col-1,
.col-lg-1,
.col-md-1 {
    grid-column: span 1;
}

@media (max-width: 1200px) {
    .grid-masonry {
        grid-template-columns: repeat(8, 1fr);
    }

    /* Items designed for 50% width */
    .col-lg-6,
    .col-md-6 {
        grid-column: span 4;
    }

    /* Items designed for 33% width -> Make them 50% on laptop */
    .col-lg-4,
    .col-md-4 {
        grid-column: span 4;
    }

    /* Items designed for 66% width or larger -> Make them 100% on laptop */
    .col-lg-8,
    .col-lg-9,
    .col-lg-10,
    .col-lg-12,
    .col-md-8,
    .col-md-9,
    .col-md-10,
    .col-md-12 {
        grid-column: span 8;
    }
}

@media (max-width: 900px) {
    .grid-masonry {
        grid-template-columns: repeat(6, 1fr);
    }

    /* On tablet, most lg and md items stack completely */
    .col-lg-4,
    .col-lg-5,
    .col-lg-6,
    .col-lg-7,
    .col-lg-8,
    .col-lg-9,
    .col-lg-10,
    .col-lg-11,
    .col-lg-12,
    .col-md-4,
    .col-md-5,
    .col-md-6,
    .col-md-7,
    .col-md-8,
    .col-md-9,
    .col-md-10,
    .col-md-11,
    .col-md-12 {
        grid-column: span 6;
    }

    /* Keep small items side-by-side if they were 25% */
    .col-md-3 {
        grid-column: span 3;
    }
}

@media (max-width: 600px) {
    .grid-masonry {
        grid-template-columns: 1fr;
    }

    .col-12,
    .col-lg-12,
    .col-md-12,
    .col-11,
    .col-lg-11,
    .col-md-11,
    .col-10,
    .col-lg-10,
    .col-md-10,
    .col-9,
    .col-lg-9,
    .col-md-9,
    .col-8,
    .col-lg-8,
    .col-md-8,
    .col-7,
    .col-lg-7,
    .col-md-7,
    .col-6,
    .col-lg-6,
    .col-md-6,
    .col-5,
    .col-lg-5,
    .col-md-5,
    .col-4,
    .col-lg-4,
    .col-md-4,
    .col-3,
    .col-lg-3,
    .col-md-3,
    .col-2,
    .col-lg-2,
    .col-md-2,
    .col-1,
    .col-lg-1,
    .col-md-1 {
        grid-column: 1 / -1;
    }
}

/* Dashboard Specific Typography Overrides */
.dash-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}