/*
 * ASIS Edge Band / Nutree Technology brand theme (matches asisedgeband.com).
 *   Ink #0F0F10 · body text #4A4A4A · gold #C9A46A → #E8CFA0 · warm off-white #FAF8F4
 *   Headings: Poppins 600 · body: Inter · uppercase labels: Montserrat
 * Semantic status colours (green/orange/red) are unchanged on purpose.
 * Fonts are self-hosted, SIL Open Font License (see /fonts/OFL-*.txt).
 */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
    --ink: #0f0f10; --ink-2: #1c1c1c; --ink-3: #16181c; --text: #4a4a4a; --muted: #7a7a7a;
    --gold: #c9a46a; --gold-2: #e8cfa0; --gold-3: #d9b47a; --gold-dark: #9a7a45; --gold-tint: #f6efe2;
    --cream: #f4f1ea; --page: #faf8f4; --line: #ece6da;
    --font-head: "Poppins", "Inter", system-ui, sans-serif;
    --font-label: "Montserrat", "Inter", system-ui, sans-serif;

    /* re-point existing tokens */
    --mv-blue: var(--gold); --mv-bg: var(--page); --mv-navy: var(--ink);
    --sapBrandColor: var(--gold); --sapHighlightColor: var(--gold-dark); --sapContent_FocusColor: var(--gold-dark);
    --sapButton_Selected_Background: var(--gold-tint); --sapShell_Navigation_SelectedColor: var(--gold-dark);
    --sapList_Hover_Background: #f7f3eb; --sapList_SelectionBackgroundColor: #fbf6ec; --sapField_Hover_BorderColor: var(--gold-dark);
    --sapTextColor: var(--ink); --sapTitleColor: var(--ink); --sapContent_LabelColor: #6b6b6b;
    --bs-primary: var(--gold); --bs-primary-rgb: 201, 164, 106; --bs-link-color: var(--gold-dark); --bs-link-color-rgb: 154, 122, 69;
    --bs-link-hover-color: #7d6236; --bs-body-color: var(--text); --bs-body-bg: var(--page); --bs-heading-color: var(--ink);
    --bs-primary-bg-subtle: var(--gold-tint); --bs-primary-text-emphasis: var(--gold-dark);
}

