/* ==========================================================================
   heknowel — 2026 interface refresh
   Loaded after app.css. Presentation-only layer: routes, permissions and
   backend behaviour are unchanged. Airy blue/white surfaces, generous space,
   large touch targets and responsive layouts down to 320px.
   ========================================================================== */

:root {
    --ink: #0c1b33;
    --ink-soft: #162843;
    --text: #1b2c46;
    --muted: #66788f;
    --muted-2: #8c9bb0;
    --line: #e3edf9;
    --line-soft: #eff5fc;
    --bg: #f4f8fe;
    --surface: #ffffff;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: #edf4ff;
    --sky: #0ea5e9;
    --teal: #0d9488;
    --green: #0f9d76;
    --amber: #d97706;
    --rose: #e11d48;
    --radius: 22px;
    --radius-sm: 13px;
    --shadow-sm: 0 1px 2px rgba(15, 42, 85, .03), 0 16px 38px -32px rgba(15, 42, 85, .3);
    --shadow-md: 0 30px 70px -40px rgba(37, 99, 235, .35);
    --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body,
.admin-body,
.public-body,
.form-body,
.auth-body {
    overflow-x: hidden;
}

img,
svg {
    max-width: 100%;
}

::selection {
    background: #cfe2ff;
    color: #12305c;
}

a {
    color: var(--brand);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--brand-dark);
}

code {
    color: #1d4ed8;
    background: #eff5ff;
    border-radius: 6px;
    padding: 2px 6px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    padding: 10px 16px;
    border-radius: 10px;
    background: #0c1b33;
    color: #fff;
    font-weight: 700;
    transform: translateY(-180%);
    transition: transform .18s ease;
}

.skip-link:focus {
    color: #fff;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    --bs-btn-focus-box-shadow: 0 0 0 4px rgba(37, 99, 235, .18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    border-radius: 12px;
    font-family: var(--font);
    font-weight: 700;
    font-size: .86rem;
    padding: .58rem 1rem;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-lg {
    min-height: 52px;
    border-radius: 14px;
    padding: .78rem 1.3rem;
    font-size: .98rem;
}

.btn-sm {
    min-height: 34px;
    border-radius: 9px;
    padding: .36rem .72rem;
    font-size: .78rem;
}

.btn-brand {
    background: linear-gradient(135deg, #2f7bf6 0%, #1d4ed8 100%);
    border: 0;
    color: #fff;
    box-shadow: 0 12px 26px -14px rgba(37, 99, 235, .7);
}

.btn-brand:hover,
.btn-brand:focus {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border: 0;
    color: #fff;
    box-shadow: 0 16px 30px -14px rgba(37, 99, 235, .78);
}

.btn-brand:disabled {
    background: #aac7f5;
    color: #fff;
    box-shadow: none;
}

.btn-light {
    background: #fff;
    border: 1px solid #dfe9f7;
    color: #334b69;
    box-shadow: 0 8px 20px -18px rgba(15, 42, 85, .35);
}

.btn-light:hover {
    background: #f6faff;
    border-color: #cfe1f7;
    color: #16345d;
}

.btn-outline-secondary {
    background: #fff;
    border: 1px solid #dbe7f7;
    color: #3c5473;
}

.btn-outline-secondary:hover {
    background: #f5f9ff;
    border-color: #c4d9f2;
    color: #16345d;
}

.btn-outline-danger {
    border-color: #f3cdd7;
    color: #be123c;
    background: #fff;
}

.btn-outline-danger:hover {
    background: #fff5f7;
    border-color: #edb3c2;
    color: #9f1239;
}

.btn-icon {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 12px;
}

.btn-ghost-light {
    background: transparent;
    border: 0;
    color: #7b8ea8;
    box-shadow: none;
}

.btn-ghost-light:hover {
    background: #eef5ff;
    color: var(--brand);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .65), inset 0 1px 0 rgba(255, 255, 255, .25);
}

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

.admin-body {
    min-height: 100vh;
    background:
        radial-gradient(1050px 520px at 78% -12%, rgba(56, 189, 248, .14), transparent 62%),
        radial-gradient(820px 460px at -8% 22%, rgba(37, 99, 235, .08), transparent 60%),
        linear-gradient(180deg, #f8fbff 0%, #f4f8fe 38%, #f6faff 100%);
}

.sidebar {
    width: 272px;
    inset: 0 auto 0 0;
    padding: 18px 14px 16px;
    background: rgba(255, 255, 255, .92);
    border-right: 1px solid #e4eefb;
    color: #61748d;
    backdrop-filter: blur(18px);
    box-shadow: 12px 0 40px -36px rgba(15, 42, 85, .4);
}

.sidebar-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 18px;
}

.sidebar-brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 12px;
    padding: 6px 8px;
    color: var(--ink);
}

.sidebar-brand:hover {
    color: var(--ink);
}

.sidebar-brand strong {
    font-size: 1.04rem;
    font-weight: 800;
    letter-spacing: -.025em;
}

.sidebar-brand small {
    margin-top: 3px;
    color: #8d9db2;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .035em;
}

.sidebar-label {
    margin: 14px 0 8px;
    padding: 0 12px;
    color: #98a8bc;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.sidebar-nav {
    gap: 3px;
}

