@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Geist:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --canvas: #0d131e;
  --sidebar: #111926;
  --panel: #141e2d;
  --line: #263448;
  --text: #edf3fa;
  --muted: #a0afc3;
  --mint: #67e3be;
  --blue: #9dbfff;
  --rose: #f5a3b4;
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--canvas);
  color: var(--text);
  font-size: 15px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
h1, h2, p { margin: 0; }
h1, h2, .metric-value { font-family: Geist, system-ui, sans-serif; }
code { overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.shell { min-height: 100dvh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 26px 15px 19px; border-right: 1px solid var(--line); background: var(--sidebar); }
.brand, .workspace { display: flex; gap: 12px; align-items: center; }
.brand { padding: 0 9px; margin-bottom: 54px; }
.brand strong, .workspace strong { display: block; font-weight: 700; }
.brand strong { font-size: 18px; letter-spacing: -.04em; }
.brand small, .workspace small { color: var(--muted); display: block; margin-top: 3px; }
.brand small { font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.brand-mark, .workspace-mark { display: grid; place-items: center; border-radius: 10px; width: 39px; height: 39px; flex: none; }
.brand-mark { background: var(--mint); color: #103c32; font-size: 24px; }
.workspace-mark { background: #25344c; color: var(--blue); font-size: 12px; font-weight: 700; }
.workspace small { font-size: 12px; }
.nav-label { display: block; padding: 0 12px 12px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.nav-link { display: flex; gap: 11px; align-items: center; padding: 10px 12px; min-height: 43px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); text-align: left; font-weight: 600; white-space: nowrap; }
.nav-link span { display: inline-grid; place-items: center; width: 17px; font-size: 18px; }
.nav-link:hover { background: #1a2838; color: var(--text); }
.nav-link[aria-current] { background: #18312f; color: var(--mint); border-color: #284940; }
.sidebar-footer { margin-top: auto; }
.sidebar-footer button { width: 100%; }
.workspace { padding: 17px 8px 2px; margin-top: 14px; border-top: 1px solid var(--line); }

.topbar { min-height: 73px; padding: 0 clamp(18px, 3.5vw, 55px); display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: #111926; }
.breadcrumbs, .top-actions { display: flex; align-items: center; gap: 13px; }
.breadcrumbs { color: var(--muted); font-size: 13px; }
.breadcrumbs strong { color: var(--text); }
.data-mode { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; color: #f0c389; border: 1px solid #544333; border-radius: 999px; background: #2c271f; padding: 6px 10px; }
.data-mode i, .legend i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: currentColor; }
.data-mode.imported { color: var(--mint); border-color: #305045; background: #18312f; }
.button { min-height: 38px; border: 1px solid transparent; display: inline-flex; justify-content: center; align-items: center; gap: 8px; border-radius: 8px; padding: 8px 13px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.primary { color: #102b25; background: var(--mint); }
.primary:hover { background: #9cf4d8; }
.secondary { background: #1a2637; border-color: var(--line); color: var(--text); }
.secondary:hover { background: #24344a; }
button:disabled { opacity: .5; cursor: default; }

.content { max-width: 1440px; margin: 0 auto; padding: 28px clamp(18px, 3.5vw, 55px) 0; }
.vps-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 16px; }
.vps-toolbar label { font-weight: 700; font-size: 13px; color: var(--muted); }
.vps-toolbar select, .profile-field input { background: #152131; color: var(--text); border: 1px solid var(--line); border-radius: 8px; min-height: 38px; padding: 8px 10px; }
.vps-toolbar select { min-width: min(160px, 100%); max-width: min(275px, 100%); }
.profile-field { display: grid; gap: 6px; margin-top: 15px; font-size: 13px; font-weight: 700; }
.server-tools { margin-bottom: 16px; }
.server-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 19px 16px; }
.server-actions a { color: var(--mint); }
.server-actions:not(:has(> :not([hidden]))) { display: none; }
.live-job { margin: 0 19px 16px; color: var(--muted); font-size: 13px; }
.profile-field select { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #152131; color: var(--text); }
.claim-accounts { margin: 16px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.claim-accounts legend { padding: 0 4px; font-weight: 700; }
.claim-accounts label { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; overflow-wrap: anywhere; }
#claim-accounts { max-height: 185px; overflow: auto; margin-top: 6px; border-top: 1px solid var(--line); }
.notice { padding: 11px 15px; border-radius: 8px; background: #17332f; border: 1px solid #30564c; color: #b7f6e4; margin-bottom: 14px; }
.hero { position: relative; min-height: 222px; display: flex; align-items: center; overflow: hidden; border: 1px solid #2d5360; border-radius: 15px; background: linear-gradient(110deg, #132b3b 10%, #173c45 76%, #15473f); }
.hero-copy { position: relative; z-index: 1; padding: clamp(22px, 4vw, 42px); }
.eyebrow { color: var(--mint); font-size: 10px; font-weight: 700; letter-spacing: .16em; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.eyebrow span { width: 16px; height: 1px; background: var(--mint); }
h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 600; letter-spacing: -.06em; line-height: 1.05; }
.hero-copy > p:nth-of-type(2), .page-heading p { margin-top: 11px; color: #b8c7d9; line-height: 1.55; }
.hero-link { display: inline-flex; gap: 9px; margin-top: 21px; color: var(--mint); font-size: 13px; font-weight: 700; }
.hero-link:hover, .text-button:hover { text-decoration: underline; }
.hero-graphic { position: absolute; inset: 0 0 0 51%; opacity: .85; overflow: hidden; background: repeating-linear-gradient(90deg, transparent 0 25px, #70d9cc14 25px 26px), repeating-linear-gradient(0deg, transparent 0 25px, #70d9cc14 25px 26px); mask-image: linear-gradient(90deg, transparent, black 29%); }
.orbit, .hero-core, .orb { position: absolute; top: 50%; left: 58%; }
.orbit { transform: translate(-50%, -50%) rotate(-26deg); border-radius: 50%; border: 1px solid #70e7cd50; width: 230px; height: 106px; }
.orbit-b { transform: translate(-50%, -50%) rotate(34deg); }
.orbit-c { transform: translate(-50%, -50%) rotate(90deg); }
.hero-core { display: grid; place-items: center; width: 86px; height: 86px; transform: translate(-50%, -50%); border-radius: 23px; color: #b5ffec; border: 1px solid #78e4ca88; font-size: 50px; background: #225a55; box-shadow: 0 0 50px #69ecc44d, inset 0 0 21px #61e5bd26; }
.orb { width: 8px; height: 8px; border-radius: 50%; background: #a2ffe5; box-shadow: 0 0 16px #6ff5ce; }
.orb-a { margin: -51px 0 0 77px; }
.orb-b { margin: 21px 0 0 -97px; }
.orb-c { margin: 74px 0 0 39px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 17px 0; }
.metric, .panel { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.metric { padding: 16px; min-width: 0; }
.metric-top { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.metric-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.metric-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 8px; background: #22354e; color: var(--blue); font-size: 16px; }
.metric-icon.ok { background: #203d37; color: var(--mint); }
.metric-icon.failed { background: #3d293a; color: var(--rose); }
.metric-value { font-size: 31px; line-height: 1.15; letter-spacing: -.05em; font-weight: 600; margin: 3px 0 7px; }
.metric-note { color: var(--muted); font-size: 12px; }
.analysis-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(240px, 1fr); gap: 16px; margin-bottom: 16px; }
.panel { min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 19px; }
.panel-heading h2 { font-size: 16px; font-weight: 600; letter-spacing: -.025em; }
.panel-heading p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend { display: flex; gap: 11px; color: var(--muted); font-size: 11px; }
.legend span { white-space: nowrap; }
.legend i { margin-right: 4px; color: var(--mint); }
.legend span:nth-child(2) i { color: var(--rose); }
.chart { padding: 0 19px 14px; min-height: 137px; }
.plot { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.chart-column { min-width: 0; text-align: center; }
.bars { display: flex; align-items: end; justify-content: center; gap: 4px; height: 103px; border-bottom: 1px solid #344457; background: repeating-linear-gradient(to top, transparent 0 24px, #28374b 24px 25px); }
.bar { width: clamp(5px, 1vw, 13px); background: var(--mint); border-radius: 4px 4px 0 0; }
.bar.failed { background: #dc8da2; }
.day { color: var(--muted); font-size: 10px; margin-top: 6px; white-space: nowrap; }
.status-list { margin: 0 19px; }
.status-row { min-height: 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 9px; font-size: 13px; }
.status-row span:first-child { color: var(--muted); }
.status-row strong { text-align: right; overflow-wrap: anywhere; }
.text-button { border: 0; background: transparent; color: var(--mint); padding: 0; margin: 11px 19px 16px; font-size: 12px; font-weight: 700; }
.text-button span { margin-left: 5px; }

.page-heading { margin: 8px 0 22px; }
.page-heading h1 { font-size: clamp(29px, 4vw, 39px); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 19px; }
.filter-bar label { font-weight: 600; font-size: 13px; }
.filter-bar input, .filter-bar select { background: #0e1724; color: var(--text); border: 1px solid var(--line); border-radius: 8px; min-height: 39px; padding: 8px 10px; min-width: 0; max-width: 100%; }
.results { margin-left: auto; color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th, td { border-top: 1px solid var(--line); padding: 11px 17px; vertical-align: middle; }
th { background: #172334; color: var(--muted); font-size: 11px; font-weight: 700; }
th:first-child, td:first-child { padding-left: 19px; }
td { color: #c4d0df; }
td:first-child { color: var(--text); font-weight: 600; max-width: 270px; overflow-wrap: anywhere; }
td:nth-child(3), td:nth-child(4), td:nth-child(5) { white-space: nowrap; }
tbody tr:hover { background: #1a2739; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; color: #c2cee0; background: #2b384b; }
.badge.ok { color: #a0f3d9; background: #1c3e36; }
.badge.failed { color: #ffc1cf; background: #482c3a; }
.empty { padding: 25px 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.chart .empty { border: 0; padding-left: 0; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 19px; font-size: 12px; color: var(--muted); }
.pagination:empty { display: none; }
.footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; padding: 16px 0 20px; }

dialog { width: min(510px, calc(100% - 26px)); max-height: 85dvh; color: var(--text); background: var(--panel); border: 1px solid #3b4d66; border-radius: 14px; padding: 22px; box-shadow: 0 18px 68px #04080ed0; }
dialog::backdrop { background: #050911bc; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.dialog-heading h2 { font-size: 22px; }
.icon-button { color: var(--text); background: #27364c; border: 0; border-radius: 7px; width: 34px; height: 34px; font-size: 23px; }
dialog p { margin-top: 10px; line-height: 1.55; color: var(--muted); }
.file-list, .guide-list { padding: 0; margin: 17px 0; }
.file-list li, .guide-list div { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 9px 0; font-size: 13px; }
.file-list span, .guide-list dd { color: var(--muted); }
.guide-list div { display: block; }
.guide-list dt { font-weight: 700; }
.guide-list dd { margin: 4px 0 0; line-height: 1.5; }
.file-picker { display: block; border: 1px dashed #526b82; border-radius: 8px; padding: 11px; font-size: 13px; }
.file-picker input { display: block; width: 100%; margin-top: 8px; color: var(--muted); }
.dialog-actions { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; margin-top: 18px; }
dialog p.error { color: var(--rose); }

@media (max-width: 1080px) {
  .shell { grid-template-columns: 190px minmax(0, 1fr); }
  .metric { padding: 12px; }
  .hero-graphic { inset-inline-start: 58%; }
}
@media (max-width: 850px) {
  .shell { display: block; }
  .sidebar { height: auto; position: static; flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .brand { margin: 0 auto 0 0; padding: 0; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .nav-label, .workspace { display: none; }
  .sidebar-footer { margin-top: 0; }
  .topbar { min-height: 55px; }
}
@media (max-width: 620px) {
  .sidebar { gap: 6px; }
  .sidebar nav { order: 3; width: 100%; }
  .sidebar nav a { flex: 1; justify-content: center; }
  .nav-link { min-height: 37px; font-size: 12px; padding: 7px; gap: 5px; }
  .topbar { padding-inline: 13px; }
  .breadcrumbs { display: none; }
  .top-actions { width: 100%; justify-content: space-between; }
  .content { padding: 15px 12px 0; }
  .vps-toolbar { gap: 7px; }
  .vps-toolbar select { min-width: 0; flex: 1; max-width: 100%; }
  .vps-toolbar label { width: 100%; }
  .hero { min-height: 196px; }
  .hero-graphic { inset-inline-start: 43%; opacity: .32; }
  .hero-copy > p:nth-of-type(2) { font-size: 13px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 10px 0; }
  .analysis-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
  .panel-heading { padding-inline: 13px; }
  .panel-heading p { line-height: 1.4; }
  .filter-bar { padding-inline: 12px; }
  .results { width: 100%; margin: 0; }
  .table-wrap table, .table-wrap tbody { display: block; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-wrap tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; border-top: 1px solid var(--line); padding: 13px; }
  .table-wrap td { border: 0; padding: 0; min-width: 0; white-space: normal; }
  .table-wrap td:first-child { grid-area: 1 / 1; align-self: center; }
  .table-wrap td:nth-child(4) { grid-area: 1 / 2; }
  .table-wrap td:nth-child(2), .table-wrap td:nth-child(3), .table-wrap td:nth-child(5) { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; }
  .table-wrap td:nth-child(2)::before, .table-wrap td:nth-child(3)::before, .table-wrap td:nth-child(5)::before { content: attr(data-label); color: var(--muted); font-size: 11px; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .nav-link { transition: background-color .16s ease, color .16s ease; }
}
