:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #17202f;
  --muted: #667085;
  --line: #dce3ef;
  --green: #3473e6;
  --green-dark: #285bb7;
  --green-soft: #edf3ff;
  --amber: #a86508;
  --amber-soft: #fff4dd;
  --red: #a83d3d;
  --red-soft: #fceaea;
  --shadow: 0 18px 55px rgba(28, 48, 35, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 20% 10%, rgba(52, 115, 230, .13) 0, transparent 34%), var(--bg); }
.login-card { width: min(430px, 100%); padding: 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 28px; border-radius: 14px; background: var(--green); color: white; font-size: 22px; font-weight: 850; }
.brand-mark.small { width: 38px; height: 38px; margin: 0; border-radius: 11px; font-size: 18px; }
.login-card h1, .topbar h1 { margin: 0; letter-spacing: -.035em; }
.login-card > .muted { margin: 10px 0 28px; line-height: 1.55; }
form { display: grid; gap: 10px; }
label { margin-top: 7px; font-size: 13px; font-weight: 700; }
input, select { min-height: 44px; border: 1px solid #d6ddd7; border-radius: 10px; background: white; color: var(--ink); padding: 0 13px; outline: none; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(52, 115, 230, .13); }

.button { min-height: 42px; border: 0; border-radius: 10px; padding: 0 15px; font-weight: 750; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button.primary { background: var(--green); color: white; }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.button.full { width: 100%; margin-top: 14px; }
.button.small { min-height: 34px; padding: 0 10px; font-size: 13px; }
.button.approve { background: var(--green-soft); color: var(--green-dark); }
.button.reject { background: var(--red-soft); color: var(--red); }
.message { min-height: 20px; margin: 5px 0 0; color: var(--red); font-size: 13px; }

.dashboard { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 16px; background: #17202f; color: white; }
.brand-row { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-row strong, .brand-row span { display: block; }
.brand-row span { margin-top: 2px; color: #aebbb2; font-size: 12px; }
.nav-item { width: 100%; border: 0; border-radius: 9px; background: transparent; color: #dce5de; padding: 12px; text-align: left; }
.nav-item.active { background: rgba(255,255,255,.1); color: white; font-weight: 700; }
.nav-item.logout { margin-top: auto; color: #bdc8c0; }
.workspace { min-width: 0; padding: 32px clamp(20px, 4vw, 56px) 52px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: white; padding: 9px 13px; font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #3473e6; box-shadow: 0 0 0 3px rgba(52, 115, 230, .16); }
.notice { margin-bottom: 18px; border: 1px solid #cfe3d6; border-radius: 11px; background: var(--green-soft); color: var(--green-dark); padding: 13px 15px; }
.notice.warning { border-color: #edd49f; background: var(--amber-soft); color: #744609; }
.notice.error { border-color: #efcaca; background: var(--red-soft); color: var(--red); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stats article { display: flex; flex-direction: column; gap: 9px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stats span { color: var(--muted); font-size: 13px; }
.stats strong { font-size: 27px; letter-spacing: -.04em; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 8px 28px rgba(30, 45, 34, .04); }
.toolbar { display: flex; justify-content: space-between; gap: 20px; padding: 21px; border-bottom: 1px solid var(--line); }
.toolbar h2 { margin: 0; font-size: 18px; }
.toolbar p { margin: 5px 0 0; font-size: 13px; }
.filters { display: flex; align-items: center; gap: 9px; }
.filters input { width: 210px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 20px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
td { font-size: 14px; }
td strong, td small { display: block; }
td small { margin-top: 4px; color: var(--muted); }
.right { text-align: right; }
.actions { display: flex; justify-content: flex-end; gap: 7px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 750; }
.badge.pending { background: var(--amber-soft); color: var(--amber); }
.badge.approved { background: var(--green-soft); color: var(--green-dark); }
.badge.rejected { background: var(--red-soft); color: var(--red); }
.empty { padding: 42px; color: var(--muted); text-align: center; }

@media (max-width: 980px) {
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; }
  .brand-row { padding: 0; margin-right: auto; }
  .sidebar nav { display: none; }
  .nav-item.logout { width: auto; margin: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .filters { width: 100%; flex-wrap: wrap; }
  .filters input { flex: 1; min-width: 180px; }
}

@media (max-width: 600px) {
  .login-card { padding: 30px 24px; }
  .workspace { padding: 24px 14px 40px; }
  .topbar { align-items: flex-start; gap: 16px; }
  .admin-chip { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
  .stats { gap: 9px; }
  .stats article { padding: 15px; }
  .filters select, .filters input, .filters button { width: 100%; flex: auto; }
}
