:root {
  color-scheme: light;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: #111827;
  background: #eef2f7;
}

/* Employee Check-in v3 preview. Enabled only with ?employeeUi=v3. */
.employee-checkin-v3 {
  --v3-navy: #0f2747;
  --v3-navy-soft: #173a65;
  --v3-cream: #fbf5ed;
  --v3-surface: #fffdf9;
  --v3-surface-soft: #f6eee5;
  --v3-orange: #c86528;
  --v3-orange-soft: #fff0df;
  --v3-line: #ead9c8;
  --v3-text: #172033;
  --v3-muted: #6b7280;
  --v3-green: #16804a;
  --v3-green-soft: #e8f7ef;
  --v3-red: #b42318;
  --v3-radius-lg: 24px;
  --v3-radius-md: 16px;
  --v3-shadow: 0 18px 44px rgba(42, 32, 24, 0.08);
}

.employee-ui-v3-preview.employee-shell .app-shell {
  width: min(100% - 32px, 800px);
  background:
    radial-gradient(circle at top left, rgba(200, 101, 40, 0.12), transparent 32%),
    linear-gradient(180deg, #fbf5ed 0%, #f7efe6 100%);
}

.employee-ui-v3-preview.employee-shell .tabs {
  display: none;
}

.employee-checkin-v3 .employee-mobile-layout {
  display: block;
  max-width: 760px;
  margin: 0 auto;
}

.employee-checkin-v3 .info-panel,
.employee-checkin-v3 .section-head,
.employee-checkin-v3 .check-fields label:has(#employeeSelect),
.employee-checkin-v3 .check-fields label:has(#siteSelect),
.employee-checkin-v3 .check-fields label:has(#noteInput),
.employee-checkin-v3 .site-card,
.employee-checkin-v3 #setSiteLocationBtn,
.employee-checkin-v3 #continueShiftBtn {
  display: none !important;
}

.employee-checkin-v3 .check-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.employee-checkin-v3 .quick-status-card {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.employee-checkin-v3 .v3-employee-strip {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  border: 1px solid var(--v3-line);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.92);
  box-shadow: 0 10px 28px rgba(42, 32, 24, 0.06);
  padding: 12px;
}

.employee-checkin-v3 .v3-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--v3-navy) 0%, var(--v3-navy-soft) 100%);
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.employee-checkin-v3 .v3-employee-text {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.employee-checkin-v3 .v3-employee-text strong {
  color: var(--v3-navy);
  font-size: clamp(18px, 3vw, 22px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.employee-checkin-v3 .v3-employee-text span {
  overflow: hidden;
  color: var(--v3-muted);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-checkin-v3 .v3-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--v3-orange-soft);
  color: #9a4318;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.employee-checkin-v3 .v3-status-badge.active {
  background: var(--v3-green-soft);
  color: var(--v3-green);
}

.employee-checkin-v3 .v3-status-badge.done {
  background: #eef2f7;
  color: #475569;
}

.employee-checkin-v3 .mode-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  border: 1px solid var(--v3-line);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.8);
  padding: 6px;
}

.employee-checkin-v3 .mode-field legend {
  grid-column: 1 / -1;
  color: var(--v3-muted);
  font-size: 12px;
  font-weight: 900;
  padding: 0 4px;
}

.employee-checkin-v3 .mode-field label {
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--v3-navy);
  font-weight: 900;
  white-space: nowrap;
}

.employee-checkin-v3 .mode-field label:has(input:checked) {
  background: var(--v3-navy);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 39, 71, 0.18);
}

.employee-checkin-v3 .check-fields {
  margin: 0 0 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.employee-checkin-v3 .check-fields label:has(#periodSelect) {
  display: grid;
  gap: 7px;
  color: var(--v3-navy);
  font-size: 13px;
  font-weight: 900;
}

.employee-checkin-v3 .check-fields #periodSelect {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d9c9b8;
  border-radius: 14px;
  background: #ffffff;
  color: var(--v3-text);
  padding: 0 13px;
  font-weight: 800;
}

.employee-checkin-v3 .office-mode-info {
  margin: 0 0 12px;
  border: 1px solid var(--v3-line);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.78);
  box-shadow: none;
}

.employee-checkin-v3 .v3-attendance-card {
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-radius-lg);
  background: var(--v3-surface);
  box-shadow: var(--v3-shadow);
  padding: clamp(18px, 4vw, 28px);
}

.employee-checkin-v3 .v3-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.employee-checkin-v3 .v3-mode-pill {
  border-radius: 999px;
  background: var(--v3-orange-soft);
  color: #9a4318;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.employee-checkin-v3 .v3-shift-text {
  color: var(--v3-muted);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.employee-checkin-v3 .v3-clock-block {
  display: grid;
  gap: 5px;
  text-align: center;
}

.employee-checkin-v3 .v3-clock-block time {
  color: var(--v3-navy);
  font-size: clamp(42px, 10vw, 68px);
  font-weight: 900;
  line-height: 1;
}

.employee-checkin-v3 .v3-clock-block span {
  color: var(--v3-muted);
  font-size: 14px;
  font-weight: 800;
}

.employee-checkin-v3 .v3-wfh-note,
.employee-checkin-v3 .v3-action-help {
  border-radius: var(--v3-radius-md);
  background: var(--v3-green-soft);
  color: var(--v3-green);
  padding: 11px 12px;
  font-weight: 900;
  text-align: center;
}

.employee-checkin-v3 .v3-action-help {
  margin: 12px 0 0;
  background: var(--v3-orange-soft);
  color: #9a4318;
}

.employee-checkin-v3 .v3-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.employee-checkin-v3 .v3-status-tile {
  display: grid;
  gap: 4px;
  min-width: 0;
  border-radius: var(--v3-radius-md);
  background: var(--v3-surface-soft);
  padding: 12px;
}

.employee-checkin-v3 .v3-status-tile span,
.employee-checkin-v3 .v3-latest-card span {
  color: var(--v3-muted);
  font-size: 12px;
  font-weight: 900;
}

.employee-checkin-v3 .v3-status-tile strong,
.employee-checkin-v3 .v3-latest-card strong {
  color: var(--v3-navy);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.employee-checkin-v3 .gps-card {
  margin: 0 0 12px;
  border-color: var(--v3-line);
  border-radius: var(--v3-radius-lg);
  background: var(--v3-surface);
  box-shadow: var(--v3-shadow);
}

.employee-checkin-v3 .check-actions {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
}

.employee-checkin-v3 .check-actions #refreshGpsBtn,
.employee-checkin-v3 .check-actions #checkInBtn,
.employee-checkin-v3 .check-actions #checkOutBtn {
  width: 100%;
  min-height: 54px;
  border-radius: var(--v3-radius-md);
  font-weight: 900;
}

.employee-checkin-v3 .check-actions #checkInBtn {
  background: var(--v3-navy);
  color: #ffffff;
}

.employee-checkin-v3 .check-actions #checkOutBtn {
  background: var(--v3-red);
  color: #ffffff;
}

.employee-checkin-v3 .check-actions #checkInBtn:disabled,
.employee-checkin-v3 .check-actions #checkOutBtn:disabled {
  background: #7a8798;
  color: #ffffff;
  cursor: not-allowed;
}

.employee-checkin-v3 .employee-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.employee-checkin-v3 .employee-quick-actions button {
  min-height: 76px;
  border: 1px solid var(--v3-line);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.92);
  color: var(--v3-navy);
  padding: 10px;
  font-size: 13px;
}

.employee-checkin-v3 .employee-quick-actions button[data-employee-quick="substitute"] {
  display: none;
}

.employee-checkin-v3.can-substitute-self-service .employee-quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.employee-checkin-v3.can-substitute-self-service .employee-quick-actions button[data-employee-quick="substitute"] {
  display: flex;
}

.employee-checkin-v3 .v3-latest-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--v3-line);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.92);
  padding: 14px;
}

@media (max-width: 520px) {
  .employee-ui-v3-preview.employee-shell .app-shell {
    width: min(100% - 20px, 800px);
  }

  .employee-checkin-v3 .v3-employee-strip {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .employee-checkin-v3 .v3-status-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .employee-checkin-v3 .v3-status-grid,
  .employee-checkin-v3 .employee-quick-actions {
    grid-template-columns: 1fr;
  }

  .employee-checkin-v3 .v3-mode-row {
    align-items: start;
    flex-direction: column;
  }

  .employee-checkin-v3 .v3-shift-text {
    text-align: left;
  }
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
  max-width: 100%;
}

td,
th,
.record-row,
.metric-card,
.panel,
.site-card,
.message-box,
.notification-item {
  overflow-wrap: anywhere;
  word-break: break-word;
}

table {
  width: 100%;
  table-layout: auto;
}

td,
th {
  max-width: 280px;
  white-space: normal;
  vertical-align: top;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.app-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hidden {
  display: none !important;
}

.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: #15803d;
}

.toast.error {
  background: #b91c1c;
}

.form-hint {
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
}

.time-picker {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) minmax(86px, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.time-picker label {
  display: grid;
  gap: 4px;
  min-height: auto;
}

.time-picker span {
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.time-picker strong {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.mode-field {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #cfd7e6;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.mode-field legend {
  padding: 0 6px;
  color: #344054;
  font-weight: 700;
}

.mode-field label,
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.work-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 6px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 22px;
  letter-spacing: 0;
}

p {
  color: #667085;
  line-height: 1.6;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: 16px;
  margin-bottom: 16px;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 16px;
  padding-bottom: 2px;
}

.tab {
  min-height: 40px;
  border: 1px solid #cfd7e6;
  background: #fff;
  color: #344054;
  white-space: nowrap;
}

.tab.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.backoffice-shell {
  background: #eef3f9;
}

.backoffice-shell .app-shell {
  width: min(1280px, 100%);
}

.backoffice-shell .topbar {
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.backoffice-shell .topbar h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.backoffice-shell #mainContent:not(.hidden) {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.backoffice-shell .tabs {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  overflow: visible;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.backoffice-shell .tab {
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  border-color: transparent;
  background: transparent;
  color: #344054;
  text-align: left;
}

.backoffice-shell .tab:hover {
  background: #f3f6fb;
}

.backoffice-shell .tab.active {
  border-color: #0f2747;
  background: #0f2747;
  color: #fff;
}

.backoffice-shell .tab[data-view="dashboard"] { order: 1; }
.backoffice-shell .tab[data-view="reports"] { order: 2; }
.backoffice-shell .tab[data-view="approvals"] { order: 3; }
.backoffice-shell .tab[data-view="employees"] { order: 4; }
.backoffice-shell .tab[data-view="sites"] { order: 5; }
.backoffice-shell .tab[data-view="audit"] { order: 8; }

.backoffice-shell .view.active {
  min-width: 0;
}

.backoffice-shell .panel {
  border-color: #d8e1ee;
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

.backoffice-shell .section-head {
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f7;
}

.backoffice-shell .section-head h2 {
  color: #0f172a;
}

.backoffice-shell .status-chip.warn {
  background: #fff3d6;
  color: #9a5a00;
}

.backoffice-shell .status-chip.ok {
  background: #dcfce7;
  color: #166534;
}

.backoffice-shell .status-chip.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.05);
  min-width: 0;
}

.metric-card span {
  display: block;
  color: #667085;
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 30px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-hero h2 {
  margin-bottom: 4px;
}

.dashboard-hero p:last-child {
  margin-bottom: 0;
}

.dashboard-overview {
  margin-bottom: 16px;
}

.dashboard-metrics .metric-card strong {
  font-size: 24px;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #f8fafc;
  padding: 4px;
}

.segmented-control button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475467;
  padding: 0 12px;
}

.segmented-control button.active {
  background: #111827;
  color: #fff;
}

.dashboard-chart {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr 48px;
  align-items: center;
  gap: 10px;
  color: #344054;
  font-weight: 800;
}

.chart-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.chart-bar {
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: #667085;
}

.chart-bar.ok {
  background: #12b76a;
}

.chart-bar.warn {
  background: #f59e0b;
}

.chart-bar.danger {
  background: #ef4444;
}

.chart-bar.neutral {
  background: #64748b;
}

.employee-metrics .metric-card strong {
  font-size: 20px;
  line-height: 1.25;
}

.panel {
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.status-pill {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.user-badge {
  border: 1px solid #d7deea;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.app-shell:has(#loginPanel:not(.hidden)) {
  width: min(680px, 100%);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(16px, 3vw, 28px);
  background:
    radial-gradient(circle at top right, rgba(15, 23, 42, 0.08), transparent 34%),
    radial-gradient(circle at bottom left, rgba(194, 101, 42, 0.16), transparent 34%),
    #fbf7f1;
}

.app-shell:has(#loginPanel:not(.hidden)) .topbar {
  display: none;
}

.login-redesign {
  position: relative;
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-self: center;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid #e9d8cc;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.13);
}

.login-copy {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 22px;
  text-align: center;
}

.login-mark {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border: 1px solid #ead8cb;
  border-radius: 22px;
  background: linear-gradient(145deg, #ffffff, #f7efe8);
  color: #0f2747;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 800;
  transform: rotate(8deg);
  box-shadow: 0 12px 30px rgba(97, 67, 47, 0.12);
}

.login-redesign .eyebrow {
  margin: 0;
  color: #0f2747;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: none;
}

.login-redesign h2 {
  position: relative;
  margin: 0;
  color: #211914;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 6vw, 46px);
  line-height: 1.05;
}

.login-redesign h2::after {
  content: "";
  width: 68px;
  height: 3px;
  display: block;
  margin: 14px auto 0;
  border-radius: 999px;
  background: #d27a3a;
}

.login-redesign .login-help {
  max-width: 360px;
  margin: 4px 0 0;
  color: #7a6d63;
  font-size: 14px;
  line-height: 1.55;
}

.login-redesign .login-form {
  gap: 14px;
}

.login-redesign label {
  gap: 9px;
  color: #594d43;
  font-size: 14px;
  font-weight: 900;
}

.login-redesign input {
  min-height: 56px;
  border: 1.5px solid #8a93a3;
  border-radius: 18px;
  background: #ffffff;
  color: #211914;
  font-size: 17px;
  padding: 0 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.login-redesign input::placeholder {
  color: #c4bbb5;
}

.login-redesign input:focus {
  border-color: #0f2747;
  box-shadow: 0 0 0 5px rgba(15, 39, 71, 0.1);
  outline: 0;
  transform: translateY(-1px);
}

.login-redesign .primary-button {
  min-height: 58px;
  margin-top: 6px;
  border: 0;
  border-radius: 18px;
  background: #0f2747;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 16px 32px rgba(15, 39, 71, 0.2);
}

.login-redesign .primary-button::after {
  content: ">";
  margin-left: 14px;
  font-size: 22px;
  line-height: 1;
}

.login-redesign .primary-button:hover {
  background: #16385f;
}

.login-redesign #loginMessage {
  min-height: 0;
  margin-top: 2px;
  border-radius: 16px;
  text-align: center;
}

.login-redesign #loginMessage:empty {
  display: none;
}

.login-redesign #loginMessage:not(:empty) {
  display: block;
  padding: 10px 12px;
}

@media (max-width: 640px) {
  .app-shell:has(#loginPanel:not(.hidden)) {
    justify-content: center;
    padding: 18px;
  }

  .login-redesign {
    padding: 24px 20px 26px;
    border-radius: 24px;
  }

  .login-mark {
    width: 54px;
    height: 54px;
    margin-bottom: 8px;
    border-radius: 18px;
    font-size: 18px;
  }

  .login-redesign h2 {
    font-size: 38px;
  }

  .login-redesign input,
  .login-redesign .primary-button {
    min-height: 56px;
    border-radius: 17px;
  }
}

.status-pill.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b42318;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.editor-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.compact-editor {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.time-request-box {
  margin-top: 18px;
  border-top: 1px solid #e5eaf3;
  padding-top: 16px;
}

.time-request-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.wide-field {
  grid-column: span 2;
}

.approval-detail {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  color: #475467;
  font-size: 13px;
}

.stack-panel {
  margin-top: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  min-height: 44px;
  border: 1px solid #cfd7e6;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  padding: 0 12px;
}

.compact-input {
  width: min(320px, 100%);
}

.site-card,
.gps-card,
.message-box {
  margin-top: 14px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
  color: #344054;
  line-height: 1.55;
}

.quick-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto minmax(240px, 0.85fr);
  align-items: stretch;
  gap: 14px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.05);
}

.employee-checkin-main {
  min-width: 0;
}

.employee-status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.work-mode-badge.wfh {
  background: #dcfce7;
  color: #166534;
}

.quick-status-card span,
.quick-status-meta span {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.quick-status-card strong {
  display: block;
  margin-top: 6px;
  color: #111827;
  font-size: 24px;
  line-height: 1.2;
}

.quick-status-card p {
  margin: 8px 0 0;
}

.quick-status-card.working {
  border-color: #fcd34d;
  background: #fffbeb;
}

.quick-status-card.ready {
  border-color: #86efac;
  background: #f0fdf4;
}

.quick-status-meta {
  display: grid;
  gap: 10px;
  min-width: 0;
  border-left: 1px solid #e5eaf3;
  padding-left: 14px;
}

.quick-status-meta strong {
  font-size: 17px;
}

.check-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.checkout-lock-panel {
  min-width: 190px;
  border: 1px solid #facc15;
  border-radius: 8px;
  background: #fefce8;
  padding: 14px;
  text-align: center;
}

.checkout-lock-panel.ready {
  border-color: #86efac;
  background: #ecfdf3;
}

.checkout-lock-panel.expired {
  border-color: #fecaca;
  background: #fef2f2;
}

.checkout-lock-panel span,
.checkout-lock-panel small {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.checkout-lock-panel strong {
  margin: 6px 0;
  color: #854d0e;
  font-size: 28px;
}

.checkout-lock-panel.ready strong {
  color: #166534;
  font-size: 20px;
}

.checkout-lock-panel.expired strong {
  color: #b42318;
  font-size: 20px;
}

.gps-card.ok,
.message-box.ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.gps-card.warn,
.message-box.warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.gps-card.error,
.message-box.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b42318;
}

.gps-card.checking {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.gps-warning {
  display: inline-block;
  margin-top: 4px;
  color: #b45309;
  font-weight: 800;
}

.gps-meta {
  color: #475467;
  font-size: 13px;
}

.actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.check-actions {
  grid-template-columns: minmax(120px, 0.9fr) minmax(120px, 0.9fr) minmax(180px, 1.6fr) minmax(180px, 1.6fr) minmax(120px, 0.9fr);
}

.check-actions #setSiteLocationBtn.hidden + button,
.check-actions #setSiteLocationBtn.hidden ~ button {
  min-height: 58px;
}

.check-actions #checkInBtn,
.check-actions #checkOutBtn {
  min-height: 66px;
  font-size: 20px;
}

.check-actions:not(.has-open-record) #checkInBtn {
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.24);
}

