:root {
  --bg: #fff7f7;
  --surface: #ffffff;
  --surface-soft: rgba(227, 6, 19, 0.08);
  --line: rgba(227, 6, 19, 0.16);
  --line-strong: #0b0b0b;
  --text: #0b0b0b;
  --muted: #686868;
  --primary: #e30613;
  --primary-strong: #b90510;
  --on-primary: #ffffff;
  --inverse-soft: rgba(255, 255, 255, 0.82);
  --inverse-muted: rgba(255, 255, 255, 0.72);
  --tooltip-bg: #0b0b0b;
  --tooltip-text: #ffffff;
  --primary-bg-faint: rgba(227, 6, 19, 0.05);
  --primary-bg-soft: rgba(227, 6, 19, 0.08);
  --primary-bg: rgba(227, 6, 19, 0.12);
  --primary-line-faint: rgba(227, 6, 19, 0.14);
  --primary-line: rgba(227, 6, 19, 0.24);
  --primary-line-strong: rgba(227, 6, 19, 0.38);
  --primary-focus-ring: rgba(227, 6, 19, 0.35);
  --primary-control-bg: rgba(227, 6, 19, 0.06);
  --primary-control-bg-hover: rgba(227, 6, 19, 0.11);
  --primary-control-line: rgba(227, 6, 19, 0.45);
  --primary-control-line-hover: rgba(227, 6, 19, 0.7);
  --account-primary: #b90510;
  --account-primary-hover: #8f030c;
  --danger: #e30613;
  --warning: #e30613;
  --info: #e30613;
  --success: #23734c;
  --success-strong: #164f34;
  --success-soft: #f1f8f4;
  --success-tint: rgba(35, 115, 76, 0.08);
  --success-line: rgba(35, 115, 76, 0.28);
  --warning-text: #b45309;
  --warning-muted: rgba(180, 83, 9, 0.55);
  --warning-soft: rgba(180, 83, 9, 0.08);
  --warning-tint: rgba(180, 83, 9, 0.14);
  --warning-line: rgba(180, 83, 9, 0.22);
  --danger-strong: #8f1d14;
  --danger-soft: #fee2e2;
  --danger-tint: #fff0ef;
  --danger-line: #f2b8b5;
  --info-text: #1e3a8a;
  --info-icon: #2563eb;
  --info-soft: rgba(59, 130, 246, 0.08);
  --info-line: rgba(37, 99, 235, 0.24);
  --field-bg: #ffffff;
  --field-disabled-bg: #ffffff;
  --hover-bg: rgba(11, 11, 11, 0.06);
  --surface-hover: #f3f4f6;
  --surface-hover-strong: #e5e7eb;
  --surface-subtle: rgba(104, 104, 104, 0.06);
  --surface-subtle-hover: rgba(104, 104, 104, 0.07);
  --neutral-line: rgba(104, 104, 104, 0.22);
  --neutral-line-strong: #d1d5db;
  --neutral-icon: #a9adb5;
  --employee-shell-bg: linear-gradient(180deg, rgba(227, 6, 19, 0.08) 0%, #fff7f7 100%);
  --employee-topbar-bg: rgba(255, 255, 255, 0.86);
  --employee-nav-bg: rgba(255, 255, 255, 0.94);
  --clock-card-bg: #17201b;
  --active-danger-shadow: 0 18px 40px rgba(143, 29, 20, 0.24);
  --shadow: 0 18px 40px rgba(11, 11, 11, 0.08);
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121214;
  --surface: #1d1d20;
  --surface-soft: rgba(204, 15, 26, 0.18);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.58);
  --text: #f4f4f5;
  --muted: #b4b7bd;
  --primary: #cc0f1a;
  --primary-strong: #a00610;
  --brand-red: #cc0f1a;
  --brand-red-strong: #a00610;
  --brand-red-half: rgba(204, 15, 26, 0.5);
  --brand-red-soft: rgba(204, 15, 26, 0.14);
  --brand-red-faint: rgba(204, 15, 26, 0.08);
  --tooltip-bg: #0b0b0b;
  --tooltip-text: #ffffff;
  --primary-bg-faint: rgba(204, 15, 26, 0.1);
  --primary-bg-soft: rgba(204, 15, 26, 0.14);
  --primary-bg: rgba(204, 15, 26, 0.18);
  --primary-line-faint: rgba(204, 15, 26, 0.18);
  --primary-line: rgba(204, 15, 26, 0.28);
  --primary-line-strong: rgba(204, 15, 26, 0.42);
  --primary-focus-ring: rgba(204, 15, 26, 0.45);
  --primary-control-bg: rgba(204, 15, 26, 0.12);
  --primary-control-bg-hover: rgba(204, 15, 26, 0.18);
  --primary-control-line: rgba(204, 15, 26, 0.42);
  --primary-control-line-hover: rgba(204, 15, 26, 0.58);
  --account-primary: #b90510;
  --account-primary-hover: #8f030c;
  --danger: #cc0f1a;
  --warning: #f59e0b;
  --info: #60a5fa;
  --success: #4ade80;
  --success-strong: #bbf7d0;
  --success-soft: rgba(35, 115, 76, 0.2);
  --success-tint: rgba(74, 222, 128, 0.14);
  --success-line: rgba(74, 222, 128, 0.3);
  --warning-text: #fbbf24;
  --warning-muted: rgba(251, 191, 36, 0.58);
  --warning-soft: rgba(251, 191, 36, 0.1);
  --warning-tint: rgba(251, 191, 36, 0.16);
  --warning-line: rgba(251, 191, 36, 0.28);
  --danger-strong: #a00610;
  --danger-soft: rgba(204, 15, 26, 0.2);
  --danger-tint: rgba(204, 15, 26, 0.16);
  --danger-line: rgba(204, 15, 26, 0.34);
  --info-text: #bfdbfe;
  --info-icon: #93c5fd;
  --info-soft: rgba(59, 130, 246, 0.18);
  --info-line: rgba(147, 197, 253, 0.28);
  --field-bg: #18181b;
  --field-disabled-bg: rgba(255, 255, 255, 0.03);
  --hover-bg: rgba(255, 255, 255, 0.08);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --surface-hover-strong: rgba(255, 255, 255, 0.12);
  --surface-subtle: rgba(255, 255, 255, 0.06);
  --surface-subtle-hover: rgba(255, 255, 255, 0.09);
  --neutral-line: rgba(255, 255, 255, 0.16);
  --neutral-line-strong: rgba(255, 255, 255, 0.24);
  --neutral-icon: #8d929d;
  --employee-shell-bg: linear-gradient(180deg, rgba(204, 15, 26, 0.13) 0%, #121214 100%);
  --employee-topbar-bg: rgba(24, 24, 27, 0.88);
  --employee-nav-bg: rgba(24, 24, 27, 0.94);
  --clock-card-bg: #101713;
  --active-danger-shadow: 0 18px 40px rgba(204, 15, 26, 0.18);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
}

.turbo-progress-bar {
  background: var(--primary);
}

a {
  color: inherit;
  text-decoration: none;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

[hidden] {
  display: none !important;
}

th,
td {
  padding: 0.9rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

td small,
.muted {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: currentColor;
  translate: 0 -0.1em;
}

.icon-large {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-muted {
  color: var(--muted);
}

.icon-inverse {
  color: var(--inverse-soft);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.flash {
  max-width: 68rem;
  margin: 1rem auto 0;
  padding: 0.62rem 0.8rem;
  border: 1px solid var(--success-line);
  border-radius: 8px;
  color: var(--text);
  background: var(--success-soft);
}

.flash-alert {
  border-color: var(--danger-line);
  color: var(--danger);
  background: var(--danger-tint);
}

.flash-notice,
.flash-hr_contact_notice {
  color: var(--success-strong);
}

.flash-icon {
  width: 1rem;
  height: 1rem;
  color: var(--success);
}

.flash-alert .flash-icon {
  color: var(--danger);
}

.dismissible-flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.flash-message {
  flex: 1 1 auto;
  min-width: 0;
}

.flash-action-form {
  flex: 0 0 auto;
  margin: 0;
}

.flash-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 6px;
  color: var(--success-strong);
  background: transparent;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
}

.flash-action:hover {
  background: var(--success-tint);
}

.flash-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 -0.35rem 0 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.flash-close:hover {
  color: var(--text);
}

.employee-page-flash {
  max-width: none;
  margin: -0.35rem 0 1rem;
}

.auth-shell {
  min-height: 100vh;
}

.auth-main {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.25rem;
}

.employee-auth-shell {
  display: grid;
  grid-template-rows: 1fr auto auto;
  min-height: 100vh;
}

.employee-auth-shell .auth-main {
  min-height: auto;
}

.auth-card {
  width: min(100%, 48rem);
}

.auth-card-narrow {
  width: min(100%, 28rem);
}

.auth-header {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.auth-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.08;
}

.auth-header p {
  margin: 0;
  color: var(--muted);
}

.auth-code-help span {
  display: block;
}

.employee-auth-card .auth-header {
  justify-items: center;
  text-align: center;
}

.employee-auth-card .auth-header h1 {
  font-size: 1.35rem;
  line-height: 1.15;
}

.employee-auth-card .auth-header .brand-fitxa {
  font-size: 3.675rem;
}

.employee-auth-card .auth-header .brand-logo {
  height: 5.4rem;
}

.auth-tabbed-panel {
  display: grid;
}

.auth-tab-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-tab-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.auth-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0 0.75rem;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  text-align: center;
}

#employee_login_password_tab:focus-visible ~ .auth-tab-list .auth-tab-password,
#employee_login_code_tab:focus-visible ~ .auth-tab-list .auth-tab-code {
  outline: 2px solid var(--line-strong);
  outline-offset: 2px;
}

#employee_login_password_tab:checked ~ .auth-tab-list .auth-tab-password,
#employee_login_code_tab:checked ~ .auth-tab-list .auth-tab-code {
  color: var(--on-primary);
  background: var(--primary);
}

.auth-tab-panel {
  display: none;
}

#employee_login_password_tab:checked ~ .auth-tab-panel-password,
#employee_login_code_tab:checked ~ .auth-tab-panel-code {
  display: block;
}

