@import url("https://fonts.googleapis.com/css2?family=Catamaran:wght@400;600;700&family=Fira+Code:wght@400;500&display=swap");

:root {
  color-scheme: dark;
  --background: #141b24;
  --foreground: #f2f2f2;
  --card: #1a222c;
  --card-foreground: #f2f2f2;
  --primary: #e03e9b;
  --primary-foreground: #f2f2f2;
  --secondary: #40c2f1;
  --secondary-foreground: #f2f2f2;
  --muted: #2a3644;
  --muted-foreground: #a0a0a0;
  --destructive: #dc2626;
  --border: #3d4957;
  --ring: #40c2f1;
  --radius: 0.5rem;
  --font-sans: Catamaran, ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Fira Code", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
}
a { color: var(--secondary); }
code, pre { font-family: var(--font-mono); }
pre {
  overflow: auto;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--muted);
}
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td {
  border: 1px solid var(--border);
  padding: 0.5rem;
  text-align: left;
  vertical-align: top;
}
label { display: block; margin: 0.5rem 0; }
input {
  background: var(--muted);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
}
.button, button {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--muted);
  color: var(--foreground);
  cursor: pointer;
  text-decoration: none;
  font: inherit;
}
.button-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}
.button-danger { background: var(--destructive); border-color: var(--destructive); }
.button-muted {
  background: transparent;
  border-color: var(--border);
  color: var(--foreground);
}
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 16rem;
  padding: 1rem;
  border-right: 1px solid var(--border);
  background: var(--background);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.sidebar img { max-width: 120px; height: auto; }
.sidebar nav a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  color: var(--foreground);
  text-decoration: none;
}
.sidebar nav a.active { background: var(--muted); color: var(--secondary); }
.sidebar-foot { margin-top: auto; }
.main { flex: 1; padding: 1.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.pill-live { color: var(--secondary); }
.pill-down { color: var(--muted-foreground); }
.splash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
}
.splash img { max-width: 160px; height: auto; }
.admin-only { color: var(--destructive); }
.error { color: var(--destructive); white-space: pre-wrap; }
@media (max-width: 800px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; border-right: 0; border-bottom: 1px solid var(--border); }
}
.hint { color: var(--muted-foreground); margin: 0 0 0.75rem; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  align-items: end;
}
.form-grid .field-full { grid-column: 1 / -1; }
.form-grid label { margin: 0; }
.form-grid input { width: 100%; }
.main > .card + .card { margin-top: 1rem; }
.alias-table { margin: 0.5rem 0 0; }
.alias-table th {
  color: var(--muted-foreground);
  font-weight: 600;
}
@media (max-width: 800px) {
  .form-grid { grid-template-columns: 1fr; }
}
