:root {
  --accent: #2563eb;   /* default blue */
  --header: #1e3a8a;   /* darker blue header */
  --bg: #f1f5f9;       /* light gray background */
  --ink: #0f172a;
  --card: #fff;
  --muted: #6b7280;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto;
  background: var(--bg);
  color: var(--ink);
}

.wrap { max-width: 1100px; margin: 16px auto; padding: 0 12px; }
.card {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
}

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--header); color: #fff;
  padding: 10px 14px; display: flex; flex-direction: column; gap: 6px;
}
.topbar .user-strip { display: flex; align-items: center; justify-content: space-between; }
.topbar .nav { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; }
.topbar .chip {
  padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1);
  color: #fff; font-size: .9rem; white-space: nowrap; text-decoration: none; transition: .2s;
}
.topbar .chip:hover { background: rgba(255,255,255,.25); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 14px; border-radius: 10px; text-decoration: none; border: none;
  cursor: pointer; transition: .2s; font-size: .95rem;
}
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { filter: brightness(.95); }
.btn.secondary { background: #e5e7eb; color: var(--ink); }
.btn.block { width: 100%; }

/* Inputs */
.input,.select,.textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff;
}
.input:focus,.select:focus,.textarea:focus { outline: 2px solid rgba(37,99,235,.25); }
.label { font-size: .9rem; color: #374151; margin-bottom: 6px; display: block; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th,.table td { padding: 10px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.table th { font-size: .85rem; font-weight: 600; color: #374151; }
.table td.mono { font-family: ui-monospace, monospace; }

/* Utilities */
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, monospace; }
.alert { padding: 10px 12px; border-radius: 10px; background: #fef3c7; border: 1px solid #fde68a; }
.success { background: #eaffea; border-color: #b9f0b9; }

/* Responsive */
@media (max-width: 820px) { .wrap { padding: 0 10px; } .topbar .nav { gap: 6px; } }
@media (max-width: 640px) { .btn { width: 100%; } .table th,.table td { padding: 8px; font-size: .9rem; } }
.chip.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
/* smaller logout for phones */
.btn-xs { padding: 6px 10px; font-size: .82rem; border-radius: 8px; }

/* help panel styling */
.help-panel {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 10px;
  margin-top: 6px;
}
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 8px;
}
.help-grid b { font-weight: 700; }
/* Only inside topbar/help-panel */
.topbar .muted,
.help-panel .muted {
  color: #ffffff !important;
}
