:root {
  color-scheme: light;
  --bg: #eef1f6;
  --ink: #152033;
  --muted: #5d6b82;
  --line: #d7deea;
  --white: #ffffff;
  --brand: #1f4ed8;
  --brand-dark: #163aa8;
  --ok: #0f7b4d;
  --ok-bg: #e5f6ee;
  --err: #b42318;
  --err-bg: #fdecea;
  --sidebar: #10192b;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  color: #e8eefc;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.brand p, .sidebar-foot {
  margin: 4px 0 0;
  color: #9aabc8;
  font-size: 12px;
  line-height: 1.4;
}
.sidebar-foot-link {
  color: #c7d2fe;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sidebar-foot-link:hover {
  color: #e0e7ff;
}

.role-switch {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: #9aabc8;
}
.role-switch select,
.claim-form input,
.claim-form select,
.queue-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.nav-item {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #d5def0;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-item.active, .nav-item:hover { background: #1c2b48; }
.badge {
  background: #f5c451;
  color: #1c1403;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
}

main { padding: 28px; }
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  min-height: calc(100vh - 56px);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 6px;
}
h1, h2 { margin: 0; }
.totals {
  text-align: right;
  color: var(--muted);
}
.totals strong { display: block; color: var(--ink); font-size: 22px; }

.claim-form {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  background: #f8fafc;
}
.claim-form h2 { margin-bottom: 12px; font-size: 16px; }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.grid .wide { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
button {
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid transparent;
}
.primary, .danger, .small {
  padding: 8px 14px;
}
.primary { background: var(--brand); color: white; }
.primary:hover { background: var(--brand-dark); }
.danger { background: white; color: var(--err); border-color: #f3c0bc; }
.small { background: white; border-color: var(--line); }
.linkish {
  background: none;
  border: 0;
  color: var(--brand);
  padding: 0;
}
.flash { margin: 12px 0 0; font-size: 14px; }
.flash.ok { color: var(--ok); }
.flash.error { color: var(--err); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
}
th { color: var(--muted); font-size: 12px; font-weight: 600; }

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  background: #eef2ff;
}
.pill.submitted { background: #fff4d6; }
.pill.approved, .pill.reimbursed { background: var(--ok-bg); color: var(--ok); }
.pill.rejected { background: var(--err-bg); color: var(--err); }
.pill.posted { background: #e8edf5; }
.pill.draft { background: #f3f4f6; }

.guest-block {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 10px;
}
.guest-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.guest-block .hint { margin: -4px 0 0; font-size: 12px; color: var(--muted); }
.guest-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}
.guest-row input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; }
.business-purpose {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.queue { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.queue-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.queue-top { display: flex; justify-content: space-between; gap: 12px; }
.queue-top p { margin: 6px 0 0; color: var(--muted); }
.queue-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}
dt { font-size: 11px; color: var(--muted); }
dd { margin: 4px 0 0; }
.actions { display: flex; gap: 8px; margin-top: 10px; }
.empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
  background: #f8fafc;
  border-radius: 12px;
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .grid, .queue-card dl { grid-template-columns: 1fr; }
}