.employee-auth-card .auth-panel .flash {
  width: 100%;
  max-width: none;
  margin: 0 0 1rem;
  box-shadow: none;
}

.employee-install-prompt {
  display: none;
  justify-content: center;
  padding: 0 1.25rem 0.85rem;
}

.employee-install-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0 0.85rem;
  border: 1px solid var(--neutral-line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.employee-install-button span {
  line-height: 1;
}

.employee-install-button .icon {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
}

.employee-install-button:hover {
  color: var(--text);
  background: var(--surface);
}

.auth-footer {
  padding: 0 1.25rem 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.auth-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

html[data-standalone-pwa="true"] .employee-auth-footer .auth-footer-access {
  display: none;
}

html[data-standalone-pwa="true"] .employee-install-prompt {
  display: none;
}

@media (display-mode: standalone) {
  .employee-auth-footer .auth-footer-access,
  html .employee-install-prompt {
    display: none;
  }
}

.auth-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.auth-panel {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-panel h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.auth-panel-actions {
  display: flex;
  justify-content: flex-start;
  margin: -0.25rem -0.25rem 0.75rem;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0 0.45rem;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 800;
}

.auth-back-link:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.auth-form {
  display: grid;
  gap: 0.9rem;
}

.auth-forgot-link {
  justify-self: center;
  text-align: center;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label,
.choice-list legend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--field-bg);
}

.choice-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-list label,
.check-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.choice-list input,
.check-row input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--primary);
}