.check-actions.has-open-record #checkOutBtn:not(:disabled) {
  box-shadow: 0 16px 32px rgba(180, 35, 24, 0.22);
}

.employee-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.employee-quick-actions button {
  min-height: 42px;
  padding: 0 10px;
  font-size: 14px;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

#checkOutBtn:disabled {
  background: #e5e7eb;
  color: #667085;
  opacity: 1;
}

.primary-button {
  background: #2563eb;
  color: #fff;
}

.continue-button {
  border: 1px solid #0f766e;
  background: #ccfbf1;
  color: #115e59;
}

.secondary-button {
  border: 1px solid #cfd7e6;
  background: #fff;
  color: #344054;
}

.load-report-button {
  border: 1px solid #98a2b3;
  background: #667085;
  color: #fff;
  box-shadow: 0 8px 20px rgba(102, 112, 133, 0.18);
}

.load-report-button:hover {
  background: #475467;
}

.clear-report-button {
  border: 1px solid #b42318;
  background: #d92d20;
  color: #fff;
}

.clear-report-button:hover {
  background: #b42318;
}

.review-request-button {
  border: 1px solid #facc15;
  background: #fef3c7;
  color: #78350f;
}

.review-request-button:hover {
  background: #fde68a;
}

.location-button {
  border-color: #15803d;
  background: #16a34a;
  color: #fff;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.24);
}

.location-button:hover {
  background: #15803d;
}

.danger-button {
  background: #b42318;
  color: #fff;
}

.employee-checkin-view {
  --mobile-primary: #002046;
  --mobile-green: #3b6934;
  --mobile-green-soft: #b9eeab;
  --mobile-surface: #f8f9fa;
  --mobile-card: #ffffff;
  --mobile-border: #c4c6cf;
  --mobile-text: #191c1d;
  --mobile-muted: #44474e;
  color: var(--mobile-text);
}

.employee-checkin-view .employee-mobile-layout {
  display: block;
  max-width: 600px;
  margin: 0 auto;
}

.employee-checkin-view .info-panel {
  display: none;
}

.employee-checkin-view .check-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.employee-checkin-view .section-head {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--mobile-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 32, 70, 0.18);
}

.employee-checkin-view .section-head h2,
.employee-checkin-view .section-head p {
  color: #fff;
}

.employee-checkin-view .section-head h2 {
  font-size: 22px;
  line-height: 1.25;
}

.employee-checkin-view .section-head p {
  margin: 4px 0 0;
  opacity: 0.84;
  font-size: 13px;
  line-height: 1.45;
}

.employee-checkin-view .quick-status-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.employee-profile-card,
.employee-clock-card,
.employee-checkin-view .quick-status-meta,
.employee-checkin-view .gps-card,
.employee-checkin-view .site-card,
.employee-checkin-view .time-request-box {
  border: 1px solid var(--mobile-border);
  border-radius: 8px;
  background: var(--mobile-card);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.employee-profile-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.employee-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #d6e3ff;
  color: var(--mobile-primary);
  font-size: 24px;
  font-weight: 900;
}

.employee-profile-text {
  min-width: 0;
}

.employee-profile-text strong {
  margin: 0;
  color: var(--mobile-primary);
  font-size: 20px;
  line-height: 1.25;
}

.employee-checkin-view .employee-status-badges {
  margin-top: 8px;
}

.employee-checkin-view .work-mode-badge {
  min-height: 24px;
  max-width: 100%;
  border-radius: 999px;
  background: var(--mobile-green-soft);
  color: #23501e;
  white-space: normal;
  overflow-wrap: anywhere;
}

.today-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffdad6;
  color: #93000a;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.today-status-badge.active {
  background: var(--mobile-green-soft);
  color: #23501e;
}

.today-status-badge.done {
  background: #e1e3e4;
  color: #44474e;
}

.employee-clock-card {
  position: relative;
  overflow: hidden;
  padding: 26px 16px 22px;
  text-align: center;
  background: #f3f4f5;
}

.clock-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}

.clock-row strong {
  margin: 0;
  color: var(--mobile-primary);
  font-size: clamp(42px, 12vw, 58px);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.employee-clock-card p {
  margin: 12px 0 0;
  color: var(--mobile-muted);
  font-size: 16px;
}

.shift-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 48px;
  margin-top: 18px;
  padding: 10px 16px;
  border: 1px solid var(--mobile-border);
  border-radius: 8px;
  background: #fff;
  color: var(--mobile-primary);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
}

.employee-clock-card small {
  display: block;
  margin-top: 10px;
  color: var(--mobile-muted);
  font-size: 13px;
  line-height: 1.45;
}

.employee-checkin-view .quick-status-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-left: 1px solid var(--mobile-border);
  padding: 14px;
}

.employee-checkin-view .quick-status-meta span,
.employee-checkin-view .quick-status-meta strong {
  margin: 0;
}

.employee-checkin-view .quick-status-meta span {
  color: var(--mobile-muted);
  font-size: 12px;
}

.employee-checkin-view .quick-status-meta strong {
  margin-top: 4px;
  color: var(--mobile-primary);
  font-size: 16px;
  line-height: 1.25;
}

.employee-checkin-view .check-time-grid {
  grid-column: 1 / -1;
}

.employee-checkin-view .check-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
  width: 100%;
  max-width: 100%;
  padding: 14px;
  border: 1px solid var(--mobile-border);
  border-radius: 8px;
  background: var(--mobile-card);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.employee-checkin-view .check-fields label {
  min-width: 0;
  max-width: 100%;
  color: var(--mobile-muted);
  font-size: 13px;
}

.employee-checkin-view .check-fields select,
.employee-checkin-view .check-fields input {
  min-height: 48px;
  width: 100%;
  min-width: 0;
  border-color: var(--mobile-border);
  border-radius: 6px;
  font-size: 16px;
}

.employee-checkin-view .mode-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
}

.employee-checkin-view .mode-field legend {
  grid-column: 1 / -1;
  padding: 0;
  color: var(--mobile-primary);
}

.employee-checkin-view .mode-field label {
  min-width: 0;
  justify-content: center;
  min-height: 68px;
  border: 2px solid var(--mobile-border);
  border-radius: 8px;
  background: #f3f4f5;
  color: var(--mobile-muted);
  font-size: 16px;
  font-weight: 900;
}

.employee-checkin-view .mode-field label:has(input:checked) {
  border-color: var(--mobile-primary);
  background: var(--mobile-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(27, 54, 93, 0.15);
}

.employee-checkin-view .mode-field input {
  width: 18px;
  height: 18px;
  min-height: 0;
}

.employee-checkin-view .site-card {
  margin-top: 12px;
  padding: 12px 14px;
  color: var(--mobile-muted);
  font-size: 13px;
}

.employee-checkin-view .gps-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 16px;
  color: var(--mobile-text);
  line-height: 1.45;
}

.gps-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mobile-border);
}

.gps-card-head div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.gps-card-head strong {
  color: var(--mobile-text);
  font-size: 17px;
}

.gps-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #bcf0ae;
  color: #23501e;
  font-size: 17px;
  font-weight: 900;
}

.gps-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e1e3e4;
  color: #44474e;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.gps-status-pill.ok {
  background: var(--mobile-green-soft);
  color: #23501e;
}

.gps-status-pill.warn {
  background: #ffdfa0;
  color: #5c4300;
}

.gps-status-pill.checking {
  background: #d6e3ff;
  color: #001b3d;
}

.employee-checkin-view .gps-card p,
.employee-checkin-view .gps-card small {
  margin: 0;
  color: var(--mobile-muted);
}

.gps-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.gps-metrics div {
  min-width: 0;
  border-radius: 6px;
  background: #edeeef;
  padding: 10px 8px;
  text-align: center;
}

.gps-metrics span {
  display: block;
  color: var(--mobile-muted);
  font-size: 11px;
  font-weight: 800;
}

.gps-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--mobile-primary);
  font-size: 15px;
  line-height: 1.2;
}

.employee-checkin-view .check-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 16px 0 18px;
}

.employee-checkin-view .check-actions #checkInBtn,
.employee-checkin-view .check-actions #checkOutBtn {
  order: 1;
  justify-self: center;
  width: min(224px, 70vw);
  height: min(224px, 70vw);
  min-height: 180px;
  border-radius: 28px;
  background: var(--mobile-green);
  color: #fff;
  font-size: 28px;
  line-height: 1.2;
  box-shadow: 0 8px 24px rgba(27, 54, 93, 0.15);
}

.employee-checkin-view .check-actions #checkOutBtn {
  background: #ba1a1a;
}

.employee-checkin-view .check-actions #refreshGpsBtn {
  order: 2;
}

.employee-checkin-view .check-actions #setSiteLocationBtn {
  order: 3;
}

.employee-checkin-view .check-actions #continueShiftBtn {
  order: 4;
}

.employee-checkin-view .check-actions:not(.has-open-record) #checkOutBtn,
.employee-checkin-view .check-actions.has-open-record #checkInBtn,
.employee-checkin-view .check-actions #continueShiftBtn:disabled {
  display: none;
}

.employee-checkin-view .location-button,
.employee-checkin-view .check-actions #setSiteLocationBtn,
.employee-checkin-view .check-actions #continueShiftBtn {
  min-height: 48px;
  border-radius: 8px;
}

.employee-checkin-view .employee-quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.employee-checkin-view .employee-quick-actions button {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 118px;
  border: 1px solid var(--mobile-border);
  border-radius: 8px;
  background: var(--mobile-card);
  color: var(--mobile-text);
  padding: 10px 6px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.employee-checkin-view .employee-quick-actions button span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #d6e3ff;
  color: var(--mobile-primary);
  font-size: 24px;
  font-weight: 900;
}

.employee-checkin-view .employee-quick-actions svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.employee-checkin-view .employee-quick-actions button:nth-child(2) span {
  background: #ffdfa0;
  color: #5c4300;
}

.employee-checkin-view .employee-quick-actions button:nth-child(3) span {
  background: #bcf0ae;
  color: #23501e;
}

.employee-checkin-view .employee-quick-actions button:nth-child(4) span {
  background: #e1e3e4;
  color: #44474e;
}

.employee-checkin-view .employee-quick-actions button strong {
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

.employee-shell .tabs {
  display: none;
}

.employee-shell .app-shell {
  width: min(640px, 100%);
  padding: 16px;
}

.employee-shell .topbar {
  align-items: center;
  margin-bottom: 14px;
}

.employee-shell .topbar h1 {
  font-size: clamp(28px, 8vw, 40px);
}

.employee-shell .top-actions {
  gap: 8px;
}

.employee-shell #apiStatus {
  display: none;
}

.employee-checkin-view.office-checkin .section-head {
  background: #e040a0;
}

.employee-checkin-view.guard-checkin .section-head {
  background: #1b365d;
}

.employee-checkin-view.office-checkin {
  --mobile-primary: #e040a0;
  --mobile-green: #e040a0;
  --mobile-green-soft: #ffd6ee;
  --mobile-surface: #fef7ff;
  --mobile-card: #ffffff;
  --mobile-border: #dcc8e0;
  --mobile-text: #2e1a28;
  --mobile-muted: #604868;
}

.employee-shell:has(.office-checkin.active) {
  background: #fef7ff;
}

.employee-shell:has(.office-checkin.active) .topbar {
  max-width: 600px;
  margin: 0 auto 16px;
  border-radius: 0 0 34px 34px;
  background: #e040a0;
  color: #fff;
  padding: 14px 20px;
  box-shadow: 0 10px 26px rgba(224, 64, 160, 0.22);
}

.employee-shell:has(.office-checkin.active) .topbar .eyebrow {
  display: none;
}

.employee-shell:has(.office-checkin.active) .topbar h1 {
  color: #fff;
  font-size: 22px;
  letter-spacing: 0;
}

.employee-shell:has(.office-checkin.active) .topbar h1::before {
  content: "♥";
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-right: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 22px;
  vertical-align: middle;
}

.employee-shell:has(.office-checkin.active) #logoutBtn {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.employee-checkin-view.office-checkin .section-head {
  display: none;
}

.employee-checkin-view.office-checkin .employee-mobile-layout {
  max-width: 600px;
}

.employee-checkin-view.office-checkin .quick-status-card {
  gap: 18px;
}

.employee-checkin-view.office-checkin .employee-profile-card {
  position: relative;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  margin-top: 6px;
  padding: 24px 24px 24px;
  border-color: rgba(224, 64, 160, 0.12);
  border-radius: 34px;
  box-shadow: 0 10px 26px rgba(224, 64, 160, 0.08);
}

