* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-muted: #f9fbff;
    --border: #e4e9f2;
    --border-strong: #d3dae8;
    --text: #152033;
    --muted: #6b7587;
    --muted-2: #8b95a7;
    --sidebar: #0f1728;
    --sidebar-2: #15213a;
    --accent: #3858ff;
    --accent-soft: #eef2ff;
    --accent-2: #30d39d;
    --success: #0f8a61;
    --success-bg: #e7f7f0;
    --warning: #b96b00;
    --warning-bg: #fff3dc;
    --danger: #c93a3a;
    --danger-bg: #fdecec;
    --info: #1777d2;
    --info-bg: #eaf4ff;
    --purple: #7745df;
    --purple-bg: #f3edff;
    --neutral-bg: #eef1f6;
    --radius: 10px;
    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 15px;
    --shadow: 0 20px 48px rgba(24, 34, 56, .08);
    --shadow-soft: 0 12px 26px rgba(24, 34, 56, .05);
    --sidebar-width: 280px;
    --topbar-height: 76px;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    line-height: 1.45;
}

button,
input,
select {
    font: inherit;
}

button,
.button-link {
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    text-decoration: none;
    white-space: nowrap;
}

button {
    background: var(--sidebar);
    color: #fff;
}

.button-dark {
    background: var(--sidebar);
    border-color: var(--sidebar);
    color: #fff;
}

.button-link {
    background: #fff;
    color: #243b63;
}

input,
select {
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--text);
    min-height: 38px;
    padding: 9px 11px;
    width: 100%;
}

input:focus,
select:focus,
button:focus,
a:focus {
    outline: 3px solid rgba(59, 108, 255, .25);
    outline-offset: 2px;
}

a {
    color: #244a73;
}

.sr-only {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
    border-right: 1px solid rgba(255, 255, 255, .08);
    color: #dbe5f7;
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100vh;
    padding: 22px 18px;
    position: sticky;
    top: 0;
}

.sidebar-brand {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    display: flex;
    gap: 12px;
    padding: 4px 6px 16px;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, #39d7b8, #4b78ff);
    border-radius: 15px;
    box-shadow: 0 16px 30px rgba(56, 88, 255, .28);
    color: #eaf7ff;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
}

.sidebar-brand strong {
    font-size: 15px;
}

.sidebar-brand small {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 3px;
}

.sidebar-label {
    color: #7180a0;
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    margin: 0 10px 4px;
    text-transform: uppercase;
}

.sidebar-nav {
    display: grid;
    gap: 7px;
}

.sidebar-nav .nav-link {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #adbad3;
    display: flex;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    text-decoration: none;
}

.sidebar-nav a.nav-link.active,
.sidebar-nav a.nav-link:hover {
    background: rgba(255, 255, 255, .085);
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 0 0 1px rgba(88, 166, 255, .55);
    color: #fff;
}

.nav-link-content {
    align-items: center;
    display: inline-flex;
    gap: 10px;
    min-width: 0;
}

.nav-link-locked {
    cursor: not-allowed;
    justify-content: space-between;
}

.nav-link-locked .nav-link-content {
    filter: blur(1.5px);
    opacity: .48;
}

.nav-lock-icon {
    color: rgba(219, 234, 254, .82);
    fill: none;
    flex: 0 0 auto;
    height: 20px;
    margin-left: auto;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 20px;
}

.nav-icon {
    align-items: center;
    background: rgba(255, 255, 255, .08);
    border-radius: 8px;
    color: #dbeafe;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    height: 23px;
    justify-content: center;
    width: 23px;
}

.sidebar-meta {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 19px;
    margin-top: auto;
    padding: 15px;
}

.sidebar-meta dl {
    display: grid;
    gap: 9px;
    margin: 0;
}

.sidebar-meta div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.sidebar-meta dt,
.sidebar-meta dd {
    font-size: 12px;
    margin: 0;
}

.sidebar-meta dt {
    color: #94a3b8;
}

.sidebar-meta dd {
    color: #fff;
    font-weight: 700;
    text-align: right;
}

.main-shell {
    display: grid;
    grid-template-rows: var(--topbar-height) minmax(0, 1fr);
    min-width: 0;
}