.delivery-method-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.code-input-group {
  margin: 0;
  padding: 0;
  border: 0;
}

.code-inputs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
}

.code-digit-input {
  width: 100%;
  aspect-ratio: 1;
  min-height: 3rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--field-bg);
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
}

.code-digit-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.panel {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.flush-panel {
  padding: 0;
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.padded-heading {
  padding: 1rem 1rem 0;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.panel-title,
.page-title,
.clock-label,
.detail-list dt,
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.page-title {
  gap: 0.65rem;
}

.page-title .icon {
  width: 1.9rem;
  height: 1.9rem;
}

.button,
.mini-button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.65rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0;
}

.button-primary,
input[type="submit"] {
  color: var(--on-primary);
  background: var(--primary);
}

.button-primary:hover,
input[type="submit"]:hover {
  background: var(--primary-strong);
}

.button.is-submitting,
.mini-button.is-submitting,
.primary-clock.is-submitting,
button.is-submitting,
input[type="submit"].is-submitting {
  cursor: wait;
  opacity: 0.82;
}

.submit-spinner {
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: submit-spin 0.7s linear infinite;
}

@keyframes submit-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .submit-spinner {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.62;
  }
}

.button-secondary {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--field-bg);
}

.text-button {
  color: var(--primary);
  font-weight: 800;
}

.mini-button {
  min-height: 2rem;
  padding: 0 0.65rem;
  color: var(--on-primary);
  background: var(--primary);
}

.muted-button {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-soft);
}

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

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge-active,
.badge-approved,
.badge-complete {
  color: var(--text);
  background: var(--primary-bg-soft);
}

.badge-open,
.badge-pending {
  color: var(--text);
  background: var(--primary-line-faint);
}

.badge-corrected {
  color: var(--text);
  background: var(--primary-bg-soft);
}

.badge-disabled,
.badge-rejected {
  color: var(--danger-strong);
  background: var(--danger-soft);
}

.nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.6rem;
  padding: 0 0.45rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.nav-item.is-active {
  color: var(--on-primary);
  background: var(--primary);
}

.mobile-table,
.table-wrap {
  overflow-x: auto;
}

.mobile-table table,
.table-wrap table {
  min-width: 44rem;
}

.clockings-table table {
  table-layout: fixed;
  min-width: 34rem;
}

.clocking-date-column {
  width: 12.5rem;
  white-space: nowrap;
}

.clocking-hours-column {
  width: 8rem;
  white-space: nowrap;
}

.clocking-swipes-column {
  width: auto;
}

.clocking-swipe-cell {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  max-width: 100%;
}

.clocking-swipe-grid {
  display: grid;
  grid-template-columns: minmax(4.5rem, max-content) minmax(4.5rem, max-content);
  flex: 1 1 auto;
  gap: 0.35rem 0.85rem;
  min-width: 0;
}

.clocking-swipe-row {
  display: contents;
}

.clocking-swipe-slot {
  display: flex;
  align-items: center;
  min-height: 1.25rem;
  min-width: 0;
}

.clocking-swipe {
  display: inline-grid;
  grid-template-columns: 1rem auto;
  align-items: end;
  gap: 0.25rem;
  min-height: 1.25rem;
  position: relative;
  line-height: 1.2;
  white-space: nowrap;
}

.clocking-swipe.is-pending-requested {
  color: var(--warning-text);
}

.clocking-swipe.is-pending-invalidated {
  color: var(--warning-muted);
}

.clocking-swipe.is-pending-requested .clocking-swipe-icon,
.clocking-swipe.is-pending-invalidated .clocking-swipe-icon {
  color: currentColor;
}

.clocking-swipe.is-pending-invalidated::after {
  content: "";
  position: absolute;
  right: -0.08rem;
  left: -0.08rem;
  top: 50%;
  height: 0.12em;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-50%);
  pointer-events: none;
}

.clocking-swipe-icon {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
  color: var(--muted);
}

.clocking-swipe-time {
  display: block;
  align-self: end;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.clocking-hours.is-incomplete {
  color: var(--primary);
}

.clocking-correction-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-left: auto;
  border-radius: 6px;
  color: var(--neutral-icon);
}

.clocking-correction-link:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.clocking-correction-link.is-incomplete {
  color: var(--primary);
  background: var(--surface-soft);
}

.clocking-correction-link.is-incomplete:hover {
  background: var(--surface-soft);
}

.clocking-correction-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.clockings-empty-state {
  gap: 0.8rem;
  justify-items: center;
  place-content: center;
  width: min(100%, 28rem);
  min-height: calc(100dvh - 17rem);
  margin: 0 auto;
  padding: 2.25rem 1rem;
  text-align: center;
}

