/* =============================================
   NOVATE CRM – Mobile-First CSS v2
   ============================================= */

:root {
    --primary:       #1a6b3c;
    --primary-dark:  #134f2d;
    --primary-light: #e8f5ee;
    --accent:        #f0a500;
    --success:       #198754;
    --danger:        #dc3545;
    --warning:       #ffc107;
    --warning-dark:  #856404;
    --gray-50:       #f9fafb;
    --gray-100:      #f8f9fa;
    --gray-200:      #e9ecef;
    --gray-300:      #dee2e6;
    --gray-500:      #adb5bd;
    --gray-700:      #495057;
    --gray-900:      #212529;
    --white:         #ffffff;
    --sidebar-w:     240px;
    --topbar-h:      56px;
    --radius:        10px;
    --shadow:        0 2px 8px rgba(0,0,0,.10);
    --shadow-lg:     0 4px 20px rgba(0,0,0,.14);
    --font:          'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--gray-100); color: var(--gray-900); min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

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

/* ---- Sidebar ---- */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100%;
    background: var(--primary-dark);
    color: var(--white);
    display: flex;
    flex-direction: column;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-brand {
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    color: rgba(255,255,255,.82);
    font-size: 15px;
    font-weight: 500;
    transition: background .15s, color .15s;
    min-height: 48px;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,.12);
    color: var(--white);
    text-decoration: none;
}
.sidebar-nav a.active { border-left: 3px solid var(--accent); }
.sidebar-nav .icon { font-size: 18px; width: 22px; text-align: center; }
.sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: 12px;
    color: rgba(255,255,255,.5);
}
.sidebar-footer a { color: rgba(255,255,255,.7); }

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 299;
}
.sidebar-overlay.show { display: block; }

/* ---- Main content ---- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-top: var(--topbar-h);
}

/* ---- Topbar ---- */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    z-index: 200;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}
.topbar-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
}
.topbar-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--gray-900);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ---- Page content ---- */
.page-content { padding: 14px; flex: 1; }

/* =============================================
   CARDS
   ============================================= */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 14px;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
    gap: 8px;
}
.card-title { font-size: 15px; font-weight: 600; }

