:root {
  --border: #d9dde3;
  --text: #1f2430;
  --muted: #6b7280;
  --accent: #2563eb;
  --danger: #dc2626;
  --bg: #f7f8fa;
}

* { box-sizing: border-box; }

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

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

.brand { font-weight: 600; text-decoration: none; color: var(--text); }

.topbar nav { display: flex; align-items: center; gap: 16px; }
.topbar a { color: var(--accent); text-decoration: none; }
.user-role { color: var(--muted); font-size: 0.9em; }

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

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.auth-card { max-width: 360px; margin: 60px auto; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

h1 { font-size: 1.4em; }
h2 { font-size: 1.1em; margin-top: 0; }

label { display: block; margin-bottom: 12px; font-size: 0.9em; }
input, select { display: block; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 1em; }

.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; }
.inline-form label { margin-bottom: 0; }
.inline-form input { width: auto; }

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

.button-danger { background: var(--danger); }

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

.hint { color: var(--muted); font-size: 0.85em; }

.flashes { list-style: none; padding: 0; margin: 0 0 16px; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 8px; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }
