:root {
  color-scheme: light;
  --bg: #eef3f7;
  --surface: #ffffff;
  --surface-soft: #f7fafc;
  --ink: #111827;
  --muted: #6b7280;
  --line: #d9e2ea;
  --brand: #0f766e;
  --brand-strong: #0b5f59;
  --brand-soft: #e6f5f2;
  --accent: #b7791f;
  --accent-soft: #fff4db;
  --danger: #b42318;
  --danger-strong: #8f1c14;
  --danger-soft: #ffe7e4;
  --ok: #16794c;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(238, 243, 247, 0) 280px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.shell.wide {
  width: min(100%, 1240px);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-panel {
  width: min(100%, 440px);
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-identity {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.profile-section {
  margin-top: 18px;
}

.recovery-codes {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #101827;
  color: #f8fafc;
  font-family: Consolas, "Courier New", monospace;
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
  user-select: all;
}

.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(217, 226, 234, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.08;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.nav-card {
  min-height: 170px;
  display: grid;
  align-content: space-between;
  gap: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.nav-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: var(--shadow);
}

.nav-card span {
  font-size: 21px;
  font-weight: 900;
}

.nav-card strong {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.workbench,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.camera-panel,
.control-panel,
.result-panel,
.table-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.camera-panel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  min-height: 320px;
  background: #0b1418;
}

video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.camera-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  color: white;
  font-weight: 800;
}

.camera-overlay span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  background: rgba(17, 24, 39, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.control-panel,
.result-panel,
.table-panel {
  padding: 18px;
}

.control-panel {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--brand);
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  background: var(--surface-soft);
  color: var(--ink);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  background: #fff;
  border-color: rgba(15, 118, 110, 0.65);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

button,
.link-button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 11px 15px;
  background: var(--brand);
  color: white;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.18);
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

button:hover,
.link-button:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
}

button:active,
.link-button:active {
  transform: translateY(0);
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.disabled-link,
.disabled-link:hover {
  pointer-events: none;
  opacity: 0.48;
  background: #64748b;
  box-shadow: none;
  transform: none;
}

.attendance-result-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-filter {
  grid-template-columns: minmax(220px, 320px) auto;
  align-items: end;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.dashboard-metric {
  min-height: 104px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.dashboard-metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-metric strong {
  font-size: 32px;
  line-height: 1;
}

.dashboard-metric.ok { border-left: 5px solid var(--ok); }
.dashboard-metric.warn { border-left: 5px solid var(--accent); }
.dashboard-metric.bad { border-left: 5px solid var(--danger); }
.dashboard-metric.neutral { border-left: 5px solid #64748b; }

.status-pill.warn {
  background: var(--accent-soft);
  color: #8a5713;
}

.status-pill.neutral {
  background: #eef2f7;
  color: #475569;
}

.testing-toggle {
  padding: 11px 12px;
  border: 1px solid #e6a23c;
  border-radius: 8px;
  background: #fff8e7;
  color: #8a5713;
}

.settings-form,
#settingsGroups {
  display: grid;
  gap: 18px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.setting-field {
  min-width: 0;
}

.setting-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.boolean-setting {
  min-height: 70px;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.boolean-setting input {
  width: 20px;
  min-height: 20px;
}

.restart-badge,
.runtime-badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.restart-badge {
  background: var(--accent-soft);
  color: #8a5713;
}

.runtime-badge {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.settings-savebar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.security-alert {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #efb1aa;
  border-left: 5px solid var(--danger);
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger-strong);
}

.security-alert div {
  display: grid;
  gap: 5px;
}

.security-alert span {
  font-size: 14px;
  font-weight: 800;
}

.nav-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  margin-left: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 12px;
  line-height: 1;
  vertical-align: middle;
}

.nav-alert-badge[hidden] {
  display: none;
}

.backup-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.backup-summary > div {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 20px;
  background: var(--surface);
}

.backup-summary span,
.backup-note span,
.restore-dialog label > span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.backup-summary strong {
  overflow-wrap: anywhere;
  font-size: 1.15rem;
}

.backup-create-panel {
  margin-bottom: 20px;
}

.backup-note {
  display: grid;
  gap: 8px;
  padding: 0 20px 20px;
}

.backup-note-cell {
  max-width: 260px;
  white-space: normal;
}

.backup-kind {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 4px;
  background: #e8eef5;
  color: #29435f;
  font-size: 0.78rem;
  font-weight: 800;
}

.backup-kind-automatic { background: #e3f2e9; color: #17613b; }
.backup-kind-pre_restore { background: #fff0d5; color: #7a4b00; }
.backup-kind-invalid { background: #fbe4e4; color: #8a2424; }

.restore-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(18, 30, 46, 0.28);
}

.restore-dialog::backdrop { background: rgba(14, 24, 36, 0.62); }

.restore-dialog form {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.restore-dialog-head,
.dialog-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.restore-dialog h2 { margin: 4px 0 0; }
.restore-dialog p { margin: 0; line-height: 1.6; }
.restore-dialog label { display: grid; gap: 8px; }
.dialog-actions { justify-content: flex-end; }

.icon-close {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
}

@media (max-width: 720px) {
  .backup-summary { grid-template-columns: 1fr; }
  .backup-table { min-width: 900px; }
}

.registration-shell { max-width: 860px; }

.registration-form {
  display: grid;
  gap: 24px;
}

.registration-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.registration-fields label { display: grid; gap: 8px; }
.registration-photos { display: grid; gap: 14px; }
.registration-photos .panel-head { padding: 0; }

.file-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  border: 1px dashed #8aa0b5;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--brand-strong);
  font-weight: 800;
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photo-count {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.registration-previews {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.registration-previews figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.registration-previews img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.registration-previews figcaption {
  overflow: hidden;
  padding: 7px;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registration-state {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
}

.registration-state[hidden] { display: none; }
.registration-state.is-success { border-left-color: var(--ok); }
.registration-state h2 { margin: 0 0 6px; }
.registration-state p { margin: 0; color: var(--muted); }

.registration-state-icon {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #7a4b00;
  font-size: 1.2rem;
  font-weight: 900;
}

.is-success .registration-state-icon { background: #e3f2e9; color: var(--ok); }
.registration-pending { background: var(--accent-soft); color: #7a4b00; }
.registration-approved { background: #e3f2e9; color: var(--ok); }
.registration-rejected { background: var(--danger-soft); color: var(--danger); }

.reset-warning {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid #efb8b4;
  border-left: 6px solid var(--danger);
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger-strong);
}

.reset-warning span { font-size: 0.9rem; }

.reset-counts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.reset-counts > div {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: var(--surface);
}

.reset-counts span { color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.reset-counts strong { font-size: 1.2rem; }

.reset-preserved { padding: 18px 20px; }
.reset-preserved p { margin: 6px 0 0; color: var(--muted); }
.reset-form { margin-top: 18px; padding-bottom: 20px; }

.reset-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0 20px 18px;
}

.reset-form-fields label { display: grid; gap: 8px; }
.reset-form > button, .reset-form > .form-message { margin: 0 20px; }

@media (max-width: 720px) {
  .reset-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reset-form-fields { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .registration-fields { grid-template-columns: 1fr; }
  .registration-previews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.launch-verdict {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
}

.launch-verdict.is-ready { border-left-color: var(--ok); }
.launch-verdict.is-blocked { border-left-color: var(--danger); }
.launch-verdict h2 { margin: 4px 0 6px; }
.launch-verdict p { margin: 0; color: var(--muted); }

.launch-counts {
  display: flex;
  gap: 18px;
  white-space: nowrap;
}

.launch-counts span { color: var(--muted); font-size: 0.85rem; }
.launch-counts strong { display: block; color: var(--ink); font-size: 1.5rem; }

.launch-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.launch-metrics > div {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.launch-metrics span { color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.launch-metrics strong { font-size: 1.35rem; }
.muted-text { color: var(--muted); font-size: 0.85rem; }

.readiness-list { display: grid; }

.readiness-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  border-top: 1px solid var(--line);
}

.readiness-item h3,
.readiness-item p { margin: 0; }
.readiness-item h3 { font-size: 0.98rem; }
.readiness-item p { margin-top: 4px; color: var(--muted); font-size: 0.88rem; }
.readiness-item div > strong { display: block; margin-top: 7px; font-size: 0.84rem; }

.readiness-status {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  font-size: 1.15rem;
  font-weight: 900;
}

.readiness-pass .readiness-status { background: #e3f2e9; color: var(--ok); }
.readiness-warn .readiness-status { background: var(--accent-soft); color: #7a4b00; }
.readiness-fail .readiness-status { background: var(--danger-soft); color: var(--danger); }

.readiness-badge {
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--surface-soft);
  font-size: 0.75rem;
  font-weight: 800;
}

@media (max-width: 720px) {
  .launch-verdict { align-items: flex-start; flex-direction: column; }
  .launch-counts { width: 100%; justify-content: space-between; }
  .launch-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readiness-item { grid-template-columns: 38px minmax(0, 1fr); }
  .readiness-badge { grid-column: 2; justify-self: start; }
}

.audit-filters {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.risk-pill {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.risk-pill.low {
  background: #eef2f7;
  color: #475569;
}

.risk-pill.medium {
  background: var(--accent-soft);
  color: #8a5713;
}

.risk-pill.high,
.risk-pill.critical {
  background: var(--danger-soft);
  color: var(--danger);
}

.risk-pill.critical {
  box-shadow: inset 0 0 0 1px var(--danger);
}

.secondary {
  background: #334155;
  box-shadow: 0 10px 20px rgba(51, 65, 85, 0.14);
}

.secondary:hover {
  background: #1f2937;
}

.danger {
  background: var(--danger);
  box-shadow: 0 10px 20px rgba(180, 35, 24, 0.16);
}

.danger:hover {
  background: var(--danger-strong);
}

.gps-grid,
.actions,
.two-col,
.report-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.report-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.actions {
  grid-template-columns: repeat(3, 1fr);
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.mini-button {
  min-height: 36px;
  border-radius: 8px;
  padding: 8px 11px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  border: 1px solid rgba(15, 118, 110, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.metric {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  display: grid;
  gap: 2px;
  background: var(--surface-soft);
}

.device-token-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.device-token-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.device-token-box strong,
code {
  overflow-wrap: anywhere;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric strong {
  font-size: 15px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.detail-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.ok {
  background: #e8f6ee;
  color: var(--ok);
}

.status-pill.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.timeline,
.task-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 17px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 5px var(--surface-soft);
}

.timeline-dot.ok {
  background: var(--ok);
}

.timeline-dot.bad {
  background: var(--danger);
}

.timeline-card,
.task-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.timeline-head,
.task-head,
.task-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.timeline-head strong,
.task-head strong {
  font-size: 16px;
}

.timeline-meta,
.task-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.timeline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.task-item {
  display: grid;
  gap: 10px;
}

.task-line strong {
  text-align: right;
  font-size: 13px;
}

.result-panel {
  margin-top: 18px;
}

dl {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 16px 0 0;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.inline-link {
  color: var(--brand);
  font-weight: 900;
}

.form-message {
  min-height: 20px;
  margin: 0;
  font-size: 13px;
  font-weight: 900;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.photo-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.photo-card img,
.photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #e9eef3;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
  padding: 12px;
}

.photo-card div {
  display: grid;
  gap: 4px;
  padding: 11px;
}

.photo-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.table-panel {
  margin-top: 18px;
}

.admin-grid .table-panel {
  margin-top: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 11px;
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover td {
  background: #f7fbfa;
}

.status-ok {
  color: var(--ok);
}

.status-bad {
  color: var(--danger);
}

.status-warn {
  color: var(--accent);
}

.employee-status {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 900;
}

.employee-tabs {
  display: flex;
  gap: 0;
  padding: 14px 20px 0;
  border-bottom: 1px solid var(--line);
}

.employee-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.employee-tab:hover { background: var(--surface-soft); color: var(--ink); }
.employee-tab.is-active { border-bottom-color: var(--brand); color: var(--brand-strong); }

.employee-tab span {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 10px;
  background: #e8eef5;
  color: #29435f;
  font-size: 0.75rem;
  text-align: center;
}

@media (max-width: 620px) {
  .employee-tabs { overflow-x: auto; }
  .employee-tab { flex: 0 0 auto; }
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.secondary-mini {
  background: #eef2f7;
  color: #334155;
  border-color: #d9e2ea;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 800;
  text-align: center;
}

.empty-cell {
  padding: 26px;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.modal {
  width: min(92vw, 520px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.modal-panel {
  box-shadow: var(--shadow);
}

.full-table table {
  min-width: 980px;
}

.pulse {
  animation: pulse-ring 1s ease-in-out infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(183, 121, 31, 0.34);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(183, 121, 31, 0);
  }
}

@media (max-width: 920px) {
  .nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 12px;
  }

  .topbar,
  .workbench,
  .admin-grid,
  .nav-grid,
  .gps-grid,
  .actions,
  .two-col,
  .detail-grid,
  .detail-grid.compact,
  .detail-layout,
  .dashboard-filter,
  .dashboard-metrics,
  .settings-grid,
  .report-filters,
  dl {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    padding: 16px;
  }

  .camera-panel {
    min-height: 380px;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    display: grid;
  }

  .settings-savebar {
    align-items: stretch;
    flex-direction: column;
  }

  .row-actions .mini-button {
    flex: 1;
  }
}