.employee-checkin-view.office-checkin .employee-avatar {
  width: 76px;
  height: 76px;
  border: 4px solid #ffd6ee;
  border-radius: 999px;
  background: #ffd6ee;
  color: #a02070;
}

.employee-checkin-view.office-checkin .employee-profile-text strong {
  color: #2e1a28;
  font-size: 23px;
  overflow-wrap: anywhere;
}

.employee-checkin-view.office-checkin .employee-status-badges {
  gap: 8px;
}

.employee-checkin-view.office-checkin .work-mode-badge,
.employee-checkin-view.office-checkin .today-status-badge {
  background: #40c0ee;
  color: #00334d;
  border-radius: 999px;
  padding: 5px 12px;
}

.employee-checkin-view.office-checkin .employee-profile-card > .today-status-badge {
  position: absolute;
  top: 24px;
  right: 24px;
}

.employee-checkin-view.office-checkin .employee-status-badges {
  max-width: calc(100% - 76px);
}

.employee-checkin-view.office-checkin .mode-field {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0;
}

.employee-checkin-view.office-checkin .mode-field legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.employee-checkin-view.office-checkin .mode-field label {
  min-height: 138px;
  border: 2px solid #ead9ee;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.62);
  color: #9b88a2;
  font-size: 24px;
  box-shadow: 0 8px 24px rgba(224, 64, 160, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.employee-checkin-view.office-checkin .mode-field label:hover {
  transform: translateY(-2px);
}

.employee-checkin-view.office-checkin .mode-field label:has(input:checked) {
  border-color: #e040a0;
  background: #ee78bd;
  color: #3d0028;
  box-shadow: 0 12px 28px rgba(224, 64, 160, 0.22);
}

.employee-checkin-view.office-checkin .mode-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.office-mode-info {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  margin: 14px 0 24px;
  padding: 24px;
  border-radius: 34px;
  background: #eedcff;
  color: #2e2040;
  box-shadow: 0 10px 28px rgba(124, 82, 170, 0.12);
}

.office-mode-info::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 112px;
  height: 112px;
  border: 10px solid rgba(124, 82, 170, 0.1);
  border-radius: 999px;
}

.office-mode-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: #7c52aa;
  color: #fff;
}

.office-mode-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.office-mode-info h3 {
  margin: 0 0 6px;
  color: #2e2040;
  font-size: 22px;
}

.office-mode-info strong {
  display: block;
  color: #7c52aa;
  font-size: 16px;
}

.office-mode-info p {
  margin: 10px 0 0;
  color: rgba(46, 32, 64, 0.78);
  font-weight: 700;
}

.employee-checkin-view.office-checkin .employee-clock-card {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 8px 0 4px;
}

.employee-checkin-view.office-checkin .clock-row strong {
  color: #e040a0;
  font-size: clamp(58px, 18vw, 86px);
  text-shadow: 0 6px 18px rgba(224, 64, 160, 0.12);
}

.employee-checkin-view.office-checkin .clock-row .today-status-badge {
  display: none;
}

.employee-checkin-view.office-checkin .employee-clock-card p {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin: 8px 0 0;
  padding: 6px 16px;
  border-radius: 999px;
  background: #ffd6ee;
  color: #a02070;
  font-weight: 900;
}

.employee-checkin-view.office-checkin .shift-pill,
.employee-checkin-view.office-checkin .employee-clock-card small {
  display: none;
}

.employee-checkin-view.office-checkin .check-actions {
  margin: 24px 0 20px;
}

.employee-checkin-view.office-checkin .check-actions #checkInBtn,
.employee-checkin-view.office-checkin .check-actions #checkOutBtn {
  position: relative;
  width: min(232px, 68vw);
  height: min(232px, 68vw);
  min-height: 204px;
  border: 8px solid #f080c0;
  border-radius: 999px;
  background: #e040a0;
  color: #fff;
  box-shadow: 0 18px 42px rgba(224, 64, 160, 0.25);
}

.employee-checkin-view.office-checkin .check-actions #checkInBtn::before,
.employee-checkin-view.office-checkin .check-actions #checkOutBtn::before {
  content: "";
  display: block;
  width: 70px;
  height: 70px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.employee-checkin-view.office-checkin .check-actions #checkInBtn:hover,
.employee-checkin-view.office-checkin .check-actions #checkOutBtn:hover {
  transform: scale(1.03);
}

.employee-checkin-view.office-checkin.wfh-mode .gps-card {
  display: none;
}

.employee-checkin-view.office-checkin .gps-card {
  border-color: #dcc8e0;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0, 150, 204, 0.08);
}

.employee-checkin-view.office-checkin .quick-status-meta,
.employee-checkin-view.office-checkin .site-card,
.employee-checkin-view.office-checkin .check-fields {
  display: none;
}

.employee-checkin-view.office-checkin .employee-quick-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.employee-checkin-view.office-checkin .employee-quick-actions button {
  min-height: 94px;
  border-color: #dcc8e0;
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(224, 64, 160, 0.08);
}

.employee-checkin-view.office-checkin .employee-quick-actions button[data-employee-quick="substitute"] {
  display: none;
}

.employee-checkin-view .time-request-box {
  margin-top: 24px;
  padding: 18px;
}

.employee-checkin-view .time-request-box h2 {
  margin-bottom: 12px;
  color: #001b3d;
  font-size: 24px;
}

.employee-checkin-view .time-request-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.employee-checkin-view .time-request-form label {
  color: #001b3d;
  font-weight: 900;
}

.employee-checkin-view .time-request-form input,
.employee-checkin-view .time-request-form select {
  min-height: 56px;
  border-color: #c4c6cf;
  border-radius: 8px;
  font-size: 16px;
}

.employee-checkin-view .time-request-form .wide-field {
  grid-column: 1 / span 2;
}

.employee-checkin-view .time-request-form .review-request-button {
  align-self: end;
  min-height: 64px;
  border-radius: 8px;
  background: #ffdfa0;
  color: #5c4300;
  font-size: 16px;
}

.status-list {
  display: grid;
  gap: 10px;
}

.status-list div {
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.status-list span {
  display: block;
  color: #667085;
  font-size: 13px;
}

.status-list strong {
  display: block;
  margin-top: 5px;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e5eaf3;
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.record-actions button,
.record-actions select {
  min-height: 36px;
  font-size: 13px;
}

.record-row strong {
  display: block;
  color: #111827;
}

.record-row span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
}

.scope-note {
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e3a8a;
  font-weight: 700;
  margin: 12px 0;
  padding: 10px 12px;
}

.role-chip,
.status-chip {
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-chip.warn {
  background: #fffbeb;
  color: #92400e;
}

.status-chip.ok {
  background: #ecfdf3;
  color: #027a48;
}

.status-chip.danger {
  background: #fef3f2;
  color: #b42318;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.report-summary div {
  border: 1px solid #d7deea;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.report-summary span {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.report-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  color: #111827;
}

.hr-report-v2 {
  display: grid;
  gap: 18px;
}

.report-section-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid #d7deea;
  border-radius: 16px;
  background: #fff;
  padding: 6px;
}

.report-section-tab {
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #475467;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.report-section-tab:hover {
  background: #f2f6fc;
  color: #0f2747;
}

.report-section-tab.active {
  background: #0f2747;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 39, 71, 0.16);
}

.report-section-tab:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.report-section {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.report-section.hidden {
  display: none;
}

.hr-report-v2 .panel {
  border-radius: 22px;
}

.hr-report-v2 .report-hero-panel,
.hr-report-v2 .report-export-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.hr-report-v2 .section-head,
.hr-report-v2 .report-hero-panel .section-head {
  margin: 0;
}

.hr-report-v2 .section-head h2,
.hr-report-v2 .report-export-panel h2 {
  color: #0f2747;
}

.hr-report-v2 .section-head p,
.hr-report-v2 .report-export-panel p,
.report-filter-status span:last-child {
  color: #667085;
  font-weight: 700;
  line-height: 1.6;
}

.report-export-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: transparent;
  color: #0f2747;
  padding: 0;
  text-align: left;
}

.report-filter-toggle span {
  display: grid;
  gap: 3px;
}

.report-filter-toggle small,
.report-export-panel span {
  color: #c86528;
  font-size: 13px;
  font-weight: 900;
}

.report-filter-toggle strong {
  color: #0f2747;
  font-size: clamp(20px, 2.5vw, 26px);
}

.report-filter-toggle em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #0f2747;
  padding: 0 12px;
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.report-filter-body {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.hr-report-v2 .report-filter-grid select,
.hr-report-v2 .report-filter-grid input {
  min-width: 0;
  max-width: 100%;
}

.report-filter-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

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

.report-summary-v2 div {
  min-height: 126px;
  border-left-color: #0f2747;
  border-radius: 18px;
  padding: 18px;
}

.report-summary-v2 div.success {
  border-left-color: #16804a;
}

.report-summary-v2 div.warning {
  border-left-color: #b45309;
}

.report-summary-v2 div.danger {
  border-left-color: #b42318;
}

.report-summary-v2 strong {
  color: #0f2747;
  font-size: 34px;
  line-height: 1;
}

.report-summary-v2 small {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.hr-report-v2 .report-export-panel {
  position: sticky;
  top: 14px;
  z-index: 3;
}

.report-record-table {
  overflow-x: auto;
  border: 1px solid #d7deea;
  border-radius: 16px;
  background: #fff;
}

.report-record-table table {
  min-width: 920px;
}

.report-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.report-badge.success {
  background: #e8f7ef;
  color: #16804a;
}

.report-badge.warning {
  background: #fff7e8;
  color: #b45309;
}

.report-badge.danger {
  background: #fff0ee;
  color: #b42318;
}

.report-record-cards {
  display: none;
}

.report-anomaly-panel .section-head {
  margin-bottom: 16px;
}

.report-anomaly-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.report-anomaly-summary div {
  border: 1px solid #d7deea;
  border-left: 4px solid #0f2747;
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.report-anomaly-summary div.warning {
  border-left-color: #b45309;
}

.report-anomaly-summary div.danger {
  border-left-color: #b42318;
}

.report-anomaly-summary span {
  display: block;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.report-anomaly-summary strong {
  display: block;
  margin-top: 6px;
  color: #0f2747;
  font-size: 30px;
  line-height: 1;
}

.report-anomaly-list {
  display: grid;
  gap: 12px;
}

.report-anomaly-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border: 1px solid #ead9c8;
  border-radius: 18px;
  background: #fffdf9;
  padding: 14px;
}

.report-anomaly-card h3 {
  margin: 0;
  color: #0f2747;
  font-size: 18px;
}

.report-anomaly-card p {
  margin: 6px 0 0;
  color: #344054;
  font-weight: 800;
  line-height: 1.5;
}

.report-anomaly-card small {
  display: block;
  margin-top: 6px;
  color: #667085;
  font-weight: 800;
}

.report-empty-state {
  border: 1px dashed #cfd7e6;
  border-radius: 16px;
  background: #f8fafc;
  color: #667085;
  padding: 18px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 1080px) {
  .hr-report-v2 .report-hero-panel,
  .hr-report-v2 .report-export-panel {
    grid-template-columns: 1fr;
  }

  .report-summary-v2 {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 720px) {
  .hr-report-v2 {
    gap: 14px;
  }

  .hr-report-v2 .panel {
    border-radius: 18px;
    padding: 18px;
  }

  .report-section-tabs {
    border-radius: 14px;
  }

  .report-section-tab {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.3;
  }

  .report-section {
    gap: 14px;
  }

  .hr-report-v2 .report-hero-panel,
  .hr-report-v2 .report-export-panel {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .hr-report-v2 .section-head h2,
  .hr-report-v2 .report-export-panel h2 {
    font-size: 24px;
  }

  .report-export-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .report-export-actions .primary-button,
  .report-export-actions .secondary-button {
    width: 100%;
    min-height: 48px;
    white-space: normal;
  }

  .report-filter-panel:not(.open) .report-filter-body {
    display: none;
  }

  .report-filter-status {
    align-items: flex-start;
  }

  .hr-report-v2 .report-filter-grid {
    grid-template-columns: 1fr;
  }

  .hr-report-v2 .report-filter-grid .wide-field {
    grid-column: auto;
  }

  .report-summary-v2 {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .report-summary-v2 div {
    min-height: 104px;
  }

  .report-anomaly-summary,
  .report-anomaly-card {
    grid-template-columns: 1fr;
  }

  .hr-report-v2 .report-export-panel {
    top: 8px;
  }

  .report-record-table {
    display: none;
  }

  .report-record-cards {
    display: grid;
    gap: 12px;
  }

  .report-record-card {
    display: grid;
    gap: 12px;
    border: 1px solid #d7deea;
    border-radius: 18px;
    background: #fff;
    padding: 14px;
  }

  .report-record-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .report-record-head div {
    display: grid;
    min-width: 0;
    gap: 4px;
  }

  .report-record-head strong {
    color: #0f2747;
    font-size: 17px;
  }

  .report-record-head span:not(.report-badge) {
    color: #667085;
    font-size: 13px;
    font-weight: 800;
  }

  .report-record-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
  }

  .report-record-card dl div {
    display: grid;
    gap: 2px;
    min-width: 0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 9px;
  }

  .report-record-card dt {
    color: #667085;
    font-size: 12px;
    font-weight: 900;
  }

  .report-record-card dd {
    min-width: 0;
    margin: 0;
    color: #172033;
    font-size: 13px;
    font-weight: 900;
    overflow-wrap: anywhere;
  }
}

.notification-button {
  position: relative;
  border: 1px solid #d7deea;
  background: #fff;
  color: #344054;
  min-height: 36px;
  padding: 0 12px;
}

.notification-button.has-items {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #78350f;
}

.notification-button span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 999px;
  background: #d92d20;
  color: #fff;
  font-size: 12px;
}

.notification-panel {
  position: absolute;
  top: 72px;
  right: 24px;
  z-index: 20;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  padding: 8px;
}

.notification-item {
  display: block;
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 12px;
  text-align: left;
}

.notification-item:hover {
  background: #f8fafc;
}

.notification-item strong,
.notification-item span {
  display: block;
}

.notification-item span,
.notification-empty {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
}

.notification-empty {
  padding: 12px;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  color: #475467;
  font-size: 14px;
  font-weight: 800;
}

.warning {
  margin: 16px 0 0;
  color: #b42318;
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid #e5eaf3;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

td {
  color: #111827;
}

@media (max-width: 860px) {
  .layout,
  .form-grid,
  .actions,
  .login-panel,
  .editor-form,
  .compact-editor,
  .time-request-form,
  .report-filter-grid,
  .metric-grid,
  .report-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .record-row,
  .section-head,
  .button-row,
  .quick-status-card {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-status-card {
    grid-template-columns: 1fr;
  }

  .quick-status-meta {
    min-width: 0;
    border-left: 0;
    border-top: 1px solid #e5eaf3;
    padding-left: 0;
    padding-top: 12px;
  }

  .check-actions {
    grid-template-columns: 1fr;
  }

  .check-actions button {
    min-height: 60px;
    font-size: 18px;
  }

  .check-actions #checkInBtn,
  .check-actions #checkOutBtn {
    min-height: 72px;
    font-size: 21px;
  }

  .employee-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide-field {
    grid-column: auto;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1;
  }

  .chart-row {
    grid-template-columns: 1fr 42px;
  }

  .chart-row span {
    grid-column: 1 / -1;
  }

  .notification-panel {
    top: 96px;
    left: 16px;
    right: auto;
  }

  .backoffice-shell #mainContent:not(.hidden) {
    display: block;
  }

  .backoffice-shell .tabs {
    position: static;
    display: flex;
    gap: 8px;
    margin: 0 0 14px;
    padding: 8px;
    overflow-x: auto;
  }

  .backoffice-shell .tab {
    width: auto;
    flex: 0 0 auto;
    justify-content: center;
    text-align: center;
  }

  .backoffice-shell .topbar {
    padding: 14px;
  }

  .backoffice-shell .topbar h1 {
    font-size: 34px;
  }
}

@media (max-width: 860px) {
  .employee-shell .topbar {
    align-items: flex-start;
    flex-direction: row;
  }

  .employee-shell .topbar .eyebrow {
    margin-bottom: 2px;
  }

  .employee-shell .topbar h1 {
    font-size: 30px;
  }

  .employee-shell .top-actions {
    justify-content: flex-end;
  }

  .employee-shell #userBadge {
    display: none;
  }

  .employee-checkin-view .section-head {
    margin-bottom: 10px;
    padding: 12px 14px;
  }

  .employee-checkin-view .section-head h2 {
    font-size: 20px;
  }

  .employee-checkin-view .check-actions #checkInBtn,
  .employee-checkin-view .check-actions #checkOutBtn {
    width: min(190px, 58vw);
    height: min(190px, 58vw);
    min-height: 168px;
    font-size: 26px;
  }

  .employee-checkin-view .employee-quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .employee-checkin-view .employee-quick-actions button {
    min-height: 96px;
    padding: 8px 4px;
  }

  .employee-checkin-view .employee-quick-actions button span {
    width: 40px;
    height: 40px;
  }

  .employee-checkin-view .employee-quick-actions button strong {
    font-size: 11px;
  }

  .employee-checkin-view .time-request-form {
    grid-template-columns: 1fr;
  }

  .employee-checkin-view .time-request-form .wide-field {
    grid-column: auto;
  }

  .employee-checkin-view.office-checkin .employee-quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .employee-checkin-view.office-checkin .employee-quick-actions button[data-employee-quick="substitute"] {
    display: none;
  }

  .employee-checkin-view.office-checkin .check-actions #checkInBtn,
  .employee-checkin-view.office-checkin .check-actions #checkOutBtn {
    width: min(224px, 70vw);
    height: min(224px, 70vw);
    min-height: 198px;
  }

  .employee-checkin-view.office-checkin .mode-field label {
    min-height: 120px;
    font-size: 21px;
  }

  .office-mode-info {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 20px;
    border-radius: 28px;
  }
}

.employee-checkin-view .time-request-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #d9e1ee;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.employee-checkin-view .time-request-box h2 {
  margin: 0 0 12px;
  color: #172033;
  font-size: 20px;
  line-height: 1.25;
}

.employee-checkin-view .time-request-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.employee-checkin-view .time-request-form label {
  min-width: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.employee-checkin-view .time-request-form input,
.employee-checkin-view .time-request-form select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border-color: #ccd6e5;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font-size: 15px;
}

.employee-checkin-view .time-request-form .time-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.employee-checkin-view .time-request-form .time-picker strong {
  display: none;
}

.employee-checkin-view .time-request-form .time-picker span {
  color: #667085;
  font-size: 12px;
}

.employee-checkin-view .time-request-form .wide-field {
  grid-column: 1 / -1;
}

.employee-checkin-view .time-request-form .review-request-button {
  grid-column: 1 / -1;
  justify-self: start;
  width: min(280px, 100%);
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: #1b365d;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(27, 54, 93, 0.16);
}

.employee-checkin-view.office-checkin .time-request-box {
  border-color: rgba(224, 64, 160, 0.18);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(224, 64, 160, 0.08);
}

.employee-checkin-view.office-checkin .time-request-box h2 {
  color: #9d1b69;
}

.employee-checkin-view.office-checkin .time-request-form .review-request-button {
  background: #e040a0;
  box-shadow: 0 10px 22px rgba(224, 64, 160, 0.18);
}

.employee-checkin-view .time-request-box .record-list {
  margin-top: 14px;
}

@media (max-width: 640px) {
  .employee-checkin-view .time-request-box {
    padding: 14px;
    border-radius: 16px;
  }

  .employee-checkin-view.office-checkin .time-request-box {
    border-radius: 20px;
  }

  .employee-checkin-view .time-request-box h2 {
    font-size: 18px;
  }

  .employee-checkin-view .time-request-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .employee-checkin-view .time-request-form .wide-field {
    grid-column: auto;
  }

  .employee-checkin-view .time-request-form .review-request-button {
    justify-self: stretch;
    width: 100%;
  }
}

.employee-checkin-view.guard-checkin {
  --guard-bg: #0a0e1a;
  --guard-card: rgba(15, 21, 36, 0.68);
  --guard-card-strong: rgba(20, 28, 46, 0.82);
  --guard-line: rgba(125, 211, 252, 0.16);
  --guard-primary: #7dd3fc;
  --guard-secondary: #c8a0f0;
  --guard-text: #e0e8f0;
  --guard-muted: #a0b4c4;
  --guard-ok: #4ade80;
  --guard-warn: #facc15;
  --guard-danger: #ff6b6b;
  color: var(--guard-text);
}

.employee-shell:has(.guard-checkin.active) {
  background: #0a0e1a;
}

.employee-shell:has(.guard-checkin.active) .app-shell {
  width: min(560px, 100%);
}

.employee-shell:has(.guard-checkin.active) .topbar {
  max-width: 560px;
  min-height: 64px;
  margin: 0 auto 18px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 0;
  background: rgba(15, 21, 36, 0.76);
  color: #e0e8f0;
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.26);
}

