:root {
  --navy: #0f2e5b;
  --blue: #2f8dce;
  --action: #1a6798;
  --copper: #c67b45;
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #101b35;
  --muted: #64748b;
  --line: #e2e8f0;
  --pale: #eaf4fc;
  --cream: #f8eee6;
  --danger: #9f1239;
  --ok: #166534;
  --shadow: 0 8px 24px rgba(15, 46, 91, 0.06);
  --sidebar: 248px;
  font-family: Inter, Roboto, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.skip {
  position: absolute; left: 12px; top: -40px; background: var(--navy); color: white;
  padding: 8px 12px; z-index: 5;
}
.skip:focus { top: 12px; }
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.login-card, .card, .drawer, .topbar, .sidebar {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow);
}
.login-card { width: min(420px, 100%); padding: 28px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand strong { color: var(--navy); letter-spacing: 0.04em; }
.muted { color: var(--muted); }
h1, h2, h3 { color: var(--navy); margin: 0 0 8px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; margin-top: 14px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); background: white; border-radius: 12px;
  padding: 12px 14px;
}
.password { display: flex; gap: 8px; }
.password input { flex: 1; }
button, .button {
  border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700;
  background: var(--action); color: white; cursor: pointer;
}
button.secondary, .button.secondary {
  background: white; color: var(--navy); border: 1px solid var(--line);
}
button.copper { background: var(--cream); color: var(--navy); }
button:disabled { opacity: 0.6; cursor: progress; }
.error { color: var(--danger); background: #fff1f2; border-radius: 12px; padding: 10px 12px; }
.ok { color: var(--ok); }
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  border-radius: 0; border-top: 0; border-bottom: 0; border-left: 0;
  box-shadow: none; padding: 18px 14px; position: sticky; top: 0; height: 100vh;
}
.sidebar nav { display: grid; gap: 4px; margin-top: 22px; }
.sidebar a, .menu button {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy);
  border-radius: 12px; padding: 10px 12px; font-weight: 650; background: transparent; text-align: left;
}
.sidebar a.active { background: var(--pale); color: var(--action); }
.main { min-width: 0; }
.topbar {
  border-radius: 0; border-top: 0; border-left: 0; border-right: 0; box-shadow: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px; position: sticky; top: 0; z-index: 2;
}
.menu { position: relative; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); background: white;
  border: 1px solid var(--line); border-radius: 12px; min-width: 180px; padding: 8px;
  box-shadow: var(--shadow);
}
.content { padding: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { display: block; text-decoration: none; color: inherit; padding: 16px; }
.stat b { display: block; font-size: 1.6rem; color: var(--navy); }
.filters, .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filters label { margin: 0; min-width: 160px; flex: 1; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 16px; overflow: hidden; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 0.82rem; }
.badge { display: inline-block; border-radius: 999px; padding: 2px 8px; background: var(--pale); color: var(--navy); font-size: 0.82rem; }
.badge.pending { background: var(--cream); }
.badge.rejected { background: #fff1f2; color: var(--danger); }
.badge.approved { background: #ecfdf3; color: var(--ok); }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.detail { display: grid; gap: 12px; }
.drawer-button { display: none; }
dialog { border: 1px solid var(--line); border-radius: 16px; width: min(560px, calc(100% - 24px)); }
dialog::backdrop { background: rgba(16, 27, 53, 0.35); }
.notice { background: var(--cream); border-radius: 12px; padding: 12px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .topbar { z-index: 6; }
  .sidebar {
    display: none; height: auto; position: fixed; top: 72px; right: auto; bottom: 0; left: 0;
    width: min(84vw, 300px); z-index: 4;
  }
  .sidebar.open { display: block; }
  .drawer-button { display: inline-flex; }
  .scrim { position: fixed; top: 72px; right: 0; bottom: 0; left: 0; background: rgba(16, 27, 53, 0.35); z-index: 3; }
}
@media (max-width: 720px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 8px solid var(--bg); }
  td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 0.78rem; }
}
