:root {
  --ink: #17100e;
  --paper: #f3ece2;
  --panel: #fff8ed;
  --line: #d9c8b5;
  --orange: #ff6b4a;
  --orange-dark: #b83d28;
  --char: #251916;
  --muted: #78645b;
  --error: #9a302c;
  --good: #27644b;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  overflow-x: hidden;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font: 15px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  background:
    radial-gradient(circle at 92% 0, #ffd7a9 0, transparent 23rem),
    linear-gradient(120deg, #f3ece2, #efe2d2);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(255, 107, 74, .45);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.noscript {
  padding: 16px;
  color: var(--error);
  background: #ffe0d9;
}

.login-wrap {
  display: grid;
  min-height: 100dvh;
  padding: 24px;
  place-items: center;
}

.login-card {
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--orange);
  background: var(--panel);
  box-shadow: 12px 12px 0 #dbbaa2;
}

.login-logo {
  max-width: 155px;
  max-height: 60px;
  object-fit: contain;
  object-position: left;
}

.eyebrow {
  margin: 18px 0 7px;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
}

h1, h2 {
  margin: 0 0 10px;
  font-family: Georgia, serif;
  letter-spacing: -.03em;
  line-height: 1.05;
}

h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: 21px; }

label {
  display: block;
  margin: 17px 0 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

input, textarea, select {
  width: 100%;
  margin-top: 7px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  background: #fffdf9;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.button {
  padding: 10px 13px;
  border: 1px solid var(--char);
  border-radius: 3px;
  color: var(--char);
  font-weight: 800;
  background: transparent;
}

.button:hover { background: #f0dfce; }

.button.accent {
  border-color: var(--orange);
  color: #29120c;
  background: var(--orange);
}

.button.accent:hover { background: #f95b3a; }
.button.quiet { border-color: transparent; }
.subtle { color: var(--muted); font-size: 12px; }

.notice {
  margin: 0 0 16px;
  padding: 11px 13px;
  border-left: 4px solid #c17b30;
  background: #f6e4c9;
}

.notice.error {
  border-color: var(--error);
  color: #70231f;
  background: #fde5df;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px 24px;
  color: #fff4e9;
  background: var(--char);
}

.top-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.top-title {
  display: grid;
  line-height: 1.1;
}

.top-title span,
.top-meta {
  color: #d5baaa;
  font-size: 11px;
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
}

.topbar .button {
  border-color: #705244;
  color: #fff4e9;
}

.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  max-width: 1550px;
  margin: auto;
}

.sidebar {
  min-height: calc(100dvh - 72px);
  padding: 22px 14px;
  color: #fbeade;
  background: #30211d;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px 18px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .1em;
}

.side-brand img {
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.sidebar nav {
  display: grid;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border: 0;
  border-left: 3px solid transparent;
  color: #dfc8ba;
  font-weight: 700;
  text-align: left;
  background: transparent;
}

.nav-item b {
  color: #ff9d87;
  font-size: 11px;
}

.nav-item:hover,
.nav-item.active {
  border-left-color: var(--orange);
  color: #fff5ec;
  background: #49312a;
}

.action-item { margin-top: 3px; }

.side-note {
  margin: 20px 10px;
  color: #b89887;
  font-size: 11px;
}

.main {
  min-width: 0;
  padding: clamp(18px, 4vw, 48px);
}

.tab { display: none; }
.tab.active { display: block; }

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}

.page-header > div > p:last-child {
  margin: 0;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stat-grid article,
.panel-card {
  border: 1px solid var(--line);
  background: rgba(255, 248, 237, .8);
  box-shadow: 5px 5px 0 rgba(110, 69, 43, .1);
}

.stat-grid article { padding: 17px; }

.stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
}

.stat-grid strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  font: 700 26px Georgia, serif;
  text-overflow: ellipsis;
}

.panel-card {
  margin-bottom: 16px;
  padding: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid .panel-card { margin: 0; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.switch-row input {
  position: relative;
  width: 44px;
  height: 24px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 20px;
  background: #c9b4a5;
}

.switch-row input:checked { background: var(--orange); }

.switch-row input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s;
}

.switch-row input:checked::after { transform: translateX(20px); }

.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dns-row {
  display: flex;
  gap: 8px;
  margin: 7px 0;
}

.dns-row input { margin: 0; }
.dns-row button { white-space: nowrap; }

.logo-preview {
  display: block;
  max-width: 100%;
  max-height: 160px;
  margin-top: 16px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.detail-list { margin: 0; }

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt { color: var(--muted); }

.detail-list dd {
  margin: 0;
  font-weight: bold;
  word-break: break-all;
}

.save-bar {
  position: sticky;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding: 12px;
  border: 1px solid #51372e;
  color: #fff7ed;
  background: #2b1d18;
  box-shadow: 6px 6px 0 rgba(75, 42, 30, .25);
}

.save-bar span {
  margin-right: auto;
  font-size: 12px;
}

.save-bar .button {
  border-color: #806051;
  color: #fff7ed;
}

.update-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  color: #542410;
  font-size: 13px;
  background: #ffcf95;
}

.update-banner .button { margin-left: auto; }
.warning { background: #f7d9ae; }
.sync { color: #ffd69c; }
.sync.error { color: #ffa297; }
.mobile-only { display: none; }
.drawer-backdrop { display: none; }

@media (max-width: 800px) {
  .mobile-only { display: block; }

  .topbar {
    min-width: 0;
    padding: 10px 12px;
  }

  .top-title { display: none; }
  .top-meta { gap: 8px; min-width: 0; }
  .top-meta #build-label { display: none; }

  .app-shell {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .sidebar {
    position: fixed;
    inset: 72px auto 0 0;
    z-index: 20;
    width: min(300px, calc(100vw - 28px));
    visibility: hidden;
    pointer-events: none;
    transform: translateX(calc(-100% - 24px));
    box-shadow: 10px 0 25px #0004;
  }

  .sidebar.open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  .drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 15;
    display: block;
    border: 0;
    opacity: 0;
    pointer-events: none;
    background: rgba(28, 17, 13, .5);
    transition: opacity .2s;
  }

  .drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    width: 100%;
    min-width: 0;
    padding: 22px 14px;
    overflow: visible;
  }

  .stat-grid,
  .form-grid,
  .two-up {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .page-header {
    align-items: start;
    flex-direction: column;
  }

  .page-header h1 { overflow-wrap: anywhere; }

  .update-banner {
    flex-wrap: wrap;
    padding: 11px 14px;
  }

  .update-banner .button { margin-left: 0; }

  .save-bar {
    bottom: 6px;
    flex-wrap: wrap;
  }

  .save-bar span { width: 100%; }
}

@media (max-width: 430px) {
  .topbar { gap: 7px; }

  .top-logo {
    width: 38px;
    height: 38px;
  }

  .top-meta { gap: 4px; }
  .topbar .button { padding: 9px 8px; }
  .panel-card { padding: 17px; }
  .login-wrap { padding: 14px; }
  .login-card { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Workspace refresh — restrained, high-clarity control surface. */
:root {
  --ink: #1d2530;
  --paper: #edf1f4;
  --panel: #f9fbfc;
  --line: #d8e0e6;
  --orange-dark: #b64b30;
  --char: #26313d;
  --muted: #667382;
  --error: #b63f35;
  --good: #28705e;
}
html { background: var(--paper); }
body {
  font-family: "Segoe UI", "Avenir Next", Avenir, system-ui, sans-serif;
  font-size: 14px;
  background: linear-gradient(135deg, #f2f5f7 0%, #e9eef2 100%);
}
body::before { content:""; position:fixed; inset:0; pointer-events:none; opacity:.22; background-image:radial-gradient(#9ba8b3 .55px,transparent .55px); background-size:8px 8px; }
h1,h2 { font-family: "Trebuchet MS", "Avenir Next", sans-serif; letter-spacing:-.035em; color:#202a35; }
h1 { font-size:clamp(26px,3vw,38px); font-weight:750; }
h2 { font-size:18px; font-weight:750; }
.login-wrap { position:relative; padding:28px; background:linear-gradient(135deg,#27313c 0%,#3d4650 58%,#b64b30 180%); }
.login-card { border:1px solid rgba(255,255,255,.56); border-top:4px solid var(--orange); border-radius:12px; padding:38px; background:rgba(249,251,252,.97); box-shadow:0 24px 56px rgba(11,20,30,.32); }
.login-card h1 { max-width:330px; }
.login-logo { margin-bottom:4px; }
.password-input { position:relative; display:block; }
.password-input input { padding-right:64px; }
.reveal-password { position:absolute; right:6px; top:50%; padding:4px 7px; border:0; border-radius:4px; color:#536270; font-size:11px; font-weight:700; background:transparent; transform:translateY(-20%); }
.reveal-password:hover { color:var(--orange-dark); background:#f0f3f5; }
.eyebrow { color:var(--orange-dark); font-size:10px; letter-spacing:.15em; }
label { color:#455260; font-size:11px; letter-spacing:.045em; }
input,textarea,select { border-color:#cbd5dd; border-radius:7px; padding:10px 11px; color:var(--ink); background:#fff; transition:border-color .16s,box-shadow .16s; }
input:hover,textarea:hover,select:hover { border-color:#aebbc5; }
input:focus,textarea:focus,select:focus { border-color:var(--orange); box-shadow:0 0 0 3px color-mix(in srgb,var(--orange) 15%,transparent); outline:0; }
.button { min-height:38px; border-color:#b9c5ce; border-radius:7px; color:#344250; font-size:13px; font-weight:700; background:#f8fafb; transition:transform .16s,background .16s,border-color .16s; }
.button:hover:not(:disabled) { border-color:#93a3af; background:#e9eef1; transform:translateY(-1px); }
.button.accent { border-color:var(--orange); color:#fff; background:var(--orange); box-shadow:0 5px 12px color-mix(in srgb,var(--orange) 25%,transparent); }
.button.accent:hover:not(:disabled) { background:#e65e3f; }
button:disabled { cursor:not-allowed; opacity:.52; transform:none!important; }
.topbar { position:sticky; z-index:12; top:0; min-height:64px; padding:8px 26px; color:#eaf0f3; background:rgba(35,45,56,.98); box-shadow:0 1px 0 rgba(255,255,255,.08); }
.top-logo { width:40px; height:40px; }
.top-title { font-size:14px; }
.top-title span,.top-meta { color:#aab6c0; }
.topbar .button { border-color:#566574; color:#f2f5f6; background:transparent; }
.topbar .button:hover:not(:disabled) { background:#3d4b58; }
.sync { display:inline-flex; align-items:center; gap:6px; color:#bdcfcc; }
.sync::before { content:""; width:7px; height:7px; border-radius:50%; background:#75b19c; }
.sync.error { color:#ffc1b5; }.sync.error::before { background:#eb8b76; }
.app-shell { max-width:none; grid-template-columns:236px minmax(0,1fr); }
.sidebar { position:sticky; top:64px; height:calc(100dvh - 64px); min-height:0; padding:22px 12px; color:#d3dde3; background:#26313d; border-right:1px solid #3a4652; }
.side-brand { padding:0 10px 20px; color:#fff; font-size:11px; }
.drawer-close { margin-left:auto; padding:5px 7px; border:1px solid #60707e; border-radius:5px; color:#e8eef1; font:inherit; font-size:11px; font-weight:700; background:transparent; }
.drawer-close:hover { background:#3b4855; }
.sidebar nav { gap:4px; }
.nav-item { border-left:0; border-radius:6px; padding:10px; color:#bdc9d2; font-size:13px; }
.nav-item b { width:20px; color:#8998a5; font-size:10px; }
.nav-item:hover,.nav-item.active { border-left:0; color:#fff; background:#3b4855; }
.nav-item.active b { color:#ff9d83; }
.action-item { margin-top:8px; border:1px solid #465461; background:#2d3945; }
.side-note { color:#90a0ae; line-height:1.55; }
.main { max-width:1240px; padding:clamp(26px,4vw,52px); }
.page-header { margin-bottom:28px; }.page-header > div > p:last-child { max-width:600px; }
.stat-grid { gap:14px; margin-bottom:22px; }
.stat-grid article,.panel-card { border:1px solid var(--line); border-radius:10px; background:rgba(250,252,253,.92); box-shadow:0 8px 20px rgba(30,48,62,.055); }
.stat-grid article { padding:17px 18px; }.stat-grid strong { font-family:"Trebuchet MS",sans-serif; font-size:23px; color:#26313d; }
.panel-card { padding:24px; }.panel-card h2 { margin-bottom:3px; }
.form-grid { gap:18px; }.switch-row { padding:14px 0; border-color:#e1e7eb; color:#334150; }
.switch-row input { background:#bcc8d0; }.switch-row input:checked { background:var(--orange); }
.detail-list div { border-color:#e0e7eb; }.detail-list dd { color:#344351; }
.notice { border-radius:7px; border-left:3px solid #b47428; background:#fff2d9; color:#624619; }
.notice.error { background:#fde9e6; color:#7f302b; }
.update-banner { position:relative; z-index:13; padding:10px 26px; color:#53421d; background:#fff2d3; border-bottom:1px solid #efd9a9; }
.warning { background:#fce6df; color:#79372e; border-color:#efc4bb; }
.save-bar { z-index:8; border:1px solid #d0d9df; border-radius:10px; color:#354351; background:rgba(249,251,252,.96); box-shadow:0 10px 25px rgba(29,43,55,.16); backdrop-filter:blur(10px); }
.save-bar .button { border-color:#bdc9d1; color:#344250; }.save-bar .button.accent { color:#fff; border-color:var(--orange); }
.diagnostics { margin-top:18px; border:1px solid var(--line); border-radius:8px; background:#f7f9fa; color:var(--muted); font-size:12px; }
.diagnostics summary { cursor:pointer; padding:11px 13px; font-weight:700; color:#536270; }.diagnostics div { padding:0 13px 13px; }
.getting-started ol { margin:15px 0 0; padding-left:22px; }.getting-started li { padding:6px 0; color:#465563; }.getting-started li button { padding:0; border:0; color:var(--orange-dark); font:inherit; font-weight:700; text-decoration:underline; background:none; }
.help-details { margin-top:16px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; }.help-details summary { padding-top:13px; cursor:pointer; font-weight:700; color:#536270; }.help-details p { margin:8px 0 0; line-height:1.55; }
label small { display:block; margin-top:5px; color:var(--muted); font-size:12px; font-weight:400; letter-spacing:0; line-height:1.4; text-transform:none; }
.session-overlay { position:fixed; z-index:50; inset:0; display:grid; place-items:center; padding:20px; background:rgba(28,38,48,.7); backdrop-filter:blur(5px); }
.session-overlay .login-card { box-shadow:0 24px 60px rgba(0,0,0,.3); }
@media(max-width:800px) {
  .sidebar { position:fixed; top:64px; height:calc(100dvh - 64px); transition:transform .2s ease,visibility .2s; }
  .sidebar.open { box-shadow:12px 0 30px rgba(12,20,28,.28); }
  .main { padding:26px 14px 32px; }.topbar { padding:8px 12px; }.update-banner { padding:11px 14px; }
  .save-bar { bottom:8px; padding:10px; }.login-card { padding:28px 22px; }
}