/* =============================================
   BUTTONS  (min 44px touch target)
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background .15s, opacity .15s, transform .1s;
    white-space: nowrap;
    min-height: 44px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:hover  { text-decoration: none; opacity: .9; }
.btn-primary   { background: var(--primary);  color: var(--white); }
.btn-success   { background: var(--success);  color: var(--white); }
.btn-danger    { background: var(--danger);   color: var(--white); }
.btn-warning   { background: var(--warning);  color: #000; }
.btn-secondary { background: var(--gray-200); color: var(--gray-900); }
.btn-sm  { padding: 7px 13px; font-size: 13px; min-height: 36px; }
.btn-lg  { padding: 14px 24px; font-size: 17px; min-height: 52px; }
.btn-block { width: 100%; }
.btn-icon { padding: 10px; min-width: 44px; }

/* =============================================
   FORMS
   ============================================= */
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 5px;
}
.form-control {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    font-size: 15px;
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--white);
    transition: border-color .15s, box-shadow .15s;
    min-height: 44px;
    -webkit-appearance: none;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,107,60,.14);
}
select.form-control { cursor: pointer; }
textarea.form-control { min-height: 90px; resize: vertical; }
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    min-height: 44px;
}
.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}
.form-check label { font-size: 15px; cursor: pointer; margin: 0; font-weight: 400; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* =============================================
   ALERTS
   ============================================= */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 14px;
    border-left: 4px solid transparent;
}
.alert-success { background: #d4edda; color: #155724; border-color: var(--success); }
.alert-danger  { background: #f8d7da; color: #721c24; border-color: var(--danger); }
.alert-warning { background: #fff3cd; color: var(--warning-dark); border-color: var(--warning); }
.alert-info    { background: var(--primary-light); color: #0c5460; border-color: var(--primary); }

/* =============================================
   BADGES
   ============================================= */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-new             { background: #e3f2fd; color: #1565c0; }
.badge-no-contact      { background: #fce4ec; color: #c62828; }
.badge-contacted       { background: #e8f5e9; color: #2e7d32; }
.badge-audit-scheduled { background: #fff3e0; color: #e65100; }
.badge-audit-done      { background: #f3e5f5; color: #6a1b9a; }
.badge-offer-sent      { background: #e0f7fa; color: #00695c; }
.badge-install-planned  { background: #fff3e0; color: #e65100; }
.badge-install-progress { background: #fff8e1; color: #f57f17; border: 1px solid #ffcc02; }
.badge-install-done     { background: #e8f5e9; color: #2e7d32; }
.badge-closed          { background: #c8e6c9; color: #1b5e20; }
.badge-resigned        { background: #eceff1; color: #546e7a; }
.badge-default         { background: var(--gray-200); color: var(--gray-700); }

/* =============================================
   TABLES
   ============================================= */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; }
th {
    background: var(--gray-100);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--gray-700);
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}
td { padding: 12px 12px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--primary-light); }

/* =============================================
   LEAD CARD (mobile list)
   ============================================= */
.lead-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: block;
    cursor: pointer;
    border-left: 4px solid var(--primary);
    color: inherit;
    transition: box-shadow .15s;
}
.lead-card:hover { box-shadow: var(--shadow-lg); text-decoration: none; color: inherit; }
.lead-card-name { font-size: 16px; font-weight: 600; margin-bottom: 5px; }
.lead-card-meta { font-size: 13px; color: var(--gray-700); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.lead-card-meta span { display: flex; align-items: center; gap: 4px; }
.lead-card-footer { display: flex; align-items: center; justify-content: space-between; }

/* =============================================
   STATS GRID
   ============================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
    text-align: center;
}
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 12px; color: var(--gray-700); margin-top: 4px; }

/* =============================================
   TABS (horizontally scrollable on mobile)
   ============================================= */
.tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 16px;
    scrollbar-width: none;
    gap: 0;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
    flex-shrink: 0;
    padding: 11px 14px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
    min-height: 44px;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* =============================================
   PHOTO UPLOAD (camera + gallery)
   ============================================= */
.photo-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 20px 14px;
    text-align: center;
    background: var(--gray-50);
    margin-bottom: 14px;
}
.photo-upload-area p { font-size: 14px; color: var(--gray-500); margin-bottom: 12px; }
.photo-btn-group { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.file-input-hidden { display: none; }

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.photo-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-100);
}
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview-item .remove-preview {
    position: absolute;
    top: 3px; right: 3px;
    background: rgba(220,53,69,.85);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px; height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.photo-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--gray-100);
    box-shadow: var(--shadow);
}
.photo-gallery-item img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.photo-gallery-item .photo-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,.55);
    color: white;
    font-size: 11px;
    padding: 3px 6px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.photo-gallery-item .photo-delete {
    position: absolute;
    top: 4px; right: 4px;
    background: rgba(220,53,69,.85);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px; height: 28px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.93);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; object-fit: contain; }
.lightbox-close {
    position: absolute;
    top: 16px; right: 16px;
    background: rgba(255,255,255,.2);
    border: none;
    color: white;
    font-size: 28px;
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================================
   NOTE / FILE / REMINDER ITEMS
   ============================================= */
.note-item {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 10px;
    position: relative;
    border-left: 3px solid var(--primary);
}
.note-item .note-date { font-size: 11px; color: var(--gray-500); margin-bottom: 4px; }
.note-item .note-content { white-space: pre-wrap; font-size: 14px; line-height: 1.5; }
.note-item .note-delete {
    position: absolute; top: 8px; right: 8px;
    background: none; border: none; cursor: pointer;
    color: var(--gray-500); font-size: 16px; padding: 4px;
    min-width: 32px; min-height: 32px;
    display: flex; align-items: center; justify-content: center;
}
.note-item .note-delete:hover { color: var(--danger); }

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 8px;
    background: var(--white);
}
.file-item .file-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.file-item .file-icon { font-size: 22px; flex-shrink: 0; }
.file-item .file-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item .file-type { font-size: 12px; color: var(--gray-500); }
.file-item .file-actions { display: flex; gap: 6px; flex-shrink: 0; }

.reminder-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 8px;
    background: var(--white);
    border-left: 3px solid var(--warning);
}
.reminder-item .reminder-time { font-size: 12px; color: var(--gray-500); }
.reminder-item .reminder-title { font-size: 14px; font-weight: 600; }
.reminder-item .reminder-desc { font-size: 13px; color: var(--gray-700); margin-top: 2px; }
.reminder-item .gcal-badge { font-size: 11px; color: var(--success); }
.reminder-item .reminder-actions { margin-left: auto; flex-shrink: 0; }

/* =============================================
   LEAD DETAIL HEADER
   ============================================= */
.lead-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lead-name { font-size: 20px; font-weight: 700; }
.lead-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.lead-meta-item { display: flex; align-items: center; gap: 5px; font-size: 14px; color: var(--gray-700); }

/* =============================================
   FILTERS
   ============================================= */
.filters-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters-bar .form-control { min-width: 140px; }

.filter-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 10px;
    scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-700);
    white-space: nowrap;
    transition: .15s;
    min-height: 36px;
}
.chip.active, .chip:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* =============================================
   MODAL (bottom sheet on mobile)
   ============================================= */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 400;
    align-items: flex-end;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--white);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 30px rgba(0,0,0,.2);
    width: 100%;
    max-width: 600px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 20px 16px 32px;
    animation: slideModal .25s ease;
}
@keyframes slideModal { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}
.modal-title { font-size: 17px; font-weight: 600; }
.modal-close {
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    width: 38px; height: 38px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
}
.modal-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* =============================================
   FAB (Floating Action Button)
   ============================================= */
.fab {
    position: fixed;
    bottom: 22px;
    right: 18px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(26,107,60,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    transition: background .15s, transform .15s;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.fab:hover { background: var(--primary-dark); transform: scale(1.07); text-decoration: none; color: white; }

/* =============================================
   TOAST
   ============================================= */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
    width: calc(100% - 32px);
    max-width: 400px;
}
.toast {
    background: var(--gray-900);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideUp .25s ease;
    pointer-events: auto;
    text-align: center;
    width: 100%;
}
.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }
.toast-info    { background: #1565c0; }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* =============================================
   LOGIN PAGE
   ============================================= */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 16px;
}
.login-container {
    background: var(--white);
    border-radius: 16px;
    padding: 32px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo h1 { font-size: 24px; color: var(--primary); margin-top: 8px; font-weight: 700; }
.login-logo p { font-size: 14px; color: var(--gray-500); margin-top: 4px; }

/* =============================================
   MISC
   ============================================= */
.empty-state { text-align: center; padding: 32px 16px; color: var(--gray-500); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 10px; }
.empty-state p { font-size: 14px; }

.pagination { display: flex; gap: 4px; align-items: center; margin-top: 14px; justify-content: center; }
.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    font-size: 14px;
    transition: all .15s;
    min-height: 40px;
}
.page-btn:hover, .page-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.upcoming-list { list-style: none; }
.upcoming-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-200); }
.upcoming-item:last-child { border-bottom: none; }
.upcoming-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); margin-top: 4px; flex-shrink: 0; }
.upcoming-time { font-size: 11px; color: var(--gray-500); }

.text-muted   { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 18px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.justify-between { justify-content: space-between; }
.fw-600 { font-weight: 600; }
.fs-12 { font-size: 12px; }
.w-100 { width: 100%; }
code { background: var(--gray-100); padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* =============================================
   DESKTOP (≥768px)
   ============================================= */
@media (min-width: 768px) {
    .sidebar { transform: translateX(0); }
    .topbar-menu-btn { display: none; }
    .topbar { left: var(--sidebar-w); }
    .main-content { margin-left: var(--sidebar-w); }
    .page-content { padding: 24px; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .modal-overlay { align-items: center; }
    .modal { border-radius: 16px; }
    .fab { display: none; }
    #toast-container { left: auto; right: 24px; transform: none; width: auto; max-width: 360px; align-items: flex-end; }
    .toast { text-align: left; }
}
@media (min-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