.clockings-empty-state .empty-state-icon {
  width: 4rem;
  height: 4rem;
  color: var(--neutral-icon);
}

.clockings-empty-state p {
  max-width: 22rem;
}

.clockings-current-month-link {
  min-height: 2.35rem;
  margin-top: 0.2rem;
  border-color: var(--neutral-line-strong);
  color: var(--text);
  background: var(--surface-hover);
  font-size: 0.9rem;
}

.clockings-current-month-link:hover {
  background: var(--surface-hover-strong);
}

.correction-new-link {
  min-height: 2.35rem;
  padding: 0 0.8rem;
  font-size: 0.9rem;
}

.correction-new-link-short {
  display: none;
}

.corrections-filter-form {
  display: grid;
  width: min(100%, 36rem);
  margin: 0 auto 1.15rem;
}

.corrections-filter-panel {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--primary-line-faint);
  border-radius: 8px;
  background: var(--surface);
}

.corrections-filter-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-width: 0;
}

.corrections-filter-heading {
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
}

.corrections-filter-divider {
  width: 100%;
  margin: -0.15rem 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.corrections-status-filter,
.corrections-month-filter {
  min-width: 0;
}

.corrections-status-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.corrections-status-options {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.corrections-status-filter legend,
.corrections-filter-label {
  padding: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 400;
}

.corrections-status-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  padding: 0 0.58rem;
  border: 1px solid var(--neutral-line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--field-bg);
  font-size: 0.86rem;
  font-weight: 400;
  cursor: pointer;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.corrections-status-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.corrections-status-option-icon {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--neutral-icon);
}

.corrections-status-option:hover {
  border-color: var(--primary-line);
  color: var(--text);
  background: var(--surface-soft);
}

.corrections-status-option:has(input:checked) {
  border-color: var(--primary-line-strong);
  color: var(--primary);
  background: var(--primary-bg-soft);
}

.corrections-status-option:has(input:checked) .corrections-status-option-icon {
  color: currentColor;
}

.corrections-status-option:has(input:focus-visible) {
  outline: 2px solid var(--primary-focus-ring);
  outline-offset: 2px;
}

.corrections-month-filter {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.corrections-filter-form select {
  min-height: 2.05rem;
  padding: 0.25rem 0.48rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--field-bg);
  font-size: 0.84rem;
  font-weight: 400;
}

.corrections-filter-form select:disabled {
  border-color: var(--line);
  color: var(--muted);
  background: var(--field-disabled-bg);
  opacity: 0.42;
  cursor: not-allowed;
}

.corrections-month-join {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.corrections-result-count {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
  text-align: right;
}

.list-loading-state {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.8rem;
  min-height: calc(100dvh - 18.5rem);
  padding: 2.25rem 1rem;
  color: var(--muted);
  text-align: center;
}

.list-loading-state[hidden] {
  display: none;
}

.list-loading-state p {
  margin: 0;
  font-weight: 700;
}

.list-loading-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border-width: 3px;
}

.corrections-list,
.correction-form-section {
  width: min(100%, 32rem);
  margin: 0 auto;
}

.corrections-list {
  display: grid;
  gap: 0.55rem;
}

.correction-row {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.75rem;
  border: 1px solid var(--neutral-line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.correction-row.is-pending {
  border-color: var(--warning-line);
  background: var(--warning-soft);
}

.correction-row.is-approved {
  border-color: var(--success-line);
  background: var(--success-tint);
}

.correction-row.is-rejected {
  border-color: var(--danger-line);
  background: var(--danger-tint);
}

.correction-content {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.correction-row-header {
  display: flex;
  align-items: center;
}

.correction-row-header time,
.correction-answer {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.correction-content strong {
  font-size: 1rem;
}

.correction-day-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.correction-human-resources-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  line-height: 1;
}

.correction-human-resources-marker::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  z-index: 20;
  max-width: min(16rem, 72vw);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  translate: -50% 0.12rem;
  transition: opacity 0.12s ease, translate 0.12s ease;
  white-space: nowrap;
}

.correction-human-resources-marker:hover::after,
.correction-human-resources-marker:focus-within::after {
  opacity: 1;
  translate: -50% 0;
}

.correction-human-resources-icon {
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
}

.correction-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.correction-change-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.28rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.correction-change-item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
}

.correction-change-icon {
  width: 0.8rem;
  height: 0.8rem;
}

.correction-change-separator {
  color: var(--muted);
}

.correction-status {
  display: grid;
  place-items: center;
}

.correction-result {
  display: grid;
  justify-items: end;
  gap: 0.3rem;
}

.correction-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  color: var(--muted);
  line-height: 1;
  transition:
    background-color 0.16s ease,
    color 0.16s ease;
}

.correction-row.is-pending:hover .correction-row-action {
  color: var(--warning-text);
  background: var(--warning-tint);
}

.correction-row.is-approved:hover .correction-row-action {
  color: var(--success);
  background: var(--success-tint);
}

.correction-row.is-rejected:hover .correction-row-action {
  color: var(--primary);
  background: var(--primary-bg);
}

.correction-row-action-icon {
  width: 1.25rem;
  height: 1.25rem;
  translate: 0 0;
}

.correction-status-icon {
  width: 1.45rem;
  height: 1.45rem;
  color: var(--muted);
}

.correction-status-icon.is-approved {
  color: var(--success);
}

.correction-status-icon.is-rejected {
  color: var(--primary);
}

.correction-status-icon.is-pending {
  color: var(--warning-text);
}

.correction-answer {
  align-self: start;
  padding-top: 0.18rem;
  text-align: right;
  white-space: nowrap;
}

.corrections-empty-state {
  gap: 0.8rem;
  place-content: center;
  justify-items: center;
  min-height: 50vh;
  padding: 2.25rem 1rem;
  text-align: center;
}

.corrections-empty-state .empty-state-icon {
  width: 4rem;
  height: 4rem;
  color: var(--neutral-icon);
}

.corrections-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: min(100%, 32rem);
  margin: 1rem auto 0;
}

