:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #192e35;
  background: #f5f7f7;
  font-synthesis: none;
  --ink: #192e35;
  --muted: #576a70;
  --line: #d8e1e1;
  --soft-line: #e6eceb;
  --teal: #007768;
  --teal-dark: #005d52;
  --surface: #fff;
  --sidebar: #102e38;
  --pad: clamp(20px, 3.1vw, 54px);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--teal-dark); text-underline-offset: 3px; }
:where(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid #0d9c92; outline-offset: 3px; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 3.1vw, 2.9rem); line-height: 1.07; font-weight: 660; letter-spacing: -.052em; }
h2 { font-size: 1.22rem; line-height: 1.25; font-weight: 650; letter-spacing: -.03em; }
h3 { font-size: 1.04rem; line-height: 1.35; letter-spacing: -.018em; }
p { line-height: 1.55; }
small, .muted { color: var(--muted); }
small { font-size: .79rem; line-height: 1.45; }
.eyebrow, .navgroup > h2, .navgroup > h3 {
  font-size: .67rem; font-weight: 720; letter-spacing: .14em;
  line-height: 1.45; text-transform: uppercase;
}
.eyebrow { display: block; color: var(--teal); margin-bottom: 9px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font-size: 1.32rem; font-weight: 700; line-height: 1.16; letter-spacing: -.045em; }
.brand > :last-child { min-width: 0; }
.brand strong, .brand b { display: block; }
.brand small { display: block; color: #b2c8c9; font-size: .68rem; font-weight: 520; letter-spacing: .085em; line-height: 1.4; margin-top: 3px; }
.mark {
  position: relative; flex: 0 0 auto; inline-size: 39px; block-size: 39px;
  display: inline-grid; place-items: center; color: #123c39; background: #98e2c6;
  border-radius: 10px; font-size: 1.05rem; letter-spacing: -.055em; font-weight: 800;
}
.mark:empty::before, .mark:empty::after {
  content: ""; position: absolute; width: 19px; height: 9px;
  border: 2px solid #155348; transform: skewY(-22deg); border-radius: 1.3px;
}
.mark:empty::before { top: 11px; left: 9px; }
.mark:empty::after { top: 20px; left: 12px; }
.mark svg { width: 24px; height: 24px; }
.setup-grid { display: grid; min-height: 100vh; min-height: 100svh; grid-template-columns: minmax(0, .97fr) minmax(0, 1.08fr); background: #fbfcfa; }
.setup-art {
  isolation: isolate; position: relative; overflow: hidden; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; padding: clamp(32px, 4.5vw, 80px);
  background: radial-gradient(ellipse at 70% 58%, #21554c 0, transparent 58%), linear-gradient(145deg, #102e30 3%, #184139 85%);
  color: #f2f8ee;
}
.setup-art::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("./port.svg") center bottom / 116% auto no-repeat;
}
.setup-art > .brand { color: #f5f8ef; }
.setup-caption { max-width: 35rem; margin-top: clamp(45px, 9vh, 100px); margin-bottom: clamp(190px, 23vw, 480px); }
.setup-caption h2 { font-size: clamp(2.15rem, 4.1vw, 4.9rem); letter-spacing: -.062em; line-height: 1.01; font-weight: 590; }
.setup-caption p { max-width: 34ch; margin-top: 17px; font-size: clamp(.96rem, 1.15vw, 1.17rem); color: #c2d7cd; }
.setup-art .eyebrow { color: #a2dfc7; }
.setup-form { min-width: 0; display: grid; align-content: center; justify-items: center; padding: clamp(34px, 5vw, 88px); background: #fbfcfa; }
.setup-form > * { width: min(100%, 465px); }
.setup-form form { min-width: 0; }
.setup-form h1 { font-size: clamp(2rem, 3.2vw, 3.5rem); margin-bottom: 12px; }
.setup-form h1 + p { color: var(--muted); font-size: .96rem; }
.setup-form .field-grid { margin-top: 26px; }
.setup-form .btn.primary { min-height: 44px; }
.setup-form form > .btn.primary { width: 100%; margin-top: 24px; }
.setup-form .actions { margin-top: 24px; }
.shell { display: grid; grid-template-columns: 238px minmax(0,1fr); min-height: 100vh; min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; align-items: stretch; padding: 30px 16px 20px; background: var(--sidebar); color: #edf6f5; scrollbar-color: #4c6a70 var(--sidebar); }
.sidebar .brand { margin: 0 9px 30px; }
.workspace-switch { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 43px; padding: 9px 12px; overflow-wrap: anywhere; border: 1px solid #3c5860; border-radius: 8px; background: #1b3c46; font-size: .85rem; font-weight: 570; line-height: 1.32; text-align: left; color: #f1f6f5; }
.workspace-switch small { color: #c0cfcd; }
.navgroup { margin-top: 24px; }
.navgroup .eyebrow, .navgroup > h2, .navgroup > h3 { margin: 0 12px 8px; color: #aac2c6; }
.navitem { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 39px; margin: 2px 0; padding: 9px 12px; border: 1px solid transparent; border-radius: 7px; color: #cfdfdf; background: transparent; text-decoration: none; text-align: left; font-size: .88rem; font-weight: 480; line-height: 1.3; }
.navitem:hover { background: #1d4048; color: #fff; }
.navitem.active, .navitem[aria-current="page"] { color: #c5f4e2; background: #23534f; font-weight: 625; }
.navitem svg, .btn svg, .workspace-switch svg, .topbar svg { width: 1.125rem; height: 1.125rem; flex: 0 0 auto; }
.ico { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.sidebar footer { margin-top: auto; padding: 20px 11px 0; font-size: .78rem; color: #bed0cf; }
.sidebar footer .muted { color: #bed0cf; }
.work { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-height: 64px; padding: 12px var(--pad); border-bottom: 1px solid var(--line); background: #fff; font-size: .84rem; color: #42585f; }
.content { width: 100%; max-width: 1700px; margin-inline: auto; padding: clamp(22px, 3vw, 46px) var(--pad) 64px; }
.content > * + * { margin-top: 21px; }
.page-head, .panel-head, .modal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 13px 20px; }
.page-head { margin-bottom: 26px; }
.page-head > *, .panel-head > *, .modal-head > * { min-width: 0; }
.page-head p, .panel-head p { margin-top: 7px; color: var(--muted); font-size: .9rem; }
.actions, .row, .toolbar, .modal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.stack { display: grid; align-content: start; gap: 15px; min-width: 0; }
.btn, .mobile-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%;
  min-height: 39px; padding: 8px 14px; border: 1px solid #cdd8d8; border-radius: 7px;
  background: #fff; color: #264249; font-size: .85rem; font-weight: 610; line-height: 1.3; text-decoration: none;
}
.btn:hover, .mobile-toggle:hover { border-color: #9eaeaf; background: #f5f8f7; }
.btn.primary { color: #fff; background: var(--teal); border-color: var(--teal); }
.btn.primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn.danger { color: #a22b35; border-color: #e8bdc1; background: #fffafa; }
.btn.danger:hover { background: #ffedee; }
.btn.small { min-height: 31px; padding: 5px 10px; font-size: .76rem; }
.mobile-toggle { display: none; }
.panel, .stat { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 1px 2px #102c3310; }
.panel { padding: clamp(16px, 2.2vw, 28px); }
.panel > * + * { margin-top: 17px; }
.panel-head + .table-wrap { margin-top: 18px; }
.panel > .table-wrap:only-child { margin: 0; }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); }
.stat { padding: 18px 20px; }
.stat > small, .stat > span, .stat > label { display: block; color: var(--muted); font-size: .78rem; font-weight: 570; }
.stat > strong, .stat > b { display: block; margin-top: 6px; color: var(--ink); font-size: 1.85rem; font-weight: 630; line-height: 1.1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr); align-items: start; gap: 18px; }
.empty { display: grid; place-content: center; justify-items: center; gap: 9px; padding: 32px 15px; text-align: center; font-size: .9rem; color: var(--muted); }
.empty h2, .empty h3, .empty strong { color: var(--ink); }
.empty svg { width: 28px; height: 28px; color: var(--teal); }
.empty-icon { display: grid; place-items: center; width: 49px; height: 49px; border-radius: 13px; background: #eaf4ef; margin-bottom: 4px; }
.empty p { max-width: 48ch; }
.error { color: #a22b35; font-size: .86rem; }
.error:not(:empty) { margin-top: 13px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,150px),1fr)); gap: 16px; }
.facts div { min-width: 0; }
.facts dt { color: var(--muted); font-size: .76rem; }
.facts dd { margin: 4px 0 0; font-size: .9rem; font-weight: 590; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 9px; border: 1px solid #c9e0d9; background: #eaf6ef; border-radius: 99px; color: #276453; font-size: .72rem; line-height: 1.5; font-weight: 650; vertical-align: middle; }
.badge.warn, .badge.warning { background: #fff6e4; color: #805514; border-color: #eedcbb; }
.badge.danger, .badge.error { background: #fdf0f0; color: #91363c; border-color: #ecccd0; }
.table-wrap { max-width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; text-align: left; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--soft-line); vertical-align: middle; }
th { color: #53676d; background: #f5f8f7; font-size: .73rem; font-weight: 650; }
td { line-height: 1.42; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfb; }
.tabs { display: flex; align-items: center; gap: 12px; max-width: 100%; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs > button, .tabs > a { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; min-height: 40px; padding: 8px 4px; color: var(--muted); font-size: .85rem; font-weight: 580; text-decoration: none; }
.tabs > .active, .tabs > [aria-selected="true"] { border-bottom-color: var(--teal); color: var(--teal-dark); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 15px; }
.field, label.field { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 6px; color: #30484c; font-size: .82rem; font-weight: 610; line-height: 1.4; }
.wide { grid-column: 1 / -1; }
input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]), select, textarea {
  min-width: 0; max-width: 100%; min-height: 40px; border: 1px solid #bdccca; border-radius: 7px;
  padding: 8px 11px; color: var(--ink); background: #fff; font-size: .89rem; line-height: 1.4; font-weight: 440;
}
.field :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]) { width: 100%; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--teal); }
input::placeholder, textarea::placeholder { color: #74858a; opacity: 1; }
textarea { resize: vertical; min-height: 76px; }
.toolbar { gap: 10px; }
.toolbar input { flex: 1 1 185px; }
.toolbar select { flex: 0 1 auto; }
dialog.modal {
  width: min(660px, calc(100vw - 32px)); max-width: 100%; max-height: min(88vh, 900px);
  padding: 0; border: 1px solid #bdccca; border-radius: 14px; color: var(--ink);
  background: #fff; box-shadow: 0 18px 74px #0c282b35; overflow: auto;
}
dialog.modal::backdrop { background: #102c37a8; }
.modal-head, .modal-foot { padding: 18px 23px; }
.modal-head { border-bottom: 1px solid var(--soft-line); }
.modal-body { padding: 20px 23px; min-width: 0; }
.modal-foot { border-top: 1px solid var(--soft-line); justify-content: flex-end; }
.toast { z-index: 40; position: fixed; right: 20px; bottom: 20px; max-width: min(400px, calc(100% - 32px)); padding: 12px 18px; border-radius: 9px; background: #143e3b; border: 1px solid #47756c; color: white; box-shadow: 0 5px 22px #0e2d3026; font-size: .87rem; line-height: 1.5; overflow-wrap: anywhere; }
.toast:empty { display: none; }
@media (min-width: 1500px) {
  .shell { grid-template-columns: 252px minmax(0, 1fr); }
  .setup-art::before { background-size: 106% auto; }
}
@media (max-width: 1100px) {
  .shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .setup-caption { margin-top: 8vh; }
}
@media (max-width: 800px) {
  .setup-grid { grid-template-columns: 1fr; }
  .setup-art { min-height: 185px; padding: 24px var(--pad); }
  .setup-art::before { background-size: 58% auto; background-position: 116% 66%; }
  .setup-caption { max-width: 55%; margin: 20px 0 0; }
  .setup-caption h2 { font-size: clamp(1.55rem, 3.9vw, 2.35rem); }
  .setup-caption p { font-size: .86rem; margin-top: 8px; }
  .setup-form { padding: 34px var(--pad) 48px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 15; inset: 0 auto 0 0; width: min(285px, 85vw); height: 100dvh; visibility: hidden; transform: translateX(-100%); }
  :is(.shell, body):is(.nav-open, .sidebar-open, .menu-open) .sidebar, .sidebar:is(.open, .is-open, [data-open="true"]) { visibility: visible; transform: translateX(0); box-shadow: 12px 0 44px #142d3840; }
  .mobile-toggle { display: inline-flex; }
  .topbar { min-height: 55px; }
}
@media (max-width: 525px) {
  :root { --pad: 17px; }
  .setup-art { min-height: 154px; }
  .setup-art::before { background-size: 74% auto; background-position: 165% 74%; }
  .setup-caption { max-width: 59%; }
  .setup-caption p { font-size: .76rem; }
  .setup-form { padding: 29px 21px 36px; }
  .field-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .page-head { align-items: flex-start; margin-bottom: 18px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat { padding: 14px; }
  .stat > strong, .stat > b { font-size: 1.5rem; }
  .modal-head, .modal-body, .modal-foot { padding: 16px; }
  .toast { right: 16px; bottom: 16px; }
}
@media print {
  .shell { display: block; }
  .sidebar, .mobile-toggle, .topbar, .toast { display: none; }
  .content { padding: 0; }
  .panel, .stat { box-shadow: none; }
}