.employee-shell:has(.guard-checkin.active) .topbar .eyebrow {
  color: #7dd3fc;
}

.employee-shell:has(.guard-checkin.active) .topbar h1 {
  color: #7dd3fc;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.employee-shell:has(.guard-checkin.active) #userBadge {
  background: rgba(224, 232, 240, 0.92);
  color: #0a0e1a;
}

.employee-shell:has(.guard-checkin.active) #logoutBtn {
  border-color: rgba(125, 211, 252, 0.16);
  background: rgba(125, 211, 252, 0.08);
  color: #e0e8f0;
}

.employee-checkin-view.guard-checkin .employee-mobile-layout {
  max-width: 520px;
  padding: 0 14px 28px;
}

.employee-checkin-view.guard-checkin .section-head {
  margin-bottom: 16px;
  border: 1px solid var(--guard-line);
  border-radius: 18px;
  background: var(--guard-card-strong);
  color: var(--guard-text);
  backdrop-filter: blur(20px);
  box-shadow: 0 0 30px rgba(125, 211, 252, 0.06);
}

.employee-checkin-view.guard-checkin .section-head h2 {
  color: var(--guard-primary);
  font-size: 22px;
}

.employee-checkin-view.guard-checkin .section-head p {
  color: var(--guard-muted);
}

.employee-checkin-view.guard-checkin .quick-status-card {
  gap: 12px;
  margin-bottom: 12px;
}

.employee-checkin-view.guard-checkin .employee-profile-card,
.employee-checkin-view.guard-checkin .quick-status-meta,
.employee-checkin-view.guard-checkin .employee-clock-card,
.employee-checkin-view.guard-checkin .check-fields,
.employee-checkin-view.guard-checkin .gps-card,
.employee-checkin-view.guard-checkin .site-card,
.employee-checkin-view.guard-checkin .time-request-box {
  border: 1px solid var(--guard-line);
  border-radius: 18px;
  background: var(--guard-card);
  color: var(--guard-text);
  backdrop-filter: blur(18px);
  box-shadow: 0 0 30px rgba(125, 211, 252, 0.06);
}

.employee-checkin-view.guard-checkin .employee-profile-card {
  grid-template-columns: 64px minmax(0, 1fr) auto;
  padding: 18px;
  overflow: hidden;
}

.employee-checkin-view.guard-checkin .employee-avatar {
  width: 64px;
  height: 64px;
  border: 2px solid rgba(125, 211, 252, 0.34);
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.1);
  color: var(--guard-primary);
  font-size: 26px;
}

.employee-checkin-view.guard-checkin .employee-profile-text strong {
  color: var(--guard-text);
  font-size: 20px;
}

.employee-checkin-view.guard-checkin .work-mode-badge {
  background: rgba(125, 211, 252, 0.12);
  color: var(--guard-primary);
}

.employee-checkin-view.guard-checkin .today-status-badge {
  border: 1px solid rgba(255, 107, 107, 0.22);
  background: rgba(255, 107, 107, 0.12);
  color: #ffb3b3;
}

.employee-checkin-view.guard-checkin .today-status-badge.active {
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(74, 222, 128, 0.14);
  color: var(--guard-ok);
}

.employee-checkin-view.guard-checkin .today-status-badge.done {
  border-color: rgba(160, 180, 196, 0.2);
  background: rgba(160, 180, 196, 0.12);
  color: var(--guard-muted);
}

.employee-checkin-view.guard-checkin .quick-status-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.employee-checkin-view.guard-checkin .quick-status-meta > div {
  min-width: 0;
  border-left: 3px solid rgba(200, 160, 240, 0.74);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  padding: 10px 12px;
}

.employee-checkin-view.guard-checkin .quick-status-meta .check-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.employee-checkin-view.guard-checkin .quick-status-meta span {
  color: rgba(160, 180, 196, 0.86);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.employee-checkin-view.guard-checkin .quick-status-meta strong {
  color: var(--guard-text);
  font-size: 15px;
}

.employee-checkin-view.guard-checkin .gps-card {
  margin-top: 12px;
  margin-bottom: 18px;
  border-left: 4px solid var(--guard-ok);
}

.employee-checkin-view.guard-checkin .gps-card.warn,
.employee-checkin-view.guard-checkin .gps-card.error {
  border-left-color: var(--guard-warn);
}

.employee-checkin-view.guard-checkin .gps-card-head {
  border-bottom-color: var(--guard-line);
}

.employee-checkin-view.guard-checkin .gps-card-head strong {
  color: var(--guard-text);
}

.employee-checkin-view.guard-checkin .gps-icon {
  background: rgba(74, 222, 128, 0.14);
  color: var(--guard-ok);
}

.employee-checkin-view.guard-checkin .gps-status-pill {
  border: 1px solid rgba(160, 180, 196, 0.16);
  background: rgba(160, 180, 196, 0.1);
  color: var(--guard-muted);
}

.employee-checkin-view.guard-checkin .gps-status-pill.ok {
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(74, 222, 128, 0.14);
  color: var(--guard-ok);
}

.employee-checkin-view.guard-checkin .gps-status-pill.warn,
.employee-checkin-view.guard-checkin .gps-status-pill.checking {
  border-color: rgba(250, 204, 21, 0.24);
  background: rgba(250, 204, 21, 0.12);
  color: var(--guard-warn);
}

.employee-checkin-view.guard-checkin .gps-card p,
.employee-checkin-view.guard-checkin .gps-card small {
  color: var(--guard-muted);
}

.employee-checkin-view.guard-checkin .gps-metrics div {
  background: rgba(255, 255, 255, 0.06);
}

.employee-checkin-view.guard-checkin .gps-metrics span {
  color: var(--guard-muted);
}

.employee-checkin-view.guard-checkin .gps-metrics strong {
  color: var(--guard-primary);
}

.employee-checkin-view.guard-checkin .check-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

.employee-checkin-view.guard-checkin .check-actions #checkInBtn,
.employee-checkin-view.guard-checkin .check-actions #checkOutBtn {
  width: 204px;
  height: 204px;
  min-height: 204px;
  border: 1px solid rgba(125, 211, 252, 0.42);
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.1);
  color: var(--guard-primary);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(18px);
  box-shadow: 0 0 42px rgba(125, 211, 252, 0.18);
}

.employee-checkin-view.guard-checkin .check-actions #checkInBtn::before,
.employee-checkin-view.guard-checkin .check-actions #checkOutBtn::before {
  content: "";
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 auto 12px;
  border: 4px solid rgba(125, 211, 252, 0.46);
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.employee-checkin-view.guard-checkin .check-actions #checkOutBtn {
  border-color: rgba(255, 107, 107, 0.42);
  background: rgba(255, 107, 107, 0.1);
  color: #ffb3b3;
  box-shadow: 0 0 42px rgba(255, 107, 107, 0.16);
}

.employee-checkin-view.guard-checkin .check-actions #checkOutBtn::before {
  border-color: rgba(255, 107, 107, 0.46);
  background: rgba(255, 107, 107, 0.16);
}

.employee-checkin-view.guard-checkin .location-button,
.employee-checkin-view.guard-checkin .check-actions #setSiteLocationBtn,
.employee-checkin-view.guard-checkin .check-actions #continueShiftBtn {
  width: min(100%, 360px);
  min-height: 48px;
  border: 1px solid var(--guard-line);
  border-radius: 14px;
  background: rgba(125, 211, 252, 0.1);
  color: var(--guard-primary);
}

.employee-checkin-view.guard-checkin .employee-clock-card {
  margin: 8px 0 18px;
  padding: 18px;
  text-align: center;
}

.employee-checkin-view.guard-checkin .clock-row strong {
  color: var(--guard-text);
  font-size: clamp(38px, 11vw, 52px);
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: 0 0 15px rgba(125, 211, 252, 0.32);
}

.employee-checkin-view.guard-checkin .employee-clock-card p,
.employee-checkin-view.guard-checkin .employee-clock-card small {
  color: var(--guard-muted);
}

.employee-checkin-view.guard-checkin .shift-pill {
  border-color: rgba(200, 160, 240, 0.26);
  background: rgba(200, 160, 240, 0.1);
  color: var(--guard-secondary);
}

.employee-checkin-view.guard-checkin .employee-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
}

.employee-checkin-view.guard-checkin .employee-quick-actions button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 72px;
  border: 1px solid var(--guard-line);
  border-radius: 14px;
  background: var(--guard-card);
  color: var(--guard-text);
  padding: 14px;
  text-align: left;
  backdrop-filter: blur(16px);
}

.employee-checkin-view.guard-checkin .employee-quick-actions button span {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(125, 211, 252, 0.12);
  color: var(--guard-primary);
}

.employee-checkin-view.guard-checkin .employee-quick-actions button strong {
  color: var(--guard-text);
  font-size: 14px;
  text-align: left;
}

.employee-checkin-view.guard-checkin .check-fields,
.employee-checkin-view.guard-checkin .site-card {
  margin-top: 12px;
}

.employee-checkin-view.guard-checkin .check-fields label,
.employee-checkin-view.guard-checkin .time-request-form label {
  color: var(--guard-muted);
}

.employee-checkin-view.guard-checkin .check-fields select,
.employee-checkin-view.guard-checkin .check-fields input,
.employee-checkin-view.guard-checkin .time-request-form input,
.employee-checkin-view.guard-checkin .time-request-form select {
  border-color: var(--guard-line);
  background: rgba(10, 14, 26, 0.58);
  color: var(--guard-text);
}

.employee-checkin-view.guard-checkin .time-request-box h2 {
  color: var(--guard-primary);
}

.employee-checkin-view.guard-checkin .time-request-form .review-request-button {
  background: rgba(125, 211, 252, 0.18);
  color: var(--guard-primary);
}

