:root {
    --ink: #10233f;
    --ink-2: #263b59;
    --muted: #718096;
    --muted-2: #96a2b4;
    --line: #e2e9f2;
    --line-strong: #d2ddeb;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --canvas: #f1f5fa;
    --blue: #275dff;
    --blue-deep: #1747d1;
    --blue-soft: #eaf0ff;
    --teal: #0e9f83;
    --teal-soft: #e4f8f2;
    --orange: #ef7b32;
    --orange-soft: #fff1e7;
    --red: #d74755;
    --red-soft: #ffedef;
    --yellow: #b87a11;
    --yellow-soft: #fff5d9;
    --radius-lg: 22px;
    --radius: 16px;
    --radius-sm: 11px;
    --shadow: 0 18px 60px rgba(23, 49, 82, .08);
    --shadow-soft: 0 8px 28px rgba(23, 49, 82, .06);
    --sidebar-width: 238px;
    --mobile-nav-height: 68px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--canvas);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: var(--blue);
}

img {
    max-width: 100%;
    display: block;
}

[hidden] {
    display: none !important;
}

.brand-mark {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(145deg, #1d50ea, #3f86ff);
    box-shadow: 0 10px 24px rgba(39, 93, 255, .28);
    font-size: 20px;
    font-weight: 900;
}

.brand-mark.small {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 10px;
    font-size: 16px;
    box-shadow: none;
}

.eyebrow {
    display: inline-block;
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
}

.eyebrow.light {
    color: #93b1ff;
}

/* Login */
.login-page {
    background: #eef3f9;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(440px, 1.1fr) minmax(440px, .9fr);
}

.login-story {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 5vw, 74px);
    background:
        radial-gradient(circle at 86% 20%, rgba(59, 124, 255, .28), transparent 28%),
        radial-gradient(circle at 12% 88%, rgba(36, 180, 160, .18), transparent 32%),
        linear-gradient(145deg, #0d1d35 0%, #10233f 54%, #153159 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 20px;
    font-weight: 800;
    position: relative;
    z-index: 2;
}

.story-copy {
    position: relative;
    z-index: 2;
    max-width: 650px;
    margin: 9vh 0 6vh;
}

.story-copy h1 {
    margin: 20px 0 24px;
    font-size: clamp(40px, 4.6vw, 72px);
    line-height: 1.12;
    letter-spacing: -.045em;
    font-weight: 800;
}

.story-copy p {
    max-width: 550px;
    margin: 0;
    color: rgba(225, 235, 251, .76);
    font-size: 16px;
    line-height: 1.9;
}

.story-metrics {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 670px;
}

.story-metrics div {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 16px;
    background: rgba(255, 255, 255, .045);
    backdrop-filter: blur(10px);
}

.story-metrics strong {
    font-size: 23px;
    color: #96b4ff;
    font-weight: 700;
}

.story-metrics span {
    font-size: 13px;
    color: rgba(255, 255, 255, .75);
}

.story-orbit {
    position: absolute;
    border: 1px solid rgba(119, 160, 255, .15);
    border-radius: 50%;
    pointer-events: none;
}

.orbit-one {
    width: 600px;
    height: 600px;
    right: -290px;
    top: -190px;
}

.orbit-two {
    width: 360px;
    height: 360px;
    right: -130px;
    top: -45px;
}

.login-panel {
    display: grid;
    place-items: center;
    padding: 36px;
    background:
        linear-gradient(rgba(255, 255, 255, .86), rgba(255, 255, 255, .86)),
        radial-gradient(circle at 100% 0%, #d9e7ff, transparent 40%);
}

.login-form-wrap {
    width: min(390px, 100%);
}

.login-form-wrap h2 {
    margin: 13px 0 8px;
    font-size: 32px;
    letter-spacing: -.035em;
}

.login-subtitle {
    margin: 0 0 34px;
    color: var(--muted);
    font-size: 14px;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-submit {
    height: 51px;
    margin-top: 3px;
}

.login-help {
    margin: 24px 0 0;
    color: var(--muted-2);
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}

.field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.field > span:first-child,
.field-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 64px;
}

.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    padding: 8px;
    cursor: pointer;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    background: #fbfdff;
    border-radius: 12px;
    padding: 11px 13px;
    min-height: 44px;
    color: var(--ink);
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.field textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.65;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(39, 93, 255, .09);
}

.field small,
.form-hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.form-error,
.inline-alert {
    border-radius: 11px;
    padding: 11px 13px;
    background: var(--red-soft);
    color: #a52b38;
    font-size: 13px;
    line-height: 1.55;
}

.inline-alert.warning {
    background: var(--yellow-soft);
    color: #896017;
}

.inline-alert.success {
    background: var(--teal-soft);
    color: #08765f;
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 17px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .15s, box-shadow .15s, background .15s;
}

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

.button:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.button.primary {
    color: #fff;
    background: linear-gradient(135deg, #2559ea, #3f83ff);
    box-shadow: 0 9px 23px rgba(39, 93, 255, .22);
}

.button.secondary {
    color: var(--ink-2);
    background: #fff;
    border: 1px solid var(--line-strong);
    box-shadow: none;
}

.button.soft {
    color: var(--blue-deep);
    background: var(--blue-soft);
}

.button.danger-soft {
    color: var(--red);
    background: var(--red-soft);
}

.button.ghost {
    color: var(--muted);
    background: transparent;
}

.button.small {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 12px;
}

.button.icon-only {
    width: 42px;
    padding: 0;
}

.icon-button {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    color: var(--muted);
    position: relative;
}

.icon-button:hover {
    background: var(--surface-soft);
    color: var(--ink);
}

/* Application shell */
.app-page {
    background: var(--canvas);
}

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

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    z-index: 40;
    display: flex;
    flex-direction: column;
    padding: 25px 18px 20px;
    background: #fff;
    border-right: 1px solid var(--line);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px;
    color: var(--ink);
    text-decoration: none;
}

.sidebar-brand > span:last-child {
    display: grid;
    gap: 2px;
}

.sidebar-brand b {
    font-size: 17px;
    letter-spacing: -.02em;
}

.sidebar-brand small {
    color: var(--muted-2);
    font-size: 8px;
    letter-spacing: .15em;
    font-weight: 700;
}

.main-nav {
    display: grid;
    gap: 5px;
    margin-top: 38px;
}

.main-nav a,
.notify-shortcut {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 11px;
    color: #637288;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background .16s, color .16s;
}

.main-nav a:hover,
.notify-shortcut:hover {
    background: var(--surface-soft);
    color: var(--ink);
}

.main-nav a.active {
    color: var(--blue-deep);
    background: var(--blue-soft);
}

.main-nav a.active::before {
    content: "";
    position: absolute;
    left: -18px;
    width: 3px;
    height: 24px;
    border-radius: 0 3px 3px 0;
    background: var(--blue);
}

.nav-icon {
    width: 22px;
    font-size: 17px;
    display: inline-grid;
    place-items: center;
}

.sidebar-foot {
    margin-top: auto;
}

.notify-shortcut {
    width: 100%;
    margin-bottom: 14px;
}

.notify-shortcut b,
.notify-button b {
    margin-left: auto;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 7px 3px;
    border-top: 1px solid var(--line);
}

.avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--blue-deep);
    background: linear-gradient(135deg, #e1eaff, #edf3ff);
    font-size: 13px;
    font-weight: 800;
}

