:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --line: #d0d5dd;
  --accent: #17324d;
  --accent-2: #b9914d;
  --good: #087443;
  --warn: #b54708;
  --bad: #b42318;
  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); }
.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar { background: #0f2234; color: white; display: flex; flex-direction: column; padding: 22px; gap: 24px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--accent-2), #f1d28b); color: #0f2234; display: grid; place-items: center; font-weight: 800; }
.brand span { display: block; color: #cbd5e1; font-size: 13px; }
nav { display: grid; gap: 8px; }
nav button, .secondary { border: 0; border-radius: 12px; padding: 12px 14px; background: transparent; color: #e2e8f0; text-align: left; cursor: pointer; font-weight: 650; }
nav button:hover, nav button.active { background: rgba(255,255,255,0.11); }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; color: #cbd5e1; font-size: 13px; }
.secondary { border: 1px solid rgba(255,255,255,0.2); text-align: center; }
.main { padding: 28px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
h1 { margin: 0; font-size: 30px; }
p { color: var(--muted); }
.user-badge { border: 1px solid var(--line); background: white; padding: 10px 14px; border-radius: 999px; color: var(--muted); }
.panel, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 8px 26px rgba(16, 24, 40, 0.05); }
.login-panel { max-width: 480px; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font: inherit; background: white; }
button { border: 0; background: var(--accent); color: white; border-radius: 12px; padding: 12px 16px; font-weight: 750; cursor: pointer; }
button:hover { filter: brightness(1.06); }
button.ghost { background: #eef2f6; color: var(--ink); }
.hidden { display: none !important; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 16px; }
.metric { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.metric span { display: block; color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin-top: 8px; font-size: 30px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.table-wrap { overflow: auto; background: white; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #eef2f6; white-space: nowrap; }
th { background: #f8fafc; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 800; background: #eef2f6; color: #344054; }
.status.active, .status.approved, .status.completed { background: #ecfdf3; color: var(--good); }
.status.submitted, .status.pending, .status.open { background: #fffaeb; color: var(--warn); }
.status.rejected, .status.expired { background: #fef3f2; color: var(--bad); }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.toast { position: fixed; right: 22px; bottom: 22px; background: #101828; color: white; padding: 14px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-width: 420px; }
pre { overflow: auto; background: #0f172a; color: #dbeafe; border-radius: 14px; padding: 16px; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .grid, .split { grid-template-columns: 1fr; }
}