@media (max-width: 430px) {
  .employee-checkin-view.guard-checkin .employee-mobile-layout {
    padding: 0 10px 24px;
  }

  .employee-checkin-view.guard-checkin .employee-profile-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .employee-checkin-view.guard-checkin .employee-profile-card > .today-status-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .employee-checkin-view.guard-checkin .quick-status-meta,
  .employee-checkin-view.guard-checkin .employee-quick-actions {
    grid-template-columns: 1fr;
  }

  .employee-checkin-view.guard-checkin .employee-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-checkin-view.guard-checkin .employee-quick-actions button {
    align-items: center;
    gap: 8px;
    min-height: 68px;
    padding: 10px;
  }

  .employee-checkin-view.guard-checkin .employee-quick-actions button span {
    width: 36px;
    height: 36px;
  }

  .employee-checkin-view.guard-checkin .employee-quick-actions button strong {
    font-size: 12px;
  }

  .employee-checkin-view.guard-checkin .clock-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .employee-checkin-view.guard-checkin .clock-row strong {
    font-size: clamp(34px, 12vw, 44px);
    line-height: 1;
  }

  .employee-checkin-view.guard-checkin .check-actions #checkInBtn,
  .employee-checkin-view.guard-checkin .check-actions #checkOutBtn {
    width: min(196px, 62vw);
    height: min(196px, 62vw);
    min-height: 184px;
    font-size: 19px;
  }

  .employee-checkin-view.guard-checkin .check-actions #checkInBtn::before,
  .employee-checkin-view.guard-checkin .check-actions #checkOutBtn::before {
    width: min(124px, 40vw);
    height: min(124px, 40vw);
  }
}

.back-to-checkin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 520px);
  min-height: 48px;
  margin: 0 auto 14px;
  border: 1px solid #cfd7e6;
  border-radius: 14px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.employee-shell .back-to-checkin-button {
  display: flex;
}

.employee-office-shell .back-to-checkin-button,
.employee-shell:has(.office-checkin.active) .back-to-checkin-button {
  border-color: rgba(224, 64, 160, 0.22);
  background: #fff;
  color: #9d1b69;
  box-shadow: 0 10px 24px rgba(224, 64, 160, 0.1);
}

.employee-guard-shell .back-to-checkin-button,
.employee-shell:has(.guard-checkin.active) .back-to-checkin-button,
.employee-shell:not(:has(.office-checkin.active)) .back-to-checkin-button {
  border-color: rgba(125, 211, 252, 0.18);
  background: rgba(15, 21, 36, 0.76);
  color: #7dd3fc;
  backdrop-filter: blur(16px);
  box-shadow: 0 0 28px rgba(125, 211, 252, 0.08);
}

.staff-shell .back-to-checkin-button,
.back-to-checkin-button.hidden {
  display: none;
}

.employee-shell .employee-checkin-view .check-fields {
  margin: 12px 0 14px;
}

.employee-shell .employee-checkin-view .check-fields label:has(#employeeSelect),
.employee-shell .employee-checkin-view .check-fields label:has(#siteSelect) {
  display: none;
}

.employee-shell .employee-checkin-view .check-fields label:has(#periodSelect) {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  color: var(--mobile-primary);
  font-size: 15px;
  font-weight: 900;
}

.employee-shell .employee-checkin-view .check-fields label:has(#periodSelect)::before {
  content: "เลือกก่อนเช็คอิน";
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 12px;
}

.employee-shell .employee-checkin-view .check-fields #periodSelect {
  min-height: 54px;
  border-width: 2px;
  font-size: 17px;
  font-weight: 900;
}

.employee-shell .employee-checkin-view .check-fields label:has(#noteInput) {
  grid-column: 1 / -1;
}

.employee-office-shell .employee-checkin-view .check-fields label:has(#periodSelect)::before {
  background: #ffd6ee;
  color: #9d1b69;
}

.employee-guard-shell .employee-checkin-view .check-fields label:has(#periodSelect) {
  color: #7dd3fc;
}

.employee-guard-shell .employee-checkin-view .check-fields label:has(#periodSelect)::before {
  background: rgba(125, 211, 252, 0.12);
  color: #7dd3fc;
}

/* Vigilance Direct guard UI */
.employee-checkin-view.guard-checkin {
  --guard-primary: #002046;
  --guard-primary-soft: #d6e3ff;
  --guard-card: #ffffff;
  --guard-surface: #f8f9fa;
  --guard-line: #d7deea;
  --guard-text: #191c1d;
  --guard-muted: #44474e;
  --guard-green: #3b6934;
  --guard-green-soft: #b9eeab;
  color: var(--guard-text);
}

.employee-guard-shell,
.employee-shell:has(.guard-checkin.active) {
  background: #f8f9fa;
}

.employee-shell:has(.guard-checkin.active) .app-shell {
  width: min(600px, 100%);
  padding: 0 16px 84px;
}

.employee-shell:has(.guard-checkin.active) .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  max-width: 600px;
  min-height: 56px;
  margin: 0 auto 18px;
  border: 0;
  border-radius: 0 0 8px 8px;
  background: #002046;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 32, 70, 0.16);
}

.employee-shell:has(.guard-checkin.active) .topbar .eyebrow {
  display: none;
}

.employee-shell:has(.guard-checkin.active) .topbar h1 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.employee-shell:has(.guard-checkin.active) #userBadge {
  display: none;
}

.employee-shell:has(.guard-checkin.active) #logoutBtn {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.employee-guard-shell .topbar {
  background: #002046;
  color: #ffffff;
  backdrop-filter: none;
}

.employee-guard-shell .topbar h1 {
  color: #ffffff;
}

.employee-checkin-view.guard-checkin .employee-mobile-layout {
  max-width: 600px;
  padding: 0 0 28px;
}

.employee-checkin-view.guard-checkin .section-head {
  display: none;
}

.employee-checkin-view.guard-checkin .quick-status-card {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
}

.employee-checkin-view.guard-checkin .employee-profile-card,
.employee-checkin-view.guard-checkin .quick-status-meta,
.employee-checkin-view.guard-checkin .employee-clock-card,
.employee-checkin-view.guard-checkin .check-fields,
.employee-checkin-view.guard-checkin .gps-card,
.employee-checkin-view.guard-checkin .site-card,
.employee-checkin-view.guard-checkin .time-request-box {
  border: 1px solid var(--guard-line);
  border-radius: 12px;
  background: var(--guard-card);
  color: var(--guard-text);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  backdrop-filter: none;
}

.employee-checkin-view.guard-checkin .employee-profile-card {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.employee-checkin-view.guard-checkin .employee-avatar {
  width: 64px;
  height: 64px;
  border: 2px solid var(--guard-primary-soft);
  border-radius: 999px;
  background: var(--guard-primary-soft);
  color: var(--guard-primary);
  font-size: 28px;
}

.employee-checkin-view.guard-checkin .employee-profile-text strong {
  color: var(--guard-primary);
  font-size: 21px;
}

.employee-checkin-view.guard-checkin .employee-status-badges {
  gap: 6px;
}

.employee-checkin-view.guard-checkin .work-mode-badge {
  background: var(--guard-primary-soft);
  color: #001b3d;
}

.employee-checkin-view.guard-checkin .today-status-badge {
  justify-self: start;
  border: 0;
  background: #ffdad6;
  color: #93000a;
}

.employee-checkin-view.guard-checkin .today-status-badge.active {
  background: var(--guard-green-soft);
  color: #23501e;
}

.employee-checkin-view.guard-checkin .today-status-badge.done {
  background: #e1e3e4;
  color: #44474e;
}

.employee-checkin-view.guard-checkin .employee-clock-card {
  margin: 0 0 12px;
  padding: 16px;
  text-align: center;
}

.employee-checkin-view.guard-checkin .clock-row {
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.employee-checkin-view.guard-checkin .clock-row strong {
  color: var(--guard-primary);
  font-size: clamp(44px, 13vw, 58px);
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0, 32, 70, 0.1);
}

.employee-checkin-view.guard-checkin .employee-clock-card p,
.employee-checkin-view.guard-checkin .employee-clock-card small {
  color: var(--guard-muted);
}

.employee-checkin-view.guard-checkin .shift-pill {
  border: 1px solid var(--guard-line);
  border-radius: 10px;
  background: #f3f4f5;
  color: var(--guard-primary);
}

.employee-checkin-view.guard-checkin .quick-status-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.employee-checkin-view.guard-checkin .quick-status-meta > div {
  min-width: 0;
  border: 1px solid var(--guard-line);
  border-left: 0;
  border-radius: 12px;
  background: var(--guard-card);
  padding: 14px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.employee-checkin-view.guard-checkin .quick-status-meta span {
  color: var(--guard-muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.employee-checkin-view.guard-checkin .quick-status-meta strong {
  color: var(--guard-primary);
  font-size: 16px;
}

.employee-checkin-view.guard-checkin .quick-status-meta .check-time-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.employee-guard-shell .employee-checkin-view .check-fields {
  margin: 12px 0;
  padding: 14px;
}

.employee-guard-shell .employee-checkin-view .check-fields label:has(#periodSelect) {
  color: var(--guard-primary);
}

.employee-guard-shell .employee-checkin-view .check-fields label:has(#periodSelect)::before {
  content: "เลือกก่อนเช็คอิน";
  background: var(--guard-primary-soft);
  color: #001b3d;
}

.employee-checkin-view.guard-checkin .check-fields select,
.employee-checkin-view.guard-checkin .check-fields input,
.employee-checkin-view.guard-checkin .time-request-form input,
.employee-checkin-view.guard-checkin .time-request-form select {
  border-color: var(--guard-line);
  background: #ffffff;
  color: var(--guard-text);
}

.employee-checkin-view.guard-checkin .gps-card {
  margin: 12px 0;
  border-left: 0;
  padding: 14px;
}

.employee-checkin-view.guard-checkin .gps-card-head {
  border-bottom-color: var(--guard-line);
}

.employee-checkin-view.guard-checkin .gps-card-head strong {
  color: var(--guard-primary);
}

.employee-checkin-view.guard-checkin .gps-icon {
  background: var(--guard-green-soft);
  color: #23501e;
}

.employee-checkin-view.guard-checkin .gps-status-pill {
  border: 0;
  background: #e1e3e4;
  color: #44474e;
}

.employee-checkin-view.guard-checkin .gps-status-pill.ok {
  background: var(--guard-green-soft);
  color: #23501e;
}

.employee-checkin-view.guard-checkin .gps-status-pill.warn,
.employee-checkin-view.guard-checkin .gps-status-pill.checking {
  background: #ffdfa0;
  color: #5c4300;
}

.employee-checkin-view.guard-checkin .gps-card p,
.employee-checkin-view.guard-checkin .gps-card small {
  color: var(--guard-muted);
}

.employee-checkin-view.guard-checkin .gps-metrics div {
  background: #f3f4f5;
}

.employee-checkin-view.guard-checkin .gps-metrics span {
  color: var(--guard-muted);
}

.employee-checkin-view.guard-checkin .gps-metrics strong {
  color: var(--guard-primary);
}

.employee-checkin-view.guard-checkin .check-actions {
  margin: 20px 0 18px;
}

.employee-checkin-view.guard-checkin .check-actions #checkInBtn,
.employee-checkin-view.guard-checkin .check-actions #checkOutBtn {
  width: 192px;
  height: 192px;
  min-height: 192px;
  border: 8px solid var(--guard-green-soft);
  border-radius: 999px;
  background: #22c55e;
  color: #ffffff;
  font-size: 24px;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 16px 32px rgba(34, 197, 94, 0.28);
}

.employee-checkin-view.guard-checkin .check-actions #checkInBtn::before,
.employee-checkin-view.guard-checkin .check-actions #checkOutBtn::before {
  width: 78px;
  height: 78px;
  margin-bottom: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  content: "◎";
  color: #ffffff;
  font-size: 70px;
  line-height: 1;
}

.employee-checkin-view.guard-checkin .check-actions #checkOutBtn {
  border-color: #ffdad6;
  background: #ba1a1a;
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(186, 26, 26, 0.24);
}

.employee-checkin-view.guard-checkin .location-button,
.employee-checkin-view.guard-checkin .check-actions #setSiteLocationBtn,
.employee-checkin-view.guard-checkin .check-actions #continueShiftBtn {
  width: min(100%, 360px);
  min-height: 48px;
  border: 2px solid var(--guard-line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--guard-primary);
}

.employee-checkin-view.guard-checkin .employee-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}

.employee-checkin-view.guard-checkin .employee-quick-actions::before {
  content: "เมนูด่วน";
  grid-column: 1 / -1;
  color: var(--guard-text);
  font-size: 18px;
  font-weight: 900;
}

.employee-checkin-view.guard-checkin .employee-quick-actions button {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 98px;
  border: 0;
  border-radius: 12px;
  background: #edeeef;
  color: var(--guard-text);
  padding: 12px;
  text-align: center;
  box-shadow: none;
}

.employee-checkin-view.guard-checkin .employee-quick-actions button span {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--guard-primary-soft);
  color: var(--guard-primary);
}

.employee-checkin-view.guard-checkin .employee-quick-actions button strong {
  color: var(--guard-text);
  font-size: 14px;
  text-align: center;
}

.employee-checkin-view.guard-checkin .time-request-box h2 {
  color: var(--guard-primary);
}

.employee-checkin-view.guard-checkin .time-request-form .review-request-button {
  background: var(--guard-primary);
  color: #ffffff;
}

/* Office staff luxury/minimal UI */
.employee-checkin-view.office-checkin {
  --office-bg: #fdfbf7;
  --office-card: #ffffff;
  --office-text: #2c2c2c;
  --office-muted: #6f6a63;
  --office-line: #e5e1da;
  --office-gold: #c5a059;
  --office-gold-soft: #f5f1e9;
  --office-charcoal: #2c2c2c;
  --mobile-primary: var(--office-charcoal);
  --mobile-green: var(--office-charcoal);
  --mobile-green-soft: var(--office-gold-soft);
  --mobile-surface: var(--office-bg);
  --mobile-card: var(--office-card);
  --mobile-border: var(--office-line);
  --mobile-text: var(--office-text);
  --mobile-muted: var(--office-muted);
  color: var(--office-text);
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.employee-checkin-view.office-checkin,
.employee-checkin-view.office-checkin * {
  box-sizing: border-box;
  min-width: 0;
}

.employee-checkin-view.office-checkin button,
.employee-checkin-view.office-checkin label,
.employee-checkin-view.office-checkin strong,
.employee-checkin-view.office-checkin p,
.employee-checkin-view.office-checkin h3 {
  overflow-wrap: anywhere;
}

.employee-office-shell,
.employee-shell:has(.office-checkin.active) {
  background: var(--office-bg);
}

.employee-shell:has(.office-checkin.active) .app-shell {
  width: min(600px, 100%);
  padding: 0 24px 92px;
}

.employee-shell:has(.office-checkin.active) .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  max-width: 600px;
  min-height: 64px;
  margin: 0 auto 28px;
  padding: 0 24px;
  border: 0;
  border-bottom: 1px solid var(--office-line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  color: var(--office-text);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.employee-shell:has(.office-checkin.active) .topbar > div:first-child {
  min-width: 0;
}

.employee-shell:has(.office-checkin.active) .topbar .eyebrow,
.employee-shell:has(.office-checkin.active) #userBadge {
  display: none;
}

.employee-shell:has(.office-checkin.active) .topbar h1 {
  color: var(--office-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 4.8vw, 24px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: normal;
}

.employee-shell:has(.office-checkin.active) .topbar h1::before {
  content: "\25C7";
  display: inline-grid;
  place-items: center;
  width: auto;
  height: auto;
  margin-right: 10px;
  border-radius: 0;
  background: transparent;
  color: var(--office-gold);
  font-size: 24px;
  vertical-align: baseline;
}

.employee-shell:has(.office-checkin.active) #logoutBtn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--office-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--office-text);
  box-shadow: none;
}

.employee-checkin-view.office-checkin .employee-mobile-layout {
  max-width: 600px;
  padding: 0 0 32px;
}

.employee-checkin-view.office-checkin .quick-status-card {
  gap: 0;
  margin: 0;
}

.employee-checkin-view.office-checkin .employee-profile-card,
.employee-checkin-view.office-checkin .mode-field label,
.office-mode-info,
.employee-checkin-view.office-checkin .employee-clock-card,
.employee-checkin-view.office-checkin .gps-card,
.employee-checkin-view.office-checkin .time-request-box,
.employee-checkin-view.office-checkin .employee-quick-actions button {
  border: 1px solid var(--office-line);
  border-radius: 8px;
  background: var(--office-card);
  color: var(--office-text);
  box-shadow: 0 4px 20px rgba(44, 44, 44, 0.04);
}

.employee-checkin-view.office-checkin .employee-profile-card {
  position: relative;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 0 0 28px;
  padding: 24px;
  overflow: hidden;
}

.employee-checkin-view.office-checkin .employee-avatar {
  width: 72px;
  height: 72px;
  border: 1px solid var(--office-line);
  border-radius: 999px;
  background: var(--office-gold-soft);
  color: var(--office-charcoal);
  font-size: 30px;
  box-shadow: inset 0 0 0 3px #ffffff;
}

.employee-checkin-view.office-checkin .employee-profile-text {
  min-width: 0;
}

.employee-checkin-view.office-checkin .employee-profile-text strong {
  display: block;
  max-width: calc(100% - 92px);
  color: var(--office-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 4.8vw, 24px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.employee-checkin-view.office-checkin .employee-status-badges {
  gap: 8px;
  margin-top: 8px;
  max-width: 100%;
}

.employee-checkin-view.office-checkin .work-mode-badge,
.employee-checkin-view.office-checkin .today-status-badge {
  min-height: 26px;
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 999px;
  background: #ffffff;
  color: var(--office-gold);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: normal;
}

.employee-checkin-view.office-checkin .employee-profile-card > .today-status-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  max-width: 112px;
  line-height: 1.15;
}

.employee-checkin-view.office-checkin .mode-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 28px;
}

.employee-checkin-view.office-checkin .mode-field legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.employee-checkin-view.office-checkin .mode-field label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 74px;
  padding: 12px 14px;
  color: rgba(44, 44, 44, 0.42);
  font-size: clamp(17px, 4.5vw, 21px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.employee-checkin-view.office-checkin .mode-field label:has(input:checked) {
  border-color: var(--office-charcoal);
  background: var(--office-charcoal);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(44, 44, 44, 0.16);
}

.employee-checkin-view.office-checkin .mode-field label:has(input[value="wfh"])::before {
  content: "\2302";
  color: var(--office-gold);
  font-size: 25px;
}

.employee-checkin-view.office-checkin .mode-field label:has(input[value="office"])::before {
  content: "\25A6";
  font-size: 24px;
}

.employee-checkin-view.office-checkin .mode-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.office-mode-info {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  margin: 0 0 32px;
  padding: 24px;
  background: rgba(245, 241, 233, 0.72);
}

.office-mode-info::after {
  display: none;
}

.office-mode-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--office-gold);
  border-radius: 999px;
  background: transparent;
  color: var(--office-gold);
}

