/*
 * Professional type scale (loaded last). One base size, two weights (400 / 600),
 * consistent label and table styles, tabular figures for aligned numbers.
 *   Base 13px · small 12px · micro 11px · card title 14px · page title 20px · KPI 22px
 */
:root { --fs-base: .8125rem; --fs-sm: .75rem; --fs-xs: .6875rem; --fs-title: .875rem; --fs-page: 1.25rem; }

html { font-size: 16px; }
body { font-size: var(--fs-base); line-height: 1.5; letter-spacing: -.003em; font-feature-settings: "cv11", "ss01"; color: #1f2a3d; }
.table, .kpi-value, .mini-stat b, .cov-row, .tl-time, .stat-card .value, .team-meta, td, .tabular { font-variant-numeric: tabular-nums; }
h1, h2, h3, h4, h5, h6, .h4, .h5, .h6 { font-weight: 600; letter-spacing: -.01em; }
b, strong { font-weight: 600; }
small, .small, .form-text { font-size: var(--fs-sm); }

/* Page header */
.console-head h1 { font-size: var(--fs-page); font-weight: 600; letter-spacing: -.015em; color: #0f1d36; }
.console-head .sub { font-size: var(--fs-sm); color: #6a7a93; margin-top: .125rem; }
.head-chip { height: 2.25rem; font-size: var(--fs-sm); font-weight: 500; padding: 0 .75rem; }
.head-icon { width: 2.25rem; height: 2.25rem; font-size: 1.05rem; }
.head-avatar .shellbar-avatar { width: 2.25rem; height: 2.25rem; font-size: var(--fs-sm); }
.console-head { margin-bottom: 1rem; }

/* Sidebar */
.sidebar .nav-link { font-size: var(--fs-base) !important; font-weight: 500; }
.sidebar .nav-link.active { font-weight: 600; }
.sidebar-heading { font-size: .625rem !important; font-weight: 600; letter-spacing: .08em; }
@media (min-width: 992px) {
    .sidebar { width: 15rem; flex: 0 0 15rem; }
    .sidebar .nav-link { height: 2.375rem; padding: 0 .875rem; gap: .625rem; }
    .sidebar .nav-link i { font-size: 1rem; width: 1.125rem; }
    .side-brand { padding: 1.25rem 1.125rem 1rem; }
    .side-brand img { height: 1.625rem; }
    .side-brand .w { font-size: 1.125rem; font-weight: 700; }
    .side-user .name { font-size: var(--fs-sm); font-weight: 600; } .side-user .role { font-size: var(--fs-xs); }
    .main-content { padding: 1.25rem 1.75rem 1.75rem !important; }
}

/* Cards */
.card-header { font-size: var(--fs-title) !important; font-weight: 600 !important; color: #0f1d36; padding: .875rem 1.125rem .375rem; }
.card-link-all { font-size: var(--fs-sm); font-weight: 500; }
.card-body { padding: .875rem 1.125rem; }

/* KPI cards */
.kpi { padding: .875rem 1rem; gap: .875rem; }
.kpi-icon { width: 2.5rem; height: 2.5rem; font-size: 1.125rem; border-radius: .625rem; }
.kpi-value { font-size: 1.375rem; font-weight: 600; letter-spacing: -.02em; }
.kpi-value small { font-size: var(--fs-sm); font-weight: 500; }
.kpi-label { font-size: var(--fs-sm); margin-top: .125rem; }
.kpi-delta { font-size: var(--fs-xs); } .kpi-delta b { font-size: var(--fs-sm); font-weight: 600; }
.mini-stat b { font-size: 1.125rem; font-weight: 600; } .mini-stat span { font-size: var(--fs-sm); }

/* Forms: consistent labels and control heights, aligned in rows */
.form-label { font-size: var(--fs-sm) !important; font-weight: 500; color: #4a5a73; margin-bottom: .25rem !important; }
.form-control, .form-select { font-size: var(--fs-base); min-height: 2.125rem; }
.form-control-sm, .form-select-sm { font-size: var(--fs-base); min-height: 2rem; padding-top: .25rem; padding-bottom: .25rem; }
.city-filter .row { --bs-gutter-x: .75rem; }
.city-filter .col-auto .btn { min-height: 2rem; }
.form-check-label { font-size: var(--fs-base); }
textarea.form-control { min-height: auto; }

/* Buttons */
.btn { --bs-btn-font-size: var(--fs-base); --bs-btn-font-weight: 500; --bs-btn-padding-y: .375rem; --bs-btn-padding-x: .875rem; }
.btn-sm { --bs-btn-font-size: var(--fs-sm); --bs-btn-padding-y: .25rem; --bs-btn-padding-x: .625rem; }
.btn-primary { font-weight: 600; }
.btn i.bi { font-size: 1em; }

/* Tables: compact, aligned, readable */
.table { font-size: var(--fs-base); }
.table > thead th { font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6a7a93;
    padding: .5rem .75rem !important; white-space: nowrap; vertical-align: bottom; background: #fafbfd; }
.table > tbody td { padding: .5rem .75rem !important; height: auto; vertical-align: middle; }
.table > tbody td.text-end, .table > thead th.text-end { text-align: right; }
.table b { font-weight: 600; }
.table .small, .table small { font-size: var(--fs-xs); }

/* Status chips and badges */
.status, .badge, .st-pill, .role-pill { font-size: var(--fs-xs) !important; font-weight: 600 !important; letter-spacing: .01em; }
.status { line-height: 1.125rem; padding: .0625rem .4375rem; }

/* Live team, timeline, coverage */
.team-item { padding: .625rem 1.125rem; gap: .625rem; }
.team-av { width: 2.25rem; height: 2.25rem; font-size: var(--fs-sm); font-weight: 600; }
.team-name { font-size: var(--fs-base); font-weight: 600; }
.team-meta { font-size: var(--fs-xs); }
.tl-title { font-size: var(--fs-sm); font-weight: 600; } .tl-sub, .tl-time { font-size: var(--fs-xs); }
.tl-dot { width: 1.875rem; height: 1.875rem; font-size: .875rem; }
.timeline::before { top: 2.95rem; }
.cov-row { font-size: var(--fs-sm); padding: .3125rem 0; }
.live-pill { font-size: var(--fs-sm); padding: .375rem .875rem; font-weight: 600; }

/* Tabs, dropdowns, modals, toasts */
.emp-tabs .nav-link { font-size: var(--fs-sm); font-weight: 500; padding: .3125rem .875rem; }
.emp-tabs .nav-link.active { font-weight: 600; }
.dropdown-item { font-size: var(--fs-base); }
.modal-title { font-size: .9375rem; font-weight: 600; }
.modal h6 { font-size: var(--fs-xs) !important; letter-spacing: .06em; }
.toast { font-size: var(--fs-base); }

/* Profile */
.profile-name { font-size: 1.125rem; font-weight: 600; }
.profile-av { width: 3.5rem; height: 3.5rem; font-size: 1.125rem; font-weight: 600; }
.kv { font-size: var(--fs-base); gap: .375rem 1rem; } .kv dt { font-weight: 400; }

/* Phones: keep 16px inputs (stops iOS zoom), compact everything else */
@media (max-width: 991.98px) {
    .appbar-title { font-size: .9375rem; font-weight: 600; }
    .tabbar a, .tabbar button { font-size: .625rem; font-weight: 500; }
    .tabbar i { font-size: 1.25rem; }
    .main-content .table > tbody td { font-size: var(--fs-base); padding: .25rem .875rem !important; }
    .main-content .table > tbody td::before { font-size: var(--fs-sm); }
    .main-content .table > tbody td:first-child { font-size: .875rem; font-weight: 600; }
    .kpi-value { font-size: 1.25rem; }
    .filter-toggle { font-size: var(--fs-base); font-weight: 600; height: 2.5rem; }
    .sidebar .nav-link { height: 2.75rem; }
}

/* Wide management tables may wrap their headers */
.table-wrap > thead th { white-space: normal; }

/* Footer */
.site-footer { margin-top: 1.5rem; padding: .875rem 0 .25rem; border-top: 1px solid #e3e9f2; text-align: center; font-size: var(--fs-xs); color: #7a889e; letter-spacing: .01em; }
.site-footer.on-dark { border-top: 0; color: rgba(255,255,255,.72); margin-top: .75rem; padding: 0; }
.lp-panel .lp-footer { position: absolute; left: 0; right: 0; bottom: 1rem; }
@media (max-width: 991.98px) { .main-content .site-footer { margin-top: 1rem; } }
