/* ==========================================================================
   JMV Financial Services — Loan & Workforce Management System
   Design tokens + application shell. Built on Bootstrap 5.3 (CDN, no build).
   ========================================================================== */

:root {
    /* Brand palette taken from the JMV logo: deep navy wordmark, the bright
       blue of the M/V, and the green of the V and the tagline rule. */
    --jmv-navy: #002454;
    --jmv-navy-800: #013a72;
    --jmv-navy-700: #014a8f;
    --jmv-blue: #0078cc;          /* logo blue — accents, bars, gradients */
    --jmv-blue-ink: #006cc0;      /* darkened for white text (AA contrast)  */
    --jmv-green: #54a830;         /* logo green — accents, bars, badges     */
    --jmv-green-ink: #35761c;     /* darkened for white text (AA contrast)  */

    /* Kept under the old names so nothing that referenced the previous gold
       accent breaks; they now resolve to the logo green. */
    --jmv-accent: var(--jmv-green);
    --jmv-accent-soft: #e6f4e1;

    --jmv-bg: #f4f7fb;
    --jmv-surface: #ffffff;
    --jmv-border: #e0e7f1;
    --jmv-text: #1f2937;
    --jmv-muted: #6b7280;
    --sidebar-w: 260px;
    --topbar-h: 62px;

    --bs-primary: #006cc0;
    --bs-primary-rgb: 0, 108, 192;
    --bs-success: #35761c;
    --bs-success-rgb: 46, 125, 34;
    --bs-body-bg: var(--jmv-bg);
    --bs-card-bg: var(--jmv-surface);
    --bs-body-color: var(--jmv-text);
    --bs-border-color: var(--jmv-border);
    --bs-link-color: #006cc0;
    --bs-link-hover-color: #004a85;
}

* { -webkit-font-smoothing: antialiased; }

