*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ink: #0d1b2a;
    --ink-muted: #4a5568;
    --ink-faint: #8a9ab0;
    --blue-900: #06145a;
    --blue-700: #0f246e;
    --blue-500: #378ADD;
    --blue-300: #5dadca;
    --blue-100: #9fd6e1;
    --blue-50: #E6F1FB;
    --green-900: #04342C;
    --green-700: #0F6E56;
    --green-500: #1D9E75;
    --green-300: #5DCAA5;
    --green-100: #9FE1CB;
    --green-50: #E1F5EE;
    --amber-500: #BA7517;
    --amber-50: #FAEEDA;
    --coral-500: #993C1D;
    --coral-50: #FAECE7;
    --purple-500: #534AB7;
    --purple-50: #EEEDFE;
    --surface: #ffffff;
    --bg: #f4f7f5;
    --border: rgba(13, 27, 42, 0.10);
    --border-md: rgba(13, 27, 42, 0.16);
    --shadow-card: 0 2px 12px rgba(13, 27, 42, 0.07), 0 1px 3px rgba(13, 27, 42, 0.05);
    --shadow-hover: 0 8px 28px rgba(13, 27, 42, 0.12), 0 2px 8px rgba(13, 27, 42, 0.07);
    --nav-bg: rgba(255, 255, 255, 0.88);
    --glass-bg: rgba(255, 255, 255, 0.72);
    --footer-bg: #0d1b2a;
    --footer-text: rgba(255, 255, 255, 0.45);
    --overlay-bg: rgba(13, 27, 42, 0.45);
    --radius: 12px;
    --radius-sm: 8px;
    --nav-offset: 62px;
}

html {
    scroll-behavior: smooth;
}

html[data-theme='dark'] {
    color-scheme: dark;
    --ink: #e7eef8;
    --ink-muted: #a9b8cc;
    --ink-faint: #7f93ad;
    --surface: #0f1726;
    --bg: #08111d;
    --border: rgba(148, 163, 184, 0.16);
    --border-md: rgba(148, 163, 184, 0.28);
    --shadow-card: 0 14px 32px rgba(2, 6, 23, 0.42), 0 3px 8px rgba(2, 6, 23, 0.28);
    --shadow-hover: 0 28px 56px rgba(2, 6, 23, 0.54), 0 8px 22px rgba(2, 6, 23, 0.32);
    --nav-bg: rgba(8, 17, 29, 0.84);
    --glass-bg: rgba(15, 23, 38, 0.88);
    --footer-bg: #040913;
    --footer-text: rgba(169, 184, 204, 0.62);
    --overlay-bg: rgba(2, 6, 23, 0.74);
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    transition: background-color .25s ease, color .25s ease;
}

body.mobile-sidebar-open {
    overflow: hidden;
}

/* ─── NAV ─────────────────────────────────────────── */
.top-nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 200;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: 62px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    padding: 0.28rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    box-shadow: 0 12px 28px rgba(13, 27, 42, 0.06);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
    flex-shrink: 0;
}

.logo-mark {
    width: 34px;
    height: 34px;
    background: var(--blue-700);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-mark svg {
    width: 18px;
    height: 18px;
}

.logo-text {
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    color: var(--ink);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.logo-text span {
    color: var(--blue-700);
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(0.55rem, 1.4vw, 1rem);
    min-width: 0;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 40px;
    padding: 0.3rem 0.8rem 0.3rem 0.35rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s, border-color .2s, box-shadow .2s, color .2s, background-color .2s;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(55, 138, 221, 0.24);
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(13, 27, 42, 0.08);
}

.theme-toggle-orb {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(15, 36, 110, 0.26);
    flex-shrink: 0;
}

.theme-icon {
    position: absolute;
    width: 16px;
    height: 16px;
    transition: opacity .22s ease, transform .22s ease;
}

.theme-icon-moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.theme-icon-sun {
    opacity: 0;
    transform: scale(0.62) rotate(-25deg);
}

.theme-toggle-text {
    white-space: nowrap;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink-muted);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: color .2s, background-color .2s, transform .2s, box-shadow .2s;
}

.nav-link:hover {
    background: rgba(55, 138, 221, 0.08);
    color: var(--blue-700);
    transform: translateY(-1px);
}

.nav-link.is-active {
    background: var(--blue-700);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 36, 110, 0.16);
}

.nav-link.is-active:hover {
    color: #ffffff;
    background: var(--blue-900);
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    background: var(--blue-700);
    color: white;
    border: none;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 10px 20px rgba(15, 36, 110, 0.18);
    transition: background .2s, transform .15s, box-shadow .2s;
}

.btn-nav:hover {
    background: var(--blue-900);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(15, 36, 110, 0.24);
}

.mobile-menu-toggle,
.mobile-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-muted);
    cursor: pointer;
    transition: transform .2s, border-color .2s, box-shadow .2s, color .2s, background-color .2s;
}

.mobile-menu-toggle:hover,
.mobile-sidebar-close:hover {
    transform: translateY(-1px);
    border-color: rgba(55, 138, 221, 0.24);
    color: var(--blue-700);
    box-shadow: 0 10px 22px rgba(13, 27, 42, 0.08);
}

.mobile-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 420;
    width: min(320px, calc(100vw - 42px));
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1rem;
    background: var(--surface);
    border-right: 1px solid var(--border-md);
    box-shadow: 28px 0 60px rgba(13, 27, 42, 0.18);
    transform: translateX(-105%);
    transition: transform .28s ease;
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.is-open {
    transform: translateX(0);
}

.mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 410;
    background: rgba(13, 27, 42, 0.42);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .24s ease;
}

.mobile-sidebar-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.mobile-sidebar-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

.mobile-sidebar-brand .logo-text {
    font-size: 1rem;
    line-height: 1.1;
    white-space: normal;
}

.mobile-sidebar-close {
    display: inline-flex;
    flex-shrink: 0;
}

.mobile-sidebar-section {
    margin: 1.15rem 0 0.65rem;
    color: var(--ink-faint);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.mobile-sidebar-menu {
    display: grid;
    gap: 0.45rem;
}

.mobile-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 46px;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    color: var(--ink-muted);
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    transition: background-color .2s, color .2s, transform .2s, box-shadow .2s;
}

.mobile-sidebar-link:hover {
    background: rgba(55, 138, 221, 0.08);
    color: var(--blue-700);
    transform: translateX(2px);
}

.mobile-sidebar-link.is-active {
    background: var(--blue-700);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(15, 36, 110, 0.16);
}

.mobile-sidebar-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(55, 138, 221, 0.1);
    color: var(--blue-700);
    flex-shrink: 0;
}

.mobile-sidebar-link.is-active .mobile-sidebar-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.mobile-sidebar-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: auto;
    border-radius: 999px;
    background: var(--blue-700);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 12px 22px rgba(15, 36, 110, 0.18);
    transition: background-color .2s, transform .2s, box-shadow .2s;
}

.mobile-sidebar-login:hover {
    background: var(--blue-900);
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(15, 36, 110, 0.24);
}