.corrections-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 0.65rem;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
}

.corrections-page-link:hover {
  background: var(--surface-hover);
}

.corrections-page-link.is-disabled {
  color: var(--muted);
  opacity: 0.45;
  cursor: not-allowed;
}

.corrections-page-status {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.correction-show-section {
  display: grid;
  gap: 1rem;
  width: min(100%, 32rem);
  margin: 0 auto;
}

.correction-show-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--neutral-line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font-weight: 800;
}

.correction-show-status.is-approved {
  border-color: var(--success-line);
  background: var(--success-tint);
}

.correction-show-status.is-rejected {
  border-color: var(--danger-line);
  background: var(--danger-tint);
}

.correction-show-status > span {
  font-size: 1.18rem;
  line-height: 1.15;
}

.correction-show-status small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.correction-show-block {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.correction-show-block h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.correction-show-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.correction-show-swipes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.correction-readonly-swipe {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  font-weight: 800;
}

.correction-readonly-swipe-icon {
  width: 1rem;
  height: 1rem;
}

.correction-readonly-swipe[data-kind="entry"] .correction-readonly-swipe-icon {
  color: var(--success);
}

.correction-readonly-swipe[data-kind="exit"] .correction-readonly-swipe-icon {
  color: var(--primary);
}

.correction-form-section {
  display: grid;
  gap: 1rem;
}

.correction-form {
  gap: 0.9rem;
}

.correction-form-details {
  display: grid;
  gap: 0.9rem;
}

.correction-form .field-row {
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.correction-form .form-actions .button {
  min-height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.88rem;
}

.correction-form-actions {
  justify-content: space-between;
}

.correction-submit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.correction-delete-action {
  margin-right: auto;
}

.correction-delete-button {
  color: var(--primary);
  border-color: var(--primary-line);
  background: var(--field-bg);
}

.correction-delete-button:hover {
  border-color: var(--primary-line-strong);
  background: var(--primary-bg-faint);
}

.correction-pending-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--info-line);
  border-radius: 8px;
  color: var(--info-text);
  background: var(--info-soft);
  font-size: 0.9rem;
}

.correction-pending-note-icon {
  width: 1rem;
  height: 1rem;
  color: var(--info-icon);
}

.correction-select-day-state {
  display: grid;
  place-items: center;
  place-content: center;
  gap: 0.8rem;
  min-height: calc(100dvh - 21rem);
  padding: 2rem 1rem;
  color: var(--muted);
  text-align: center;
}

.correction-select-day-state .empty-state-icon {
  width: 4rem;
  height: 4rem;
  color: var(--neutral-icon);
}

.correction-loading-state {
  color: var(--muted);
}

.correction-loading-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border-width: 3px;
}

.correction-select-day-state p {
  max-width: 22rem;
  margin: 0;
}

.correction-day-section {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.correction-day-section legend {
  padding: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.correction-existing-swipes {
  display: grid;
  gap: 0.5rem;
}

.correction-swipe-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0.5rem;
}

.correction-swipe-column {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  min-width: 0;
}

.correction-swipe-column-header {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.correction-swipe-column-list {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.correction-swipe-table-cell {
  display: grid;
  min-width: 0;
  min-height: 2.75rem;
}

.correction-existing-swipe {
  display: grid;
  gap: 0.5rem;
  align-items: center;
}

.correction-existing-swipe {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    color 0.16s ease;
}

.correction-existing-swipe:has(input:checked) {
  border-color: var(--neutral-line);
  color: var(--muted);
  background: var(--surface-subtle);
}

.correction-existing-swipe-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: start;
  position: relative;
  min-width: 0;
}

.correction-existing-swipe:has(input:checked) .correction-existing-swipe-main::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 46%;
  height: 0.12em;
  background: currentColor;
  transform: translateY(-50%);
  pointer-events: none;
}

.correction-existing-swipe:has(input:checked) .correction-existing-swipe-main {
  opacity: 0.5;
}

.correction-existing-swipe-kind-icon {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--muted);
}

.correction-existing-swipe[data-kind="entry"] .correction-existing-swipe-kind-icon {
  color: var(--success);
}

.correction-existing-swipe[data-kind="exit"] .correction-existing-swipe-kind-icon {
  color: var(--primary);
}

.correction-existing-swipe:has(input:checked) .correction-existing-swipe-kind-icon {
  color: currentColor;
}

.correction-existing-swipe-copy {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.correction-existing-swipe-copy strong {
  font-size: 1rem;
  line-height: 1.1;
}

.correction-existing-swipe:has(input:checked) .correction-existing-swipe-copy strong {
  text-decoration: none;
}

.correction-existing-swipe-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.correction-existing-swipe:has(input:checked) .correction-existing-swipe-copy small {
  color: currentColor;
}

.correction-existing-swipe-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  line-height: 1;
  transition:
    background-color 0.16s ease,
    color 0.16s ease;
}

