/* TRGBI Attendance — design tokens + base components.
   Faithful to the Horilla "oh-" design DNA: sharp corners (radius 0),
   80% base font, Poppins UI, flat 1px borders. Accent = LOF blue
   (single variable --c-accent; swap for a TRGBI brand color if provided). */

:root {
  /* type */
  --font-sans: "Poppins", "Inter", "Helvetica Neue", Arial, sans-serif;
  --fs-base: 12.8px;
  --lh-base: 1.4;

  /* brand */
  --c-text: #1c1c1c;
  --c-canvas: #f9f9f9;
  --c-surface: #ffffff;
  --c-brand: #212121;
  --c-brand-light: #333333;

  /* accent (LOF blue) */
  --c-accent: #1c4d8c;
  --c-accent-dark: #163d70;

  /* status */
  --c-danger: #ff3b38;
  --c-warning: #f5b438;
  --c-success: #21c06b;
  --c-info: #2e97db;

  /* greys */
  --c-border: #cdd5df;
  --c-border-light: #e8ecf1;
  --c-placeholder: #94a0b3;
  --c-text-muted: #737373;
  --c-icon: #5f6368;

  /* shape */
  --radius: 0;
  --focus: 2px solid var(--c-brand);
  --pad-control: 0.8rem 1.25rem;
  --shadow-card: rgba(0, 0, 0, 0.1) 0 1px 3px, rgba(0, 0, 0, 0.06) 0 1px 2px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--c-text);
  background: var(--c-canvas);
  font: normal var(--fs-base) / var(--lh-base) var(--font-sans);
}

code {
  font-family: "Courier New", monospace;
}

/* Signature move: sharp corners everywhere */
.oh-btn,
.oh-input,
.oh-select,
.oh-card,
.oh-auth-card,
.oh-alert {
  border-radius: var(--radius);
}

/* ---- Auth ---- */
.oh-auth {
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem;
}
.oh-auth-card {
  background: var(--c-surface);
  width: 100%;
  max-width: 450px;
  padding: 2.5rem;
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-card);
}
.oh-auth-logo {
  display: block;
  max-width: 230px;
  width: 100%;
  height: auto;
  margin: 0 auto 1.5rem;
}
.oh-auth-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 0.25rem;
}
.oh-auth-card__subtitle {
  text-align: center;
  margin: 0 0 1.5rem;
  color: var(--c-text-muted);
}
.oh-auth-brand__name {
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--c-brand);
}

/* ---- Forms ---- */
.oh-form-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.oh-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.oh-label {
  font-size: 0.85rem;
  font-weight: 600;
}
.oh-input {
  width: 100%;
  padding: var(--pad-control);
  font: inherit;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  outline: none;
}
.oh-input::placeholder {
  color: var(--c-placeholder);
}
.oh-input:focus {
  outline: var(--focus);
  outline-offset: -1px;
}
.oh-password-input-container {
  position: relative;
  display: flex;
  align-items: center;
}
.oh-password-input-container .oh-input {
  padding-right: 3.5rem;
}
.oh-password-toggle {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Buttons ---- */
.oh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--pad-control);
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  color: #44484f;
  background: var(--c-border-light);
  transition: background 0.12s ease;
}
.oh-btn--secondary {
  background: var(--c-accent);
  color: #fff;
}
.oh-btn--secondary:hover {
  background: var(--c-accent-dark);
}
.oh-btn--shadow {
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.1));
}
.w-100 {
  width: 100%;
}

/* ---- Alerts ---- */
.oh-alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  border: 1px solid transparent;
}
.oh-alert--warning {
  background: #fff8e1;
  border-color: #fcefc6;
  color: #8a6d1b;
}
.oh-alert--info {
  background: #ebf3fd;
  border-color: #c7d8f5;
  color: #1d4ed8;
}
.oh-alert--danger {
  background: #fdebeb;
  border-color: #f7cbce;
  color: #b3261e;
}
.oh-alert--success {
  background: #e1fbe9;
  border-color: #cbefd3;
  color: #1f7a44;
}

/* ---- Selects ---- */
.oh-select {
  width: 100%;
  padding: var(--pad-control);
  font: inherit;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  outline: none;
}
.oh-select:focus {
  outline: var(--focus);
  outline-offset: -1px;
}