.user-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.user-copy b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.user-copy small {
    color: var(--muted-2);
    font-size: 10px;
}

.sidebar-user .icon-button {
    margin-left: auto;
}

.app-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.mobile-header,
.mobile-nav,
.app-backdrop {
    display: none;
}

.content {
    width: min(1560px, 100%);
    margin: 0 auto;
    padding: 34px clamp(24px, 3vw, 48px) 50px;
}

.page-loader {
    min-height: 55vh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 13px;
}

.page-loader span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid #dce5f2;
    border-top-color: var(--blue);
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Page header */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 25px;
}

.page-head h1 {
    margin: 6px 0 6px;
    font-size: clamp(27px, 3vw, 36px);
    letter-spacing: -.045em;
    line-height: 1.18;
}

.page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

/* Dashboard */
.dashboard-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) minmax(390px, 1fr);
    gap: 28px;
    padding: 29px 32px;
    margin-bottom: 20px;
    color: #fff;
    background:
        radial-gradient(circle at 82% 17%, rgba(78, 140, 255, .35), transparent 28%),
        linear-gradient(135deg, #10233f, #173b6b);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 55px rgba(15, 35, 65, .16);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    right: -100px;
    bottom: -210px;
    width: 380px;
    height: 380px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 50%;
}

.hero-copy {
    position: relative;
    z-index: 1;
    align-self: center;
}