.office-mode-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.office-mode-info h3 {
  margin: 0 0 10px;
  color: var(--office-gold);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.office-mode-info strong {
  display: block;
  color: var(--office-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 4.8vw, 25px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
}

.office-mode-info p {
  position: relative;
  margin: 18px 0 0;
  padding-top: 18px;
  color: rgba(44, 44, 44, 0.62);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

.office-mode-info p::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 1px;
  background: rgba(197, 160, 89, 0.35);
}

.employee-checkin-view.office-checkin .employee-clock-card {
  margin: 0 0 30px;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.employee-checkin-view.office-checkin .clock-row {
  justify-content: center;
}

.employee-checkin-view.office-checkin .clock-row strong {
  color: var(--office-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 16vw, 92px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: none;
}

.employee-checkin-view.office-checkin .clock-row .today-status-badge {
  display: none;
}

.employee-checkin-view.office-checkin .employee-clock-card p {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  margin: 12px auto 0;
  padding: 0 22px 10px;
  border-bottom: 1px solid var(--office-line);
  border-radius: 0;
  background: transparent;
  color: rgba(44, 44, 44, 0.48);
  font-size: clamp(13px, 3.4vw, 16px);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.employee-checkin-view.office-checkin .shift-pill,
.employee-checkin-view.office-checkin .employee-clock-card small,
.employee-checkin-view.office-checkin .quick-status-meta,
.employee-checkin-view.office-checkin .site-card,
.employee-checkin-view.office-checkin .check-fields {
  display: none;
}

.employee-checkin-view.office-checkin .check-actions {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0 0 34px;
}

.employee-checkin-view.office-checkin .check-actions #checkInBtn,
.employee-checkin-view.office-checkin .check-actions #checkOutBtn {
  position: relative;
  width: min(248px, 62vw);
  height: min(248px, 62vw);
  min-height: 210px;
  border: 6px solid #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 18px 46px rgba(44, 44, 44, 0.18);
}

.employee-checkin-view.office-checkin .check-actions #checkInBtn::before,
.employee-checkin-view.office-checkin .check-actions #checkOutBtn::before {
  content: "\25CE";
  display: block;
  width: auto;
  height: auto;
  margin: 0 auto 8px;
  border-radius: 0;
  background: transparent;
  color: var(--office-gold);
  font-size: 58px;
  line-height: 1;
}

.employee-checkin-view.office-checkin .check-actions #checkOutBtn {
  background: linear-gradient(135deg, #3b1f1f 0%, #6f2c2c 100%);
}

.employee-checkin-view.office-checkin .check-actions #refreshGpsBtn,
.employee-checkin-view.office-checkin .check-actions #setSiteLocationBtn,
.employee-checkin-view.office-checkin .check-actions #continueShiftBtn {
  width: min(100%, 360px);
  min-height: 48px;
  border: 1px solid var(--office-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--office-text);
}

.employee-checkin-view.office-checkin.wfh-mode .gps-card {
  display: none;
}

.employee-checkin-view.office-checkin .gps-card {
  border-radius: 8px;
  border-color: var(--office-line);
  box-shadow: 0 4px 20px rgba(44, 44, 44, 0.04);
}

.employee-checkin-view.office-checkin .employee-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 28px;
}

.employee-checkin-view.office-checkin .employee-quick-actions button {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 122px;
  padding: 18px 10px;
  text-align: center;
}

.employee-checkin-view.office-checkin .employee-quick-actions button span {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: transparent;
  color: var(--office-gold);
  font-size: 28px;
}

.employee-checkin-view.office-checkin .employee-quick-actions button strong {
  color: rgba(44, 44, 44, 0.62);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.employee-checkin-view.office-checkin .employee-quick-actions button[data-employee-quick="substitute"] {
  display: none;
}

.employee-office-shell .back-to-checkin-button,
.employee-shell:has(.office-checkin.active) .back-to-checkin-button {
  border-color: var(--office-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--office-text);
  box-shadow: 0 4px 20px rgba(44, 44, 44, 0.04);
}

@media (max-width: 520px) {
  .employee-shell:has(.office-checkin.active) .app-shell {
    padding: 0 16px 84px;
  }

  .employee-shell:has(.office-checkin.active) .topbar {
    min-height: 60px;
    margin-bottom: 22px;
    padding: 0 16px;
  }

  .employee-shell:has(.office-checkin.active) .topbar h1 {
    font-size: 15px;
    letter-spacing: 0.04em;
  }

  .employee-shell:has(.office-checkin.active) .topbar h1::before {
    margin-right: 6px;
    font-size: 18px;
  }

  .employee-shell:has(.office-checkin.active) #logoutBtn {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .employee-checkin-view.office-checkin .employee-profile-card {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 20px;
    padding: 18px;
  }

  .employee-checkin-view.office-checkin .employee-avatar {
    width: 58px;
    height: 58px;
    font-size: 24px;
  }

  .employee-checkin-view.office-checkin .employee-profile-text strong {
    max-width: calc(100% - 76px);
    font-size: 20px;
  }

  .employee-checkin-view.office-checkin .employee-profile-card > .today-status-badge {
    top: 18px;
    right: 18px;
    max-width: 94px;
    white-space: normal;
    line-height: 1.15;
  }

  .employee-checkin-view.office-checkin .mode-field {
    gap: 14px;
    margin-bottom: 20px;
  }

  .employee-checkin-view.office-checkin .mode-field label {
    min-height: 66px;
    font-size: 16px;
    letter-spacing: 0.05em;
  }

  .office-mode-info {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    padding: 18px;
  }

  .office-mode-info h3 {
    font-size: 12px;
  }

  .office-mode-info strong {
    font-size: 20px;
  }

  .office-mode-info p {
    font-size: 13px;
  }

  .employee-checkin-view.office-checkin .clock-row strong {
    font-size: clamp(50px, 17vw, 68px);
  }

  .employee-checkin-view.office-checkin .check-actions #checkInBtn,
  .employee-checkin-view.office-checkin .check-actions #checkOutBtn {
    width: min(232px, 68vw);
    height: min(232px, 68vw);
    min-height: 196px;
    font-size: 15px;
    letter-spacing: 0.12em;
  }

  .employee-checkin-view.office-checkin .employee-quick-actions {
    gap: 12px;
  }

  .employee-checkin-view.office-checkin .employee-quick-actions button {
    min-height: 104px;
    padding: 14px 6px;
  }

  .employee-checkin-view.office-checkin .employee-quick-actions button strong {
    font-size: 11px;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 360px) {
  .employee-shell:has(.office-checkin.active) .app-shell {
    padding-inline: 12px;
  }

  .employee-checkin-view.office-checkin .employee-profile-card {
    grid-template-columns: 50px minmax(0, 1fr);
    padding: 14px;
  }

  .employee-checkin-view.office-checkin .employee-avatar {
    width: 50px;
    height: 50px;
  }

  .employee-checkin-view.office-checkin .employee-profile-text strong {
    max-width: 100%;
    padding-right: 82px;
    font-size: 18px;
  }

  .employee-checkin-view.office-checkin .employee-profile-card > .today-status-badge {
    top: 14px;
    right: 14px;
    max-width: 78px;
    font-size: 10px;
  }

  .employee-checkin-view.office-checkin .employee-quick-actions {
    grid-template-columns: 1fr;
  }

  .employee-checkin-view.office-checkin .employee-quick-actions button {
    min-height: 76px;
  }
}

.employee-guard-shell .back-to-checkin-button {
  border-color: var(--guard-line);
  background: #ffffff;
  color: var(--guard-primary);
  backdrop-filter: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

@media (max-width: 430px) {
  .employee-checkin-view.guard-checkin .employee-mobile-layout {
    padding: 0 0 24px;
  }

  .employee-checkin-view.guard-checkin .employee-profile-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .employee-checkin-view.guard-checkin .employee-profile-card > .today-status-badge {
    grid-column: 2;
  }

  .employee-checkin-view.guard-checkin .quick-status-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-checkin-view.guard-checkin .quick-status-meta > div {
    padding: 12px;
  }

  .employee-checkin-view.guard-checkin .employee-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-checkin-view.guard-checkin .check-actions #checkInBtn,
  .employee-checkin-view.guard-checkin .check-actions #checkOutBtn {
    width: min(190px, 54vw);
    height: min(190px, 54vw);
    min-height: 178px;
    font-size: 22px;
  }

  .employee-checkin-view.guard-checkin .check-actions #checkInBtn::before,
  .employee-checkin-view.guard-checkin .check-actions #checkOutBtn::before {
    width: 70px;
    height: 70px;
    font-size: 64px;
  }
}

/* Final v3 preview overrides must stay after legacy employee check-in themes. */
.employee-checkin-view.employee-checkin-v3 .employee-mobile-layout {
  display: block;
  max-width: 760px;
  margin: 0 auto;
}

.employee-checkin-view.employee-checkin-v3 .info-panel,
.employee-checkin-view.employee-checkin-v3 .section-head,
.employee-checkin-view.employee-checkin-v3 .check-fields label:has(#employeeSelect),
.employee-checkin-view.employee-checkin-v3 .check-fields label:has(#siteSelect),
.employee-checkin-view.employee-checkin-v3 .check-fields label:has(#noteInput),
.employee-checkin-view.employee-checkin-v3 .site-card,
.employee-checkin-view.employee-checkin-v3 #setSiteLocationBtn,
.employee-checkin-view.employee-checkin-v3 #continueShiftBtn,
.employee-checkin-view.employee-checkin-v3 .employee-quick-actions button[data-employee-quick="substitute"] {
  display: none !important;
}

.employee-checkin-view.employee-checkin-v3 .check-panel {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.employee-checkin-view.employee-checkin-v3 .quick-status-card {
  display: grid !important;
  gap: 12px !important;
  margin: 0 0 12px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.employee-checkin-view.employee-checkin-v3 .check-fields {
  display: block !important;
  margin: 0 0 12px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.employee-checkin-view.employee-checkin-v3 .check-fields label:has(#periodSelect) {
  display: grid !important;
  gap: 7px !important;
  margin: 0 !important;
  color: var(--v3-navy) !important;
}

.employee-checkin-view.employee-checkin-v3 .check-fields #periodSelect {
  width: 100% !important;
  min-height: 46px !important;
  border: 1px solid #d9c9b8 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  color: var(--v3-text) !important;
  padding: 0 13px !important;
  font-weight: 800 !important;
}

.employee-checkin-view.employee-checkin-v3 .mode-field {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 0 12px !important;
  border: 1px solid var(--v3-line) !important;
  border-radius: 18px !important;
  background: rgba(255, 253, 249, 0.8) !important;
  padding: 6px !important;
}

.employee-checkin-view.employee-checkin-v3 .mode-field.hidden {
  display: none !important;
}

.employee-checkin-view.employee-checkin-v3 .mode-field label {
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: transparent !important;
  color: var(--v3-navy) !important;
  box-shadow: none !important;
}

.employee-checkin-view.employee-checkin-v3 .mode-field label:has(input:checked) {
  background: var(--v3-navy) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(15, 39, 71, 0.18) !important;
}

.employee-checkin-view.employee-checkin-v3 .gps-card {
  margin: 0 0 12px !important;
  border-color: var(--v3-line) !important;
  border-radius: var(--v3-radius-lg) !important;
  background: var(--v3-surface) !important;
  box-shadow: var(--v3-shadow) !important;
}

.employee-checkin-view.employee-checkin-v3 .check-actions {
  display: grid !important;
  gap: 10px !important;
  margin: 0 0 12px !important;
}

.employee-checkin-view.employee-checkin-v3 .check-actions #refreshGpsBtn,
.employee-checkin-view.employee-checkin-v3 .check-actions #checkInBtn,
.employee-checkin-view.employee-checkin-v3 .check-actions #checkOutBtn {
  width: 100% !important;
  height: auto !important;
  min-height: 54px !important;
  border-radius: var(--v3-radius-md) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

.employee-checkin-view.employee-checkin-v3 .check-actions #checkInBtn::before,
.employee-checkin-view.employee-checkin-v3 .check-actions #checkOutBtn::before {
  display: none !important;
}

.employee-checkin-view.employee-checkin-v3 .check-actions #checkInBtn {
  background: var(--v3-navy) !important;
  color: #ffffff !important;
}

.employee-checkin-view.employee-checkin-v3 .check-actions #checkOutBtn {
  background: var(--v3-red) !important;
  color: #ffffff !important;
}

.employee-checkin-view.employee-checkin-v3 .check-actions #checkInBtn:disabled,
.employee-checkin-view.employee-checkin-v3 .check-actions #checkOutBtn:disabled {
  background: #7a8798 !important;
  color: #ffffff !important;
  cursor: not-allowed !important;
}

.employee-checkin-view.employee-checkin-v3 .employee-quick-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 0 12px !important;
}

