:root {
  /* Mid‑dark theme */
  --bg: #0f1218;
  --surface: #171b23;
  --text: #e5e7eb;
  --muted: #a0a6b0;
  --primary: #3b82f6; /* blue-500 */
  --primary-contrast: #ffffff;
  --border: #262e3d;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #10141c 0%, #0f1218 100%);
  color: var(--text);
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.page-header h1 { margin: 0; font-size: 1.6rem; }

nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
nav .link { color: var(--text); text-decoration: none; padding: 6px 10px; border-radius: 9999px; border: 1px solid transparent; }
nav .link:hover { color: #93c5fd; background: #0f172a; border-color: #334155; }
nav .inline { display: inline; }

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.btn:hover { border-color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.btn.primary { background: var(--primary); color: var(--primary-contrast); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.05); }

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

label { display: block; margin: 8px 0 4px; }
input, select, textarea {
  width: 100%;
  background: #0f141d;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
textarea { min-height: 120px; }

.list { list-style: none; padding: 0; margin: 0; }
.list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.muted { color: var(--muted); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border: 1px solid var(--border); padding: 8px 10px; }
.table th { background: #1b2130; text-align: left; }

@media (max-width: 640px) {
  .page-header { flex-direction: column; align-items: center; gap: 10px; text-align: center; }
  .page-header h1 { text-align: center; }
  nav { justify-content: center; }
  nav .inline { display: block; margin-top: 8px; }
}
