/* NALQIVO ERP — attendance workspace design layer.
   Scoped under .att-page so no other module changes. Presentation only:
   every number, permission and route still comes from the server and views. */

.att-page {
  --att-navy: #0b1f4b;
  --att-navy-2: #123c82;
  --att-hero-line: rgba(255, 255, 255, 0.16);
  --att-hero-muted: rgba(236, 244, 255, 0.72);
  position: relative;
  isolation: isolate;
}
/* Author display rules (e.g. .att-field) must not defeat the hidden attribute. */
.att-page [hidden] { display: none !important; }
.att-page::before {
  content: "";
  position: absolute;
  /* -24px spilled past the 20px desktop page gutter (4px horizontal scroll); 12px fits every gutter (12/14/20px). */
  inset: -18px -12px auto;
  height: 280px;
  z-index: -1;
  border-radius: 0 0 40px 40px;
  background:
    radial-gradient(520px 200px at 82% 0%, rgba(108, 76, 241, 0.09), transparent 70%),
    radial-gradient(420px 180px at 10% 0%, rgba(10, 155, 125, 0.06), transparent 70%);
  pointer-events: none;
}
.att-page .page-head { margin-bottom: 18px; }
.att-page .page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 9px;
}
.att-page .page-head h1 { font-weight: 800; letter-spacing: -0.5px; }
.att-page .page-sub { color: var(--muted); font-size: 12.8px; }

/* ---------- shared surfaces ---------- */
.att-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.att-panel + .att-panel { margin-top: 16px; }
.att-panel-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 19px 13px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), #fff);
}
.att-panel-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand);
  border: 1px solid var(--brand-100);
}
.att-panel-title { min-width: 0; flex: 1; display: grid; gap: 1px; }
.att-panel-title b { font-size: 13.5px; color: var(--ink); line-height: 1.4; }
.att-panel-title span { font-size: 11.2px; color: var(--muted); line-height: 1.45; }
.att-panel-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.att-panel-body { padding: 16px 19px 19px; }
.att-panel-body.flush { padding: 0; }

.att-toolbar {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fff, var(--surface-2));
  box-shadow: var(--shadow-xs);
  padding: 13px 15px;
}
.att-toolbar-row { display: flex; align-items: end; gap: 9px; flex-wrap: wrap; }
.att-toolbar .att-field { min-width: 112px; }
.att-toolbar .input, .att-toolbar .select { background: #fff; }
.att-toolbar-note { color: var(--muted-2); font-size: 11px; margin-top: 8px; }
.att-toolbar-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.att-divider { width: 1px; height: 28px; background: var(--line); margin: 0 2px; }

.att-field { display: grid; gap: 5px; min-width: 0; }
.att-field > span {
  font-size: 10.6px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.15px;
  padding-inline-start: 2px;
}
.att-field.full { grid-column: 1 / -1; }
.att-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 640px; }
.att-form-grid .full { grid-column: 1 / -1; }
.att-form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; grid-column: 1 / -1; padding-top: 2px; }

/* ---------- KPI cards ---------- */
.att-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 11px;
}
.att-kpi {
  --kpi-bg: var(--brand-50);
  --kpi-fg: var(--brand);
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 88px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff, #fcfdff);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.att-kpi::after {
  content: "";
  position: absolute;
  inset: auto -22px -30px auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--kpi-bg);
  opacity: 0.7;
}
.att-kpi-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--kpi-bg);
  color: var(--kpi-fg);
}
.att-kpi-copy { position: relative; z-index: 1; min-width: 0; display: grid; gap: 2px; }
.att-kpi-label { font-size: 10.6px; color: var(--muted); font-weight: 650; line-height: 1.35; }
.att-kpi-value {
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  color: #102641;
  font-variant-numeric: tabular-nums;
}
.att-kpi-note { font-size: 10px; color: var(--muted-2); }
.att-kpi.tone-blue { --kpi-bg: var(--brand-50); --kpi-fg: var(--brand); }
.att-kpi.tone-green { --kpi-bg: var(--green-soft); --kpi-fg: var(--green); }
.att-kpi.tone-red { --kpi-bg: var(--red-soft); --kpi-fg: var(--red); }
.att-kpi.tone-amber { --kpi-bg: var(--amber-soft); --kpi-fg: var(--amber); }
.att-kpi.tone-purple { --kpi-bg: var(--purple-soft); --kpi-fg: var(--purple); }
.att-kpi.tone-slate { --kpi-bg: var(--slate-soft); --kpi-fg: var(--slate); }