.employee-checkin-view.employee-checkin-v3 .employee-quick-actions button {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 76px !important;
  width: auto !important;
  border: 1px solid var(--v3-line) !important;
  border-radius: 18px !important;
  background: rgba(255, 253, 249, 0.92) !important;
  color: var(--v3-navy) !important;
  padding: 10px !important;
  font-size: 13px !important;
  text-align: center !important;
}

.employee-checkin-view.employee-checkin-v3 .employee-quick-actions .quick-icon {
  display: grid !important;
  flex: 0 0 auto !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
  background: var(--v3-orange-soft) !important;
  color: var(--v3-navy) !important;
  line-height: 1 !important;
  margin: 0 !important;
}

.employee-checkin-view.employee-checkin-v3 .employee-quick-actions svg {
  display: block !important;
  width: 21px !important;
  height: 21px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.1 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  margin: 0 !important;
}

.employee-checkin-view.employee-checkin-v3 .employee-quick-actions button strong {
  display: block !important;
  color: var(--v3-navy) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  text-align: center !important;
  white-space: normal !important;
}

.employee-checkin-view.employee-checkin-v3.can-substitute-self-service .employee-quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.employee-checkin-view.employee-checkin-v3.can-substitute-self-service .employee-quick-actions button[data-employee-quick="substitute"] {
  display: flex !important;
}

.employee-checkin-view.employee-checkin-v3 .time-request-box {
  display: none !important;
}

.employee-checkin-view.employee-checkin-v3.v3-time-request-open .time-request-box {
  display: block !important;
  margin: 0 !important;
}

.employee-checkin-view.employee-checkin-v3.v3-panel-open .quick-status-card,
.employee-checkin-view.employee-checkin-v3.v3-panel-open .mode-field,
.employee-checkin-view.employee-checkin-v3.v3-panel-open .check-fields,
.employee-checkin-view.employee-checkin-v3.v3-panel-open .gps-card,
.employee-checkin-view.employee-checkin-v3.v3-panel-open .check-actions,
.employee-checkin-view.employee-checkin-v3.v3-panel-open .employee-quick-actions,
.employee-checkin-view.employee-checkin-v3.v3-panel-open #messageBox {
  display: none !important;
}

.employee-checkin-view.employee-checkin-v3 #messageBox {
  margin: 0 0 12px !important;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
}

.employee-checkin-view.employee-checkin-v3 #messageBox:empty {
  display: none !important;
}

.employee-ui-v3-preview.employee-shell .back-to-checkin-button:not(.hidden),
.employee-ui-v3-preview.staff-shell .back-to-checkin-button:not(.hidden) {
  display: inline-flex !important;
  width: auto !important;
  min-height: 42px !important;
  margin: 0 0 14px !important;
  border: 1px solid var(--v3-navy) !important;
  border-radius: 16px !important;
  background: var(--v3-navy) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 20px rgba(15, 39, 71, 0.14) !important;
  font-weight: 900 !important;
  padding: 0 16px !important;
  white-space: nowrap !important;
}

.employee-ui-v3-preview.employee-shell .back-to-checkin-button:not(.hidden):hover,
.employee-ui-v3-preview.staff-shell .back-to-checkin-button:not(.hidden):hover {
  background: #173a65 !important;
  color: #ffffff !important;
}

.employee-history-v1 {
  --history-navy: #0f2747;
  --history-navy-soft: #173a65;
  --history-cream: #fbf5ed;
  --history-surface: #fffdf9;
  --history-surface-soft: #f6eee5;
  --history-line: #ead9c8;
  --history-muted: #667085;
  --history-orange: #c86528;
  --history-orange-soft: #fff0df;
  --history-green: #16804a;
  --history-green-soft: #e8f7ef;
  --history-red: #b42318;
  --history-red-soft: #fff0ee;
  display: grid;
  gap: 14px;
  max-width: 940px;
  margin: 0 auto;
  color: var(--history-navy);
}

.employee-history-v1 * {
  box-sizing: border-box;
}

.history-v1-header,
.history-v1-profile,
.history-v1-period,
.history-v1-list-head,
.history-v1-card,
.history-v1-empty,
.history-v1-detail {
  border: 1px solid var(--history-line);
  border-radius: 24px;
  background: var(--history-surface);
  box-shadow: 0 18px 44px rgba(42, 32, 24, 0.08);
}

.history-v1-header,
.history-v1-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
}

.history-v1-header span,
.history-v1-list-head span,
.history-v1-profile span,
.history-v1-profile small,
.history-v1-card span,
.history-v1-card p,
.history-v1-detail-grid span {
  color: var(--history-muted);
}

.history-v1-header h2,
.history-v1-list-head strong,
.history-v1-profile strong {
  margin: 0;
  color: var(--history-navy);
  font-weight: 900;
}

.history-v1-filter,
.history-v1-back,
.history-v1-period button,
.history-v1-close,
.history-v1-correction {
  border: 1px solid var(--history-line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--history-navy);
  font-weight: 900;
}

.history-v1-filter {
  min-height: 42px;
  padding: 0 14px;
}

.history-v1-back {
  min-height: 42px;
  padding: 0 16px;
  background: var(--history-navy);
  color: #ffffff;
  white-space: nowrap;
  box-shadow: 0 10px 20px rgba(15, 39, 71, 0.14);
}

.history-v1-back:hover {
  background: var(--history-navy-soft);
}

.history-v1-profile {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.history-v1-profile > div:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.history-v1-profile strong,
.history-v1-profile span,
.history-v1-profile small {
  overflow-wrap: anywhere;
}

.history-v1-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--history-navy), var(--history-navy-soft));
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.history-v1-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: #eef1f5;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.history-v1-badge.success {
  background: var(--history-green-soft);
  color: var(--history-green);
}

.history-v1-badge.pending {
  background: var(--history-orange-soft);
  color: var(--history-orange);
}

.history-v1-badge.danger {
  background: var(--history-red-soft);
  color: var(--history-red);
}

.history-v1-period {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  text-align: center;
}

.history-v1-period button {
  min-height: 42px;
  font-size: 24px;
}

.history-v1-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.history-v1-summary article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--history-line);
  border-radius: 20px;
  background: var(--history-surface);
  padding: 14px;
  box-shadow: 0 10px 28px rgba(42, 32, 24, 0.06);
}

.history-v1-summary span,
.history-v1-summary small {
  color: var(--history-muted);
  font-size: 12px;
  font-weight: 800;
}

.history-v1-summary strong {
  color: var(--history-navy);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 900;
}

.history-v1-list {
  display: grid;
  gap: 12px;
}

.history-v1-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
}

.history-v1-card:focus-visible,
.history-v1-back:focus-visible,
.history-v1-filter:focus-visible,
.history-v1-period button:focus-visible,
.history-v1-close:focus-visible,
.history-v1-correction:focus-visible {
  outline: 3px solid rgba(200, 101, 40, 0.35);
  outline-offset: 3px;
}

.history-v1-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.history-v1-card-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.history-v1-card-head strong {
  overflow-wrap: anywhere;
}

.history-v1-time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.history-v1-time-grid div,
.history-v1-detail-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border-radius: 16px;
  background: var(--history-surface-soft);
  padding: 11px;
}

.history-v1-time-grid strong,
.history-v1-detail-grid strong {
  color: var(--history-navy);
  overflow-wrap: anywhere;
}

.history-v1-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-v1-pills span {
  border-radius: 999px;
  background: var(--history-orange-soft);
  color: var(--history-orange);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.history-v1-empty {
  display: grid;
  gap: 6px;
  padding: 22px;
  text-align: center;
}

.history-v1-empty p {
  margin: 0;
  color: var(--history-muted);
}

.history-v1-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 39, 71, 0.35);
}

.history-v1-modal.hidden {
  display: none;
}

.history-v1-detail {
  position: relative;
  width: min(100%, 560px);
  max-height: min(82vh, 680px);
  overflow: auto;
  padding: 20px;
}

.history-v1-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  font-size: 22px;
}

.history-v1-detail h2 {
  margin: 4px 48px 16px 0;
  color: var(--history-navy);
}

.history-v1-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.history-v1-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.history-v1-correction,
.history-v1-ot {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  background: var(--history-navy);
  color: #ffffff;
}

.history-v1-ot {
  background: var(--history-orange);
}

.employee-time-correction-v1 {
  --correction-navy: #0f2747;
  --correction-navy-soft: #173a65;
  --correction-surface: #fffdf9;
  --correction-soft: #f6eee5;
  --correction-line: #ead9c8;
  --correction-muted: #667085;
  --correction-orange: #c86528;
  --correction-orange-soft: #fff0df;
  --correction-green: #16804a;
  --correction-green-soft: #e8f7ef;
  --correction-red: #b42318;
  --correction-red-soft: #fff0ee;
  display: grid;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
  color: var(--correction-navy);
}

.employee-time-correction-v1 * {
  box-sizing: border-box;
}

.correction-v1-header,
.correction-v1-profile,
.correction-v1-context,
.correction-v1-form-card,
.correction-v1-history,
.correction-v1-detail {
  border: 1px solid var(--correction-line);
  border-radius: 24px;
  background: var(--correction-surface);
  box-shadow: 0 18px 44px rgba(42, 32, 24, 0.08);
}

.correction-v1-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.correction-v1-header span,
.correction-v1-heading span,
.correction-v1-profile span,
.correction-v1-profile small,
.correction-v1-grid span,
.correction-v1-detail-grid span {
  color: var(--correction-muted);
}

.correction-v1-header h2,
.correction-v1-heading strong,
.correction-v1-profile strong {
  margin: 0;
  color: var(--correction-navy);
  font-weight: 900;
}

.correction-v1-header p {
  margin: 4px 0 0;
  color: var(--correction-muted);
  font-weight: 800;
}

.correction-v1-back,
.correction-v1-submit,
.correction-v1-close,
.correction-v1-history-item {
  font: inherit;
}

.correction-v1-back,
.correction-v1-close {
  border: 1px solid var(--correction-line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--correction-navy);
  font-weight: 900;
}

.correction-v1-back {
  min-height: 42px;
  padding: 0 16px;
  border-color: var(--correction-navy);
  background: var(--correction-navy);
  color: #ffffff;
  white-space: nowrap;
}

.correction-v1-back:hover {
  background: var(--correction-navy-soft);
}

.correction-v1-profile {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.correction-v1-profile > div:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.correction-v1-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--correction-navy), var(--correction-navy-soft));
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.correction-v1-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: #eef1f5;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.correction-v1-badge.pending,
.correction-v1-message.loading {
  background: var(--correction-orange-soft);
  color: var(--correction-orange);
}

.correction-v1-badge.success,
.correction-v1-message.success {
  background: var(--correction-green-soft);
  color: var(--correction-green);
}

.correction-v1-badge.danger,
.correction-v1-message.error {
  background: var(--correction-red-soft);
  color: var(--correction-red);
}

.correction-v1-context,
.correction-v1-form-card,
.correction-v1-history {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.correction-v1-heading {
  display: grid;
  gap: 3px;
}

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

.correction-v1-grid div,
.correction-v1-detail-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border-radius: 16px;
  background: var(--correction-soft);
  padding: 12px;
}

.correction-v1-grid strong,
.correction-v1-detail-grid strong {
  overflow-wrap: anywhere;
}

.correction-v1-note,
.correction-v1-empty {
  margin: 0;
  border-radius: 16px;
  background: var(--correction-orange-soft);
  color: var(--correction-orange);
  padding: 12px;
  font-weight: 900;
}

.correction-v1-form {
  display: grid;
  gap: 14px;
}

.correction-v1-form-grid {
  display: grid;
  gap: 12px;
}

.correction-v1-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.correction-v1-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--correction-navy);
  font-size: 13px;
  font-weight: 900;
}

.correction-v1-form input,
.correction-v1-form select,
.correction-v1-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9c9b8;
  border-radius: 14px;
  background: #ffffff;
  color: #172033;
  font: inherit;
  font-weight: 800;
}

.correction-v1-form input,
.correction-v1-form select {
  min-height: 48px;
  padding: 0 13px;
}

.correction-v1-form textarea {
  min-height: 108px;
  padding: 13px;
  resize: vertical;
}

.correction-v1-message {
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 900;
}

.correction-v1-submit {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  background: var(--correction-navy);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 16px 28px rgba(15, 39, 71, 0.18);
}

.correction-v1-submit:disabled {
  cursor: progress;
  background: #7a8798;
  box-shadow: none;
}

.correction-v1-history-list {
  display: grid;
  gap: 10px;
}

.correction-v1-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--correction-line);
  border-radius: 16px;
  background: #ffffff;
  padding: 13px;
  text-align: left;
}

.correction-v1-history-item > span:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.correction-v1-history-item small {
  color: var(--correction-muted);
  font-weight: 800;
}

.correction-v1-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 39, 71, 0.35);
}

.correction-v1-modal.hidden {
  display: none;
}

.correction-v1-detail {
  position: relative;
  width: min(100%, 620px);
  max-height: min(82vh, 680px);
  overflow: auto;
  padding: 20px;
}

.correction-v1-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  font-size: 22px;
}

.correction-v1-detail h2 {
  margin: 12px 48px 16px 0;
}

.correction-v1-back:focus-visible,
.correction-v1-submit:focus-visible,
.correction-v1-close:focus-visible,
.correction-v1-history-item:focus-visible {
  outline: 3px solid rgba(200, 101, 40, 0.35);
  outline-offset: 3px;
}

.employee-ot-request-v1 {
  --ot-navy: #0f2747;
  --ot-navy-soft: #173a65;
  --ot-surface: #fffdf9;
  --ot-soft: #f6eee5;
  --ot-line: #ead9c8;
  --ot-muted: #667085;
  --ot-orange: #c86528;
  --ot-orange-soft: #fff0df;
  --ot-green: #16804a;
  --ot-green-soft: #e8f7ef;
  --ot-red: #b42318;
  --ot-red-soft: #fff0ee;
  display: grid;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
  color: var(--ot-navy);
}

.employee-ot-request-v1 * {
  box-sizing: border-box;
}

.ot-v1-header,
.ot-v1-profile,
.ot-v1-context,
.ot-v1-form-card,
.ot-v1-history,
.ot-v1-detail {
  border: 1px solid var(--ot-line);
  border-radius: 24px;
  background: var(--ot-surface);
  box-shadow: 0 18px 44px rgba(42, 32, 24, 0.08);
}

.ot-v1-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.ot-v1-header span,
.ot-v1-heading span,
.ot-v1-profile span,
.ot-v1-profile small,
.ot-v1-grid span,
.ot-v1-detail-grid span,
.ot-v1-duration span {
  color: var(--ot-muted);
}

.ot-v1-header h2,
.ot-v1-heading strong,
.ot-v1-profile strong {
  margin: 0;
  color: var(--ot-navy);
  font-weight: 900;
}

.ot-v1-header p {
  margin: 4px 0 0;
  color: var(--ot-muted);
  font-weight: 800;
}

.ot-v1-back,
.ot-v1-submit,
.ot-v1-close,
.ot-v1-history-item {
  font: inherit;
}

.ot-v1-back,
.ot-v1-close {
  border: 1px solid var(--ot-line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ot-navy);
  font-weight: 900;
}

.ot-v1-back {
  min-height: 42px;
  padding: 0 16px;
  border-color: var(--ot-navy);
  background: var(--ot-navy);
  color: #ffffff;
  white-space: nowrap;
}

.ot-v1-back:hover {
  background: var(--ot-navy-soft);
}

.ot-v1-profile {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.ot-v1-profile > div:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ot-v1-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--ot-navy), var(--ot-navy-soft));
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.ot-v1-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: #eef1f5;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ot-v1-badge.pending,
.ot-v1-message.loading {
  background: var(--ot-orange-soft);
  color: var(--ot-orange);
}

.ot-v1-badge.success,
.ot-v1-message.success {
  background: var(--ot-green-soft);
  color: var(--ot-green);
}

