/* ServerDeck - clean light/dark UI */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f2f4f7; --line: #e4e7ec; --line-2: #d0d5dd;
  --text: #101828; --text-2: #475467; --muted: #667085;
  --accent: #4f46e5; --accent-hover: color-mix(in srgb, var(--accent) 84%, #000); --accent-soft: color-mix(in srgb, var(--accent) 10%, #fff);
  --accent-text: color-mix(in srgb, var(--accent) 78%, #000);
  --up: #12b76a; --up-soft: #ecfdf3; --up-text: #027a48;
  --down: #f04438; --down-soft: #fef3f2; --down-text: #b42318;
  --warn: #f79009; --warn-soft: #fffaeb; --warn-text: #b54708;
  --shadow: 0 1px 2px rgba(16,24,40,.05);
  --shadow-lg: 0 12px 32px -6px rgba(16,24,40,.18), 0 4px 8px -2px rgba(16,24,40,.06);
  --radius: 14px; --radius-sm: 9px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme=dark] {
  --bg: #0c0e12; --surface: #14171c; --surface-2: #1b1f26; --line: #252a33; --line-2: #333a45;
  --text: #f2f4f7; --text-2: #c2c8d0; --muted: #8a94a3;
  --accent-hover: color-mix(in srgb, var(--accent) 80%, #fff); --accent-soft: color-mix(in srgb, var(--accent) 22%, #14171c);
  --accent-text: color-mix(in srgb, var(--accent) 45%, #fff);
  --up: #32d583; --up-soft: #0f2a1d; --up-text: #6ce9a6;
  --down: #f97066; --down-soft: #2d1513; --down-text: #fda29b;
  --warn: #fdb022; --warn-soft: #2b2010; --warn-text: #fec84b;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 16px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 13px; font-weight: 550;
  font-size: 14px; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow); transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: var(--down); border-color: var(--down); color: #fff; }
.btn.ghost { background: none; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg.i { width: 16px; height: 16px; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; background: none; border: none;
  color: var(--muted); border-radius: 8px; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 500px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 16px; }
.login-card h1 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.01em; }
.login-card p { margin: -8px 0 4px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 550; color: var(--text-2); }
.field input, .input { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 10px 12px; box-shadow: var(--shadow); width: 100%; }
.field input:focus, .input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft); }
.login-card .btn { justify-content: center; padding: 11px; margin-top: 4px; }
.alert { background: var(--down-soft); color: var(--down-text); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; }
.mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #c026d3));
  display: grid; place-items: center; color: #fff; flex: none; }
.mark svg.i { width: 20px; height: 20px; stroke-width: 2.2; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 4px; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; min-width: 0; }
.brand-text { min-width: 0; line-height: 1.25; }
.brand-text small { display: block; font-size: 12px; font-weight: 550; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-label { font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-2);
  font-weight: 550; background: none; border: none; cursor: pointer; width: 100%; text-align: left; position: relative; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); }
.nav-item .count { margin-left: auto; font-size: 12px; font-weight: 650; background: var(--down); color: #fff;
  border-radius: 99px; padding: 0 7px; min-width: 20px; text-align: center; }
.sidebar .grow { flex: 1; }
.sidebar .me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-weight: 650; font-size: 13px; color: var(--text-2); text-transform: uppercase; }
.me .who { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.me .who small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }

