:root {
  --ink: #16202e;
  --ink-soft: #4b5a6b;
  --line: #dde3ea;
  --paper: #f6f8fa;
  --card: #ffffff;
  --brand: #1f5c4a;
  --brand-dark: #163f33;
  --danger: #b3432f;
  --radius: 10px;
  --font: -apple-system, "Segoe UI", Roboto, Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

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

.topbar {
  background: var(--brand-dark);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .brand { font-weight: 700; font-size: 1.1rem; letter-spacing: 0.2px; }
.topbar a { color: #e8f0ec; }
.topbar .nav-right { display: flex; gap: 18px; align-items: center; font-size: 0.95rem; }

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 400px;
}

.card h1 {
  font-size: 1.4rem;
  margin: 0 0 6px;
}
.card .sub {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0 0 24px;
}

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 14px 0 6px;
}
label:first-of-type { margin-top: 0; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font);
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
}
.btn:hover { background: var(--brand-dark); }
.btn-secondary {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand);
}

.foot-note {
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-align: center;
}

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.alert-error { background: #fbeae6; color: var(--danger); border: 1px solid #f0cfc6; }
.alert-success { background: #e9f3ee; color: var(--brand-dark); border: 1px solid #cfe4da; }

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

.page-title { font-size: 1.3rem; margin: 0 0 20px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.stat .label { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 6px; }
.stat .value { font-size: 1.6rem; font-weight: 700; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
th { background: var(--paper); font-weight: 600; color: var(--ink-soft); }
tr:last-child td { border-bottom: none; }

@media (max-width: 480px) {
  .card { padding: 24px; }
}