/* ─── HERO ────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 7.5rem 2rem 5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 0;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 40%, transparent 100%);
}

.hero-blob {
    position: absolute;
    top: -120px;
    right: -80px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(55, 138, 221, 0.10) 0%, transparent 65%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 2.15rem;
    max-width: 100%;
    background: var(--blue-50);
    color: var(--blue-900);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.25;
    text-transform: uppercase;
    padding: 0.42rem 0.85rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
    overflow: visible;
    white-space: normal;
}

.hero-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue-500);
    flex: 0 0 6px;
}

.hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 2.5rem;
    line-height: 1.15;
    letter-spacing: 0;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.hero h1 em {
    font-style: italic;
    color: var(--blue-700);
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--ink-muted);
    max-width: 460px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    background: var(--blue-700);
    color: white;
    text-decoration: none;
    padding: 0.78rem 1.55rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.1;
    white-space: nowrap;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 12px 24px rgba(24, 95, 165, 0.25);
}

.btn-primary:hover {
    background: var(--blue-900);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(24, 95, 165, 0.3);
}

.btn-ghost {
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 46px;
    padding: 0.72rem 1rem;
    border: 1px solid var(--border-md);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    line-height: 1.1;
    white-space: nowrap;
    transition: color .2s, border-color .2s, background-color .2s, transform .15s, box-shadow .2s;
}

.btn-ghost:hover {
    background: var(--blue-50);
    border-color: var(--blue-100);
    color: var(--blue-700);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(13, 27, 42, 0.08);
}

.btn-ghost svg {
    transition: transform .2s;
}

.btn-ghost:hover svg {
    transform: translateX(3px);
}

/* Hero visual panel */
.hero-visual {
    position: relative;
}

.hero-card-preview {
    background: var(--surface);
    border: 1px solid var(--border-md);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-hover);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.preview-dots {
    display: flex;
    gap: 5px;
}

.preview-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.preview-dots span:nth-child(1) {
    background: #fc695a;
}

.preview-dots span:nth-child(2) {
    background: #fdbc40;
}

.preview-dots span:nth-child(3) {
    background: #33c748;
}

.preview-label {
    font-size: 0.72rem;
    color: var(--ink-faint);
    font-weight: 500;
    letter-spacing: 0.04em;
}

.preview-mini-card {
    background: var(--bg);
    border-radius: 8px;
    padding: 0.85rem;
    margin-bottom: 0.6rem;
    border-left: 3px solid var(--blue-500);
}

.preview-mini-card:last-child {
    margin-bottom: 0;
}

.pmcard-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.4rem;
}

.pmcard-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
}

.pmcard-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-aktif {
    background: var(--blue-50);
    color: var(--blue-900);
}

.badge-selesai {
    background: var(--green-50);
    color: var(--green-700);
}

.badge-draft {
    background: var(--amber-50);
    color: var(--amber-500);
}

.badge-revisi {
    background: var(--coral-50);
    color: var(--coral-500);
}

.badge-menunggu {
    background: var(--blue-50);
    color: var(--blue-700);
}

.pmcard-meta {
    font-size: 0.73rem;
    color: var(--ink-faint);
}

.hero-floating-stat {
    position: absolute;
    bottom: -18px;
    left: -22px;
    background: var(--surface);
    border: 1px solid var(--border-md);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hfs-icon {
    width: 36px;
    height: 36px;
    background: var(--blue-50);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hfs-num {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--ink);
    line-height: 1;
}

.hfs-lbl {
    font-size: 0.72rem;
    color: var(--ink-faint);
}

/* ─── STATS STRIP ─────────────────────────────────── */

/* ─── MAIN SECTION ────────────────────────────────── */
.data-section {
    min-height: 100vh;
    min-height: 100svh;
    background: var(--bg);
    scroll-margin-top: 0;
}

.main-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 2.7rem 2rem 5rem;
}

.analytics-section + .data-section .main-wrap {
    padding-top: 2.15rem;
}

.section-top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 1.6rem;
    gap: 1.2rem;
}

.section-top-copy {
    max-width: 46rem;
}

.section-eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-700);
    margin-bottom: 0.4rem;
}

.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.55rem, 1.25rem + 1.1vw, 2rem);
    color: var(--ink);
    line-height: 1.2;
}

.section-sub {
    font-size: 0.9rem;
    color: var(--ink-muted);
    margin-top: 0.35rem;
    line-height: 1.7;
}

.data-section.is-loading .results-overview,
.data-section.is-loading .analytics-wrap,
.data-section.is-loading .analytics-grid,
.data-section.is-loading .analytics-card,
.data-section.is-loading .cards-grid,
.data-section.is-loading .pagination-wrap,
.data-section.is-loading .empty-state {
    opacity: 0.55;
    transition: opacity .2s ease;
}

.analytics-section.is-loading .analytics-shell,
.analytics-section.is-loading .analytics-card,
.analytics-section.is-loading .attention-list {
    opacity: 0.6;
    transition: opacity .2s ease;
}

.filter-panel {
    width: 100%;
    padding: 1rem 1.05rem;
    border: 1px solid var(--border);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(55, 138, 221, 0.05), rgba(159, 214, 225, 0.02)),
        var(--surface);
    box-shadow: 0 14px 32px rgba(13, 27, 42, 0.05);
}

/* Search & Filter */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: stretch;
}

.filter-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-end;
    min-width: 0;
}

.filter-stack-primary {
    justify-content: flex-start;
}

.filter-stack-secondary {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.7fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.filter-group-label {
    padding-left: 0.15rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.scope-toggle .filter-option span {
    min-width: 124px;
}

.category-toggle .filter-option span {
    min-width: 112px;
}

.sort-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 48px;
    width: 100%;
    padding: 0.35rem 0.45rem 0.35rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--glass-bg);
    box-shadow: 0 8px 20px rgba(13, 27, 42, 0.04);
}

.sort-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.sort-select {
    min-height: 38px;
    width: 100%;
    padding: 0.35rem 2rem 0.35rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.sort-select:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.12);
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--glass-bg);
    box-shadow: 0 8px 20px rgba(13, 27, 42, 0.04);
}

.filter-option {
    position: relative;
    cursor: pointer;
}

.filter-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 98px;
    padding: 0.52rem 0.9rem;
    border-radius: 10px;
    color: var(--ink-muted);
    font-size: 0.86rem;
    font-weight: 600;
    transition: background .2s, color .2s, transform .2s, box-shadow .2s;
}

.filter-option:hover span {
    color: var(--blue-700);
    background: rgba(55, 138, 221, 0.08);
}

.filter-option input:checked+span,
.filter-option.is-active span {
    background: var(--blue-700);
    color: white;
    box-shadow: 0 10px 18px rgba(15, 36, 110, 0.18);
}

.search-wrap {
    position: relative;
    min-width: 0;
}

.search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-faint);
    pointer-events: none;
}

.search-input {
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    min-height: 48px;
    padding: 0.55rem 0.9rem 0.55rem 2.2rem;
    border: 1px solid var(--border-md);
    border-radius: 12px;
    font-size: 0.88rem;
    color: var(--ink);
    background: var(--surface);
    transition: border-color .2s, box-shadow .2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.12);
}

.btn-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: 84px;
    background: var(--blue-700);
    color: white;
    border: none;
    padding: 0.55rem 1.15rem;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(27, 79, 133, 0.18);
    transition: background .2s, transform .2s, box-shadow .2s;
}

