/* TAP — joyful clarity visual layer. Loaded after the core layout. */
body {
  background:
    radial-gradient(circle at 4% 7%, rgba(32, 201, 190, 0.18) 0 42px, transparent 43px),
    radial-gradient(circle at 97% 4%, rgba(255, 193, 34, 0.18) 0 130px, transparent 131px),
    radial-gradient(circle at 85% 100%, rgba(32, 201, 190, 0.1) 0 210px, transparent 211px),
    linear-gradient(180deg, #fffefa 0%, #f8f7f2 55%, #f5f3fb 100%);
  color: #17135d;
}

.panel,
.metric,
.card,
.mobile-today-card,
.mobile-month-card,
.mobile-quick-card {
  border-color: rgba(32, 25, 98, 0.08);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(43, 32, 116, 0.08);
}

.panel,
.metric {
  border-radius: 22px;
}

.panel-title,
.section-title,
.topbar h1,
.metric .value {
  color: #17135d;
}

.panel-subtitle,
.section-copy,
.topbar-sub,
.muted {
  color: #6e6b8d;
}

.btn {
  min-height: 46px;
  border-radius: 14px;
  font-weight: 850;
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #04a79e 0%, #5f4cff 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(70, 64, 214, 0.22);
}

.btn.warning {
  border-color: rgba(245, 169, 0, 0.2);
  background: linear-gradient(135deg, #ffc638, #f5a900);
  color: #4a3600;
}

.btn.danger {
  border-color: transparent;
  background: linear-gradient(135deg, #ff6f7f, #ff405d);
  color: #fff;
}

.btn.ghost {
  border-color: rgba(95, 76, 255, 0.14);
  background: #f7f5ff;
  color: #413893;
}

.brand-mark {
  border-radius: 15px;
  background: linear-gradient(145deg, #6250ff, #3824c9);
  box-shadow: 0 12px 24px rgba(75, 54, 216, 0.24);
}

.login-page {
  background:
    radial-gradient(circle at 0 100%, rgba(95, 76, 255, 0.85) 0 210px, transparent 211px),
    radial-gradient(circle at 100% 0, rgba(255, 196, 38, 0.84) 0 150px, transparent 151px),
    radial-gradient(circle at 92% 92%, rgba(29, 204, 190, 0.22) 0 180px, transparent 181px),
    #fffefa;
}

.login-panel {
  border-color: rgba(32, 25, 98, 0.08);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 30px 90px rgba(37, 27, 107, 0.16);
}

.login-intro {
  background:
    radial-gradient(circle at 2% 98%, rgba(95, 76, 255, 0.94) 0 180px, transparent 181px),
    radial-gradient(circle at 96% 6%, rgba(29, 204, 190, 0.13) 0 100px, transparent 101px),
    #fffdf8;
  color: #17135d;
}

.login-intro h1,
.login-intro-title {
  color: #17135d;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.login-intro p,
.intro-point span {
  color: #625f80;
}

/* Landing hero copy sits on the light cream panel in the current theme. Keep
   the higher-specificity legacy dark-panel selectors from making it white. */
.login-intro .section-eyebrow,
.invite-panel .login-intro .section-eyebrow,
.login-intro > div > p:not(.section-eyebrow),
.invite-panel .login-intro > div > p:not(.section-eyebrow) {
  color: #17135d;
}

.login-illustration-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-height: 280px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(23, 19, 93, 0.08);
  border-radius: 24px;
  background: #fffdf8;
}

.login-illustration-static {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.intro-point {
  border-color: rgba(32, 25, 98, 0.08);
  background: rgba(255, 255, 255, 0.88);
  color: #17135d;
  box-shadow: 0 8px 20px rgba(42, 32, 112, 0.07);
}

@media (max-width: 680px) {
  .login-illustration-stage {
    max-height: 215px;
    border-radius: 20px;
  }

}

.passkey-login-button {
  border-color: rgba(95, 76, 255, 0.24);
  color: #302589;
}

.kiosk-page {
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
}

.kiosk-card {
  width: min(760px, calc(100% - 32px));
  display: grid;
  gap: 24px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 80px rgba(37, 27, 107, 0.18);
}

.kiosk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kiosk-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kiosk-actions .btn {
  min-height: 72px;
  font-size: 1.05rem;
}

.month-close-panel.is-closed {
  border-color: rgba(4, 167, 158, 0.35);
  background: linear-gradient(135deg, rgba(232, 255, 250, 0.9), rgba(255, 255, 255, 0.98));
}

.preset-button {
  width: 100%;
  border: 1px solid rgba(32, 25, 98, 0.1);
  text-align: left;
  cursor: pointer;
  color: #17135d;
}

.preset-button:hover,
.preset-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(95, 76, 255, 0.38);
  box-shadow: 0 14px 34px rgba(62, 45, 161, 0.12);
}

.passkey-panel,
.push-preference-card,
.kiosk-management-panel {
  overflow: hidden;
}

.approval-route-settings { display: grid; gap: 16px; margin: 10px 0; padding: 20px; border: 1px solid rgba(95, 76, 255, 0.16); border-radius: 20px; background: linear-gradient(145deg, #fbfaff, #f1fffc); }
.settings-subhead h3 { margin: 2px 0 5px; color: #17135d; }
.settings-subhead p { margin: 0; color: #6a647f; line-height: 1.6; }
.work-time-system-guide { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; padding: 16px; border: 1px solid rgba(95, 76, 255, 0.14); border-radius: 16px; background: #f8f7ff; }
.work-time-system-guide strong { color: #17135d; }
.work-time-system-guide span { grid-column: 1 / -1; color: #6a647f; line-height: 1.65; }
.registration-email-button { width: fit-content; margin-top: 8px; }
.approval-route-grid { display: grid; gap: 12px; }
.approval-route-card { margin: 0; padding: 15px; border: 1px solid rgba(95, 76, 255, 0.13); border-radius: 16px; background: #fff; }
.approval-route-card legend { padding: 0 8px; color: #17135d; font-weight: 900; }
.approval-stage-row { display: grid; grid-template-columns: 82px repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; padding: 10px 0; }
.approval-stage-row + .approval-stage-row { border-top: 1px solid rgba(23, 19, 93, 0.08); }
.approval-stage-row > span { align-self: center; color: #5f4cff; font-weight: 900; }
.approval-stage-row label { display: grid; gap: 5px; color: #6a647f; font-size: 0.78rem; font-weight: 800; }
.approval-stage-row select { width: 100%; min-height: 44px; border: 1px solid rgba(23, 19, 93, 0.12); border-radius: 12px; background: #f7f5fc; color: #17135d; padding: 8px 10px; }
.approval-progress { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: #5f4cff; font-size: 0.76rem; font-weight: 850; }
.payroll-custom-template { display: grid; gap: 14px; margin-top: 18px; padding: 20px; border: 1px solid rgba(4, 167, 158, 0.18); border-radius: 20px; background: linear-gradient(145deg, #f3fffc, #f7f5ff); }
.payroll-custom-template textarea { min-height: 92px; }
.payroll-template-library { display: grid; gap: 10px; }
.payroll-template-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid rgba(23, 19, 93, 0.09); border-radius: 15px; background: rgba(255,255,255,.88); }
.payroll-template-item.is-selected { border-color: rgba(95, 76, 255, 0.42); box-shadow: 0 0 0 3px rgba(95, 76, 255, 0.08); }
.payroll-template-select { display: grid; gap: 3px; border: 0; background: transparent; color: #17135d; text-align: left; cursor: pointer; }
.payroll-template-select span { color: #6a647f; font-size: .78rem; }
@media (max-width: 680px) { .payroll-template-item { grid-template-columns: 1fr; } .payroll-template-item .row-actions { justify-content: stretch; } .payroll-template-item .row-actions .btn { flex: 1; } }
.push-preference-controls { display: grid; gap: 12px; }
.push-preference-options { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.push-preference-options label { display: inline-flex; align-items: center; gap: 8px; color: #4d486c; font-weight: 800; }
.push-preference-options input { width: 20px; height: 20px; accent-color: #5f4cff; }
.mobile-card-copy { margin: 8px 0 14px; color: #6a647f; font-size: 0.88rem; line-height: 1.7; }
.mobile-push-card .push-preference-options { display: grid; }
.mobile-push-card .push-preference-controls > .btn { width: 100%; }
.login-page { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; }
.landing-feature-showcase { width: min(1180px, 100%); display: grid; gap: 24px; margin: 18px auto 40px; padding: clamp(24px, 5vw, 48px); border: 1px solid rgba(95, 76, 255, 0.12); border-radius: 30px; background: rgba(255, 255, 255, 0.93); box-shadow: 0 28px 80px rgba(57, 44, 107, 0.12); }
.landing-feature-copy { max-width: 720px; text-align: center; margin: 0 auto; }
.landing-feature-copy h2 { margin: 4px 0 12px; color: #17135d; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.2; letter-spacing: -0.04em; }
.landing-feature-copy > p:last-child { margin: 0; color: #625f80; line-height: 1.8; }
.landing-product-preview { overflow: hidden; border: 1px solid rgba(23, 19, 93, 0.1); border-radius: 22px; background: #fffdf8; box-shadow: 0 18px 44px rgba(57, 44, 107, 0.12); }
.landing-product-preview img { display: block; width: 100%; height: auto; }
.landing-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.landing-feature-grid article { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 18px; border: 1px solid rgba(23, 19, 93, 0.08); border-radius: 18px; background: linear-gradient(145deg, #fff, #f8f6ff); }
.landing-feature-grid article > svg { width: 24px; height: 24px; color: #04a79e; }
.landing-feature-grid h3 { margin: 0 0 5px; color: #17135d; font-size: 1rem; }
.landing-feature-grid p { margin: 0; color: #6a647f; font-size: 0.84rem; line-height: 1.65; }

@media (max-width: 820px) {
  .login-page { justify-content: flex-start; }
  .landing-feature-showcase { padding: 24px 18px; border-radius: 24px; }
  .landing-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .approval-stage-row { grid-template-columns: 1fr; }
  .approval-stage-row > span { margin-bottom: 2px; }
}

@media (max-width: 640px) {
  .kiosk-card {
    width: min(100% - 20px, 560px);
    padding: 20px;
    border-radius: 24px;
  }

  .kiosk-head,
  .kiosk-card .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .kiosk-actions,
  .payroll-preset-grid {
    grid-template-columns: 1fr;
  }

  .kiosk-actions .btn {
    min-height: 60px;
  }
}

.sidebar {
  background: linear-gradient(180deg, #231875, #312595 65%, #0b8d86 145%);
}

.topbar {
  border-color: rgba(32, 25, 98, 0.08);
  background: rgba(255, 254, 250, 0.92);
  backdrop-filter: blur(18px) saturate(1.25);
}

.clock-face,
.mobile-focus-card {
  border-color: rgba(32, 25, 98, 0.08);
  background:
    radial-gradient(circle at 96% 4%, rgba(255, 196, 38, 0.25) 0 80px, transparent 81px),
    radial-gradient(circle at 5% 95%, rgba(29, 204, 190, 0.13) 0 105px, transparent 106px),
    #fffefa;
  color: #17135d;
  box-shadow: 0 24px 60px rgba(43, 32, 116, 0.12);
}

.clock-face::before,
.mobile-focus-card::before {
  border-color: rgba(95, 76, 255, 0.1);
}

.clock-time,
.mobile-focus-clock strong,
.mobile-focus-greeting,
.mobile-focus-foot strong {
  color: #17135d;
}

.clock-date,
.mobile-focus-head small,
.mobile-focus-clock > span,
.mobile-focus-clock small,
.mobile-focus-foot {
  color: #6e6b8d;
}

.mobile-focus-foot {
  border-color: rgba(32, 25, 98, 0.09);
}

.status-pill {
  border-width: 0;
  font-weight: 850;
}

.status-working,
.status-approved {
  background: #ddf7f4;
  color: #058b84;
}

.status-break,
.status-pending,
.status-warning {
  background: #fff0cb;
  color: #b97300;
}

.status-closed {
  background: #eeebff;
  color: #5b49e7;
}

.status-off,
.status-rejected {
  background: #ffe8ec;
  color: #df3852;
}

.grid.four .metric:nth-child(4n + 1) { background: linear-gradient(145deg, #fff, #e7fbf7); }
.grid.four .metric:nth-child(4n + 2) { background: linear-gradient(145deg, #fff, #f0edff); }
.grid.four .metric:nth-child(4n + 3) { background: linear-gradient(145deg, #fff, #fff3d3); }
.grid.four .metric:nth-child(4n + 4) { background: linear-gradient(145deg, #fff, #ffecef); }

.field input,
.field select,
.field textarea,
input,
select,
textarea {
  border-color: rgba(32, 25, 98, 0.11);
  border-radius: 14px;
  background: #faf9ff;
  color: #17135d;
}

@media (max-width: 820px) {
  body {
    background:
      radial-gradient(circle at 0 7%, rgba(29, 204, 190, 0.13) 0 80px, transparent 81px),
      radial-gradient(circle at 100% 1%, rgba(255, 196, 38, 0.13) 0 105px, transparent 106px),
      linear-gradient(180deg, #fffefa, #f7f5fc 58%, #f4f2fa);
  }

  .sidebar,
  .employee-shell .sidebar,
  .admin-shell .sidebar {
    border-top-color: rgba(32, 25, 98, 0.08);
    background: rgba(255, 254, 250, 0.97);
    box-shadow: 0 -14px 36px rgba(36, 26, 107, 0.12);
    backdrop-filter: blur(18px) saturate(1.2);
  }

  .nav-button,
  .employee-shell .nav-button,
  .admin-shell .nav-button {
    color: #716d8c;
  }

  .nav-button.active,
  .employee-shell .nav-button.active,
  .admin-shell .nav-button.active {
    background: linear-gradient(145deg, #5f4cff, #08a49c);
    color: #fff;
    box-shadow: 0 10px 22px rgba(68, 55, 205, 0.24);
  }

  .topbar,
  .employee-shell .topbar,
  .admin-shell .topbar {
    background: rgba(255, 254, 250, 0.93);
  }

  .mobile-user-menu-button {
    background: linear-gradient(145deg, #e1faf5, #eeebff);
  }

  .mobile-user-avatar,
  .mobile-account-avatar {
    background: linear-gradient(145deg, #08b0a7, #6250ff);
  }

  .mobile-focus-card {
    padding: 18px;
    border-radius: 27px;
  }

  .mobile-focus-action,
  .clock-primary-action {
    min-height: 58px;
    border-radius: 18px;
    font-size: 1.02rem;
  }

  /* `.show-mobile` resolves to `display: initial` in the base stylesheet.
     Restore the button's flex layout so its icon and label stay centered as
     one visual group on every mobile width. */
  .clock-primary-action.show-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .clock-primary-action svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
  }

  .clock-next-desktop { display: none; }

  .clock-action-grid .btn:disabled { display: none; }

  .clock-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .metric {
    min-height: 132px;
    padding: 15px;
  }

  .mobile-account-sheet,
  .punch-confirm-card {
    background: #fffefa;
  }

  /* Mobile legibility guardrails: keep copy inside its own component and
     remove decorative collisions at narrow iPhone widths. */
  .topbar > div:first-child,
  .panel-header > div,
  .content-stack,
  .login-form,
  .field,
  .notice,
  .notice p,
  .row-actions {
    min-width: 0;
    max-width: 100%;
  }

  .topbar h1,
  .employee-shell .topbar h1,
  .admin-shell .topbar h1 {
    max-width: calc(100vw - 152px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-user-status {
    flex: 0 0 auto;
  }

  .metric {
    padding-top: 21px;
  }

  .metric::before,
  .employee-dashboard .metric::before {
    inset: 0 auto auto 16px;
    width: 38px;
    height: 5px;
  }

  .metric .label {
    min-width: 0;
    align-items: flex-start;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .metric .label svg {
    flex: 0 0 auto;
    margin-top: 1px;
  }

  .grid.four > .metric:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    min-height: 108px;
  }

  .login-form,
  .field,
  .field input,
  .field select,
  .field textarea,
  .login-form .btn {
    width: 100%;
    max-width: 100%;
  }

  .notice {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .notice p,
  .panel-subtitle,
  .list-item p,
  .field-help,
  .hint {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .notice p strong {
    display: block;
    margin-bottom: 3px;
  }

  .calendar-grid,
  .employee-shell .calendar-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    scroll-snap-type: none;
  }

  .day-card {
    min-width: 0;
    min-height: 128px;
    padding: 12px;
  }

  .shift-chip,
  .shift-chip strong,
  .shift-chip span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .tracking-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    overflow: visible;
  }

  .tracking-filter button {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .map-policy-foot {
    display: block;
    overflow-wrap: anywhere;
  }

  .map-policy-foot > svg {
    float: left;
    margin: 2px 8px 4px 0;
  }

  .map-policy-foot a {
    display: inline;
    white-space: normal;
  }

  .panel-header .row-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .panel-header .row-actions .btn {
    flex: 1 1 138px;
  }

  .btn {
    max-width: 100%;
    white-space: normal;
    line-height: 1.3;
  }
}

@media (max-width: 360px) {
  .topbar,
  .employee-shell .topbar,
  .admin-shell .topbar {
    padding-right: 10px;
    padding-left: 10px;
  }

  .topbar h1,
  .employee-shell .topbar h1,
  .admin-shell .topbar h1 {
    max-width: calc(100vw - 140px);
    font-size: 1rem;
  }

  .mobile-user-status {
    gap: 5px;
  }

  .mobile-user-status .status-pill {
    padding: 4px 7px;
    font-size: 0.68rem;
  }

  .grid.four {
    gap: 8px;
  }

  .metric {
    min-height: 120px;
    padding: 20px 12px 12px;
  }

  .metric .label {
    gap: 5px;
    font-size: 0.7rem;
  }

  .metric .label svg {
    width: 16px;
    height: 16px;
  }

  .metric .value {
    font-size: 1.55rem;
  }

  .metric .sub {
    font-size: 0.7rem;
  }
}

/* Compliance center: clear completion, calm hierarchy, and thumb-friendly setup. */
.compliance-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  color: #17135d;
  border: 1px solid rgba(95, 76, 255, 0.12);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 198, 56, 0.3), transparent 32%),
    radial-gradient(circle at 0% 100%, rgba(4, 167, 158, 0.2), transparent 36%),
    linear-gradient(135deg, #fffefb 0%, #f7f5ff 100%);
}

.compliance-hero::after {
  content: "";
  position: absolute;
  right: 18%;
  bottom: -54px;
  width: 160px;
  height: 160px;
  border: 24px solid rgba(95, 76, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.compliance-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.compliance-hero-copy h2 {
  margin: 6px 0 10px;
  font-size: clamp(1.65rem, 3.4vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.compliance-hero-copy > p:last-child {
  margin: 0;
  color: #625b7a;
  line-height: 1.8;
}

.compliance-ring {
  position: relative;
  z-index: 1;
  display: grid;
  width: 144px;
  aspect-ratio: 1;
  place-content: center;
  text-align: center;
  border: 10px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #04a79e, #5f4cff, #ffc638) border-box;
  box-shadow: 0 18px 38px rgba(57, 44, 107, 0.16);
}

.compliance-ring strong {
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.compliance-ring strong span {
  font-size: 1rem;
  color: #746d89;
}

.compliance-ring small {
  margin-top: 7px;
  color: #078d88;
  font-size: 0.74rem;
  font-weight: 900;
}

.compliance-coverage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.coverage-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(95, 76, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(57, 44, 107, 0.07);
}

.coverage-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 950;
  background: linear-gradient(135deg, #04a79e, #5f4cff);
  box-shadow: 0 8px 15px rgba(4, 167, 158, 0.2);
}

.coverage-card strong,
.coverage-card p {
  overflow-wrap: anywhere;
}

.coverage-card strong {
  color: #211b60;
  font-size: 0.9rem;
}

.coverage-card p {
  margin: 4px 0 0;
  color: #777087;
  font-size: 0.76rem;
  line-height: 1.55;
}

.compliance-setup-card {
  border-color: rgba(4, 167, 158, 0.22);
  background: linear-gradient(180deg, rgba(231, 252, 249, 0.62), #fff 34%);
}

.field-wide {
  grid-column: 1 / -1;
}

.legal-profile-form .btn {
  min-height: 52px;
}

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

@media (max-width: 620px) {
  .compliance-hero {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 14px;
    padding: 20px;
    border-radius: 22px;
  }

  .compliance-hero-copy h2 {
    font-size: 1.45rem;
    letter-spacing: -0.035em;
  }

  .compliance-hero-copy > p:last-child {
    font-size: 0.78rem;
    line-height: 1.65;
  }

  .compliance-ring {
    width: 88px;
    border-width: 7px;
  }

  .compliance-ring strong {
    font-size: 1.55rem;
  }

  .compliance-ring strong span {
    font-size: 0.7rem;
  }

  .compliance-ring small {
    margin-top: 3px;
    font-size: 0.58rem;
  }

  .compliance-coverage {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .coverage-card {
    padding: 13px 14px;
    border-radius: 15px;
  }

  .coverage-mark {
    width: 31px;
    height: 31px;
  }

  .legal-profile-form {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }
}

/* Balanced mobile type scale: prominent values stay scannable without
   overpowering labels, controls, or the next section. */
@media (max-width: 820px) {
  .clock-time,
  .employee-shell .clock-time {
    font-size: clamp(2.5rem, 12vw, 3.15rem);
    letter-spacing: -0.055em;
  }

  .mobile-focus-clock > strong {
    font-size: clamp(2.5rem, 12vw, 3.05rem);
    letter-spacing: -0.055em;
  }

  .clock-date,
  .employee-shell .clock-date {
    font-size: 0.78rem;
  }

  .clock-face,
  .employee-shell .clock-face {
    min-height: 222px;
  }

  .metric .value,
  .employee-dashboard .metric .value {
    font-size: clamp(1.5rem, 6.5vw, 1.72rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
  }

  .metric .sub {
    margin-top: 6px;
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .metric {
    min-height: 116px;
  }

  .grid.four > .metric:last-child:nth-child(odd) {
    min-height: 96px;
  }

  .payslip-net strong {
    font-size: clamp(1.5rem, 6.5vw, 1.8rem);
  }

  .location-overview-card strong {
    font-size: 1.35rem;
  }

  .mobile-focus-action,
  .clock-primary-action,
  .employee-shell .clock-face > .btn {
    font-size: 0.94rem;
  }
}

@media (max-width: 360px) {
  .clock-time,
  .employee-shell .clock-time,
  .mobile-focus-clock > strong {
    font-size: 2.42rem;
  }

  .metric .value,
  .employee-dashboard .metric .value {
    font-size: 1.45rem;
  }

  .metric {
    min-height: 110px;
  }
}

/* Statutory books workspace */
.statutory-ledgers-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  padding: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 98% 0, rgba(255, 198, 56, 0.2) 0 105px, transparent 106px),
    linear-gradient(125deg, #fffefa 0%, #eefcf8 52%, #f0edff 100%);
}

.statutory-ledgers-hero h2 {
  margin: 4px 0 8px;
  color: #17135d;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.statutory-ledgers-hero p:not(.section-eyebrow) {
  max-width: 720px;
  margin: 0;
  color: #686482;
  line-height: 1.75;
}

.ledger-hero-score {
  width: 112px;
  height: 112px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 10px solid rgba(95, 76, 255, 0.13);
  border-top-color: #5f4cff;
  border-right-color: #08a49c;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 16px 34px rgba(53, 41, 154, 0.12);
}

.ledger-hero-score strong {
  color: #17135d;
  font-size: 2rem;
  line-height: 1;
}

.ledger-hero-score strong span {
  font-size: 0.82rem;
  color: #77728e;
}

.ledger-hero-score small {
  margin-top: 5px;
  color: #686482;
  font-weight: 800;
}

.statutory-ledger-filters .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.statutory-ledger-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(32, 25, 98, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(43, 32, 116, 0.08);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.statutory-ledger-card.selected {
  border-color: rgba(95, 76, 255, 0.55);
  box-shadow: 0 14px 34px rgba(73, 57, 193, 0.16);
  transform: translateY(-2px);
}

.statutory-ledger-card > button {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 19px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.ledger-card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #e2faf5, #ece9ff);
  color: #5144dc;
}

.ledger-card-icon svg {
  width: 23px;
  height: 23px;
}

.ledger-card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ledger-card-copy small {
  color: #5f4cff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.ledger-card-copy strong {
  color: #17135d;
  font-size: 1.05rem;
}

.ledger-card-copy > span {
  color: #706c87;
  font-size: 0.78rem;
  line-height: 1.5;
}

.statutory-ledger-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 13px 19px;
  border-top: 1px solid rgba(32, 25, 98, 0.07);
  color: #706c87;
  font-size: 0.75rem;
}

.statutory-ledger-preview {
  overflow: hidden;
}

.statutory-ledger-table {
  max-height: 520px;
  border: 1px solid rgba(32, 25, 98, 0.09);
  border-radius: 16px;
}

.statutory-ledger-table table {
  min-width: 1080px;
}

.statutory-ledger-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.statutory-ledger-table th {
  background: #eeebff;
  color: #2b255b;
  white-space: nowrap;
}

.statutory-ledger-table td {
  max-width: 240px;
  overflow-wrap: anywhere;
}

.ledger-preview-note {
  margin: 12px 0 0;
  color: #706c87;
  font-size: 0.78rem;
}

@media (max-width: 1100px) {
  .statutory-ledgers-hero {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .statutory-ledgers-hero > .btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .statutory-ledgers-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 20px;
    border-radius: 24px;
  }

  .statutory-ledgers-hero h2 {
    font-size: clamp(1.45rem, 7.5vw, 2rem);
  }

  .statutory-ledgers-hero p:not(.section-eyebrow) {
    font-size: 0.82rem;
    line-height: 1.65;
  }

  .ledger-hero-score {
    width: 82px;
    height: 82px;
    border-width: 7px;
  }

  .ledger-hero-score strong {
    font-size: 1.45rem;
  }

  .ledger-hero-score small {
    font-size: 0.63rem;
  }

  .statutory-ledgers-hero > .btn {
    width: 100%;
  }

  .statutory-ledger-filters .form-grid,
  .statutory-ledger-cards {
    grid-template-columns: 1fr;
  }

  .statutory-ledger-card > button {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 16px;
  }

  .statutory-ledger-card > button > .status-pill {
    grid-column: 2;
    justify-self: start;
  }

  .statutory-ledger-card footer {
    align-items: flex-start;
    padding-left: 16px;
  }

  .statutory-ledger-preview .panel-header {
    display: grid;
  }

  .statutory-ledger-preview .row-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .statutory-ledger-preview .row-actions .btn {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .statutory-ledgers-hero {
    grid-template-columns: 1fr;
  }

  .ledger-hero-score {
    width: 74px;
    height: 74px;
    position: absolute;
    top: 16px;
    right: 16px;
  }

  .statutory-ledgers-hero > div:first-child {
    padding-right: 62px;
  }

  .statutory-ledger-card footer {
    display: grid;
  }
}
