:root {
  color-scheme: dark;
  --bg: #071019;
  --surface: #0d1924;
  --surface-2: #111f2c;
  --line: #203342;
  --text: #eef7fb;
  --muted: #8ba3b3;
  --teal: #16d6b0;
  --blue: #4b8cff;
  --amber: #f2ae49;
  --red: #ff6475;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% -10%, #123246 0, transparent 34%), var(--bg); color: var(--text); }
a { color: inherit; }
button, input, select { font: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 80px; }
.topbar { height: 68px; border-bottom: 1px solid var(--line); background: rgba(7,16,25,.92); backdrop-filter: blur(16px); display: flex; align-items: center; padding: 0 max(24px, calc((100vw - 1180px)/2)); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .08em; margin-right: 46px; }
.brand b, .login-brand b { color: var(--teal); }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #2f6c73; background: linear-gradient(145deg,#164653,#10252e); border-radius: 10px; color: var(--teal); font-size: 12px; box-shadow: 0 0 24px #16d6b022; }
.topbar nav { display: flex; gap: 28px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.topbar nav a:hover { color: var(--text); }
.account { margin-left: auto; display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 14px; }
.account form { margin: 0; }
.link-button { border: 0; background: none; color: var(--teal); cursor: pointer; padding: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-heading h1, .narrow-heading h1 { font-size: clamp(32px,5vw,48px); letter-spacing: -.04em; margin: 7px 0 8px; }
.page-heading p, .narrow-heading p { margin: 0; color: var(--muted); line-height: 1.6; }
.eyebrow { color: var(--teal)!important; font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.button { min-height: 44px; padding: 0 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; text-decoration: none; font-weight: 700; cursor: pointer; }
.button.primary { color: #041914; background: var(--teal); box-shadow: 0 8px 24px #16d6b01c; }
.button.primary:hover { background: #3ae1c0; }
.button.secondary { color: var(--text); border-color: var(--line); background: var(--surface-2); }
.button:disabled { opacity: .65; cursor: wait; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 18px; }
.stats article { border: 1px solid var(--line); background: linear-gradient(145deg,#0e1b27,#0a151e); border-radius: 12px; padding: 21px; display: flex; align-items: center; gap: 15px; }
.stats small { color: var(--muted); display: block; margin-bottom: 2px; }
.stats strong { font-size: 25px; }
.stat-icon { width: 39px; height: 39px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; }
.stat-icon.blue { color: #7dacff; background: #4b8cff1c; }
.stat-icon.green { color: var(--teal); background: #16d6b019; }
.stat-icon.amber { color: var(--amber); background: #f2ae4918; }
.stat-icon.red { color: var(--red); background: #ff647518; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(300px,1fr); gap: 18px; }
.panel { border: 1px solid var(--line); background: rgba(13,25,36,.93); border-radius: 13px; overflow: hidden; box-shadow: 0 18px 50px #00000018; }
.panel-title { min-height: 78px; padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.panel-title h2 { font-size: 16px; margin: 0 0 5px; }
.panel-title p { font-size: 13px; color: var(--muted); margin: 0; }
.site-row { display: grid; grid-template-columns: 42px minmax(150px,1.4fr) minmax(150px,1fr) auto 18px; gap: 14px; align-items: center; min-height: 76px; padding: 12px 20px; text-decoration: none; border-bottom: 1px solid #1a2a37; }
.site-row:last-child { border: 0; }
.site-row:hover { background: #ffffff04; }
.site-icon, .site-title-icon { background: linear-gradient(145deg,#183747,#102731); border: 1px solid #285060; color: var(--teal); display: grid; place-items: center; font-weight: 800; border-radius: 10px; }
.site-icon { width: 39px; height: 39px; }
.site-main strong, .site-main small, .origin small { display: block; }
.site-main small, .origin small { color: var(--muted); margin-top: 5px; font-size: 12px; }
.origin { font-size: 13px; color: #c7d6df; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 7px; width: max-content; border-radius: 999px; padding: 6px 9px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.success { background: #16d6b017; color: var(--teal); }
.badge.pending, .badge.warning { background: #f2ae4918; color: var(--amber); }
.badge.danger, .badge.error { background: #ff647517; color: var(--red); }
.badge.muted, .badge.info { background: #8ba3b319; color: var(--muted); }
.arrow { color: var(--muted); font-size: 25px; }
.activity ul, .timeline ul { list-style: none; padding: 12px 21px 20px; margin: 0; }
.activity li, .timeline li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #182936; }
.activity li:last-child, .timeline li:last-child { border: 0; }
.activity strong, .timeline strong { display: block; font-size: 13px; line-height: 1.4; }
.activity small, .timeline small { color: var(--muted); display: block; margin-top: 5px; font-size: 11px; }
.event-dot { width: 7px; height: 7px; background: var(--blue); border-radius: 50%; margin-top: 6px; flex: 0 0 auto; }
.event-dot.success { background: var(--teal); }
.event-dot.warning { background: var(--amber); }
.event-dot.error { background: var(--red); }
.info-strip { margin-top: 18px; border: 1px solid #174753; background: #0d2931; border-radius: 12px; padding: 17px 20px; display: flex; gap: 13px; }
.info-strip > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: #05221b; font-weight: 900; }
.info-strip p { margin: 4px 0 0; color: #9eb8c3; font-size: 13px; }
.empty { padding: 54px 24px; text-align: center; }
.empty-icon { margin: 0 auto 15px; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--teal); }
.empty h3 { margin: 0 0 7px; }
.empty p { color: var(--muted); margin: 0 auto 22px; }
.alert { padding: 14px 17px; border-radius: 10px; margin: 0 0 18px; border: 1px solid; font-size: 14px; line-height: 1.5; }
.alert.success { border-color: #19745f; background: #0c2c26; color: #97f3df; }
.alert.warning { border-color: #735629; background: #2d2415; color: #ffd48d; }
.alert.danger { border-color: #74333e; background: #2f171d; color: #ffb2bc; overflow-wrap: anywhere; }
.back-row { margin-bottom: 27px; }
.back-row a { color: var(--muted); text-decoration: none; font-size: 14px; }
.narrow-heading { max-width: 720px; margin-bottom: 28px; }
.form-card { max-width: 820px; }
fieldset { border: 0; padding: 25px 27px 29px; margin: 0; border-bottom: 1px solid var(--line); }
fieldset legend { padding: 0; font-size: 16px; font-weight: 800; margin-bottom: 20px; }
label { display: block; color: #dce9ef; font-size: 13px; font-weight: 700; }
label > span { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin: 4px 0 8px; }
input, select { width: 100%; min-height: 45px; border: 1px solid #2b4354; background: #09141d; color: var(--text); border-radius: 8px; padding: 0 13px; margin-top: 8px; outline: none; }
input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px #16d6b017; }
.field-grid { display: flex; gap: 14px; margin-bottom: 20px; }
.field-grid label:first-child { width: 150px; }
.field-grid .grow { flex: 1; }
.checkbox { margin-top: 18px; display: flex; align-items: flex-start; gap: 11px; font-weight: 400; }
.checkbox input { width: 17px; min-height: 17px; margin: 3px 0 0; accent-color: var(--teal); }
.checkbox span { margin: 0; }
.checkbox strong { display: block; color: var(--text); font-size: 13px; }
.checkbox small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.form-actions { padding: 20px 27px; display: flex; justify-content: flex-end; gap: 10px; }
.site-heading { display: flex; align-items: center; gap: 17px; margin-bottom: 28px; }
.site-title-icon { width: 58px; height: 58px; font-size: 20px; }
.site-heading h1 { margin: 7px 0 3px; font-size: 34px; letter-spacing: -.03em; }
.site-heading p { color: var(--muted); margin: 0; font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(300px,.8fr); gap: 18px; }
.warning-box { margin: 20px 22px 0; border: 1px solid #6d522a; background: #2b2214; padding: 13px 15px; border-radius: 9px; color: #ffd797; }
.warning-box strong { font-size: 13px; }
.warning-box p { margin: 5px 0 0; color: #cdb27e; font-size: 12px; line-height: 1.5; }
.dns-table { width: 100%; border-collapse: collapse; }
.dns-table th { text-align: left; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.dns-table th, .dns-table td { padding: 15px 22px; border-bottom: 1px solid #1b2c39; }
.dns-table td { font-size: 13px; }
code { color: var(--teal); background: #092a29; border: 1px solid #174b47; border-radius: 6px; padding: 5px 8px; cursor: copy; }
.hint { color: var(--muted); font-size: 12px; padding: 0 22px; line-height: 1.6; }
.activation-row { border-top: 1px solid var(--line); margin-top: 19px; padding: 20px 22px; display: flex; align-items: center; gap: 14px; }
.activation-row > span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.route-card dl { margin: 0; }
.route-card dl div { padding: 14px 21px; border-bottom: 1px solid #1b2c39; }
.route-card dt { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.route-card dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.timeline { margin-top: 18px; }
.table-panel { overflow-x: auto; }
.login-shell { min-height: calc(100vh - 110px); display: grid; place-items: center; }
.login-card { width: min(430px,100%); border: 1px solid var(--line); background: rgba(13,25,36,.96); border-radius: 16px; padding: 34px; box-shadow: 0 35px 100px #0008; }
.login-brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: .08em; margin-bottom: 40px; }
.login-brand small { display: block; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: 3px; }
.login-card h1 { margin: 0 0 9px; font-size: 28px; }
.login-card > p { color: var(--muted); margin: 0 0 25px; line-height: 1.5; }
.form-stack label { margin-bottom: 17px; }
.form-stack .button { width: 100%; margin-top: 8px; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .topbar nav { display: none; }
  .site-row { grid-template-columns: 40px 1fr auto 14px; }
  .site-row .origin { display: none; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 24px,1180px); padding-top: 32px; }
  .topbar { padding: 0 14px; }
  .brand { margin-right: 0; }
  .account > span { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .button { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stats article { padding: 15px; }
  .stat-icon { display: none; }
  .site-row { padding: 12px; grid-template-columns: 36px 1fr; }
  .site-row .badge, .site-row .arrow { display: none; }
  .field-grid { flex-direction: column; }
  .field-grid label:first-child { width: 100%; }
  .activation-row { align-items: stretch; flex-direction: column; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .login-card { padding: 25px; }
}