.btn-search:hover {
    background: var(--blue-900);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(27, 79, 133, 0.24);
}

.btn-reset-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--border-md);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--ink-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s, background-color .2s, color .2s, transform .2s;
}

.btn-reset-search:hover {
    border-color: rgba(55, 138, 221, 0.24);
    background: rgba(55, 138, 221, 0.08);
    color: var(--blue-700);
    transform: translateY(-1px);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: flex-end;
}

.results-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.9rem 1rem;
    margin-bottom: 1.8rem;
    padding: 1.05rem 1.15rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(55, 138, 221, 0.06), rgba(159, 214, 225, 0.02)),
        var(--surface);
    box-shadow: 0 14px 30px rgba(13, 27, 42, 0.05);
}

.results-overview-copy {
    min-width: 0;
    max-width: 42rem;
}

.results-mode {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    margin-bottom: 0.55rem;
    padding: 0.32rem 0.72rem;
    border: 1px solid rgba(55, 138, 221, 0.16);
    border-radius: 999px;
    background: rgba(55, 138, 221, 0.08);
    color: var(--blue-700);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.results-count {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.1rem, 0.9rem + 0.7vw, 1.75rem);
    line-height: 1.1;
    color: var(--ink);
}

.results-caption {
    margin-top: 0.35rem;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--ink-muted);
    max-width: 48rem;
}

.results-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    max-width: 36rem;
}

.result-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.2rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--ink-muted);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.result-chip.is-active {
    border-color: rgba(55, 138, 221, 0.2);
    background: var(--blue-50);
    color: var(--blue-700);
}

.result-chip.is-active::before {
    content: '';
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.12);
    flex-shrink: 0;
}

.result-chip-reset {
    border-style: dashed;
    transition: border-color .2s, background-color .2s, color .2s, transform .2s;
}

.result-chip-reset::before {
    content: '↺';
    font-size: 0.9rem;
    line-height: 1;
    flex-shrink: 0;
}

.result-chip-reset:hover {
    border-color: var(--blue-500);
    background: rgba(55, 138, 221, 0.08);
    color: var(--blue-700);
    transform: translateY(-1px);
}

.cards-grid + .pagination-wrap {
    margin-top: 2.8rem;
}

.result-refresh-enter {
    animation: resultRefreshEnter 0.38s ease;
}

@keyframes resultRefreshEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── CARDS GRID ──────────────────────────────────── */
.analytics-section {
    position: relative;
    overflow: clip;
    scroll-margin-top: var(--nav-offset);
    background:
        radial-gradient(circle at top right, rgba(55, 138, 221, 0.12), transparent 34%),
        radial-gradient(circle at left 18%, rgba(29, 158, 117, 0.08), transparent 28%),
        var(--bg);
}

.analytics-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(55, 138, 221, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(55, 138, 221, 0.03) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.45;
    pointer-events: none;
}

.analytics-section::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 96px;
    background: linear-gradient(180deg, rgba(244, 247, 245, 0), var(--bg));
    pointer-events: none;
}

.analytics-shell {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto;
    padding: 2.85rem 2rem 2.1rem;
}

.analytics-wrap {
    margin-bottom: 1.4rem;
}

.analytics-wrap-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem 1rem;
    align-items: flex-start;
    margin-bottom: 1.35rem;
}

.analytics-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.32rem;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-700);
}

.analytics-heading {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.18rem, 1.02rem + 0.62vw, 1.58rem);
    color: var(--ink);
    line-height: 1.2;
}

.analytics-context {
    max-width: 40rem;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--ink-muted);
    text-align: left;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.1rem;
}

.analytics-card {
    grid-column: span 4;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
    padding: 1.18rem 1.18rem 1.22rem;
    border: 1px solid var(--border);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, rgba(55, 138, 221, 0.04), rgba(159, 214, 225, 0.02)),
        var(--surface);
    box-shadow: 0 16px 34px rgba(13, 27, 42, 0.055);
    overflow: hidden;
}

.analytics-card::after {
    content: '';
    position: absolute;
    inset: auto 1.1rem 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(55, 138, 221, 0), rgba(55, 138, 221, 0.52), rgba(29, 158, 117, 0.44));
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .25s ease;
}

.analytics-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.analytics-card-wide {
    grid-column: span 8;
}

.analytics-card-full {
    grid-column: span 12;
}

.analytics-card[data-analytics-card].is-visible {
    animation: analyticsCardIn 0.7s both;
    animation-delay: var(--analytics-delay, 0ms);
}

@keyframes analyticsCardIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.analytics-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    min-height: 4.2rem;
}

.analytics-card-label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.38rem;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.analytics-card-title {
    font-size: 1rem;
    line-height: 1.35;
    color: var(--ink);
}

.analytics-card-body {
    display: grid;
    gap: 1rem;
}

.analytics-card-body-split {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: center;
}

.analytics-card-body-compact {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
}

.analytics-card-note {
    max-width: 16rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--ink-muted);
    text-align: right;
}

.analytics-card-full .analytics-card-head {
    flex-direction: column;
    align-items: flex-start;
}

.analytics-card-full .analytics-card-note {
    max-width: 34rem;
    text-align: left;
}

.analytics-empty {
    min-height: 5.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 1px dashed var(--border);
    border-radius: 16px;
    background: rgba(55, 138, 221, 0.04);
    color: var(--ink-muted);
    font-size: 0.86rem;
    line-height: 1.6;
    text-align: center;
}

.analytics-canvas-wrap {
    position: relative;
    min-width: 0;
    width: 100%;
    border: 1px solid rgba(55, 138, 221, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(55, 138, 221, 0.06), rgba(55, 138, 221, 0.015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.analytics-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.analytics-canvas-wrap-donut {
    min-height: 304px;
    padding: 0.7rem;
}

.analytics-canvas-wrap-donut-sm {
    min-height: 248px;
    padding: 0.55rem;
}

.analytics-canvas-wrap-trend,
.analytics-canvas-wrap-bar {
    min-height: 284px;
    padding: 0.75rem 0.75rem 0.55rem;
}

/* Geo choropleth */
.geo-card-head {
    flex-wrap: wrap;
    gap: 0.9rem;
}

.geo-controls {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr);
    gap: 0.75rem;
    align-items: end;
    width: 100%;
}

.geo-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--glass-bg);
    box-shadow: 0 8px 20px rgba(13, 27, 42, 0.04);
    min-height: 52px;
}

.geo-toggle-btn {
    border: 0;
    background: transparent;
    color: var(--ink-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.55rem 1.05rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s, transform .2s;
    min-height: 42px;
}

.geo-toggle-btn:hover {
    color: var(--blue-700);
    background: rgba(55, 138, 221, 0.08);
}

.geo-toggle-btn:focus-visible {
    outline: 3px solid rgba(55, 138, 221, 0.22);
    outline-offset: 2px;
}

.geo-toggle-btn.is-active,
.geo-toggle-btn[aria-selected='true'] {
    background: var(--blue-700);
    color: white;
    box-shadow: 0 10px 18px rgba(15, 36, 110, 0.18);
}

.geo-metric-controls {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.geo-metric {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.geo-metric-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.geo-metric-select {
    min-height: 52px;
    padding: 0.35rem 2.1rem 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
}

.geo-metric-select:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.12);
}

.geo-scale {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--glass-bg);
    box-shadow: 0 8px 20px rgba(13, 27, 42, 0.04);
    min-height: 52px;
}