.sidebar-link {
    gap: 11px;
    margin-bottom: 2px;
    padding: 8px 10px;
    border-radius: 13px;
    color: #5a6d86;
    font-size: .855rem;
    font-weight: 600;
}

.sidebar-link i {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f4f8fe;
    color: #7488a3;
    font-size: .95rem;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.sidebar-link:hover {
    background: #f5f9ff;
    color: #1d4ed8;
}

.sidebar-link:hover i {
    background: #e8f1ff;
    color: #1d4ed8;
}

.sidebar-link.active {
    background: linear-gradient(135deg, #edf5ff 0%, #f7fbff 100%);
    color: #1d4ed8;
    box-shadow: inset 0 0 0 1px #d6e6fb;
}

.sidebar-link.active i {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    box-shadow: 0 8px 16px -8px rgba(37, 99, 235, .65);
}

.sidebar-user {
    margin: auto 2px 0;
    padding: 10px;
    border: 1px solid #e6effb;
    border-radius: 16px;
    background: linear-gradient(160deg, #f8fbff, #f1f7ff);
    gap: 9px;
}

.sidebar-user-info strong {
    color: var(--ink);
    font-size: .82rem;
    font-weight: 750;
}

.sidebar-user-info small {
    color: #8194ad;
    font-size: .7rem;
}

.sidebar-user .avatar {
    box-shadow: 0 0 0 3px #fff, 0 6px 14px -8px rgba(15, 42, 85, .4);
}

.sidebar-close {
    display: none;
    margin-left: auto;
    width: 38px;
    height: 38px;
    min-height: 38px;
    border: 1px solid #e1ebf8;
    border-radius: 11px;
    background: #f8fbff;
    color: #5f7591;
}

.app-main {
    margin-left: 272px;
    min-height: 100vh;
}

.topbar {
    min-height: 74px;
    padding: 13px 34px;
    background: rgba(248, 251, 255, .84);
    border-bottom: 1px solid rgba(220, 233, 248, .9);
    backdrop-filter: blur(16px);
    gap: 13px;
}

.topbar-title h1 {
    color: var(--ink);
    font-size: 1.04rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.topbar-title p {
    margin-top: 2px;
    color: #7b8da5;
    font-size: .76rem;
}

.topbar-actions {
    gap: 9px;
}

.topbar-actions .avatar {
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px #e4eefb;
}

.app-content {
    width: 100%;
    max-width: 1520px;
    margin: 0 auto;
    padding: 30px 34px 62px;
}

.mobile-tabbar {
    display: none;
}

/* --------------------------------------------------------------------------
   Headings
   -------------------------------------------------------------------------- */

.page-head {
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.page-title {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.6rem, 2.1vw, 2.08rem);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.16;
}

.page-sub {
    margin: 6px 0 0;
    color: #6e8199;
    font-size: .9rem;
    line-height: 1.55;
}

.breadcrumbs {
    gap: 7px;
    margin-bottom: 8px;
    color: #90a1b6;
    font-size: .75rem;
    font-weight: 600;
}

.breadcrumbs a {
    color: #71849d;
}

.breadcrumbs i {
    font-size: .55rem;
    color: #aab9ca;
}

/* --------------------------------------------------------------------------
   Panels & cards
   -------------------------------------------------------------------------- */

.panel {
    padding: 24px;
    border: 1px solid #e4edf9;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow-sm);
}

.panel-flush {
    padding: 0;
}

.panel-head {
    gap: 16px;
    margin-bottom: 18px;
}

.panel-head-pad {
    padding: 22px 24px 0;
    margin-bottom: 10px;
}

.panel-head h3 {
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -.025em;
}

.panel-head p {
    margin-top: 3px;
    color: #7d8fa6;
    font-size: .78rem;
}

.panel-foot {
    padding: 15px 24px 20px;
    border-top: 1px solid #eef4fb;
}

.panel-filter {
    padding: 20px 22px;
    margin-bottom: 18px;
    border-radius: 22px;
    background: linear-gradient(170deg, #ffffff 0%, #fafdff 100%);
}

.panel-danger {
    border-color: #f6d5dd;
    background: linear-gradient(170deg, #fffdfd, #fff7f9);
}

.chip {
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid #e3edf9;
    border-radius: 999px;
    background: #f8fbff;
    color: #55708f;
    font-size: .72rem;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Dashboard hero
   -------------------------------------------------------------------------- */

.dash-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 22px;
    padding: 34px 36px;
    overflow: hidden;
    border: 1px solid #dce9fa;
    border-radius: 28px;
    background:
        radial-gradient(420px 260px at 92% 8%, rgba(56, 189, 248, .22), transparent 70%),
        radial-gradient(360px 240px at 8% 100%, rgba(37, 99, 235, .09), transparent 70%),
        linear-gradient(120deg, #eef6ff 0%, #fbfdff 52%, #ebf8ff 100%);
    box-shadow: 0 26px 60px -46px rgba(15, 58, 120, .4);
}

.dash-hero::before {
    content: "";
    position: absolute;
    top: -70px;
    right: 26%;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(37, 99, 235, .1);
    border-radius: 50%;
}

.dash-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -120px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(14, 165, 233, .14);
    border-radius: 50%;
}

.dash-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 660px;
}

.eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 13px;
    padding: 6px 11px;
    border: 1px solid rgba(37, 99, 235, .13);
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    color: #2563eb;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.eyebrow-pill i {
    font-size: .8rem;
}

.dash-hero h2 {
    margin: 0;
    color: #0f2b52;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -.055em;
    line-height: 1.08;
}

.dash-hero p {
    max-width: 530px;
    margin: 11px 0 0;
    color: #5d7491;
    font-size: .92rem;
    line-height: 1.6;
}

.dash-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 21px;
}

.hero-metric-card {
    position: relative;
    z-index: 1;
    flex: 0 0 218px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 20px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 20px 44px -30px rgba(15, 58, 120, .4);
    backdrop-filter: blur(12px);
}

.hero-metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #6b809a;
    font-size: .72rem;
    font-weight: 700;
}

.hero-metric-top i {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #eaf3ff;
    color: #2563eb;
}

.hero-metric-value {
    margin-top: 11px;
    color: var(--ink);
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -.05em;
    line-height: 1;
}

.hero-metric-caption {
    margin-top: 3px;
    color: #7a8da4;
    font-size: .75rem;
}

.hero-spark {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 34px;
    margin-top: 14px;
}

.hero-spark span {
    flex: 1;
    min-height: 5px;
    border-radius: 3px;
    background: linear-gradient(180deg, #7dd3fc, #2563eb);
    opacity: .85;
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.stat-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 2px;
}

.stat-grid > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
    flex: none;
}

.stat-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    padding: 20px;
    border: 1px solid #e4edf9;
    border-radius: 22px;
    background: linear-gradient(160deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}

.stat-card::after {
    content: "";
    position: absolute;
    top: -46px;
    right: -46px;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, .07), transparent 70%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px -34px rgba(15, 58, 120, .4);
}

.stat-top {
    position: relative;
    z-index: 1;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.12rem;
}

.stat-icon.indigo {
    background: linear-gradient(145deg, #eaf2ff, #dbeafe);
    color: #1d4ed8;
}

.stat-icon.teal {
    background: linear-gradient(145deg, #e7fbf8, #ccfbf1);
    color: #0f766e;
}

.stat-icon.amber {
    background: linear-gradient(145deg, #fff7e7, #fef3c7);
    color: #b45309;
}

.stat-icon.green {
    background: linear-gradient(145deg, #e9fbf3, #d1fae5);
    color: #047857;
}

.stat-trend {
    padding: 4px 9px;
    border: 1px solid #d9f2e5;
    background: #f0fdf7;
    color: #047857;
    font-size: .68rem;
    font-weight: 800;
}

.stat-trend.down {
    border-color: #f8dbe2;
    background: #fff5f7;
    color: #be123c;
}

.stat-value {
    position: relative;
    z-index: 1;
    margin-top: 15px;
    color: var(--ink);
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -.055em;
    line-height: 1;
}

.stat-label {
    position: relative;
    z-index: 1;
    margin-top: 5px;
    color: #6f8299;
    font-size: .8rem;
    line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Charts & breakdowns
   -------------------------------------------------------------------------- */

.chart {
    gap: 7px;
    height: 210px;
    padding: 18px 6px 0;
    border-bottom: 1px solid #e9f1fb;
    background-image: repeating-linear-gradient(
        to top,
        transparent 0,
        transparent 41px,
        rgba(226, 237, 250, .62) 41px,
        rgba(226, 237, 250, .62) 42px
    );
}

.chart-bar-wrap {
    gap: 8px;
}

.chart-bar {
    width: 100%;
    max-width: 30px;
    min-height: 5px;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #7dd3fc 0%, #3b82f6 46%, #1d4ed8 100%);
    box-shadow: 0 6px 14px -10px rgba(37, 99, 235, .55);
    opacity: .92;
}

.chart-bar-wrap:hover .chart-bar {
    opacity: 1;
    transform: translateY(-2px);
}

.chart-label {
    color: #8b9bb0;
    font-size: .61rem;
    font-weight: 600;
}

.chart-dense {
    gap: 3px;
}

.chart-dense .chart-bar {
    max-width: 22px;
    border-radius: 5px 5px 2px 2px;
}

.chart-dense .chart-label {
    font-size: .55rem;
}

.chart-short {
    height: 140px;
}

.trend-scroll {
    overflow-x: auto;
    margin: 2px -4px 0;
    padding: 0 4px 2px;
    -webkit-overflow-scrolling: touch;
}

.trend-chart {
    display: block;
    width: 100%;
    min-width: 560px;
    height: auto;
}

.trend-grid {
    stroke: #e9f1fb;
    stroke-width: 1;
}

.trend-axis {
    fill: var(--muted-2);
    font-family: var(--font);
    font-size: 10px;
    font-weight: 600;
}

.trend-line {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trend-point {
    stroke: #fff;
    stroke-width: 2;
}

.trend-hit {
    fill: transparent;
}

.trend-hit:hover {
    fill: rgba(37, 99, 235, .05);
}

.trend-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 10px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 500;
}

.trend-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trend-legend i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.breakdown-row {
    gap: 10px;
    padding: 9px 0;
    font-size: .83rem;
}

.breakdown-label {
    flex-basis: 96px;
    color: #455d7a;
    font-weight: 600;
}

.breakdown-bar {
    height: 7px;
    background: #edf4fc;
}

.breakdown-bar > span {
    background: linear-gradient(90deg, #7dd3fc, #2563eb);
}

.breakdown-row strong {
    width: 32px;
    color: var(--ink);
    font-weight: 800;
}

.source-dot {
    background: #93c5fd;
}

/* --------------------------------------------------------------------------
   Simple lists
   -------------------------------------------------------------------------- */

.simple-list-row {
    gap: 11px;
    padding: 11px 0;
    border-color: #eef4fb;
}

.simple-list-row:hover {
    color: var(--brand);
}

.simple-list-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #eff6ff;
    color: #2563eb;
}

.simple-list-row strong {
    color: var(--ink);
    font-size: .85rem;
    font-weight: 700;
}

.simple-list-row small {
    margin-top: 1px;
    color: #7f91a8;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-clean {
    --bs-table-hover-bg: #f7fbff;
    font-size: .865rem;
}

.table-clean thead th {
    padding: 12px 17px;
    border-bottom: 1px solid #e5eef9;
    background: #f8fbff;
    color: #8092a9;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .085em;
}

.table-clean tbody td {
    padding: 14px 17px;
    border-bottom: 1px solid #eef4fb;
    color: #334a66;
}

.table-clean tbody tr:last-child td {
    border-bottom: 0;
}

.table-clean tbody tr:hover {
    background: #f8fbff;
}

.lead-cell {
    gap: 11px;
    min-width: 180px;
}

.lead-cell strong {
    color: var(--ink);
    font-size: .86rem;
    font-weight: 700;
}

.lead-cell small {
    margin-top: 2px;
    color: #7d8fa6;
    font-size: .74rem;
}

.avatar {
    width: 40px;
    height: 40px;
    font-size: .78rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
}

.avatar-sm {
    width: 34px;
    height: 34px;
    font-size: .7rem;
}

.badge {
    padding: .38em .68em;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .01em;
}

.badge-soft-primary { background: #eaf2ff; color: #1d4ed8; }
.badge-soft-secondary { background: #eff3f9; color: #526581; }
.badge-soft-info { background: #e8f7ff; color: #0369a1; }
.badge-soft-success { background: #e9fbf3; color: #047857; }
.badge-soft-danger { background: #fff0f3; color: #be123c; }
.badge-soft-dark { background: #eef2f7; color: #40536e; }

/* Mobile lead cards */
.lead-mobile-list {
    display: grid;
    gap: 10px;
    padding: 0 16px 6px;
}

.lead-mobile-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e6effa;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 26px -24px rgba(15, 42, 85, .4);
}

.lead-mobile-card:hover {
    color: inherit;
    border-color: #cfe2f8;
    background: #fbfdff;
}

.lead-mobile-main {
    flex: 1 1 auto;
    min-width: 0;
}

.lead-mobile-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.lead-mobile-main strong {
    display: block;
    color: var(--ink);
    font-size: .92rem;
    font-weight: 750;
    line-height: 1.3;
}

.lead-mobile-main small {
    display: block;
    margin-top: 3px;
    color: #71859d;
    font-size: .76rem;
    overflow-wrap: anywhere;
}

.lead-mobile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin-top: 9px;
    color: #8698ae;
    font-size: .69rem;
    font-weight: 600;
}

.lead-mobile-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.lead-mobile-arrow {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin-top: 3px;
    border-radius: 9px;
    background: #f1f7ff;
    color: #2563eb;
    font-size: .8rem;
}

/* Tables that become labelled cards on phones. */
@media (max-width: 767.98px) {
    .table-stack thead {
        display: none;
    }

    .table-stack,
    .table-stack tbody,
    .table-stack tr,
    .table-stack td {
        display: block;
        width: 100%;
    }

    .table-stack tbody {
        padding: 6px 12px 12px;
    }

    .table-stack tbody tr {
        margin-top: 9px;
        padding: 12px 13px;
        border: 1px solid #e6effa;
        border-radius: 14px;
        background: #fff;
    }

    .table-stack tbody tr:hover {
        background: #fff;
    }

    .table-stack tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 5px 0;
        border: 0;
        text-align: left !important;
    }

    .table-stack tbody td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: #8798ad;
        font-size: .66rem;
        font-weight: 800;
        letter-spacing: .055em;
        text-transform: uppercase;
    }

    .table-stack tbody td:first-child {
        display: block;
        margin-bottom: 4px;
        padding: 0 0 8px;
        border-bottom: 1px solid #eef4fb;
    }

    .table-stack tbody td:first-child::before {
        display: none;
    }

    .table-stack tbody td:last-child:empty {
        display: none;
    }

    .table-stack .lead-cell {
        min-width: 0;
    }

    .table-stack .breakdown-bar {
        max-width: 150px;
    }
}

/* --------------------------------------------------------------------------
   Status tabs
   -------------------------------------------------------------------------- */

.status-tabs {
    gap: 7px;
    padding-bottom: 3px;
    margin-bottom: 16px;
    scrollbar-width: none;
}

.status-tabs::-webkit-scrollbar {
    display: none;
}

.status-tab {
    min-height: 39px;
    padding: 8px 13px;
    border: 1px solid #e0eaf7;
    border-radius: 999px;
    background: #fff;
    color: #526984;
    font-size: .79rem;
    font-weight: 700;
    box-shadow: 0 6px 16px -16px rgba(15, 42, 85, .4);
}

.status-tab span {
    padding: 1px 7px;
    background: #f1f5fb;
    color: #70839b;
    font-size: .66rem;
    font-weight: 800;
}

.status-tab:hover {
    border-color: #bfd8f5;
    color: #1d4ed8;
}

.status-tab.active {
    border-color: transparent;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    box-shadow: 0 10px 20px -12px rgba(37, 99, 235, .7);
}

.status-tab.active span {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-label {
    margin-bottom: 6px;
    color: #344b67;
    font-size: .8rem;
    font-weight: 750;
    letter-spacing: -.005em;
}

.req {
    color: var(--rose);
}

.form-control,
.form-select {
    min-height: 46px;
    padding: .62rem .82rem;
    border: 1px solid #dce7f5;
    border-radius: 12px;
    background-color: #fff;
    color: var(--text);
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(15, 42, 85, .02);
}

.form-select {
    padding-right: 2.15rem;
    text-overflow: ellipsis;
}

.form-control::placeholder {
    color: #a0aec0;
    font-weight: 500;
}

.form-control:focus,
.form-select:focus {
    border-color: #78aaf7;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #f11d48;
    background-image: none;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, .08);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #e11d48;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, .13);
}

.invalid-feedback {
    margin-top: 5px;
    color: #be123c;
    font-size: .76rem;
    font-weight: 600;
}

.form-text {
    margin-top: 5px;
    color: #8092a8;
    font-size: .74rem;
    line-height: 1.45;
}

.form-check-input {
    width: 1.08em;
    height: 1.08em;
    margin-top: .16em;
    border-color: #c5d5e8;
    box-shadow: none;
}

.form-check-input:checked {
    background-color: var(--brand);
    border-color: var(--brand);
}

.form-check-input:focus {
    border-color: #78aaf7;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.form-check-label {
    color: #425a76;
    font-size: .84rem;
    font-weight: 600;
}

.form-switch .form-check-input {
    width: 2.5em;
    height: 1.35em;
    margin-top: .1em;
    cursor: pointer;
}

.form-switch .form-check-input:checked {
    background-color: var(--brand);
    border-color: var(--brand);
}

.input-icon > i {
    left: 14px;
    color: #8ba0b9;
}

.input-icon .form-control {
    padding-left: 39px;
}

.soft-divider {
    margin: 20px 0;
    border-color: #edf4fb;
}

/* --------------------------------------------------------------------------
   Detail / notes / history
   -------------------------------------------------------------------------- */

.meta-label {
    color: #8798ad;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .085em;
}

.meta-value {
    margin-top: 4px;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.55;
}

.lead-message {
    margin-top: 8px;
    padding: 13px 15px;
    border: 1px solid #e8f0fa;
    border-radius: 12px;
    background: #f8fbff;
    color: #3b526e;
    font-size: .87rem;
    line-height: 1.65;
}

.detail-row {
    padding: 9px 0;
    border-bottom-color: #edf3fb;
    font-size: .81rem;
}

.detail-row dt {
    color: #8192a8;
    font-weight: 600;
}

.detail-row dd {
    color: #253d5b;
    font-weight: 600;
}

.attachment {
    padding: 10px 12px;
    border-color: #e5eef9;
    border-radius: 11px;
}

.attachment:hover {
    border-color: #c9def7;
    background: #f8fbff;
}

.attachment-icon {
    background: #eff6ff;
    color: #2563eb;
}

.note-text {
    color: #3f5672;
}

.history-icon {
    background: #eff6ff;
    color: #2563eb;
}

/* --------------------------------------------------------------------------
   Alerts / pagination / empty states
   -------------------------------------------------------------------------- */

.app-alert {
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: .85rem;
    font-weight: 600;
    box-shadow: 0 10px 24px -22px rgba(15, 42, 85, .4);
}

.alert-success {
    border-color: #c8f1de;
    background: linear-gradient(135deg, #ecfdf5, #f4fffa);
    color: #065f46;
}

.alert-danger {
    border-color: #f8d3dc;
    background: linear-gradient(135deg, #fff1f4, #fff8f9);
    color: #9f1239;
}

.alert-warning {
    border-color: #fae3b8;
    background: #fffaef;
    color: #92400e;
}

.pagination .page-link {
    min-width: 34px;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    margin: 0 2px;
    border-radius: 9px;
    color: #526984;
    font-weight: 700;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
}

.empty-state {
    padding: 56px 24px;
}

.empty-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    border-radius: 18px;
    background: linear-gradient(145deg, #eaf3ff, #dbeafe);
    color: #2563eb;
    font-size: 1.45rem;
}

.empty-state h4 {
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 800;
}

.empty-state p {
    color: #71859d;
    font-size: .86rem;
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Capture
   -------------------------------------------------------------------------- */

.capture-page .mobile-tabbar {
    display: none !important;
}

.capture-form .panel {
    margin-bottom: 16px;
}

.capture-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.capture-step {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid #d8e7fb;
    border-radius: 10px;
    background: #f1f7ff;
    color: #2563eb;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .03em;
}

.capture-section-head h3 {
    margin-top: 1px;
}

.capture-type {
    gap: 10px;
    padding: 2px;
}

.capture-type label {
    min-height: 92px;
    padding: 15px 16px;
    border: 1px solid #dfeaf8;
    border-radius: 16px;
    background: #fbfdff;
}

.capture-type label strong {
    font-size: .95rem;
    font-weight: 800;
}

.capture-type label small {
    font-size: .73rem;
    line-height: 1.35;
}

.capture-type input:checked + label {
    border-color: #7db0f5;
    background: linear-gradient(145deg, #eef6ff, #f8fcff);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08), 0 12px 24px -22px rgba(37, 99, 235, .55);
}

.capture-type input:focus-visible + label {
    outline: 3px solid rgba(37, 99, 235, .45);
    outline-offset: 2px;
}

.capture-type-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 5px;
    border-radius: 10px;
    background: #eef5ff;
    color: #2563eb;
}

.capture-type input:checked + label .capture-type-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
}

.capture-page .form-control,
.capture-page .form-select {
    min-height: 50px;
    font-size: 1rem;
}

.capture-page .form-label {
    font-size: .82rem;
}

.capture-page .form-text {
    font-size: .75rem;
}

.capture-aside {
    position: sticky;
    top: 96px;
    align-self: flex-start;
}

.staff-strip {
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid #e1ecfa;
    border-radius: 14px;
    background: linear-gradient(145deg, #f8fbff, #f2f8ff);
}

.staff-strip strong {
    color: var(--ink);
    font-size: .9rem;
    font-weight: 750;
}

.staff-strip small {
    color: #7f92a9;
    font-size: .74rem;
}

.whatsapp-note {
    gap: 12px;
    padding: 14px;
    border: 1px solid #c9efdb;
    border-radius: 14px;
    background: linear-gradient(145deg, #f0fdf5, #f8fffb);
}

.whatsapp-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #d9fbe7;
    color: #15803d;
}

.whatsapp-note strong {
    color: #14532d;
    font-size: .84rem;
    font-weight: 800;
}

.whatsapp-note p {
    color: #2f6b49;
    font-size: .8rem;
    line-height: 1.5;
}

.whatsapp-note small {
    color: #61836e;
}

.capture-submit-row .btn {
    min-height: 52px;
}

.capture-mobile-bar {
    display: none;
}

.capture-days {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.capture-days .form-check {
    margin: 0;
}

.capture-days .form-check-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.capture-days .form-check-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #dfeaf8;
    border-radius: 11px;
    background: #fff;
    color: #526984;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}

.capture-days .form-check-input:checked + .form-check-label {
    border-color: #7db0f5;
    background: #eaf3ff;
    color: #1d4ed8;
    box-shadow: inset 0 0 0 1px #cfe2fb;
}

.capture-days .form-check-input:focus-visible + .form-check-label {
    outline: 3px solid rgba(37, 99, 235, .35);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Auth
   -------------------------------------------------------------------------- */

.auth-body {
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(56, 189, 248, .18), transparent 62%),
        radial-gradient(700px 480px at 100% 100%, rgba(37, 99, 235, .12), transparent 60%),
        #f4f8fe;
}

.auth-shell {
    min-height: 100vh;
}

.auth-aside {
    position: relative;
    overflow: hidden;
    padding: 48px;
    background:
        radial-gradient(500px 400px at 90% 8%, rgba(125, 211, 252, .35), transparent 65%),
        radial-gradient(420px 380px at 12% 92%, rgba(59, 130, 246, .5), transparent 68%),
        linear-gradient(145deg, #0b2a55 0%, #174b8f 50%, #0e7490 100%);
}

.auth-aside::before,
.auth-aside::after {
    border-color: rgba(255, 255, 255, .12);
}

.auth-aside h1 {
    font-weight: 800;
    letter-spacing: -.055em;
}

.auth-aside .eyebrow {
    color: #bfe3ff;
}

.auth-aside-copy p {
    line-height: 1.65;
}

.auth-points li {
    color: #eaf5ff;
}

.auth-points i {
    background: rgba(255, 255, 255, .14);
    color: #bae6fd;
}

.auth-main {
    padding: 40px 24px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 38px;
    border: 1px solid #e4edf9;
    border-radius: 26px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 36px 80px -46px rgba(15, 58, 120, .4);
}

.auth-head h1 {
    color: var(--ink);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -.045em;
}

.auth-head p {
    color: #7488a0;
}

.auth-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: linear-gradient(145deg, #eaf3ff, #dbeafe);
    color: #1d4ed8;
}

.auth-form .form-control {
    min-height: 50px;
    font-size: .95rem;
}

.auth-hint {
    color: #8798ad;
    line-height: 1.55;
}

.auth-card-wide {
    max-width: 570px;
}

.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 11px;
    margin-bottom: 22px;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.auth-mobile-brand:hover {
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   Public surfaces (brand alignment)
   -------------------------------------------------------------------------- */

.public-nav {
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid #e5eef9;
    backdrop-filter: blur(14px);
}

.public-brand {
    color: var(--ink);
}

.public-brand:hover {
    color: var(--ink);
}

.hero {
    background:
        radial-gradient(700px 420px at 80% 0%, rgba(56, 189, 248, .17), transparent 62%),
        radial-gradient(520px 360px at 5% 80%, rgba(37, 99, 235, .08), transparent 62%),
        #f6faff;
}

.hero-title {
    color: #0f2b52;
    font-weight: 800;
    letter-spacing: -.055em;
}

.pill {
    border-color: #d8e7fb;
    background: rgba(255, 255, 255, .8);
    color: #2563eb;
    font-weight: 700;
}

.feature-card,
.stack-card,
.cta-panel {
    border-color: #e4edf9;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    background: #eff6ff;
    color: #2563eb;
}

.form-card {
    border-color: #e4edf9;
    border-radius: 24px;
    box-shadow: 0 30px 70px -44px rgba(15, 58, 120, .4);
}

.form-brand {
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1199.98px) {
    .capture-aside {
        position: static;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        width: 286px;
        padding: 16px 14px;
        border-right: 0;
        box-shadow: 24px 0 70px -30px rgba(15, 42, 85, .45);
    }

    .sidebar-close {
        display: inline-flex;
    }

    .app-main {
        margin-left: 0;
    }

    .topbar {
        min-height: 66px;
        padding: 11px 18px;
    }

    .app-content {
        padding: 22px 18px 100px;
    }

    .sidebar-backdrop {
        background: rgba(9, 27, 51, .36);
        backdrop-filter: blur(3px);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .mobile-tabbar {
        position: fixed;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        left: 12px;
        z-index: 1035;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        padding: 7px;
        border: 1px solid rgba(220, 233, 248, .95);
        border-radius: 18px;
        background: rgba(255, 255, 255, .94);
        box-shadow: 0 22px 50px -22px rgba(15, 42, 85, .44);
        backdrop-filter: blur(18px);
    }

    .mobile-tabbar-link {
        display: flex;
        min-height: 52px;
        align-items: center;
        justify-content: center;
        gap: 4px;
        flex-direction: column;
        border-radius: 12px;
        color: #7588a0;
        font-size: .65rem;
        font-weight: 700;
        text-decoration: none;
    }

    .mobile-tabbar-link i {
        font-size: 1.08rem;
        line-height: 1;
    }

    .mobile-tabbar-link.active,
    .mobile-tabbar-link:hover {
        background: #eef6ff;
        color: #1d4ed8;
    }

    .mobile-tabbar-link.active i {
        color: #1d4ed8;
    }

    .mobile-tabbar-link--capture i {
        color: #2563eb;
    }

    .mobile-tabbar-link--capture.active {
        background: linear-gradient(135deg, #eaf3ff, #f5faff);
        box-shadow: inset 0 0 0 1px #d6e6fb;
    }

    .mobile-tabbar-menu {
        border: 0;
        background: transparent;
        font-family: var(--font);
    }

    .dash-hero {
        padding: 28px;
    }

    .dash-hero h2 {
        font-size: clamp(1.7rem, 5vw, 2.35rem);
    }

    .hero-metric-card {
        flex-basis: 190px;
    }

    .panel {
        padding: 20px;
        border-radius: 20px;
    }

    .panel-head-pad {
        padding: 20px 20px 0;
    }

    .panel-foot {
        padding: 14px 20px 18px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lead-table-desktop {
        display: none !important;
    }

    .lead-mobile-list {
        display: grid;
    }
}

@media (min-width: 992px) {
    .lead-mobile-list {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .auth-mobile-brand {
        display: flex;
    }
}

@media (max-width: 767.98px) {
    .topbar-title p {
        display: none;
    }

    .page-head {
        align-items: flex-start;
        margin-bottom: 18px;
    }

    .page-head > .d-flex {
        width: 100%;
    }

    .page-head > .d-flex .btn {
        flex: 1 1 auto;
    }

    .dash-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 24px;
        border-radius: 22px;
    }

    .dash-hero p {
        font-size: .86rem;
    }

    .dash-hero-actions .btn {
        flex: 1 1 auto;
    }

    .hero-metric-card {
        display: flex;
        flex-basis: auto;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 14px 16px;
    }

    .hero-metric-copy {
        min-width: 0;
    }

    .hero-metric-value {
        margin-top: 2px;
        font-size: 1.7rem;
    }

    .hero-spark {
        width: 86px;
        height: 28px;
        margin-top: 0;
        flex: 0 0 auto;
    }

    .stat-card {
        padding: 16px;
        border-radius: 18px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 1rem;
    }

    .stat-value {
        margin-top: 12px;
        font-size: 1.72rem;
    }

    .stat-label {
        font-size: .74rem;
    }

    .stat-trend {
        font-size: .62rem;
        padding: 3px 7px;
    }

    .chart {
        height: 170px;
        gap: 4px;
        padding-top: 12px;
    }

    .chart-bar {
        max-width: 100%;
        border-radius: 5px 5px 2px 2px;
    }

    .chart-label {
        font-size: .55rem;
    }

    .chart-dense .chart-label {
        font-size: .48rem;
    }

    .breakdown-label {
        flex-basis: 82px;
    }

    .panel-filter {
        padding: 16px;
    }

    .panel-filter .form-label {
        font-size: .72rem;
    }

    .status-tabs {
        margin-right: -18px;
        padding-right: 18px;
    }

    .lead-mobile-list {
        padding: 0 12px 4px;
    }

    .capture-type label {
        min-height: 84px;
        padding: 13px;
    }

    .capture-type label small {
        display: none;
    }

    .capture-type-icon {
        width: 32px;
        height: 32px;
    }

    .capture-page .app-content {
        padding-bottom: 120px;
    }

    .capture-mobile-bar {
        position: fixed;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        left: 10px;
        z-index: 1036;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 9px 10px 9px 14px;
        border: 1px solid rgba(215, 231, 250, .95);
        border-radius: 18px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 22px 50px -22px rgba(15, 42, 85, .46);
        backdrop-filter: blur(18px);
    }

    .capture-mobile-copy {
        flex: 1 1 auto;
        min-width: 0;
    }

    .capture-mobile-copy strong {
        display: block;
        color: var(--ink);
        font-size: .8rem;
        font-weight: 800;
    }

    .capture-mobile-copy small {
        display: block;
        color: #7c8fa7;
        font-size: .67rem;
    }

    .capture-mobile-bar .btn {
        flex: 0 0 auto;
        min-height: 46px;
        padding-right: 16px;
        padding-left: 16px;
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: 22px;
    }

    .auth-mobile-brand {
        display: flex;
    }

    .capture-aside .simple-list-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 575.98px) {
    .app-content {
        padding: 18px 14px 100px;
    }

    .topbar {
        padding: 10px 14px;
    }

    .topbar-title h1 {
        font-size: .95rem;
    }

    .page-title {
        font-size: 1.55rem;
    }

    .page-sub {
        font-size: .83rem;
    }

    .panel {
        padding: 17px;
        border-radius: 18px;
    }

    .panel-head {
        margin-bottom: 14px;
    }

    .panel-head h3 {
        font-size: .95rem;
    }

    .panel-head-pad {
        padding: 17px 17px 0;
    }

    .panel-foot {
        padding: 12px 16px 15px;
    }

    .stat-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 1.55rem;
    }

    .stat-trend {
        max-width: 88px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dash-hero {
        padding: 21px;
    }

    .dash-hero-actions {
        gap: 7px;
    }

    .dash-hero-actions .btn {
        min-height: 42px;
        font-size: .78rem;
    }

    .hero-metric-card {
        gap: 10px;
    }

    .page-head > .d-flex {
        gap: 7px !important;
    }

    .page-head > .d-flex .btn {
        font-size: .76rem;
        padding-right: .7rem;
        padding-left: .7rem;
    }

    .status-tabs {
        margin-right: -14px;
        padding-right: 14px;
    }

    .status-tab {
        min-height: 37px;
        padding: 7px 11px;
        font-size: .74rem;
    }

    .breakdown-label {
        flex-basis: 74px;
        font-size: .78rem;
    }

    .breakdown-row strong {
        font-size: .74rem;
    }

    .lead-mobile-list {
        padding: 0 10px 2px;
    }

    .lead-mobile-card {
        padding: 12px;
    }

    .table-stack tbody {
        padding-right: 8px;
        padding-left: 8px;
    }

    .lead-mobile-main strong {
        font-size: .87rem;
    }

    .lead-mobile-meta {
        gap: 4px 9px;
        font-size: .65rem;
    }

    .capture-type {
        grid-template-columns: 1fr 1fr;
    }

    .capture-type label {
        min-height: 80px;
        padding: 11px;
        gap: 2px;
    }

    .capture-type label strong {
        font-size: .87rem;
    }

    .capture-type-icon {
        width: 30px;
        height: 30px;
        font-size: .9rem;
    }

    .capture-page .app-content {
        padding-bottom: 112px;
    }

    .capture-days .form-check-label {
        min-width: 52px;
        min-height: 40px;
        padding: 7px 9px;
    }

    .auth-card {
        padding: 25px 19px;
    }

    .auth-head h1 {
        font-size: 1.55rem;
    }
}

@media (max-width: 380px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .stat-trend {
        max-width: none;
    }

    .topbar-actions .avatar {
        display: none !important;
    }
}

/* Filters: four per row on laptop widths so selects and date inputs are not clipped. */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .panel-filter .col-lg-2 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Lead table: tighter cells at the narrow end of the desktop range. */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .lead-table-desktop .table-clean thead th,
    .lead-table-desktop .table-clean tbody td {
        padding-right: 10px;
        padding-left: 10px;
    }
}

/* Attribution strip: drop the badge to its own line rather than wrapping "role · @user". */
@media (max-width: 575.98px) {
    .staff-strip {
        flex-wrap: wrap;
    }

    .staff-strip .chip {
        margin-left: 52px !important;
    }
}

/* Lead list: card layout until the table has room for its columns. */
@media (max-width: 1199.98px) {
    .lead-table-desktop {
        display: none !important;
    }

    .lead-mobile-list {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    }
}

@media (min-width: 1200px) {
    .lead-mobile-list {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn:hover,
    .stat-card:hover,
    .chart-bar-wrap:hover .chart-bar {
        transform: none;
    }
}
