/* Reset cơ bản */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1f2937;
  background: #f9fafb;
}

/* ── App shell: sidebar trái + main bên phải ───────────────────── */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #1f2937;
  color: #f9fafb;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.app-main {
  flex: 1 1 auto;
  padding: 24px 32px;
  overflow-x: hidden;
}

@media (max-width: 720px) {
  .app-shell {
    flex-direction: column;
  }
  .app-sidebar {
    width: 100%;
    height: auto;
    position: static;
  }
  .app-main {
    padding: 16px;
  }
}

/* Common UI */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

/* Buttons — base is NEUTRAL; emphasis comes from a modifier.
 *
 * This used to be a blue primary here and a neutral one in tunnel.css.
 * Same specificity, tunnel.css loaded second, and it set `background`
 * without setting `color` — so every plain `.btn` on the app rendered
 * white text on a white background. Invisible, not missing, which is why
 * it survived: the buttons were there and clickable the whole time.
 *
 * One definition now. Modifiers live here too, because css/care.css and
 * senior.html rely on them and neither should have to load tunnel.css. */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}

.btn:hover {
  background: #f9fafb;
}

.btn--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.btn--primary:hover {
  background: #1d4ed8;
}

/* #dc2626, not the #ef4444 this used to be: white-on-#ef4444 measures
 * 3.76:1, under the 4.5 WCAG AA wants for body-sized text. This is the
 * shade that destructive actions like "Revoke" render in. */
.btn--danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.btn--danger:hover {
  background: #b91c1c;
}

.btn--sm {
  padding: 4px 10px;
  font-size: 13px;
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: #2563eb;
}

.error {
  color: #b91c1c;
}

.loading {
  color: #6b7280;
  font-style: italic;
}