.geo-scale-btn {
    border: 0;
    background: transparent;
    color: var(--ink-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.55rem 1.05rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
    min-height: 42px;
}

@media (max-width: 900px) {
    .geo-controls {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .geo-metric-controls {
        grid-template-columns: 1fr;
    }

    .geo-toggle,
    .geo-scale {
        width: fit-content;
    }

    .geo-map {
        height: clamp(320px, 60vw, 480px);
    }
}

@media (max-width: 640px) {
    .geo-toggle,
    .geo-scale {
        width: 100%;
        justify-content: space-between;
    }

    .geo-toggle-btn,
    .geo-scale-btn {
        flex: 1 1 0;
        justify-content: center;
    }

    .geo-map {
        height: clamp(300px, 70vw, 440px);
    }
}

.geo-scale-btn:hover {
    color: var(--blue-700);
    background: rgba(55, 138, 221, 0.08);
}

.geo-scale-btn.is-active,
.geo-scale-btn[aria-pressed='true'] {
    background: var(--blue-700);
    color: white;
    box-shadow: 0 10px 18px rgba(15, 36, 110, 0.18);
}

.geo-card-body {
    display: grid;
    gap: 0.9rem;
}

.geo-map {
    width: 100%;
    height: clamp(360px, 44vw, 520px);
    border: 1px solid rgba(55, 138, 221, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(55, 138, 221, 0.06), rgba(55, 138, 221, 0.015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

.geo-hint {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--ink-muted);
}

.geo-summary {
    margin-top: 0.7rem;
    padding: 0.75rem 0.85rem;
    border-radius: 16px;
    border: 1px dashed rgba(55, 138, 221, 0.14);
    background: rgba(55, 138, 221, 0.035);
    color: var(--ink-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.geo-summary strong {
    color: var(--ink);
}

.geo-footnote {
    margin: 0;
    font-size: 0.78rem;
    color: var(--ink-muted);
}

.geo-legend {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.7rem;
    align-items: center;
    padding: 0.6rem 0.7rem;
    border-radius: 14px;
    border: 1px solid rgba(55, 138, 221, 0.08);
    background: rgba(55, 138, 221, 0.04);
    font-size: 0.76rem;
    color: var(--ink-muted);
}

.geo-legend-min,
.geo-legend-max {
    font-weight: 800;
    color: var(--ink);
}

.geo-legend-bar {
    height: 0.62rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #f1f6fd, #c3defc, #378add);
}

.geo-map .leaflet-control-zoom {
    border: none;
    box-shadow: 0 12px 22px rgba(13, 27, 42, 0.12);
}

.geo-map .leaflet-control-zoom a {
    border: 1px solid rgba(13, 27, 42, 0.12);
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink);
}

.geo-map .leaflet-control-zoom a:hover {
    background: rgba(55, 138, 221, 0.08);
    color: var(--blue-700);
}

.leaflet-tooltip.geo-tooltip {
    border: 1px solid rgba(13, 27, 42, 0.12);
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    padding: 0.55rem 0.65rem;
    border-radius: 14px;
    box-shadow: 0 18px 34px rgba(13, 27, 42, 0.18);
}

.geo-tooltip-title {
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 0.1rem;
}

.geo-tooltip-value {
    font-family: 'DM Serif Display', serif;
    font-size: 1.35rem;
    line-height: 1.05;
    letter-spacing: 0.02em;
}

.geo-tooltip-meta {
    margin-top: 0.12rem;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--ink-muted);
}

.geo-tooltip-sub {
    margin-top: 0.25rem;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--ink-muted);
}

html[data-theme='dark'] .geo-map {
    border-color: rgba(95, 173, 202, 0.18);
    background: linear-gradient(180deg, rgba(55, 138, 221, 0.12), rgba(2, 6, 23, 0.02));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme='dark'] .geo-legend {
    border-color: rgba(95, 173, 202, 0.18);
    background: rgba(15, 23, 38, 0.72);
}

html[data-theme='dark'] .geo-summary {
    border-color: rgba(95, 173, 202, 0.18);
    background: rgba(15, 23, 38, 0.58);
    color: rgba(231, 238, 248, 0.72);
}

html[data-theme='dark'] .geo-summary strong {
    color: #e7eef8;
}

html[data-theme='dark'] .geo-map .leaflet-control-zoom a {
    background: rgba(15, 23, 38, 0.92);
    border-color: rgba(148, 163, 184, 0.22);
    color: #e7eef8;
}

html[data-theme='dark'] .geo-map .leaflet-control-zoom a:hover {
    background: rgba(55, 138, 221, 0.16);
    color: #dcecff;
}

html[data-theme='dark'] .leaflet-tooltip.geo-tooltip {
    background: rgba(15, 23, 38, 0.96);
    border-color: rgba(148, 163, 184, 0.22);
    color: #e7eef8;
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.54);
}

html[data-theme='dark'] .geo-tooltip-meta {
    color: rgba(231, 238, 248, 0.72);
}

.status-strip,
.composition-strip {
    display: flex;
    gap: 0.35rem;
    min-height: 1rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
}

.status-segment,
.composition-segment {
    flex: 0 0 var(--segment-share);
    min-width: 0;
    border-radius: 999px;
}

.tone-success {
    --tone-solid: #14a06f;
    --tone-soft: rgba(20, 160, 111, 0.18);
}

.tone-warning {
    --tone-solid: #d58c18;
    --tone-soft: rgba(213, 140, 24, 0.18);
}

.tone-danger {
    --tone-solid: #d14a4a;
    --tone-soft: rgba(209, 74, 74, 0.18);
}

.tone-neutral {
    --tone-solid: #708198;
    --tone-soft: rgba(112, 129, 152, 0.18);
}

.tone-violet {
    --tone-solid: #6e55d9;
    --tone-soft: rgba(110, 85, 217, 0.18);
}

.tone-info {
    --tone-solid: #2f7fd5;
    --tone-soft: rgba(47, 127, 213, 0.18);
}

.tone-indigo {
    --tone-solid: #455fdf;
    --tone-soft: rgba(69, 95, 223, 0.18);
}

.status-segment,
.composition-segment,
.analytics-legend-dot,
.attention-badge,
.rank-fill {
    background: var(--tone-solid);
}

.analytics-legend-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.analytics-legend-stack {
    display: grid;
    gap: 0.75rem;
}

.analytics-legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.analytics-legend-item.is-muted {
    opacity: 0.5;
}

.analytics-legend-item.is-muted .analytics-legend-dot {
    box-shadow: none;
}

.analytics-legend-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    flex-shrink: 0;
    box-shadow: 0 0 0 5px var(--tone-soft);
}

.analytics-legend-copy {
    min-width: 0;
    display: grid;
    gap: 0.1rem;
}

.analytics-legend-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ink);
}

.analytics-legend-meta {
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--ink-muted);
}

.trend-bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
    gap: 0.75rem;
    align-items: end;
    min-height: 12rem;
}

.trend-bar-item {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
}

.trend-bar-value {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--ink);
}