.hero-copy .eyebrow {
    color: #8faefa;
}

.hero-copy h2 {
    margin: 11px 0 10px;
    font-size: clamp(24px, 2.4vw, 33px);
    line-height: 1.25;
    letter-spacing: -.03em;
}

.hero-copy p {
    margin: 0;
    max-width: 500px;
    color: rgba(230, 238, 252, .7);
    font-size: 13px;
    line-height: 1.75;
}

.hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: center;
}

.hero-stat {
    padding: 16px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 15px;
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(8px);
}

.hero-stat span {
    color: rgba(229, 237, 251, .67);
    font-size: 11px;
}

.hero-stat strong {
    font-size: clamp(25px, 2.7vw, 38px);
    line-height: 1;
    letter-spacing: -.04em;
}

.hero-stat small {
    color: #9eb6e5;
    font-size: 10px;
}

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

.stat-card {
    position: relative;
    min-height: 126px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.stat-card .stat-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.stat-card .stat-value {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin: 12px 0 8px;
    font-size: 31px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.stat-card .stat-value small {
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 600;
}

.stat-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
}

.stat-icon {
    position: absolute;
    right: 17px;
    top: 16px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 16px;
}

.stat-icon.teal {
    color: var(--teal);
    background: var(--teal-soft);
}

.stat-icon.orange {
    color: var(--orange);
    background: var(--orange-soft);
}

.stat-icon.red {
    color: var(--red);
    background: var(--red-soft);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr);
    gap: 18px;
    align-items: start;
}

.stack {
    display: grid;
    gap: 18px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.panel-head {
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 21px;
    border-bottom: 1px solid var(--line);
}

.panel-head h3 {
    margin: 0;
    font-size: 15px;
    letter-spacing: -.01em;
}

.panel-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.panel-body {
    padding: 20px;
}

.panel-body.tight {
    padding: 12px;
}

.panel-body.flush {
    padding: 0;
}

.panel-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    text-decoration: none;
    font-weight: 600;
}

.panel-link:hover {
    color: var(--blue);
}

.funnel {
    display: grid;
    gap: 12px;
}

.funnel-row {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 11px;
    font-size: 12px;
}

.funnel-row > span:first-child {
    color: var(--ink-2);
}

.funnel-row > b {
    text-align: right;
    font-size: 13px;
}

.bar-track {
    height: 8px;
    border-radius: 8px;
    background: #edf2f8;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2760ff, #5d94ff);
    min-width: 0;
    transition: width .5s ease;
}

