/* Eternal Empire / PW-style status dashboard — dark slate + warm accent */
:root {
  --bg: #0d1117;
  --bg-elev: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #c9a227;
  --accent-dim: #8f7222;
  --danger: #f85149;
  --ok: #3fb950;
  --font: "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { font-size: 16px; }

body.page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #1a2332 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.6;
}

code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-elev);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
}

.btn-nav {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  color: var(--accent) !important;
}

.main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.hero {
  margin-bottom: 1.5rem;
}

.hero-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
}

.hero-sub {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 52ch;
}

.view-toggle {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.tab-btn {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: none;
  background: var(--bg-elev);
  color: var(--muted);
  cursor: pointer;
}

.tab-btn.is-active {
  background: linear-gradient(180deg, #2d3748 0%, var(--bg-elev) 100%);
  color: var(--accent);
}

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.table-wrap { overflow-x: auto; }

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.status-table th,
.status-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.status-table thead {
  background: rgba(201, 162, 39, 0.08);
}

.status-table th {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.status-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.compact-list {
  list-style: none;
  margin: 0;
  padding: 0.75rem;
}

.compact-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.compact-list li:last-child { border-bottom: none; }

.pill {
  margin-left: auto;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.15);
  color: var(--accent);
  font-size: 0.85rem;
}

.cta-strip {
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: rgba(201, 162, 39, 0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.btn.primary {
  background: linear-gradient(180deg, #d4af37 0%, var(--accent-dim) 100%);
  color: #0d1117;
  border-color: var(--accent);
}

.btn.primary:hover { filter: brightness(1.08); }

.btn.wide { width: 100%; text-align: center; }

.btn.ghost {
  border-color: var(--border);
  color: var(--muted);
  background: transparent;
}

.form-panel {
  max-width: 520px;
}

.form-panel.narrow { max-width: 400px; }

.page-title {
  margin-top: 0;
  font-size: 1.5rem;
}

.stack-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.stack-form input[type="email"],
.stack-form input[type="password"],
.stack-form input[type="text"] {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.stack-form input:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.15);
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert.error {
  background: rgba(248, 81, 73, 0.12);
  border: 1px solid rgba(248, 81, 73, 0.35);
  color: #ffa198;
}

.alert.success {
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(63, 185, 80, 0.35);
  color: #7ee787;
}

.kv {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.75rem 1rem;
  margin: 1.5rem 0;
}

.kv dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.kv dd {
  margin: 0;
}

.pid {
  word-break: break-all;
  font-size: 0.9rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.footer {
  margin-top: auto;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 600;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

[hidden] { display: none !important; }