.trend-bar-shell {
    width: 100%;
    height: 8.5rem;
    display: flex;
    align-items: flex-end;
    padding: 0.32rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(55, 138, 221, 0.08), rgba(55, 138, 221, 0.02));
}

.trend-bar-fill {
    width: 100%;
    height: var(--bar-share);
    border-radius: 14px;
    background: linear-gradient(180deg, #6eb9ff, #2f7fd5);
    box-shadow: 0 10px 18px rgba(47, 127, 213, 0.2);
}

.trend-bar-fill:not(.is-empty) {
    min-height: 0.9rem;
}

.trend-bar-fill.is-empty {
    min-height: 0;
    background: linear-gradient(180deg, rgba(110, 185, 255, 0.18), rgba(47, 127, 213, 0.08));
    box-shadow: none;
}

.trend-bar-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink-muted);
}

.rank-list {
    display: grid;
    gap: 0.85rem;
}

.rank-row {
    display: grid;
    gap: 0.42rem;
}

.rank-row-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
}

.rank-label {
    min-width: 0;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--ink);
}

.rank-value {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--ink-muted);
}

.rank-track {
    height: 0.68rem;
    padding: 0.08rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
}

.rank-fill {
    display: block;
    width: var(--track-share);
    height: 100%;
    border-radius: 999px;
}

.rank-fill.tone-emerald {
    background: linear-gradient(90deg, #0ea779, #27c98b);
}

.attention-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.95rem;
}

.attention-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    min-width: 0;
    padding: 1rem 1.05rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.52);
}

.attention-copy {
    min-width: 0;
    display: grid;
    gap: 0.2rem;
}

.attention-title {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--ink);
}

.attention-subtitle {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--ink-muted);
}

.attention-meta {
    flex-shrink: 0;
    display: grid;
    justify-items: end;
    gap: 0.35rem;
}

.attention-date {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--ink-faint);
    text-align: right;
}

.attention-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.9rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.attention-item.tone-danger .attention-badge {
    background: linear-gradient(135deg, #c33636, #e35b5b);
}

.attention-item.tone-warning .attention-badge {
    background: linear-gradient(135deg, #ca7d12, #e4a039);
}

.attention-item.tone-info .attention-badge {
    background: linear-gradient(135deg, #256ad4, #4e9eff);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.cards-grid-mitra {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.kcard {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: 0 12px 28px rgba(13, 27, 42, 0.05);
    transition: box-shadow .25s, transform .25s, border-color .25s;
    cursor: default;
}

.kcard:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: var(--border-md);
}

.kcard-accent {
    position: absolute;
    top: 0;
    left: 1.4rem;
    right: 1.4rem;
    height: 3px;
    background: var(--kcard-accent, var(--blue-500));
    border-radius: 0 0 4px 4px;
    opacity: 0;
    transition: opacity .25s;
}

.kcard.badge-active {
    --kcard-accent: linear-gradient(90deg, #12805f, #22b884);
}

.kcard.badge-warning {
    --kcard-accent: linear-gradient(90deg, #b86a0a, #f59e0b);
}

.kcard.badge-expired {
    --kcard-accent: linear-gradient(90deg, #a51d1d, #ef4444);
}

.kcard.badge-inactive,
.kcard.badge-draft {
    --kcard-accent: linear-gradient(90deg, #64748b, #94a3b8);
}

.kcard.badge-process {
    --kcard-accent: linear-gradient(90deg, #35206d, #5b3db7);
}

.kcard:hover .kcard-accent {
    opacity: 1;
}

.kcard-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
    min-height: 3.2rem;
}

.kcard-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.status-pill {
    --status-bg: rgba(100, 116, 139, 0.12);
    --status-bg-strong: rgba(100, 116, 139, 0.18);
    --status-border: rgba(100, 116, 139, 0.24);
    --status-text: #475569;
    --status-dot: #64748b;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-height: 1.85rem;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1;
    white-space: nowrap;
    color: var(--status-text);
    padding: 0.38rem 0.76rem;
    border-radius: 100px;
    border: 1px solid var(--status-border);
    background: linear-gradient(180deg, var(--status-bg), var(--status-bg-strong));
    box-shadow: 0 7px 16px rgba(13, 27, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.62);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.status-pill::before {
    content: '';
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 999px;
    background: var(--status-dot);
    box-shadow: 0 0 0 3px var(--status-bg);
    flex-shrink: 0;
}

.status-pill.badge-active {
    --status-bg: rgba(29, 158, 117, 0.12);
    --status-bg-strong: rgba(29, 158, 117, 0.18);
    --status-border: rgba(29, 158, 117, 0.28);
    --status-text: #0f6e56;
    --status-dot: #16a36f;
}

.status-pill.badge-warning {
    --status-bg: rgba(245, 158, 11, 0.13);
    --status-bg-strong: rgba(245, 158, 11, 0.2);
    --status-border: rgba(186, 117, 23, 0.28);
    --status-text: #a15d07;
    --status-dot: #f59e0b;
}

.status-pill.badge-expired {
    --status-bg: rgba(239, 68, 68, 0.11);
    --status-bg-strong: rgba(239, 68, 68, 0.18);
    --status-border: rgba(185, 28, 28, 0.25);
    --status-text: #b42318;
    --status-dot: #ef4444;
}

.status-pill.badge-inactive,
.status-pill.badge-draft {
    --status-bg: rgba(100, 116, 139, 0.11);
    --status-bg-strong: rgba(100, 116, 139, 0.17);
    --status-border: rgba(100, 116, 139, 0.25);
    --status-text: #536171;
    --status-dot: #64748b;
}

.status-pill.badge-process {
    --status-bg: rgba(59, 33, 122, 0.12);
    --status-bg-strong: rgba(59, 33, 122, 0.2);
    --status-border: rgba(59, 33, 122, 0.28);
    --status-text: #3b217a;
    --status-dot: #4c2aa0;
}

@media (hover: hover) and (pointer: fine) {

    .kcard:hover .status-pill,
    .status-pill:hover {
        transform: translateY(-1px);
        border-color: color-mix(in srgb, var(--status-dot) 42%, transparent);
        box-shadow: 0 11px 22px rgba(13, 27, 42, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    }
}

.kcard-mitra {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1.1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--blue-700);
    line-height: 1.5;
}

.mitra-dot {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--blue-50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--blue-700);
    flex-shrink: 0;
}

.kcard-meta {
    flex-grow: 1;
    border-top: 1px solid var(--border);
    padding-top: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.meta-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    font-size: 0.84rem;
    gap: 0.25rem;
}

.meta-key {
    color: var(--ink-faint);
    font-weight: 500;
}

.meta-val {
    color: var(--ink-muted);
}

.kcard-footer {
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--blue-700);
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--blue-100);
    background: var(--blue-50);
    transition: background .2s, border-color .2s;
    cursor: pointer;
}

.btn-detail:hover {
    background: var(--blue-500);
    border-color: var(--blue-300);
    color: #ffffff;
}

.btn-detail svg {
    transition: transform .2s;
}

.btn-detail:hover svg {
    transform: translateX(3px);
}

.mcard {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    min-height: 100%;
    padding: 1.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(55, 138, 221, 0.04), rgba(255, 255, 255, 0)),
        var(--surface);
    box-shadow: 0 12px 28px rgba(13, 27, 42, 0.05);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.mcard::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(16, 163, 127, 0.88), rgba(55, 138, 221, 0.76));
    opacity: 0;
    transition: opacity .25s;
}

.mcard:hover {
    transform: translateY(-4px);
    border-color: var(--border-md);
    box-shadow: var(--shadow-hover);
}

.mcard:hover::after {
    opacity: 1;
}

.mcard-top {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: start;
    min-height: 5.15rem;
}

.mcard-avatar {
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(55, 138, 221, 0.18), rgba(159, 214, 225, 0.55));
    color: var(--blue-700);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

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

.mcard-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ink);
}