.app-topbar {
    align-items: center;
    background: rgba(245, 247, 251, .86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(228, 233, 242, .86);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    min-height: var(--topbar-height);
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-topbar h1 {
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -.035em;
    margin: 0;
}

.app-topbar p {
    color: var(--muted);
    font-size: 13px;
    margin: 5px 0 0;
}

.topbar-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.topbar-note {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #536176;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 10px;
    white-space: nowrap;
}

.page {
    min-width: 0;
    padding: 28px 32px 44px;
    width: 100%;
}

.auth-page {
    margin: 0 auto;
    padding: 56px 0;
    width: min(1560px, calc(100% - 56px));
}

.page-header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.page-header h1,
.section-card h2,
.auth-panel h1 {
    margin: 0;
}

.page-header p,
.section-card p,
.muted {
    color: var(--muted);
    margin: 0;
}

.strong {
    display: block;
    font-weight: 750;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    word-break: break-word;
}

.hero-dashboard {
    background:
        radial-gradient(circle at 12% 14%, rgba(56, 88, 255, .15), transparent 29%),
        radial-gradient(circle at 88% 18%, rgba(15, 138, 97, .12), transparent 28%),
        linear-gradient(135deg, #ffffff, #f8fbff 60%, #f2f6ff);
    border: 1px solid #dce3f0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
    margin-bottom: 22px;
    overflow: hidden;
}

.section-card,
.kpi-card,
.auth-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.hero-main {
    display: grid;
    gap: 22px;
    padding: 26px;
}

.eyebrow {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #344054;
    display: inline-flex;
    gap: 8px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    margin-bottom: 12px;
    padding: 7px 10px;
    width: max-content;
}

.hero-copy h2 {
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: -.055em;
    line-height: 1.03;
    margin: 0 0 10px;
    max-width: 780px;
}

.hero-copy p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
    max-width: 760px;
}

.hero-decision-row,
.kpi-grid,
.decision-grid,
.split-grid {
    display: grid;
    gap: 16px;
}

.hero-decision-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.hero-decision-card {
    align-content: start;
    background: rgba(255, 255, 255, .88);
    border: 1px solid #dfe6f3;
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(24, 34, 56, .045);
    display: grid;
    gap: 18px;
    min-height: 160px;
    padding: 20px;
}

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

.decision-top strong {
    font-size: 15px;
    line-height: 1.2;
}

.decision-value {
    font-size: clamp(26px, 2.2vw, 34px);
    font-weight: 880;
    letter-spacing: -.045em;
    line-height: 1.08;
}

.hero-decision-card p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.hero-decision-card .money-strong {
    font-size: inherit;
}

.hero-side {
    align-content: start;
    background: rgba(255, 255, 255, .55);
    border-left: 1px solid #dfe6f3;
    display: grid;
    gap: 16px;
    padding: 22px;
}

.signal-card {
    background: #111a2d;
    border-radius: 20px;
    box-shadow: 0 24px 42px rgba(17, 26, 45, .14);
    color: #e9f0ff;
    display: grid;
    gap: 16px;
    padding: 18px;
}

.signal-card h3 {
    font-size: 15px;
    margin: 0;
}

.signal-heading {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.signal-meta {
    align-items: center;
    color: #91a0b8;
    display: inline-flex;
    font-size: 11px;
    font-weight: 750;
    gap: 7px;
    white-space: nowrap;
}

.signal-meta-icon {
    display: block;
    height: 18px;
    width: 18px;
}

.signal-list {
    display: grid;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.signal-list li {
    border-left: 3px solid rgba(90, 214, 166, .88);
    color: #bdc9df;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
    font-size: 13px;
    row-gap: 4px;
    padding-left: 14px;
}

.signal-list strong {
    color: #fff;
    font-size: 13px;
    min-width: 0;
}

.signal-item-head {
    display: contents;
}

.signal-detail {
    grid-column: 1;
    line-height: 1.45;
    max-width: min(100%, 980px);
}

.signal-intent-badge {
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 800;
    grid-column: 2;
    grid-row: 1;
    line-height: 1;
    margin-top: 2px;
    padding: 5px 8px;
    text-transform: uppercase;
}

.signal-intent-badge-scale {
    background: rgba(90, 214, 166, .14);
    color: #7ee7bd;
}

.signal-intent-badge-test {
    background: rgba(96, 165, 250, .15);
    color: #93c5fd;
}

.signal-intent-badge-review {
    background: rgba(245, 158, 11, .14);
    color: #fbbf24;
}

.signal-intent-badge-monitor {
    background: rgba(148, 163, 184, .15);
    color: #cbd5e1;
}

.signal-list li.signal-intent-scale {
    border-left-color: rgba(90, 214, 166, .95);
}

.signal-list li.signal-intent-test {
    border-left-color: rgba(96, 165, 250, .95);
}

.signal-list li.signal-intent-review {
    border-left-color: rgba(245, 158, 11, .9);
}

.signal-list li.signal-intent-monitor {
    border-left-color: rgba(148, 163, 184, .9);
}

.mini-health {
    background: rgba(255, 255, 255, .78);
    border: 1px solid #dfe6f3;
    border-radius: 18px;
    display: grid;
    gap: 10px;
    padding: 15px;
}

.health-line {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 120px minmax(120px, 1fr) auto;
    color: var(--muted);
    font-size: 12px;
}

.health-line span,
.health-line strong {
    font-size: 12px;
}

.progress {
    background: #e8edf6;
    border-radius: 999px;
    height: 7px;
    overflow: hidden;
}

.progress span {
    display: block;
    border-radius: inherit;
    height: 100%;
}

.progress.green span {
    background: var(--success);
}

.progress.amber span {
    background: var(--warning);
}

.progress.red span {
    background: var(--danger);
}

.kpi-grid {
    gap: 14px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 22px;
}

.kpi-card {
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 10px;
    min-height: 128px;
    padding: 16px;
}

.kpi-card__top {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-height: 26px;
}

.kpi-card__label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.kpi-card__value {
    display: block;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -.055em;
    line-height: 1;
    margin-top: 0;
}

.kpi-card__subtitle {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 8px;
}

.dashboard-snapshot {
    gap: 14px;
}

.dashboard-snapshot .kpi-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(250, 252, 255, .96));
    border-radius: 16px;
    box-shadow: 0 14px 32px rgba(30, 41, 59, .07);
    gap: 8px;
    min-height: 112px;
    padding: 14px 16px;
}

.dashboard-snapshot .kpi-card__top {
    min-height: 23px;
}

.dashboard-snapshot .kpi-card__label {
    font-size: 11px;
    letter-spacing: .01em;
}

.dashboard-snapshot .kpi-card__value {
    color: #0f172a;
    font-size: 30px;
    letter-spacing: -.04em;
    line-height: 1.02;
}

.dashboard-snapshot .kpi-card__subtitle {
    line-height: 1.35;
    margin-top: 0;
}

.dashboard-snapshot .micro-badge {
    font-size: 11px;
    padding: 6px 8px;
}

.micro-badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.decision-grid {
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 22px;
}

.decision-grid .section-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    margin-bottom: 0;
    min-height: 198px;
    position: relative;
}

.decision-grid .section-card::after {
    background: rgba(56, 88, 255, .08);
    border-radius: 50%;
    content: "";
    height: 96px;
    position: absolute;
    right: -32px;
    top: -32px;
    width: 96px;
}

.decision-grid .section-card__head,
.decision-grid .section-card__body {
    position: relative;
    z-index: 1;
}

.decision-grid .section-card__head {
    border-bottom: 0;
    padding-bottom: 8px;
}

.decision-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.section-card > .decision-list {
    margin-top: 0;
    padding: 16px 20px 20px;
}

.section-card > .empty-state {
    margin: 0 20px 20px;
}

.decision-row,
.change-row,
.health-event,
.review-impact-row {
    align-items: center;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 12px;
    padding: 12px 0 0;
}

.decision-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.change-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.decision-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.decision-copy .muted {
    display: block;
    line-height: 1.35;
}

.change-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.change-copy__meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.change-copy__meta strong {
    min-width: 0;
}

.change-amount {
    text-align: right;
    white-space: nowrap;
}

.movement-summary-card {
    align-self: start;
}

.movement-summary-card .decision-list {
    gap: 10px;
}

.movement-summary-card .change-row {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
}

.movement-summary-card .change-row:first-child {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.fresh-opportunity-list {
    display: grid;
    gap: 12px;
    padding: 16px 20px 20px;
}

.fresh-opportunity {
    border: 1px solid var(--border);
    border-radius: 14px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.fresh-opportunity__main {
    align-items: start;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.fresh-opportunity__main .muted {
    display: block;
    margin-top: 4px;
}

.fresh-opportunity__metrics {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.fresh-opportunity__metrics span {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #536176;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    justify-content: center;
    min-height: 32px;
    padding: 6px 9px;
    white-space: nowrap;
}

.fresh-geo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fresh-geo-chip {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #243b63;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    min-height: 32px;
    padding: 7px 10px;
    white-space: nowrap;
}

.fresh-geo-chip strong {
    color: var(--success);
    font-size: 13px;
    font-weight: 900;
}

.fresh-geo-chip-more {
    background: var(--surface-muted);
    color: var(--muted);
    font-weight: 850;
}

.operational-status-card {
    margin-bottom: 0;
}

.operational-status-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 16px 20px 20px;
}

.operational-status-item {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: grid;
    gap: 9px;
    min-width: 0;
    padding: 14px;
}

.operational-status-label {
    color: #536176;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.operational-status-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.operational-status-line strong {
    font-size: 15px;
}

.operational-status-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.operational-status-details span {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #536176;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    justify-content: center;
    min-height: 32px;
    padding: 6px 9px;
    white-space: nowrap;
}

.operational-warning-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.operational-warning-list > a,
.operational-warning-list > span {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #243b63;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    min-height: 32px;
    padding: 6px 9px;
    text-decoration: none;
}

.operational-review-link {
    justify-self: start;
    margin-top: 2px;
}

.decision-row:first-child,
.change-row:first-child,
.health-event:first-child,
.review-impact-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.money-strong {
    color: var(--success);
    font-size: 18px;
    font-weight: 850;
}

.money-range {
    align-items: baseline;
    color: #0f172a;
    display: inline-flex;
    font-weight: 850;
    gap: 4px;
    white-space: nowrap;
}

.split-grid {
    gap: 22px;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
    margin-bottom: 22px;
}

.section-card {
    box-shadow: var(--shadow-soft);
    margin-bottom: 22px;
    overflow: hidden;
}

.section-card__head {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.section-card__body {
    padding: 18px 20px 20px;
}

.section-card__head h2 {
    font-size: 16px;
    letter-spacing: -.02em;
}

.section-card__head p {
    font-size: 13px;
    margin-top: 5px;
}

.section-card__actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.filters {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
    padding: 18px;
}

.filters-tight {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
}

.filters label,
.action-form label {
    color: #4a5565;
    display: grid;
    font-size: 12px;
    font-weight: 750;
    gap: 6px;
}

.filters > button {
    align-self: end;
    justify-self: end;
    min-height: 38px;
    padding: 9px 16px;
}

.smart-filters {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.smart-filters__head h2 {
    font-size: 16px;
    letter-spacing: -.02em;
}

.smart-filters__head p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 5px;
}

.smart-filters__top,
.smart-filters__advanced-grid {
    display: grid;
    gap: 12px;
}

.smart-filters__top {
    align-items: start;
    grid-template-columns: minmax(130px, .55fr) minmax(300px, 1.25fr) minmax(180px, .75fr) minmax(110px, .45fr) auto;
}

.smart-filters label,
.smart-field {
    color: #4a5565;
    display: grid;
    font-size: 12px;
    font-weight: 750;
    gap: 6px;
}

.field-label {
    color: #4a5565;
    font-size: 12px;
    font-weight: 750;
}

.country-picker {
    min-width: 0;
    position: relative;
}

.country-select-trigger {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    gap: 10px;
    justify-content: space-between;
    min-height: 38px;
    padding: 9px 11px;
    user-select: none;
    width: 100%;
}

.country-select-trigger:focus,
.country-select-trigger:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 108, 255, .12);
}

.country-select-trigger span:last-child {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.country-modal[hidden] {
    display: none;
}

.country-modal {
    inset: 0;
    position: fixed;
    z-index: 80;
}

.country-modal__backdrop {
    background: rgba(15, 23, 42, .28);
    border: 0;
    border-radius: 0;
    inset: 0;
    min-height: 0;
    padding: 0;
    position: fixed;
    width: 100%;
}

.country-modal__panel {
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
    display: grid;
    gap: 12px;
    left: 50%;
    max-height: min(720px, calc(100vh - 80px));
    overflow: hidden;
    padding: 16px;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, calc(100vw - 32px));
}

.country-modal__head,
.country-modal__foot {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.country-modal__head h3 {
    font-size: 17px;
    letter-spacing: -.02em;
}

.country-modal__head p,
.country-modal__foot {
    color: var(--muted);
    font-size: 13px;
}

.country-modal__panel > input {
    font-size: 13px;
}

.country-modal__options {
    background: #fbfcff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    display: grid;
    gap: 2px;
    max-height: min(380px, calc(100vh - 300px));
    overflow: auto;
    padding: 6px;
}

.country-option {
    align-items: center;
    border-radius: 8px;
    color: #344054;
    display: flex !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    gap: 8px !important;
    min-height: 32px;
    padding: 6px 8px;
}

.country-option[hidden],
.country-modal__empty[hidden] {
    display: none !important;
}

.country-option:hover {
    background: #f8fafc;
}

.country-option input {
    min-height: auto;
    width: auto;
}

.country-modal__empty {
    background: #f8fafc;
    border: 1px dashed #d8e0ea;
    border-radius: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    padding: 14px;
}

.country-modal__actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.smart-filters__actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 22px;
}

.smart-filters__actions button,
.smart-filters__actions .button-link {
    min-height: 38px;
    padding: 9px 15px;
}

.smart-filters__advanced {
    border-top: 1px solid #eef2f7;
    padding-top: 12px;
}

.smart-filters__advanced summary {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    list-style: none;
    min-height: 32px;
    padding: 6px 11px;
    user-select: none;
    width: fit-content;
}

.smart-filters__advanced summary::-webkit-details-marker {
    display: none;
}

.smart-filters__advanced[open] summary {
    background: #eef6ff;
    border-color: #cfe0ff;
    color: #1e3a8a;
}

.advanced-count {
    align-items: center;
    background: #fff;
    border-radius: 999px;
    color: #244a73;
    display: inline-flex;
    font-size: 11px;
    height: 18px;
    justify-content: center;
    min-width: 18px;
    padding: 0 5px;
}

.smart-filters__advanced-grid {
    align-items: end;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    margin-top: 12px;
}

.checkbox-filter {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    display: flex !important;
    min-height: 38px;
    padding: 8px 11px;
}

.checkbox-filter input {
    min-height: auto;
    width: auto;
}

.smart-filters__error {
    margin: 0;
}

.active-filter-row {
    align-items: center;
    border-top: 1px solid #eef2f7;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
}

.filter-chip {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 8px;
    min-height: 30px;
    padding: 6px 10px;
    text-decoration: none;
}

.filter-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.table-wrap {
    overflow-x: auto;
    width: 100%;
}

table {
    border-collapse: collapse;
    min-width: 980px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid #eef2f7;
    border-top: 0;
    padding: 13px 16px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--surface-muted);
    color: #536176;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

td {
    font-size: 13px;
}

tbody tr:hover td {
    background: #fbfdff;
}

.data-table-compact th,
.data-table-compact td {
    padding-bottom: 12px;
    padding-top: 12px;
}

.empty-cell {
    color: var(--muted);
    text-align: center;
}

.badge,
.micro-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 4px;
    line-height: 1;
    padding: 7px 10px;
    text-transform: capitalize;
    white-space: nowrap;
}

.badge-muted {
    opacity: .75;
}

.micro-badge {
    background: var(--neutral-bg);
    color: #344054;
}

.micro-badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.micro-badge-info {
    background: var(--info-bg);
    color: var(--info);
}

.micro-badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-fresh,
.status-success,
.status-active,
.status-new,
.status-reactivated,
.severity-info {
    background: var(--success-bg);
    color: var(--success);
}

.status-skipped_same_hash,
.status-same_hash_valid,
.status-dry_run,
.status-skipped_locked,
.status-unknown,
.status-inactive,
.status-never_imported,
.status-skipped_too_early {
    background: var(--neutral-bg);
    color: #475467;
}

.status-stale,
.status-suspicious,
.status-paused,
.status-changed,
.severity-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-failed,
.status-removed,
.severity-error,
.severity-critical {
    background: var(--danger-bg);
    color: var(--danger);
}

.chip {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #243b63;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 5px;
    margin: 2px 4px 2px 0;
    min-height: 30px;
    padding: 6px 9px;
    text-decoration: none;
    white-space: nowrap;
}

.chip-muted {
    color: var(--muted);
    font-weight: 650;
}

.cpa-chip strong {
    color: var(--success);
}

.chip-state {
    background: var(--info-bg);
    border-radius: 999px;
    color: var(--info);
    padding: 2px 5px;
}

.country-link {
    text-decoration: none;
}

.hero-card {
    align-items: center;
    background: linear-gradient(135deg, #ffffff, #f7fbff);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 24px;
}

.hero-card h1 {
    font-size: 34px;
    line-height: 1.05;
    margin: 8px 0 8px;
}

.hero-card p {
    color: var(--muted);
    margin: 0;
}

.hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.empty-state {
    background: var(--surface-muted);
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    color: var(--muted);
    padding: 16px;
}

.empty-state strong {
    color: var(--text);
    display: block;
    margin-bottom: 5px;
}

.empty-state p {
    margin: 0 0 10px;
}

.empty-state-danger {
    background: var(--danger-bg);
    border-color: #ffc7cd;
}

.empty-state-warning {
    background: var(--warning-bg);
    border-color: #f7d78d;
}

.status-panel {
    margin-bottom: 18px;
}

.pagination {
    align-items: center;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    padding: 14px 18px 18px;
}

.pagination__summary {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.pagination__links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.pagination__link,
.pagination__ellipsis {
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    color: #244a73;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0 10px;
    text-decoration: none;
    white-space: nowrap;
}

.pagination__link:hover {
    background: var(--surface-muted);
}

.pagination__link.is-active {
    background: var(--sidebar);
    border-color: var(--sidebar);
    color: #fff;
}

.pagination__link.is-disabled,
.pagination__ellipsis {
    color: var(--muted);
}

.pagination__link.is-disabled {
    background: var(--surface-muted);
    cursor: not-allowed;
    opacity: .68;
}

.pagination__ellipsis {
    border-color: transparent;
    min-width: 22px;
    padding: 0 2px;
}

.action-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.action-form {
    align-content: start;
    display: grid;
    gap: 12px;
    padding: 18px;
}

.review-status-card {
    align-items: stretch;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
    padding: 20px;
}

.review-status-card-clean {
    background: linear-gradient(135deg, #ffffff, #f8fffb);
}

.review-status-card-warning {
    background: linear-gradient(135deg, #ffffff, #fffaf2);
    border-color: #f5dfaa;
}

.review-status-card__main {
    align-content: center;
    display: grid;
    gap: 10px;
}

.review-status-card__main .micro-badge {
    justify-self: start;
}

.review-status-card__main h2 {
    font-size: 22px;
    letter-spacing: -.02em;
}

.review-status-card__main p {
    max-width: 760px;
}

.review-metrics {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.review-metric {
    align-content: center;
    background: rgba(255, 255, 255, .74);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: grid;
    gap: 8px;
    min-height: 86px;
    padding: 14px;
}

.review-metric span {
    color: #667085;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.review-metric strong {
    color: var(--text);
    font-size: 26px;
    line-height: 1;
}

.review-filters {
    align-items: end;
    grid-template-columns: minmax(220px, 1.4fr) minmax(150px, .55fr) minmax(150px, .55fr) minmax(120px, .45fr) auto;
}

.review-filter-actions {
    align-items: end;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.review-filter-actions button,
.review-filter-actions .button-link {
    min-height: 38px;
}

.review-tools-card {
    overflow: visible;
}

.review-tools summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    list-style: none;
    padding: 18px 20px;
}

.review-tools summary::-webkit-details-marker {
    display: none;
}

.review-tools summary strong {
    display: block;
    font-size: 16px;
}

.review-tools summary small {
    color: var(--muted);
    display: block;
    font-size: 13px;
    font-weight: 650;
    margin-top: 4px;
}

.review-tools__trigger {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: #243b63;
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    min-height: 32px;
    padding: 7px 12px;
    white-space: nowrap;
}

.review-tools[open] .review-tools__trigger {
    background: var(--neutral-bg);
}

.review-tools-grid {
    border-top: 1px solid var(--border);
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 18px;
}

.review-tool-form {
    background: #fbfdff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.review-tool-form h2 {
    font-size: 16px;
    letter-spacing: -.02em;
}

.review-tool-form p {
    font-size: 13px;
    margin: -4px 0 2px;
}

.review-tool-form button {
    justify-self: stretch;
}

.checkbox {
    align-items: center;
    grid-template-columns: 18px 1fr;
}

.checkbox input {
    width: auto;
}

.inline-form {
    margin: 0;
}

.inline-form button {
    font-size: 12px;
    min-height: 30px;
    padding: 6px 9px;
}

.notice {
    background: var(--success-bg);
    border: 1px solid #bae7d2;
    border-radius: 12px;
    color: #14532d;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.notice-error {
    background: var(--danger-bg);
    border-color: #ffc7cd;
    color: var(--danger);
}

.sort-link {
    align-items: center;
    color: #244a73;
    display: inline-flex;
    gap: 5px;
    text-decoration: none;
}

.sort-link:hover {
    color: var(--accent);
}

.sort-link .sort-arrow {
    color: var(--sidebar);
}

.sort-arrow {
    align-items: center;
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    justify-content: center;
    line-height: 1;
    min-width: 12px;
}

.auth-panel {
    margin: 70px auto;
    max-width: 420px;
    padding: 22px;
}

.auth-panel form,
.auth-panel label {
    display: grid;
    gap: 8px;
}

.auth-panel form {
    gap: 16px;
}

.form-error {
    color: var(--danger);
    font-size: 14px;
    margin: -4px 0 0;
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .main-shell {
        display: block;
    }

    .sidebar {
        height: auto;
        min-height: auto;
        max-width: 100vw;
        overflow: visible;
        position: relative;
        width: 100%;
    }

    .sidebar-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        max-width: 100%;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .sidebar-label {
        display: none;
    }

    .sidebar-nav .nav-link {
        flex: 0 0 auto;
        min-width: 0;
        white-space: nowrap;
    }

    .sidebar-meta {
        display: none;
    }

    .hero-dashboard,
    .split-grid,
    .decision-grid,
    .review-status-card {
        grid-template-columns: 1fr;
    }

    .hero-side {
        border-left: 0;
        border-top: 1px solid #dfe6f3;
    }

    .kpi-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 760px) {
    .sidebar {
        gap: 16px;
        padding: 18px 14px 16px;
    }

    .sidebar-brand {
        padding: 0 2px 14px;
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
        padding-bottom: 0;
    }

    .sidebar-nav .nav-link {
        font-size: 13px;
        justify-content: flex-start;
        min-height: 40px;
        padding: 9px 10px;
        width: 100%;
    }

    .nav-link-locked {
        align-items: center;
    }

    .nav-label {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-lock-icon {
        height: 18px;
        width: 18px;
    }

    .page {
        padding: 12px;
    }

    .auth-page {
        width: min(100% - 24px, 1560px);
    }

    .app-topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        min-height: var(--topbar-height);
        padding: 16px 18px;
        position: relative;
    }

    .topbar-actions {
        justify-content: flex-start;
    }

    .hero-decision-row,
    .kpi-grid,
    .filters,
    .smart-filters__top,
    .smart-filters__advanced-grid,
    .action-grid,
    .review-tools-grid {
        grid-template-columns: 1fr;
    }

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

    .review-filter-actions {
        justify-content: flex-start;
    }

    .review-filter-actions button,
    .review-filter-actions .button-link {
        flex: 1 1 0;
    }

    .review-tools summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .smart-filters__actions {
        justify-content: flex-start;
    }

    .smart-filters__actions button,
    .smart-filters__actions .button-link {
        flex: 1 1 0;
    }

    .health-line {
        grid-template-columns: 1fr;
    }

    .hero-copy h2 {
        font-size: 30px;
    }

    .signal-list li {
        grid-template-columns: 1fr;
    }

    .change-row {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .change-amount {
        text-align: left;
    }

    .fresh-opportunity__metrics {
        justify-content: flex-start;
    }

    .operational-status-grid {
        grid-template-columns: 1fr;
    }

    .signal-intent-badge {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        margin-top: 2px;
    }

    .hero-dashboard {
        border-radius: 14px;
    }

    .hero-main,
    .hero-side {
        padding: 18px;
    }

}