.correction-existing-swipe-keep,
.correction-existing-swipe-remove {
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.correction-existing-swipe-keep {
  display: inline-flex;
}

.correction-existing-swipe-state-icon {
  width: 1rem;
  height: 1rem;
  translate: 0 0;
}

.correction-existing-swipe-state:hover {
  color: var(--primary);
  background: var(--primary-control-bg);
}

.correction-existing-swipe:hover .correction-existing-swipe-state {
  color: var(--primary);
  background: var(--primary-control-bg);
}

.correction-existing-swipe-remove {
  display: none;
}

.correction-existing-swipe:has(input:checked) .correction-existing-swipe-state {
  color: var(--muted);
  background: transparent;
}

.correction-existing-swipe:has(input:checked) .correction-existing-swipe-state:hover,
.correction-existing-swipe:has(input:checked):hover .correction-existing-swipe-state {
  color: var(--warning-text);
  background: var(--warning-soft);
}

.correction-existing-swipe:has(input:checked) .correction-existing-swipe-keep {
  display: none;
}

.correction-existing-swipe:has(input:checked) .correction-existing-swipe-remove {
  display: inline-flex;
}

.correction-swipe-request-cell {
  padding-top: 0;
}

.correction-requested-swipe-remove {
  padding: 0;
  border: 0;
  cursor: pointer;
}

.correction-requested-swipe input[type="time"] {
  width: 5.2rem;
  min-height: 2rem;
  margin-block: -0.25rem;
  padding: 0.35rem 0.5rem;
  border-color: var(--line);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}

.correction-requested-swipe-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 2.55rem;
  padding: 0.45rem 0.65rem;
  border: 1px dashed var(--neutral-line);
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
}

.correction-requested-swipe-add:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface-subtle-hover);
}

.correction-requested-swipe-add-icon {
  width: 1rem;
  height: 1rem;
}

.correction-choice-list {
  gap: 0.35rem;
}

.correction-choice-list label {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.correction-choice-list label:first-of-type {
  border-top: 1px solid var(--line);
}

.stacked-form {
  display: grid;
  gap: 1rem;
}

.field-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--field-bg);
}

.field textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.form-actions {
  justify-content: flex-end;
}

.employee-shell {
  background: var(--employee-shell-bg);
}

.employee-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  padding: 0.8rem 0;
  background: var(--employee-topbar-bg);
  border-bottom: 1px solid var(--primary-line-faint);
  backdrop-filter: blur(12px);
}

.employee-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 40rem);
  margin: 0 auto;
  padding: 0 1rem;
}

.employee-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transform: translateY(1px);
}

.employee-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 0.5rem;
}

.employee-login-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0 0.45rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.employee-login-button .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.employee-login-button:hover {
  color: var(--text);
  background: var(--hover-bg);
}

.employee-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.topbar-form {
  margin: 0;
}

.employee-admin-button,
.employee-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  min-height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
}

.employee-admin-button {
  text-decoration: none;
}

.employee-admin-button .icon,
.employee-logout-button .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.employee-admin-button:hover,
.employee-logout-button:hover {
  color: var(--text);
  background: var(--hover-bg);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--field-bg);
  cursor: pointer;
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.employee-main {
  width: min(100%, 40rem);
  margin: 0 auto;
  padding: 0 1rem 6.75rem;
}

.employee-hero,
.page-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.3rem 0;
}

.employee-hero h1,
.page-intro h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1.12;
}

.employee-hero p,
.page-intro p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.page-title-close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  margin-top: -0.2rem;
  border-radius: 8px;
  color: var(--muted);
}

.page-title-close .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.page-title-close:hover {
  color: var(--text);
  background: var(--hover-bg);
}

.split-intro {
  align-items: center;
}

.clockings-month-controls,
.clockings-month-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.clockings-month-controls {
  justify-self: end;
}

.clockings-month-form select {
  min-height: 2.25rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--field-bg);
  font-size: 0.88rem;
  font-weight: 700;
}

.clockings-month-form select:disabled {
  border-color: var(--line);
  color: var(--muted);
  background: var(--field-disabled-bg);
  opacity: 0.42;
  cursor: not-allowed;
}

.clockings-month-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--field-bg);
}

.clockings-month-arrow:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.clockings-month-arrow.is-disabled {
  border-color: var(--line);
  opacity: 0.42;
  cursor: not-allowed;
}

.clock-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: 8px;
  color: var(--on-primary);
  background: var(--clock-card-bg);
  box-shadow: var(--shadow);
}

.clock-label {
  margin: 0;
  color: var(--inverse-muted);
}

.clock-time {
  font-size: clamp(3.2rem, 16vw, 5.25rem);
  line-height: 1;
  font-weight: 900;
}

.clock-note {
  margin: -0.25rem 0 0;
  color: var(--inverse-muted);
}

.clock-action-form {
  margin: 0.5rem 0 0;
}

.primary-clock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 4.2rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--on-primary);
  background: var(--primary);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0;
}

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

.primary-clock.danger {
  background: var(--danger);
}

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

.today-intro {
  align-items: center;
}

.today-date {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.today-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 4.25rem);
}

.today-layout {
  display: grid;
  grid-template-rows: minmax(max-content, 1fr) auto auto;
  gap: 1.65rem;
  flex: 1;
  width: min(100%, 32rem);
  margin: 0 auto;
}

