/* Deer Cloud portals: same colors as the desktop panel and assets/brand. */
:root {
  --bg: #0b100e;
  --surface: #121a17;
  --surface-2: #0e1513;
  --line: rgb(255 255 255 / .08);
  --text: #eef0f6;
  --muted: #a3abb8;
  --accent: #5fbf8f;
  --accent-soft: #9fe0b6;
  --gold: #e8b46a;
  --danger: #ef6b6b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif; }
a { color: var(--accent-soft); }
header { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
header .brand { font-weight: 800; font-size: 18px; }
header .brand span { color: var(--accent-soft); }
header .spacer { flex: 1; }
main { max-width: 1000px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 18px; }
h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
h2 { margin: 0 0 4px; font-size: 17px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.stat strong { display: block; font-size: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .16); background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #08110d; }
.btn.danger { border-color: rgb(239 107 107 / .5); color: #ffb3b3; }
input, select { min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid rgb(255 255 255 / .16); background: var(--surface-2); color: var(--text); font: inherit; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgb(95 191 143 / .14); color: var(--accent-soft); }
.pill.free { background: rgb(255 255 255 / .06); color: var(--muted); }
.pill.warn { background: rgb(232 180 106 / .16); color: #f8cf86; }
.server { display: flex; align-items: center; gap: 12px; }
.server img, .server .initials { width: 40px; height: 40px; border-radius: 10px; background: #2f5b4c; display: grid; place-items: center; font-weight: 800; color: #c8f0d5; }
.code { font-family: Consolas, monospace; font-size: 20px; letter-spacing: .06em; color: var(--gold); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; }
.toast.error { border-color: rgb(239 107 107 / .5); }
.table-wrap { overflow-x: auto; }
[hidden] { display: none !important; }

/* Dashboard: sidebar + view */
header a.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.layout { display: flex; flex-wrap: wrap; min-height: calc(100vh - 62px); }
.side { flex: 1 1 220px; max-width: 100%; padding: 16px 12px; background: var(--surface-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.side a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; color: #b4bcc8; text-decoration: none; }
.side a:hover { background: rgb(255 255 255 / .05); color: var(--text); }
.side a.on { background: rgb(95 191 143 / .14); color: #c8f0d5; font-weight: 600; }
.side .server-switch { min-height: 52px; margin-bottom: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; }
.side .server-switch img, .side .server-switch .initials { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; }
.layout > main { flex: 999 1 560px; min-width: 0; max-width: 1040px; margin: 0; padding: 24px 16px; }
.bar { height: 8px; border-radius: 999px; background: #22302b; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.bar.full span { background: var(--gold); }
.usage { display: flex; flex-direction: column; gap: 6px; }
.usage .row { justify-content: space-between; }
.module { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.module input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.module.off { opacity: .6; }
.module span { display: flex; flex-direction: column; gap: 2px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
textarea { min-height: 90px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgb(255 255 255 / .16); background: var(--surface-2); color: var(--text); font: inherit; resize: vertical; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.side h3 { margin: 14px 12px 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.avatar { border-radius: 50%; flex: none; }
.list { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; }
.list-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.list-item:hover { background: rgb(255 255 255 / .05); }
ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
td input[type=checkbox], label.row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
