:root {
    --ink: #161616;
    --muted: #8d929a;
    --line: #ececef;
    --sand: #d7d0c4;
    --green: #14944a;
    --mint: #3dcc8e;
    --red: #e11d48;
    --soft: #e8f4fb;
    --bg: #f3f7fb;
    --shadow: 0 16px 40px rgba(17, 17, 17, 0.08);
    --sidebar: 252px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    --accent: #0e4194;
    --accent-ink: #fff;
    --accent-soft: #e6f6fc;
    --accent-ring: rgba(14, 65, 148, 0.18);
    --sky: #21bbee;
    font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    letter-spacing: -0.011em;
}
button, input, select, textarea { font: inherit; color: inherit; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.shell { min-height: 100vh; display: flex; }
.sidebar {
    width: var(--sidebar);
    flex: none;
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 0 12px 14px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 22px; }
.mark {
    width: 38px; height: 38px; border-radius: 12px; background: var(--accent);
    color: var(--accent-ink); display: grid; place-items: center; flex: none;
}
.mark svg { width: 18px; height: 18px; }
.brand strong { display: block; font-size: 16px; letter-spacing: -0.04em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.3; white-space: normal; }
.brand > span { min-width: 0; max-width: 128px; }
.who { text-align: center; padding: 8px 10px 22px; }
.avatar, .avatar-sm {
    border-radius: 50%; display: grid; place-items: center; background: #efefef;
    font-weight: 700; letter-spacing: -0.04em;
}
.avatar { width: 74px; height: 74px; margin: 0 auto 12px; font-size: 20px; }
.avatar-sm { width: 36px; height: 36px; font-size: 12px; flex: none; }
.who strong { display: block; font-size: 14px; }
.who span, .muted { color: var(--muted); }
.who span { display: block; margin-top: 4px; font-size: 12px; }
.nav { display: grid; gap: 4px; align-content: start; overflow: auto; padding: 0 4px; }
.nav-link, .logout button {
    height: 42px; border-radius: 12px; display: flex; align-items: center; gap: 12px;
    padding: 0 12px; color: #8a8f98; background: transparent; border: 0; width: 100%; text-align: left;
}
.nav-link svg, .logout button svg, .icon-btn svg, .search svg, .kpi-badge svg { width: 18px; height: 18px; }
.nav-link:hover, .logout button:hover { background: var(--soft); color: var(--ink); }
.nav-link.is-active { background: #f3f3f4; color: var(--ink); font-weight: 500; }
.logout { padding-top: 8px; }
.main { flex: 1; min-width: 0; min-height: 100vh; margin-left: var(--sidebar); background: var(--bg); display: flex; flex-direction: column; padding-top: 64px; padding-bottom: 48px; }
.page-top {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
    padding: 22px 0 0;
}
.page-top h1 { margin: 0; font-size: 32px; letter-spacing: -0.055em; font-weight: 700; }
.crumb { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.crumb a:hover { color: var(--ink); }
.page-tools { display: flex; align-items: center; gap: 10px; padding-top: 6px; }
.search {
    height: 44px; min-width: 230px; background: #f7f7f8; border-radius: 14px;
    display: flex; align-items: center; gap: 10px; padding: 0 16px; color: #9aa0a8;
}
.search input { border: 0; outline: 0; background: transparent; width: 180px; margin: 0; padding: 0; color: var(--ink); }
.icon-btn, .menu-btn {
    width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line);
    background: #fff; display: grid; place-items: center;
}
.menu-btn, .shade { display: none; }
.content { padding: 8px 32px 28px; flex: 1; }
.flash {
    background: var(--accent); color: var(--accent-ink); border-radius: 16px; padding: 12px 14px; margin-bottom: 16px; font-size: 13px;
    box-shadow: 0 14px 34px var(--accent-ring);
}

.board { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.kpi-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; }
.kpi, .panel {
    background: #fff; border: 1px solid #efeff1; border-radius: 22px; box-shadow: 0 1px 0 rgba(17,17,17,0.02);
}
.kpi { padding: 18px 18px 16px; min-height: 148px; }
.kpi-dark { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--shadow); }
.kpi header, .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { color: #8d929a; font-size: 13px; }
.kpi-dark .kpi-label { color: #b9b9be; }
.kpi-badge {
    width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent);
}
.kpi-dark .kpi-badge { background: #2a2a2a; color: #fff; }
.kpi-value { display: flex; align-items: baseline; gap: 8px; margin-top: 22px; }
.kpi-value strong { font-size: 28px; letter-spacing: -0.05em; font-weight: 700; }
.kpi-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.delta { font-size: 12px; font-weight: 700; }
.delta.up { color: var(--green); }
.kpi-dark .delta.up { color: var(--mint); }
.delta.down { color: var(--red); }

.panel { padding: 18px 18px 16px; }
.panel + .panel, .stack > * + * { margin-top: 16px; }
.panel h2, .panel h3 { margin: 0; font-size: 16px; letter-spacing: -0.03em; }
.segment { display: inline-flex; background: #f5f5f6; border-radius: 999px; padding: 3px; margin-bottom: 16px; }
.segment a { padding: 6px 12px; border-radius: 999px; color: #7d828a; font-size: 12px; font-weight: 600; }
.segment a.is-on { background: var(--accent); color: var(--accent-ink); }
.chart-box { display: grid; grid-template-columns: 42px 1fr; gap: 8px; margin-top: 18px; }
.y-axis { display: flex; flex-direction: column; justify-content: space-between; color: #b0b4bb; font-size: 11px; height: 180px; }
.bars { display: grid; align-items: end; height: 200px; }
.bar-col { display: flex; flex-direction: column; align-items: center; height: 100%; }
.bar-pair { margin-top: auto; height: 168px; display: flex; align-items: flex-end; gap: 5px; }
.bar { width: 7px; border-radius: 99px; background: var(--sand); display: block; }
.bar.ink { background: var(--accent); }
.bar-col small { margin-top: 10px; color: #9aa0a8; font-size: 12px; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; margin-top: 8px; }
.swatch { width: 8px; height: 8px; border-radius: 99px; display: inline-block; margin-right: 6px; background: var(--sand); }
.swatch.ink { background: var(--accent); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: 12px; color: #a0a4ab; font-weight: 600; padding: 12px 10px; border-bottom: 1px dashed #ececef; }
table.data td { padding: 14px 10px; border-bottom: 1px solid #f4f4f5; vertical-align: middle; }
table.data .col-action { width: 1%; white-space: nowrap; text-align: right; padding-right: 16px; }
table.data tr:last-child td { border-bottom: 0; }
.name { font-weight: 700; }
.code { color: var(--muted); font-size: 12px; margin-top: 3px; }
.pill {
    display: inline-flex; align-items: center; border: 1px solid #e7e7ea; border-radius: 999px;
    padding: 6px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #fff;
}
.pill[data-tone="good"] { color: #067647; border-color: #d7f3e3; }
.pill[data-tone="bad"] { color: #be123c; border-color: #ffd7e1; }
.pill[data-tone="wait"] { color: #9a6700; border-color: #f5e6c4; }

.map-card { position: relative; min-height: 250px; overflow: hidden; }
.dots { width: 100%; height: 150px; }
.dots circle { fill: #d9d9de; }
.pin { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-ring); }
.tip {
    position: absolute; background: var(--accent); color: #fff; border-radius: 12px; padding: 8px 10px;
    font-size: 12px; min-width: 110px; box-shadow: var(--shadow);
}
.tip b { display: block; }
.tip span { color: #cfcfd4; }
.meter { height: 4px; background: #eee; border-radius: 99px; margin-top: 16px; position: relative; }
.meter span { position: absolute; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--sky); transform: translateX(-50%); }
.meter-scale { display: flex; justify-content: space-between; color: #b0b4bb; font-size: 11px; margin-top: 10px; }
.person { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.person + .person { border-top: 1px solid #f4f4f5; }
.person .grow { flex: 1; min-width: 0; }
.person strong, .person small { display: block; }
.person small { color: var(--muted); margin-top: 2px; }
.amount { font-weight: 700; white-space: nowrap; }

.filters, .form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.form-grid.two { grid-template-columns: 1.4fr 0.8fr; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.span-2 { grid-column: span 2; }
.field label { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea {
    width: 100%; border: 1px solid #ececef; background: #fbfbfc; border-radius: 12px; padding: 11px 14px; outline: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .js-date:focus {
    border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-ring);
}
.field-error { color: var(--red); font-size: 12px; margin: 4px 0 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: 12px; }
.btn, .btn-dark, .btn-ghost {
    border-radius: 12px; padding: 10px 14px; border: 1px solid transparent; font-weight: 700; font-size: 13px;
}
.btn-dark { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-ghost { background: #fff; border-color: var(--line); }
.btn-row { display: flex; gap: 8px; align-items: center; }
.actions { display: flex; gap: 8px; justify-content: flex-end; }
.form-grid .actions { grid-column: 1 / -1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--soft); border-radius: 16px; padding: 14px; }
.stat span { color: var(--muted); font-size: 12px; }
.stat strong { display: block; margin-top: 6px; font-size: 22px; letter-spacing: -0.04em; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 20px; padding: 16px; background: #fff; }
.card h3 { margin: 8px 0; letter-spacing: -0.03em; }
.card p { color: #6d727a; line-height: 1.5; min-height: 44px; }
.progress { height: 6px; background: #f0f0f2; border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.hero { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.team { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 999px; padding: 4px 10px 4px 4px; font-size: 12px; }
.split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; }
.timeline { display: grid; gap: 0; }
.when { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f3f3f4; }
.datebox { width: 52px; height: 52px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; text-align: center; flex: none; }
.datebox b { font-size: 16px; }
.datebox small { color: var(--muted); }
.edit { margin-top: 8px; }
.edit summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 14px; }
.pager-btn { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 12px; font-weight: 700; }
.pager-btn.is-disabled { color: #c5c7cc; }
.empty { padding: 28px 10px; text-align: center; color: var(--muted); }
.barline { height: 8px; background: #f1f1f3; border-radius: 99px; overflow: hidden; }
.barline span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--sky)); }
.login-body { min-height: 100vh; background: #f3f3f4; display: grid; place-items: center; padding: 28px; }
.login-shell { width: min(980px, 100%); display: grid; grid-template-columns: 0.9fr 1.1fr; background: #fff; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.login-aside { background: var(--accent); color: #fff; padding: 36px 32px; display: flex; flex-direction: column; }
.login-aside .mark { background: #2c2c2c; }
.login-aside h1 { font-size: 40px; letter-spacing: -0.06em; margin: 28px 0 10px; }
.login-aside p { color: #c8c8ce; line-height: 1.6; max-width: 320px; }
.login-aside .mini { margin-top: auto; display: grid; gap: 10px; }
.login-form { padding: 36px 34px; }
.login-form h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.05em; }
.demo { margin-top: 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.demo summary { cursor: pointer; }

@media (max-width: 1100px) {
    .board, .split, .login-shell, .form-grid.two { grid-template-columns: 1fr; }
    .kpi-row, .cards, .stats, .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .sidebar { transform: translateX(-105%); transition: 0.2s ease; }
    .main { margin-left: 0; }
    .sidebar.is-open { transform: none; }
    .menu-btn { display: grid; }
    .rail-btn { display: none; }
    .shade.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; }
    .content { padding-left: 18px; padding-right: 18px; }
    .page-top, .sheet-head { flex-direction: column; align-items: stretch; }
    .sheet-tools { justify-content: flex-start; }
    .sheet .search { min-width: 0; width: 100%; }
    .sheet .form-grid { grid-template-columns: 1fr; }
    .app-header, .app-footer { left: 0; padding-left: 16px; padding-right: 16px; }
    .app-header .search, .app-header .search input { width: auto; min-width: 0; flex: 1; }
    .header-user, .header-kicker { display: none; }
    .sheet-head { align-items: stretch; }
    .sheet-tools { width: 100%; }
    .sheet .search { flex: 1; min-width: 0; }
    .sheet .search input { width: 100%; min-width: 0; }
    .shell.is-rail .sidebar { width: var(--sidebar); }
    .shell.is-rail .brand > span, .shell.is-rail .nav-label, .shell.is-rail .nav-link span, .shell.is-rail .side-user span, .shell.is-rail .logout span { display: block; }
    .kpi-row, .cards, .stats, .filters, .form-grid { grid-template-columns: 1fr; }
    .hero { flex-direction: column; }
}

.brand strong { font-size: 14px; line-height: 1.2; max-width: 150px; }
.field .select2-container { width: 100% !important; }
.select2-container--default .select2-selection--single {
    height: 44px; border: 1px solid #ececef; border-radius: 12px; background: #fbfbfc;
    display: flex; align-items: center;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px; padding-left: 14px; color: #161616; font-weight: 500;
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; right: 8px; }
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-ring);
}

.toast-stack {
    position: fixed; top: 18px; right: 18px; z-index: 90; display: grid; gap: 10px;
    width: min(360px, calc(100vw - 36px));
}
.toast {
    display: flex; align-items: flex-start; gap: 10px; background: var(--accent); color: var(--accent-ink);
    border-radius: 16px; padding: 12px 12px 12px 14px; box-shadow: 0 16px 40px var(--accent-ring);
    animation: toast-in .22s ease; transition: opacity .18s ease, transform .18s ease;
}
.toast p { margin: 2px 0 0; line-height: 1.45; }
.toast strong { display: block; letter-spacing: -0.02em; }
.toast-mark {
    width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none;
    background: rgba(255,255,255,.18); font-weight: 800;
}
.toast-alert {
    background: #fff; color: var(--ink); border: 1px solid var(--accent-soft);
    border-left: 4px solid var(--accent); box-shadow: var(--shadow);
}
.toast-alert .toast-mark { background: var(--accent-soft); color: var(--accent); }
.toast-x {
    margin-left: auto; border: 0; background: transparent; color: inherit; width: 28px; height: 28px;
    border-radius: 8px; font-size: 18px; line-height: 1; opacity: .75;
}
.toast-x:hover { opacity: 1; background: rgba(0,0,0,.06); }
.toast-alert .toast-x:hover { background: var(--accent-soft); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.modal { position: fixed; inset: 0; background: rgba(17,17,17,.45); z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { width: min(420px, 100%); background: #fff; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.modal-mark {
    width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 12px;
    background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 18px;
}
.modal-card h3 { margin: 0 0 8px; letter-spacing: -0.04em; }
.modal-card p { color: #5d636c; line-height: 1.5; }
.calendar {
    position: absolute; z-index: 70; width: 280px; background: #fff; border: 1px solid #ececef;
    border-radius: 18px; box-shadow: var(--shadow); padding: 12px;
}
.calendar[hidden] { display: none; }
.calendar-head, .calendar-foot { display: flex; align-items: center; justify-content: space-between; }
.calendar-head strong { color: var(--accent); }
.calendar-head button, .calendar-foot button { border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 10px; width: 32px; height: 32px; }
.calendar-head button:hover, .calendar-foot button:hover { background: var(--accent); color: var(--accent-ink); }
.calendar-foot button { width: auto; padding: 0 10px; font-size: 12px; font-weight: 700; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 10px 0; }
.calendar-grid .dow { text-align: center; color: #9aa0a8; font-size: 11px; padding: 4px 0; }
.calendar-grid button { border: 0; background: transparent; border-radius: 10px; height: 32px; }
.calendar-grid button:hover { background: var(--accent-soft); color: var(--accent); }
.calendar-grid button.is-today { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.calendar-grid button.is-on, .calendar-grid button.is-on:hover { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.js-date { cursor: pointer; }

.theme-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.theme-card { border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.theme-card > span:last-child { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.theme-card.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme-swatch { height: 72px; border-radius: 12px; display: grid; grid-template-columns: 28px 1fr; overflow: hidden; border: 1px solid #eee; }
.theme-swatch i { display: block; }
.swatch-plain { background: #fff; }
.swatch-plain i:first-child { background: #0e4194; }
.swatch-plain i:last-child { background: linear-gradient(#fff, #f6f6f7); }
.swatch-nexus { background: #f5f7fb; }
.swatch-nexus i:first-child { background: #15253d; }
.swatch-nexus i:last-child { background: linear-gradient(#18a874, #e9f8f1); }
.matrix { width: 100%; border-collapse: collapse; }
.matrix th, .matrix td { border-bottom: 1px solid #f1f1f3; padding: 8px; text-align: center; font-size: 12px; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.matrix input { width: 16px; height: 16px; }

body.theme-nexus {
    --accent: #18a874;
    --accent-ink: #fff;
    --accent-soft: #e7f8f1;
    --accent-ring: rgba(24, 168, 116, 0.22);
    background: #f5f7fb; font-family: "DM Sans", "Plus Jakarta Sans", sans-serif;
}
body.theme-nexus .sidebar { background: linear-gradient(180deg, #15243b 0%, #1a2d46 100%); border-right: 0; color: #d5e0ee; }
body.theme-nexus .brand strong, body.theme-nexus .who strong { color: #fff; }
body.theme-nexus .brand small, body.theme-nexus .who span, body.theme-nexus .logout button { color: #9eb0c6; }
body.theme-nexus .nav-link { color: #c5d2e2; }
body.theme-nexus .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
body.theme-nexus .nav-link.is-active { background: linear-gradient(90deg, #1ca775, #17885f); color: #fff; box-shadow: none; }
body.theme-nexus .nav-label, body.theme-nexus .side-user small, body.theme-nexus .header-kicker { color: #9eb0c6; }
body.theme-nexus .app-header, body.theme-nexus .app-footer { background: rgba(245,247,251,.92); border-color: #e3e8f0; }
body.theme-nexus .main { background: #f5f7fb; }
body.theme-nexus .kpi-dark { background: #15253d; border-color: #15253d; }
body.theme-nexus .bar.ink { background: #18a874; }
body.theme-nexus .progress span, body.theme-nexus .barline span, body.theme-nexus .meter span { background: #18a874; }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at top, #fff, #ececef 55%, #e4e4e7); }
.gate-card, .login-shell { width: min(980px, 100%); }
.gate-card { width: min(460px, 100%); background: #fff; border-radius: 28px; padding: 36px 32px; box-shadow: 0 24px 60px rgba(17,17,17,.08); }
.gate-card h1, .login-form h2, .login-aside h1 { letter-spacing: -0.06em; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8d929a; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.login-body.plain { background: #e7f2fb; }
.login-body.nexus {
    --accent: #18a874;
    --accent-ink: #fff;
    --accent-soft: #e7f8f1;
    --accent-ring: rgba(24, 168, 116, 0.22);
    background: #e7eef6;
}
.platform-card .btn-dark { background: #fff; color: #111; }
.login-body.platform { background: #0f1216; }
.login-shell { display: grid; grid-template-columns: .92fr 1.08fr; background: #fff; border-radius: 30px; overflow: hidden; box-shadow: 0 30px 70px rgba(17,17,17,.12); min-height: 560px; }
.login-aside { padding: 40px 36px; display: flex; flex-direction: column; }
.login-aside h1 { font-size: 46px; margin: 22px 0 12px; }
.login-aside p { line-height: 1.6; max-width: 340px; }
.aside-foot { margin-top: auto; font-size: 13px; color: #9a9aa2; }
.login-form { padding: 42px 38px; display: flex; flex-direction: column; justify-content: center; }
.plain-aside {
    background:
        radial-gradient(90% 55% at 0% 0%, rgba(33, 187, 238, 0.38), transparent 52%),
        linear-gradient(165deg, #1460b8 0%, #0e4194 48%, #084090 100%);
    color: #fff;
}
.plain-aside p, .plain-aside .muted { color: #c8c8ce; }
.nexus-aside { background: linear-gradient(165deg, #15243b, #1b314c 60%, #143528); color: #fff; }
.nexus-aside p { color: #c9d7e8; }
.nexus-mark { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #24c78c, #168a62); color: #fff; }
.platform-card { width: min(440px, 100%); background: #171b21; color: #fff; border-radius: 28px; padding: 36px 32px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.platform-card p { color: #b7c0cc; }
.platform-card .field input { background: #101318; border-color: #2a313b; color: #fff; }
.demo { margin-top: 18px; color: #8d929a; font-size: 12px; line-height: 1.7; }
.demo summary { cursor: pointer; }
@media (max-width: 860px) {
    .login-shell, .theme-cards { grid-template-columns: 1fr; }
    .login-aside h1 { font-size: 36px; }
}

.side-head {
    height: 64px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin: 0 -12px; padding: 0 12px; border-bottom: 1px solid rgba(255,255,255,.16); flex: none;
}
.brand { padding: 0; min-width: 0; }
.nav { flex: 1; min-height: 0; padding: 8px 4px 0; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-label {
    margin: 0; padding: 4px 12px 6px; font-size: 11px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: #a0a4ab;
}
.nav-link { height: 40px; }
.nav-link.is-active { box-shadow: inset 3px 0 0 #111; }
.nav-link:focus-visible, .rail-btn:focus-visible, .menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rail-btn {
    width: 28px; height: 28px; border-radius: 8px; border: 0;
    background: transparent; display: grid; place-items: center; flex: none; color: #fff;
}
.rail-btn svg { width: 18px; height: 18px; stroke-width: 2; transition: transform .15s ease; }
.shell:not(.is-rail) .rail-btn svg { transform: rotate(180deg); }
.side-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; min-width: 0; }
.side-user span, .header-user span { min-width: 0; }
.side-user strong, .side-user small, .header-user strong, .header-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user small, .header-user small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.app-header {
    position: fixed; top: 0; left: var(--sidebar); right: 0; z-index: 25; height: 64px;
    display: flex; align-items: center; gap: 16px; padding: 0 24px;
    background: #fff; border-bottom: 1px solid #e3eaf3;
    box-shadow: 0 8px 24px rgba(14, 65, 148, 0.05);
}
.app-header::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--sky));
}
.header-id { min-width: 0; }
.header-kicker { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.content a:not(.btn-dark):not(.btn-ghost):not(.pager-btn) { color: var(--accent); }
.content a:not(.btn-dark):not(.btn-ghost):not(.pager-btn):hover { color: #084090; }
.content a.btn-dark { color: var(--accent-ink); }
.content a.btn-ghost, .content a.pager-btn { color: var(--ink); }
.brand-logo { width: 46px; height: 46px; object-fit: contain; flex: none; display: block; }
.brand-logo-lg { width: 88px; height: 88px; }
.shell.is-rail .side-head { gap: 2px; padding: 0 6px; }
.shell.is-rail .brand-logo { width: 32px; height: 32px; }
.shell.is-rail .rail-btn { width: 22px; height: 22px; }
.header-id strong { display: block; font-size: 15px; letter-spacing: -0.03em; }
.app-header .search {
    margin-left: auto; height: 36px; min-width: 240px; border-radius: 10px;
    background: #f4f8fc; border: 1px solid #e3eaf3; color: #7d8da3;
}
.app-header .search:focus-within { border-color: var(--sky); box-shadow: 0 0 0 3px var(--accent-ring); }
.header-tools { display: flex; align-items: center; gap: 8px; }
.tool { position: relative; }
.tool-btn {
    position: relative; height: 36px; min-width: 36px; padding: 0 10px; border: 1px solid #e3eaf3; border-radius: 10px;
    background: #f4f8fc; color: #24344a; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
}
.tool-btn svg { width: 18px; height: 18px; }
.tool-date { flex: none; white-space: nowrap; padding: 0 12px; }
.tool-btn:hover, .tool-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); background: #fff; }
.tool-dot {
    position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
    background: #c8414b; color: #fff; font-size: 10px; line-height: 16px; font-weight: 700; text-align: center;
}
.tool-pop {
    position: absolute; top: calc(100% + 8px); right: 0; width: 300px; z-index: 40;
    background: #fff; border: 1px solid #e3eaf3; border-radius: 14px; padding: 12px 14px;
    box-shadow: 0 16px 40px rgba(14, 65, 148, 0.12);
}
.tool-pop[hidden] { display: none; }
.tool-pop > strong { display: block; margin-bottom: 8px; font-size: 13px; }
.tool-item, .tool-empty { margin: 0; padding: 8px 0; border-top: 1px solid #eef3f8; color: #24344a; font-size: 13px; line-height: 1.4; }
.tool-item b { display: block; color: var(--accent); font-size: 12px; }
.tool-item small, .tool-empty { color: #6d7d93; font-size: 12px; }
.tool-more { display: inline-block; margin-top: 8px; color: var(--accent); font-size: 12px; font-weight: 600; }
.tool-pop form { display: flex; gap: 8px; }
.tool-pop form input { flex: 1; height: 36px; border: 1px solid #8ea0b5; border-radius: 8px; padding: 0 10px; }
.tool-pop form .btn-dark { height: 36px; padding: 0 12px; border-radius: 8px; }
.tool-cal { width: 280px; }
.chat-panel {
    width: 360px; height: min(560px, calc(100vh - 128px)); padding: 0;
    display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-home, .chat-thread { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chat-thread[hidden], .chat-home[hidden] { display: none; }
.chat-bar {
    display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px;
    border-bottom: 1px solid #e6eef5; background: #f7fafc;
}
.chat-bar strong { display: block; color: #162033; font-size: 14px; font-weight: 600; }
.chat-bar > span, .chat-who small { color: #6a7788; font-size: 12px; }
.chat-who { min-width: 0; }
.chat-who strong, .chat-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-search {
    display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; height: 36px; padding: 0 10px;
    border: 1px solid #e3eaf3; border-radius: 10px; background: #f7fafc; color: #8a94a3;
}
.chat-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: #162033; font: inherit; }
.chat-people, .chat-log { flex: 1; min-height: 0; overflow: auto; }
.chat-person {
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    border: 0; border-bottom: 1px solid #f2f6fa; background: #fff; text-align: left; cursor: pointer; font: inherit;
}
.chat-person:hover { background: #f4f8fc; }
.chat-avatar {
    position: relative; width: 36px; height: 36px; border-radius: 50%; flex: none;
    display: grid; place-items: center; background: #e7eef8; color: #0e4194; font-size: 12px; font-weight: 600;
}
.chat-avatar i {
    position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%;
    border: 2px solid #fff; background: #c5ced8;
}
.chat-avatar.is-on i { background: #18a874; }
.chat-person .grow { flex: 1; min-width: 0; }
.chat-person strong, .chat-person small, .chat-person em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-person strong { color: #162033; font-size: 13px; font-weight: 600; }
.chat-person small, .chat-person em { color: #6a7788; font-size: 12px; font-style: normal; }
.chat-person time { color: #8a94a3; font-size: 11px; flex: none; }
.chat-unread {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #0e4194; color: #fff;
    font-size: 11px; line-height: 18px; text-align: center;
}
.chat-back {
    width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #24344a; cursor: pointer;
}
.chat-back:hover { background: #e7eef8; color: #0e4194; }
.chat-log { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #f8fbfe; }
.chat-bubble { max-width: 78%; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid #e6eef5; color: #162033; }
.chat-bubble.is-mine { align-self: flex-end; background: #0e4194; border-color: #0e4194; color: #fff; }
.chat-bubble p { margin: 0; font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.chat-bubble time { display: block; margin-top: 4px; font-size: 10px; opacity: 0.7; }
.chat-compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e6eef5; background: #fff; }
.chat-compose input { flex: 1; height: 38px; border: 1px solid #d5deea; border-radius: 999px; padding: 0 14px; outline: none; font: inherit; }
.chat-compose input:focus { border-color: #0e4194; box-shadow: 0 0 0 2px rgba(14, 65, 148, 0.12); }
.chat-compose button {
    width: 38px; height: 38px; border: 0; border-radius: 50%; background: #0e4194; color: #fff; cursor: pointer;
}
.chat-empty { margin: 0; padding: 28px 16px; text-align: center; color: #6a7788; font-size: 13px; }
.chat-status.is-on { color: #12815a; }
.tool-cal .calendar-head { margin-bottom: 8px; }
.header-user { display: flex; align-items: center; gap: 10px; max-width: 220px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--soft); }
.app-footer {
    position: fixed; bottom: 0; left: var(--sidebar); right: 0; z-index: 25; height: 48px;
    display: flex; justify-content: space-between; gap: 16px; align-items: center;
    padding: 0 24px; background: #fff; border-top: 1px solid #e3eaf3; color: #5d6b80; font-size: 12px;
}
.sidebar { padding-bottom: 0; }
.side-foot {
    height: 48px; margin: auto -12px 0; padding: 0;
    display: flex; align-items: stretch;
}
.logout { width: 100%; padding: 0; margin: 0; }
.sidebar .logout button { height: 48px; border-radius: 0; padding: 0 24px; }
.footer-org { font-weight: 600; color: var(--accent); }
.footer-meta { color: #7d8da3; }
.sheet {
    background: #fff; border: 1px solid #e3eaf3; border-radius: 16px; overflow: hidden;
}
.sheet-head {
    display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 18px; border-bottom: 1px solid #e3eaf3;
    background: linear-gradient(180deg, #f7fbfe 0%, #fff 100%);
}
.sheet-head h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--accent); }
.sheet-head .crumb { margin: 0 0 4px; }
.sheet-head > div:first-child { min-width: 0; }
.sheet-head .muted { margin: 4px 0 0; max-width: 720px; line-height: 1.45; }
.sheet-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.sheet-head:has(.view-actions) { align-items: flex-start; }
.view-actions { gap: 8px; margin-top: 22px; }
.view-actions form { margin: 0; }
.content a.view-edit,
.content button.view-edit,
.content a.view-delete,
.content button.view-delete {
    height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px; background: #fff; line-height: 1;
}
.content a.view-edit,
.content button.view-edit { color: #24344a; border: 1px solid #d5deea; }
.content a.view-edit:hover,
.content button.view-edit:hover { background: #eef3f8; color: #0e4194; border-color: #c5d4e6; }
.content a.view-delete,
.content button.view-delete { color: #c8414b; border: 1px solid #f3d0d4; }
.content a.view-delete:hover,
.content button.view-delete:hover { background: #fdecef; color: #a8323b; border-color: #e8b4ba; }
.view-edit .bi, .view-delete .bi { font-size: 13px; font-weight: 400; line-height: 1; }
.sheet-body { padding: 16px 18px 18px; }
.sheet .segment {
    display: flex; margin: 0 0 16px; flex-wrap: wrap; max-width: 100%; gap: 4px;
    background: #eef3f8; border: 1px solid #c5d2e0; border-radius: 8px; padding: 4px;
}
.content .segment a:not(.btn-dark) { color: #24344a; }
.content .segment a:not(.btn-dark):hover { color: var(--accent); background: #fff; }
.content .segment a.is-on:not(.btn-dark),
.content .segment a.is-on:not(.btn-dark):hover { background: var(--accent); color: #fff; }
.sheet .segment a, .sheet .segment button { border-radius: 6px; padding: 6px 12px; }
.sheet .segment button {
    border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: #24344a; cursor: pointer;
}
.sheet .segment button.is-on, .sheet .segment button.is-on:hover { background: var(--accent); color: #fff; }
.form-panel[hidden] { display: none; }
.step-layout { display: block; }
.step-nav { display: flex; gap: 0; margin: 0 0 18px; padding: 4px 0 0; overflow-x: auto; }
.step-nav button {
    position: relative; flex: 1 1 0; min-width: 84px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    border: 0; background: transparent; padding: 0 4px 6px; cursor: pointer;
    color: #6d7d93; font: inherit; font-size: 12px; font-weight: 600;
}
.step-nav button::before {
    content: ""; position: absolute; top: 13px; left: 0; right: 0; height: 2px; background: #d7e2ee; z-index: 0;
}
.step-nav button:first-child::before { left: 50%; }
.step-nav button:last-child::before { right: 50%; }
.step-nav button span {
    position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center; background: #fff; border: 2px solid #c5d2e0; color: #5c6b80; font-size: 12px;
}
.step-nav button.is-on { color: var(--accent); }
.step-nav button.is-on span { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-nav button.is-done { color: #127a52; }
.step-nav button.is-done span,
.step-nav button.is-done::before { background: #18a874; border-color: #18a874; color: #fff; }
.step-stage { min-width: 0; }
.entry-switch { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(180px, 0.7fr); gap: 12px 16px; margin: 0 0 18px; }
.entry-card { border: 1px solid #e3eaf3; border-radius: 14px; padding: 14px; background: #fbfdff; margin: 0 0 12px; }
.entry-card header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.entry-card header span { color: #5c6b80; font-size: 12px; text-align: right; }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.entry-note { margin-top: 12px; }
.entry-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.entry-notes .field:last-child { grid-column: 1 / -1; }
.entry-actions {
    display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px;
    padding: 12px 18px; background: #f7fbfe; border: 1px solid #e3eaf3; border-radius: 0 0 16px 16px;
}
.entry-actions .btn-dark, .entry-actions .btn-ghost { height: 36px; padding: 0 16px; border-radius: 8px; }
.sheet-head .pill { align-self: center; height: 28px; padding: 0 12px; display: inline-flex; align-items: center; }
.comp-fy { display: grid; gap: 6px; color: #24344a; font-size: 12px; font-weight: 600; }
.comp-fy select { height: 36px; min-width: 140px; border: 1px solid #8ea0b5; border-radius: 8px; padding: 0 12px; background: #fff; }
.comp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.comp-stats article { border: 1px solid #e3eaf3; border-radius: 14px; padding: 12px 14px; background: #f7fbfe; }
.comp-stats span { color: #5c6b80; font-size: 12px; font-weight: 600; }
.comp-stats strong { display: block; margin-top: 4px; font-size: 26px; letter-spacing: -0.04em; color: var(--accent); }
.comp-stats article:last-child strong { color: #be123c; }
.comp-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.comp-table thead th { color: #3d5270; background: #f7fbfe; border-bottom: 1px solid #e3eaf3; }
.comp-table th:not(:first-child), .comp-table td:not(:first-child) { text-align: center; }
.comp-table td:first-child { min-width: 220px; }
.comp-table td:first-child strong { display: block; color: var(--accent); }
.comp-table td:first-child small { display: block; margin-top: 2px; color: #6d7d93; }
.comp-table a { text-decoration: none; }
.comp-table .pill { min-width: 92px; justify-content: center; }
.comp-reminders h2 { margin: 0 0 4px; font-size: 16px; }
.comp-reminders .btn-dark { height: 36px; margin-top: 10px; padding: 0 16px; border-radius: 8px; }
.comp-sent { margin: 0; padding: 8px 0; border-top: 1px solid #eef3f8; }
.comp-sent b { color: var(--accent); }
@media (max-width: 860px) { .comp-stats { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
    .entry-switch, .entry-notes { grid-template-columns: 1fr; }
    .entry-card header { flex-direction: column; align-items: flex-start; }
    .entry-card header span { text-align: left; }
}
.form-panel {
    background: #fff; border: 1px solid #e3eaf3; border-bottom: 0;
    border-radius: 16px 16px 0 0; padding: 18px 18px 6px;
}
.panel-intro { margin: 0 0 16px; }
.panel-intro h2 { margin: 0; font-size: 18px; }
.panel-intro p { margin: 4px 0 0; color: #5c6b80; font-size: 13px; }
.block-title { margin: 8px 0 10px; font-size: 14px; }
.form-panel .act-card,
.form-panel .ind-card {
    border: 1px solid #e3eaf3; border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; background: #fbfdff;
}
.form-panel textarea { min-height: 108px; }
@media (max-width: 860px) { .project-pin { grid-template-columns: 1fr; } }
.project-pin {
    display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 12px 16px;
    margin: 0 0 14px; padding: 12px 14px; border: 1px solid #d5e0ec; border-radius: 12px; background: #f7fbfe;
}
.wizard-nav {
    display: flex; justify-content: space-between; gap: 10px; margin-top: 0;
    padding: 12px 18px; background: #f7fbfe; border: 1px solid #e3eaf3; border-radius: 0 0 16px 16px;
}
.wizard-nav .btn-dark, .wizard-nav .btn-ghost { height: 36px; padding: 0 16px; border-radius: 8px; }
.preview-sheet { border: 1px solid #d5e0ec; border-radius: 14px; overflow: hidden; background: #fff; }
.preview-sheet header { padding: 18px 20px 14px; background: var(--accent); color: #fff; }
.preview-sheet header p { margin: 0; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.preview-sheet header h2 { margin: 6px 0 2px; font-size: 22px; }
.preview-sheet section { padding: 14px 20px; border-top: 1px solid #e3eaf3; }
.preview-sheet h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: #5c6b80; }
.preview-sheet p { margin: 0 0 6px; }
.preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.preview-grid span { display: block; color: #6d7d93; font-size: 12px; }
.preview-grid strong { font-weight: 600; }
.report-print { display: none; }
@media print {
    @page { margin: 14mm 12mm 16mm; }
    .sidebar, .app-header, .app-footer, .no-print, .toast-stack, .modal { display: none !important; }
    .shell, .main, .content { display: block; margin: 0 !important; padding: 0 !important; background: #fff; }
    .screen-only { display: none !important; }
    .report-print { display: block; padding-bottom: 28px; color: #1b2838; font-family: Inter, sans-serif; }
    .report-mast { display: flex; align-items: center; gap: 12px; }
    .report-logo { width: 52px; height: 52px; object-fit: contain; }
    .report-org strong { display: block; font-size: 16px; font-weight: 600; color: #0e4194; letter-spacing: 0.01em; }
    .report-org span, .report-doc span { display: block; margin-top: 2px; font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: #5c6b80; }
    .report-doc { margin-left: auto; text-align: right; }
    .report-doc strong { display: block; font-size: 13px; font-weight: 600; color: #1b2838; }
    .report-print h1 { margin: 0 0 4px; font-size: 20px; font-weight: 600; color: #0e4194; }
    .report-sub { margin: 0; font-size: 12px; color: #3d4d63; }
    .report-rule { height: 3px; margin: 12px 0 14px; background: #0e4194; }
    .report-print h2 { margin: 16px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #0e4194; }
    .report-print p { font-size: 12px; line-height: 1.5; }
    .report-print table { width: 100%; border-collapse: collapse; page-break-inside: avoid; }
    .report-print th, .report-print td { border: 1px solid #c5d2e0; padding: 6px 8px; text-align: left; font-size: 11px; vertical-align: top; }
    .report-print th { background: #eef3f8; font-weight: 600; color: #1b2838; }
    .report-foot {
        position: fixed; left: 0; right: 0; bottom: 0;
        display: flex; justify-content: space-between; gap: 16px;
        border-top: 1px solid #c5d2e0; padding-top: 6px;
        font-size: 10px; color: #5c6b80;
    }
}
.row-actions .row-act { height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12px; }
.row-actions .row-act.is-danger { color: #c8414b; }
.sheet .field label { color: #24344a; font-weight: 600; }
.sheet .field input,
.sheet .field select,
.sheet .field textarea,
.sheet .select2-container--default .select2-selection--single {
    height: 36px; border: 1px solid #8ea0b5; border-radius: 6px; background: #fff; padding: 0 14px;
    box-shadow: none; line-height: 34px;
}
.sheet .field select { padding-right: 32px; }
.sheet .select2-container--default .select2-selection--single { padding: 0; }
.sheet .field textarea { height: auto; min-height: 72px; padding: 10px 14px; line-height: 1.45; }
.sheet .field input::placeholder,
.sheet .field textarea::placeholder { color: #8da0b5; }
.sheet .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 34px; padding-left: 14px; padding-right: 32px; color: #161616; font-weight: 400;
}
.sheet .select2-container--default .select2-selection--single .select2-selection__arrow { height: 34px; }
.sheet .field input:focus,
.sheet .field select:focus,
.sheet .field textarea:focus,
.sheet .select2-container--default.select2-container--open .select2-selection--single,
.sheet .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--accent); background: #fff; box-shadow: 0 0 0 2px var(--accent-ring);
}
.sheet .actions .btn-dark { height: 36px; padding: 0 18px; border-radius: 6px; }
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; }
.row-actions form { margin: 0; }
.row-actions .icon-btn {
    width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: #6a7788;
}
.row-actions .icon-btn .bi { font-size: 14px; font-weight: 400; line-height: 1; -webkit-font-smoothing: antialiased; }
.row-actions .icon-btn:hover { background: #eef3f8; color: #0e4194; }
.row-actions .icon-btn.is-danger:hover { background: #fdecef; color: #c8414b; }
.area-view { display: grid; grid-template-columns: minmax(280px, 1.15fr) minmax(260px, 0.85fr); gap: 22px; align-items: start; }
.area-facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 4px; }
.area-facts dt, .area-facts dd { margin: 0; }
.district-map svg { width: 100%; height: auto; max-height: 520px; display: block; background: #f4f8fb; border: 1px solid #e1ebf3; border-radius: 14px; }
.district-map path { fill: #d5e6f0; stroke: #8eabc4; stroke-width: 1.25px; vector-effect: non-scaling-stroke; }
.district-map circle { stroke: #fff; stroke-width: 0.8px; vector-effect: non-scaling-stroke; }
.district-map text { fill: #3e5168; font-weight: 500; }
.district-map .map-key { margin-top: 12px; color: #5c6b80; }
.place-brief { display: grid; gap: 10px; min-width: 0; }
.place-card { background: #f7fafc; border: 1px solid #e6eef5; border-radius: 12px; padding: 12px 14px; }
.place-card h2, .theme-projects h2 { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: #5c6b80; }
.place-card p, .place-points { margin: 0; color: #1c2838; font-size: 14px; line-height: 1.45; font-weight: 400; }
.place-card .place-note, .place-note { color: #6a7788; font-size: 12px; font-weight: 400; }
.place-points { padding-left: 18px; }
.place-points li + li { margin-top: 6px; }
.place-source { margin: 2px 0 0; color: #8a94a3; font-size: 11px; line-height: 1.45; }
.project-view { display: flex; flex-direction: column; gap: 18px; }
.project-view .stats { margin: 0; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.project-view .stat { background: #f7fafc; border: 1px solid #e6eef5; border-radius: 12px; padding: 12px 14px; }
.project-view .stat em { display: block; margin-top: 4px; font-style: normal; font-size: 12px; font-weight: 400; color: #6a7788; }
.project-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0; }
.project-facts div { background: #f7fafc; border: 1px solid #e6eef5; border-radius: 12px; padding: 10px 12px; }
.project-facts dt { color: #5c6b80; font-size: 12px; }
.project-facts dd { margin: 4px 0 0; color: #162033; font-weight: 600; }
.project-facts dd span { display: block; margin-top: 2px; color: #6a7788; font-size: 12px; font-weight: 400; }
.project-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr); gap: 16px; align-items: start; }
.project-note h2:not(:first-child) { margin-top: 14px; }
.project-view .panel { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.project-view .panel h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #5c6b80; }
.project-view .panel .data { min-width: 760px; }
.project-view .panel thead th { color: #111; font-weight: 600; background: #f6f8fb; border-bottom: 1px solid #d5deea; white-space: nowrap; }
.project-view .person { padding: 10px 0; }
@media (max-width: 860px) { .project-split { grid-template-columns: 1fr; } }
.theme-view { display: flex; flex-direction: column; gap: 18px; }
.theme-head-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.theme-head-title h1 { margin: 0; }
.theme-dot { width: 10px; height: 10px; border-radius: 99px; flex: none; }
.theme-view .stats { margin: 0; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.theme-view .stat { background: #f7fafc; border: 1px solid #e6eef5; border-radius: 12px; padding: 10px 12px; }
.theme-view .stat strong { font-size: 18px; }
.theme-projects { min-width: 0; }
.theme-projects h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #5c6b80; }
.theme-projects .list-table td a { color: #0e4194; }
.theme-projects .pill { padding: 3px 8px; font-weight: 500; }
@media (max-width: 680px) { .area-view { grid-template-columns: 1fr; } }
.area-facts dt { color: #5c6b80; font-size: 13px; }
.area-facts dd { margin: 0; color: #162033; font-weight: 500; }
.sheet .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sheet .search { height: 36px; min-width: 240px; border-radius: 10px; background: #f4f8fc; border: 1px solid #e3eaf3; padding: 0 14px; gap: 10px; }
.sheet-add, .sheet-go {
    display: inline-flex; align-items: center; justify-content: center;
    height: 36px; padding: 0 16px; border-radius: 10px; white-space: nowrap;
}
.sheet-add { min-width: 210px; padding: 0 22px; }
.area-map { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.area-map svg { width: 100%; height: auto; display: block; background: #f4f8fc; border-radius: 12px; }
.area-map path { stroke: #8ea0b5; stroke-width: 0.8; cursor: pointer; }
.area-map path:hover { stroke: #0e4194; stroke-width: 1.8; }
.area-map .map-name {
    font-size: 7px; font-weight: 700; fill: #1a2740; stroke: #fff; stroke-width: 2px;
    paint-order: stroke; pointer-events: none; font-family: inherit;
}
.map-key { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; }
.map-key li { display: flex; align-items: center; gap: 8px; list-style: none; }
.map-swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.map-tip {
    position: fixed; z-index: 40; background: #fff; border: 1px solid #d5e0ec; border-radius: 10px;
    padding: 8px 10px; box-shadow: var(--shadow); font-size: 12px; pointer-events: none;
}
.map-tip[hidden] { display: none; }
.map-tip strong { display: block; }
@media (max-width: 860px) { .area-map { grid-template-columns: 1fr; } }
.sheet .table-wrap { margin: 0; }
.sheet table.data th, .sheet table.data td { padding-left: 18px; padding-right: 18px; }
.sheet table.list-table thead th {
    color: #111; font-weight: 600; background: #f6f8fb; border-bottom: 1px solid #d5deea;
}
.theme-swatch { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; vertical-align: baseline; }
.sheet table.data tr:last-child td { border-bottom: 0; }
.setup-page { padding-bottom: 72px; }
.setup-switch { align-items: flex-end; }
.setup-switch .field { min-width: 180px; }
.setup-switch select { height: 36px; border-radius: 10px; background: #fff; }
.setup-steps { display: flex; gap: 8px; padding: 0 18px 14px; border-bottom: 1px solid #e3eaf3; background: #fff; }
.setup-steps a { padding: 6px 12px; border-radius: 999px; background: #f4f8fc; color: #3d5270; font-size: 12px; font-weight: 600; }
.setup-steps a:hover { background: var(--accent-soft); color: var(--accent); }
.setup-block { scroll-margin-top: 80px; }
.setup-block + .setup-block { margin-top: 28px; padding-top: 8px; }
.setup-block-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.setup-block-head > span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; flex: none; }
.setup-block h2 { margin: 0; font-size: 16px; font-weight: 600; }
.setup-block h3 { margin: 18px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #6d7d93; }
.setup-block-head .muted, .act-card .muted, .loc-card header span { margin: 2px 0 0; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.setup-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.setup-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.setup-grid .span-2 { grid-column: 1 / -1; }
.loc-card { border: 1px solid #e3eaf3; border-radius: 14px; padding: 12px 14px 14px; background: #fbfdff; }
.loc-card + .loc-card { margin-top: 10px; }
.loc-card header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.loc-card header span { color: var(--muted); font-size: 12px; text-align: right; }
.loc-card.is-new { background: #fff; border-style: dashed; }
.loc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.act-card, .ind-card { display: grid; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid #eef2f6; }
.act-card { grid-template-columns: minmax(200px, 1.3fr) 120px 150px minmax(260px, 1.2fr); }
.ind-card { grid-template-columns: minmax(0, 1fr) 180px; }
.act-card strong, .ind-card strong { font-weight: 600; }
.act-card p, .ind-card p { margin: 2px 0 0; }
.month-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.month-cell { position: relative; display: grid; place-items: center; min-height: 28px; border: 1px solid #e3eaf3; border-radius: 8px; background: #fff; color: #5d6b80; font-size: 11px; font-weight: 600; cursor: pointer; }
.month-cell input { position: absolute; opacity: 0; inset: 0; }
.month-cell:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
.setup-save { position: fixed; left: var(--sidebar); right: 0; bottom: 48px; z-index: 24; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 32px; background: rgba(255,255,255,.96); border-top: 1px solid #e3eaf3; box-shadow: 0 -8px 24px rgba(14, 65, 148, 0.04); }
.setup-save span { color: #5d6b80; font-size: 12px; }
@media (max-width: 1100px) {
    .act-card, .setup-grid.cols-4, .loc-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .setup-switch, .setup-grid, .setup-grid.cols-3, .setup-grid.cols-4, .loc-grid, .act-card, .ind-card { grid-template-columns: 1fr; }
    .setup-save { left: 0; padding-left: 16px; padding-right: 16px; }
    .loc-card header { flex-direction: column; }
    .loc-card header span { text-align: left; }
    .form-panel .loc-card header { flex-direction: row; align-items: center; }
    .form-panel .loc-grid { grid-template-columns: 1fr 1fr; }
}
.shell.is-rail { --sidebar: 76px; }
.shell.is-rail .brand > span, .shell.is-rail .nav-label, .shell.is-rail .nav-link span, .shell.is-rail .side-user span, .shell.is-rail .logout span { display: none; }
.shell.is-rail .side-head, .shell.is-rail .side-user, .shell.is-rail .nav-link, .shell.is-rail .logout button { justify-content: center; padding-left: 0; padding-right: 0; }
.shell.is-rail .brand { justify-content: center; }
.shell.is-rail .nav-link.is-active { box-shadow: none; }

body:not(.theme-nexus) .sidebar {
    background:
        radial-gradient(120% 70% at 0% 0%, rgba(79, 195, 241, 0.22), transparent 42%),
        linear-gradient(180deg, #1460b8 0%, #0e4194 52%, #084090 100%);
    border-right: 0;
    color: #e8effb;
    box-shadow: 8px 0 28px rgba(18, 36, 84, 0.08);
}
body:not(.theme-nexus) .sidebar .brand strong,
body:not(.theme-nexus) .sidebar .side-user strong { color: #fff; }
body:not(.theme-nexus) .sidebar .brand small,
body:not(.theme-nexus) .sidebar .nav-label,
body:not(.theme-nexus) .sidebar .side-user small,
body:not(.theme-nexus) .sidebar .logout button { color: #b7c8ea; }
body:not(.theme-nexus) .sidebar .nav-link { color: #d7e4f8; }
body:not(.theme-nexus) .sidebar .nav-link:hover,
body:not(.theme-nexus) .sidebar .logout button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
body:not(.theme-nexus) .sidebar .nav-link.is-active {
    background: #fff;
    color: #16306f;
    box-shadow: none;
    font-weight: 500;
}
body:not(.theme-nexus) .sidebar .side-foot { border-top-color: rgba(255, 255, 255, 0.12); }
body:not(.theme-nexus) .sidebar .rail-btn {
    background: transparent;
    border-color: transparent;
    color: #fff;
}
body:not(.theme-nexus) .sidebar .rail-btn:hover { background: rgba(255, 255, 255, 0.12); }
body:not(.theme-nexus) .sidebar .avatar-sm { background: rgba(255, 255, 255, 0.16); color: #fff; }
body:not(.theme-nexus) .sidebar .nav-link.is-active { box-shadow: inset 3px 0 0 var(--sky); }
body:not(.theme-nexus) .sidebar .nav-link:focus-visible,
body:not(.theme-nexus) .sidebar .rail-btn:focus-visible { outline-color: #fff; }
body:not(.theme-nexus) .sidebar .nav { scrollbar-color: rgba(255, 255, 255, 0.28) transparent; }

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}
body, button, input, select, textarea, .select2-container {
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    letter-spacing: 0;
}
body { font-size: 13px; font-weight: 400; line-height: 1.5; }
.page-top h1, .sheet-head h1, .login-form h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.login-aside h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.panel h2, .panel h3, .card h3, .modal-card h3 { font-size: 14px; font-weight: 600; letter-spacing: 0; }
.kpi-value strong, .stat strong { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.brand strong, .header-id strong, .side-user strong, .who strong { font-size: 13px; font-weight: 600; letter-spacing: 0; }
.nav-link, .logout button, .btn, .btn-dark, .btn-ghost, .pager-btn, .pill, .segment a, .name, .eyebrow, .header-kicker, .nav-label, .field label {
    font-weight: 500;
}
body .nav-link.is-active, body .sidebar .nav-link.is-active { font-weight: 500; }
.sidebar .nav-link, .sidebar .logout button {
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}
.nav-label { letter-spacing: 0.04em; font-size: 10px; }
table.data th, table.data td, .crumb, .code, .flash, .app-footer, .header-user small, .side-user small, .brand small { font-size: 12px; }
.sheet-head h1 { color: var(--accent); }
@media (max-width: 860px) {
    .sheet-head { flex-direction: column; align-items: stretch; }
    .sheet-tools { justify-content: flex-start; }
    .view-actions { margin-top: 0; }
    .sheet .search { min-width: 0; width: 100%; }
    .sheet .form-grid { grid-template-columns: 1fr; }
}