.funnel-row:nth-child(2) .bar-fill { background: linear-gradient(90deg, #2d66fb, #6097ff); }
.funnel-row:nth-child(3) .bar-fill { background: linear-gradient(90deg, #178eaa, #46b8c9); }
.funnel-row:nth-child(4) .bar-fill { background: linear-gradient(90deg, #0e9f83, #46c0a7); }
.funnel-row:nth-child(5) .bar-fill { background: linear-gradient(90deg, #7a5ed7, #a58ce9); }

.twoline-chart {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px dashed var(--line);
}

.mini-metric {
    padding: 12px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.mini-metric span {
    color: var(--muted);
    font-size: 10px;
}

.mini-metric strong {
    display: block;
    margin-top: 5px;
    font-size: 20px;
    letter-spacing: -.03em;
}

.map-card {
    position: relative;
    min-height: 270px;
    background: #e9eff6;
}

.map-canvas {
    width: 100%;
    min-height: 270px;
}

.map-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    background:
        radial-gradient(circle at 25% 30%, rgba(61, 124, 255, .1), transparent 22%),
        radial-gradient(circle at 70% 70%, rgba(14, 159, 131, .1), transparent 25%),
        #f2f6fb;
}

.map-placeholder b {
    color: var(--ink-2);
    font-size: 14px;
}

.map-panel-wrap {
    position: relative;
}

.map-overlay {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 500;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    max-width: calc(100% - 28px);
}

.map-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    color: var(--ink-2);
    box-shadow: 0 5px 18px rgba(23, 49, 82, .13);
    font-size: 10px;
    backdrop-filter: blur(6px);
}

.map-pill i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
}

.warning-list,
.activity-list {
    display: grid;
}

.warning-item,
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: background .15s;
}

.warning-item:last-child,
.activity-item:last-child {
    border-bottom: 0;
}

.warning-item:hover,
.activity-item:hover {
    background: var(--surface-soft);
}

.warning-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 0 4px var(--orange-soft);
}

.warning-dot.danger {
    background: var(--red);
    box-shadow: 0 0 0 4px var(--red-soft);
}

.warning-copy,
.activity-copy {
    min-width: 0;
    flex: 1;
}

.warning-copy b,
.activity-copy b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.warning-copy span,
.activity-copy span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.warning-days {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 10px;
}

/* Filters and lists */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 17px;
}

.toolbar .field {
    min-width: 140px;
}

.toolbar .field input,
.toolbar .field select {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 12px;
    background: #fff;
}

.search-field {
    position: relative;
    flex: 1;
    min-width: 190px;
    max-width: 360px;
}

.search-field input {
    padding-left: 36px !important;
}

.search-field::before {
    content: "⌕";
    position: absolute;
    left: 13px;
    top: 10px;
    color: var(--muted-2);
    font-size: 17px;
    z-index: 1;
}

.segmented {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.segmented button {
    min-height: 31px;
    padding: 0 11px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
}

.segmented button.active {
    color: var(--blue-deep);
    background: var(--blue-soft);
    font-weight: 700;
}

.data-table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    padding: 11px 18px;
    background: var(--surface-soft);
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: .03em;
}

.data-table td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    vertical-align: middle;
}

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

.data-table tbody tr {
    transition: background .15s;
}

.data-table tbody tr.clickable {
    cursor: pointer;
}

.data-table tbody tr.clickable:hover {
    background: #fafcff;
}

.primary-cell {
    display: grid;
    gap: 4px;
}

.primary-cell b {
    font-size: 12px;
}

.primary-cell span {
    color: var(--muted);
    font-size: 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 23px;
    padding: 0 8px;
    border-radius: 20px;
    color: var(--muted);
    background: #f0f4f9;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.badge.no-dot::before {
    display: none;
}

.badge.blue { color: #2554c5; background: var(--blue-soft); }
.badge.teal { color: #087d66; background: var(--teal-soft); }
.badge.orange { color: #b16023; background: var(--orange-soft); }
.badge.red { color: #b63341; background: var(--red-soft); }
.badge.yellow { color: #92620f; background: var(--yellow-soft); }
.badge.purple { color: #6951b8; background: #f0ecff; }
.badge.gray { color: #617086; background: #eef2f7; }

.level-chip {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
}

.level-chip.A { color: #b62d3a; background: var(--red-soft); }
.level-chip.B { color: #a26519; background: var(--yellow-soft); }
.level-chip.C { color: #637289; background: #eef2f7; }

.row-actions {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.muted {
    color: var(--muted);
}

.danger-text {
    color: var(--red);
}

.card-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.entity-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 19px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform .16s, border-color .16s, box-shadow .16s;
}

.entity-card:hover {
    transform: translateY(-2px);
    border-color: #cbd8ea;
    box-shadow: 0 13px 35px rgba(23, 49, 82, .09);
}

.entity-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.entity-top h3 {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.entity-sub {
    margin: 5px 0 16px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.entity-facts {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--line);
}

.entity-facts div {
    display: grid;
    gap: 3px;
}

.entity-facts span {
    color: var(--muted-2);
    font-size: 9px;
}

.entity-facts b {
    font-size: 12px;
}

.entity-warning {
    color: var(--red);
    font-size: 10px;
    margin-top: 9px;
}

.empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    padding: 54px 20px;
}

.empty-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 13px;
    border-radius: 17px;
    color: #7f91a9;
    background: var(--surface-soft);
    font-size: 23px;
}

.empty-state h3 {
    margin: 0 0 7px;
    font-size: 14px;
}

.empty-state p {
    max-width: 350px;
    margin: 0 0 17px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
}

.pagination {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
}

/* Visit page */
.visit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
    gap: 18px;
    align-items: start;
}

.visit-card {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) auto;
    gap: 15px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    margin-bottom: 10px;
}

.visit-photo {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--surface-soft);
    cursor: pointer;
}

.visit-copy {
    min-width: 0;
}

.visit-copy h3 {
    margin: 3px 0 7px;
    font-size: 14px;
}

.visit-copy p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.visit-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--muted);
    font-size: 10px;
}

.visit-time {
    text-align: right;
    display: grid;
    align-content: space-between;
    justify-items: end;
}

.visit-time b {
    font-size: 17px;
}

.visit-time small {
    color: var(--muted);
    font-size: 10px;
}

.trail-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.trail-stat {
    padding: 13px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.trail-stat span {
    color: var(--muted);
    font-size: 10px;
}

.trail-stat b {
    display: block;
    margin-top: 5px;
    font-size: 18px;
}

.trail-list {
    display: grid;
    gap: 0;
}

.trail-step {
    display: grid;
    grid-template-columns: 17px minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 14px;
}

.trail-marker {
    position: relative;
    display: grid;
    justify-items: center;
}

.trail-marker::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 4px var(--blue-soft);
    z-index: 1;
}

.trail-marker::after {
    content: "";
    position: absolute;
    top: 13px;
    bottom: -3px;
    width: 1px;
    background: var(--line-strong);
}

.trail-step:last-child .trail-marker::after {
    display: none;
}

.trail-copy b {
    display: block;
    font-size: 11px;
}

.trail-copy span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

/* Modal */
.modal-root {
    position: relative;
    z-index: 1000;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 24, 43, .48);
    backdrop-filter: blur(3px);
    animation: fade-in .16s ease;
}

.modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(680px, calc(100vw - 32px));
    max-height: min(88vh, 900px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 22px;
    box-shadow: 0 40px 110px rgba(5, 20, 43, .28);
    overflow: hidden;
    animation: modal-in .2s ease;
}

.modal.wide {
    width: min(900px, calc(100vw - 32px));
}

.modal.narrow {
    width: min(480px, calc(100vw - 32px));
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--line);
}

.modal-head h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -.02em;
}

.modal-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--muted);
    cursor: pointer;
    font-size: 18px;
}

.modal-body {
    padding: 21px 22px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    background: #fbfcfe;
}

@keyframes modal-in {
    from { opacity: 0; transform: translate(-50%, -48%) scale(.985); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.form-section {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 3px 0 -2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.form-section::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.upload-box {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 60px;
    padding: 11px 13px;
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
}

.upload-box:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.upload-box input[type=file] {
    display: none;
}

.upload-icon {
    width: 33px;
    height: 33px;
    flex: 0 0 33px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #fff;
    color: var(--blue);
    border: 1px solid var(--line);
}

.upload-preview {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 13px;
    margin-top: 9px;
}

.location-state {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--blue-soft);
    color: #3153a0;
    font-size: 11px;
    line-height: 1.5;
}

.location-state.success {
    background: var(--teal-soft);
    color: #08745f;
}

.location-state.error {
    background: var(--red-soft);
    color: #a9303d;
}

.spinner-small {
    width: 13px;
    height: 13px;
    border: 2px solid rgba(49, 83, 160, .2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

/* Detail layouts */
.detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.detail-hero h3 {
    margin: 0 0 7px;
    font-size: 20px;
    letter-spacing: -.03em;
}

.detail-hero p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.detail-item {
    padding: 12px;
    border-radius: 11px;
    background: var(--surface-soft);
}

.detail-item span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    margin-bottom: 4px;
}

.detail-item b {
    display: block;
    font-size: 11px;
    word-break: break-word;
}

.detail-section {
    margin-top: 18px;
}

.detail-section h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 12px;
}

.timeline {
    display: grid;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 11px minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 14px;
}

.timeline-item::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: 3px;
    border-radius: 50%;
    background: var(--blue);
    z-index: 1;
}

.timeline-item::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 11px;
    bottom: 0;
    width: 1px;
    background: var(--line);
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-copy b {
    display: block;
    font-size: 11px;
}

.timeline-copy span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.6;
}

.file-list {
    display: grid;
    gap: 7px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink-2);
    text-decoration: none;
    font-size: 10px;
}