/* ---- Tables ---- */
.oh-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
}
.oh-table th,
.oh-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--c-border-light);
  font-size: 0.8rem;
  vertical-align: middle;
}
.oh-table th {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: #5e5e5e;
  background: #fafafa;
}
.oh-table tr:last-child td {
  border-bottom: none;
}
.oh-col-action {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

/* ---- Inline / stacked forms ---- */
.oh-stack > * + * {
  margin-top: 1.15rem;
}
.oh-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.oh-section-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.oh-form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  padding: 1rem;
  background: #fafafa;
  border: 1px solid var(--c-border-light);
}
.oh-form-inline .oh-input-group {
  gap: 0.35rem;
}
.oh-grow {
  flex: 1 1 180px;
}
.oh-input--code {
  max-width: 7rem;
  text-transform: uppercase;
}
.oh-page-header--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.oh-form-card {
  max-width: 520px;
}
.oh-form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.oh-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.oh-muted {
  color: var(--c-text-muted);
  font-size: 0.8rem;
}
.oh-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.oh-details {
  border: 1px solid var(--c-border-light);
  padding: 0.6rem 0.85rem;
}
.oh-details > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--c-text-muted);
}
.oh-details[open] > summary {
  margin-bottom: 0.85rem;
  color: var(--c-text);
}
.oh-details .oh-row-2 + .oh-row-2 {
  margin-top: 0.85rem;
}
.oh-badge--muted {
  background: #eee;
  color: #666;
}
.oh-badge--success {
  background: #e1fbe9;
  color: #1f7a44;
}

/* ---- Worker thumbnails & enrollment capture ---- */
.oh-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%; /* the one place corners are round, per the design DNA */
  object-fit: cover;
  display: inline-block;
  background: #e8ecf1;
}
.oh-form-card--wide {
  max-width: 720px;
}
.oh-webcam-wrap {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.oh-webcam,
.oh-shot {
  width: 280px;
  height: 210px;
  border: 1px solid var(--c-border);
  object-fit: cover;
  background: #000;
}
.oh-shot {
  background: #f0f0f0;
}
.oh-capture-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

/* ---- Station management: key display ---- */
.oh-keybox {
  background: #1f1f1f;
  color: #fff;
  padding: 1rem;
  font-family: "Courier New", monospace;
  font-size: 1rem;
  word-break: break-all;
  white-space: pre-wrap;
  border: 1px solid var(--c-border);
  margin: 0.35rem 0 1rem;
}

/* ---- Kiosk capture screen (standalone, dark) ---- */
.oh-kiosk {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-brand);
  color: #fff;
}
.oh-kiosk__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}
.oh-kiosk__site {
  font-size: 1.25rem;
  font-weight: 600;
}
.oh-kiosk__station {
  font-size: 0.8rem;
  color: #cfd2d6;
}
.oh-kiosk__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem;
}
.oh-kiosk__video {
  width: min(640px, 90vw);
  max-height: 58vh;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: scaleX(-1); /* mirror for a natural selfie view (capture is unmirrored) */
}
.oh-kiosk .oh-muted {
  color: #cfd2d6;
}
.oh-scan-btn {
  font-size: 1.15rem;
  padding: 1rem 3rem;
}
.oh-result {
  width: min(640px, 90vw);
  min-height: 2.5rem;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  text-align: center;
  border: 1px solid transparent;
}
.oh-result--idle {
  background: rgba(255, 255, 255, 0.06);
  color: #cfd2d6;
}
.oh-result--in {
  background: #e1fbe9;
  color: #1f7a44;
}
.oh-result--out {
  background: #ebf3fd;
  color: #1d4ed8;
}
.oh-result--warn {
  background: #fff8e1;
  color: #8a6d1b;
}
.oh-result--error {
  background: #fdebeb;
  color: #b3261e;
}

