:root {
  --border: #d8dde3;
  --text: #1f2430;
  --muted: #667085;
  --bg: #f7f8fa;
  --accent: #2e5aac;
  --danger: #b3261e;
  --success: #1e7f3d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: white;
  border-bottom: 1px solid var(--border);
}

.topbar-title { font-weight: 600; }

.topbar nav a {
  margin-left: 1rem;
  color: var(--accent);
  text-decoration: none;
}

.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.card, .card-narrow {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.card-narrow { max-width: 420px; margin: 2rem auto; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

h1 { font-size: 1.25rem; margin: 0 0 1rem; }

label {
  display: block;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.checkbox-label { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-label input { width: auto; }

input[type="text"], input[type="password"], input[type="date"] {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.3rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
}

button, .button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.link-button {
  background: none;
  border: none;
  color: var(--danger);
  padding: 0;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
}

.table { width: 100%; border-collapse: collapse; background: white; }
.table th, .table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
}

.row-actions a { margin-right: 0.75rem; color: var(--accent); }

.badge {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
}
.badge-active { background: #e3f4e8; color: var(--success); }
.badge-expired { background: #fbe6e5; color: var(--danger); }

.flashes { list-style: none; padding: 0; margin: 0 0 1rem; }
.flash {
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.flash-error { background: #fbe6e5; color: var(--danger); }
.flash-success { background: #e3f4e8; color: var(--success); }