.mcard-subtitle {
    margin-top: 0.25rem;
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--ink-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mcard-category {
    grid-column: 1 / -1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(55, 138, 221, 0.16);
    border-radius: 999px;
    background: rgba(55, 138, 221, 0.08);
    color: var(--blue-700);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.mcard-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.mcard-highlight {
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
}

.mcard-highlight-key {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 0.42rem;
}

.mcard-highlight-val {
    display: block;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--ink);
}

.mcard-meta {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.mcard .meta-row {
    grid-template-columns: 80px 1fr;
}

.inline-link {
    color: var(--blue-700);
    text-decoration: none;
    font-weight: 700;
    word-break: break-word;
}

.inline-link:hover {
    text-decoration: underline;
}

html[data-theme='dark'] .mcard {
    background:
        linear-gradient(180deg, rgba(55, 138, 221, 0.08), rgba(15, 23, 38, 0)),
        rgba(15, 23, 38, 0.96);
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: 0 20px 44px rgba(2, 6, 23, 0.34);
}

html[data-theme='dark'] .mcard-avatar {
    background: linear-gradient(135deg, rgba(55, 138, 221, 0.24), rgba(45, 212, 191, 0.2));
    color: #cbe4ff;
}

html[data-theme='dark'] .mcard-category {
    border-color: rgba(96, 165, 250, 0.24);
    background: rgba(37, 99, 235, 0.16);
    color: #cbe4ff;
}

html[data-theme='dark'] .mcard-highlight {
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 38, 0.82);
}

/* ─── MODAL ───────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: var(--overlay-bg);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 580px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(13, 27, 42, 0.22);
    animation: modalIn .22s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-head {
    padding: 1.4rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.modal-close {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-md);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-faint);
    flex-shrink: 0;
    transition: background .2s, color .2s;
}

.modal-close:hover {
    background: var(--bg);
    color: var(--ink);
}

.modal-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.modal-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin: 1.25rem 0 0.65rem;
}

.modal-section-label:first-child {
    margin-top: 0;
}

.modal-field {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0.5rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.modal-field:last-child {
    border-bottom: none;
}

.modal-fkey {
    color: var(--ink-faint);
    font-weight: 500;
}

.modal-fval {
    color: var(--ink);
}

/* ─── EMPTY STATE ─────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px dashed var(--border-md);
    color: var(--ink-muted);
}

.empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--ink-faint);
}

.empty-state h3 {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
    color: var(--ink);
}

.empty-state p {
    font-size: 0.88rem;
}

/* ─── PAGINATION ──────────────────────────────────── */
.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 3.5rem;
    width: 100%;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 0.6rem;
    padding: 0;
    margin: 0;
    align-items: center;
}

.page-item .page-link,
.page-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border-md);
    border-radius: 8px;
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(13, 27, 42, 0.04);
}

.page-item.disabled .page-link,
.page-item.disabled span {
    background: var(--bg);
    color: var(--ink-faint);
    cursor: not-allowed;
    border-color: var(--border);
    box-shadow: none;
}

.page-item:not(.disabled) .page-link:hover {
    border-color: var(--blue-500);
    color: var(--blue-700);
    background: var(--blue-50);
    box-shadow: 0 4px 12px rgba(55, 138, 221, 0.12);
    transform: translateY(-2px);
}

/* ─── TRUST STRIP ─────────────────────────────────── */
.trust-strip {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 2rem;
    overflow: hidden;
}

.trust-inner {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: center;
}

.trust-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--ink-muted);
    font-weight: 500;
}

.trust-item svg {
    color: var(--blue-500);
}

/* ─── FOOTER ──────────────────────────────────────── */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 1.75rem 2rem;
    font-size: 0.83rem;
}

footer a {
    color: var(--blue-300);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

html[data-theme='dark'] .theme-toggle {
    background: rgba(15, 23, 38, 0.96);
    border-color: rgba(95, 173, 202, 0.2);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.26);
}

html[data-theme='dark'] .nav-menu {
    background: rgba(15, 23, 38, 0.78);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.28);
}

html[data-theme='dark'] .mobile-menu-toggle,
html[data-theme='dark'] .mobile-sidebar-close {
    background: rgba(15, 23, 38, 0.96);
    border-color: rgba(95, 173, 202, 0.2);
    color: var(--ink-muted);
}

html[data-theme='dark'] .mobile-sidebar {
    background: #0b1422;
    border-right-color: rgba(148, 163, 184, 0.16);
    box-shadow: 28px 0 64px rgba(2, 6, 23, 0.48);
}

html[data-theme='dark'] .mobile-sidebar-overlay {
    background: rgba(2, 6, 23, 0.66);
}

