:root {
  color-scheme: light;
  --ink: #182b3a;
  --muted: #647584;
  --line: #dce4e9;
  --surface: #ffffff;
  --page: #f4f7f9;
  --brand: #174d67;
  --brand-dark: #10394c;
  --accent: #d7e9ef;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.topbar {
  background: var(--brand-dark);
  color: #fff;
  border-bottom: 4px solid #7fb3c5;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid #8fb9c8; border-radius: 8px; font-weight: 800; font-size: 22px;
}
.brand strong, .brand small { display: block; letter-spacing: .11em; }
.brand strong { font-size: 14px; }
.brand small { color: #b8d0da; font-size: 9px; margin-top: 2px; }
.app-label { color: #e2edf1; font-size: 14px; }
.environment {
  display: inline-block; margin-left: 8px; padding: 2px 7px;
  border: 1px solid #779aaa; border-radius: 4px; font-size: 10px; letter-spacing: .08em;
}
.page-shell { max-width: 1200px; margin: 0 auto; padding: 36px 28px 54px; min-height: calc(100vh - 145px); }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 7px; color: var(--brand); font-weight: 700; font-size: 11px; letter-spacing: .14em; }
h1 { font-size: clamp(28px, 4vw, 36px); line-height: 1.15; margin: 0; letter-spacing: -.035em; }
.intro { color: var(--muted); margin: 9px 0 0; }
.today { color: var(--muted); font-size: 13px; padding-bottom: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 7px rgba(22, 46, 61, .025); }
.stat-card { padding: 19px 21px; }
.stat-label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.stat-card strong { font-size: 29px; line-height: 1.2; font-weight: 650; }
.panel { overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
h2 { font-size: 18px; margin: 0; }
.panel-heading p { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.search-box input {
  width: min(280px, 35vw); padding: 10px 12px; border: 1px solid #cbd7de;
  border-radius: 7px; background: #fff; color: var(--ink); font: inherit;
}
.search-box input:focus { outline: 3px solid var(--accent); border-color: var(--brand); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 12px 18px; background: #f8fafb; color: #647584; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
td { padding: 15px 18px; border-top: 1px solid #edf1f3; font-size: 13px; }
td strong, td small { display: block; }
td strong { font-size: 13px; }
td small { color: var(--muted); margin-top: 3px; font-size: 11px; }
tbody tr:hover { background: #fbfdfe; }
.status { display: inline-block; border-radius: 20px; padding: 4px 9px; font-size: 11px; font-weight: 650; text-transform: capitalize; }
.status-awaiting_signature { color: #8a5b08; background: #fff1d2; }
.status-in_progress { color: #205a8b; background: #e1f0fb; }
.status-complete { color: #236746; background: #e0f3e8; }
.status-exception { color: #9a3636; background: #fbe7e7; }
.button { border: 0; border-radius: 6px; padding: 9px 13px; background: var(--brand); color: white; font: inherit; font-weight: 650; cursor: pointer; opacity: 1; }
.button-small { font-size: 12px; padding: 7px 10px; }
.muted-action { color: #47765c; font-size: 12px; }
.action-cell { text-align: right; }
.empty-state { text-align: center; padding: 52px 24px; color: var(--muted); }
.empty-state h3 { color: var(--ink); font-size: 16px; margin: 12px 0 5px; }
.empty-state p { margin: 0 auto; max-width: 470px; font-size: 13px; }
.empty-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #edf4f7; color: var(--brand); font-size: 25px; }
.notice { padding: 15px 18px; border-radius: 8px; margin: 0 0 20px; }
.notice p { margin: 4px 0 0; font-size: 13px; }
.notice-error { background: #fff1f0; border: 1px solid #f1c9c5; color: #8b302b; }
.page-note { color: #7a8a95; text-align: right; font-size: 11px; margin: 12px 2px 0; }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 18px 28px; color: #71818d; font-size: 11px; border-top: 1px solid var(--line); background: #fff; }
.hidden, [hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 720px) {
  .topbar-inner { padding: 0 18px; }
  .page-shell { padding: 26px 16px 38px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .stats { gap: 9px; }
  .stat-card { padding: 13px; }
  .stat-label { font-size: 11px; }
  .stat-card strong { font-size: 23px; }
  .panel-heading { align-items: stretch; flex-direction: column; padding: 18px; }
  .search-box input { width: 100%; }
  th, td { padding: 12px; }
  .footer { padding: 16px; flex-direction: column; gap: 4px; }
}
.pdf-panel .pdf-frame {
    display: block;
    width: 100%;
    height: 80vh;
    min-height: 600px;
    border: none;
}
