/* GCF Offshore Portal -- quiet, dense, administrative.
   Direction: an attendance record that may be disputed, so it should read like a record, not a product.
   Exceptions carry the page. White background, printer-friendly, no dark theme. */

:root {
  --ink: #1c1f24;
  --muted: #6b7280;
  --line: #dfe3e8;
  --bg: #ffffff;
  --panel: #f7f8fa;
  --accent: #1a4f8b;          /* house title blue */
  --warn-bg: #fdf3e3;
  --warn-line: #e0a33a;
  --warn-ink: #7a4c05;
  --ok-bg: #eaf6ee;
  --ok-line: #4c9a63;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Segoe UI", Tahoma, system-ui, sans-serif;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }

/* --- masthead: quiet, one rule, no drama ------------------------------------------------ */
.bar { border-bottom: 2px solid var(--accent); background: #fff; }
.bar .wrap { display: flex; align-items: baseline; justify-content: space-between; padding-top: 14px; padding-bottom: 12px; }
.brand { font-weight: 700; font-size: 17px; color: var(--accent); letter-spacing: .2px; }
.who { color: var(--muted); font-size: 13px; }

main { padding: 22px 18px 40px; }

h1 { font-size: 21px; margin: 0 0 4px; text-wrap: balance; color: var(--accent); }
h2 { font-size: 17px; margin: 0 0 6px; text-wrap: balance; }
.lede { color: var(--muted); margin: 0 0 18px; text-wrap: pretty; }
.hint { color: var(--muted); font-size: 13px; text-wrap: pretty; }
.sub  { display: block; color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }

/* --- cards: one level only, never nested ------------------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 0 0 16px;
}
.card.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); border-radius: 6px; }
.card.ok   { background: var(--ok-bg);  border-color: var(--ok-line);  border-radius: 6px; }

.narrow { max-width: 430px; }

/* --- forms ------------------------------------------------------------------------------ */
label { display: block; margin: 12px 0 4px; font-size: 13px; font-weight: 600; }

input[type=email], input[type=password], input[type=text] {
  width: 100%;
  min-height: 40px;                 /* usable hit area */
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input.code { font-size: 22px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }

input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  min-height: 40px;
  margin-top: 16px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition-property: transform, background-color, border-color;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button:active { transform: scale(.97); }
button:hover { border-color: var(--accent); }

a { color: var(--accent); }

/* --- the table: the actual product ------------------------------------------------------- */
/* Content-driven widths. A fixed layout with guessed percentages made the short columns wrap
   ("2026-11-" / "18"); instead the short cells are nowrap and only Summary is given a share, so it
   absorbs the slack instead of the browser handing it all the leftover width. */
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }

table.grid th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  white-space: nowrap;
}
table.grid th:nth-child(7) { width: 18%; }      /* summary absorbs the slack */
/* NO overflow-wrap: anywhere here. It lets the engine break inside words, so it hands narrow columns
   even less width and produced "test_onboa / d" and "BERT-TP- / 2029". Normal wrapping keeps words
   whole and the columns size to their content. */
table.grid td { border-bottom: 1px solid var(--line); padding: 9px 10px; vertical-align: top; }
table.grid tbody tr:hover { background: var(--panel); }

.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t   { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tz2 { display: block; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sum { color: #3c424b; }
.dev { font-size: 13px; }

/* Exceptions carry the page: a flagged row must be unmistakable at a glance, not a hint.
   The count in the lede links to #flags, which is the first flagged row. */
tr.row-flag td { background: #fdf4e3; border-bottom-color: #ecd9b0; }
tr.row-flag:hover td { background: #fbeacf; }
tr.row-flag td:first-child { box-shadow: inset 4px 0 0 var(--warn-line); font-weight: 600; }
tr.row-flag:target td { background: #fbe3bd; }

.pill {
  display: inline-block;
  margin: 1px 4px 1px 0;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 11px;
  white-space: nowrap;
}
.pill.warn { background: #fff3d9; border-color: #c8871f; color: #6b4200; font-weight: 600; }
.pill.open { border-color: var(--accent); color: var(--accent); }

a.flagcount { color: var(--warn-ink); text-decoration: none; border-bottom: 1px solid var(--warn-line); }
a.flagcount:hover { background: #fff3d9; }

/* --- capture viewing --------------------------------------------------------------------- */
/* Light surround, not a dark one: house style is white/printable, and a neutral panel still makes
   the image the subject. */
.shotwrap {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px; margin: 0 0 16px; text-align: center;
}
.shotwrap img { max-width: 100%; height: auto; display: block; margin: 0 auto; border: 1px solid var(--line); border-radius: 4px; }

table.meta { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 16px; }
table.meta th {
  text-align: left; width: 200px; color: var(--muted); font-weight: 600;
  padding: 6px 10px 6px 0; vertical-align: top; border-bottom: 1px solid var(--line);
}
table.meta td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.path { font-family: Consolas, "Courier New", monospace; font-size: 12px; word-break: break-all; }

.nav { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0 6px; }
.crumb { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.crumb a { text-decoration: none; }

/* the day summary strip */
.facts {
  display: flex; flex-wrap: wrap; gap: 12px 30px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 16px; margin: 0 0 16px;
}
.facts .k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.facts .v { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }

/* the capture grid -- lazy images, so only what is on screen gets decrypted */
.shotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 0 0 18px; }
.shotgrid a.shot {
  display: block; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: #fff; text-decoration: none; color: inherit;
}
.shotgrid a.shot:hover { border-color: var(--accent); }
.shotgrid img { width: 100%; height: 118px; object-fit: cover; display: block; background: #eef1f4; }
.shotgrid .cap { display: block; padding: 4px 7px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

table.grid.tl td { vertical-align: top; }
a.countlink { text-decoration: none; color: var(--accent); font-weight: 600; border-bottom: 1px dotted var(--accent); }
a.daylink { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--line); }
a.daylink:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* --- footer ----------------------------------------------------------------------------- */
.foot {
  display: flex; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 28px; padding-top: 12px; padding-bottom: 26px;
  color: var(--muted); font-size: 12px;
}

/* --- print: this is a record, it gets printed ------------------------------------------- */
@media print {
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .bar { border-bottom-color: #000; }
  button, .foot a { display: none; }
  table.grid { font-size: 11px; }
  tr.row-flag { background: #f6e6c8; }
  @page { margin: 12mm; }
}
