/* GenesisVDS Panel — own theme. Layout inspired by classic hosting panels: top bar, icon rail,
   grouped tool grid, info column. */
:root {
  --navy: #1b2a41; --navy-2: #24385a; --ink: #1f2937; --muted: #6b7280; --line: #e3e7ee;
  --bg: #f3f5f9; --card: #ffffff; --accent: #2f6fde; --accent-2: #1f58b8; --ok: #15803d; --warn: #b45309;
  --err: #b91c1c; --radius: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --g-files: #2f6fde; --g-databases: #7c3aed; --g-domains: #0f8a7e; --g-email: #d9480f; --g-metrics: #0369a1;
  --g-security: #be123c; --g-software: #4d7c0f; --g-advanced: #475569; --g-accounts: #2f6fde; --g-server: #475569; --g-services: #0f8a7e;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #eef1f6; padding: 1px 5px; border-radius: 4px; }
h1 { font-size: 22px; margin: 0; } h2 { font-size: 15px; margin: 0; } h3 { font-size: 14px; margin: 0 0 10px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 16px;
  background: var(--navy); color: #dbe4f3; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 17px; letter-spacing: .2px; white-space: nowrap; }
.brand:hover { text-decoration: none; } .brand b { color: #7fb0ff; }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: var(--navy-2); border-radius: 6px; padding: 0 10px; }
.search input { flex: 1; height: 34px; border: 0; background: transparent; color: #fff; font-size: 14px; outline: none; }
.search input::placeholder { color: #93a4c0; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-right form { margin: 0; }
.acct-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--navy-2); padding: 4px 10px; border-radius: 999px; font-size: 12.5px; }
.who { font-size: 13px; }
.btn-ghost { background: none; border: 0; color: #dbe4f3; cursor: pointer; padding: 6px; border-radius: 6px; display: inline-flex; }
.btn-ghost:hover { background: var(--navy-2); }

/* shell */
.shell { display: flex; min-height: calc(100vh - 56px); }
.sidebar { width: 84px; flex: none; background: #fff; border-right: 1px solid var(--line); padding: 10px 0; display: flex; flex-direction: column; gap: 2px; }
.sidebar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; color: var(--muted); font-size: 11.5px; }
.sidebar a:hover { color: var(--accent); background: #f5f8ff; text-decoration: none; }
.sidebar a.active { color: var(--accent); background: #eaf1ff; box-shadow: inset 3px 0 0 var(--accent); }
.content { flex: 1; min-width: 0; padding: 20px clamp(16px, 2.5vw, 32px) 40px; }

/* flash */
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; }
.flash-ok { background: #ecfdf3; border-color: #abefc6; color: #05603a; }
.flash-warn { background: #fffaeb; border-color: #fedf89; color: #93370d; }
.flash-error { background: #fef3f2; border-color: #fecdca; color: #b42318; }

/* page head, crumbs */
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-head p { margin: 2px 0 0; }
.page-ic { display: inline-flex; padding: 9px; border-radius: 10px; background: #eaf1ff; color: var(--accent); }

/* cards, tables, forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.card.narrow { max-width: 560px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; background: #fafbfd; }
.tbl tr:hover td { background: #fafcff; }
.tbl td.actions { white-space: nowrap; text-align: right; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.field input, .field select, .field textarea, textarea.code { width: 100%; padding: 8px 10px; border: 1px solid #cfd6e2; border-radius: 6px; font: inherit; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #bcd3ff; border-color: var(--accent); }
textarea.code { font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 420px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; } .row > .field { flex: 1; min-width: 160px; }
form.inline { display: inline; margin: 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 6px; border: 1px solid #cfd6e2; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.btn:hover { background: #f5f7fb; text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn-primary:hover { background: var(--accent-2); }
.btn-danger { color: var(--err); border-color: #f3c5c5; } .btn-danger:hover { background: #fff5f5; }
.btn-sm { padding: 4px 9px; font-size: 12.5px; } .btn-block { width: 100%; justify-content: center; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ok { background: #e7f8ee; color: var(--ok); } .badge-warn { background: #fff4e0; color: var(--warn); }
.badge-err { background: #fdecec; color: var(--err); } .badge-info { background: #eaf1ff; color: var(--accent); }

/* account / server home */
.acct-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.tool-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; }
.tool-group > summary { list-style: none; cursor: pointer; padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.tool-group > summary::-webkit-details-marker { display: none; }
.tool-group > summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.tool-group:not([open]) > summary { border-bottom: 0; } .tool-group:not([open]) > summary::after { content: "▸"; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; padding: 10px; }
.tool { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; color: var(--ink); }
.tool:hover { background: #f3f7ff; text-decoration: none; color: var(--accent); }
.tool-ic { flex: none; display: inline-flex; padding: 7px; border-radius: 9px; color: #fff; background: var(--accent); }
.tool-label { font-size: 13.5px; line-height: 1.25; }
.g-files { background: var(--g-files); } .g-databases { background: var(--g-databases); } .g-domains { background: var(--g-domains); }
.g-email { background: var(--g-email); } .g-metrics { background: var(--g-metrics); } .g-security { background: var(--g-security); }
.g-software { background: var(--g-software); } .g-advanced { background: var(--g-advanced); } .g-accounts { background: var(--g-accounts); }
.g-server { background: var(--g-server); } .g-services { background: var(--g-services); }
.side-info .card h3 { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.meter-row { margin-bottom: 12px; } .meter-label { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.meter { height: 8px; border-radius: 999px; background: #e9edf4; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter-warm i { background: #d97706; } .meter-hot i { background: var(--err); }
.audit-mini { list-style: none; padding: 0; margin: 0 0 8px; font-size: 12.5px; } .audit-mini li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.qr svg { width: 200px; height: 200px; }

/* login */
.login-body { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(160deg, var(--navy), #2c4a7a); padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 12px; padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; color: var(--navy); margin-bottom: 20px; } .login-brand b { color: var(--accent); }

@media (max-width: 900px) {
  .acct-layout { grid-template-columns: 1fr; }
  .who, .acct-pill { display: none; }
}
@media (max-width: 560px) {
  .sidebar { width: 60px; } .sidebar a span { display: none; }
  .brand span { display: none; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
.logbox { background: #0f172a; color: #d6e2f5; padding: 12px; border-radius: 6px; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-height: 70vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