.file-item:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.file-icon {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
}

.file-item span:nth-child(2) {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item small {
    color: var(--muted);
    font-size: 9px;
}

.trainee-list {
    display: grid;
    gap: 7px;
}

.trainee-row {
    display: grid;
    grid-template-columns: minmax(120px, .8fr) minmax(100px, .7fr) minmax(110px, .8fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.trainee-name {
    display: grid;
    gap: 3px;
}

.trainee-name b {
    font-size: 11px;
}

.trainee-name span,
.trainee-source {
    color: var(--muted);
    font-size: 9px;
}

.trainee-actions {
    display: flex;
    gap: 5px;
}

/* Reports and notifications */
.report-card {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    margin-bottom: 12px;
}

.report-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 13px;
    margin-bottom: 13px;
}

.report-head h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.report-head p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.report-summary {
    margin: 0;
    padding: 13px;
    border-radius: 11px;
    background: var(--surface-soft);
    color: var(--ink-2);
    white-space: pre-line;
    font-size: 11px;
    line-height: 1.75;
    max-height: 170px;
    overflow: hidden;
    position: relative;
}

.report-extra {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 11px;
}

.report-note {
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.report-note span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    margin-bottom: 5px;
}

.report-note p {
    margin: 0;
    font-size: 11px;
    line-height: 1.65;
    white-space: pre-line;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 17px 19px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: 0;
}

.notification-item.unread {
    background: #f8faff;
}

.notification-type {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 15px;
}

.notification-type.danger {
    color: var(--red);
    background: var(--red-soft);
}

.notification-type.warning {
    color: var(--orange);
    background: var(--orange-soft);
}

.notification-copy {
    min-width: 0;
    flex: 1;
}

.notification-copy b {
    display: block;
    font-size: 12px;
}

.notification-copy p {
    margin: 5px 0 7px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
}

.notification-copy small {
    color: var(--muted-2);
    font-size: 9px;
}

.unread-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--blue);
}

