:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4d;
  --text: #e8eef5;
  --muted: #9aa8b8;
  --accent: #3d9cf5;
  --danger: #f05b5b;
  --ok: #4cd0a8;
  --warn: #f0c040;
}

* {
  box-sizing: border-box;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

header.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

nav a {
  margin-right: 0.75rem;
  font-weight: 600;
}

main {
  padding: 1rem;
  max-width: 960px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

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

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
  width: 100%;
  max-width: 420px;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #121a26;
  color: var(--text);
}

textarea {
  min-height: 90px;
  max-width: 100%;
}

button,
.btn {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #243044;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

button.primary,
.btn.primary {
  background: var(--accent);
  border-color: #2b7fd4;
  color: #061018;
}

.btn.danger {
  background: #3a1f24;
  border-color: #6a3038;
  color: #ffd6da;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.flash {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}
.flash.success {
  border-color: #2a5c4a;
  background: #13261f;
}
.flash.danger {
  border-color: #6a3038;
  background: #2a1518;
}
.flash.warning {
  border-color: #6a5a2a;
  background: #2a2415;
}
.flash.info {
  border-color: #2a4a6a;
  background: #15202a;
}

table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  color: var(--muted);
}

.hstack {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.error {
  color: #ffb4b4;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  header.app-header {
    align-items: flex-start;
  }
}
