/* DAS Cloud — design tokens (light only, by request). */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --subtle: #f4f4f5;
  --hover: #f6f6f7;
  --line: #e7e7ea;
  --line-strong: #d4d4d8;
  --text: #18181b;
  --text-2: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;
  --brand: #f59e0b;
  --link: #2563eb;
  --btn: #18181b;
  --btn-ink: #ffffff;
  --btn-hover: #27272a;
  --ok: #16a34a; --ok-soft: #dcfce7; --ok-ink: #15803d;
  --warn: #f59e0b; --warn-soft: #fef3c7; --warn-ink: #b45309;
  --err: #dc2626; --err-soft: #fee2e2; --err-ink: #b91c1c;
  --info: #2563eb; --info-soft: #dbeafe; --info-ink: #1d4ed8;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --radius: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column;
  font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
a { color: inherit; text-decoration: none; }
dd a, .hint a { color: var(--link); }
dd a:hover, .hint a:hover { text-decoration: underline; }
code, pre, .mono { font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.i { flex: none; vertical-align: middle; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.navbar { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.navbar .wrap { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; color: var(--text); }
.brand img { width: 24px; height: 24px; }
.brand b { color: var(--brand); font-weight: 700; }
.menu { display: flex; gap: 2px; flex: 1; height: 100%; overflow-x: auto; }
.menu a { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.menu a .i { width: 16px; height: 16px; }
.menu a:hover { color: var(--text); }
.menu a.active { color: var(--text); }
.menu a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.me { display: flex; align-items: center; gap: 4px; }
.me a { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; color: var(--text-2); font-weight: 500; }
.me a:hover { background: var(--hover); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.me button { width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.me button:hover { background: var(--hover); color: var(--text); }

/* ---------- page ---------- */
.page { flex: 1; padding-top: 32px; padding-bottom: 48px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 500; margin-bottom: 16px; font-size: 13px; }
.back:hover { color: var(--text); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-desc { color: var(--muted); margin-top: 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.meta > span { display: inline-flex; align-items: center; gap: 6px; }
.meta a { color: var(--text-2); }
.meta a:hover { color: var(--link); }
.foot { border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 16px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); }
.tabs a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--text); }
.tabs .soon { font-size: 10px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--faint); background: var(--subtle); border-radius: 4px; padding: 1px 5px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card.flush .card-head { padding: 16px 20px 0; margin-bottom: 12px; }
.card-head h2 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-head h2 .i { color: var(--muted); width: 16px; height: 16px; }
.card.danger { border-color: #fecaca; }
.card.danger .card-head h2, .card.danger .card-head h2 .i { color: var(--err-ink); }
.cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }

dl.kv { display: grid; grid-template-columns: 180px 1fr; margin: 0; }
dl.kv dt, dl.kv dd { padding: 10px 0; border-bottom: 1px solid var(--line); }
dl.kv dt:last-of-type, dl.kv dd:last-of-type { border-bottom: 0; padding-bottom: 0; }
dl.kv dt:first-of-type, dl.kv dd:first-of-type { padding-top: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 500; }

/* ---------- stats ---------- */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.stat-label .i { width: 15px; height: 15px; }
.stat-value { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; }

/* ---------- server cards ---------- */
.server-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.server { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.server:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.server-top { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.server-top .os { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--subtle); color: var(--text-2); border: 1px solid var(--line); flex: none; }
.server-top .name { font-size: 15px; font-weight: 600; display: block; }
.server-top .name:hover { color: var(--link); }
.server-top .sub { color: var(--muted); font-size: 12.5px; }
.server-body { padding: 4px 20px 16px; }
.server-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.server-foot a { color: var(--text-2); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.server-foot a:hover { color: var(--link); }
.stamp { display: inline-flex; align-items: center; gap: 4px; color: var(--faint); font-size: 12px; }

/* ---------- meters ---------- */
.meter-row { display: grid; grid-template-columns: 84px 1fr 40px; gap: 12px; align-items: center; font-size: 13px; }
.meter-row + .meter-row { margin-top: 10px; }
.meter-label { color: var(--text-2); font-weight: 500; }
.meter-val { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 999px; background: var(--subtle); overflow: hidden; }
.meter .used { height: 100%; border-radius: 999px; background: var(--ok); }
.meter.warn .used { background: var(--warn); }
.meter.err .used { background: var(--err); }

/* ---------- status & tags ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 500; color: var(--text-2); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.status.ok i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status.warn i { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.status.err i { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.status.info i { background: var(--info); box-shadow: 0 0 0 3px var(--info-soft); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px; background: var(--info-soft); color: var(--info-ink); font-size: 11.5px; font-weight: 600; line-height: 1.6; font-variant-numeric: tabular-nums; }
.tag.edition { background: var(--ok-soft); color: var(--ok-ink); }
.tag.lg { font-size: 12px; padding: 2px 8px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12px; background: var(--subtle); padding-top: 9px; padding-bottom: 9px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--hover); }
td a { font-weight: 500; }
td a:hover { color: var(--link); }
td .sub { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
td:last-child, th:last-child { text-align: right; }
.count { color: var(--muted); font-size: 13px; margin: -8px 0 0; }
.count b { color: var(--text); font-weight: 600; }

/* ---------- buttons ---------- */
form.inline { display: inline-flex; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; font: inherit; font-weight: 500; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; box-shadow: var(--shadow); transition: background .12s, border-color .12s; }
.btn:hover { background: var(--hover); }
.btn .i { width: 16px; height: 16px; color: var(--muted); }
.btn.primary { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.btn.primary .i { color: inherit; }
.btn.primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.danger { color: var(--err-ink); }
.btn.danger .i { color: inherit; }
.btn.danger:hover { background: var(--err-soft); border-color: #fecaca; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }

.search { display: inline-flex; align-items: center; gap: 8px; height: 36px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 0 10px; color: var(--faint); box-shadow: var(--shadow); }
.search:focus-within { border-color: var(--text-2); }
.search .i { width: 16px; height: 16px; }
.search input { border: 0; padding: 0; height: 100%; width: 200px; background: transparent; box-shadow: none !important; }

/* ---------- forms ---------- */
.form { max-width: 560px; }
.field { margin-bottom: 18px; }
.field > label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--text-2); }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 6px; }
input, select, textarea { width: 100%; font: inherit; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); transition: border-color .12s, box-shadow .12s; }
textarea { height: auto; padding: 8px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text-2); box-shadow: 0 0 0 3px rgba(24, 24, 27, .08); }
.form-actions { display: flex; gap: 8px; margin-top: 4px; }
.size-options { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.size-opt { position: relative; }
.size-opt input { position: absolute; opacity: 0; pointer-events: none; }
.size-opt label { display: block; height: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; cursor: pointer; margin: 0; background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.size-opt label b { display: block; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.size-opt label small { color: var(--muted); display: block; font-size: 12.5px; }
.size-opt input:checked + label { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }

/* ---------- feedback ---------- */
.flash { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px; margin-bottom: 20px; font-weight: 500; border: 1px solid; }
.flash .i { width: 16px; height: 16px; }
.flash.ok { background: #f0fdf4; color: var(--ok-ink); border-color: #bbf7d0; }
.flash.err { background: #fef2f2; color: var(--err-ink); border-color: #fecaca; }

.empty { text-align: center; padding: 56px 24px; }
.empty-icon { width: 48px; height: 48px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--subtle); border: 1px solid var(--line); color: var(--muted); }
.empty h3 { font-size: 15px; font-weight: 600; margin: 14px 0 4px; }
.empty p { color: var(--muted); margin: 0 auto 18px; max-width: 380px; }

.steps { display: grid; counter-reset: step; }
.step { display: grid; grid-template-columns: 32px 1fr auto; gap: 14px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step::before { counter-increment: step; content: counter(step); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--subtle); border: 1px solid var(--line-strong); color: var(--muted); }
.step.done::before { content: "✓"; background: var(--ok-soft); color: var(--ok-ink); border-color: transparent; }
.step.current::before { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.step b { display: block; font-weight: 600; }
.step > div > span { color: var(--muted); font-size: 13px; }

.soon-box { text-align: center; padding: 48px 24px; }
.soon-box h2 { font-size: 16px; font-weight: 600; margin: 14px 0 6px; }
.soon-box p { color: var(--muted); margin: 0 auto; max-width: 460px; }

pre.log { background: #0c0c0e; color: #d4d4d8; border: 1px solid #27272a; padding: 16px; border-radius: var(--radius); overflow: auto; max-height: 70vh; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; margin: 0; }
.secret { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--subtle); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; }
details summary { cursor: pointer; color: var(--text-2); font-weight: 500; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details summary:hover { color: var(--text); }
details summary::-webkit-details-marker { display: none; }

/* ---------- auth ---------- */
body.auth { display: grid; place-items: center; padding: 24px; background: radial-gradient(800px 400px at 50% -10%, rgba(245, 158, 11, .14), transparent), var(--bg); }
.auth-box { width: 100%; max-width: 380px; }
.auth-box > .brand { font-size: 18px; justify-content: center; display: flex; margin-bottom: 24px; }
.auth-box > .brand img { width: 32px; height: 32px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.auth-card .lead { color: var(--muted); margin: 4px 0 22px; }
.auth-card .btn { width: 100%; height: 38px; }
.auth-foot { text-align: center; color: var(--faint); font-size: 12px; margin-top: 18px; }

@media (max-width: 860px) {
  .menu a span, .me a span { display: none; }
  .server-grid { grid-template-columns: 1fr; }
  .size-options { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .navbar .wrap { gap: 10px; }
  .brand span { display: none; }
  .page { padding-top: 20px; }
  .page-head h1 { font-size: 20px; }
  dl.kv { grid-template-columns: 1fr; }
  dl.kv dt { border-bottom: 0; padding-bottom: 0; }
  th, td { padding: 10px 14px; }
  .search input { width: 120px; }
  .step { grid-template-columns: 32px 1fr; }
  .step .btn { grid-column: 2; justify-self: start; }
}

/* ---------- add server ---------- */
.cols-form { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.cols-form > .card { margin-bottom: 0; }
.field-row { display: grid; gap: 12px; grid-template-columns: 120px 1fr; }
.radio-group { display: grid; gap: 8px; }
.radio { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; cursor: pointer; margin: 0; font-weight: 400; }
.radio:has(input:checked) { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.radio input { width: auto; height: auto; margin-top: 3px; accent-color: var(--text); box-shadow: none !important; }
.radio b { display: block; font-weight: 600; color: var(--text); }
.radio small { color: var(--muted); font-size: 12.5px; }
.auth-panel { margin: -4px 0 18px; padding: 14px; background: var(--subtle); border: 1px solid var(--line); border-radius: 10px; }
.auth-panel .field { margin-bottom: 0; }
.auth-panel textarea { font-size: 11.5px; line-height: 1.5; background: var(--surface); word-break: break-all; }
.codebox { margin-top: 12px; display: grid; }
.codebox code { display: block; background: #0c0c0e; color: #e4e4e7; padding: 10px 12px; border-radius: 8px; font-size: 11.5px; word-break: break-all; }
.info-box { background: #eff6ff; border-color: #bfdbfe; color: #1e3a5f; position: sticky; top: 76px; }
.info-box h2 { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: #1e3a8a; }
.info-box p { margin: 0 0 12px; font-size: 13px; line-height: 1.55; }
.info-box p:last-child { margin-bottom: 0; }
table.mini { margin: 0 0 12px; font-size: 13px; }
table.mini td { padding: 6px 0; border-bottom: 1px solid #bfdbfe; white-space: normal; background: none !important; text-align: left; vertical-align: top; }
table.mini td:first-child { padding-right: 12px; font-weight: 500; }
@media (max-width: 860px) { .cols-form { grid-template-columns: 1fr; } .info-box { position: static; order: -1; } }
.upload-progress { margin: 4px 0 16px; display: grid; gap: 6px; }
.radio input[type=checkbox] { width: auto; height: auto; }
.tag.staging { background: var(--warn-soft); color: var(--warn-ink); }
.tree { color: var(--faint); margin-right: 6px; }

/* ---------- addons ---------- */
.deploy-form { gap: 6px; }
.deploy-form input { height: 30px; width: 230px; font-size: 13px; }
.setup { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.setup-steps { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 14px; color: var(--text-2); }
.setup-steps textarea { margin-top: 8px; font-size: 11.5px; background: var(--subtle); word-break: break-all; }
.setup-steps .link, .card .link { color: var(--link); }
.kv-mini { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin-top: 8px; align-items: center; }
.kv-mini span { color: var(--muted); font-size: 13px; }
.kv-mini code { background: var(--subtle); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; word-break: break-all; cursor: text; }

/* ---------- 2FA ---------- */
.twofa-setup { display: grid; grid-template-columns: 196px 1fr; gap: 24px; align-items: start; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.qr svg { display: block; width: 100%; height: auto; }
.codes { display: grid; grid-template-columns: repeat(4, max-content); gap: 8px 12px; }
.codes code { font-size: 14px; background: var(--subtle); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; letter-spacing: .04em; }
input.otp { letter-spacing: .3em; font-variant-numeric: tabular-nums; font-size: 16px; }
@media (max-width: 560px) { .twofa-setup { grid-template-columns: 1fr; } .codes { grid-template-columns: repeat(2, max-content); } }

/* Live log viewer */
.logbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.logbar select { width: auto; height: 36px; font-size: 13px; }
.logbar .check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin: 0; font-weight: 400; }
.logbar .check input { width: auto; height: auto; }
.logbar .spacer { flex: 1; }
.logbar .hint { margin: 0; }
.table-wrap.logs { max-height: 70vh; overflow: auto; }
.logtable { font-size: 12.5px; }
.logtable thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.logtable td { padding: 6px 12px; vertical-align: top; white-space: nowrap; }
.logtable td.logger { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.logtable td.msg { white-space: normal; word-break: break-word; min-width: 280px; width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.logtable td.msg pre { margin: 6px 0 0; white-space: pre-wrap; font-size: 12px; color: var(--text-2); }
.logtable .num { text-align: right; font-variant-numeric: tabular-nums; }
.logtable .lvl { display: inline-block; min-width: 58px; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; text-align: center; background: #f4f4f5; color: #52525b; }
.logtable .lv-info .lvl { background: #eff6ff; color: #1d4ed8; }
.logtable .lv-warning .lvl { background: #fffbeb; color: #b45309; }
.logtable .lv-error .lvl, .logtable .lv-critical .lvl { background: #fef2f2; color: #b91c1c; }
.logtable tr.lv-error td, .logtable tr.lv-critical td { background: #fffafa; }
.flash.info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

/* Config tab */
.config-form .card-head { flex-wrap: wrap; gap: 12px; }
.config-form .card-head .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.config-form .check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; color: var(--text-2); margin: 0; }
.config-form .check input { width: auto; height: auto; }
table.config td { vertical-align: top; padding: 12px 16px; white-space: normal; }
table.config td:first-child { width: 55%; }
table.config tr.is-unset { display: none; }
table.config.show-all tr.is-unset { display: table-row; }
table.config tr[hidden] { display: none !important; }
table.config .opt { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
table.config .opt .i { width: 14px; height: 14px; color: var(--faint); }
table.config .opt-help { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
table.config .opt-help b { font-weight: 500; color: var(--text-2); }
table.config .opt-val input, table.config .opt-val select { height: 34px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
table.config tr.managed .opt-val input { background: var(--bg); color: var(--muted); }
table.config tr.add-row td { background: var(--bg); }
.config-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.config-foot .hint { margin: 0; max-width: 560px; }
.config-foot .actions { display: flex; gap: 8px; }
@media (max-width: 720px) { table.config td:first-child { width: auto; } table.config tr { display: grid; } table.config tr.is-unset { display: none; } table.config.show-all tr.is-unset { display: grid; } table.config thead { display: none; } table.config td:first-child { border-bottom: 0; padding-bottom: 4px; } table.config td.opt-val { padding-top: 0; } }

/* Backups */
.kind-ic { display: inline-flex; color: var(--muted); vertical-align: middle; }
.kind-ic .i { width: 16px; height: 16px; }
.card-pad { padding: 16px; border-top: 1px solid var(--line); }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }
.actions.end { justify-content: flex-end; flex-wrap: nowrap; }
details.drop { position: relative; display: inline-block; }
details.drop > summary { display: inline-flex; }
details.drop[open] > summary { background: var(--bg); }
.drop-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .1); padding: 6px; }
.drop-menu form { margin: 0; }
.drop-menu a, .drop-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 6px; font: inherit; font-size: 13.5px; color: var(--text); text-align: left; cursor: pointer; text-decoration: none; }
.drop-menu a:hover, .drop-menu button:hover { background: var(--bg); }
.drop-menu .i { width: 15px; height: 15px; color: var(--muted); }
.drop-menu .danger-text, .drop-menu .danger-text .i { color: var(--err-ink); }
/* Backups tab: list on the left, schedules on the right (CloudPepper layout). */
.backups-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.backups-layout.single { grid-template-columns: minmax(0, 1fr); }
.backups-layout aside .card { margin-bottom: 20px; }
.backups-card .card-head h2 { font-size: 17px; }
.backups-card .card-head .actions { display: flex; gap: 8px; }
/* The Options menu must not be clipped by the scroll container. */
.backups-card .table-wrap { overflow: visible; }
table.backups td { padding-top: 12px; padding-bottom: 12px; }
table.backups td:last-child { text-align: right; width: 1%; }
table.backups .kind-ic { margin-left: 6px; }
table.backups .kind-ic.manual { color: #2563eb; }
.err-text { color: var(--err-ink); display: inline-flex; align-items: center; gap: 6px; }
.err-text .i { width: 15px; height: 15px; }
.drop-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.pager { display: flex; justify-content: flex-end; padding: 14px 16px; }
.pager a { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); margin-left: -1px; color: var(--text-2); text-decoration: none; font-size: 13px; }
.pager a:first-child { border-radius: 8px 0 0 8px; }
.pager a:last-child { border-radius: 0 8px 8px 0; }
.pager a.active { background: var(--text); border-color: var(--text); color: #fff; }
.side-card { padding: 20px; }
.side-title { font-size: 17px; margin: 0 0 16px; }
.side-card .field select:disabled { background: var(--bg); color: var(--muted); }
.side-card .actions.end { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
dl.sched { margin: 0 0 16px; }
dl.sched dt { font-size: 13px; color: var(--muted); }
dl.sched dd { margin: 4px 0 14px; font-size: 15px; font-weight: 500; }
@media (max-width: 980px) { .backups-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { table.backups th:nth-child(2), table.backups td:nth-child(2) { display: none; } table.backups td, table.backups th { white-space: normal; padding-left: 10px; padding-right: 10px; } table.backups td:first-child { font-size: 13px; } }
.clip { display: inline-block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* Addons tab */
.addons-card .card-head h2 { font-size: 17px; }
table.addons td { vertical-align: middle; padding-top: 12px; padding-bottom: 12px; }
table.addons td:last-child { width: 1%; }
.repo-url { display: flex; align-items: center; gap: 6px; }
.repo-url a { color: var(--text-2); display: inline-flex; }
.repo-url a:hover { color: var(--text); }
svg.gh { vertical-align: -2px; }
.addons-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px 20px; }
.btn.soft { background: var(--bg); border-color: var(--line); }
.btn.soft:hover { background: #f0f0f2; }
.gear { color: var(--faint); margin-left: 6px; display: inline-flex; vertical-align: -2px; } .gear:hover { color: var(--text); }