body {
    background: var(--jmv-bg);
    color: var(--jmv-text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9rem;
}

.btn-primary {
    --bs-btn-bg: #006cc0; --bs-btn-border-color: #006cc0;
    --bs-btn-hover-bg: #005ba3; --bs-btn-hover-border-color: #005ba3;
    --bs-btn-active-bg: #004a85; --bs-btn-active-border-color: #004a85;
}
.btn-success {
    --bs-btn-bg: #35761c; --bs-btn-border-color: #35761c;
    --bs-btn-hover-bg: #256a1b; --bs-btn-hover-border-color: #256a1b;
    --bs-btn-active-bg: #1e5716; --bs-btn-active-border-color: #1e5716;
}
.btn-outline-primary {
    --bs-btn-color: #006cc0; --bs-btn-border-color: #006cc0;
    --bs-btn-hover-bg: #006cc0; --bs-btn-hover-border-color: #006cc0;
}
.btn { --bs-btn-font-size: .875rem; border-radius: .5rem; font-weight: 500; }
.btn-sm { --bs-btn-font-size: .8125rem; }
.form-control, .form-select { border-radius: .5rem; font-size: .875rem; border-color: var(--jmv-border); }
.form-control:focus, .form-select:focus { border-color: #6ea8de; box-shadow: 0 0 0 .2rem rgba(6,95,171,.15); }
.form-label { font-size: .8125rem; font-weight: 600; color: #374151; margin-bottom: .35rem; }
.form-text { font-size: .75rem; }

/* ------------------------------------------------------------------ shell */

.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--jmv-navy);
    color: #cdd7e6;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1045;
    transition: transform .25s ease;
}

.sidebar-brand {
    height: var(--topbar-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 .9rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex: 0 0 auto;
}
.brand-link { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: #fff; min-width: 0; }
.brand-mark {
    width: 36px; height: 36px; flex: 0 0 36px; border-radius: .55rem;
    background: linear-gradient(135deg, var(--jmv-navy) 0%, var(--jmv-blue) 55%, var(--jmv-green) 100%);
    color: #ffffff; font-weight: 800; font-size: .78rem;
    display: grid; place-items: center; letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: .8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: .65rem; color: #8ea3c0; }
.sidebar-close { color: #cdd7e6; }

.sidebar-nav { flex: 1 1 auto; overflow-y: auto; padding: .6rem 0 1rem; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }

.nav-heading {
    font-size: .65rem; text-transform: uppercase; letter-spacing: .09em;
    color: #7c8ea9; padding: .85rem 1.1rem .3rem; font-weight: 700;
}
.nav-list { list-style: none; margin: 0; padding: 0 .55rem; }
.nav-item {
    display: flex; align-items: center; gap: .65rem;
    padding: .5rem .6rem; border-radius: .5rem;
    color: #c3cfe0; text-decoration: none; font-size: .8125rem; font-weight: 500;
    transition: background .15s, color .15s;
}
.nav-item i { font-size: 1rem; width: 1.15rem; text-align: center; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--bs-primary); color: #fff; box-shadow: 0 2px 8px rgba(6,95,171,.45); }
.nav-item.active i { opacity: 1; }

.sidebar-foot { flex: 0 0 auto; border-top: 1px solid rgba(255,255,255,.08); padding: .7rem .9rem; }
.sidebar-user { display: flex; align-items: center; gap: .6rem; }
.sidebar-user .meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sidebar-user .meta strong { font-size: .78rem; color: #fff; font-weight: 600; }
.sidebar-user .meta small { font-size: .68rem; color: #8ea3c0; }

.avatar {
    width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%;
    background: rgba(255,255,255,.12); color: #fff;
    display: grid; place-items: center; font-size: .72rem; font-weight: 700;
}

.app-main {
    flex: 1 1 auto; min-width: 0;
    margin-left: var(--sidebar-w);
    display: flex; flex-direction: column;
}

/* ----------------------------------------------------------------- topbar */

.app-topbar {
    height: var(--topbar-h);
    background: var(--jmv-surface);
    border-bottom: 1px solid var(--jmv-border);
    display: flex; align-items: center; gap: .75rem;
    padding: 0 1.1rem;
    position: sticky; top: 0; z-index: 1030;
}
.btn-icon {
    width: 38px; height: 38px; border-radius: .5rem; padding: 0;
    display: grid; place-items: center; color: #4b5563; border: 1px solid transparent;
    background: transparent; font-size: 1.05rem;
}
.btn-icon:hover { background: #eef2f8; color: var(--jmv-navy); }

.topbar-search { position: relative; flex: 1 1 auto; max-width: 430px; }
.topbar-search i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: #9aa5b5; font-size: .9rem; }
.topbar-search .form-control { padding-left: 2.15rem; background: #f6f8fc; border-color: transparent; height: 38px; }
.topbar-search .form-control:focus { background: #fff; border-color: #6ea8de; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.badge-dot {
    position: absolute; top: 3px; right: 3px;
    background: #dc3545; color: #fff; font-size: .58rem; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
    display: grid; place-items: center; border: 2px solid #fff;
}
.btn-user {
    display: flex; align-items: center; gap: .55rem;
    background: transparent; border: 1px solid transparent; border-radius: .5rem;
    padding: .25rem .5rem; color: var(--jmv-text);
}
.btn-user:hover { background: #eef2f8; }
.btn-user .avatar { background: var(--bs-primary); }
.btn-user strong { font-size: .8rem; font-weight: 600; }
.btn-user small { font-size: .68rem; color: var(--jmv-muted); }

/* notifications */
.notif-menu { width: 340px; padding: 0; border: 1px solid var(--jmv-border); box-shadow: 0 12px 32px rgba(0,26,61,.14); border-radius: .65rem; overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .85rem; border-bottom: 1px solid var(--jmv-border); }
.notif-body { max-height: 340px; overflow-y: auto; }
.notif-item { display: flex; gap: .65rem; padding: .65rem .85rem; text-decoration: none; color: inherit; border-bottom: 1px solid #f1f4f9; }
.notif-item:hover { background: #f7f9fd; }
.notif-icon { font-size: 1rem; margin-top: .1rem; }
.notif-text { display: flex; flex-direction: column; min-width: 0; }
.notif-text strong { font-size: .8rem; font-weight: 600; }
.notif-text small { font-size: .74rem; color: var(--jmv-muted); }
.notif-text em { font-size: .68rem; color: #9aa5b5; font-style: normal; margin-top: .15rem; }
.notif-empty { padding: 1.6rem; text-align: center; color: var(--jmv-muted); display: flex; flex-direction: column; gap: .4rem; align-items: center; }
.notif-empty i { font-size: 1.5rem; color: #22a06b; }
.notif-foot { display: block; text-align: center; padding: .6rem; font-size: .78rem; border-top: 1px solid var(--jmv-border); text-decoration: none; }

/* ---------------------------------------------------------------- content */

.app-content { flex: 1 1 auto; padding: 1.25rem; max-width: 100%; }
.app-footer {
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: .85rem 1.25rem; border-top: 1px solid var(--jmv-border);
    font-size: .75rem; color: var(--jmv-muted); background: var(--jmv-surface);
}

.page-head { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head h1 { font-size: 1.3rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.page-head .sub { color: var(--jmv-muted); font-size: .82rem; margin-top: .15rem; }
.page-head .actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

.card { border: 1px solid var(--jmv-border); border-radius: .7rem; box-shadow: 0 1px 2px rgba(0,26,61,.04); }
.card-header {
    background: var(--jmv-surface); border-bottom: 1px solid var(--jmv-border);
    padding: .8rem 1rem; font-weight: 600; font-size: .875rem;
    display: flex; align-items: center; gap: .5rem; border-radius: .7rem .7rem 0 0 !important;
}
.card-header .card-actions { margin-left: auto; display: flex; gap: .4rem; }

/* stat tiles */
.stat-grid { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.stat-card {
    background: var(--jmv-surface); border: 1px solid var(--jmv-border); border-radius: .7rem;
    padding: .9rem 1rem; display: flex; align-items: flex-start; gap: .75rem;
    text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s;
}
a.stat-card:hover { box-shadow: 0 6px 18px rgba(0,26,61,.09); transform: translateY(-1px); }
.stat-icon {
    width: 38px; height: 38px; flex: 0 0 38px; border-radius: .55rem;
    display: grid; place-items: center; font-size: 1.05rem;
}
.stat-meta { min-width: 0; }
.stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.stat-label { font-size: .74rem; color: var(--jmv-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat-sub { font-size: .72rem; color: var(--jmv-muted); margin-top: .2rem; }

/* tables */
.table-wrap { overflow-x: auto; }
.table { font-size: .8125rem; margin-bottom: 0; }
.table > thead > tr > th {
    background: #f7f9fc; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
    color: #64748b; font-weight: 700; border-bottom: 1px solid var(--jmv-border);
    white-space: nowrap; padding: .6rem .75rem;
}
.table > tbody > tr > td { padding: .6rem .75rem; vertical-align: middle; border-color: #eef1f6; }
.table > tbody > tr:hover { background: #f9fbfe; }
.table-actions { display: flex; gap: .3rem; justify-content: flex-end; }

.badge { font-weight: 600; font-size: .68rem; padding: .3rem .5rem; border-radius: .35rem; letter-spacing: .01em; }
.badge-soft-primary { background: #e4eefa; color: #006cc0; }
.badge-soft-success { background: #e6f4e1; color: #35761c; }
.badge-soft-danger  { background: #fdeaea; color: #b02a2a; }
.badge-soft-warning { background: #fdf3e0; color: #99680f; }
.badge-soft-info    { background: #e3f1fc; color: #1565a3; }
.badge-soft-secondary { background: #eef1f6; color: #4b5563; }
.badge-soft-dark    { background: #e2e5ea; color: #263243; }

.empty-state { padding: 2.6rem 1rem; text-align: center; color: var(--jmv-muted); }
.empty-state i { font-size: 2rem; color: #c3ccda; display: block; margin-bottom: .5rem; }
.empty-state h6 { color: #374151; font-weight: 600; margin-bottom: .25rem; }

.filter-card .row > [class^="col"] { margin-bottom: .6rem; }

.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: .78rem; }
.text-tiny { font-size: .72rem; }

/* timeline used by lead history / audit views */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid #e6eaf1; }
.timeline > li { position: relative; padding: 0 0 1.05rem 1rem; }
.timeline > li::before {
    content: ""; position: absolute; left: -1.42rem; top: .25rem;
    width: .68rem; height: .68rem; border-radius: 50%;
    background: #fff; border: 2px solid var(--bs-primary);
}
.timeline > li:last-child { padding-bottom: 0; }

/* ------------------------------------------------------------------- auth */

.auth-body { background: linear-gradient(135deg, #002454 0%, #006cc0 55%, #0078cc 100%); min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; }
.auth-wrap {
    width: 100%; max-width: 880px; background: #fff; border-radius: 1rem; overflow: hidden;
    display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.auth-brand { background: linear-gradient(160deg, #002454, #013a72); color: #fff; padding: 2.4rem 2rem; display: flex; flex-direction: column; justify-content: center; }
.auth-mark {
    width: 54px; height: 54px; border-radius: .8rem; margin-bottom: 1.1rem;
    background: linear-gradient(135deg, var(--jmv-navy) 0%, var(--jmv-blue) 55%, var(--jmv-green) 100%); color: #ffffff;
    display: grid; place-items: center; font-weight: 800; font-size: 1rem;
}
.auth-brand h1 { font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.auth-brand p { color: #a9bcd6; font-size: .85rem; margin-bottom: 1.4rem; }
.auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.auth-points li { font-size: .8rem; color: #cddaea; display: flex; gap: .5rem; align-items: center; }
.auth-points i { color: var(--jmv-green); }
.auth-panel { padding: 2.4rem 2rem; display: flex; flex-direction: column; justify-content: center; }

/* --------------------------------------------------------------- responsive */

.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,26,61,.5); z-index: 1040; }
body.sidebar-open .sidebar-backdrop { display: block; }

@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    body.sidebar-open .app-sidebar { transform: translateX(0); }
    .app-main { margin-left: 0; }
}
@media (max-width: 767.98px) {
    .auth-wrap { grid-template-columns: 1fr; max-width: 420px; }
    .auth-brand { display: none; }
    .app-content { padding: .9rem; }
    .page-head .actions { width: 100%; }
}

@media print {
    .app-sidebar, .app-topbar, .app-footer, .page-head .actions, .no-print { display: none !important; }
    .app-main { margin-left: 0; }
    .app-content { padding: 0; }
    .card { border: none; box-shadow: none; }
}

/* ---------------------------------------------------------------- branding */

.brand-preview {
    width: 100%; min-height: 92px; border: 1px dashed var(--jmv-border); border-radius: .6rem;
    background: #fbfcfe; display: grid; place-items: center; padding: .75rem; overflow: hidden;
}
.brand-preview img { max-width: 100%; max-height: 76px; object-fit: contain; }
.brand-preview-initials {
    width: 56px; height: 56px; border-radius: .6rem; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--jmv-navy) 0%, var(--jmv-blue) 55%, var(--jmv-green) 100%);
    color: #ffffff; font-weight: 800; font-size: .95rem; letter-spacing: .02em;
}
/* Uploaded logo replacing the lettermark in the sidebar and on the sign-in screen */
.brand-mark img, .auth-mark img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Real logo in the sidebar and on the sign-in screen, sized to be legible.
   The white plate behind it is not automatic: a dark wordmark on transparency
   vanishes into the navy chrome without one, while a logo drawn for dark
   surfaces looks like a sticker with one. Branding::logoNeedsPlate() measures
   the artwork and only then is .needs-plate added. */
.brand-logo {
    display: inline-block; width: fit-content; border-radius: .5rem;
    padding: 7px 10px; max-width: 200px; line-height: 0;
}
.brand-logo img { max-width: 100%; max-height: 46px; width: auto; object-fit: contain; }
.auth-mark.has-logo { display: inline-block; width: fit-content; height: auto; max-width: 210px;
    padding: 10px 12px; border-radius: .6rem; }
.auth-mark.has-logo img { max-height: 64px; }
.brand-mark.has-logo, .auth-mark.has-logo { padding: 4px; }
/* A badge logo standing in for the lettermark beside the company name: it
   fills the square the initials used to, and keeps its own proportions. */
.brand-mark.has-logo { background: none; padding: 0; overflow: hidden; }
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; }
/* The sign-in panel has the height a crest needs to be read. */
.auth-mark.has-logo.is-badge { max-width: 150px; }
.auth-mark.has-logo.is-badge img { max-height: 132px; }
.brand-logo.needs-plate, .brand-mark.has-logo.needs-plate, .auth-mark.has-logo.needs-plate { background: #fff; }

/* ==========================================================================
   Modern UI layer — dashboard and shared surfaces
   Softer depth, a real type scale, and one clear focal row per screen.
   ========================================================================== */

:root {
    --r-sm: .5rem;
    --r-md: .75rem;
    --r-lg: 1rem;
    --shadow-sm: 0 1px 2px rgba(0, 36, 84, .05);
    --shadow-md: 0 2px 4px rgba(0, 36, 84, .04), 0 8px 24px rgba(0, 36, 84, .06);
    --shadow-lg: 0 12px 32px rgba(0, 36, 84, .10);
}

/* ------------------------------------------------------------------ surfaces */

.card {
    background: var(--jmv-surface);
    border: 1px solid #e8edf5;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #eef2f8;
    padding: .9rem 1.1rem;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: -.005em;
    color: #243244;
    border-radius: var(--r-md) var(--r-md) 0 0 !important;
}
.card-header i:first-child { color: var(--jmv-blue); opacity: .9; }
.card-body { padding: 1.1rem; }

/* --------------------------------------------------------------- hero KPIs */

.kpi-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    margin-bottom: .85rem;
}

.kpi {
    position: relative;
    background: var(--jmv-surface);
    border: 1px solid #e8edf5;
    border-radius: var(--r-md);
    padding: 1.05rem 1.15rem;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
a.kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #d7e2f2; }

/* Brand hairline that identifies the metric without shouting. */
.kpi::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
    background: var(--kpi-accent, var(--jmv-blue));
}

.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .55rem; }
.kpi-label {
    font-size: .69rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    color: #78849a;
}
.kpi-icon {
    width: 32px; height: 32px; flex: 0 0 32px; border-radius: .55rem;
    display: grid; place-items: center; font-size: .92rem;
    background: var(--kpi-tint, #e4eefa); color: var(--kpi-accent, var(--jmv-blue-ink));
}
.kpi-value {
    font-size: 1.85rem; font-weight: 700; line-height: 1.05;
    letter-spacing: -.03em; color: #14213a;
    font-variant-numeric: tabular-nums;
}
.kpi-sub { margin-top: .3rem; font-size: .735rem; color: var(--jmv-muted); }

.kpi--blue   { --kpi-accent: #006cc0; --kpi-tint: #e4eefa; }
.kpi--green  { --kpi-accent: #35761c; --kpi-tint: #e6f4e1; }
.kpi--navy   { --kpi-accent: #002454; --kpi-tint: #e5e9f4; }
.kpi--amber  { --kpi-accent: #9a6a0f; --kpi-tint: #fdf3e0; }
.kpi--red    { --kpi-accent: #b02a2a; --kpi-tint: #fdeaea; }

/* ------------------------------------------------- compact secondary metrics */

.metric-strip {
    display: grid; gap: .6rem;
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    margin-bottom: .85rem;
}
.metric {
    background: var(--jmv-surface); border: 1px solid #e8edf5; border-radius: var(--r-sm);
    padding: .7rem .8rem; text-decoration: none; color: inherit; display: block;
    transition: border-color .15s ease, background .15s ease;
}
a.metric:hover { border-color: #cfdcef; background: #fbfdff; }
.metric-value {
    font-size: 1.15rem; font-weight: 700; line-height: 1.1; color: #14213a;
    font-variant-numeric: tabular-nums;
}
.metric-label { font-size: .7rem; color: #78849a; margin-top: .12rem; font-weight: 500; }
.metric-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: .35rem; vertical-align: middle; }

/* ------------------------------------------------------------------- chart */

.chart {
    position: relative;
    height: 210px;
    padding-left: 2.6rem;
    padding-bottom: 1.5rem;
}
.chart-grid { position: absolute; inset: 0 0 1.5rem 2.6rem; }
.chart-line {
    position: absolute; left: 0; right: 0; border-top: 1px dashed #e8edf5;
    font-size: .65rem; color: #a7b1c2;
}
.chart-line span { position: absolute; left: -2.6rem; top: -.55rem; width: 2.2rem; text-align: right; }
.chart-bars { position: relative; height: 100%; display: flex; align-items: flex-end; gap: .5rem; }
.chart-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.chart-pair { display: flex; align-items: flex-end; gap: 4px; height: 100%; width: 100%; justify-content: center; }
.chart-bar {
    width: 16px; border-radius: 4px 4px 0 0; min-height: 3px;
    transition: opacity .15s ease;
}
.chart-bar:hover { opacity: .78; }
.chart-bar--leads { background: linear-gradient(180deg, #3f9ada, #006cc0); }
.chart-bar--won   { background: linear-gradient(180deg, #7cc44a, #35761c); }
.chart-xlabel {
    position: absolute; bottom: -1.35rem; font-size: .68rem; color: #8a94a6;
    width: 100%; text-align: center;
}
.chart-legend { display: flex; gap: 1rem; justify-content: center; margin-top: 1.9rem; font-size: .72rem; color: var(--jmv-muted); }
.chart-key { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: .3rem; }

/* -------------------------------------------------------- pipeline + lists */

.pipe-grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(152px, 1fr)); }
.pipe {
    display: block; text-decoration: none; color: inherit; padding: .6rem .7rem;
    border: 1px solid #e8edf5; border-radius: var(--r-sm); background: #fcfdff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.pipe:hover { border-color: #cfdcef; box-shadow: var(--shadow-sm); }
.pipe-head { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem; }
.pipe-name { font-size: .72rem; font-weight: 600; color: #3c4759; }
.pipe-count { font-size: .95rem; font-weight: 700; color: #14213a; font-variant-numeric: tabular-nums; }
.pipe-track { height: 3px; border-radius: 2px; background: #edf1f7; margin-top: .45rem; overflow: hidden; }
.pipe-fill { height: 100%; border-radius: 2px; }

.list-group-item { border-color: #eef2f8; padding: .65rem 1.1rem; }
.list-group-item-action:hover { background: #f7faff; }

/* ------------------------------------------------------------------ tables */

.table > thead > tr > th {
    background: #fafbfe; font-size: .675rem; letter-spacing: .06em;
    color: #7a8698; border-bottom: 1px solid #eef2f8; padding: .65rem .9rem;
}
.table > tbody > tr > td { padding: .7rem .9rem; border-color: #f1f4f9; }
.table > tbody > tr:hover { background: #f9fbff; }
.table td .fw-semibold { color: #1b2740; }

/* --------------------------------------------------------------- page head */

.page-head h1 { font-size: 1.4rem; letter-spacing: -.022em; color: #14213a; }
.page-head .sub { font-size: .8rem; }

@media (max-width: 575.98px) {
    .kpi-value { font-size: 1.55rem; }
    .chart { height: 175px; }
}