/* Team */
.role-note {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 17px;
}

.role-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}

.role-card b {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
}

.role-card p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.65;
}

/* Toast */
.toast-root {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2000;
    display: grid;
    gap: 8px;
    pointer-events: none;
}

.toast {
    min-width: 240px;
    max-width: 380px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    background: #172a46;
    color: #fff;
    box-shadow: 0 15px 40px rgba(9, 25, 46, .2);
    font-size: 12px;
    line-height: 1.55;
    animation: toast-in .2s ease;
}

.toast.error {
    background: #a82f3d;
}

.toast.success {
    background: #087b64;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Leaflet custom */
.leaflet-container {
    font-family: inherit;
}

.leaflet-control-attribution {
    font-size: 8px !important;
}

.map-marker-custom {
    width: 28px;
    height: 28px;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 8px;
    transform: rotate(-45deg);
    background: var(--blue);
    box-shadow: 0 4px 15px rgba(20, 49, 85, .35);
}

.map-marker-custom span {
    width: 7px;
    height: 7px;
    display: block;
    margin: 7px;
    border-radius: 50%;
    background: #fff;
}

@media (max-width: 1180px) {
    :root { --sidebar-width: 214px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-hero { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
    body { padding-bottom: env(safe-area-inset-bottom); }
    .sidebar {
        transform: translateX(-105%);
        transition: transform .22s ease;
        width: min(280px, 84vw);
        box-shadow: 20px 0 60px rgba(10, 30, 55, .18);
    }
    .sidebar.open { transform: translateX(0); }
    .app-backdrop {
        position: fixed;
        inset: 0;
        z-index: 30;
        background: rgba(9, 23, 43, .45);
        backdrop-filter: blur(2px);
    }
    .app-backdrop.show { display: block; }
    .app-main { margin-left: 0; }
    .mobile-header {
        position: sticky;
        top: 0;
        z-index: 25;
        height: 58px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
        padding-top: env(safe-area-inset-top);
        background: rgba(255, 255, 255, .92);
        border-bottom: 1px solid var(--line);
        backdrop-filter: blur(12px);
    }
    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--ink);
        text-decoration: none;
        font-size: 14px;
    }
    .menu-button { font-size: 18px; }
    .notify-button b {
        position: absolute;
        right: 0;
        top: 0;
        margin: 0;
    }
    .content {
        padding: 21px 16px calc(var(--mobile-nav-height) + 28px + env(safe-area-inset-bottom));
    }
    .mobile-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 26;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
        padding: 6px 7px env(safe-area-inset-bottom);
        background: rgba(255, 255, 255, .96);
        border-top: 1px solid var(--line);
        backdrop-filter: blur(14px);
    }
    .mobile-nav a {
        display: grid;
        place-items: center;
        align-content: center;
        gap: 2px;
        color: var(--muted);
        text-decoration: none;
        font-size: 9px;
        border-radius: 9px;
    }
    .mobile-nav a.active {
        color: var(--blue);
        background: var(--blue-soft);
    }
    .mobile-nav .nav-icon { font-size: 18px; }
    .page-head { align-items: flex-start; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .visit-grid { grid-template-columns: 1fr; }
    .chart-panel-order { order: 2; }
    .modal {
        top: auto;
        bottom: 0;
        transform: translate(-50%, 0);
        width: 100%;
        max-height: 91vh;
        border-radius: 22px 22px 0 0;
        animation: sheet-in .2s ease;
    }
    @keyframes sheet-in {
        from { opacity: 0; transform: translate(-50%, 20px); }
        to { opacity: 1; transform: translate(-50%, 0); }
    }
    .toast-root {
        left: 16px;
        right: 16px;
        bottom: calc(var(--mobile-nav-height) + 18px);
    }
    .toast { min-width: 0; max-width: none; width: 100%; }
}

@media (max-width: 720px) {
    .login-shell { display: block; min-height: 100vh; }
    .login-story {
        min-height: 255px;
        padding: 28px 24px 42px;
    }
    .story-copy { margin: 42px 0 0; }
    .story-copy h1 { font-size: 34px; margin: 13px 0 0; }
    .story-copy p, .story-metrics { display: none; }
    .login-panel {
        position: relative;
        z-index: 2;
        margin-top: -24px;
        min-height: calc(100vh - 231px);
        padding: 32px 22px;
        border-radius: 24px 24px 0 0;
        align-items: start;
    }
    .login-form-wrap h2 { font-size: 27px; }
    .page-head {
        flex-direction: column;
        margin-bottom: 18px;
    }
    .page-actions {
        width: 100%;
        overflow-x: auto;
    }
    .page-actions .button { flex: 1; }
    .dashboard-hero { padding: 23px 20px; border-radius: 19px; }
    .hero-stats { grid-template-columns: repeat(3, 1fr); }
    .hero-stat { padding: 12px; min-height: 88px; }
    .hero-stat strong { font-size: 27px; }
    .hero-stat small { display: none; }
    .stat-grid { gap: 10px; }
    .stat-card { min-height: 113px; padding: 16px; }
    .stat-value { font-size: 27px !important; }
    .stat-icon { width: 30px; height: 30px; right: 13px; top: 13px; }
    .panel-head { padding: 15px 16px; }
    .panel-body { padding: 16px; }
    .card-list { grid-template-columns: 1fr; }
    .entity-card { min-height: 172px; }
    .toolbar { align-items: stretch; }
    .toolbar .field { flex: 1; min-width: 130px; }
    .search-field { max-width: none; width: 100%; flex-basis: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
    .form-section { grid-column: auto; }
    .modal-head, .modal-body, .modal-foot { padding-left: 17px; padding-right: 17px; }
    .detail-grid { grid-template-columns: 1fr 1fr; }
    .trainee-row {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }
    .trainee-source { grid-column: 1 / -1; }
    .report-extra { grid-template-columns: 1fr; }
    .role-note { grid-template-columns: 1fr; }
    .visit-card {
        grid-template-columns: 72px minmax(0, 1fr);
    }
    .visit-photo { width: 72px; height: 72px; }
    .visit-time {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 5px;
        border-top: 1px dashed var(--line);
    }
    .visit-time b { font-size: 12px; }
    .map-canvas, .map-card { min-height: 220px; }
}

@media (max-width: 430px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { min-height: 105px; padding: 14px; }
    .stat-card .stat-value { font-size: 25px; margin: 10px 0 5px; }
    .stat-icon { display: none; }
    .stat-meta { font-size: 9px; }
    .hero-stats { gap: 7px; }
    .hero-stat { padding: 10px; }
    .hero-stat span { font-size: 9px; }
    .hero-stat strong { font-size: 24px; }
    .twoline-chart { gap: 6px; }
    .mini-metric { padding: 10px; }
    .mini-metric strong { font-size: 17px; }
    .funnel-row { grid-template-columns: 87px minmax(0, 1fr) 25px; gap: 7px; }
    .page-head h1 { font-size: 26px; }
    .detail-hero { flex-direction: column; }
    .detail-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