/* ---- Login geofence banner (PM / Supervisor) ---- */
.oh-geo-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  border: 1px solid transparent;
}
.oh-geo-banner__icon { font-size: 18px; }
.oh-geo-banner--checking { background: #f1f3f6; color: var(--c-text-muted); }
.oh-geo-banner--inside { background: #e1fbe9; border-color: #cbefd3; color: #1f7a44; }
.oh-geo-banner--outside { background: #fdebeb; border-color: #f7cbce; color: #b3261e; font-weight: 600; }
.oh-geo-banner--warn { background: #fff8e1; border-color: #fcefc6; color: #8a6d1b; }

/* ---- App shell ---- */
.oh-wrapper {
  display: flex;
  min-height: 100vh;
}
.oh-sidebar {
  flex: 0 0 230px;
  width: 230px;
  background: var(--c-brand);
  color: #fff;
  align-self: flex-start;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.oh-sidebar__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}
.oh-sidebar__logo {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.15rem;
  overflow: hidden;
}
.oh-sidebar__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}
.oh-sidebar__company {
  font-weight: 600;
  letter-spacing: 0.04em;
}
.oh-sidebar__menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.75rem 0.5rem;
}
.oh-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  margin: 0 0.25rem;
  color: #cfd2d6;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.8rem;
}
.oh-sidebar__link .material-icons {
  font-size: 18px;
}
.oh-sidebar__link:hover {
  opacity: 0.85;
}
.oh-sidebar__link--active {
  background: var(--c-brand-light);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--c-accent);
}
.oh-sidebar__link--disabled {
  opacity: 0.4;
  cursor: default;
}
.oh-sidebar__soon {
  margin-left: auto;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.oh-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.oh-topbar {
  height: 56px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 5;
}
.oh-topbar__title {
  font-weight: 600;
}
.oh-topbar__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.oh-topbar__name {
  font-size: 0.8rem;
  color: var(--c-text-muted);
}
.oh-topbar__logout {
  margin: 0;
}
.oh-content {
  padding: 1.5rem;
}

/* ---- Page header & cards ---- */
.oh-page-header {
  margin-bottom: 1.25rem;
}
.oh-page-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.oh-page-subtitle {
  margin: 0;
  color: var(--c-text-muted);
}
.oh-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.oh-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 1.15rem;
}
.oh-card__label {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.oh-card__value {
  font-size: 1.6rem;
  font-weight: 600;
  margin-top: 0.25rem;
}
.oh-card__note {
  font-size: 0.65rem;
  color: var(--c-placeholder);
  text-transform: uppercase;
}
.oh-card__of {
  font-size: 1rem;
  font-weight: 400;
  color: var(--c-text-muted);
}
.oh-dash-filter {
  margin: 0;
}
.oh-dash-filter .oh-select {
  min-width: 200px;
}
.oh-loc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.oh-loc-bar__label {
  font-size: 0.78rem;
  color: var(--c-text-muted);
}
.oh-loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--c-accent);
  background: #eef3fa;
  border: 1px solid #cfe0f7;
  padding: 0.25rem 0.55rem;
}
.oh-loc-chip .material-icons {
  font-size: 14px;
}
.oh-note-card {
  color: var(--c-text-muted);
}
.oh-card--link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.oh-card--link:hover {
  box-shadow: var(--shadow-card);
}

/* ---- Dashboard charts ---- */
.oh-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.oh-chart-box {
  position: relative;
  height: 240px;
  margin-top: 0.5rem;
}
.oh-chart-headline {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}
.oh-chart-big {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1;
  color: var(--c-text);
}
.oh-chart-sub {
  font-size: 0.75rem;
  color: var(--c-text-muted);
}
.oh-trend {
  font-weight: 600;
}
.oh-trend--up {
  color: var(--c-success);
}
.oh-trend--down {
  color: var(--c-danger);
}

/* ---- Hierarchy rollup ---- */
.oh-table .num {
  text-align: right;
  white-space: nowrap;
}
.oh-rollup-branch {
  cursor: pointer;
  background: #fafafa;
  font-weight: 600;
}
.oh-rollup-branch:hover {
  background: #f0f0f0;
}
.oh-caret {
  display: inline-block;
  font-size: 0.6rem;
  transition: transform 0.12s ease;
  color: var(--c-text-muted);
}
.oh-rollup-branch.collapsed .oh-caret {
  transform: rotate(-90deg);
}
.oh-rollup-sitename {
  padding-left: 1.7rem;
}
.oh-num-warn {
  color: #8a6d1b;
  font-weight: 600;
}
.oh-num-danger {
  color: #b3261e;
  font-weight: 600;
}