.content { min-width: 0; padding: 28px 36px 60px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .spacer { flex: 1; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.view[hidden] { display: none !important; }
.mobile-top, .tabbar { display: none; }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel + .panel, .grid-2 + .panel, .panel + .grid-2 { margin-top: 18px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
.panel-head .sub { color: var(--muted); font-size: 13px; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 16px 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 .panel + .panel { margin-top: 0; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty.err { color: var(--down-text); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.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; font-weight: 550; display: flex; align-items: center; gap: 7px; }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.stat .value small { font-size: 14px; color: var(--muted); font-weight: 550; margin-left: 2px; }

/* ---------- banner ---------- */
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px;
  font-weight: 600; border: 1px solid transparent; }
.banner.ok { background: var(--up-soft); color: var(--up-text); }
.banner.bad { background: var(--down-soft); color: var(--down-text); }
.banner.wait { background: var(--surface-2); color: var(--text-2); }
.banner .meta { margin-left: auto; font-weight: 500; font-size: 13px; opacity: .8; }

/* ---------- status list ---------- */
.group-label { padding: 10px 18px; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.svc { display: grid; grid-template-columns: 1fr minmax(120px, 260px) 84px 92px; gap: 18px; align-items: center;
  padding: 13px 18px; border-bottom: 1px solid var(--line); }
.svc:last-child { border-bottom: none; }
.svc-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.svc-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-target { font-size: 12.5px; color: var(--muted); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-text { min-width: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); flex: none; }
.dot.up { background: var(--up); box-shadow: 0 0 0 4px var(--up-soft); }
.dot.down { background: var(--down); box-shadow: 0 0 0 4px var(--down-soft); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
.ticks { display: flex; gap: 2px; height: 22px; align-items: stretch; }
.ticks span { flex: 1; border-radius: 2px; background: var(--up); opacity: .75; }
.ticks span.down { background: var(--down); opacity: 1; }
.ticks span.none { background: var(--line); opacity: 1; }
.svc-ms { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 13.5px; }
.svc-ms small { display: block; color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; justify-self: end; }
.badge.up { background: var(--up-soft); color: var(--up-text); }
.badge.down { background: var(--down-soft); color: var(--down-text); }
.badge.warn { background: var(--warn-soft); color: var(--warn-text); }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- files ---------- */
.files-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.files-bar .spacer { flex: 1; }
.select { appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 32px 7px 12px; font-weight: 550; box-shadow: var(--shadow); max-width: 100%; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.crumbs button { background: none; border: none; color: var(--text-2); cursor: pointer; padding: 3px 7px; border-radius: 6px; font-weight: 550; }
.crumbs button:hover { background: var(--surface-2); color: var(--text); }
.crumbs button:last-child { color: var(--text); font-weight: 650; }
.crumbs .sep { color: var(--line-2); }
.ftable { position: relative; min-height: 120px; }
.ftable.drag::after { content: "Drop files to upload"; position: absolute; inset: 8px; border: 2px dashed var(--accent); border-radius: 10px;
  background: color-mix(in srgb, var(--accent-soft) 85%, transparent); display: grid; place-items: center; font-weight: 650; color: var(--accent-text); }
.frow { display: grid; grid-template-columns: 36px 1fr 96px 160px 36px; gap: 8px; align-items: center; padding: 8px 14px;
  border-bottom: 1px solid var(--line); }
.frow:last-child { border-bottom: none; }
.frow.head { padding-top: 9px; padding-bottom: 9px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.frow:not(.head):hover { background: var(--surface-2); }
.ficon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.ficon.dir { background: var(--accent-soft); color: var(--accent); }
.ficon.text { background: var(--up-soft); color: var(--up-text); }
.ficon svg.i { width: 16px; height: 16px; }
.fname { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.fname:hover { color: var(--accent); }
.fsize, .fdate { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fsize { text-align: right; }
.progress { height: 3px; background: var(--line); overflow: hidden; }
.progress div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* ---------- cPanel ---------- */
.meters { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.meter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.meter .label { font-size: 13px; color: var(--muted); font-weight: 550; }
.meter .nums { font-size: 18px; font-weight: 700; margin: 3px 0 10px; letter-spacing: -.01em; }
.meter .nums small { font-size: 13px; color: var(--muted); font-weight: 500; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar div { height: 100%; border-radius: 99px; background: var(--accent); }
.bar div.warn { background: var(--warn); } .bar div.down { background: var(--down); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.list-row:last-child { border-bottom: none; }
.list-row .main { flex: 1; min-width: 0; }
.list-row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .s { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .mini { width: 90px; }
.scroll { max-height: 380px; overflow: auto; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { background: none; border: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-weight: 550; color: var(--text-2); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.section-err { margin: 0; padding: 12px 18px; color: var(--down-text); background: var(--down-soft); font-size: 13.5px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%;
  animation: shimmer 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- menus, modals, toasts ---------- */
.menu { position: fixed; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 5px; min-width: 180px; box-shadow: var(--shadow-lg); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none;
  padding: 8px 10px; border-radius: 7px; cursor: pointer; font-weight: 500; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--down-text); }
.menu hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.modal-back { position: fixed; inset: 0; background: rgba(16,24,40,.45); backdrop-filter: blur(3px); z-index: 60;
  display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 440px; padding: 22px;
  box-shadow: var(--shadow-lg); }
.modal.wide { max-width: 1000px; height: min(86vh, 900px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.modal h3 { margin: 0 0 6px; font-size: 17px; }
.modal p { margin: 0 0 16px; color: var(--muted); }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.editor-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.editor-head .path { font-family: var(--mono); font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal textarea { flex: 1; width: 100%; border: none; background: var(--bg); padding: 16px; font: 13px/1.6 var(--mono); resize: none; tab-size: 4; }
.modal textarea:focus { box-shadow: none; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--surface);
  padding: 10px 16px; border-radius: 10px; z-index: 70; font-weight: 550; box-shadow: var(--shadow-lg); max-width: 90vw; animation: fade .15s; }
.toast.err { background: var(--down); color: #fff; }

/* ---------- users & settings ---------- */
.avatar.lg { width: 38px; height: 38px; font-size: 14px; }
.avatar.c0 { background: #eef2ff; color: #3730a3; } .avatar.c1 { background: #ecfdf3; color: #027a48; }
.avatar.c2 { background: #fef3f2; color: #b42318; } .avatar.c3 { background: #fffaeb; color: #b54708; }
.avatar.c4 { background: #f0f9ff; color: #026aa2; } .avatar.c5 { background: #fdf2fa; color: #c11574; }
[data-theme=dark] .avatar[class*=" c"] { filter: saturate(.9) brightness(.9); background-color: var(--surface-2); }
.user-row .acc { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.modal.form { max-width: 580px; max-height: 90vh; overflow: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section h4 { margin: 0 0 4px; font-size: 14px; }
.form-section > p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.checklist { border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 210px; overflow: auto; }
.checklist label, .checklist .item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 500; }
.checklist label:last-child, .checklist .item:last-child { border-bottom: none; }
.checklist label:hover { background: var(--surface-2); }
.checklist .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checklist .hint { font-size: 12px; color: var(--muted); }
.checklist select { background: var(--surface); border: 1px solid var(--line-2); border-radius: 7px; padding: 4px 8px; font-size: 13px; }
.linkish { background: none; border: none; color: var(--accent); cursor: pointer; font-weight: 600; font-size: 13px; padding: 0; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 550; margin-top: 14px; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: var(--shadow); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; padding: 0; }
.swatch.active { box-shadow: 0 0 0 2px var(--text); }
.swatch.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); position: relative; overflow: hidden; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.settings-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.preview-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.preview-card .pv-side { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.preview-card .pv-body { padding: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.field-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-row > span { font-size: 13.5px; font-weight: 550; color: var(--text-2); }
.field-row small { color: var(--muted); font-size: 12.5px; }

/* ---------- discord ---------- */
.setup-steps { margin: 0 0 14px; padding-left: 20px; line-height: 1.75; color: var(--text-2); font-size: 14px; }
.setup-steps code, .panel code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; font-family: var(--mono); font-size: 12.5px; }
details.more { margin: 4px 0 0; }
details.more summary { cursor: pointer; color: var(--text-2); font-weight: 550; font-size: 13.5px; }
.link-code { background: var(--accent-soft); border-radius: 10px; padding: 14px; margin-bottom: 12px; display: grid; gap: 6px; justify-items: start; }
.code-big { font-size: 18px; font-weight: 700; color: var(--accent-text); letter-spacing: .02em; }

.mailbox { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.mailbox summary { font-weight: 650; }
.dns-table { border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.dns-table th, .dns-table td { border: 1px solid var(--line-2); padding: 5px 10px; text-align: left; }
.dns-table th { background: var(--surface); font-weight: 600; }

/* ---------- bots ---------- */
.bot-card { margin-bottom: 14px; }
.bot-card .panel-head .dot { margin-right: 2px; }
.bot-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--text-2); }
.bot-facts b { font-weight: 600; color: var(--muted); }
.bot-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bot-log { flex: 1; margin: 0; padding: 14px 16px; overflow: auto; background: #0b0d10; color: #d6dde6; font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

/* ---------- ports ---------- */
.port-badge { min-width: 62px; text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font-weight: 700; font-size: 14px; line-height: 1.15; }
.port-badge small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.port-row.off { opacity: .6; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.chip { font-size: 11.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); border-radius: 99px; padding: 1px 8px; }

/* ---------- activity ---------- */
.act-row { align-items: flex-start; }
.act-row.clickable { cursor: pointer; }
.act-row.clickable:hover { background: var(--surface-2); }
.act-row .avatar svg.i { width: 16px; height: 16px; }
.act-time { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 2px; }
.act-details { margin-top: 8px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; font-size: 13px; color: var(--text-2); }
.act-details > div + div { margin-top: 4px; }
.act-details ul { margin: 4px 0 0; padding-left: 18px; }
#activity-tabs .seg { flex-wrap: nowrap; }
#activity-tabs .seg button { white-space: nowrap; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 1fr minmax(80px, 160px) 92px; }
  .svc-ms { display: none; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .mobile-top { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; padding: 12px 16px;
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); font-weight: 700; }
  .mobile-top .mark { width: 30px; height: 30px; border-radius: 8px; }
  .mobile-top .spacer { flex: 1; }
  .tabbar { display: grid; grid-template-columns: repeat(var(--tabs, 3), 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: none; padding: 6px;
    font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer; position: relative; }
  .tabbar button.active { color: var(--accent); }
  .tabbar button svg.i { width: 22px; height: 22px; }
  .tabbar .count { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--down); color: #fff; font-size: 10.5px;
    border-radius: 99px; padding: 0 5px; min-width: 16px; text-align: center; }
  .content { padding: 18px 14px 100px; }
  .page-head h1 { font-size: 21px; }
  .stats { gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .value { font-size: 22px; }
  .svc { grid-template-columns: 1fr 84px; gap: 10px; padding: 12px 14px; }
  .svc .ticks { grid-column: 1 / -1; grid-row: 2; height: 16px; }
  .frow { grid-template-columns: 34px 1fr 64px 32px; padding: 8px 10px; }
  .frow .fdate { display: none; }
  .files-bar .select { flex: 1 1 100%; }
  .banner .meta { display: none; }
  .list-row .mini { width: 60px; }
  .form-grid { grid-template-columns: 1fr; }
  .user-row .acc { display: none; }
  .checklist[style*=grid] { grid-template-columns: 1fr !important; }
}