.today-punch-section {
  display: grid;
  align-self: center;
  justify-items: center;
  gap: 1.1rem;
}

.today-punch-action-form {
  margin: 0;
  isolation: isolate;
}

.today-punch-button {
  position: relative;
  z-index: 0;
  display: inline-grid;
  place-items: center;
  align-content: center;
  gap: 0.8rem;
  width: 14.5rem;
  height: 14.5rem;
  padding: 1.55rem;
  border: 2px solid var(--primary-focus-ring);
  border-radius: 50%;
  color: var(--primary);
  background: var(--surface-soft);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
}

.today-punch-button:hover {
  border-color: var(--primary);
  background: var(--surface-soft);
}

.today-punch-button.is-active {
  border-color: transparent;
  color: var(--on-primary);
  background: var(--danger);
  box-shadow: var(--active-danger-shadow);
}

.today-punch-button.is-active:hover {
  background: var(--primary-strong);
}

.today-punch-button.is-active::before {
  content: "";
  position: absolute;
  inset: -0.62rem;
  z-index: -1;
  border-radius: inherit;
  background: var(--danger);
  filter: blur(18px);
  opacity: 0.24;
  animation: today-punch-glow 1.8s ease-in-out infinite;
}

.today-punch-button .icon {
  width: 2.2rem;
  height: 2.2rem;
}

.today-punch-action-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.today-punch-label {
  font-size: 1.72rem;
}

.today-punch-duration {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.today-punch-duration-number {
  display: inline-block;
  width: 2ch;
  text-align: right;
}

.today-punch-duration-number.is-hours {
  width: 3ch;
}

.today-punch-duration-unit {
  margin: 0 0.28rem 0 0.08rem;
  color: var(--muted);
  font-size: 0.7em;
  font-weight: 700;
}

.today-punch-duration-unit:last-child {
  margin-right: 0;
}

.today-punch-button.is-active .today-punch-duration {
  color: var(--on-primary);
}

.today-punch-button.is-active .today-punch-duration-unit {
  color: var(--inverse-muted);
}

@keyframes today-punch-glow {
  0%,
  100% {
    opacity: 0.18;
    scale: 0.96;
  }

  50% {
    opacity: 0.36;
    scale: 1.04;
  }
}

.today-section {
  display: grid;
  gap: 0.9rem;
}

.today-section-header {
  display: grid;
  gap: 0.5rem;
}

.today-section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.today-section-header h2 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
}

.today-section-rule {
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.today-history-summary {
  display: grid;
  gap: 0.75rem;
}

.today-swipe-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
}

.today-swipe-list .clocking-swipe {
  grid-template-columns: 1.1rem auto;
  gap: 0.35rem;
}

.today-swipe-list .clocking-swipe-icon {
  width: 1rem;
  height: 1rem;
}

.today-swipe-list .clocking-swipe.is-entry .clocking-swipe-icon {
  color: var(--success);
}

.today-swipe-list .clocking-swipe.is-exit .clocking-swipe-icon {
  color: var(--primary);
}

.today-history-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.today-correction-link {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.today-correction-link:hover {
  color: var(--primary);
}

.today-week-section {
  padding-top: 0.2rem;
}

.today-week-lines {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.today-week-lines div {
  display: grid;
  grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr);
  align-items: baseline;
  gap: 1rem;
}

.today-week-lines dt {
  color: var(--muted);
  font-weight: 800;
}

.today-week-lines dd {
  margin: 0;
  color: var(--text);
  font-weight: 400;
  line-height: 1.35;
  text-align: right;
}

.today-week-lines a {
  text-decoration: none;
}

.today-week-lines a:hover {
  color: var(--primary);
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.account-layout {
  display: grid;
  gap: 1.35rem;
  width: min(100%, 32rem);
  margin: 0 auto;
}

.account-section {
  display: grid;
  gap: 0.85rem;
}

.account-section .field {
  grid-template-columns: 8.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.account-section .field label {
  font-size: 0.94rem;
}

.account-section .field input {
  min-height: 2.3rem;
  padding: 0.5rem 0.65rem;
}

.account-theme-field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.account-section .account-theme-field {
  grid-template-columns: 8.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.account-theme-label {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
}

.account-theme-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
}

.account-theme-option-icon {
  width: 0.9rem;
  height: 0.9rem;
}

.account-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.2rem;
  padding: 0 0.75rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
}

.account-primary-button {
  color: var(--on-primary);
  background: var(--account-primary);
}

.account-primary-button:hover {
  background: var(--account-primary-hover);
}

.account-secondary-button,
.account-password-summary {
  border-color: var(--primary-control-line);
  color: var(--primary);
  background: var(--primary-control-bg);
}

.account-secondary-button:hover,
.account-password-summary:hover {
  color: var(--primary-strong);
  border-color: var(--primary-control-line-hover);
  background: var(--primary-control-bg-hover);
}

.account-actions,
.account-actions-row {
  justify-content: flex-end;
}

.account-actions {
  display: flex;
}

.account-actions-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
}

.account-save-button {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
}

.account-password-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 1;
  gap: 0.85rem;
}

.account-password-panel summary {
  cursor: pointer;
  list-style: none;
}

.account-password-panel summary::-webkit-details-marker {
  display: none;
}

.account-password-summary {
  justify-self: start;
}

.account-summary-icon {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
}

.account-summary-icon-up {
  display: none;
}