.ot-v1-badge.danger,
.ot-v1-message.error {
  background: var(--ot-red-soft);
  color: var(--ot-red);
}

.ot-v1-badge.muted {
  background: #eef1f5;
  color: #475569;
}

.ot-v1-context,
.ot-v1-form-card,
.ot-v1-history {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.ot-v1-heading {
  display: grid;
  gap: 3px;
}

.ot-v1-grid,
.ot-v1-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ot-v1-grid div,
.ot-v1-detail-grid div,
.ot-v1-duration {
  display: grid;
  gap: 4px;
  min-width: 0;
  border-radius: 16px;
  background: var(--ot-soft);
  padding: 12px;
}

.ot-v1-grid strong,
.ot-v1-detail-grid strong,
.ot-v1-duration strong {
  overflow-wrap: anywhere;
}

.ot-v1-note,
.ot-v1-empty {
  margin: 0;
  border-radius: 16px;
  background: var(--ot-orange-soft);
  color: var(--ot-orange);
  padding: 12px;
  font-weight: 900;
}

.ot-v1-form {
  display: grid;
  gap: 14px;
}

.ot-v1-form-grid {
  display: grid;
  gap: 12px;
}

.ot-v1-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ot-v1-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--ot-navy);
  font-size: 13px;
  font-weight: 900;
}

.ot-v1-form input,
.ot-v1-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9c9b8;
  border-radius: 14px;
  background: #ffffff;
  color: #172033;
  font: inherit;
  font-weight: 800;
}

.ot-v1-form input {
  min-height: 48px;
  padding: 0 13px;
}

.ot-v1-form input[readonly] {
  background: #f8fafc;
  color: var(--ot-muted);
}

.ot-v1-form textarea {
  min-height: 108px;
  padding: 13px;
  resize: vertical;
}

.ot-v1-message {
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 900;
}

.ot-v1-submit {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  background: var(--ot-navy);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 16px 28px rgba(15, 39, 71, 0.18);
}

.ot-v1-submit:disabled {
  cursor: progress;
  background: #7a8798;
  box-shadow: none;
}

.ot-v1-history-list {
  display: grid;
  gap: 10px;
}

.ot-v1-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--ot-line);
  border-radius: 16px;
  background: #ffffff;
  padding: 13px;
  text-align: left;
}

.ot-v1-history-item > span:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ot-v1-history-item small {
  color: var(--ot-muted);
  font-weight: 800;
}

.ot-v1-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 39, 71, 0.35);
}

.ot-v1-modal.hidden {
  display: none;
}

.ot-v1-detail {
  position: relative;
  width: min(100%, 620px);
  max-height: min(82vh, 680px);
  overflow: auto;
  padding: 20px;
}

.ot-v1-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  font-size: 22px;
}

.ot-v1-detail h2 {
  margin: 12px 48px 16px 0;
}

.ot-v1-back:focus-visible,
.ot-v1-submit:focus-visible,
.ot-v1-close:focus-visible,
.ot-v1-history-item:focus-visible {
  outline: 3px solid rgba(200, 101, 40, 0.35);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .employee-checkin-view.employee-checkin-v3 .employee-quick-actions {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 720px) {
  .employee-history-v1 {
    max-width: 100%;
  }

  .history-v1-header,
  .history-v1-list-head,
  .history-v1-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .history-v1-back,
  .history-v1-filter {
    width: 100%;
  }

  .history-v1-profile {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .history-v1-profile .history-v1-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .history-v1-summary,
  .history-v1-time-grid,
  .history-v1-detail-grid {
    grid-template-columns: 1fr;
  }

  .history-v1-modal {
    align-items: end;
    padding: 10px;
  }

  .history-v1-detail {
    width: 100%;
    max-height: 86vh;
    border-radius: 24px 24px 16px 16px;
  }

  .employee-time-correction-v1 {
    max-width: 100%;
  }

  .correction-v1-header,
  .correction-v1-history-item {
    grid-template-columns: 1fr;
  }

  .correction-v1-back {
    width: 100%;
  }

  .correction-v1-profile {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .correction-v1-profile .correction-v1-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .correction-v1-grid,
  .correction-v1-detail-grid,
  .correction-v1-form-grid.two {
    grid-template-columns: 1fr;
  }

  .correction-v1-modal {
    align-items: end;
    padding: 10px;
  }

  .correction-v1-detail {
    width: 100%;
    max-height: 86vh;
    border-radius: 24px 24px 16px 16px;
  }

  .employee-ot-request-v1 {
    max-width: 100%;
  }

  .ot-v1-header,
  .ot-v1-history-item {
    grid-template-columns: 1fr;
  }

  .ot-v1-back {
    width: 100%;
  }

  .ot-v1-profile {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .ot-v1-profile .ot-v1-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .ot-v1-grid,
  .ot-v1-detail-grid,
  .ot-v1-form-grid.two,
  .history-v1-detail-actions {
    grid-template-columns: 1fr;
  }

  .ot-v1-modal {
    align-items: end;
    padding: 10px;
  }

  .ot-v1-detail {
    width: 100%;
    max-height: 86vh;
    border-radius: 24px 24px 16px 16px;
  }
}

@media (max-width: 767px) {
  .employee-checkin-view.employee-checkin-v3 .employee-quick-actions {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .employee-checkin-view.employee-checkin-v3 .employee-quick-actions button {
    flex-direction: row !important;
    justify-content: flex-start !important;
    min-height: 64px !important;
    padding: 10px 14px !important;
    text-align: left !important;
  }

  .employee-checkin-view.employee-checkin-v3 .employee-quick-actions .quick-icon {
    width: 42px !important;
    height: 42px !important;
  }

  .employee-checkin-view.employee-checkin-v3 .employee-quick-actions svg {
    width: 21px !important;
    height: 21px !important;
  }

  .employee-checkin-view.employee-checkin-v3 .employee-quick-actions button strong {
    min-width: 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* Employee substitute v3 preview. Scope stays under ?employeeUi=v3 only. */
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 {
  --v3-navy: #0f2747;
  --v3-navy-soft: #173a65;
  --v3-surface: #fffdf9;
  --v3-surface-soft: #f6eee5;
  --v3-orange-soft: #fff0df;
  --v3-line: #ead9c8;
  --v3-text: #172033;
  --v3-muted: #6b7280;
  --v3-green: #16804a;
  --v3-green-soft: #e8f7ef;
  --v3-red: #b42318;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .layout {
  display: block;
  max-width: 900px;
  margin: 0 auto;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .check-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .section-head,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-profile,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 #substituteForm,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 #substituteSiteCard,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 #substituteGpsCard,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .actions,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .message-box,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1 {
  border: 1px solid var(--v3-line);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 18px 44px rgba(42, 32, 24, 0.08);
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .section-head {
  margin-bottom: 14px;
  padding: 18px 20px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .section-head h2,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-profile strong,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-heading strong,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-header h2 {
  color: var(--v3-navy);
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1.substitute-self-service .substitute-v1-profile {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-back {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 42px;
  border: 0;
  border-radius: 16px;
  background: var(--v3-navy);
  color: #ffffff;
  padding: 0 16px;
  font-weight: 900;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--v3-navy) 0%, var(--v3-navy-soft) 100%);
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-profile span,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-profile small {
  display: block;
  color: var(--v3-muted);
  font-weight: 800;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-note {
  grid-column: 1 / -1;
  border-radius: 16px;
  background: var(--v3-orange-soft);
  color: #9a4318;
  padding: 12px 14px;
  font-weight: 800;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 #substituteForm {
  margin-bottom: 14px;
  padding: 16px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1.substitute-self-service #substituteForm label:has(#substituteEmployeeSelect) {
  display: none;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 #substituteForm label,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-filters label {
  color: var(--v3-navy);
  font-weight: 900;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 #substituteForm select,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 #substituteForm input,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-filters select,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-filters input {
  min-height: 46px;
  border: 1px solid #d9c9b8;
  border-radius: 14px;
  background: #ffffff;
  color: var(--v3-text);
  padding: 0 13px;
  font-weight: 800;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 #substituteSiteCard,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 #substituteGpsCard {
  margin-bottom: 14px;
  padding: 16px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 16px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .actions button {
  min-height: 52px;
  border-radius: 16px;
  font-weight: 900;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-history-inline,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-list {
  display: grid;
  gap: 10px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-history-inline {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: var(--v3-muted);
  font-weight: 900;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-heading span,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-heading strong {
  overflow-wrap: normal;
  word-break: keep-all;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--v3-line);
  border-radius: 18px;
  background: var(--v3-surface);
  color: var(--v3-text);
  padding: 14px;
  text-align: left;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-card span:first-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-card small {
  color: var(--v3-muted);
  font-weight: 800;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-badge.pending {
  background: var(--v3-orange-soft);
  color: #9a4318;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-badge.success {
  background: var(--v3-green-soft);
  color: var(--v3-green);
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-badge.danger {
  background: #fee4e2;
  color: var(--v3-red);
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-empty {
  border: 1px dashed var(--v3-line);
  border-radius: 18px;
  color: var(--v3-muted);
  padding: 18px;
  text-align: center;
  font-weight: 800;
  width: 100%;
  min-width: 0;
  overflow-wrap: normal;
  word-break: keep-all;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1.supervisor-substitute-management .substitute-v1-profile,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1.supervisor-substitute-management #substituteForm,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1.supervisor-substitute-management #substituteSiteCard,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1.supervisor-substitute-management #substituteGpsCard,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1.supervisor-substitute-management .actions,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1.supervisor-substitute-management .message-box {
  display: none;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1 {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1.substitute-self-service .supervisor-substitute-v1 {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-summary article {
  display: grid;
  gap: 4px;
  border: 1px solid var(--v3-line);
  border-radius: 18px;
  background: var(--v3-surface-soft);
  padding: 14px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-summary span,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-filters label {
  color: var(--v3-muted);
  font-size: 13px;
  font-weight: 900;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-summary strong {
  color: var(--v3-navy);
  font-size: 28px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-filters label {
  display: grid;
  gap: 6px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.38);
  padding: 16px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-modal.hidden {
  display: none;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-detail {
  position: relative;
  width: min(100%, 620px);
  max-height: min(760px, 92vh);
  overflow: auto;
  border: 1px solid var(--v3-line);
  border-radius: 24px;
  background: var(--v3-surface);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  padding: 22px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--v3-line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--v3-navy);
  font-size: 22px;
  font-weight: 900;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-detail-grid div {
  display: grid;
  gap: 4px;
  border-radius: 16px;
  background: var(--v3-surface-soft);
  padding: 12px;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-detail-grid span,
.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-detail-note {
  color: var(--v3-muted);
  font-weight: 800;
}

.employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-detail-grid strong {
  color: var(--v3-navy);
}

@media (max-width: 760px) {
  .employee-checkin-view.employee-checkin-v3.can-substitute-self-service .employee-quick-actions {
    grid-template-columns: 1fr !important;
  }

  .employee-ui-v3-preview #view-substitute.employee-substitute-v1.substitute-self-service .substitute-v1-profile {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-profile > .substitute-v1-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .employee-ui-v3-preview #view-substitute.employee-substitute-v1 .actions,
  .employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-summary,
  .employee-ui-v3-preview #view-substitute.employee-substitute-v1 .supervisor-substitute-v1-filters,
  .employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-detail-grid {
    grid-template-columns: 1fr;
  }

  .employee-ui-v3-preview #view-substitute.employee-substitute-v1 .substitute-v1-card {
    grid-template-columns: 1fr;
  }
}
/* Supervisor navigation for Employee UI v3 preview only. */
.employee-ui-v3-preview.supervisor-v3-navigation #mainContent {
  --supervisor-v3-navy: #0f2747;
  --supervisor-v3-cream: #fff8ef;
  --supervisor-v3-line: #ead9c8;
}

@media (min-width: 768px) {
  .employee-ui-v3-preview.supervisor-v3-navigation .tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px auto 22px;
    max-width: 1180px;
  }

  .employee-ui-v3-preview.supervisor-v3-navigation .tabs .tab {
    min-height: 48px;
    border: 1px solid #cfd7e6;
    border-radius: 10px;
    background: #ffffff;
    color: #172033;
    padding: 0 18px;
    font-size: 15px;
    font-weight: 900;
  }

  .employee-ui-v3-preview.supervisor-v3-navigation .tabs .tab.active {
    border-color: var(--supervisor-v3-navy);
    background: var(--supervisor-v3-navy);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 39, 71, 0.18);
  }

  .employee-ui-v3-preview.supervisor-v3-navigation .tabs .tab[data-view="dashboard"] { order: 1; }
  .employee-ui-v3-preview.supervisor-v3-navigation .tabs .tab[data-view="checkin"] { order: 2; }
  .employee-ui-v3-preview.supervisor-v3-navigation .tabs .tab[data-view="approvals"] { order: 3; }
  .employee-ui-v3-preview.supervisor-v3-navigation .tabs .tab[data-view="substitute"] { order: 4; }
  .employee-ui-v3-preview.supervisor-v3-navigation .tabs .tab[data-view="ot"] { order: 5; }
  .employee-ui-v3-preview.supervisor-v3-navigation .tabs .tab[data-view="employees"] { order: 6; }
}

.supervisor-v3-bottom-nav,
.supervisor-v3-more-sheet {
  display: none;
}

@media (max-width: 767px) {
  .employee-ui-v3-preview.supervisor-v3-navigation #mainContent {
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  }

  .employee-ui-v3-preview.supervisor-v3-navigation .tabs {
    display: none;
  }

  .employee-ui-v3-preview.supervisor-v3-navigation .supervisor-v3-bottom-nav:not(.hidden) {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    border-top: 1px solid #e6d8c9;
    background: rgba(255, 253, 249, 0.98);
    box-shadow: 0 -14px 32px rgba(15, 39, 71, 0.12);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .supervisor-v3-bottom-nav button {
    display: grid;
    place-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 58px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: #667085;
    padding: 4px 2px;
    font-size: 12px;
    font-weight: 900;
  }

  .supervisor-v3-bottom-nav button.active {
    border-color: #d8c3ad;
    background: #fff0df;
    color: #0f2747;
  }

  .supervisor-v3-bottom-nav svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .supervisor-v3-bottom-nav span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .employee-ui-v3-preview.supervisor-v3-navigation .supervisor-v3-more-sheet:not(.hidden) {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    align-items: end;
  }

  .supervisor-v3-more-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.36);
  }

  .supervisor-v3-more-panel {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    width: min(100%, 520px);
    max-height: min(80vh, 520px);
    overflow-y: auto;
    border: 1px solid #ead9c8;
    border-radius: 24px 24px 0 0;
    background: #fffdf9;
    box-shadow: 0 -24px 60px rgba(15, 39, 71, 0.22);
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .supervisor-v3-more-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
  }

  .supervisor-v3-more-panel h2 {
    margin: 0;
    color: #0f2747;
    font-size: 18px;
  }

  .supervisor-v3-more-close {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    min-height: 42px;
    border: 1px solid #ead9c8;
    border-radius: 14px;
    background: #ffffff;
    color: #0f2747;
    font-size: 24px;
    line-height: 1;
    padding: 0;
  }

  .supervisor-v3-more-panel [data-supervisor-v3-nav] {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 58px;
    border: 1px solid #ead9c8;
    border-radius: 16px;
    background: #ffffff;
    color: #0f2747;
    padding: 8px 12px;
    text-align: left;
    font-weight: 900;
  }

  .supervisor-v3-more-panel [data-supervisor-v3-nav].active {
    border-color: #d8c3ad;
    background: #fff0df;
  }

  .supervisor-v3-more-panel svg {
    width: 21px;
    height: 21px;
    justify-self: center;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}