/* ---- Hierarchy rollup — visual site tiles ---- */
.oh-hier {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.oh-hier__branch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #fafafa;
  border: 1px solid var(--c-border-light);
  border-left: 3px solid var(--c-accent);
  cursor: pointer;
  user-select: none;
}
.oh-hier__branch:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
.oh-hier__branch-name {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.oh-hier__branch-tot {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  text-align: right;
}
.oh-hier__branch-tot strong {
  color: var(--c-text);
  font-size: 0.95rem;
}
.oh-hier__in {
  color: var(--c-success);
  font-weight: 600;
}
.oh-hier__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
  margin-top: 0.6rem;
}
.oh-hier__block.collapsed .oh-hier__grid {
  display: none;
}
.oh-hier__block.collapsed .oh-caret {
  transform: rotate(-90deg);
}
.oh-hier__tile {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 0.7rem 0.8rem 0.85rem;
  overflow: hidden;
  transition: box-shadow 0.12s ease;
}
.oh-hier__tile:hover {
  box-shadow: var(--shadow-card);
}
.oh-hier__site {
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.25;
}
.oh-hier__code {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-placeholder);
  margin-bottom: 0.4rem;
}
.oh-hier__num {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
}
.oh-hier__num-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
}
.oh-hier__present {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  color: var(--c-text-muted);
}
.oh-hier__present.is-in {
  color: var(--c-success);
  font-weight: 600;
}
.oh-hier__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}
.oh-hier__chip {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
}
.oh-hier__chip--ot {
  background: #fff8e1;
  color: #8a6d1b;
}
.oh-hier__chip--flag {
  background: #fdebeb;
  color: #b3261e;
}
.oh-hier__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--c-border-light);
}
.oh-hier__bar-fill {
  display: block;
  height: 100%;
  background: var(--c-accent);
}

/* ---- Dashboard: branch boxes (Level 1) ----
   Glanceable category boxes; the whole box is the toggle that reveals its
   site tiles below. Flat oh- DNA: sharp corners, left accent rail, one big
   tabular headcount as the hero, everything else quiet. */
.oh-dash-branches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  align-items: start;
}
.oh-dash-branch {
  display: contents; /* let each box flow in the grid; its sites panel spans full width */
}
.oh-dash-box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 100%;
  min-height: 44px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-accent);
  padding: 0.85rem 1rem 0.95rem;
  transition: box-shadow 0.12s ease;
}
.oh-dash-box:hover {
  box-shadow: var(--shadow-card);
}
.oh-dash-box:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
.oh-dash-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.oh-dash-box__name {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text);
}
.oh-dash-box__caret {
  font-size: 0.7rem;
  color: var(--c-text-muted);
  transition: transform 0.15s ease;
}
.oh-dash-branch.is-open .oh-dash-box__caret {
  transform: rotate(90deg);
}
.oh-dash-box__count {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  margin-top: 0.2rem;
}
.oh-dash-box__count-unit {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.oh-dash-box__sub {
  font-size: 0.75rem;
  color: var(--c-text-muted);
}
.oh-dash-box__sub strong {
  color: var(--c-success);
}
.oh-dash-box__chip {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  background: #fdebeb;
  color: #b3261e;
}
/* Site tiles panel — spans the full grid row, hidden until its box is open. */
.oh-dash-sites {
  display: none;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
  margin: 0 0 0.4rem;
  padding: 0.8rem;
  background: #fafafa;
  border: 1px solid var(--c-border-light);
  border-left: 3px solid var(--c-accent);
}
.oh-dash-branch.is-open .oh-dash-sites {
  display: grid;
}
/* The site tile is a link (drill into the single-site page). */
a.oh-dash-tile {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ---- Dashboard: single-site page (Level 3) ---- */
.oh-dash-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-accent);
  text-decoration: none;
  margin-bottom: 0.85rem;
  min-height: 44px;
}
.oh-dash-back .material-icons {
  font-size: 18px;
}
.oh-dash-back:hover {
  text-decoration: underline;
}
.oh-dash-sitehead {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-accent);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.oh-dash-sitehead__name {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.oh-dash-sitehead__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--c-text-muted);
}
.oh-dash-sitehead__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.oh-dash-sitehead__meta .material-icons {
  font-size: 15px;
  color: var(--c-icon);
}
.oh-dash-sitehead__code {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-accent);
}
.oh-dash-sitehead__sep {
  color: var(--c-border);
}
.oh-dash-stat__bar {
  height: 4px;
  background: var(--c-border-light);
  margin-top: 0.5rem;
}
.oh-dash-stat__bar > span {
  display: block;
  height: 100%;
  background: var(--c-accent);
}

/* ---- Reports ---- */
.oh-req-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.oh-req-actions form {
  margin: 0;
}
.oh-tabs-switch {
  display: flex;
  gap: 0.5rem;
}
.oh-badge--info {
  background: #ebf3fd;
  color: #1d4ed8;
}
.oh-ot-pending {
  color: #b3261e; /* red until approved */
  font-weight: 600;
}
.oh-ot-approved {
  color: #1f7a44; /* green once approved */
  font-weight: 600;
}
.oh-report-site {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--c-table-text, #5e5e5e);
  margin: 0.25rem 0 0.4rem;
}

