:root {
  color-scheme: light;
  font: 16px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172247;
  background: #f1f4fa;
  --line: #e3e8f3;
  --muted: #55627c;
  --brand: #2244d8;
  --navy: #091a60;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.55rem; letter-spacing: -.035em; }
h2 { font-size: clamp(1.4rem, 3vw, 2.15rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
h3 { font-size: 1.05rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #697ff5; outline-offset: 3px; }
.symbols { position: absolute; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.workspace { display: grid; min-height: calc(100dvh - 64px); grid-template: 64px 1fr / 218px minmax(0, 1fr); max-width: 1440px; margin: 32px auto; width: calc(100% - 64px); border: 1px solid var(--line); border-radius: 18px; background: white; overflow: clip; box-shadow: 0 18px 60px #10255010; }
.sidebar { grid-row: 1 / 3; display: flex; flex-direction: column; padding: 20px 14px; border-right: 1px solid var(--line); background: #f8faff; }
.brand { display: inline-flex; width: fit-content; align-items: center; gap: 10px; font-weight: 760; letter-spacing: -.035em; color: var(--navy); font-size: 1.2rem; }
.sidebar .brand { margin: 0 8px 32px; }
.sidebar nav { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.nav-link:hover, .nav-link.active { color: #233fc2; background: #e9eeff; }
.sidebar-bottom { margin-top: auto; padding: 16px 4px 0; display: flex; gap: 9px; align-items: center; min-width: 0; }
.sidebar-bottom strong, .sidebar-bottom small { display: block; overflow-wrap: anywhere; }
.sidebar-bottom strong { font-size: .9rem; }
.sidebar-bottom small { font-size: .8rem; color: var(--muted); }
.avatar, .domain-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; background: #e9eeff; color: #263fba; font-weight: 700; }
.avatar { width: 34px; height: 34px; border-radius: 50%; font-size: .75rem; }
.topbar { padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: .9rem; color: var(--muted); }
.breadcrumb span { padding: 0 6px; color: #6c7890; }
.breadcrumb strong { color: #172247; }
.topbar-actions, .dialog-actions { display: flex; gap: 8px; }
.button { border: 1px solid #dce3f0; border-radius: 9px; background: white; color: #263456; font-weight: 650; font-size: .875rem; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; min-height: 38px; }
.button:hover { background: #f0f3fc; }
.button.primary { background: var(--brand); border-color: var(--brand); color: white; }
.button.primary:hover { background: #1633ae; }
.content { min-width: 0; background: #f9faff; }
.content.split { display: grid; grid-template-columns: minmax(248px, 30%) minmax(0, 1fr); }
.listing { background: white; border-right: 1px solid var(--line); min-width: 0; }
.list-heading { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 26px 19px 16px; }
.list-heading p, .muted { color: var(--muted); }
.list-heading p { font-size: .85rem; }
.add { padding: 7px; flex: none; }
.search { display: flex; align-items: center; gap: 9px; color: var(--muted); margin: 0 19px 16px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fafbff; }
.search input { width: 100%; border: 0; background: transparent; padding: 0; font-size: .9rem; color: #172247; }
.domain-row { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-top: 1px solid var(--line); border-left: 3px solid transparent; }
.domain-row:last-child { border-bottom: 1px solid var(--line); }
.domain-row:hover, .domain-row.selected { background: #f0f4ff; }
.domain-row.selected { border-left-color: var(--brand); }
.domain-row strong, .domain-row small { display: block; overflow-wrap: anywhere; }
.domain-row strong { font-size: .94rem; }
.domain-row small { color: var(--muted); font-size: .8rem; }
.dot { display: inline-block; border-radius: 50%; width: 7px; height: 7px; background: #19795c; flex: none; }
.domain-row .dot { margin-left: auto; }
.dot.pending, .waiting .dot { background: #956008; }
.detail { padding: clamp(22px, 4vw, 52px); min-width: 0; }
.domain-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.domain-icon.large { width: 58px; height: 58px; border-radius: 15px; }
.domain-icon.large .icon { width: 28px; height: 28px; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px; border-radius: 20px; color: #14624b; background: #e5f5ed; font-size: .82rem; font-weight: 650; }
.badge.waiting { color: #79500c; background: #fff2d7; }
.card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 22px; max-width: 740px; margin-bottom: 15px; }
.card .muted { margin: 6px 0 14px; }
.record { border: 1px solid var(--line); border-radius: 9px; background: #f8faff; padding: 12px; }
.record.checked { color: #14624b; display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.record div + div { margin-top: 9px; }
.record dt { font-size: .8rem; color: var(--muted); }
.record dd { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.icon-button { padding: 5px; min-height: 31px; }
.icon-button .icon { width: 16px; height: 16px; }
.notice { padding: 12px; margin-bottom: 16px; color: #1e327d; border-radius: 8px; background: #e8eeff; }
.empty .domain-icon, .standalone h1 { margin-bottom: 16px; }
.search-empty { padding: 12px 20px; }
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 23px; width: min(440px, calc(100% - 32px)); color: #172247; }
dialog::backdrop { background: #07163770; }
dialog h2 { margin-bottom: 17px; }
dialog label, .auth-card label { display: block; font-size: .9rem; font-weight: 650; }
dialog input, .auth-card input { display: block; width: 100%; min-height: 42px; border: 1px solid #d3dced; border-radius: 8px; padding: 7px 10px; margin: 5px 0 13px; }
.dialog-actions { justify-content: flex-end; }
.error { color: #a12437; font-size: .9rem; margin-bottom: 10px; }
.auth-page { min-height: 100dvh; display: grid; justify-items: center; align-content: center; gap: 20px; padding: 20px; }
.auth-card { width: min(100%, 435px); }
.auth-card h1 { margin-bottom: 18px; }
.auth-card .primary { width: 100%; }
.switch { display: inline-block; color: #263fba; margin-top: 15px; }
@media (max-width: 900px) {
  .workspace { width: 100%; margin: 0; min-height: 100dvh; border: 0; border-radius: 0; grid-template-columns: 177px minmax(0,1fr); }
  .content.split { grid-template-columns: minmax(194px, 36%) minmax(0,1fr); }
  .list-heading, .detail { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 650px) {
  .workspace { display: block; }
  .sidebar { padding: 12px; gap: 12px; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0 4px; }
  .sidebar nav { display: flex; gap: 4px; overflow-x: auto; }
  .nav-link { padding: 8px; flex: none; font-size: .83rem; }
  .sidebar-bottom { display: none; }
  .topbar { padding: 10px 12px; min-height: 57px; }
  .breadcrumb { font-size: .8rem; }
  .breadcrumb span { padding: 0 2px; }
  .topbar .button { padding: 6px 8px; }
  .content.split { display: block; }
  .listing { border-right: 0; padding-bottom: 10px; }
  .list-heading { padding-top: 14px; }
  .detail { padding-top: 22px; }
}
.setup-form { display: grid; justify-items: start; gap: 10px; margin: 12px 0 16px; }
.setup-form label { display: grid; gap: 4px; }
.setup-form label:has([type=checkbox]) { display: flex; align-items: baseline; gap: 8px; }
.setup-form input:not([type=checkbox]), .setup-form select { font: inherit; color: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; width: min(100%, 350px); }
.operator-page { max-width: 840px; margin: 0 auto; padding: 28px 16px; }
.operator-page h1 { margin-top: 16px; }
.operator-page .card { margin-top: 16px; }
.operator-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 0; }
.operator-row + .operator-row { border-top: 1px solid var(--line); }
.operator-row small { display: block; color: var(--muted); }