html[data-theme='dark'] .theme-toggle-orb {
    background: linear-gradient(135deg, #f3d17b, #f4b547);
    color: #1f2a3d;
    box-shadow: 0 10px 22px rgba(244, 181, 71, 0.18);
}

html[data-theme='dark'] .theme-icon-moon {
    opacity: 0;
    transform: scale(0.62) rotate(25deg);
}

html[data-theme='dark'] .theme-icon-sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

html[data-theme='dark'] .btn-ghost {
    color: #c7d4e5;
    background: rgba(15, 23, 38, 0.72);
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme='dark'] .btn-ghost:hover {
    background: rgba(55, 138, 221, 0.15);
    border-color: rgba(95, 173, 202, 0.28);
    color: var(--blue-100);
}

html[data-theme='dark'] .logo-text span,
html[data-theme='dark'] .hero h1 em,
html[data-theme='dark'] .section-eyebrow,
html[data-theme='dark'] .kcard-mitra {
    color: var(--blue-100);
}

html[data-theme='dark'] .nav-link:hover {
    background: rgba(55, 138, 221, 0.14);
    color: var(--blue-100);
}

html[data-theme='dark'] .nav-link.is-active,
html[data-theme='dark'] .nav-link.is-active:hover {
    background: linear-gradient(135deg, #1b4f85, #378add);
    color: #ffffff;
}

html[data-theme='dark'] .mobile-sidebar-link:hover {
    background: rgba(55, 138, 221, 0.14);
    color: var(--blue-100);
}

html[data-theme='dark'] .mobile-sidebar-link.is-active {
    background: linear-gradient(135deg, #1b4f85, #378add);
    color: #ffffff;
}

html[data-theme='dark'] .mobile-sidebar-icon {
    background: rgba(55, 138, 221, 0.14);
    color: var(--blue-100);
}

html[data-theme='dark'] .hero-blob {
    background: radial-gradient(circle, rgba(55, 138, 221, 0.18) 0%, transparent 65%);
}

html[data-theme='dark'] .hero-eyebrow,
html[data-theme='dark'] .badge-aktif,
html[data-theme='dark'] .badge-menunggu,
html[data-theme='dark'] .hfs-icon,
html[data-theme='dark'] .mitra-dot,
html[data-theme='dark'] .btn-detail,
html[data-theme='dark'] .page-item:not(.disabled) .page-link:hover {
    background: rgba(55, 138, 221, 0.15);
    color: var(--blue-100);
}

html[data-theme='dark'] .btn-detail {
    border-color: rgba(55, 138, 221, 0.24);
}

html[data-theme='dark'] .btn-detail:hover {
    background: var(--blue-500);
    border-color: var(--blue-300);
    color: #ffffff;
}

html[data-theme='dark'] .badge-selesai {
    background: rgba(29, 158, 117, 0.16);
    color: #8fe0c3;
}

html[data-theme='dark'] .badge-draft {
    background: rgba(186, 117, 23, 0.18);
    color: #f6ca88;
}

html[data-theme='dark'] .badge-revisi {
    background: rgba(153, 60, 29, 0.18);
    color: #ffb29a;
}

html[data-theme='dark'] .status-pill {
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .status-pill.badge-active {
    --status-bg: rgba(29, 158, 117, 0.16);
    --status-bg-strong: rgba(29, 158, 117, 0.23);
    --status-border: rgba(96, 211, 165, 0.28);
    --status-text: #8fe0c3;
    --status-dot: #49d69d;
}

html[data-theme='dark'] .status-pill.badge-warning {
    --status-bg: rgba(245, 158, 11, 0.17);
    --status-bg-strong: rgba(245, 158, 11, 0.25);
    --status-border: rgba(246, 202, 136, 0.28);
    --status-text: #f6ca88;
    --status-dot: #f59e0b;
}

html[data-theme='dark'] .status-pill.badge-expired {
    --status-bg: rgba(239, 68, 68, 0.15);
    --status-bg-strong: rgba(239, 68, 68, 0.23);
    --status-border: rgba(252, 165, 165, 0.26);
    --status-text: #ffaaa5;
    --status-dot: #fb5b5b;
}

html[data-theme='dark'] .status-pill.badge-inactive,
html[data-theme='dark'] .status-pill.badge-draft {
    --status-bg: rgba(148, 163, 184, 0.13);
    --status-bg-strong: rgba(148, 163, 184, 0.2);
    --status-border: rgba(203, 213, 225, 0.22);
    --status-text: #c6d0dc;
    --status-dot: #94a3b8;
}

html[data-theme='dark'] .status-pill.badge-process {
    --status-bg: rgba(91, 61, 183, 0.18);
    --status-bg-strong: rgba(91, 61, 183, 0.28);
    --status-border: rgba(201, 196, 255, 0.24);
    --status-text: #c9c4ff;
    --status-dot: #9b8cff;
}

html[data-theme='dark'] .preview-mini-card {
    background: rgba(255, 255, 255, 0.03);
}

html[data-theme='dark'] .filter-toggle,
html[data-theme='dark'] .hero-card-preview,
html[data-theme='dark'] .hero-floating-stat {
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.34);
}

html[data-theme='dark'] .filter-panel {
    border-color: rgba(148, 163, 184, 0.16);
    background:
        linear-gradient(135deg, rgba(55, 138, 221, 0.12), rgba(159, 214, 225, 0.03)),
        rgba(15, 23, 38, 0.94);
    box-shadow: 0 22px 44px rgba(2, 6, 23, 0.34);
}

html[data-theme='dark'] .filter-option:hover span {
    background: rgba(55, 138, 221, 0.12);
    color: var(--blue-100);
}

html[data-theme='dark'] .sort-wrap {
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.34);
}

html[data-theme='dark'] .sort-select,
html[data-theme='dark'] .btn-reset-search {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink-muted);
}

html[data-theme='dark'] .btn-reset-search:hover {
    border-color: var(--blue-300);
    background: rgba(55, 138, 221, 0.14);
    color: #ffffff;
}

html[data-theme='dark'] .filter-option input:checked+span,
html[data-theme='dark'] .filter-option.is-active span {
    background: linear-gradient(135deg, #1b4f85, #378add);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(8, 21, 49, 0.34);
}

html[data-theme='dark'] .modal-close:hover,
html[data-theme='dark'] .empty-icon,
html[data-theme='dark'] .page-item.disabled .page-link,
html[data-theme='dark'] .page-item.disabled span {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme='dark'] .page-item .page-link,
html[data-theme='dark'] .page-item span {
    box-shadow: none;
}

html[data-theme='dark'] .results-overview {
    border-color: rgba(148, 163, 184, 0.16);
    background:
        linear-gradient(135deg, rgba(55, 138, 221, 0.12), rgba(159, 214, 225, 0.03)),
        rgba(15, 23, 38, 0.92);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.28);
}

html[data-theme='dark'] .results-mode {
    border-color: rgba(96, 165, 250, 0.24);
    background: rgba(37, 99, 235, 0.16);
    color: var(--blue-100);
}

html[data-theme='dark'] .result-chip {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme='dark'] .result-chip.is-active {
    border-color: rgba(95, 173, 202, 0.24);
    background: rgba(55, 138, 221, 0.16);
    color: var(--blue-100);
}

html[data-theme='dark'] .result-chip.is-active::before {
    box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.18);
}

html[data-theme='dark'] .result-chip-reset:hover {
    border-color: var(--blue-300);
    background: rgba(55, 138, 221, 0.14);
    color: #ffffff;
}

/* ─── RESPONSIVE ──────────────────────────────────── */
html[data-theme='dark'] .analytics-card {
    border-color: rgba(148, 163, 184, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, rgba(55, 138, 221, 0.14), rgba(159, 214, 225, 0.04)),
        rgba(15, 23, 38, 0.92);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.28);
}

html[data-theme='dark'] .analytics-section {
    background:
        radial-gradient(circle at top right, rgba(55, 138, 221, 0.16), transparent 34%),
        radial-gradient(circle at left 18%, rgba(29, 158, 117, 0.1), transparent 28%),
        var(--bg);
}

html[data-theme='dark'] .analytics-section::after {
    background: linear-gradient(180deg, rgba(8, 17, 29, 0), var(--bg));
}

html[data-theme='dark'] .analytics-kicker {
    color: var(--blue-100);
}

html[data-theme='dark'] .analytics-empty,
html[data-theme='dark'] .attention-item {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme='dark'] .analytics-canvas-wrap {
    border-color: rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(55, 138, 221, 0.12), rgba(15, 23, 38, 0.3));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme='dark'] .status-strip,
html[data-theme='dark'] .composition-strip,
html[data-theme='dark'] .rank-track,
html[data-theme='dark'] .trend-bar-shell {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme='dark'] .analytics-legend-meta,
html[data-theme='dark'] .analytics-card-note,
html[data-theme='dark'] .analytics-context,
html[data-theme='dark'] .attention-date {
    color: rgba(208, 222, 240, 0.72);
}

@media (min-width: 1280px) {

    .nav-inner,
    .hero-inner {
        max-width: 1240px;
    }

    .btn-primary {
        padding-inline: 1.75rem;
    }
}