/* ---- Badges & small buttons ---- */
.oh-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
}
.oh-badge--secondary {
  background: var(--c-accent);
  color: #fff;
}
.oh-btn--small {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}
.oh-btn--success {
  background: var(--c-success);
  color: #fff;
}
.oh-btn--success:hover {
  background: #1fad61;
}
.oh-btn--danger {
  background: var(--c-danger);
  color: #fff;
}
.oh-btn--danger:hover {
  background: #ce3330;
}
.oh-badge--warning {
  background: #fff8e1;
  color: #8a6d1b;
}
.oh-badge--danger {
  background: #fdebeb;
  color: #b3261e;
}

/* ---- Overtime queue ---- */
.oh-input--xs {
  width: 5rem;
  padding: 0.35rem 0.5rem;
}
.oh-input--time {
  width: 7rem;
  padding: 0.35rem 0.5rem;
}
/* Inline attendance form spans the row's cells. */
tr > .oh-att-row {
  display: contents;
}
.oh-ot-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
}
.oh-filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.oh-filter-tab {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: capitalize;
}
.oh-filter-tab--active {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}

/* ---- Scan page refinements (kiosk face-capture) ---- */
.oh-scan-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.oh-scan-controls__label {
  font-size: 0.8rem;
  color: #cfd2d6;
  white-space: nowrap;
}
.oh-scan-controls__select {
  min-width: 220px;
  max-width: 320px;
}
.oh-scan-controls__done {
  white-space: nowrap;
}

/* Centered stage area — video + result + button stacked */
.oh-scan-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 600px;
}

/* 4:3 aspect-ratio frame around the video */
.oh-scan-stage__video-frame {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 4 / 3;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}
.oh-scan-stage__video-frame .oh-kiosk__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  max-height: none;
}

/* Result banner matches video width */
.oh-scan-stage .oh-result {
  width: 100%;
  font-size: 1.05rem;
  padding: 1rem 1.5rem;
  line-height: 1.45;
}

/* Big tappable scan button */
.oh-scan-stage .oh-scan-btn {
  width: 100%;
  max-width: 320px;
  min-height: 48px;
  font-size: 1.15rem;
  padding: 0.85rem 2rem;
  letter-spacing: 0.02em;
}

/* Subtle helper notes */
.oh-scan-stage__notes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.4rem;
}
.oh-scan-stage__notes .oh-muted {
  font-size: 0.75rem;
  text-align: center;
}

/* Empty state (no sites) */
.oh-scan-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
  max-width: 500px;
}
.oh-scan-empty .oh-result {
  font-size: 1rem;
  padding: 1.25rem 1.5rem;
}

/* Log Attendance: scan stage + "logged today" side panel */
.oh-scan-split {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 1000px;
  flex-wrap: wrap;
}
.oh-scan-log {
  flex: 1 1 280px;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  align-self: stretch;
}
.oh-scan-log__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.oh-scan-log__count {
  font-size: 0.8rem;
  background: var(--c-accent);
  color: #fff;
  padding: 0.05rem 0.5rem;
}
.oh-scan-log__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 58vh;
  overflow-y: auto;
}
.oh-scan-log__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.oh-scan-log__badge {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
}
.oh-scan-log__badge--in {
  background: #e1fbe9;
  color: #1f7a44;
}
.oh-scan-log__badge--out {
  background: #ebf3fd;
  color: #1d4ed8;
}
.oh-scan-log__who {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.oh-scan-log__name {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oh-scan-log__sub {
  font-size: 0.66rem;
  color: #cfd2d6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oh-scan-log__time {
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: #cfd2d6;
}
.oh-scan-log .oh-muted {
  padding: 1rem;
  color: #cfd2d6;
}

/* Responsive: stack header controls on narrow screens */
@media (max-width: 640px) {
  .oh-kiosk__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
  }
  .oh-scan-controls {
    flex-wrap: wrap;
    width: 100%;
    gap: 0.5rem;
  }
  .oh-scan-controls__select {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }
  .oh-scan-controls__done {
    margin-left: auto;
  }
  .oh-kiosk__main {
    padding: 1.25rem 1rem;
  }
  .oh-scan-stage .oh-scan-btn {
    max-width: none;
    width: 100%;
  }
}
