/*
 * Dinbhar One theme, from the logo (docs/DinbharOne-Logo.png). The "gold" tokens are the brand colour: Dinbhar One navy
 * by default, re-pointed per company by the layout (App\Support\Brand::cssVars from the company's brand colour).
 * --on-brand = text on the brand colour. The --dn-* tokens are the logo's fixed four-colour accent (team members).
 *   Ink #0B1F3F · body text #334155 · brand navy #00509A · accent red #DC1221 · page #F5F8FC
 *   Logo accents: green #0AA149 · red #DC1221 · yellow #FEB112 · blue #0187FE · ring #B4BBC7
 *   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: #0b1f3f; --ink-2: #16305a; --ink-3: #071730; --text: #334155; --muted: #64748b;
    --gold: #00509a; --gold-2: #73a1cb; --gold-3: #1f65a6; --gold-dark: #003a6f; --gold-tint: #e6eef5; --on-brand: #ffffff; --bs-primary-rgb: 0, 80, 154;
    --cream: #eef3f9; --page: #f5f8fc; --line: #e1e8f0;
    --dn-navy: #00509a; --dn-red: #dc1221; --dn-green: #0aa149; --dn-yellow: #feb112; --dn-blue: #0187fe; --dn-ring: #b4bbc7;
    --dn-red-tint: #fde8ea; --dn-green-tint: #e4f5eb; --dn-yellow-tint: #fff4dc; --dn-blue-tint: #e3f1ff; --dn-amber: #b97a00;
    --dn-stripe: linear-gradient(90deg, var(--dn-green) 0 25%, var(--dn-red) 25% 50%, var(--dn-yellow) 50% 75%, var(--dn-blue) 75%);
    --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); --mv-teal: var(--dn-blue);
    --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: var(--gold-tint); --sapList_SelectionBackgroundColor: var(--gold-tint); --sapField_Hover_BorderColor: var(--gold-dark);
    --sapTextColor: var(--ink); --sapTitleColor: var(--ink); --sapContent_LabelColor: #6b6b6b;
    --bs-primary: var(--gold); --bs-link-color: var(--gold-dark);
    --bs-link-hover-color: var(--gold-dark); --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: var(--gold-dark); }
.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: brand 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(--on-brand); --bs-btn-hover-color: var(--on-brand); --bs-btn-active-color: var(--on-brand); --bs-btn-disabled-color: var(--on-brand);
    --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: var(--gold-dark); --bs-btn-active-border-color: var(--gold-dark); --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: var(--line); --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: var(--gold-tint); --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: var(--gold-dark); }

/* 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: #f4f7fb !important; color: #5b6b80; }
.table { --bs-table-hover-bg: #f2f6fb; }

/* Sidebar: deep navy ink with brand-colour 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: #ff5c68; }
    .sidebar .nav-link { color: rgba(255,255,255,.78) !important; }
    .sidebar .nav-link:hover { background: rgba(var(--bs-primary-rgb), .1) !important; color: #fff !important; }
    .sidebar .nav-link.active { background: linear-gradient(90deg, var(--gold), var(--gold-3)) !important; color: var(--on-brand) !important; box-shadow: 0 .375rem 1rem rgba(var(--bs-primary-rgb), .25) !important; }
    .sidebar-heading { color: rgba(255,255,255,.45) !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(--on-brand); 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(--on-brand) !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 the brand colour */
.status-information, .text-bg-info, .text-bg-primary, .role-pill { color: var(--gold-dark) !important; background: var(--gold-tint) !important; border-color: var(--gold-2) !important; }
.live-pill .pulse { background: var(--dn-green); }
.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(--on-brand) !important; }
    .page-actions .btn:first-child { background: linear-gradient(135deg, var(--gold), var(--gold-3)) !important; color: var(--on-brand) !important; }
    .sidebar .nav-link.active { background: var(--gold-tint) !important; color: var(--gold-dark) !important; }
}

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

/* Photos */
.has-photo { background: #e6edf5 !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(--on-brand); }
.emp-photo-preview { width: 4rem; height: 4rem; border-radius: 50%; background: var(--gold-tint); color: var(--gold-dark); 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; }

/* Logo signature: the four team colours as a thin stripe, wordmark in navy + red */
.shellbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--dn-stripe); pointer-events: none; }
.brand-word .brand-move { color: var(--dn-navy); } .brand-word .brand-ntra { color: var(--dn-red); }
@media (min-width: 992px) {
    .side-brand { position: relative; }
    .side-brand::after { content: ""; position: absolute; left: 1.25rem; right: 1.25rem; bottom: .25rem; height: 3px; border-radius: 3px; background: var(--dn-stripe); }
    .side-brand img { filter: drop-shadow(0 0 .5rem rgba(255,255,255,.12)); background: #fff; border-radius: .625rem; padding: .125rem; }
}
.card-header { border-bottom-color: var(--line); }

/* Logo mark sizes: larger than the placeholder so the four team colours read clearly */
.shellbar-mark { height: 2.25rem; }
@media (max-width: 991.98px) { .shellbar-mark { height: 2rem; } }
@media (min-width: 992px) { .side-brand img { height: 2.75rem; } }

/* KPI icon tiles in the logo colours */
.kpi-icon.green { background: var(--dn-green-tint); color: var(--dn-green); }
.kpi-icon.teal { background: var(--dn-blue-tint); color: var(--dn-blue); }
.kpi-icon.orange { background: var(--dn-yellow-tint); color: var(--dn-amber); }
.kpi-icon.red { background: var(--dn-red-tint); color: var(--dn-red); }
