:root {
  --bg: #0f1115;
  --card: #171a21;
  --border: #272b35;
  --text: #e8e9ec;
  --muted: #9aa0ac;
  --accent: #5b8cff;
  --success: #2e7d32;
  --error: #c62828;
}

* { box-sizing: border-box; }

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

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

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

h1 { font-size: 20px; margin: 0; }
h2 { font-size: 16px; margin-top: 0; }

label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}

label.inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
  color: var(--text);
}

input[type="text"],
input[type="password"],
input[type="file"],
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  background: #0f1115;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}

textarea { resize: vertical; font-family: inherit; }

.radio-row { margin-bottom: 14px; }

button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
button:hover { opacity: 0.9; }

.link-btn {
  background: none;
  color: var(--muted);
  padding: 0;
  text-decoration: underline;
}

.hint { color: var(--muted); font-size: 13px; }

.flash {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}
.flash.success { background: rgba(46,125,50,0.15); border: 1px solid var(--success); }
.flash.error { background: rgba(198,40,40,0.15); border: 1px solid var(--error); }

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

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.login-card { width: 320px; }