@media (max-width: 1100px) {
    .analytics-shell {
        padding: 2.4rem 1.5rem 1.45rem;
    }

    .section-top {
        gap: 1rem;
    }

    .section-top-copy {
        max-width: none;
    }

    .nav-inner {
        padding: 0 1.5rem;
        gap: 0.7rem;
    }

    .logo-text {
        font-size: 1.08rem;
    }

    .nav-right {
        gap: 0.55rem;
    }

    .nav-menu {
        gap: 0.2rem;
        padding: 0.22rem;
    }

    .nav-link,
    .btn-nav {
        font-size: 0.82rem;
    }

    .nav-link {
        padding-inline: 0.72rem;
    }

    .theme-toggle {
        gap: 0.45rem;
        padding-right: 0.62rem;
    }

    .hero-cta {
        gap: 0.7rem;
    }

    .results-overview {
        grid-template-columns: 1fr;
    }

    .results-chips {
        justify-content: flex-start;
    }

    .filter-stack-secondary {
        grid-template-columns: minmax(0, 1fr) minmax(210px, 0.72fr) auto;
    }

    .analytics-wrap-head {
        grid-template-columns: 1fr;
    }

    .analytics-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .analytics-context,
    .analytics-card-note {
        max-width: none;
        text-align: left;
    }

    .analytics-card,
    .analytics-card-wide,
    .analytics-card-full {
        grid-column: span 6;
    }

    .analytics-card-body-split,
    .analytics-card-body-compact {
        grid-template-columns: 1fr;
    }

    .analytics-card-head {
        min-height: 0;
    }
}

@media (max-width: 900px) {
    :root {
        --nav-offset: 66px;
    }

    .nav-inner {
        min-height: 66px;
        flex-wrap: nowrap;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .btn-nav {
        padding-inline: 0.95rem;
    }

    .hero {
        align-items: center;
        min-height: 100vh;
        min-height: 100svh;
        padding-top: 7.75rem;
        scroll-margin-top: 0;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        display: none;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .section-title {
        font-size: 1.7rem;
        line-height: 1.18;
    }

    .section-sub {
        font-size: 0.88rem;
        line-height: 1.55;
    }

    .hero-cta {
        align-items: stretch;
    }

    .btn-primary,
    .btn-ghost {
        min-height: 48px;
    }

    .filter-bar {
        width: 100%;
        justify-content: flex-start;
    }

    .filter-stack-primary,
    .filter-stack-secondary,
    .filter-group {
        width: 100%;
    }

    .filter-stack-secondary {
        grid-template-columns: 1fr;
    }

    .filter-group .filter-toggle,
    .scope-toggle {
        width: 100%;
    }

    .filter-group .filter-option,
    .scope-toggle .filter-option {
        flex: 1 1 0;
    }

    .filter-group .filter-option span,
    .scope-toggle .filter-option span {
        width: 100%;
        min-width: 0;
    }

    .filter-sort,
    .filter-search,
    .filter-buttons {
        width: 100%;
    }

    .filter-buttons {
        justify-content: flex-start;
    }

    .btn-reset-search,
    .btn-search {
        flex: 1 1 auto;
    }

    .results-chips {
        max-width: none;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .analytics-card,
    .analytics-card-wide,
    .analytics-card-full {
        grid-column: span 1;
    }

    .analytics-shell {
        padding-bottom: 1.05rem;
    }

    .trust-strip {
        padding: 1.25rem 0;
    }

    .trust-inner {
        justify-content: flex-start;
        gap: 1rem;
        overflow-x: auto;
        padding: 0 1.5rem;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .trust-inner::-webkit-scrollbar {
        display: none;
    }

    .trust-item {
        scroll-snap-align: start;
    }

    .mcard-highlights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    :root {
        --nav-offset: 72px;
    }

    .top-nav {
        background: rgba(255, 255, 255, 0.94);
    }

    html[data-theme='dark'] .top-nav {
        background: rgba(8, 17, 29, 0.94);
    }

    .hero {
        padding: 7.75rem 1.25rem 3.5rem;
        scroll-margin-top: 0;
    }

    .nav-inner {
        min-height: 72px;
        padding: 0.55rem 1rem;
        gap: 0.65rem;
    }

    .nav-right {
        gap: 0.45rem;
        flex-shrink: 0;
    }

    .logo-mark {
        width: 32px;
        height: 32px;
    }

    .logo-text {
        font-size: 0.98rem;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        gap: 0;
        justify-content: center;
    }

    .theme-toggle-text {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-desc {
        font-size: 0.98rem;
    }

    .hero-cta {
        width: 100%;
        flex-direction: column;
        gap: 0.7rem;
    }

    .btn-primary,
    .btn-ghost {
        width: 100%;
        white-space: normal;
        text-align: center;
    }

    .section-top {
        flex-direction: column;
        align-items: stretch;
    }

    .section-eyebrow {
        font-size: 0.72rem;
    }

    .section-title {
        font-size: 1.45rem;
        line-height: 1.16;
    }

    .section-sub {
        font-size: 0.84rem;
    }

    .filter-bar {
        width: 100%;
        justify-content: flex-start;
        align-items: stretch;
    }

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

    .trust-inner {
        padding: 0 1.25rem;
    }

    .trust-item {
        font-size: 0.82rem;
    }

    .filter-toggle {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .filter-option span {
        width: 100%;
        min-width: 0;
    }

    .search-wrap,
    .filter-buttons {
        width: 100%;
    }

    .results-overview {
        padding: 0.95rem 1rem 1rem;
    }

    .analytics-shell {
        padding: 2rem 1.25rem 0.95rem;
    }

    .result-chip {
        white-space: normal;
    }

    .analytics-wrap {
        margin-bottom: 1.85rem;
    }

    .analytics-wrap-head {
        grid-template-columns: 1fr;
    }

    .analytics-card-head,
    .attention-item {
        flex-direction: column;
    }

    .analytics-context,
    .analytics-card-note,
    .attention-date {
        text-align: left;
    }

    .analytics-legend-grid,
    .attention-list {
        grid-template-columns: 1fr;
    }

    .analytics-canvas-wrap-donut {
        min-height: 238px;
    }

    .analytics-canvas-wrap-donut-sm,
    .analytics-canvas-wrap-trend,
    .analytics-canvas-wrap-bar {
        min-height: 210px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .mcard .meta-row {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .main-wrap {
        padding: 2.5rem 1.25rem 4rem;
    }

    .modal-field {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}

@media (max-width: 420px) {
    .nav-inner {
        align-items: center;
    }

    .logo {
        gap: 8px;
    }

    .logo-text {
        max-width: 112px;
        white-space: normal;
        line-height: 1.05;
    }

    .section-title {
        font-size: 1.34rem;
    }

    .section-sub {
        font-size: 0.82rem;
    }

    .trend-bars {
        grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
    }

    .btn-nav {
        min-height: 38px;
        padding-inline: 0.78rem;
        font-size: 0.78rem;
    }

    .theme-toggle,
    .theme-toggle-orb {
        width: 38px;
        height: 38px;
    }

    .theme-toggle {
        min-height: 38px;
    }

    .hero {
        padding-top: 8rem;
    }
}

@media (max-width: 360px) {
    .logo-text {
        display: none;
    }

    .btn-nav {
        padding-inline: 0.72rem;
    }
}
