/* BREC T&A — theme aligned to the Fiscal Transparency Portal design system
   (brec-fiscal-transparency/app/app/globals.css): same tokens, same civic
   "ink on paper" restraint — high-contrast pairs meeting WCAG 2.2 AA, 3px
   radii, decoration only where it carries meaning. */
:root {
  --ink: #14181d;
  --ink-soft: #43505c;
  --ink-faint: #5c6a77;
  --paper: #ffffff;
  --paper-2: #f4f6f8;
  --paper-3: #e8ecf0;
  --rule: #c6cfd6;
  --rule-strong: #8a97a2;
  --link: #0b4f86;
  --focus: #b35309;
  --accent: #0b4f86;
  --pos: #17603a;
  --neg: #9c1c1c;
  --warn-bg: #fdf3d7;
  --warn-edge: #8a6100;
  --info-bg: #eef4fa;
  --radius: 3px;
  font-size: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Public Sans", "Source Sans Pro", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--paper-2); color: var(--ink);
  display: flex; flex-direction: column; min-height: 100vh;
  line-height: 1.45;
}
header {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--paper); color: var(--ink);
  padding: 10px 16px; border-bottom: 3px solid var(--accent);
}
header .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .01em; }
header .brand svg { color: var(--accent); }
header .who { display: flex; align-items: center; gap: 12px; font-size: 0.875rem; color: var(--ink-soft); }
main { flex: 1; width: min(680px, 100%); margin: 0 auto; padding: 1rem; }
footer { text-align: center; padding: 14px; color: var(--ink-faint); font-size: .8rem; }
.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px; margin-bottom: 1rem;
}
.narrow { max-width: 420px; margin: 40px auto 0; }
h1 { font-size: 1.375rem; margin: 0 0 6px; }
h2 { font-size: 1rem; margin: 0 0 12px; }
.muted { color: var(--ink-soft); } .small { font-size: .75rem; } .hidden { display: none !important; }
label { display: block; font-size: .8125rem; margin: 12px 0 4px; color: var(--ink-soft); }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  font-size: 0.95rem; background: var(--paper); color: inherit;
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
button {
  font: inherit; font-weight: 600; border-radius: var(--radius);
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer;
}
button.primary { background: var(--ink); padding: 11px 18px; width: 100%; margin-top: 16px; font-size: 0.95rem; }
button.primary:hover { text-decoration: underline; }
button.primary:disabled { opacity: .45; }
button.big { font-size: 1rem; }
button.link { background: none; border: none; color: var(--link); padding: 4px; font-weight: 600; }
button.link:hover { text-decoration: underline; }
#sso-err { border-left: 5px solid var(--neg); background: #f9e9e9; padding: 10px 12px; border-radius: var(--radius); font-size: .85rem; margin-top: 12px; }
.adv { margin-top: 14px; } .adv summary { color: var(--ink-faint); font-size: .8125rem; cursor: pointer; }
#tabs { display: flex; margin-bottom: 1rem; border-bottom: 1px solid var(--rule); }
#tabs button {
  flex: 1; padding: 10px; background: none; color: var(--ink-soft);
  border: none; border-bottom: 3px solid transparent; border-radius: 0; font-weight: 600;
}
#tabs button.active { color: var(--ink); border-bottom-color: var(--accent); background: none; }
#tabs button:hover { color: var(--ink); }
.center { text-align: center; }
.dot { width: 14px; height: 14px; border-radius: 50%; margin: 4px auto 10px; }
.dot.in { background: var(--pos); box-shadow: 0 0 0 5px rgb(23 96 58 / 18%); }
.dot.out { background: var(--rule-strong); }
.clock-status { font-size: 1.75rem; font-weight: 700; letter-spacing: .02em; }
.punch-row { display: flex; gap: 12px; margin-top: 18px; }
.punch { flex: 1; padding: 18px 8px; font-size: 1.0625rem; font-weight: 700; border-radius: var(--radius); }
.punch.in { background: var(--pos); color: #fff; border-color: var(--pos); }
.punch.out { background: var(--paper); color: var(--warn-edge); border: 1px solid var(--warn-edge); }
.punch:disabled { opacity: .35; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th {
  text-align: left; color: var(--ink-soft); font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: .03em; padding: .45rem .4rem;
  background: var(--paper-2); border-bottom: 1px solid var(--rule);
}
td { padding: .5rem .4rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.stack > .item { border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; background: var(--paper); }
.item .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bal { border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; background: var(--paper); }
.bal b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip { font-size: .6875rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--paper-3); color: var(--ink-soft); }
.chip.PENDING { background: var(--warn-bg); color: var(--warn-edge); }
.chip.APPROVED { background: #e4efe9; color: var(--pos); }
.chip.DENIED, .chip.CANCELLED { background: #f7e6e6; color: var(--neg); }
.chip.OPEN, .chip.COMPUTED { background: var(--info-bg); color: var(--accent); }
#toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--radius);
  max-width: 90vw; font-size: .875rem; box-shadow: 0 4px 18px rgb(0 0 0 / 25%); z-index: 10;
}
#toast.bad { background: var(--neg); }
