:root {
  --bg: #0b0e14;
  --bg2: #0f141d;
  --panel: #151b26;
  --panel2: #1c2431;
  --line: #28323f;
  --text: #e6edf3;
  --muted: #8a97a6;
  --accent: #4f8cff;
  --accent2: #2f6fe0;
  --ok: #2ecc71;
  --warn: #f5a623;
  --bad: #ff5d5d;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font: 14px/1.55 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.muted { color: var(--muted); }
.error { color: var(--bad); margin-top: 8px; min-height: 18px; }
a { color: var(--accent); }

/* buttons + inputs */
button {
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  color: #fff; border: 0; padding: 9px 16px; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 500; transition: filter .15s, transform .05s;
}
button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }
button.ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
button.danger { background: linear-gradient(180deg, #ff6b6b, #e23b3b); }
button.sm { padding: 6px 12px; font-size: 13px; }
input, select, textarea {
  background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  padding: 9px 11px; border-radius: 8px; font-size: 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,140,255,.15); }
::placeholder { color: #5d6b7a; }

/* login */
.login-body { display: grid; place-items: center; min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -10%, #16203a 0%, var(--bg) 60%); }
.login-card { background: var(--panel); padding: 34px 30px; border-radius: 14px; width: 340px;
  display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-card h1 { font-size: 19px; margin: 0; display: flex; align-items: center; gap: 8px; }
.login-card .muted { margin: -6px 0 6px; }

/* app layout */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 12px; }
.brand { font-size: 17px; font-weight: 700; padding: 8px 10px 18px; display: flex; align-items: center; gap: 9px; letter-spacing: .2px; }
.brand .logo { color: var(--accent); }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px;
  color: var(--muted); cursor: pointer; text-decoration: none; font-weight: 500; }
.sidebar nav a .ic { width: 16px; text-align: center; opacity: .8; }
.sidebar nav a:hover { background: var(--panel); color: var(--text); }
.sidebar nav a.active { background: linear-gradient(180deg, var(--accent), var(--accent2)); color: #fff; box-shadow: var(--shadow); }
.sidebar nav a.active .ic { opacity: 1; }
.sidebar-foot { margin-top: auto; padding: 12px 10px; font-size: 12px; }

.content { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.spacer { flex: 1; }
main { padding: 24px; max-width: 1080px; width: 100%; margin: 0 auto; }
h2 { font-size: 16px; font-weight: 600; margin: 22px 0 12px; letter-spacing: .2px; }
h2:first-child { margin-top: 0; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; margin-bottom: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.card .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.card .big { font-size: 30px; font-weight: 700; line-height: 1.1; }

/* tables */
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--panel2); }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; background: var(--bg2); }

/* pills */
.pill { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; display: inline-block; }
.pill.ok { background: rgba(46,204,113,.16); color: var(--ok); }
.pill.bad { background: rgba(255,93,93,.16); color: var(--bad); }
.pill.warn { background: rgba(245,166,35,.16); color: var(--warn); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
pre { background: #070a0f; border: 1px solid var(--line); padding: 14px; border-radius: 8px; overflow: auto; max-height: 60vh; white-space: pre-wrap; word-break: break-all; font-size: 12px; }
.logbox { background: #070a0f; border: 1px solid var(--line); padding: 14px; border-radius: 8px; height: 62vh; overflow: auto;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; white-space: pre-wrap; line-height: 1.5; }
small.mono { font-family: ui-monospace, monospace; color: var(--muted); }

/* DNS record cards (copy-paste) */
.rec { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.rec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rec-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.rec-label { width: 56px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; flex: none; }
.rec-val { flex: 1; background: #070a0f; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; color: var(--text);
  word-break: break-all; white-space: pre-wrap; user-select: all; }

@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; align-items: center; overflow-x: auto; }
  .sidebar nav { flex-direction: row; }
  .brand { padding: 8px 12px; } .sidebar-foot { display: none; }
}
