:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-alt: #273449;
  --border: #334155;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --danger: #f87171;
  --success: #4ade80;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: var(--accent);
}

.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 360px;
}

.login-card h1 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.login-card p {
  color: var(--text-muted);
  margin-top: 0;
  font-size: 0.875rem;
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  margin-top: 12px;
}

input, select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.9rem;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--accent);
  color: #0f172a;
}

button:hover {
  background: var(--accent-strong);
}

button.secondary {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

button.danger {
  background: var(--danger);
  color: #1a0d0d;
}

.error-message {
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 1.2em;
  margin-top: 8px;
}

.success-message {
  color: var(--success);
  font-size: 0.85rem;
  min-height: 1.2em;
  margin-top: 8px;
}

/* --- Panel --- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topbar .who {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.topbar .who strong {
  color: var(--text);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  display: grid;
  gap: 20px;
}

section.card h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 720px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th, td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-muted);
  font-weight: 600;
}

.table-wrap {
  max-height: 320px;
  overflow: auto;
  margin-top: 8px;
}

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-row > div {
  flex: 1;
  min-width: 140px;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.hidden {
  display: none !important;
}
