:root {
  color-scheme: dark;
  --bg: #07100f;
  --panel: rgba(13, 29, 27, .86);
  --panel-strong: #102522;
  --line: rgba(155, 231, 205, .13);
  --text: #eefbf7;
  --muted: #89a9a0;
  --green: #45e3ab;
  --green-dark: #133e32;
  --red: #ff6f75;
  --amber: #f6c85f;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background:
  radial-gradient(circle at 25% 0%, rgba(30, 132, 104, .16), transparent 32%),
  linear-gradient(145deg, #07100f, #071311 55%, #091614);
  color: var(--text); font: 15px/1.5 Inter, "Segoe UI", Arial, sans-serif;
}
button, input { font: inherit; }
.hidden { display: none !important; }
.ambient { position: fixed; width: 320px; height: 320px; filter: blur(110px); opacity: .13; pointer-events: none; }
.ambient-a { background: var(--green); top: -120px; right: 8%; }
.ambient-b { background: #2b8fa1; bottom: -180px; left: 5%; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(420px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 24px;
  background: rgba(10, 23, 21, .92); box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.login-card h1 { margin: 14px 0 2px; font-size: 32px; }
.login-card label { display: grid; gap: 7px; margin-top: 18px; color: #cfe2dc; font-weight: 600; }
.login-card input {
  width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px;
  background: #091513; color: var(--text); outline: none;
}
.login-card input:focus { border-color: rgba(69, 227, 171, .7); box-shadow: 0 0 0 3px rgba(69, 227, 171, .1); }
.form-error { min-height: 22px; color: var(--red); }
.logo {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  color: #052019; background: var(--green); font-weight: 900; letter-spacing: -.8px;
  box-shadow: 0 8px 24px rgba(69, 227, 171, .18);
}
.logo.large { width: 54px; height: 54px; border-radius: 16px; }
.topbar {
  height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 max(28px, calc((100vw - 1200px) / 2)); border-bottom: 1px solid var(--line);
  background: rgba(6, 15, 14, .72); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 10;
}
.identity { display: flex; align-items: center; gap: 12px; }
.identity strong, .identity span { display: block; }
.identity span { color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.refresh-label { color: var(--muted); font-size: 12px; }
main { width: min(1200px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 38px; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 6px; color: var(--green); text-transform: uppercase; letter-spacing: 1.6px; font-size: 11px; font-weight: 800; }
.status-title { display: flex; align-items: center; gap: 13px; }
.status-title h1 { margin: 0; font-size: clamp(30px, 4vw, 47px); letter-spacing: -1.5px; }
.status-dot { width: 13px; height: 13px; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,.03); }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 6px rgba(69,227,171,.1), 0 0 24px rgba(69,227,171,.7); }
.status-dot.offline { background: var(--red); }
.status-dot.starting { background: var(--amber); }
.status-dot.unknown { background: #71817c; }
.muted { color: var(--muted); margin: 5px 0 0; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 1px; border-radius: 16px; overflow: hidden; background: var(--line); margin-bottom: 18px; }
.metric { min-width: 0; padding: 20px; background: var(--panel-strong); }
.metric span, .metric strong { display: block; }
.metric span { color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.metric strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid { display: grid; grid-template-columns: 1.55fr .9fr; gap: 18px; margin-bottom: 18px; }
.card { border: 1px solid var(--line); border-radius: 18px; padding: 24px; background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(15px); }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.card h2 { margin: 0; font-size: 21px; }
.badge { color: var(--green); background: var(--green-dark); border: 1px solid rgba(69,227,171,.2); border-radius: 999px; padding: 5px 10px; font-size: 11px; text-transform: uppercase; }
.control-actions, .log-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.button {
  border: 1px solid transparent; border-radius: 10px; padding: 10px 15px; color: var(--text);
  background: #19342f; cursor: pointer; text-decoration: none; text-align: center; transition: .18s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.button:disabled { opacity: .45; cursor: wait; transform: none; }
.button.primary, .button.success { background: var(--green); color: #042019; font-weight: 800; }
.button.danger { background: rgba(255,111,117,.12); border-color: rgba(255,111,117,.32); color: #ffb5b8; }
.button.secondary { border-color: var(--line); }
.button.ghost { background: transparent; border-color: var(--line); }
.button.small { padding: 7px 11px; font-size: 12px; }
.button.full { width: 100%; }
.action-message { min-height: 24px; margin-top: 14px; color: var(--muted); }
.action-message.error { color: var(--red); }
.action-message.ok { color: var(--green); }
.details { margin: 14px 0 0; border-top: 1px solid var(--line); }
.details div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.details dt { color: var(--muted); }
.details dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.check-list { list-style: none; padding: 0; margin: 18px 0 0; }
.check-list li { position: relative; padding: 10px 0 10px 27px; color: #c7dbd5; border-bottom: 1px solid var(--line); }
.check-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.logs-card { min-height: 350px; }
.logs-card .log-actions { margin: 0; }
.log-meta { display: flex; justify-content: space-between; margin: 18px 0 8px; color: var(--muted); font-size: 12px; }
.log-output {
  min-height: 240px; max-height: 480px; overflow: auto; margin: 0; padding: 18px; border-radius: 12px;
  border: 1px solid var(--line); background: #050c0b; color: #b7d2ca; font: 12px/1.65 "Cascadia Mono", Consolas, monospace; white-space: pre-wrap;
}
footer { text-align: center; color: #587169; padding: 0 20px 32px; font-size: 12px; }
@media (max-width: 820px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr; }
  .refresh-label { display: none; }
}
@media (max-width: 540px) {
  main { width: min(100% - 24px, 1200px); padding-top: 32px; }
  .topbar { padding: 0 14px; }
  .metrics { grid-template-columns: 1fr; }
  .hero, .card-heading { align-items: flex-start; }
  .log-actions { width: 100%; }
}
