:root {
    --bg: #f3f5f7;
    --card: #fff;
    --ink: #1c2b39;
    --navy: #16324f;
    --blue: #2f5f93;
    --muted: #66788a;
    --line: #e6ebf0;
    --line-strong: #d5dee7;
    --ok: #1f7a4d;
    --ok-bg: #e8f6ee;
    --watch: #9a6700;
    --watch-bg: #fff6e4;
    --action: #9a4d0f;
    --action-bg: #fff1e6;
    --critical: #a12622;
    --critical-bg: #fdecec;
    --shadow: 0 1px 2px rgba(22, 50, 79, 0.04), 0 8px 24px rgba(22, 50, 79, 0.04);
    --radius: 14px;
    --sidebar: 232px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; color: var(--navy); }
h1 { margin: 0; font-size: 30px; line-height: 1.15; }
h2 { margin: 0; font-size: 16px; }
h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
p { margin: 0; }

.skip {
    position: absolute;
    left: 12px;
    top: -40px;
    background: #fff;
    padding: 8px 12px;
    z-index: 50;
}
.skip:focus { top: 12px; }

.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: #fff;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 18px 12px 14px;
}
.brand { display: flex; gap: 10px; align-items: center; color: var(--navy); padding: 4px 8px 18px; }
.brand strong, .brand em { display: block; font-style: normal; }
.brand strong { font-size: 14px; }
.brand em { color: var(--muted); font-size: 12px; }
.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--navy);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
    letter-spacing: 0.04em;
    flex: none;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .sidebar-foot button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #3d4f61;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
}
.nav a:hover, .sidebar-foot button:hover { background: #f4f7fa; color: var(--navy); }
.nav a.is-active { background: #eef3f8; color: var(--navy); font-weight: 600; }
.icon { width: 18px; height: 18px; flex: none; }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.sidebar-foot span { display: block; color: var(--muted); font-size: 12px; padding: 0 10px 6px; }

.main { min-width: 0; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: rgba(243, 245, 247, 0.92);
    backdrop-filter: blur(12px);
}
.search { position: relative; flex: 1; max-width: 560px; }
.search .icon { position: absolute; left: 12px; top: 10px; color: var(--muted); }
.search input, .list-search input, .field input, .field select, .field textarea, .issue-form input, .issue-form select, .list-search select {
    width: 100%;
    border: 1px solid var(--line-strong);
    background: #fff;
    border-radius: 10px;
    padding: 9px 12px;
    outline: none;
}
.search input { padding-left: 36px; }
.search input:focus, .list-search input:focus, .field input:focus, .field select:focus, .field textarea:focus, .issue-form input:focus, .issue-form select:focus {
    border-color: #9eb4cb;
    box-shadow: 0 0 0 3px rgba(22, 50, 79, 0.08);
}
.search-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 6px;
    max-height: 420px;
    overflow: auto;
}
.search-panel a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); }
.search-panel a:hover, .search-panel a.is-active { background: #f4f7fa; }
.search-panel small { display: block; color: var(--muted); }
.search-panel .group-label { margin: 8px 10px 4px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.menu-btn, .scrim { display: none; }

.content { padding: 6px 28px 56px; }
.page-head, .hero-top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; margin-bottom: 18px; }
.lede, .chart-note, .muted { color: var(--muted); }
.lede { max-width: 720px; margin-top: 6px; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.head-side, .badge-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.badge-row { justify-content: flex-start; margin-bottom: 16px; }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpis-tight { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 14px 12px;
    box-shadow: var(--shadow);
    color: inherit;
    min-height: 104px;
}
a.kpi:hover { border-color: #c9d5e2; }
.kpi-label { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.kpi-value { font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--navy); font-weight: 600; }
.kpi-text { font-size: 18px; }
.kpi-sub { color: var(--muted); font-size: 12px; }
.tone-ok { color: var(--ok); }
.tone-watch { color: var(--watch); }
.tone-critical { color: var(--critical); }

.grid-3, .grid-2, .customer-grid, .version-grid { display: grid; gap: 14px; margin: 14px 0; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.version-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.version-grid.compact { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.card, .customer-card, .host-row, .login-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card { padding: 16px 16px 14px; }
.card + .card, .content > .card { margin-top: 14px; }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.chart-box { position: relative; height: 240px; }
.chart-box.is-tall { height: 340px; }
.chart-box canvas { width: 100% !important; height: 100% !important; }
.chart-note { margin-top: 10px; font-size: 12.5px; }

.customer-card { display: block; padding: 16px; color: inherit; }
.customer-card:hover { border-color: #c9d5e2; }
.customer-card .meter { margin: 12px 0 0; }
.mix { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: #eef2f5; margin-top: 12px; }
.mix span { display: block; height: 100%; }
.mix-critical { background: #d15a54; }
.mix-action { background: #e08a3c; }
.mix-watch { background: #e0a23a; }
.mix-ok { background: #2f9e68; }
.mix-legend { margin-top: 6px; font-size: 12px; color: var(--muted); }
.agenda { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.agenda li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.agenda em { margin-left: auto; font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.agenda-more { margin-top: 4px; font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-critical { background: #d15a54; }
.dot-action { background: #e08a3c; }
.dot-watch { background: #e0a23a; }
.meter-source { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; }
.contact-line { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: 13px; }
.contact-line strong { font-weight: 600; color: var(--navy); }
.contact-line.is-missing strong { color: var(--action); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.mini-stats div { background: #f7f9fb; border-radius: 10px; padding: 8px; }
.mini-stats dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.mini-stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; color: var(--navy); }

.version-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
    color: inherit;
}
.version-card strong { font-size: 26px; color: var(--navy); font-variant-numeric: tabular-nums; }
.version-card em { font-style: normal; color: var(--muted); font-size: 12px; }
.version-card.tone-outdated { border-color: #f0d3b0; background: #fffaf4; }
.version-card.tone-current { border-color: #d5eadf; }
.version-card.is-selected { outline: 2px solid var(--navy); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chip {
    border: 1px solid var(--line-strong);
    background: #fff;
    color: #3d4f61;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12.5px;
}
.chip.is-active, .chip:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.list-search { display: flex; gap: 8px; margin-bottom: 12px; }
.list-search input, .list-search select { max-width: 280px; }
.result-count { color: var(--muted); margin-bottom: 8px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid #f0f3f6; vertical-align: middle; }
.table th { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.table tr:hover td { background: #fbfcfd; }
.table tr.is-blocked td { background: #fff8f4; }
.site-link { display: flex; flex-direction: column; color: var(--navy); font-weight: 600; }
.site-link span, .num { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.site-link span { color: var(--muted); font-weight: 500; font-size: 12.5px; }

.badge, .pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
}
.pill { background: #f3f6f9; color: #3d4f61; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-watch { background: var(--watch-bg); color: var(--watch); }
.badge-action { background: var(--action-bg); color: var(--action); }
.badge-critical { background: var(--critical-bg); color: var(--critical); }
.badge-neutral { background: #f2f4f7; color: #526070; }
.badge-demo { background: #f4f1ea; color: #6b5b3e; }
.badge-manual { background: #e7eef6; color: var(--navy); }

.jump { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jump .ver { font-weight: 650; color: var(--navy); font-variant-numeric: tabular-nums; }
.track { position: relative; height: 2px; background: #d5dde6; display: inline-block; }
.track i { position: absolute; right: -1px; top: -4px; width: 6px; height: 6px; border-right: 1.5px solid #8aa0b5; border-bottom: 1.5px solid #8aa0b5; transform: rotate(-45deg); }
.track-1 { width: 28px; }
.track-2 { width: 72px; background: #e6c48a; }
.track-2 i { border-color: #9a6700; }
.track-3 { width: 120px; background: #e7b3a2; }
.track-3 i { border-color: #9a3412; }
.jump-label { color: var(--muted); font-size: 12px; }
.jump-large .jump-label { color: #9a3412; }
.tick { color: var(--ok); font-weight: 700; }

.meter { margin: 8px 0 12px; }
.meter-label { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 6px; }
.trackbar { height: 8px; background: #eef2f5; border-radius: 99px; overflow: hidden; }
.fill { display: block; width: 0; height: 100%; border-radius: 99px; }
.fill-ok { background: #2f9e68; }
.fill-watch { background: #e0a23a; }
.fill-critical { background: #d15a54; }
.fill-demo { background: #9aabbb; }

.host-list { display: flex; flex-direction: column; gap: 10px; }
.host-row { display: grid; grid-template-columns: minmax(220px, 1.1fr) 1fr 1fr; gap: 18px; padding: 14px 16px; align-items: center; }
.source-line { margin-top: 6px; }
.manual-callout { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }

.banner {
    background: #f8f5ef;
    border: 1px solid #eadfcd;
    color: #5c5142;
    border-radius: 12px;
    padding: 10px 12px;
    margin: 8px 0 14px;
}
.flash { border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--critical-bg); color: var(--critical); }
.empty { color: var(--muted); padding: 12px 0; }

.case-list, .plain-list, .reason-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.case-list li, .plain-list li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #f0f3f6; }
.case-list p, .plain-list p { margin-top: 4px; }
.reason-list li { display: flex; gap: 8px; align-items: flex-start; }

.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; }
.dl { display: flex; flex-direction: column; gap: 8px; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.dl dt { color: var(--muted); font-size: 12px; }
.dl dd { margin: 0; }
.php-now { font-size: 22px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.req { display: inline-block; margin-left: 6px; color: var(--muted); font-size: 12px; }
.req.is-block { color: var(--action); font-weight: 600; }
.section-nav { display: flex; gap: 14px; flex-wrap: wrap; padding: 2px 0 12px; }
[id] { scroll-margin-top: 84px; }
.section-nav a { color: var(--muted); font-size: 13px; }
.section-nav a:hover { color: var(--navy); }
.site-hero { margin-bottom: 8px; }
.tech { margin-top: 12px; }
.tech summary { cursor: pointer; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #3d4f61; }
.field.span-2, .form-actions { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; }
.btn {
    border: 1px solid var(--line-strong);
    background: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
}
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: #10263c; }
.btn-ghost { background: #fff; }
.btn-small { padding: 6px 10px; }
.issue-form { display: grid; gap: 6px; min-width: 180px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.pager .is-disabled { pointer-events: none; color: #b0bcc8; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }

.auth-body { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at top, #fff, var(--bg) 55%); }
.login-wrap { width: min(420px, calc(100% - 32px)); }
.login-card { padding: 28px; }
.login-card h1 { margin: 12px 0 6px; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.login-hint { margin-top: 14px; color: var(--muted); font-size: 13px; }
.command {
    margin: 8px 0 0;
    padding: 12px;
    background: #f7f9fb;
    border-radius: 10px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    line-height: 1.6;
}

@media (max-width: 1180px) {
    .kpis, .kpis-tight, .customer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-3, .version-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 30; transform: translateX(-105%); transition: transform 0.2s ease; width: min(280px, 86vw); }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(22, 50, 79, 0.28); z-index: 25; border: 0; }
    .menu-btn { display: inline-flex; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px; }
    .content, .topbar { padding-left: 16px; padding-right: 16px; }
    .grid-2, .split, .host-row, .form-grid, .dl-grid, .page-head, .hero-top { grid-template-columns: 1fr; display: grid; }
    .page-head, .hero-top { display: flex; flex-direction: column; align-items: flex-start; }
    .head-side { justify-content: flex-start; }
    .kpis, .kpis-tight, .customer-grid, .version-grid, .version-grid.compact { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .sidebar { transition: none; }
}

.pct-0{width:0%}.pct-1{width:1%}.pct-2{width:2%}.pct-3{width:3%}.pct-4{width:4%}.pct-5{width:5%}.pct-6{width:6%}.pct-7{width:7%}.pct-8{width:8%}.pct-9{width:9%}.pct-10{width:10%}.pct-11{width:11%}.pct-12{width:12%}.pct-13{width:13%}.pct-14{width:14%}.pct-15{width:15%}.pct-16{width:16%}.pct-17{width:17%}.pct-18{width:18%}.pct-19{width:19%}.pct-20{width:20%}.pct-21{width:21%}.pct-22{width:22%}.pct-23{width:23%}.pct-24{width:24%}.pct-25{width:25%}.pct-26{width:26%}.pct-27{width:27%}.pct-28{width:28%}.pct-29{width:29%}.pct-30{width:30%}.pct-31{width:31%}.pct-32{width:32%}.pct-33{width:33%}.pct-34{width:34%}.pct-35{width:35%}.pct-36{width:36%}.pct-37{width:37%}.pct-38{width:38%}.pct-39{width:39%}.pct-40{width:40%}.pct-41{width:41%}.pct-42{width:42%}.pct-43{width:43%}.pct-44{width:44%}.pct-45{width:45%}.pct-46{width:46%}.pct-47{width:47%}.pct-48{width:48%}.pct-49{width:49%}.pct-50{width:50%}.pct-51{width:51%}.pct-52{width:52%}.pct-53{width:53%}.pct-54{width:54%}.pct-55{width:55%}.pct-56{width:56%}.pct-57{width:57%}.pct-58{width:58%}.pct-59{width:59%}.pct-60{width:60%}.pct-61{width:61%}.pct-62{width:62%}.pct-63{width:63%}.pct-64{width:64%}.pct-65{width:65%}.pct-66{width:66%}.pct-67{width:67%}.pct-68{width:68%}.pct-69{width:69%}.pct-70{width:70%}.pct-71{width:71%}.pct-72{width:72%}.pct-73{width:73%}.pct-74{width:74%}.pct-75{width:75%}.pct-76{width:76%}.pct-77{width:77%}.pct-78{width:78%}.pct-79{width:79%}.pct-80{width:80%}.pct-81{width:81%}.pct-82{width:82%}.pct-83{width:83%}.pct-84{width:84%}.pct-85{width:85%}.pct-86{width:86%}.pct-87{width:87%}.pct-88{width:88%}.pct-89{width:89%}.pct-90{width:90%}.pct-91{width:91%}.pct-92{width:92%}.pct-93{width:93%}.pct-94{width:94%}.pct-95{width:95%}.pct-96{width:96%}.pct-97{width:97%}.pct-98{width:98%}.pct-99{width:99%}.pct-100{width:100%}