.account-password-panel[open] .account-summary-icon-down {
  display: none;
}

.account-password-panel[open] .account-summary-icon-up {
  display: block;
}

.account-password-form {
  margin-top: 0.85rem;
}

.account-divider {
  width: min(100%, 32rem);
  margin: 1.2rem auto 1.35rem;
  border: 0;
  border-top: 1px solid var(--line);
}

.account-hr-contact {
  display: grid;
  gap: 0.9rem;
  width: min(100%, 32rem);
  margin: 0 auto;
}

.account-hr-contact h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.account-hr-contact-form textarea {
  min-height: 7rem;
}

.account-hr-flash {
  margin: 0;
}

.account-section .panel-title {
  margin: 0;
}

.account-section .error-summary {
  margin-bottom: 0;
}

.field input[readonly] {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

.metric-list,
.detail-list {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.metric-list div,
.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.metric-list dt,
.detail-list dt {
  color: var(--muted);
}

.metric-list dd,
.detail-list dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.timeline {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: flex;
  gap: 0.75rem;
}

.timeline-icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-bg-soft);
}

.timeline time {
  min-width: 3.3rem;
  color: var(--muted);
  font-weight: 800;
}

.timeline div {
  display: grid;
  gap: 0.15rem;
}

.timeline span {
  color: var(--muted);
}

.employee-nav {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  max-width: 38rem;
  margin: 0 auto;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--employee-nav-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.employee-nav .nav-item {
  flex-direction: column;
  min-height: 3.35rem;
  line-height: 1.1;
}

.employee-nav .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.empty-state,
.error-summary {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
}

.empty-state {
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.empty-state p {
  margin: 0;
}

.error-summary {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  margin-bottom: 1rem;
  border: 1px solid var(--danger-line);
  border-radius: 8px;
  color: var(--danger);
  background: var(--danger-tint);
}

.error-summary-icon {
  width: 1rem;
  height: 1rem;
}

.error-summary-content {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.error-summary-content ul {
  margin: 0;
  padding-left: 1.25rem;
}

.error-summary-content p {
  margin: 0;
}

.error-summary-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: -0.35rem;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 0;
}

.error-summary-close:hover {
  color: var(--text);
}

.fallback-shell {
  min-height: 100vh;
  background: var(--bg);
}

.fallback-main {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1.25rem;
}

.fallback-card {
  display: grid;
  gap: 1rem;
  width: min(100%, 26rem);
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.fallback-card h1 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.1;
}

.fallback-card p {
  margin: 0;
  color: var(--muted);
}

.error-page-main {
  display: grid;
  place-items: center;
  width: min(100%, 40rem);
  min-height: calc(100dvh - 4.25rem);
  margin: 0 auto;
  padding: 0 1rem 6.75rem;
}

.error-page-layout {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  width: min(100%, 28rem);
  margin: 0 auto;
  text-align: center;
}

.error-page-layout h1 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  line-height: 1.08;
}

.error-page-layout p {
  max-width: 24rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.35;
}

.error-page-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

@media (max-width: 680px) {
  body {
    font-size: 15px;
  }

  .employee-auth-shell {
    grid-template-rows:
      minmax(1.25rem, 1fr)
      auto
      minmax(1rem, 0.5fr)
      auto
      minmax(1rem, 0.5fr)
      auto;
  }

  .employee-auth-shell .auth-main {
    grid-row: 2;
    padding-bottom: 0;
  }

  .employee-install-prompt {
    grid-row: 4;
    display: flex;
    padding: 0 1.25rem;
  }

  .employee-auth-footer {
    grid-row: 6;
  }

  .auth-methods {
    grid-template-columns: 1fr;
  }

  .employee-hero,
  .page-intro,
  .split-intro {
    display: grid;
  }

  .employee-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .today-punch-button {
    width: 12.4rem;
    height: 12.4rem;
  }

  .clockings-month-controls {
    justify-self: start;
  }

  .corrections-intro {
    display: flex;
    align-items: center;
  }

  .corrections-intro .page-title {
    min-width: 0;
  }

  .correction-new-link {
    flex: 0 0 auto;
    padding: 0 0.7rem;
    white-space: nowrap;
  }

  .correction-new-link-full {
    display: none;
  }

  .correction-new-link-short {
    display: inline;
  }

  .corrections-filter-form {
    display: grid;
  }

  .correction-row {
    grid-template-columns: 1.5rem minmax(0, 1fr) auto;
    gap: 0.35rem;
  }

  .correction-result {
    grid-column: auto;
    justify-items: end;
  }

  .correction-answer {
    padding-top: 0;
    text-align: left;
  }

  .correction-show-status {
    flex-wrap: wrap;
  }

  .correction-show-status small {
    width: 100%;
    margin-left: 0;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .button,
  .form-actions input[type="submit"] {
    width: 100%;
  }

  .correction-form-actions,
  .correction-submit-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    margin: 0;
  }

  .correction-delete-action {
    width: 100%;
    margin: 0;
  }

  .employee-nav {
    right: 0.5rem;
    bottom: 0.5rem;
    left: 0.5rem;
  }

  .nav-item {
    font-size: 0.8rem;
  }
}

@media (max-width: 420px) {
  .employee-topbar-inner {
    gap: 0.65rem;
    padding-inline: 0.75rem;
  }

  .employee-chip {
    font-size: 0.84rem;
  }

  .account-section .field {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .account-section .account-theme-field {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}