/* tone-aware badges used by attendance status tables */
.att-page .badge.tone-blue { background: var(--brand-50); color: var(--brand-2); }
.att-page .badge.tone-green { background: var(--green-soft); color: #077a63; }
.att-page .badge.tone-red { background: var(--red-soft); color: #b32e3d; }
.att-page .badge.tone-amber { background: var(--amber-soft); color: #9c6407; }
.att-page .badge.tone-purple { background: var(--purple-soft); color: #5537c9; }
.att-page .badge.tone-gray, .att-page .badge.tone-slate { background: var(--slate-soft); color: #4b5c72; }

/* ---------- tables inside attendance ---------- */
.att-page .table th {
  background: #f8fafd;
  color: var(--muted);
  font-size: 10.6px;
  font-weight: 750;
  letter-spacing: 0.15px;
  white-space: nowrap;
}
.att-page .table td { font-variant-numeric: tabular-nums; }
.att-page .table tbody tr:hover { background: var(--surface-2); }
.att-page .table .badge { white-space: nowrap; }
.att-range-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

/* ---------- punch ---------- */
.att-punch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 18px;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}
.att-punch-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px 24px 22px;
  color: #fff;
  background:
    radial-gradient(620px 300px at 88% -8%, rgba(64, 146, 255, 0.5), transparent 68%),
    radial-gradient(460px 260px at 0% 110%, rgba(10, 155, 125, 0.22), transparent 70%),
    linear-gradient(152deg, #0a1a3a 0%, #0d2b60 52%, #11458f 100%);
  box-shadow: 0 30px 70px -34px rgba(11, 31, 75, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.att-punch-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(80% 70% at 50% 30%, #000, transparent 78%);
  pointer-events: none;
}
.att-punch-hero > * { position: relative; z-index: 1; }
.att-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.att-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.att-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.att-identity-copy { display: grid; gap: 1px; min-width: 0; }
.att-identity-copy b { font-size: 15px; font-weight: 750; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-identity-copy span { font-size: 11px; color: var(--att-hero-muted); font-variant-numeric: tabular-nums; }
.att-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--att-hero-line);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  white-space: nowrap;
}
.att-hero-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08); }
.att-hero-status.tone-green { color: #8ff0d6; background: rgba(10, 155, 125, 0.2); border-color: rgba(96, 232, 199, 0.32); }
.att-hero-status.tone-amber { color: #ffdf9b; background: rgba(207, 133, 8, 0.18); border-color: rgba(255, 208, 112, 0.3); }
.att-hero-status.tone-slate { color: #d7e3f4; }

.att-clock-ring {
  width: min(292px, 68vw);
  aspect-ratio: 1;
  margin: 18px auto 16px;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from -90deg, rgba(255, 255, 255, 0.92) 0 var(--att-progress, 0%), rgba(255, 255, 255, 0.14) var(--att-progress, 0%) 100%);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.55);
}
.att-clock-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.13), transparent 58%),
    linear-gradient(165deg, #0b2350, #0a1a3a);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 54px rgba(0, 0, 0, 0.34);
}
.att-clock {
  font-size: clamp(40px, 5.2vw, 54px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.32);
}
.att-clock-meta { font-size: 10.2px; color: var(--att-hero-muted); }
.att-clock-meta .ltr { font-variant-numeric: tabular-nums; }
.att-clock-shift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--att-hero-muted);
}
.att-clock-shift .ltr { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.att-clock-shift .badge { background: rgba(255, 255, 255, 0.12); color: #eaf2ff; border-color: transparent; }

.att-time-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.att-time-tile {
  display: grid;
  gap: 2px;
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
}
.att-time-tile span { justify-self: start; font-size: 10px; color: var(--att-hero-muted); font-weight: 650; }
.att-time-tile b { justify-self: start; font-size: 19px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.25; }
.att-time-tile.in { border-inline-start: 3px solid #4ad3b2; }
.att-time-tile.out { border-inline-start: 3px solid #ffb35c; }

.att-hero-note {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e8f1ff;
  font-size: 11.5px;
  line-height: 1.6;
}
.att-hero-note.warn {
  background: rgba(207, 133, 8, 0.18);
  border-color: rgba(255, 205, 108, 0.38);
  color: #ffe6b8;
}
.att-punch-hero .note-callout {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
  color: #eaf2ff;
  font-size: 11.5px;
}
.att-punch-hero .muted, .att-punch-hero .muted.small { color: var(--att-hero-muted) !important; }
.att-punch-hero .badge { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.12); color: #eef5ff; }
.att-punch-hero .badge b { color: #fff; }

.att-punch-action { display: grid; gap: 9px; margin-top: 14px; }
.att-punch-btn {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.2px;
  color: #0b3a86;
  background: linear-gradient(180deg, #ffffff, #e8f1ff);
  box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.55), inset 0 1px 0 #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.att-punch-btn:hover { filter: brightness(1.03); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.6), inset 0 1px 0 #fff; }
.att-punch-btn:active { transform: translateY(1px); }
.att-punch-btn:disabled { opacity: 0.65; cursor: wait; }
.att-punch-btn.out { color: #7d1d2c; background: linear-gradient(180deg, #ffeef0, #ffcdd4); }
.att-punch-btn svg { flex: 0 0 auto; }
.att-punch-msg { min-height: 17px; text-align: center; font-size: 11.5px; color: var(--att-hero-muted); }
.att-punch-msg:empty { display: none; }

/* location-permission gate inside the punch card */
.att-geo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px 11px;
  align-items: start;
  padding: 11px 12px;
  border-radius: 13px;
  border: 1px solid rgba(255, 205, 108, 0.36);
  background: rgba(207, 133, 8, 0.16);
}
.att-geo-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffe6b8;
}
.att-geo-copy { display: grid; gap: 3px; min-width: 0; }
.att-geo-copy b { font-size: 12.5px; font-weight: 750; color: #fff; }
.att-geo-copy span { font-size: 11px; line-height: 1.55; color: #ffe6b8; }
.att-geo-copy .att-geo-hint { color: #fff; opacity: 0.86; }
.att-geo-steps {
  margin: 3px 0 0;
  padding-inline-start: 17px;
  display: none;
  gap: 3px;
  font-size: 11px;
  line-height: 1.55;
  color: #ffe6b8;
}
.att-geo.steps-open .att-geo-steps { display: grid; }
.att-geo-steps li { padding-inline-start: 1px; }
.att-geo-steps ::marker { color: #fff; font-weight: 700; }
.att-geo.is-denied .att-geo-steps { color: #ffe1e1; }
/* The step-by-step browser guide is collapsed behind "How?" on every screen so
   the punch button stays above the fold; the short hint above it always shows. */
.att-geo [data-geo-help] { display: inline-flex; }
.att-geo-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; }
.att-geo-actions .btn { min-height: 36px; font-size: 12px; }
.att-geo-actions [data-allow-location] {
  background: #fff;
  border-color: transparent;
  color: #0b3a86;
  font-weight: 750;
  box-shadow: 0 8px 20px -12px rgba(0, 0, 0, 0.6);
}
.att-geo-actions [data-allow-location]:hover { background: #eef5ff; }
.att-geo-actions .btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
}
.att-geo-actions .btn.ghost:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.att-geo.is-granted { border-color: rgba(96, 232, 199, 0.36); background: rgba(10, 155, 125, 0.16); }
.att-geo.is-granted .att-geo-icon { color: #8ff0d6; }
.att-geo.is-granted .att-geo-copy span { color: #a9efdd; }
.att-geo.is-denied { border-color: rgba(255, 150, 150, 0.4); background: rgba(176, 32, 48, 0.2); }
.att-geo.is-denied .att-geo-icon { color: #ffc9c9; }
.att-geo.is-denied .att-geo-copy span { color: #ffd4d4; }
.att-punch-hero [data-qr-block] {
  padding: 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.att-punch-hero [data-qr-block] .muted { color: var(--att-hero-muted) !important; }
.att-punch-hero [data-qr-block] .input { background: #fff; color: var(--ink); }
.att-punch-hero [data-qr-block] .btn { background: #fff; color: var(--ink); border-color: transparent; }
.att-punch-hero [data-qr-block] video { border: 1px solid rgba(255, 255, 255, 0.2); }
.att-punch-hero [data-punch-pin] {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.att-punch-hero [data-punch-pin]::placeholder { color: rgba(255, 255, 255, 0.55); }

.att-punch-side { display: grid; gap: 14px; }
.att-punch-side .att-panel { margin-top: 0; }
.att-punch-side .att-panel-head { padding: 13px 15px 11px; }
.att-punch-side .att-panel-body { padding: 13px 15px 15px; display: grid; gap: 10px; }
.att-side-rows { display: grid; gap: 1px; }
.att-side-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 33px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 11.5px;
}
.att-side-row:last-child { border-bottom: 0; }
.att-side-row > span { color: var(--muted); }
.att-side-row > b, .att-side-row > a { color: var(--ink-2); font-weight: 700; }
.att-device-list { display: grid; gap: 7px; }
.att-device {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.att-device-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand);
}
.att-device-copy { min-width: 0; flex: 1; display: grid; gap: 0; }
.att-device-copy b { font-size: 11.5px; color: var(--ink-2); }
.att-device-copy span { font-size: 10px; color: var(--muted-2); }
.att-device.pending { border-color: #f0dcb4; background: #fffaf0; }
.att-device.pending .att-device-icon { background: var(--amber-soft); color: var(--amber); }
.att-block-btn { width: 100%; justify-content: center; min-height: 38px; }
.att-punch-side-links { display: grid; gap: 5px; }
.att-punch-side [data-dc] { margin-top: 2px; }
.att-punch-side [data-dc] > summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 650;
  padding: 7px 0 2px;
}
.att-punch-side [data-dc] textarea { min-height: 62px; resize: vertical; }

/* ---------- kiosk ---------- */
.att-kiosk { max-width: 620px; margin: 0 auto; }
.att-kiosk-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(520px 280px at 84% -10%, rgba(64, 146, 255, 0.5), transparent 70%),
    linear-gradient(155deg, #0a1a3a, #0d2b60 58%, #11458f);
  box-shadow: 0 32px 74px -36px rgba(11, 31, 75, 0.75);
}
.att-kiosk-card > * { position: relative; z-index: 1; }
.att-kiosk-card .att-field > span { color: rgba(236, 244, 255, 0.72); }
.att-kiosk-card .select { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.att-kiosk-card .select option { color: var(--ink); }
.att-kiosk-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 10.5px;
  font-weight: 650;
  color: #dceaff;
}
.att-kiosk-live i { width: 7px; height: 7px; border-radius: 50%; background: #5ee3b9; box-shadow: 0 0 0 0 rgba(94, 227, 185, 0.5); animation: att-pulse 2.2s ease-out infinite; }
@keyframes att-pulse { 0% { box-shadow: 0 0 0 0 rgba(94, 227, 185, 0.45); } 70% { box-shadow: 0 0 0 9px rgba(94, 227, 185, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 227, 185, 0); } }
.att-qr-frame {
  position: relative;
  width: min(74vw, 330px);
  margin: 16px auto 12px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 50px -22px rgba(0, 0, 0, 0.6);
}
.att-qr-frame::after {
  content: "";
  position: absolute;
  inset-inline: 18px;
  top: 14px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(108, 76, 241, 0.65), transparent);
  animation: att-scan 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes att-scan { 0%, 100% { transform: translateY(0); opacity: 0.2; } 50% { transform: translateY(270px); opacity: 0.9; } }
.att-qr-frame svg { display: block; width: 100%; height: auto; }
.att-kiosk-code {
  font-family: var(--mono);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  letter-spacing: 5px;
  color: #fff;
  direction: ltr;
  line-height: 1.3;
}
.att-kiosk-exp { color: var(--att-hero-muted); font-size: 11.5px; margin-top: 2px; }
.att-kiosk-card .btn.ghost { color: #dceaff; border-color: rgba(255, 255, 255, 0.2); }
.att-kiosk-card .btn.ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.att-kiosk-card .loading-block { color: #dceaff; justify-content: center; }

/* ---------- dashboard ---------- */
.att-gate-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--surface-2));
  box-shadow: var(--shadow-xs);
}
.att-gate-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.att-gate-banner.is-on .att-gate-dot { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.att-gate-banner b { font-size: 12.5px; }
.att-gate-banner .muted { font-size: 11px; }

.att-trend { display: grid; gap: 6px; }
.att-trend-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.att-trend-row:last-child { border-bottom: 0; }
.att-trend-day { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.att-trend-bar {
  display: flex;
  height: 9px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surface-3);
}
.att-trend-bar i { display: block; height: 100%; }
.att-trend-bar .p { background: linear-gradient(90deg, var(--brand), var(--brand-300)); }
.att-trend-bar .l { background: #f0b23e; }
.att-trend-bar .a { background: #ec8b97; }
.att-trend-nums { display: flex; align-items: center; gap: 9px; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.att-trend-nums span { display: inline-flex; align-items: center; gap: 4px; }
.att-trend-nums i { width: 6px; height: 6px; border-radius: 50%; }
.att-trend-nums .p { background: var(--brand); }
.att-trend-nums .l { background: #f0b23e; }
.att-trend-nums .a { background: #ec8b97; }

.att-people-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.att-people-grid .att-panel + .att-panel { margin-top: 0; }
.att-people { display: grid; gap: 2px; }
.att-person {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.att-person:last-child { border-bottom: 0; }
.att-person-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--brand-50);
  color: var(--brand-2);
  font-size: 10px;
  font-weight: 800;
}
.att-person.amber .att-person-avatar { background: var(--amber-soft); color: var(--amber); }
.att-person.red .att-person-avatar { background: var(--red-soft); color: var(--red); }
.att-person-copy { min-width: 0; flex: 1; display: grid; gap: 0; }
.att-person-copy b { font-size: 11.8px; color: var(--ink-2); line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-person-copy span { font-size: 10px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.att-person-meta { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- requests ---------- */
.att-req-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 12px; align-items: start; }
.att-req-grid .att-panel + .att-panel { margin-top: 0; }
.att-subhead {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 16px 0 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  font-weight: 750;
  color: var(--ink-2);
}
.att-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.att-approval-list { display: grid; gap: 9px; }
.att-approval {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fcfdff);
}
.att-approval-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.att-approval-copy { min-width: 0; display: grid; gap: 3px; }
.att-approval-copy b { font-size: 12.5px; color: var(--ink); }
.att-approval-copy b .ltr { font-size: 10.5px; color: var(--muted-2); font-weight: 600; }
.att-approval-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); }
.att-approval-reason { grid-column: 1 / -1; font-size: 11px; color: var(--muted); padding-inline-start: 38px; }
.att-approval-actions { display: flex; gap: 6px; }
.att-inline-note { font-size: 10.5px; color: var(--muted-2); }
.att-check-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.att-check-row label { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; white-space: nowrap; }

/* ---------- settings ---------- */
.att-settings .card {
  border-radius: var(--radius);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}
.att-settings .card > .card-body > h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 800;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}
.att-settings .card > .card-body > h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-50);
  flex: 0 0 auto;
  margin-inline-start: 3px;
}
.att-settings hr { border: 0; border-top: 1px dashed var(--line); margin: 3px 0; }
.att-settings label { font-size: 12px; }
.att-settings .note-callout { font-size: 11.5px; }
.att-settings input[type="checkbox"], .att-settings input[type="radio"] { accent-color: var(--brand); width: 15px; height: 15px; flex: 0 0 auto; }
.att-settings .card > .card-body > label { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.att-settings .note-callout label { display: inline-flex; align-items: center; gap: 7px; }
.att-settings .card > .card-body > div { line-height: 1.65; }
.att-settings details > summary { cursor: pointer; color: var(--brand-2); font-weight: 650; padding: 3px 0; }

/* ---------- records ---------- */
.att-records .stat { border-radius: var(--radius-sm); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .att-punch-grid { grid-template-columns: 1fr; max-width: 660px; }
  .att-punch-side { gap: 12px; }
  .att-page::before { inset-inline: -12px; }
  .att-req-grid { grid-template-columns: 1fr; }
}
/* Tablets: one column but a shorter clock so the punch button stays in view,
   plus finger-sized gate actions. */
@media (min-width: 621px) and (max-width: 900px) {
  .att-punch-grid { max-width: 700px; }
  .att-punch-hero { padding: 18px 20px 20px; }
  .att-clock-ring { width: min(226px, 44vw); margin: 12px auto 12px; }
  .att-clock-inner { padding: 18px; }
  .att-clock { font-size: clamp(34px, 6vw, 44px); letter-spacing: 0.6px; }
  .att-punch-action { margin-top: 12px; }
  .att-geo-actions .btn { min-height: 42px; font-size: 12.5px; }
}
/* Short screens: keep the circular clock but scale it down so the punch button
   still fits in view. */
@media (min-width: 621px) and (max-height: 820px) {
  .att-punch-hero { padding: 14px 20px 12px; }
  .att-clock-ring { width: min(168px, 22vw); margin: 8px auto 10px; }
  .att-clock-inner { padding: 10px; }
  .att-clock { font-size: clamp(26px, 2.3vw, 30px); }
  .att-clock-meta { font-size: 9.2px; }
  .att-clock-shift { font-size: 10px; }
}
/* Compact tablets / short windows: keep the round clock, but put the in/out
   tiles beside it so the primary punch button still fits on the first screen. */
@media (min-width: 621px) and (max-width: 900px) and (max-height: 820px) {
  .att-punch-hero { display: grid; grid-template-columns: minmax(0, 168px) minmax(0, 1fr); align-items: center; gap: 0 16px; }
  .att-punch-hero > * { grid-column: 1 / -1; }
  .att-hero-top { grid-column: 1 / -1; }
  .att-clock-ring { grid-column: 1; grid-row: 2; width: 168px; margin: 6px 0 8px; }
  .att-time-tiles { grid-column: 2; grid-row: 2; grid-template-columns: 1fr; align-content: center; gap: 8px; margin: 6px 0 8px; }
  .att-time-tile { grid-auto-flow: column; justify-content: space-between; align-items: center; padding: 9px 14px; }
  .att-punch-action { grid-column: 1 / -1; margin-top: 2px; }
}
@media (max-width: 620px) {
  /* phone ergonomics: safe areas, 44px targets, 16px fields (no iOS zoom) */
  .att-page {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    -webkit-tap-highlight-color: rgba(108, 76, 241, 0.12);
  }
  .att-page button, .att-page a.btn, .att-page summary { touch-action: manipulation; }
  .att-page .page-head { margin-bottom: 8px; }
  .att-page .page-head h1 { font-size: 22px; }
  .att-page .page-sub { font-size: 11.5px; line-height: 1.55; }
  .att-page .btn { min-height: 44px; }
  .att-page .btn.sm { min-height: 42px; }
  .att-page .icon-action { min-width: 42px; min-height: 42px; }
  .att-page input:not([type="checkbox"]):not([type="radio"]), .att-page select, .att-page textarea { font-size: 16px; }
  .att-page .input, .att-page .select { min-height: 44px; }

  /* compact punch card: status + time strip + tiles stay above the fold */
  .att-punch-grid { gap: 12px; }
  .att-punch-hero { padding: 12px 13px 11px; border-radius: 18px; }
  .att-avatar { width: 38px; height: 38px; border-radius: 11px; font-size: 13px; }
  .att-hero-top { gap: 8px; }
  .att-identity-copy b { font-size: 13.5px; }
  .att-hero-status { min-height: 26px; padding: 3px 9px; font-size: 11px; }
  /* keep the circular clock, just smaller and tighter */
  .att-clock-ring { width: min(186px, 46vw); margin: 4px auto 6px; box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.55); }
  .att-clock-inner { gap: 2px; padding: 12px; }
  .att-clock { font-size: clamp(28px, 8.2vw, 34px); letter-spacing: 0.4px; }
  .att-clock-meta { font-size: 8.2px; line-height: 1.3; }
  .att-clock-shift { font-size: 9px; margin-top: 2px; gap: 4px; }
  .att-time-tiles { gap: 8px; }
  .att-time-tile { padding: 8px 11px; border-radius: 10px; }
  .att-time-tile span { font-size: 9.5px; }
  .att-time-tile b { font-size: 17px; }
  .att-hero-note { margin-top: 10px; font-size: 11px; }

  /* location card: compact, with a collapsible how-to */
  .att-geo { padding: 9px 11px; gap: 8px 10px; border-radius: 12px; }
  .att-geo-icon { width: 30px; height: 30px; border-radius: 9px; }
  .att-geo-copy { gap: 2px; }
  .att-geo-copy b { font-size: 12px; }
  .att-geo-copy span { font-size: 11.5px; }
  .att-geo-actions { gap: 8px; }
  .att-geo-actions .btn { flex: 1 1 auto; min-height: 44px; font-size: 12.5px; justify-content: center; }
  .att-geo-steps { font-size: 11.5px; line-height: 1.62; }

  .att-punch-action { gap: 10px; margin-top: 10px; }
  .att-punch-btn { min-height: 56px; border-radius: 14px; font-size: 18.5px; }
  .att-punch-msg { font-size: 11.5px; line-height: 1.6; }
  [data-punch-recheckin], [data-field-mode] { font-size: 11px; }
  .att-punch-side { gap: 10px; }
  .att-punch-side .att-panel-head { padding: 12px 13px 10px; }
  .att-punch-side .att-panel-body { padding: 12px 13px 14px; }
  .att-device { padding: 8px 0; }
  .att-block-btn { min-height: 44px; }
  .att-punch-side [data-dc] > summary { padding: 10px 0 4px; }

  /* forms, toolbars, approvals, settings */
  .att-form-grid { grid-template-columns: 1fr; }
  .att-grid-3 { grid-template-columns: 1fr; }
  .att-toolbar { padding: 11px 12px; border-radius: 14px; }
  .att-toolbar-row { gap: 8px; }
  .att-toolbar .att-field { flex: 1 1 140px; min-width: 0; }
  .att-toolbar-actions { width: 100%; margin-inline-start: 0; }
  .att-toolbar-actions .btn { flex: 1 1 auto; justify-content: center; }
  .att-approval { grid-template-columns: 1fr; padding: 11px 12px; }
  .att-approval-actions { justify-content: stretch; }
  .att-approval-actions .btn { flex: 1 1 auto; min-height: 42px; justify-content: center; }
  .att-approval-reason { padding-inline-start: 0; }
  .att-trend-row { grid-template-columns: 62px minmax(0, 1fr); }
  .att-trend-nums { grid-column: 2; justify-content: flex-start; }
  .att-panel-head { padding: 13px 14px 11px; }
  .att-panel-body { padding: 13px 14px 15px; }
  .att-kpi-grid { grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); gap: 9px; }
  .att-kpi { min-height: 82px; padding: 12px 13px; }
  .att-qr-frame::after { animation: none; display: none; }
  .att-page .table th, .att-page .table td { padding: 10px 9px; }
  .att-page .table-wrap { -webkit-overflow-scrolling: touch; }
  .att-settings .card > .card-body > label, .att-settings .note-callout label { min-height: 42px; }
  .att-settings input[type="checkbox"], .att-settings input[type="radio"] { width: 18px; height: 18px; }

  /* kiosk on a shared tablet/phone */
  .att-kiosk { max-width: none; }
  .att-kiosk-card { padding: 16px 14px; border-radius: 18px; }
  .att-qr-frame { width: min(78vw, 300px); padding: 10px; border-radius: 16px; }
  .att-kiosk-code { letter-spacing: 4px; }
}
/* Very short phones (iPhone SE class): shrink the clock a little more so the
   punch button still lands inside the first screen. */
@media (max-width: 620px) and (max-height: 760px) {
  .att-clock-ring { width: min(150px, 42vw); }
  .att-clock-inner { padding: 10px; }
  .att-clock { font-size: clamp(26px, 7.2vw, 30px); }
}
@media (prefers-reduced-motion: reduce) {
  .att-qr-frame::after, .att-kiosk-live i { animation: none; }
  .att-punch-btn { transition: none; }
}
.att-page .att-reports-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.att-page .att-late-strong { font-weight: 800; color: #9a3412; }
.att-page .att-dossier-list { margin: 0; padding-inline-start: 1.15rem; display: grid; gap: 6px; }
.att-page tr[data-day-late='1'] { background: rgba(234, 88, 12, 0.07); }
.att-page [data-pay-signs] { margin-top: 4px; line-height: 1.45; }

@media print {
  .att-page::before, .att-page .page-actions, .att-page .att-toolbar, .att-page .att-punch-side, .att-page .att-panel-actions { display: none !important; }
  .att-panel, .att-kpi, .att-gate-banner { box-shadow: none !important; }
  .att-kpi { break-inside: avoid; }
  .att-punch-hero { color: #111 !important; background: #fff !important; border: 1px solid #ccc; box-shadow: none; }
  .att-clock-ring { background: #eee; }
  .att-clock-inner { background: #fff; color: #111; }
  .att-clock, .att-identity-copy b, .att-time-tile b { color: #111 !important; }
}
