:root {
  --navy: #0f2a4a;
  --navy-dark: #0a1c33;
  --accent: #2f7de1;
  --accent-dark: #1f5fb8;
  --bg: #f4f6f9;
  --card: #ffffff;
  --border: #dfe4ea;
  --text: #1c2733;
  --muted: #64707d;
  --danger: #c0392b;
  --success: #1a8a4a;
  --radius: 8px;
}

* { box-sizing: border-box; }

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

.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .brand {
  font-weight: 600;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar .brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.topbar .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.topbar a, .topbar button.link {
  color: #cfe0f7;
  text-decoration: none;
}

.topbar button.link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.container {
  max-width: 900px;
  margin: 32px auto;
  padding: 0 20px;
}

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

h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 14px; }
p.subtle { color: var(--muted); margin-top: 0; font-size: 14px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

input[type=text], input[type=password], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 14px;
  font-family: inherit;
}

input[type=file] { margin-bottom: 14px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.filters input, .filters select {
  width: auto;
  flex: 1 1 160px;
  margin-bottom: 0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
}

button.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

button.primary:hover { background: var(--accent-dark); }
button.primary:disabled { opacity: 0.6; cursor: not-allowed; }

button.secondary {
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

button.danger {
  background: #fff;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 14px;
}
.alert.error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6cb; }
.alert.success { background: #e9f7ef; color: var(--success); border: 1px solid #b9e6cb; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }

.badge { padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge.admin { background: #eaf1fd; color: var(--accent-dark); }
.badge.staff { background: #f0f0f0; color: var(--muted); }
.badge.ok { background: #e9f7ef; color: var(--success); }
.badge.fail { background: #fdecea; color: var(--danger); }

.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tabs button {
  background: none; border: none; padding: 10px 16px; font-size: 14px; cursor: pointer;
  color: var(--muted); border-bottom: 2px solid transparent;
}
.tabs button.active { color: var(--navy); border-bottom-color: var(--accent); font-weight: 600; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-dark);
}

.login-card {
  background: #fff;
  padding: 36px;
  border-radius: 10px;
  width: 340px;
}

.login-card .brand {
  text-align: center;
  margin-bottom: 24px;
  color: var(--navy);
  font-weight: 700;
  font-size: 20px;
}

.row { display: flex; gap: 12px; }
.row > div { flex: 1; }

.hidden { display: none !important; }
