:root {
  --bg: #f5f7f4;
  --surface: #ffffff;
  --ink: #1c2b22;
  --muted: #5c6b62;
  --green: #0f6b3f;
  --green-dark: #0b4f2f;
  --gold: #c99a3e;
  --border: #e1e6df;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

.topbar {
  background: var(--green-dark);
  color: #fff;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}

.topbar .brand span { color: var(--gold); }

.topbar a.logout {
  color: #f0f0f0;
  text-decoration: none;
  font-size: 0.85rem;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 12px;
  border-radius: 6px;
}

.topbar a.logout:hover { background: rgba(255,255,255,0.1); }

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

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

.page-head h1 {
  font-size: 1.4rem;
  margin: 0;
}

.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
}

.btn:hover { background: var(--green-dark); }

.btn-secondary {
  background: transparent;
  color: var(--green-dark);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: #eef2ec; }

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-active { background: #e8f4ec; color: var(--green-dark); }
.badge-warning { background: #fff3d6; color: #7a5b0a; }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: #eef0ed; color: var(--muted); }

code {
  background: #eef2ec;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
}

.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
}

input:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.alert {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  word-break: break-word;
}

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

.login-card {
  background: #fff;
  padding: 36px 32px;
  border-radius: 14px;
  width: 100%;
  max-width: 360px;
}

.login-card h1 {
  font-size: 1.2rem;
  margin: 0 0 4px;
}

.login-card p {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 20px;
}

.cred-box {
  background: #f5f7f4;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88rem;
}

.cred-box div { margin-bottom: 6px; }
.cred-box div:last-child { margin-bottom: 0; }

.note-box {
  background: #fff8ea;
  border: 1px solid #f0dfae;
  color: #6b5217;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-top: 18px;
}

.processing {
  text-align: center;
  padding: 30px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