body { background: var(--page) !important; color: var(--text); }
h1, h2, h3, h4, h5, h6, .h4, .h5, .h6, .console-head h1, .card-header, .modal-title, .profile-name, .lp-title, .lp-form-title,
.kpi-value, .mini-stat b, .team-name, .tl-title, .appbar-title { font-family: var(--font-head) !important; color: var(--ink); letter-spacing: -.01em; }
.console-head h1 { font-weight: 600; }
a { color: var(--gold-dark); } a:hover { color: #7d6236; }
.text-info, .card-link-all { color: var(--gold-dark) !important; }
:focus-visible, .btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus { outline-color: var(--gold) !important; }
.form-control:focus, .form-select:focus { border-color: var(--gold) !important; box-shadow: inset 0 -1px 0 var(--gold) !important; }
.form-check-input:checked { background-color: var(--gold); border-color: var(--gold); }

/* Uppercase labels in Montserrat (as the site's navigation and eyebrows) */
.sidebar-heading, .table > thead th, .modal h6, .head-chip, .emp-tabs .nav-link, .lp-eyebrow { font-family: var(--font-label) !important; }
.sidebar-heading, .table > thead th, .modal h6 { letter-spacing: .1em; }

/* Buttons: gold pill (primary), black pill (secondary emphasis), outlined pill */
.btn { border-radius: 999px !important; font-family: var(--font-head); font-weight: 500; }
.btn-primary { --bs-btn-color: var(--ink); --bs-btn-hover-color: var(--ink); --bs-btn-active-color: var(--ink); --bs-btn-disabled-color: var(--ink);
    --bs-btn-bg: var(--gold); --bs-btn-border-color: var(--gold); --bs-btn-hover-bg: var(--gold-3); --bs-btn-hover-border-color: var(--gold-3);
    --bs-btn-active-bg: #b8925a; --bs-btn-active-border-color: #b8925a; --bs-btn-disabled-bg: var(--gold); --bs-btn-disabled-border-color: var(--gold);
    background-image: linear-gradient(90deg, var(--gold), var(--gold-3)); font-weight: 600 !important; }
.btn-outline-primary, .btn-outline-secondary, .btn-outline-dark, .btn-outline-light {
    --bs-btn-color: var(--ink); --bs-btn-border-color: #d8d0c2; --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: #f7f3eb; --bs-btn-hover-border-color: var(--gold);
    --bs-btn-active-color: var(--ink); --bs-btn-active-bg: var(--gold-tint); --bs-btn-active-border-color: var(--gold); }
.btn-dark { --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: var(--ink-2); }
.btn-link { --bs-btn-color: var(--gold-dark); --bs-btn-hover-color: #7d6236; }

/* Cards and surfaces */
.card { box-shadow: 0 0 0 1px var(--line), 0 .25rem .75rem rgba(15,15,16,.04) !important; }
.table > thead th { background: #fbf9f5 !important; color: #6b6b6b; }
.table { --bs-table-hover-bg: #f9f5ee; }

/* Sidebar: ASIS black with gold accents */
@media (min-width: 992px) {
    .sidebar { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-3) 100%) !important; }
    .side-brand .w { font-family: var(--font-head); color: #fff; } .side-brand .w span { color: var(--gold-2); }
    .sidebar .nav-link { color: rgba(255,255,255,.78) !important; }
    .sidebar .nav-link:hover { background: rgba(201,164,106,.1) !important; color: #fff !important; }
    .sidebar .nav-link.active { background: linear-gradient(90deg, var(--gold), var(--gold-3)) !important; color: var(--ink) !important; box-shadow: 0 .375rem 1rem rgba(201,164,106,.25) !important; }
    .sidebar-heading { color: rgba(232,207,160,.55) !important; }
    .side-user { background: rgba(255,255,255,.05); }
    .head-chip { box-shadow: 0 0 0 1px var(--line); color: var(--ink); }
    .head-icon { color: var(--ink); } .head-icon .dot { background: var(--gold); color: var(--ink); border-color: var(--page); }
}
.shellbar-avatar { background: var(--ink) !important; color: var(--gold-2) !important; }
.sidebar .nav-link .badge { background: var(--gold) !important; color: var(--ink) !important; }

/* Tabs */
.emp-tabs .nav-link.active { background: var(--ink) !important; color: var(--gold-2) !important; }
.emp-tabs .nav-link { box-shadow: 0 0 0 1px var(--line); }

/* KPI icon tiles: brand tile replaces blue */
.kpi-icon.blue { background: var(--gold-tint); color: var(--gold-dark); }
.mini-stat { background: #fff; box-shadow: 0 0 0 1px var(--line); }

/* Information chips use gold instead of blue */
.status-information, .text-bg-info, .text-bg-primary, .role-pill { color: #7d6236 !important; background: var(--gold-tint) !important; border-color: #ead9b8 !important; }
.live-pill .pulse { background: #22a35a; }
.cov-bar span { background: linear-gradient(90deg, var(--gold), var(--gold-2)) !important; }
.tl-dot[style*="#0a6fe0"] { background: var(--ink) !important; }

/* Phone app shell */
@media (max-width: 991.98px) {
    .tabbar .active { color: var(--gold-dark) !important; }
    .tabbar .active::before { background: var(--gold-tint) !important; }
    .filter-count { background: var(--gold) !important; color: var(--ink) !important; }
    .page-actions .btn:first-child { background: linear-gradient(135deg, var(--gold), var(--gold-3)) !important; color: var(--ink) !important; }
    .sidebar .nav-link.active { background: var(--gold-tint) !important; color: #7d6236 !important; }
}

/* Footer */
.site-footer { border-top-color: var(--line); color: #8a8a8a; }

/* Photos */
.has-photo { background: #eee8dc !important; overflow: hidden; padding: 0; }
.has-photo img, .mv-marker .av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.team-av.has-photo { position: relative; } .team-av.has-photo img { border-radius: 50%; }
.profile-photo { position: relative; flex: none; }
.profile-photo .profile-av { width: 4.5rem; height: 4.5rem; font-size: 1.375rem; }
.profile-cam { position: absolute; right: -.125rem; bottom: -.125rem; width: 1.875rem; height: 1.875rem; border-radius: 50%; border: 2px solid #fff;
    background: var(--ink); color: var(--gold-2); display: flex; align-items: center; justify-content: center; font-size: .8125rem; }
.profile-cam:hover { background: var(--gold); color: var(--ink); }
.emp-photo-preview { width: 4rem; height: 4rem; border-radius: 50%; background: #f1ece2; color: #9a7a45; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex: none; }
.mv-marker .av { overflow: hidden; }

/* Pager */
.mv-pager { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .75rem 1rem; padding: .625rem 1rem; border-top: 1px solid var(--line);
    font-size: var(--fs-sm, .75rem); color: #6b6b6b; background: #fff; border-radius: 0 0 1rem 1rem; }
.mv-pager-size { display: inline-flex; align-items: center; gap: .5rem; margin: 0; white-space: nowrap; }
.mv-pager-size select { width: auto; min-height: 1.875rem !important; padding: .125rem 1.75rem .125rem .625rem; font-size: var(--fs-sm, .75rem) !important; border-radius: 999px; }
.mv-pager-range { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv-pager .btn-group .btn { border-radius: 0 !important; min-height: 1.875rem; }
.mv-pager .btn-group .btn:first-child { border-radius: 999px 0 0 999px !important; } .mv-pager .btn-group .btn:last-child { border-radius: 0 999px 999px 0 !important; }
.mv-pager-page { font-variant-numeric: tabular-nums; color: var(--ink) !important; opacity: 1 !important; }
@media (max-width: 991.98px) {
    .mv-pager { justify-content: center; background: transparent; border-top: 0; padding: .25rem 0 .75rem; }
    .mv-pager .btn-group .btn:first-child, .mv-pager .btn-group .btn:last-child { display: none; }
    .mv-pager .btn-group .btn:nth-child(2) { border-radius: 999px 0 0 999px !important; } .mv-pager .btn-group .btn:nth-child(4) { border-radius: 0 999px 999px 0 !important; }
}

/* Reports & Analytics */
.report-card, .dash-tile { transition: box-shadow .15s, transform .15s; }
.report-card:hover, .dash-tile:hover { box-shadow: 0 0 0 1px var(--gold), 0 .5rem 1rem rgba(15,15,16,.08) !important; transform: translateY(-1px); }
.report-group h2 { font-family: var(--font-head); }
#rt th.sortable { cursor: pointer; user-select: none; } #rt th.sortable:hover { color: var(--ink); }
.vtimeline { list-style: none; margin: 0; padding: 0 0 0 .5rem; position: relative; }
.vtimeline::before { content: ""; position: absolute; left: 1.15rem; top: .5rem; bottom: .5rem; border-left: 2px solid var(--line); }
.vtimeline li { display: flex; gap: .875rem; padding: .375rem 0; position: relative; }
.vt-icon { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex: none; z-index: 1; }
.legend-dot { display: inline-block; width: .625rem; height: .625rem; border-radius: 50%; vertical-align: middle; }
.tabular { font-variant-numeric: tabular-nums; }

/* Map credit: small, bottom left */
.leaflet-control-attribution { font-size: 10px !important; padding: 0 5px !important; background: rgba(255,255,255,.75) !important; }

/* App version in the sidebar user box (bottom left) */
.side-version { display: block; width: 100%; text-align: center; font-size: .75rem; white-space: nowrap; opacity: .7; text-decoration: none; color: inherit; }
.side-version:hover { opacity: 1; color: inherit; }

/* ASIS Edge Band logo in the dark desktop sidebar: on a white card so the logo colours stay true */
.side-brand .side-logo { width: 100%; height: auto !important; background: #fff; padding: .5rem .75rem; border-radius: .5rem; filter: none !important; }
