:root {
  --black: #07090d;
  --ink: #101a2e;
  --ink-soft: #18233b;
  --crimson: #c41e4d;
  --crimson-deep: #9e1740;
  --crimson-light: #f85f86;
  --white: #ffffff;
  --text-soft: #a9b0bd;
  --line: rgba(255, 255, 255, 0.12);
  --success: #45c78a;
  --danger: #ff7896;
  --display: "Segoe UI Semibold", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --workspace-gutter: clamp(24px, 2.5vw, 36px);
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.app-shell,
.splash,
.login-view {
  min-height: 100svh;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #030405;
  transition: opacity 600ms ease, visibility 600ms ease;
}

body[data-skip-splash="true"] .splash {
  display: none;
}

.splash.is-leaving {
  visibility: hidden;
  opacity: 0;
}

.splash__glow {
  position: absolute;
  width: min(55vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 30, 77, 0.2), transparent 66%);
  opacity: 0;
  animation: glow-breathe 1.7s 180ms ease-out forwards;
}

.splash__brand {
  position: relative;
  display: grid;
  justify-items: center;
  min-width: min(78vw, 460px);
}

.splash__line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 240px;
  background: linear-gradient(180deg, transparent, var(--crimson-light) 35%, var(--crimson) 65%, transparent);
  box-shadow: 0 0 28px rgba(196, 30, 77, 0.95);
  opacity: 0;
  transform: translate(-50%, -50%) scaleY(0.04);
  animation: light-strike 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.splash__mark {
  width: clamp(76px, 10vw, 108px);
  opacity: 0;
  filter: drop-shadow(0 0 34px rgba(196, 30, 77, 0.62));
  transform: scale(0.62);
  animation: mark-reveal 900ms 620ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash__word {
  margin-top: 22px;
  font-family: var(--display);
  font-size: clamp(25px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: 0.52em;
  line-height: 1;
  opacity: 0;
  transform: translateX(0.26em);
  animation: word-reveal 760ms 970ms ease-out forwards;
}

.splash__subtitle {
  margin-top: 13px;
  color: var(--theme-muted);
  font-size: clamp(9px, 1.3vw, 11px);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0;
  animation: subtitle-reveal 520ms 1.28s ease-out forwards;
}

.login-view {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 40px 20px 72px;
  background:
    radial-gradient(circle at 50% -20%, rgba(196, 30, 77, 0.14), transparent 42%),
    linear-gradient(145deg, #090c13, #050609 72%);
  opacity: 0;
  transition: opacity 700ms ease;
}

.login-view.is-visible {
  opacity: 1;
}

.ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  pointer-events: none;
}

.ambient--one {
  top: 9%;
  left: 17%;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(196, 30, 77, 0.13);
  box-shadow: inset 0 0 80px rgba(196, 30, 77, 0.05);
}

.ambient--two {
  right: 14%;
  bottom: 8%;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 40px 38px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(24, 35, 59, 0.84), rgba(10, 14, 23, 0.94));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5), inset 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(22px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 25% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(248, 95, 134, 0.8), transparent);
}

.login-card__header {
  margin-bottom: 30px;
  text-align: center;
}

.login-card__logo {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 12px 22px rgba(196, 30, 77, 0.28));
}

.eyebrow {
  margin: 13px 0 20px;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.02em;
}

.intro,
.otp-heading p,
.success-panel p {
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--theme-text);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.input-shell svg {
  position: absolute;
  left: 15px;
  width: 18px;
  fill: none;
  stroke: var(--theme-muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.input-shell input,
.otp-input {
  width: 100%;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  outline: none;
  background: rgba(2, 4, 8, 0.52);
  color: var(--white);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-shell input {
  padding: 0 46px 0 44px;
  font-size: 14px;
}

.input-shell input:focus,
.otp-input:focus {
  border-color: rgba(248, 95, 134, 0.85);
  background: rgba(4, 6, 11, 0.82);
  box-shadow: 0 0 0 3px rgba(196, 30, 77, 0.15);
}

.verified-dot {
  position: absolute;
  right: 14px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(69, 199, 138, 0.15);
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
}

.field-note {
  margin: 9px 0 20px;
  color: var(--theme-muted);
  font-size: 11.5px;
}

.primary-button,
.secondary-button,
.resend-button,
.back-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  display: flex;
  width: 100%;
  height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-deep));
  box-shadow: 0 12px 26px rgba(158, 23, 64, 0.27);
  color: var(--white);
  font-size: 13.5px;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.primary-button:hover:not(:disabled) {
  box-shadow: 0 15px 34px rgba(196, 30, 77, 0.34);
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.primary-button:active:not(:disabled) {
  transform: translateY(0);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.primary-button svg,
.back-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.form-message {
  min-height: 18px;
  margin: 0 0 12px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
}

.form-message.is-success {
  color: var(--success);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: -9px 0 23px;
  padding: 0;
  background: transparent;
  color: var(--theme-muted);
  font-size: 12px;
}

.back-button:hover {
  color: var(--white);
}

.otp-heading {
  margin-bottom: 24px;
}

.otp-heading h2,
.success-panel h2 {
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 22px;
}

.otp-heading strong {
  color: var(--theme-text);
  font-weight: 600;
}

.otp-input {
  padding: 0 18px;
  text-align: center;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.52em;
  text-indent: 0.52em;
}

.otp-input::placeholder {
  color: var(--theme-muted);
}

.local-code {
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px dashed rgba(69, 199, 138, 0.35);
  border-radius: 7px;
  background: rgba(69, 199, 138, 0.06);
  color: var(--success);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  text-align: center;
}

.resend-button {
  display: block;
  margin: 17px auto 0;
  padding: 4px;
  background: transparent;
  color: var(--theme-muted);
  font-size: 12px;
}

.resend-button:not(:disabled):hover {
  color: var(--white);
}

.resend-button:disabled {
  cursor: default;
  color: var(--theme-muted);
}

.success-panel {
  text-align: center;
}

.success-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  place-items: center;
  border: 1px solid rgba(69, 199, 138, 0.38);
  border-radius: 50%;
  background: rgba(69, 199, 138, 0.09);
  color: var(--success);
  font-size: 22px;
}

.secondary-button {
  height: 42px;
  margin-top: 24px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(21,31,50,0.04);
  color: var(--theme-text);
  font-size: 13px;
}

.secondary-button:hover {
  background: rgba(21,31,50,0.08);
}

.login-card__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  color: var(--theme-muted);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.security-mark svg {
  width: 15px;
  fill: none;
  stroke: var(--theme-muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.page-caption {
  position: absolute;
  bottom: 23px;
  margin: 0;
  color: var(--theme-text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.workspace {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  background: var(--theme-raised);
  color: var(--theme-text);
  opacity: 0;
  transition: opacity 600ms ease;
}

.workspace.is-visible {
  opacity: 1;
}

.workspace-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100svh;
  flex-direction: column;
  background: var(--ink);
  color: var(--theme-text);
}

.workspace-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.workspace-brand__mark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.workspace-brand__mark img {
  width: 26px;
  height: 26px;
}

.workspace-brand p {
  margin: 4px 0 0 35px;
  color: var(--theme-muted);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.workspace-scope {
  margin: 13px 12px 0;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(21,31,50,0.035);
}

.workspace-scope__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--theme-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-scope__heading small {
  overflow: hidden;
  color: var(--theme-muted);
  font-size: 8.5px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.workspace-scope__switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(2, 4, 8, 0.35);
}

.workspace-scope__switch button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--theme-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.workspace-scope__switch button:hover:not(:disabled) {
  color: var(--theme-text);
}

.workspace-scope__switch button.is-active {
  background: var(--crimson-deep);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.09), 0 5px 13px rgba(91, 12, 36, 0.24);
  color: var(--theme-text);
}

.workspace-scope__switch button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.workspace-scope__fixed {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(2, 4, 8, 0.32);
  color: var(--theme-text);
  font-size: 11px;
}

.workspace-scope__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--crimson-light);
  box-shadow: 0 0 0 3px rgba(196, 30, 77, 0.13);
}

.workspace-scope__fixed strong {
  flex: 1;
}

.workspace-scope__fixed svg {
  width: 14px;
  fill: none;
  stroke: var(--theme-muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.workspace-scope__message {
  min-height: 0;
  margin: 7px 2px 0;
  color: var(--theme-muted);
  font-size: 9px;
  line-height: 1.35;
}

.workspace-scope__message:empty {
  display: none;
}

.workspace-nav {
  flex: 1;
  padding: 21px 10px;
}

.workspace-nav__label {
  margin: 0;
  padding: 10px;
  min-height: 34px;
  border-radius: 7px;
  color: var(--theme-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.workspace-nav__group + .workspace-nav__group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.workspace-nav__group > .workspace-nav__label::after {
  font-size: 15px;
}

.workspace-nav__label:hover,
.workspace-nav__group:has(.workspace-nav__item.is-active:not([hidden])) > .workspace-nav__label {
  color: var(--theme-text);
}

.workspace-nav__label:focus-visible {
  outline: 2px solid #ff91b0;
  outline-offset: -2px;
}

.workspace-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--theme-text);
  font-size: 13.5px;
  font-weight: 550;
  text-decoration: none;
}

.workspace-nav__item svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

button.workspace-nav__item {
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

.workspace-nav__badge {
  min-width: 21px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(21,31,50,0.14);
  color: var(--theme-text);
  font-size: 9.5px;
  font-weight: 750;
  line-height: 1.45;
  text-align: center;
}

.workspace-nav__item.is-active {
  background: var(--crimson-deep);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.workspace-page {
  animation: page-in 260ms ease both;
}

.workspace-page:not(.is-active) {
  display: none;
}

.workspace-sidebar__footer {
  padding: 15px 18px 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--theme-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.admin-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  text-transform: none;
}

.admin-summary__avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #303c52;
  color: var(--theme-green-text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}

.admin-summary strong,
.admin-summary small {
  display: block;
}

.admin-summary strong {
  color: var(--theme-green-text);
  font-size: 11.5px;
}

.admin-summary small {
  margin-top: 1px;
  color: var(--theme-muted);
  font-size: 10px;
}

.workspace-sidebar__footer > p {
  margin: 12px 0 0;
  letter-spacing: 0.08em;
}

.logout-button {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(21,31,50,0.035);
  color: var(--theme-text);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 650;
  text-align: left;
}

.logout-button:hover {
  border-color: rgba(248, 95, 134, 0.32);
  background: rgba(196, 30, 77, 0.12);
  color: var(--theme-text);
}

.logout-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.logout-button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.workspace-main {
  min-width: 0;
}

.workspace-topbar {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px var(--workspace-gutter);
  border-bottom: 1px solid var(--theme-line);
  background: rgba(21,31,50,0.88);
}

.workspace-kicker {
  margin: 0 0 2px;
  color: var(--theme-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.workspace-topbar h1 {
  margin: 0;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.01em;
}

.workspace-topbar h1:focus {
  outline: none;
}

.workspace-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--theme-line);
  border-radius: 999px;
  background: var(--theme-surface);
  color: var(--theme-muted);
  font-size: 10.5px;
  font-weight: 650;
}

.workspace-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1f7a4d;
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.11);
}

.workspace-content {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 28px var(--workspace-gutter) 64px;
}

@media (min-width: 781px) {
  .workspace-content {
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
    padding-right: var(--workspace-gutter);
    padding-left: var(--workspace-gutter);
  }
}

.get-started-heading {
  max-width: 610px;
  margin: 0 auto 30px;
  text-align: center;
}

.section-number {
  margin-bottom: 12px;
  color: var(--crimson);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.get-started-heading h2 {
  margin-bottom: 10px;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.035em;
}

.get-started-heading > p:last-child {
  margin-bottom: 0;
  color: var(--theme-muted);
  font-size: 14px;
}

.browse-button {
  min-width: 148px;
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  transition: background 150ms ease, transform 150ms ease;
}

.browse-button:hover:not(:disabled) {
  background: var(--ink-soft);
  transform: translateY(-1px);
}

.browse-button:disabled {
  cursor: not-allowed;
  opacity: 0.82;
  transform: none;
}

.page-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-heading-row h2,
.detail-heading h2 {
  margin: 0 0 8px;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.035em;
}

.page-heading-row > div > p:last-child,
.detail-heading > div > p:last-child {
  margin: 0;
  color: var(--theme-muted);
  font-size: 13.5px;
}

.compact-button,
.view-button,
.delete-timesheet-button,
.timesheet-bin-button,
.confirm-button,
.cancel-button,
.danger-button,
.icon-button,
.text-button,
.worker-tab {
  border: 0;
  cursor: pointer;
}

.compact-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.compact-button--light {
  border: 1px solid var(--theme-line);
  background: var(--theme-surface);
  color: var(--theme-text);
}

.compact-button--accept { background: #16804a; color: var(--theme-text); }
.compact-button--accept:hover:not(:disabled) { background: #11673b; }

.compact-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.passkey-sign-in {
  width: 100%;
  margin-top: 12px;
}

.data-card,
.detail-metadata,
.record-table-wrap {
  border: 1px solid var(--theme-line);
  border-radius: 13px;
  background: var(--theme-surface);
  box-shadow: 0 12px 38px rgba(16, 26, 46, 0.055);
}

.data-card {
  overflow: hidden;
}

.data-card__header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--theme-line);
}

#payments-mobile-crew .data-card__header { flex-wrap: wrap; }
.payroll-table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
#mobilePaymentFilters.is-crew { grid-template-columns:minmax(140px,.8fr) minmax(150px,1fr) minmax(200px,1.4fr) minmax(145px,1fr) auto; }
#mobilePaymentFilters > label { min-width:0; }
@media(max-width:1400px) {
  #mobilePaymentFilters.is-crew { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #mobilePaymentFilters.is-crew > button { grid-column:1 / -1; justify-self:end; }
}
@media (max-width: 680px) {
  .payroll-table-actions { width: 100%; }
  .payroll-table-actions > .compact-button { width: 100%; }
  #mobilePaymentFilters.is-crew { grid-template-columns:minmax(0,1fr); }
  #mobilePaymentFilters.is-crew > button { width:100%; justify-self:stretch; }
}

.data-card__header strong,
.data-card__header span {
  display: block;
}

.data-card__header strong {
  color: var(--theme-text);
  font-size: 13px;
}

.data-card__header > div > span {
  margin-top: 3px;
  color: var(--theme-muted);
  font-size: 11px;
}

.table-search {
  position: relative;
  display: block;
  width: min(100%, 250px);
  margin: 0;
}

.table-search svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 15px;
  fill: none;
  stroke: var(--theme-muted);
  stroke-linecap: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
}

.table-search input {
  display: block;
  width: 100%;
  height: 38px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  outline: none;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 12px;
}

.table-search input:focus {
  border-color: rgba(196, 30, 77, 0.45);
  box-shadow: 0 0 0 3px rgba(196, 30, 77, 0.08);
}

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

.timesheet-table,
.record-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.timesheet-table th,
.record-table th {
  padding: 11px 13px;
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-align: left;
  text-transform: uppercase;
}

.timesheet-table td,
.record-table td {
  padding: 14px 13px;
  border-top: 1px solid var(--theme-line);
  color: var(--theme-text);
  font-size: 11.5px;
  vertical-align: middle;
}

.timesheet-table td:first-child > span {
  color: var(--theme-text);
  font-weight: 700;
}

.timesheet-table td span,
.timesheet-table td small {
  display: block;
}

.timesheet-bin-row td:first-child small {
  max-width: 340px;
  overflow: visible;
  white-space: normal;
}

.timesheet-table td small {
  max-width: 220px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--theme-muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
}

.ready-badge,
.source-only-badge {
  display: inline-flex !important;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.ready-badge {
  padding: 5px 8px;
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
  font-size: 9.5px;
}

.ready-badge.is-warning,
.source-only-badge.is-warning {
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
}

.view-button {
  padding: 7px 11px;
  border: 1px solid var(--theme-line);
  border-radius: 7px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 10.5px;
  font-weight: 700;
}

.view-button:hover {
  border-color: var(--theme-line);
  background: var(--theme-blue-surface);
}

.timesheet-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  white-space: nowrap;
}

.timesheet-filters {
  display: grid;
  grid-template-columns: minmax(0, 170px) minmax(0, 160px) minmax(0, 320px) auto;
  align-items: end;
  justify-content: start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--theme-line);
}

.timesheet-filters label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--theme-muted);
  font-size: 11px;
  font-weight: 700;
}

.timesheet-filters :is(input, select, button) {
  min-height: 38px;
}

.timesheet-filters :is(input, select) {
  width: 100%;
  padding: 0 10px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 12px;
}

.timesheet-filters button:disabled {
  opacity: 0.55;
}

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

  .timesheet-outlet-filter {
    grid-column: 1 / -1;
  }

  .timesheet-filters button {
    justify-self: start;
  }
}

.timesheet-bin-toggle { white-space: nowrap; }

.timesheet-bin-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--theme-line);
  border-radius: 7px;
  background: var(--theme-surface);
  color: var(--theme-muted);
}

.timesheet-bin-button:hover { border-color: var(--theme-line); background: var(--theme-blue-surface); }
.timesheet-bin-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

#binTimesheetReason { width: 100%; min-height: 86px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--theme-line); border-radius: 8px; font: inherit; resize: vertical; }

.delete-timesheet-button {
  padding: 7px 11px;
  border: 1px solid var(--theme-rose-line);
  border-radius: 7px;
  background: var(--theme-rose-surface);
  color: var(--theme-rose-text);
  font-size: 10.5px;
  font-weight: 750;
}

.delete-timesheet-button:hover {
  border-color: var(--theme-rose-line);
  background: var(--theme-rose-surface);
}

.timesheet-list-message {
  min-height: 0;
  margin: 0;
  padding: 0 18px;
  color: var(--theme-muted);
  font-size: 11px;
}

.timesheet-list-message:not(:empty) {
  min-height: 38px;
  padding-top: 12px;
  padding-bottom: 10px;
  border-top: 1px solid var(--theme-line);
}

.timesheet-list-message.is-success {
  color: var(--theme-green-text);
}

.worker-list-message {
  min-height: 18px;
  margin: 0;
  padding: 0 18px;
  color: var(--theme-muted);
  font-size: 10.5px;
}

.worker-list-message.is-error {
  padding-top: 12px;
  color: var(--theme-rose-text);
}

.worker-list-message.is-success {
  padding-top: 12px;
  color: var(--theme-green-text);
}

.worker-table td:first-child {
  width: 54px;
  color: var(--theme-muted);
  font-variant-numeric: tabular-nums;
}

.worker-status {
  display: inline-flex !important;
  padding: 5px 8px;
  align-items: center;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 750;
}

.worker-status--active {
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.worker-status--resigned,
.worker-status--inactive {
  background: var(--theme-raised);
  color: var(--theme-muted);
}

.worker-status--contract-ended {
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
}

.worker-actions {
  display: flex;
  gap: 6px;
}

.worker-action {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--theme-rose-line);
  border-radius: 7px;
  background: var(--theme-surface);
  color: var(--theme-rose-text);
  font-size: 9.5px;
  font-weight: 750;
  white-space: nowrap;
}

.worker-action--secondary {
  border-color: var(--theme-amber-line);
  color: var(--theme-amber-text);
}

.worker-action--view {
  border-color: var(--theme-line);
  color: var(--theme-text);
}

.worker-action:hover:not(:disabled) {
  background: var(--theme-rose-surface);
}

.worker-action--secondary:hover:not(:disabled) {
  background: var(--theme-amber-surface);
}

.worker-action--view:hover:not(:disabled) {
  background: var(--theme-raised);
}

.worker-action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.worker-pagination {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border-top: 1px solid var(--theme-line);
}

.worker-pagination button {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--theme-line);
  border-radius: 7px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 10px;
  font-weight: 700;
}

.worker-pagination button.is-current {
  border-color: var(--crimson-deep);
  background: var(--crimson-deep);
  color: var(--theme-text);
}

.worker-pagination button:disabled {
  color: var(--theme-muted);
  cursor: default;
}

.worker-pagination > span {
  color: var(--theme-muted);
  font-size: 11px;
}

.payroll-pagination { flex-wrap: wrap; padding: 0 16px; }
.payroll-pagination button { min-height: 36px; font-size: 12px; }
.payroll-pagination > span { font-size: 12px; }

.worker-detail-card {
  overflow: hidden;
  border: 1px solid var(--theme-line);
  border-radius: 13px;
  background: var(--theme-surface);
  box-shadow: 0 12px 38px rgba(16, 26, 46, 0.055);
}

.worker-detail-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 25px 22px;
  border-bottom: 1px solid var(--theme-line);
}

.worker-detail-card__header .section-number {
  margin-bottom: 9px;
}

.worker-detail-card__header h2 {
  margin: 0 0 7px;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.035em;
}

.worker-detail-card__header > div > p:last-child {
  margin: 0;
  color: var(--theme-muted);
  font-size: 11px;
}

.worker-detail-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.worker-detail-status-control {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.worker-detail-status-control select,
.worker-contributions-card__header select {
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  background: var(--theme-blue-surface);
  color: var(--theme-text);
  font: inherit;
  font-size: 12px;
}

.worker-profile-save-notice {
  margin: 0;
  padding: 12px 25px;
  border-bottom: 1px solid var(--theme-green-line);
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
  font-size: 12px;
  font-weight: 650;
}

.worker-profile-form {
  padding: 24px 25px;
  border-bottom: 1px solid var(--theme-line);
  background: var(--theme-blue-surface);
}

.worker-profile-form__heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}

.worker-profile-form__heading h3 {
  margin: 0 0 6px;
  color: var(--theme-text);
  font-size: 16px;
}

.worker-profile-form__heading p {
  max-width: 75ch;
  margin: 0;
  color: var(--theme-muted);
  font-size: 12px;
  line-height: 1.5;
}

.worker-profile-field-group {
  margin: 0 0 12px;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  background: var(--theme-surface);
}

.worker-profile-field-group summary {
  padding: 14px 16px;
  cursor: pointer;
  color: var(--theme-text);
  font-weight: 700;
}

.worker-profile-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  padding: 2px 16px 16px;
}

.worker-profile-field-grid label {
  display: grid;
  gap: 6px;
  color: var(--theme-text);
  font-size: 11px;
  font-weight: 700;
}

.worker-profile-field-grid label small { color: var(--theme-muted); font-weight: 400; overflow-wrap: anywhere; }

.worker-profile-field-grid input,
.worker-profile-field-grid select,
.worker-profile-field-grid textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font: inherit;
  font-size: 12px;
}

.worker-profile-field-grid textarea { resize: vertical; }
.worker-original-row { min-width: 0; }
.worker-original-row summary { margin-bottom: 12px; cursor: pointer; font-weight: 700; }

.worker-detail-body {
  display: grid;
}

.worker-detail-section {
  display: grid;
  grid-template-columns: minmax(180px, 0.28fr) minmax(0, 1fr);
  gap: 28px;
  padding: 22px 25px;
  border-top: 1px solid var(--theme-line);
}

.worker-detail-section:first-child {
  border-top: 0;
}

.worker-detail-section__heading h3 {
  margin: 0 0 6px;
  color: var(--theme-text);
  font-size: 12px;
}

.worker-detail-section__heading p {
  margin: 0;
  color: var(--theme-muted);
  font-size: 10px;
  line-height: 1.55;
}

.worker-detail-section__heading [data-edit-worker-deductions] {
  margin-top: 12px;
}

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

.worker-detail-grid > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: var(--theme-blue-surface);
}

.worker-detail-grid > div.is-wide {
  grid-column: span 2;
}

.worker-detail-grid span,
.worker-detail-grid strong {
  display: block;
}

.worker-detail-grid span {
  margin-bottom: 5px;
  color: var(--theme-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.worker-detail-grid strong {
  overflow-wrap: anywhere;
  color: var(--theme-text);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.45;
}

.worker-detail-history-empty {
  margin: 0;
  padding: 17px;
  border: 1px dashed var(--theme-line);
  border-radius: 9px;
  color: var(--theme-muted);
  font-size: 10.5px;
}

.worker-detail-history td {
  vertical-align: top;
}

.empty-state {
  padding: 64px 24px;
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 14px;
  background: var(--theme-raised);
  color: var(--theme-muted);
}

.empty-state__icon svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.empty-state h3 {
  margin-bottom: 7px;
  color: var(--theme-text);
  font-size: 14px;
}

.empty-state p {
  margin: 0;
  color: var(--theme-muted);
  font-size: 12px;
}

.review-dialog,
.duplicate-dialog {
  width: min(calc(100% - 32px), 680px);
  max-height: calc(100svh - 40px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--theme-text);
  box-shadow: 0 40px 110px rgba(3, 7, 18, 0.4);
}

.duplicate-dialog {
  width: min(calc(100% - 32px), 500px);
}

.review-dialog::backdrop,
.duplicate-dialog::backdrop {
  background: rgba(6, 10, 17, 0.68);
  backdrop-filter: blur(5px);
}

.review-card,
.duplicate-card {
  margin: 0;
  padding: 28px;
  background: var(--theme-surface);
}

.review-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.review-card__header h2,
.duplicate-card h2 {
  margin: 0 0 7px;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: 22px;
}

.review-card__header > div > p:last-child,
.duplicate-card > p {
  margin: 0;
  color: var(--theme-muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.icon-button {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--theme-raised);
  color: var(--theme-muted);
  font-size: 21px;
}

.source-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 23px 0;
  padding: 13px;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  background: var(--theme-blue-surface);
}

.file-type {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--theme-rose-surface);
  color: var(--theme-rose-text);
  font-size: 9px;
  font-weight: 800;
}

.source-summary strong,
.source-summary small {
  display: block;
}

.source-summary strong {
  max-width: 530px;
  overflow: hidden;
  color: var(--theme-text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-summary small {
  margin-top: 4px;
  color: var(--theme-muted);
  font-size: 10px;
}

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

.review-fields label {
  margin: 0;
  color: var(--theme-text);
  font-size: 11px;
}

.review-fields label small {
  color: var(--theme-muted);
  font-weight: 400;
}

.review-fields input {
  width: 100%;
  height: 42px;
  margin-top: 7px;
  padding: 0 12px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  outline: none;
  color: var(--theme-text);
  font-size: 12px;
}

.review-fields input:focus {
  border-color: rgba(196, 30, 77, 0.55);
  box-shadow: 0 0 0 3px rgba(196, 30, 77, 0.08);
}

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

.worker-preview {
  margin-top: 22px;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  overflow: hidden;
}

.worker-preview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  background: var(--theme-raised);
  color: var(--theme-text);
  font-size: 11px;
}

.worker-preview__header span {
  color: var(--theme-muted);
  font-size: 10px;
}

.worker-preview__list {
  max-height: 180px;
  overflow-y: auto;
}

.worker-preview__list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 13px;
  border-top: 1px solid var(--theme-line);
  font-size: 10.5px;
}

.worker-preview__list > div.has-warning {
  background: var(--theme-amber-surface);
}

.worker-preview__list strong,
.worker-preview__list small {
  display: block;
}

.worker-preview__list strong {
  color: var(--theme-text);
}

.worker-preview__list small,
.worker-preview__list > div > span:last-child {
  margin-top: 2px;
  color: var(--theme-muted);
  font-size: 9.5px;
}

.worker-preview__list > div > span:last-child {
  text-align: right;
}

.worker-preview__list .master-match {
  display: block;
  margin-top: 4px;
  color: var(--theme-green-text);
  font-weight: 700;
}

.worker-preview__list .master-match.is-warning {
  color: var(--theme-amber-text);
}

.worker-preview__list .final-day-check {
  display: block;
  margin-top: 3px;
  color: var(--theme-amber-text);
  font-weight: 700;
}

.worker-preview-add {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  margin-top: 7px;
  padding: 0 10px;
  border: 1px solid rgba(196, 30, 77, 0.24);
  border-radius: 7px;
  background: var(--theme-surface);
  color: var(--theme-rose-text);
  font-size: 9.5px;
  font-weight: 800;
}

.worker-preview-add:hover {
  border-color: rgba(196, 30, 77, 0.44);
  background: var(--theme-rose-surface);
}

.dialog-message {
  min-height: 18px;
  margin: 14px 0 0;
  color: var(--theme-rose-text);
  font-size: 11.5px;
}

.dialog-message.is-warning {
  color: var(--theme-amber-text);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.cancel-button,
.confirm-button,
.danger-button {
  min-height: 42px;
  padding: 0 17px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 750;
}

.cancel-button {
  border: 1px solid var(--theme-line);
  background: var(--theme-surface);
  color: var(--theme-text);
}

.confirm-button {
  background: var(--ink);
  color: var(--theme-text);
}

.danger-button {
  background: var(--crimson-deep);
  color: var(--theme-text);
}

.confirm-button:disabled,
.danger-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.duplicate-card {
  text-align: center;
}

.warning-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 17px;
  place-items: center;
  border: 1px solid var(--theme-rose-line);
  border-radius: 50%;
  background: var(--theme-rose-surface);
  color: var(--theme-rose-text);
  font-size: 22px;
  font-weight: 800;
}

.status-change-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 13px;
  place-items: center;
  border: 1px solid var(--theme-blue-line);
  border-radius: 50%;
  background: var(--theme-blue-surface);
  color: var(--theme-text);
  font-size: 22px;
  font-weight: 800;
}

.super-admin-badge {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--theme-line);
  border-radius: 999px;
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.reference-only-badge {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--theme-green-line);
  border-radius: 999px;
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.worker-master-current {
  margin-top: 20px;
  border: 1px solid var(--theme-line);
  border-radius: 14px;
  background: var(--theme-surface);
  box-shadow: 0 12px 38px rgba(16, 26, 46, 0.055);
}

.worker-master-current__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--theme-line);
}

.worker-master-current__heading span {
  color: var(--theme-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.worker-master-current__heading h3 {
  margin: 4px 0 0;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: 18px;
}

.worker-master-current__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.worker-master-current__grid article {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--theme-line);
}

.worker-master-current__grid article:last-child {
  border-right: 0;
}

.worker-master-current__grid span,
.worker-master-current__grid strong,
.worker-master-current__grid small {
  display: block;
}

.worker-master-current__grid span {
  color: var(--theme-muted);
  font-size: 10.5px;
  font-weight: 650;
}

.worker-master-current__grid strong {
  margin-top: 7px;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: 24px;
}

.worker-master-current__grid small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--theme-muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hostel-master-directory {
  margin-top: 18px;
}

.hostel-master-summary .hostel-master-summary__worksheet {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hostel-master-comparison {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hostel-master-table-wrap {
  max-height: 620px;
  overflow: auto;
}

.hostel-master-table {
  min-width: 1420px;
}

.hostel-master-table th,
.hostel-master-table td {
  vertical-align: top;
}

.hostel-master-table td:nth-child(4),
.hostel-master-table td:nth-child(5),
.hostel-master-table td:nth-child(9) {
  white-space: normal;
}

.hostel-master-table td:nth-child(9) {
  min-width: 260px;
  line-height: 1.45;
}

.hostel-master-table .hostel-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
  font-size: 9px;
  font-weight: 700;
}

@media (max-width: 960px) {
  .worker-master-current__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .worker-master-current__grid article:nth-child(2n) {
    border-right: 0;
  }

  .worker-master-current__grid article:nth-child(n + 3) {
    border-top: 1px solid var(--theme-line);
  }

}

@media (max-width: 560px) {
  .worker-master-current__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .worker-master-current__grid {
    grid-template-columns: 1fr;
  }

  .worker-master-current__grid article {
    border-top: 1px solid var(--theme-line);
    border-right: 0;
  }

  .worker-master-current__grid article:first-child {
    border-top: 0;
  }

}

.session-ended-dialog .duplicate-card {
  padding: 32px;
}

.session-ended-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  place-items: center;
  border: 1px solid var(--theme-line);
  border-radius: 50%;
  background: var(--theme-blue-surface);
  color: var(--theme-text);
}

.session-ended-icon svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.session-ended-dialog .section-number {
  margin: 0 0 7px;
}

.session-ended-dialog .dialog-actions {
  justify-content: center;
}

.worker-status-dialog .section-number {
  margin: 0 0 7px;
}

.duplicate-comparison {
  margin: 20px 0 14px;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  text-align: left;
}

.duplicate-comparison > div,
.detail-metadata > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-top: 1px solid var(--theme-line);
  font-size: 10.5px;
}

.duplicate-comparison > div:first-child,
.detail-metadata > div:first-child {
  border-top: 0;
}

.duplicate-comparison span,
.detail-metadata span {
  color: var(--theme-muted);
}

.duplicate-comparison strong,
.detail-metadata strong {
  max-width: 70%;
  overflow: hidden;
  color: var(--theme-text);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duplicate-note {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text) !important;
  text-align: left;
  font-size: 10.5px !important;
}

.back-to-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 23px;
  padding: 0;
  background: transparent;
  color: var(--theme-muted);
  font-size: 11px;
  font-weight: 650;
}

.back-to-list svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.timesheet-editor__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.75rem;
}

.timesheet-editor__worker,
.timesheet-revision-form,
.timesheet-revision-history {
  display: grid;
  gap: 0.75rem;
}

.timesheet-editor .record-table input {
  width: 100%;
  min-width: 7rem;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--theme-line);
  border-radius: 7px;
  background: var(--theme-inset);
  color: var(--theme-text);
  font: inherit;
  box-shadow: none;
}

.timesheet-editor tr.is-public-holiday {
  --theme-inset: #fff8d8;
}

.timesheet-template-evidence {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.timesheet-template-evidence h3 {
  margin: 0;
}

.timesheet-editor--template .record-table-wrap {
  max-height: 55dvh;
  overflow: auto;
}

.timesheet-editor--template .record-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.timesheet-revision-history details {
  margin: 0.75rem 0 0 1rem;
}

.timesheet-revision-note {
  white-space: pre-wrap;
}

.timesheet-detail-card {
  overflow: hidden;
  border: 1px solid var(--theme-line);
  border-radius: 13px;
  background: var(--theme-surface);
  box-shadow: 0 12px 38px rgba(16, 26, 46, 0.055);
}

.timesheet-detail-card__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 24px 25px 22px;
  border-bottom: 1px solid var(--theme-line);
}

.timesheet-detail-card__title {
  flex: 1 1 360px;
  min-width: 0;
}

.timesheet-detail-card__header .section-number {
  margin-bottom: 9px;
}

.timesheet-detail-card__header h2 {
  margin: 0 0 7px;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.035em;
}

.timesheet-detail-card__title > p:last-child {
  max-width: 760px;
  margin: 0;
  overflow: hidden;
  color: var(--theme-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timesheet-detail-card__header-aside {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  flex: 0 1 auto;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  margin-left: auto;
}

.timesheet-workflow-actions,
.reconciliation-heading-actions,
.reconciliation-retrieve-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timesheet-workflow-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

.timesheet-whatsapp-message {
  max-width: 420px;
  margin: 0;
  color: var(--theme-muted);
  font-size: 10.5px;
  text-align: right;
}

.timesheet-whatsapp-message.is-error {
  color: var(--theme-rose-text);
}

.timesheet-whatsapp-message.is-success {
  color: var(--theme-green-text);
}

.reconciliation-heading-actions {
  justify-content: flex-end;
}

.reconciliation-retrieve-control {
  padding: 5px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: rgba(21,31,50,0.75);
}

.reconciliation-retrieve-control label {
  white-space: nowrap;
  padding-left: 5px;
  color: var(--theme-muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reconciliation-retrieve-control input {
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--theme-text);
  font: inherit;
  font-size: 11px;
}

.timesheet-detail-card__body {
  padding: 0 25px 24px;
}

.detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.source-only-badge {
  max-width: 100%;
  padding: 7px 10px;
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
  font-size: 9.5px;
  text-align: right;
  white-space: normal;
}

.detail-metadata {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 -25px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--theme-line);
  border-radius: 0;
  box-shadow: none;
}

.detail-metadata > div {
  display: block;
  border-top: 0;
  border-left: 1px solid var(--theme-line);
}

.detail-metadata > div:first-child {
  border-left: 0;
}

.detail-metadata strong,
.detail-metadata span {
  display: block;
  max-width: none;
  text-align: left;
}

.detail-metadata strong {
  margin-top: 5px;
  font-size: 11px;
}

.detail-worker-toolbar {
  display: flex;
  min-height: 78px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.worker-select-field {
  display: grid;
  width: min(100%, 430px);
  gap: 7px;
  color: var(--theme-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.worker-select {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  outline: none;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 11.5px;
  text-transform: none;
}

.worker-select:focus {
  border-color: rgba(196, 30, 77, 0.55);
  box-shadow: 0 0 0 3px rgba(196, 30, 77, 0.08);
}

.worker-source-note {
  padding-bottom: 11px;
  color: var(--theme-muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9.5px;
  white-space: nowrap;
}

.worker-source-note.is-warning {
  color: var(--theme-amber-text);
  font-weight: 700;
}

.calculation-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin: 4px 0 12px;
}

.calculation-summary__card {
  min-width: 0;
  padding: 15px 14px;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  background: var(--theme-blue-surface);
}

.calculation-summary__card > span,
.calculation-summary__card > strong,
.calculation-summary__card > small {
  display: block;
}

.calculation-summary__card > span {
  color: var(--theme-muted);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.calculation-summary__card > strong {
  margin-top: 8px;
  overflow: hidden;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calculation-summary__card > small {
  margin-top: 5px;
  color: var(--theme-muted);
  font-size: 8.5px;
  line-height: 1.45;
}

.calculation-summary__card.is-primary {
  border-color: var(--theme-line);
  background: #222b39;
}

.calculation-summary__card.is-primary > span,
.calculation-summary__card.is-primary > small {
  color: var(--theme-text);
}

.calculation-summary__card.is-primary > strong {
  color: var(--theme-text);
}

.calculation-summary__card.is-warning {
  border-color: var(--theme-amber-line);
  background: var(--theme-amber-surface);
}

.calculation-summary__card.is-warning > strong {
  color: var(--theme-amber-text);
}

.gross-formula-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: var(--theme-surface);
}

.gross-formula-panel strong,
.gross-formula-panel div > span {
  display: block;
}

.gross-formula-panel strong {
  color: var(--theme-text);
  font-size: 10.5px;
}

.gross-formula-panel div > span {
  margin-top: 3px;
  color: var(--theme-muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8.5px;
  line-height: 1.5;
}

.calculation-status {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 750;
  white-space: nowrap;
}

.calculation-status.is-complete {
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.calculation-status.is-warning {
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
}

.worker-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.worker-tab {
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: var(--theme-surface);
  color: var(--theme-text);
  text-align: left;
}

.worker-tab strong,
.worker-tab small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-tab strong {
  font-size: 10.5px;
}

.worker-tab small {
  margin-top: 3px;
  color: var(--theme-muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.worker-tab.is-active {
  border-color: var(--crimson-deep);
  background: var(--crimson-deep);
  color: var(--theme-text);
}

.worker-tab.is-active small {
  color: var(--theme-rose-text);
}

.record-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 21px 0 10px;
}

.record-heading strong,
.record-heading span {
  display: block;
}

.record-heading strong {
  color: var(--theme-text);
  font-size: 13px;
}

.record-heading span {
  margin-top: 2px;
  color: var(--theme-muted);
  font-size: 10px;
}

.source-data-notice {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-radius: 8px;
  background: var(--theme-raised);
  color: var(--theme-muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.record-table th,
.record-table td {
  padding: 10px 11px;
  font-size: 10px;
}

.record-table td:first-child {
  font-weight: 650;
}

.record-table td.is-absent {
  color: var(--theme-rose-text);
  font-weight: 750;
}

.record-table tr.is-calculation-review td {
  background: var(--theme-amber-surface);
}

.record-table .daily-formula {
  min-width: 220px;
  white-space: normal;
}

.daily-formula strong,
.daily-formula span {
  display: block;
}

.daily-formula strong {
  color: var(--theme-text);
  font-size: 9px;
}

.daily-formula span {
  margin-top: 3px;
  color: var(--theme-muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8.5px;
}

.record-table .daily-gross {
  color: var(--theme-text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 750;
  white-space: nowrap;
}

.record-table .daily-gross.is-partial {
  color: var(--theme-amber-text);
}

.calculation-flags {
  min-width: 142px;
  white-space: normal;
}

.calculation-flags span {
  display: inline-flex;
  margin: 2px 3px 2px 0;
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
  font-size: 7.5px;
  font-weight: 750;
  white-space: nowrap;
}

.record-table tr.is-final-day-review td {
  background: var(--theme-amber-surface);
}

.record-table tr.is-final-day-review td:first-child {
  box-shadow: inset 3px 0 0 #d89524;
}

.final-day-row-label {
  display: block;
  margin-top: 3px;
  color: var(--theme-amber-text);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.activity-filters {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) repeat(2, minmax(128px, .65fr)) minmax(180px, 1.1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--theme-line);
}

.activity-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: var(--theme-muted);
  font-size: 11.5px;
  font-weight: 650;
}

.activity-filters :is(select, input) {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  background-color: var(--theme-surface);
  color: var(--theme-text);
  font: inherit;
}

.activity-filters .compact-button { min-height: 38px; }
.activity-toolbar { min-height: 58px; }

.activity-table-scroll {
  max-height: min(62vh, 42rem);
  overflow: auto;
  overscroll-behavior: contain;
}

.activity-table-scroll:focus-visible { outline-offset: -2px; }

.activity-table {
  min-width: 820px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.activity-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 1px var(--theme-line);
}

.activity-table th:nth-child(1) { width: 165px; }
.activity-table th:nth-child(2) { width: 175px; }
.activity-table th:nth-child(3) { width: 179px; }
.activity-table th:nth-child(4) { width: 84px; }

.activity-table td {
  padding-block: 10px;
  vertical-align: top;
  overflow-wrap: anywhere;
  white-space: normal;
}

.activity-table td:nth-child(1) { white-space: nowrap; }

.activity-detail-fields {
  display: grid;
  grid-template-columns: minmax(72px, max-content) minmax(0, 1fr);
  gap: 4px 10px;
  margin: 0;
  line-height: 1.45;
}

.activity-detail-fields dt {
  max-width: 130px;
  color: var(--theme-muted);
  text-transform: capitalize;
}

.activity-detail-fields dd { margin: 0; }

.activity-table details { margin-top: 5px; }
.activity-table details[open] summary { margin-bottom: 5px; }
.activity-table summary { width: fit-content; color: var(--theme-link, var(--theme-text)); cursor: pointer; }

.activity-footer {
  display: flex;
  justify-content: center;
  padding: 10px 18px;
  border-top: 1px solid var(--theme-line);
}

.activity-error {
  margin: 0;
  padding: 12px 18px;
  color: var(--theme-rose-text);
}

@media (max-width: 1120px) {
  .activity-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-filters .compact-button { justify-self: start; }
}

@media (max-width: 540px) {
  .activity-filters label:has(select, input[type="search"]) { grid-column: 1 / -1; }
  .activity-filters .compact-button { grid-column: 1 / -1; justify-self: end; }
  .activity-table-scroll { max-height: 55vh; }
}

.activity-result {
  display: inline-flex !important;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
  font-size: 9px;
  font-weight: 750;
  text-transform: capitalize;
}

.activity-result--success {
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.activity-result--denied,
.activity-result--failed {
  background: var(--theme-rose-surface);
  color: var(--theme-rose-text);
}

.activity-result--attention {
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
}

.detail-loading {
  padding: 70px;
  color: var(--theme-muted);
  text-align: center;
  font-size: 12px;
}

.sr-only {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 780px) {
  .workspace {
    display: block;
  }

  .workspace-sidebar {
    position: static;
    height: auto;
  }

  .workspace-brand,
  .workspace-sidebar__footer {
    display: none;
  }

  .workspace-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 9px;
  }

  .workspace-nav__group + .workspace-nav__group {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .workspace-nav__group[open] {
    grid-column: 1 / -1;
  }

  .workspace-nav__links {
    display: flex;
    flex-wrap: wrap;
  }

  .workspace-scope {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 10px 0;
    padding: 7px;
  }

  .workspace-scope__heading {
    margin: 0;
    padding-left: 4px;
  }

  .workspace-scope__heading small,
  .workspace-scope__message {
    display: none;
  }

  .workspace-scope__switch {
    width: 190px;
  }

  .workspace-scope__fixed {
    min-width: 110px;
  }

  .workspace-nav__item {
    flex: 0 0 auto;
  }

  .workspace-topbar {
    min-height: 68px;
    padding: 12px var(--workspace-gutter);
  }

  .workspace-content {
    padding: 24px var(--workspace-gutter) 56px;
  }

  .page-heading-row,
  .detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .timesheet-detail-card__header,
  .detail-worker-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .timesheet-detail-card__header-aside,
  .reconciliation-heading-actions,
  .reconciliation-retrieve-control {
    align-items: stretch;
    width: 100%;
  }

  .timesheet-detail-card__header-aside {
    margin-left: 0;
  }

  .timesheet-detail-card__header-aside,
  .reconciliation-heading-actions {
    flex-direction: column;
  }

  .reconciliation-retrieve-control {
    flex-wrap: wrap;
  }

  .reconciliation-retrieve-control input {
    flex: 1;
  }

  .timesheet-workflow-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .timesheet-whatsapp-message {
    text-align: left;
  }

  .timesheet-detail-card__header {
    padding: 20px 16px 18px;
  }

  .timesheet-detail-card__title > p:last-child {
    white-space: normal;
  }

  .timesheet-detail-card__body {
    padding: 0 16px 18px;
  }

  .timesheet-detail-card__body .detail-metadata {
    margin-right: -16px;
    margin-left: -16px;
  }

  .detail-worker-toolbar {
    gap: 10px;
  }

  .worker-select-field {
    width: 100%;
  }

  .worker-source-note {
    padding-bottom: 0;
    white-space: normal;
  }

  .data-card__header {
    align-items: stretch;
    flex-direction: column;
  }

  .table-search {
    width: 100%;
  }

  .review-fields,
  .detail-metadata {
    grid-template-columns: 1fr;
  }

  .detail-metadata > div {
    border-top: 1px solid var(--theme-line);
    border-left: 0;
  }

  .detail-metadata > div:first-child {
    border-top: 0;
  }
}

@keyframes light-strike {
  0% { opacity: 0; transform: translate(-50%, -50%) scaleY(0.04); }
  18% { opacity: 1; }
  62% { opacity: 1; transform: translate(-50%, -50%) scaleY(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scaleY(1.3); }
}

@keyframes mark-reveal {
  0% { opacity: 0; transform: scale(0.62); }
  55% { opacity: 1; transform: scale(1.07); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes word-reveal {
  from { opacity: 0; letter-spacing: 0.72em; filter: blur(6px); }
  to { opacity: 1; letter-spacing: 0.52em; filter: blur(0); }
}

@keyframes subtitle-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow-breathe {
  0% { opacity: 0; transform: scale(0.6); }
  62% { opacity: 1; }
  100% { opacity: 0.45; transform: scale(1); }
}

@media (max-width: 560px) {
  .login-view {
    align-items: center;
    padding: 24px 14px 60px;
  }

  .login-card {
    padding: 34px 24px 23px;
    border-radius: 16px;
  }

  .splash__word {
    font-size: 24px;
    letter-spacing: 0.36em;
    transform: translateX(0.18em);
  }

  .splash__subtitle {
    letter-spacing: 0.18em;
  }
}

@media (max-width: 760px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: relative;
    height: auto;
  }

  .workspace-brand {
    padding: 16px 18px;
  }

  .workspace-brand p {
    display: none;
  }

  .workspace-nav {
    padding: 8px 10px 12px;
  }

  .workspace-sidebar__footer {
    display: none;
  }

  .workspace-nav__item {
    width: fit-content;
  }

  .workspace-topbar {
    min-height: 72px;
    padding: 13px var(--workspace-gutter);
  }

  .workspace-status {
    display: none;
  }

  .workspace-content {
    padding: 24px var(--workspace-gutter) 56px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }

  .splash__mark,
  .splash__word,
  .splash__subtitle,
  .splash__glow {
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .workspace-sidebar__footer {
    display: block;
    padding: 0 10px 11px;
    border-top: 0;
  }

  .workspace-sidebar__footer .admin-summary,
  .workspace-sidebar__footer > p {
    display: none;
  }

  .logout-button {
    width: fit-content;
    min-height: 35px;
  }

  .calculation-summary {
    grid-template-columns: 1fr;
  }

  .gross-formula-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .calculation-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Payment workspace */
@media (min-width: 781px) {
  .workspace {
    grid-template-columns: 274px minmax(0, 1fr);
  }

  .workspace-nav {
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  }

  .workspace-sidebar__footer {
    flex: 0 0 auto;
  }

}

/* Reconciliation queue */
.reconciliation-period-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 13px;
  margin-bottom: 14px;
  padding: 10px 13px;
  border: 1px solid var(--theme-line);
  border-radius: 11px;
  background: var(--theme-surface);
}

.reconciliation-period-control label {
  color: var(--theme-muted);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reconciliation-period-control select {
  max-width: 100%;
  min-width: 190px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font: inherit;
  font-size: 11.5px;
}

.reconciliation-period-control p {
  margin: 0;
  color: var(--theme-muted);
  font-size: 10.5px;
}

.reconciliation-source-note {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid var(--theme-line);
  border-radius: 11px;
  background: var(--theme-surface);
  color: var(--theme-text);
}

.reconciliation-source-note__icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--theme-raised);
  color: var(--theme-text);
}

.reconciliation-source-note__icon svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.reconciliation-source-note > div {
  min-width: 0;
  flex: 1;
}

.reconciliation-source-note strong {
  color: var(--theme-text);
  font-size: 12px;
}

.reconciliation-source-note p {
  margin: 3px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
}

.reconciliation-source-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid var(--theme-line);
  border-radius: 999px;
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
  font-size: 9.5px;
  font-weight: 750;
  text-transform: uppercase;
}

.reconciliation-source-status.is-online {
  border-color: var(--theme-green-line);
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.reconciliation-source-status.is-warning {
  border-color: var(--theme-amber-line);
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
}

.reconciliation-source-status.is-error {
  border-color: var(--theme-rose-line);
  background: var(--theme-rose-surface);
  color: var(--theme-rose-text);
}

.reconciliation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.reconciliation-summary article {
  padding: 14px 15px;
  border: 1px solid var(--theme-line);
  border-radius: 11px;
  background: var(--theme-surface);
  box-shadow: 0 8px 28px rgba(16, 26, 46, 0.045);
}

.reconciliation-summary span,
.reconciliation-summary strong,
.reconciliation-summary small {
  display: block;
}

.reconciliation-summary span {
  color: var(--theme-muted);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reconciliation-summary strong {
  margin-top: 5px;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: 24px;
}

.reconciliation-summary small {
  margin-top: 3px;
  color: var(--theme-muted);
  font-size: 9.5px;
}

.reconciliation-summary article.is-blocking {
  border-color: var(--theme-rose-line);
  background: var(--theme-rose-surface);
}

.reconciliation-summary article.is-blocking strong {
  color: var(--theme-rose-text);
}

.reconciliation-summary article.is-resolved {
  border-color: var(--theme-green-line);
  background: var(--theme-green-surface);
}

.reconciliation-summary article.is-resolved strong {
  color: var(--theme-green-text);
}

.reconciliation-tolerated {
  margin-bottom: 14px;
  border: 1px solid var(--theme-green-line);
  border-radius: 11px;
  background: var(--theme-green-surface);
}

.reconciliation-tolerated summary {
  padding: 13px 16px;
  color: var(--theme-green-text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.reconciliation-tolerated details > p {
  margin: 0 16px 11px;
  color: var(--theme-muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.reconciliation-tolerated__scroll {
  max-width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--theme-green-line);
}

.reconciliation-tolerated__scroll:focus-visible {
  outline: 2px solid #25784d;
  outline-offset: -2px;
}

.reconciliation-tolerated__table {
  width: 100%;
  min-width: 630px;
  border-collapse: collapse;
  background: var(--theme-surface);
  text-align: left;
}

.reconciliation-tolerated__table th,
.reconciliation-tolerated__table td {
  padding: 9px 15px;
  border-top: 1px solid var(--theme-line);
  color: var(--theme-text);
  font-size: 11px;
}

.reconciliation-tolerated__table thead th {
  border-top: 0;
  background: var(--theme-green-surface);
  color: var(--theme-muted);
  font-size: 9.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.reconciliation-tolerated__table tbody th strong,
.reconciliation-tolerated__table tbody th small {
  display: block;
}

.reconciliation-tolerated__table tbody th small {
  margin-top: 3px;
  color: var(--theme-muted);
  font-weight: 500;
}

.reconciliation-tolerated__table .reconciliation-confirmed-evidence-cell {
  padding: 0;
  background: var(--theme-surface);
}

.reconciliation-confirmed-evidence > summary {
  padding: 9px 15px;
  color: var(--theme-green-text);
  font-size: 10.5px;
}

.reconciliation-confirmed-evidence[open] > summary {
  border-bottom: 1px solid var(--theme-green-line);
}

.reconciliation-confirmed-evidence__content {
  padding: 0 15px 15px;
}

.reconciliation-confirmed-evidence__content .reconciliation-comparison {
  margin: 14px 0;
}

.reconciliation-confirmed-evidence__content .reconciliation-whatsapp-viewer {
  margin-top: 14px;
}

.reconciliation-filters {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: end;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid var(--theme-line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: var(--theme-surface);
}

.reconciliation-filters > label:not(.table-search) {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--theme-muted);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reconciliation-filters select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  outline: none;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 11.5px;
  text-transform: none;
}

.reconciliation-search {
  width: 100%;
}

.reconciliation-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  min-height: 590px;
  overflow: hidden;
  border: 1px solid var(--theme-line);
  border-radius: 0 0 12px 12px;
  background: var(--theme-surface);
  box-shadow: 0 12px 38px rgba(16, 26, 46, 0.055);
}

.reconciliation-list-panel {
  min-width: 0;
  border-right: 1px solid var(--theme-line);
  background: var(--theme-blue-surface);
}

.reconciliation-panel-heading {
  min-height: 64px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--theme-line);
  background: var(--theme-surface);
}

.reconciliation-panel-heading strong,
.reconciliation-panel-heading span {
  display: block;
}

.reconciliation-panel-heading strong {
  color: var(--theme-text);
  font-size: 12.5px;
}

.reconciliation-panel-heading span {
  margin-top: 3px;
  color: var(--theme-muted);
  font-size: 10.5px;
}

.reconciliation-list {
  display: grid;
  gap: 9px;
  max-height: 690px;
  padding: 12px;
  overflow-y: auto;
}

.reconciliation-list-panel > .reconciliation-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.reconciliation-decision-form {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.reconciliation-decision-form > label {
  display: grid;
  gap: 6px;
}

.reconciliation-decision-form textarea { width: 100%; margin-top: 8px; }
.reconciliation-decision-form > button { justify-self: start; }
.payment-dialog.reconciliation-resolution-dialog { width: min(480px, calc(100vw - 32px)); }
.reconciliation-confirmation-note { color: var(--theme-muted); font-size: 12px; }

@media (min-width: 1181px) {
  .reconciliation-list-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .reconciliation-list {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    align-content: start;
  }
}

.reconciliation-item {
  display: grid;
  gap: 7px;
  width: 100%;
  min-width: 0;
  height: auto;
  padding: 12px 13px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font: inherit;
  line-height: 1.5;
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.reconciliation-item:hover,
.reconciliation-item:focus-visible {
  border-color: var(--theme-blue-line);
  background: var(--theme-raised);
}

.reconciliation-item:focus-visible {
  outline: 2px solid var(--theme-rose-text);
  outline-offset: 2px;
}

.reconciliation-item.is-selected {
  border-color: rgba(196, 30, 77, 0.48);
  background: var(--theme-blue-surface);
  box-shadow: 0 0 0 2px rgba(196, 30, 77, 0.06);
}

.reconciliation-item__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.reconciliation-item__identity {
  flex: 1 1 190px;
  min-width: 0;
}

.reconciliation-item__identity strong,
.reconciliation-item__identity small {
  display: block;
}

.reconciliation-item__identity strong {
  color: var(--theme-text);
  font-size: 13px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.reconciliation-item__identity small {
  margin-top: 2px;
  color: var(--theme-muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.reconciliation-severity {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.reconciliation-severity.is-blocking {
  background: var(--theme-rose-surface);
  color: var(--theme-rose-text);
}

.reconciliation-severity.is-verification {
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
}

.reconciliation-severity.is-resolved {
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.reconciliation-item.is-resolved {
  background: var(--theme-green-surface);
}

.reconciliation-item__issue {
  color: var(--theme-text);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.reconciliation-item__meta {
  color: var(--theme-muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.reconciliation-evidence-panel {
  min-width: 0;
  padding: 18px;
  background: var(--theme-surface);
}

.reconciliation-evidence__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--theme-line);
}

.reconciliation-evidence__header span:first-child {
  display: block;
  color: var(--theme-muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.reconciliation-evidence__header h3 {
  margin: 4px 0 0;
  color: var(--theme-text);
  font-size: 17px;
}

.reconciliation-evidence__section {
  margin: 15px 0;
  padding: 12px 13px;
  border: 1px solid var(--theme-rose-line);
  border-radius: 9px;
  background: var(--theme-rose-surface);
}

.reconciliation-evidence__section strong {
  color: var(--theme-rose-text);
  font-size: 11.5px;
}

.reconciliation-evidence__section p,
.reconciliation-whatsapp-placeholder p {
  margin: 5px 0 0;
  color: var(--theme-muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.reconciliation-raw-message {
  max-height: 210px;
  margin: 10px 0 0;
  padding: 11px;
  overflow: auto;
  border: 1px solid var(--theme-line);
  border-radius: 7px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font: 9.5px/1.55 "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
}

.reconciliation-resolution-summary {
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid var(--theme-green-line);
  border-radius: 9px;
  background: var(--theme-green-surface);
}

.reconciliation-resolution-summary strong {
  color: var(--theme-green-text);
  font-size: 11px;
}

.reconciliation-resolution-summary p,
.reconciliation-approval-note {
  margin: 5px 0 0;
  color: var(--theme-muted);
  font-size: 10px;
  line-height: 1.5;
}

.reconciliation-approval-note {
  flex: 1;
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--theme-raised);
  color: var(--theme-muted);
}

/* WhatsApp connector settings */
.whatsapp-settings-page {
  width: 100%;
}

.whatsapp-status-card {
  margin-bottom: 14px;
  padding: 20px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.whatsapp-status-card.is-connected {
  border-color: var(--theme-green-line);
  background: linear-gradient(135deg, var(--theme-green-surface), var(--theme-surface) 58%);
  box-shadow: 0 12px 30px rgba(37, 146, 97, .09);
}

.whatsapp-status-card.is-connected .whatsapp-status-heading strong {
  color: var(--theme-green-text);
}

.whatsapp-status-card.is-connected .whatsapp-connection-mark {
  background: var(--theme-green-surface);
}

.whatsapp-status-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.whatsapp-status-heading > div {
  min-width: 0;
  flex: 1;
}

.whatsapp-status-heading span,
.whatsapp-status-heading strong,
.whatsapp-status-heading small {
  display: block;
}

.whatsapp-status-heading > div > span {
  color: var(--theme-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.whatsapp-status-heading strong {
  margin-top: 3px;
  color: var(--theme-text);
  font-size: 15px;
}

.whatsapp-status-heading small {
  margin-top: 3px;
  color: var(--theme-muted);
  font-size: 10px;
}

.whatsapp-connection-mark {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--theme-raised);
}

.whatsapp-connection-mark i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--theme-inset);
  box-shadow: 0 0 0 5px rgba(141, 150, 163, .12);
}

.whatsapp-connection-mark.is-ready i {
  background: #259261;
  box-shadow: 0 0 0 5px rgba(37, 146, 97, .13);
}

.whatsapp-connection-mark.is-qr_required i,
.whatsapp-connection-mark.is-connecting i,
.whatsapp-connection-mark.is-authenticated i {
  background: var(--theme-amber-surface);
  box-shadow: 0 0 0 5px rgba(201, 144, 33, .13);
}

.whatsapp-connection-mark.is-stale i,
.whatsapp-connection-mark.is-auth_failure i,
.whatsapp-connection-mark.is-not_configured i {
  background: var(--theme-rose-surface);
  box-shadow: 0 0 0 5px rgba(190, 49, 89, .13);
}

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

.whatsapp-status-grid > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: var(--theme-blue-surface);
}

.whatsapp-status-grid span,
.whatsapp-status-grid strong {
  display: block;
}

.whatsapp-status-grid span {
  color: var(--theme-muted);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.whatsapp-status-grid strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--theme-text);
  font-size: 10.5px;
}

.whatsapp-settings-grid {
  display: grid;
  grid-template-columns: minmax(280px, .75fr) minmax(440px, 1.25fr);
  gap: 14px;
}

.whatsapp-control-card {
  display: grid;
  align-content: start;
  gap: 0;
}

.whatsapp-control-card > label {
  margin: 18px 20px 0;
}

.whatsapp-control-card label {
  color: var(--theme-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.whatsapp-control-card input {
  width: 100%;
  min-height: 40px;
  margin-top: 7px;
  padding: 0 11px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  outline: 0;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 11.5px;
}

.whatsapp-setting-note {
  margin: 14px 20px 0;
  color: var(--theme-muted);
  font-size: 10.5px;
  line-height: 1.55;
}

#saveWhatsAppSettings {
  margin: 18px 20px 20px;
}

#reconciliationPolicyForm {
  margin-top: 14px;
}

#reconciliationPolicyForm > label {
  max-width: 260px;
}

#reconciliationPolicyForm > button {
  justify-self: start;
  margin: 18px 20px 0;
}

#reconciliationPolicyForm #reconciliationPolicyMessage {
  margin: 0 20px 20px;
}

.whatsapp-command-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 20px;
}

.whatsapp-command-buttons .is-loading,
.timesheet-workflow-actions .is-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.whatsapp-command-buttons .is-loading::before,
.timesheet-workflow-actions .is-loading::before {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: '';
  animation: whatsapp-history-spin .8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .whatsapp-command-buttons .is-loading::before,
  .timesheet-workflow-actions .is-loading::before { animation: none; }
}

.whatsapp-day-retrieval {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin: 0 20px;
  padding: 16px 0 20px;
  border-top: 1px solid var(--theme-line);
}

.whatsapp-day-recovery { margin: 16px 20px 20px; padding-top: 12px; border-top: 1px solid var(--theme-line); }
.whatsapp-day-recovery > summary { padding: 10px 0; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--theme-text); }
.whatsapp-day-recovery > .whatsapp-setting-note { margin: 0 0 12px; }
.whatsapp-day-recovery .whatsapp-day-retrieval { margin: 0; padding: 12px 0 0; }

.whatsapp-day-retrieval label {
  display: grid;
  gap: 7px;
  margin: 0;
}

.whatsapp-day-retrieval input {
  margin-top: 0;
}

.whatsapp-day-retrieval > button {
  height: 40px;
  align-self: end;
}

.whatsapp-qr-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  margin-top: 14px;
  padding: 20px;
}

.whatsapp-qr-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--theme-line);
  border-radius: 50%;
  background: var(--theme-surface);
  color: var(--theme-muted);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.whatsapp-qr-close:hover,
.whatsapp-qr-close:focus-visible {
  border-color: var(--theme-rose-line);
  background: var(--theme-rose-surface);
  color: var(--theme-rose-text);
  outline: none;
}

.whatsapp-qr-card[hidden] {
  display: none;
}

.whatsapp-qr-card h3 {
  margin: 5px 0 7px;
  color: var(--theme-text);
  font-size: 17px;
}

.whatsapp-qr-copy {
  min-width: 0;
}

.whatsapp-qr-copy > p:not(.section-number) {
  max-width: 600px;
  margin: 0;
  color: var(--theme-muted);
  font-size: 11px;
  line-height: 1.55;
}

.whatsapp-qr-card img {
  width: 190px;
  height: 190px;
  border: 10px solid var(--theme-line);
  border-radius: 12px;
  box-shadow: 0 5px 24px rgba(18, 30, 48, .12);
  transition: opacity .2s ease, filter .2s ease;
  margin-right: 34px;
}

.whatsapp-qr-countdown {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 9px 12px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: var(--theme-blue-surface);
}

.whatsapp-qr-countdown span {
  color: var(--theme-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.whatsapp-qr-countdown strong {
  color: var(--theme-text);
  font-size: 12px;
}

.whatsapp-qr-card.is-refreshing img {
  opacity: .32;
  filter: grayscale(1);
}

.whatsapp-activity-card {
  margin-top: 14px;
}

.whatsapp-command-list {
  max-height: 235px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  margin: 16px 20px 20px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
}

.whatsapp-command-list:focus-visible {
  outline: 2px solid rgba(196, 30, 77, .32);
  outline-offset: 2px;
}

.whatsapp-command-list::-webkit-scrollbar {
  width: 7px;
}

.whatsapp-command-list::-webkit-scrollbar-thumb {
  border: 2px solid var(--theme-line);
  border-radius: 999px;
  background: var(--theme-inset);
}

.whatsapp-command-list > p {
  margin: 0;
  padding: 18px;
  color: var(--theme-muted);
  font-size: 10.5px;
}

.whatsapp-command-list > div {
  display: flex;
  min-height: 47px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--theme-line);
}

.whatsapp-command-list > div:first-child {
  border-top: 0;
}

.whatsapp-command-list strong,
.whatsapp-command-list small {
  display: block;
}

.whatsapp-command-list strong {
  color: var(--theme-text);
  font-size: 10.5px;
  text-transform: capitalize;
}

.whatsapp-command-list small {
  margin-top: 3px;
  color: var(--theme-muted);
  font-size: 9px;
}

.whatsapp-command-list .whatsapp-command-error {
  max-width: 580px;
  overflow-wrap: anywhere;
  color: var(--theme-rose-text);
}

.whatsapp-command-status {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.whatsapp-command-status.is-completed {
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.whatsapp-command-status.is-failed {
  background: var(--theme-rose-surface);
  color: var(--theme-rose-text);
}

.whatsapp-data-filters {
  margin-bottom: 18px;
}

.whatsapp-data-view-label {
  display: grid;
  gap: 8px;
  width: min(340px, calc(100% - 40px));
  margin: 20px 20px 0;
  color: var(--theme-text);
  font-size: 11px;
  font-weight: 700;
}

.whatsapp-data-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
}

.whatsapp-data-filter-grid.is-all-crew {
  grid-template-columns: minmax(0, 340px);
}

.whatsapp-data-filter-grid label {
  display: grid;
  align-content: start;
  gap: 8px;
  color: var(--theme-text);
  font-size: 11px;
  font-weight: 700;
}

.whatsapp-data-filter-grid small {
  color: var(--theme-muted);
  font-size: 10px;
  font-weight: 400;
}

.whatsapp-data-filter-grid input,
.whatsapp-data-filter-grid select,
.whatsapp-data-view-label select {
  width: 100%;
  min-width: 0;
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font: inherit;
  font-size: 12px;
}

.whatsapp-data-filters .settings-message {
  margin: 0 20px 18px;
}

.whatsapp-data-results {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.whatsapp-data-table-scroll { max-height: 65vh; overflow: auto; min-width: 0; border: 1px solid var(--theme-line); border-radius: 12px; background: var(--theme-surface); }
.whatsapp-data-table-scroll:focus-visible { outline: 2px solid #a41646; outline-offset: 2px; }
.whatsapp-data-table { width: 100%; min-width: 1150px; border-collapse: separate; border-spacing: 0; text-align: left; }
.whatsapp-data-table th, .whatsapp-data-table td { padding: 12px 14px; border-bottom: 1px solid var(--theme-line); vertical-align: top; font-size: 12px; line-height: 1.5; }
.whatsapp-data-table thead th { position: sticky; top: 0; z-index: 1; background: var(--theme-blue-surface); color: var(--theme-muted); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.whatsapp-data-table td { color: var(--theme-text); max-width: 240px; overflow-wrap: anywhere; }
.whatsapp-data-table td:first-child { min-width: 170px; font-weight: 650; }
.whatsapp-data-table td:nth-child(3) { min-width: 200px; }
.whatsapp-data-table td small { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; color: var(--theme-muted); }
.whatsapp-data-table tbody tr:last-child td { border-bottom: 0; }
.whatsapp-data-table tbody tr:hover { background: var(--theme-blue-surface); }
.whatsapp-data-table .whatsapp-data-report__flags { flex-direction: column; align-items: flex-start; justify-content: flex-start; }
.whatsapp-data-table .compact-button { min-height: 44px; }
.whatsapp-data-message-dialog .whatsapp-data-message-body { max-height: 55dvh; margin: 12px 0 0; padding: 16px; border: 1px solid var(--theme-line); border-radius: 10px; background: var(--theme-blue-surface); overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--theme-text); font-size: 12px; line-height: 1.7; }
.whatsapp-data-message-dialog > strong { font-size: 12px; }

.whatsapp-data-empty {
  padding: 22px;
  color: var(--theme-muted);
  font-size: 12px;
  line-height: 1.6;
}

.whatsapp-data-report {
  min-width: 0;
}

.whatsapp-data-report__heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--theme-blue-line);
}

.whatsapp-data-report__heading h3 {
  margin: 0;
  color: var(--theme-text);
  font-size: 18px;
}

.whatsapp-data-report__heading p {
  margin: 5px 0 0;
  color: var(--theme-muted);
  font-size: 11px;
}

.whatsapp-data-report__flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.whatsapp-data-report__state {
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--theme-raised);
  color: var(--theme-muted);
  font-size: 10px;
  font-weight: 700;
}

.whatsapp-data-report__state.is-current {
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.whatsapp-data-report__state.is-partial {
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
}

.whatsapp-data-report__state.is-parsed {
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.whatsapp-data-report__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 20px;
}

.whatsapp-data-report__meta div {
  min-width: 0;
}

.whatsapp-data-report__meta span,
.whatsapp-data-report__meta strong {
  display: block;
  overflow-wrap: anywhere;
}

.whatsapp-data-report__meta span {
  color: var(--theme-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.whatsapp-data-report__meta strong {
  margin-top: 4px;
  color: var(--theme-text);
  font-size: 12px;
}

.whatsapp-data-report__original {
  border-top: 1px solid var(--theme-blue-line);
  padding: 14px 20px 18px;
}

.whatsapp-data-report__original summary {
  cursor: pointer;
  color: var(--theme-text);
  font-size: 12px;
  font-weight: 700;
}

.whatsapp-data-report__original pre {
  max-height: 450px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--theme-text);
  font-size: 11px;
  line-height: 1.6;
}

.whatsapp-data-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--theme-muted);
  font-size: 12px;
}

.whatsapp-data-pagination button {
  padding: 9px 14px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: var(--theme-surface);
  color: var(--theme-text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.whatsapp-data-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.reconciliation-evidence-panel h4 {
  margin: 16px 0 8px;
  color: var(--theme-text);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reconciliation-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
}

.reconciliation-evidence-grid > div {
  min-width: 0;
  padding: 10px 11px;
  border-top: 1px solid var(--theme-line);
  border-left: 1px solid var(--theme-line);
}

.reconciliation-evidence-grid > div:nth-child(-n + 2) {
  border-top: 0;
}

.reconciliation-evidence-grid > div:nth-child(2n + 1) {
  border-left: 0;
}

.reconciliation-evidence-grid span,
.reconciliation-evidence-grid strong {
  display: block;
}

.reconciliation-evidence-grid span {
  color: var(--theme-muted);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.reconciliation-evidence-grid strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--theme-text);
  font-size: 10.5px;
}

.reconciliation-comparison {
  margin: 16px 0;
}

.reconciliation-evidence__section > .compact-button { margin-top: 10px; min-height: 44px; }

.reconciliation-whatsapp-placeholder.is-reference { border-color: var(--theme-amber-line); background: var(--theme-amber-surface); }
.reconciliation-whatsapp-placeholder.is-reference > div > span { background: var(--theme-amber-surface); color: var(--theme-amber-text); }

.reconciliation-collapsible { margin: 12px 0; border: 1px solid var(--theme-line); border-radius: 10px; background: var(--theme-surface); }
.reconciliation-collapsible > summary { padding: 12px 14px; color: var(--theme-text); cursor: pointer; font-size: 12px; font-weight: 750; line-height: 1.5; }
.reconciliation-collapsible > summary:focus-visible { outline: 2px solid #a51643; outline-offset: 2px; border-radius: 8px; }
.reconciliation-collapsible[open] > summary { border-bottom: 1px solid var(--theme-line); }
.reconciliation-collapsible__body { min-width: 0; padding: 12px; }
.reconciliation-collapsible__body > .reconciliation-comparison { margin: 0; }
.reconciliation-collapsible__body > .reconciliation-proposal-form { margin: 0; padding: 0; border: 0; }
.reconciliation-timesheet-link { display: inline-flex; align-items: center; justify-content: center; margin: 0 0 10px; text-decoration: none; min-height: 44px; white-space: normal; }
.reconciliation-timesheet-link:focus-visible { outline: 2px solid #a51643; outline-offset: 2px; }
.payment-dialog.reconciliation-source-dialog { width:min(1400px,calc(100vw - 32px)); max-width:calc(100vw - 32px); }
.reconciliation-source-context { margin:8px 0 18px; color:var(--theme-muted); font-size:13px; overflow-wrap:anywhere; }
.reconciliation-source-dialog .record-table-wrap { max-height:62dvh; overflow:auto; }
.reconciliation-source-dialog .record-table th { position:sticky; top:0; z-index:1; }

.reconciliation-comparison h4 {
  margin-bottom: 5px;
}

.reconciliation-comparison > p {
  margin: 0 0 10px;
  color: var(--theme-muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.reconciliation-comparison__scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
}

.reconciliation-comparison__scroll:focus-visible {
  outline: 2px solid #a51643;
  outline-offset: 2px;
}

.reconciliation-comparison__table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  text-align: left;
}

.reconciliation-comparison__table th,
.reconciliation-comparison__table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--theme-line);
  color: var(--theme-text);
  font-size: 12px;
  white-space: nowrap;
}

.reconciliation-comparison__table thead th {
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.reconciliation-comparison__table tbody th {
  font-weight: 750;
}

.reconciliation-comparison__table tbody tr:last-child th,
.reconciliation-comparison__table tbody tr:last-child td {
  border-bottom: 0;
}

.reconciliation-comparison__table tbody tr.is-different {
  background: var(--theme-rose-surface);
}

.reconciliation-comparison__table tbody tr.is-tolerated {
  background: var(--theme-green-surface);
}

.reconciliation-comparison__check {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}

.reconciliation-comparison__check.is-different {
  background: var(--theme-rose-surface);
  color: var(--theme-rose-text);
}

.reconciliation-comparison__check.is-matched {
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.reconciliation-comparison__check.is-tolerated,
.reconciliation-comparison__check.is-equivalent {
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.reconciliation-comparison__check.is-manual,
.reconciliation-comparison__check.is-unavailable {
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
}

.reconciliation-whatsapp-placeholder {
  padding: 12px 13px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: var(--theme-surface);
}

.reconciliation-whatsapp-placeholder > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reconciliation-whatsapp-placeholder > .reconciliation-partial-report {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--theme-line);
}

.reconciliation-whatsapp-placeholder strong {
  color: var(--theme-green-text);
  font-size: 11px;
}

.reconciliation-whatsapp-placeholder span {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--theme-green-text);
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.reconciliation-whatsapp-placeholder .reconciliation-whatsapp-meta {
  overflow-wrap: anywhere;
}

.reconciliation-whatsapp-paste-action {
  padding-block: 12px;
}

.reconciliation-whatsapp-viewer {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--theme-line);
}

.reconciliation-whatsapp-paste-action + .reconciliation-whatsapp-viewer {
  margin-top: 0;
}

.reconciliation-whatsapp-viewer > p {
  margin-top: 5px;
}

.reconciliation-whatsapp-viewer__body {
  max-height: 360px;
  margin: 11px 0 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font: 11px/1.6 "SFMono-Regular", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reconciliation-whatsapp-viewer__body:focus-visible {
  outline: 2px solid #25784d;
  outline-offset: 2px;
}

.reconciliation-whatsapp-issue {
  background: transparent;
  color: var(--theme-amber-text);
  font-weight: 700;
}

.reconciliation-manager-evidence {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--theme-line);
  border-radius: 11px;
  background: var(--theme-surface);
}

.reconciliation-manager-evidence__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.reconciliation-manager-evidence__heading h4 {
  margin: 0;
  color: var(--theme-text);
}

.reconciliation-manager-evidence__heading p,
.reconciliation-manager-evidence__empty {
  margin: 5px 0 0;
  color: var(--theme-muted);
  font-size: 10px;
  line-height: 1.55;
}

.reconciliation-manager-evidence__heading > span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--theme-blue-surface);
  color: var(--theme-text);
  font-size: 8.5px;
  font-weight: 800;
}

.reconciliation-evidence-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.reconciliation-evidence-image {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: var(--theme-surface);
  color: inherit;
  text-decoration: none;
}

.reconciliation-evidence-image:hover {
  border-color: var(--theme-rose-line);
}

.reconciliation-evidence-image img {
  width: 70px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
}

.reconciliation-evidence-image > span,
.reconciliation-evidence-image strong,
.reconciliation-evidence-image small {
  display: block;
  min-width: 0;
}

.reconciliation-evidence-image strong {
  overflow-wrap: anywhere;
  color: var(--theme-text);
  font-size: 9.5px;
  line-height: 1.4;
}

.reconciliation-evidence-image small {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--theme-muted);
  font-size: 8px;
  line-height: 1.4;
}

.reconciliation-evidence-upload,
.reconciliation-proposal-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--theme-line);
}

.reconciliation-evidence-previews {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.reconciliation-evidence-preview {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.reconciliation-evidence-preview img {
  width: 76px;
  height: 70px;
  border-radius: 7px;
  object-fit: cover;
}

.reconciliation-evidence-preview label,
.reconciliation-proposal-grid label {
  color: var(--theme-muted);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reconciliation-evidence-preview textarea,
.reconciliation-proposal-grid input,
.reconciliation-proposal-grid select,
.reconciliation-proposal-grid textarea {
  width: 100%;
  margin-top: 5px;
  padding: 9px 10px;
  border: 1px solid var(--theme-line);
  border-radius: 7px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font: inherit;
  text-transform: none;
}

.reconciliation-evidence-upload > .compact-button {
  width: 100%;
  margin-top: 8px;
}

.reconciliation-proposal-form__heading strong,
.reconciliation-proposal-form__heading span {
  display: block;
}

.reconciliation-attendance-date {
  margin: 8px 0 0;
  color: var(--theme-text);
  font-weight: 650;
}

.reconciliation-proposal-context {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--theme-text);
  overflow-wrap: anywhere;
}

.reconciliation-proposal-form__heading strong {
  color: var(--theme-text);
  font-size: 10.5px;
}

.reconciliation-proposal-form__heading span {
  margin-top: 4px;
  color: var(--theme-muted);
  font-size: 9px;
}

.reconciliation-proposal-form__hint,
.reconciliation-proposal-grid label small {
  display: block;
  color: var(--theme-muted);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.45;
  text-transform: none;
}

.reconciliation-proposal-form__hint {
  margin: 9px 0 0;
}

.reconciliation-proposal-form__break {
  margin: 9px 0 0;
  color: var(--theme-amber-text);
  font-size: 11px;
  font-weight: 600;
}

.reconciliation-proposal-grid label small {
  margin-top: 4px;
}

.reconciliation-proposal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.reconciliation-proposal-note {
  grid-column: 1 / -1;
}

.reconciliation-proposal-billing {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  color: var(--theme-text);
}

.reconciliation-proposal-billing input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
}

.reconciliation-proposal-billing small {
  display: block;
  margin-top: 3px;
  color: var(--theme-muted);
  line-height: 1.4;
}

.reconciliation-proposal-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.reconciliation-proposal-form__actions .settings-message {
  margin: 0;
}

.reconciliation-actions {
  display: flex;
  gap: 9px;
  margin-top: 17px;
}

.reconciliation-actions .compact-button {
  flex: 1;
}

.reconciliation-evidence-empty {
  display: grid;
  min-height: 400px;
  place-content: center;
  justify-items: center;
  padding: 30px;
  color: var(--theme-muted);
  text-align: center;
}

.reconciliation-evidence-empty > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--theme-raised);
  color: var(--theme-text);
  font-size: 18px;
}

.reconciliation-evidence-empty h3 {
  margin: 12px 0 4px;
  color: var(--theme-text);
  font-size: 14px;
}

.reconciliation-evidence-empty p {
  max-width: 280px;
  margin: 0;
  font-size: 10.5px;
  line-height: 1.5;
}

.reconciliation-empty {
  min-height: 360px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.payment-filter-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 14px;
  padding: 17px;
  border: 1px solid var(--theme-line);
  border-radius: 12px;
  background: var(--theme-surface);
  box-shadow: 0 8px 28px rgba(16, 26, 46, 0.045);
}

.payment-filter-card--compact {
  grid-template-columns: minmax(180px, 0.35fr) minmax(260px, 1fr);
}

.payment-filter-card label,
.settings-form label,
.manual-payment-grid label,
.payment-editor label {
  margin: 0;
  color: var(--theme-muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.payment-filter-card input,
.payment-filter-card select,
.settings-form input,
.settings-form select,
.manual-payment-grid input,
.manual-payment-grid select,
.manual-payment-grid textarea,
.payment-editor input,
.payment-editor select,
.payment-editor textarea {
  width: 100%;
  min-height: 40px;
  margin-top: 7px;
  padding: 0 11px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  outline: none;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 11.5px;
  letter-spacing: normal;
  text-transform: none;
}

.manual-payment-grid textarea,
.payment-editor textarea {
  min-height: 74px;
  padding-top: 10px;
  resize: vertical;
}

.payment-filter-card input:focus,
.payment-filter-card select:focus,
.settings-form input:focus,
.settings-form select:focus,
.manual-payment-grid input:focus,
.manual-payment-grid select:focus,
.manual-payment-grid textarea:focus,
.payment-editor input:focus,
.payment-editor select:focus,
.payment-editor textarea:focus {
  border-color: rgba(196, 30, 77, 0.52);
  box-shadow: 0 0 0 3px rgba(196, 30, 77, 0.08);
}

.table-search--standalone {
  width: 100%;
}

.table-search--standalone input {
  margin-top: 0;
  padding-left: 34px;
}

.payment-cycle-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--theme-amber-line);
  border-radius: 10px;
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
  font-size: 11.5px;
  line-height: 1.55;
}

.payment-cycle-note strong {
  flex: 0 0 auto;
  color: var(--theme-amber-text);
}

.payment-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.payment-summary article {
  padding: 16px;
  border: 1px solid var(--theme-line);
  border-radius: 11px;
  background: var(--theme-surface);
  box-shadow: 0 8px 28px rgba(16, 26, 46, 0.045);
}

.payment-summary span,
.payment-summary strong,
.payment-summary small {
  display: block;
}

.payment-summary span {
  color: var(--theme-muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.payment-summary strong {
  margin-top: 7px;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: 21px;
}

.payment-summary small {
  margin-top: 4px;
  color: var(--theme-muted);
  font-size: 9.5px;
}

.payment-summary article.is-primary {
  border-color: var(--theme-line);
  background: #222b39;
}

.payment-summary article.is-primary span,
.payment-summary article.is-primary small {
  color: var(--theme-text);
}

.payment-summary article.is-primary strong {
  color: var(--theme-text);
}

.payment-table td {
  font-variant-numeric: tabular-nums;
}

.payment-table td:nth-last-child(-n + 3) {
  white-space: nowrap;
}

.payment-status {
  display: inline-flex !important;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
  font-size: 9.5px;
  font-weight: 800;
  text-transform: capitalize;
}

.payment-status--approved,
.payment-status--locked {
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.payment-status--submitted {
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
}

.payment-status--review,
.payment-status--needs-review {
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
}

.payment-status--superseded {
  background: var(--theme-raised);
  color: var(--theme-muted);
}

.payment-review-flags {
  display: flex;
  max-width: 190px;
  flex-wrap: wrap;
  gap: 6px 10px;
  white-space: normal;
}

.payment-review-flags span {
  display: inline-flex !important;
  color: var(--theme-amber-text);
  font-size: 9.5px;
  font-weight: 750;
}

.settings-form {
  display: grid;
  gap: 13px;
}

.client-invoice-numbering-form {
  margin-top: 13px;
}

.client-invoice-numbering-actions {
  align-items: center;
}

.settings-card {
  overflow: hidden;
  border: 1px solid var(--theme-line);
  border-radius: 12px;
  background: var(--theme-surface);
  box-shadow: 0 8px 28px rgba(16, 26, 46, 0.04);
}

.settings-card__heading {
  padding: 15px 17px;
  border-bottom: 1px solid var(--theme-line);
  background: var(--theme-blue-surface);
}

.settings-card__heading strong,
.settings-card__heading span {
  display: block;
}

.settings-card__heading strong {
  color: var(--theme-text);
  font-size: 12px;
}

.settings-card__heading span {
  margin-top: 3px;
  color: var(--theme-muted);
  font-size: 9.5px;
  line-height: 1.45;
}

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

.settings-grid + .settings-grid {
  padding-top: 0;
}

.settings-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.settings-form label small {
  color: var(--theme-muted);
  font-size: 8.5px;
  font-weight: 500;
  text-transform: none;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
}

.settings-message {
  padding: 0;
}

.access-user-form {
  margin-bottom: 14px;
}

.access-user-fields {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 0.45fr) auto;
  align-items: end;
  gap: 15px;
  padding: 17px;
}

.access-user-fields .compact-button {
  min-width: 112px;
}

.access-scope-note {
  margin: 0 17px 17px;
  padding: 11px 13px;
  border: 1px solid var(--theme-line);
  border-radius: 9px;
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.access-user-form .settings-message {
  margin: 0 17px 17px;
}

.access-user-list-card {
  margin-top: 14px;
}

.access-user-table td:first-child {
  color: var(--theme-text);
  font-weight: 700;
}

.access-user-type,
.access-user-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.access-user-type {
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
}

.access-user-type--local {
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
}

.access-user-type--foreign {
  background: var(--theme-raised);
  color: var(--theme-muted);
}

.access-user-type--super-admin {
  background: var(--theme-rose-surface);
  color: var(--theme-rose-text);
}

.access-user-status {
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.payment-dialog {
  width: min(94vw, 820px);
  max-height: 90vh;
  padding: 0;
  overflow: hidden auto;
  border: 0;
  border-radius: 15px;
  background: transparent;
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.36);
}

.payment-dialog::backdrop {
  background: rgba(8, 13, 23, 0.68);
  backdrop-filter: blur(4px);
}

.payment-dialog__card {
  padding: 23px;
  background: var(--theme-surface);
}

.passkeys-dialog h2 {
  margin: 0;
}

.passkey-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.passkey-list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--theme-line);
}

.passkey-list small {
  display: block;
  color: var(--theme-muted);
}

.add-worker-dialog {
  width: min(95vw, 980px);
}

.add-worker-dialog__card {
  padding: 0;
}

.add-worker-dialog__card > .review-card__header {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 22px 24px;
  border-bottom: 1px solid var(--theme-line);
  background: rgba(21,31,50,0.97);
  backdrop-filter: blur(10px);
}

.add-worker-detected {
  margin: 18px 24px 0;
  padding: 13px 15px;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  background: var(--theme-blue-surface);
}

.add-worker-detected span,
.add-worker-detected strong,
.add-worker-detected small {
  display: block;
}

.add-worker-detected span {
  color: var(--theme-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.add-worker-detected strong {
  margin-top: 5px;
  color: var(--theme-text);
  font-size: 12px;
}

.add-worker-detected small {
  margin-top: 3px;
  color: var(--theme-muted);
  font-size: 9.5px;
}

.add-worker-form-body {
  display: grid;
  gap: 14px;
  padding: 18px 24px 2px;
}

.add-worker-section {
  box-shadow: none;
}

.add-worker-section .add-worker-grid {
  margin: 0;
  padding: 17px;
}

.add-worker-grid--deductions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.add-worker-dialog__card > .payment-dialog__message {
  margin: 16px 24px 0;
}

.add-worker-dialog__actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--theme-line);
  background: rgba(21,31,50,0.97);
  backdrop-filter: blur(10px);
}

@media (max-width: 760px) {
  .add-worker-grid--deductions,
  .add-worker-grid {
    grid-template-columns: 1fr;
  }

  .add-worker-grid .field-span {
    grid-column: auto;
  }
}

.manual-payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 19px;
}

.manual-payment-grid .field-span {
  grid-column: 1 / -1;
}

.manual-kind-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.worker-search-results {
  display: grid;
  max-height: 230px;
  margin-top: 5px;
  overflow-y: auto;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  background: var(--theme-surface);
  box-shadow: 0 13px 30px rgba(16, 26, 46, 0.14);
}

.worker-search-results button {
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--theme-line);
  background: var(--theme-surface);
  color: var(--theme-text);
  cursor: pointer;
  text-align: left;
}

.worker-search-results button:first-child {
  border-top: 0;
}

.worker-search-results button:hover {
  background: var(--theme-blue-surface);
}

.worker-search-results strong,
.worker-search-results small {
  display: block;
}

.worker-search-results strong {
  font-size: 11.5px;
}

.worker-search-results small {
  margin-top: 3px;
  color: var(--theme-muted);
  font-size: 10px;
}

.payment-dialog__message {
  padding: 13px 0 0;
}

.payment-detail-card {
  overflow: hidden;
  border: 1px solid var(--theme-line);
  border-radius: 13px;
  background: var(--theme-surface);
  box-shadow: 0 12px 38px rgba(16, 26, 46, 0.055);
}

.payment-detail-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid var(--theme-line);
}

.payment-detail-card__header h2 {
  margin: 0 0 5px;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: 26px;
}

.payment-detail-card__header p:last-child {
  margin: 0;
  color: var(--theme-muted);
  font-size: 10.5px;
}

.payment-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.payment-detail-actions .payment-status {
  align-items: center;
  justify-content: center;
}

.payment-detail-body {
  display: grid;
  gap: 14px;
  padding: 20px 22px 24px;
}

.payment-handoff-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--theme-blue-line);
  border-radius: 9px;
  background: var(--theme-blue-surface);
  color: var(--theme-text);
  font-size: 12px;
  line-height: 1.5;
}

.payment-handoff-note--returned {
  border-color: var(--theme-amber-line);
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
}

.payment-profile-grid,
.payment-totals-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
}

.payment-profile-grid > div,
.payment-totals-grid > div {
  padding: 12px;
  border-left: 1px solid var(--theme-line);
  border-top: 1px solid var(--theme-line);
}

.payment-profile-grid > div:nth-child(-n + 4),
.payment-totals-grid > div:nth-child(-n + 4) {
  border-top: 0;
}

.payment-profile-grid > div:nth-child(4n + 1),
.payment-totals-grid > div:nth-child(4n + 1) {
  border-left: 0;
}

.payment-profile-grid span,
.payment-profile-grid strong,
.payment-totals-grid span,
.payment-totals-grid strong,
.payment-totals-grid small {
  display: block;
}

.payment-profile-grid span,
.payment-totals-grid span {
  color: var(--theme-muted);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.payment-profile-grid strong,
.payment-totals-grid strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--theme-text);
  font-size: 11.5px;
}

.payment-totals-grid strong {
  font-family: var(--display);
  font-size: 17px;
}

.payment-totals-grid small {
  margin-top: 4px;
  color: var(--theme-muted);
  font-size: 9.5px;
}

.payment-contribution-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.payment-contribution-stars {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--theme-line);
  border-radius: 999px;
  background: var(--theme-inset);
}

.payment-contribution-stars[hidden] { display: none; }

:is(#paymentDetail, .worker-contributions-card) .payment-contribution-star {
  display: grid;
  place-items: center;
  width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--theme-muted);
  font-size: 17px;
  line-height: 1;
}

:is(#paymentDetail, .worker-contributions-card) .payment-contribution-star.is-filled { color: var(--theme-rose-text); }
:is(#paymentDetail, .worker-contributions-card) .payment-contribution-star:not(:disabled):hover { color: var(--theme-rose-text); }
:is(#paymentDetail, .worker-contributions-card) .payment-contribution-star:focus-visible { outline: 2px solid var(--theme-rose-text); outline-offset: -2px; }
:is(#paymentDetail, .worker-contributions-card) .payment-contribution-star:disabled { opacity: 1; }

.payment-employee-contribution-amounts {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  color: var(--theme-text);
  font-size: 11px;
  line-height: 1.45;
}

.payment-employee-contribution-amounts > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.payment-employee-contribution-amounts dd {
  margin: 0;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.payment-totals-grid > div.is-primary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #222b39;
}

@media (min-width: 781px) {
  .payment-totals-grid--crew > .is-primary { grid-column: span 2; }
}

.payment-totals-grid > div.is-primary span,
.payment-totals-grid > div.is-primary small {
  color: var(--theme-text);
}

#paymentDetail .payment-totals-grid [data-payment-total="net"] {
  margin-top: 8px;
  color: #ff777d;
  font-size: clamp(26px, 2.2vw, 34px);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

[data-theme="light"] #paymentDetail .payment-totals-grid [data-payment-total="net"] {
  color: #b91c1c;
}

.payment-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.payment-editor__section {
  padding: 15px;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  background: var(--theme-blue-surface);
}

.payment-editor__section h3 {
  margin: 0 0 4px;
  color: var(--theme-text);
  font-size: 12px;
}

.payment-editor__section > p {
  margin: 0 0 12px;
  color: var(--theme-muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.payment-editor__section label > small[data-statutory-source] {
  display: block;
  min-height: 15px;
  margin-top: 5px;
  color: var(--theme-muted);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
}

.payment-line {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) 105px minmax(170px, 1.2fr) 30px;
  gap: 7px;
  margin-top: 7px;
}

.payment-line input,
.payment-line select {
  margin-top: 0;
}

.payment-line button {
  border: 1px solid var(--theme-line);
  border-radius: 7px;
  background: var(--theme-surface);
  color: var(--theme-rose-text);
  cursor: pointer;
}

.payment-line--prior {
  grid-template-columns: minmax(190px, 1.4fr) minmax(130px, 0.85fr) minmax(110px, 0.7fr) minmax(220px, 1.5fr);
}

.payment-line--prior > input,
.payment-line--prior > select {
  min-width: 0;
}

.payment-line__confirmation {
  grid-column: 1 / 4;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--theme-text);
  font-size: 13px;
}

.payment-line__confirmation input {
  width: auto;
  margin: 0;
}

.payment-line--prior .payment-line__remove {
  min-height: 34px;
}

.payment-add-line {
  margin-top: 9px;
  padding: 6px 9px;
  border: 1px dashed var(--theme-line);
  border-radius: 7px;
  background: var(--theme-surface);
  color: var(--theme-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.payment-review-notice {
  padding: 11px 13px;
  border: 1px solid var(--theme-amber-line);
  border-radius: 9px;
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
  font-size: 10.5px;
  line-height: 1.55;
}

.payment-line.is-invalid select {
  border-color: var(--theme-rose-line);
  background: var(--theme-rose-surface);
}

.crew-payout-panel {
  margin-top: 34px;
  padding-top: 32px;
  border-top: 1px solid var(--theme-line);
}

.crew-payout-panel__heading,
.crew-payout-section__heading,
.crew-payout-card__heading,
.crew-payout-batch__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.crew-payout-panel__heading {
  margin-bottom: 16px;
}

.crew-payout-panel__heading h2 {
  margin: 0 0 6px;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: clamp(23px, 2.4vw, 30px);
  letter-spacing: -0.03em;
}

.crew-payout-panel__heading p:last-child,
.crew-payout-section__heading p,
.crew-payout-card__heading p,
.crew-payout-batch__header p,
.crew-invoice-card > p {
  margin: 4px 0 0;
  color: var(--theme-muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.crew-payout-boundaries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.crew-payout-boundary {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--theme-blue-line);
  border-radius: 9px;
  background: var(--theme-blue-surface);
  color: var(--theme-text);
  font-size: 10.5px;
  line-height: 1.55;
}

.crew-payout-boundary strong {
  color: var(--theme-text);
}

.crew-payout-boundary--warning {
  border-color: var(--theme-amber-line);
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
}

.crew-payout-boundary--warning strong {
  color: var(--theme-amber-text);
}

.crew-payout-message {
  min-height: 18px;
  margin: 0 0 12px;
  color: var(--theme-muted);
  font-size: 11px;
}

.crew-payout-message.is-success {
  color: var(--theme-green-text);
}

.crew-payout-message.is-error {
  color: var(--theme-rose-text);
}

.crew-payout-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.crew-payout-summary article {
  padding: 15px;
  border: 1px solid var(--theme-line);
  border-radius: 11px;
  background: var(--theme-surface);
  box-shadow: 0 8px 28px rgba(16, 26, 46, 0.04);
}

.crew-payout-summary span,
.crew-payout-summary strong,
.crew-payout-summary small {
  display: block;
}

.crew-payout-summary span {
  color: var(--theme-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crew-payout-summary strong {
  margin-top: 6px;
  color: var(--theme-text);
  font-family: var(--display);
  font-size: 20px;
}

.crew-payout-summary small {
  margin-top: 3px;
  color: var(--theme-muted);
  font-size: 9.5px;
}

.crew-payout-card,
.crew-payout-section {
  margin-top: 14px;
  border: 1px solid var(--theme-line);
  border-radius: 13px;
  background: var(--theme-surface);
  box-shadow: 0 12px 38px rgba(16, 26, 46, 0.045);
}

.crew-payout-card {
  overflow: hidden;
}

.crew-payout-card__heading,
.crew-payout-section__heading {
  padding: 17px;
}

.crew-payout-card__heading h3,
.crew-payout-section__heading h3,
.crew-invoice-card h4,
.crew-payout-batch h4 {
  margin: 0;
  color: var(--theme-text);
  font-family: var(--display);
}

.crew-payout-card__heading h3,
.crew-payout-section__heading h3 {
  font-size: 16px;
}

.crew-payout-card__count {
  color: var(--theme-muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.crew-payout-empty {
  margin: 0;
  padding: 24px 17px;
  border-top: 1px solid var(--theme-line);
  color: var(--theme-muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.crew-payout-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--theme-line);
}

.crew-payout-table-wrap:focus-visible {
  outline: 3px solid rgba(196, 30, 77, 0.18);
  outline-offset: -3px;
}

.crew-payout-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  white-space: nowrap;
}

.crew-payout-table--batch {
  min-width: 1040px;
}

.crew-payout-table th {
  padding: 10px 12px;
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-align: left;
  text-transform: uppercase;
}

.crew-payout-table td {
  padding: 12px;
  border-top: 1px solid var(--theme-line);
  color: var(--theme-text);
  font-size: 10.5px;
  vertical-align: middle;
}

.crew-payout-table td > span,
.crew-payout-table td > small {
  display: block;
}

.crew-payout-table td > small {
  max-width: 230px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--theme-muted);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: normal;
}

.crew-payout-status {
  display: inline-flex !important;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: capitalize;
}

.crew-payout-status--approved,
.crew-payout-status--confirmed,
.crew-payout-status--completed {
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
}

.crew-payout-status--submitted,
.crew-payout-status--pending,
.crew-payout-status--prepared {
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
}

.crew-payout-status--held {
  background: var(--theme-amber-surface);
  color: var(--theme-amber-text);
}

.crew-payout-status--rejected,
.crew-payout-status--voided {
  background: var(--theme-rose-surface);
  color: var(--theme-rose-text);
}

.crew-payout-muted {
  color: var(--theme-muted);
  font-size: 10px;
}

.crew-payout-document-link {
  color: var(--theme-muted);
  font-size: 10.5px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.crew-payout-document-link:focus-visible,
.crew-payout-panel button:focus-visible {
  outline: 3px solid rgba(196, 30, 77, 0.18);
  outline-offset: 2px;
}

.crew-payout-section__actions,
.crew-payout-batch__actions,
.crew-payout-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.crew-payout-section__actions .compact-button {
  min-width: 168px;
}

.crew-payout-readiness {
  margin: -3px 17px 14px;
  padding: 9px 11px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  background: var(--theme-blue-surface);
  color: var(--theme-muted);
  font-size: 10px;
  line-height: 1.5;
}

.crew-payout-hold-button,
.crew-payout-danger-button {
  border-color: var(--theme-rose-line);
  color: var(--theme-rose-text);
}

.crew-payout-confirm-button {
  border-color: var(--theme-green-line);
  color: var(--theme-green-text);
}

.crew-payout-batch-list {
  display: grid;
  gap: 12px;
  padding: 0 17px 17px;
}

.crew-payout-batch {
  overflow: hidden;
  border: 1px solid var(--theme-line);
  border-radius: 11px;
  background: var(--theme-surface);
}

.crew-payout-batch--voided {
  background: var(--theme-surface);
  opacity: 0.82;
}

.crew-payout-batch__header {
  align-items: center;
  padding: 14px;
}

.crew-payout-batch__title-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.crew-payout-batch h4,
.crew-invoice-card h4 {
  font-size: 13.5px;
}

.crew-payout-external-reference,
.crew-payout-void-reason {
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--theme-blue-line);
  background: var(--theme-green-surface);
  color: var(--theme-green-text);
  font-size: 10.5px;
  line-height: 1.5;
}

.crew-payout-void-reason {
  background: var(--theme-rose-surface);
  color: var(--theme-rose-text);
}

.crew-payout-submission-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.45fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--theme-line);
  background: var(--theme-blue-surface);
}

.crew-payout-submission-form label,
.crew-invoice-form label {
  color: var(--theme-muted);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.crew-payout-submission-form input,
.crew-invoice-form input,
.crew-invoice-form select,
.crew-invoice-form textarea {
  display: block;
  width: 100%;
  min-height: 39px;
  margin-top: 6px;
  padding: 0 10px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  outline: none;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.crew-invoice-form textarea {
  min-height: 78px;
  padding-top: 9px;
  resize: vertical;
}

.crew-payout-submission-form input:focus,
.crew-invoice-form input:focus,
.crew-invoice-form select:focus,
.crew-invoice-form textarea:focus {
  border-color: rgba(196, 30, 77, 0.52);
  box-shadow: 0 0 0 3px rgba(196, 30, 77, 0.08);
}

.crew-invoice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 0 17px 17px;
}

.crew-invoice-card {
  overflow: hidden;
  padding: 15px;
  border: 1px solid var(--theme-line);
  border-radius: 11px;
  background: var(--theme-blue-surface);
}

.crew-invoice-card .crew-payout-table-wrap,
.crew-invoice-card .crew-payout-empty {
  margin: 13px -15px -15px;
}

.crew-invoice-table {
  min-width: 680px;
}

.crew-invoice-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.crew-invoice-form__wide {
  grid-column: 1 / -1;
}

.crew-invoice-worker-review:empty {
  display: none;
}

.crew-invoice-worker {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 12px 0 0;
  padding: 10px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.crew-invoice-worker legend {
  padding: 0 4px;
  font-weight: 700;
}

.crew-invoice-worker p,
.crew-invoice-worker ul {
  margin: 0;
}

.crew-invoice-worker ul {
  padding-inline-start: 18px;
}

.crew-invoice-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--theme-text) !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  line-height: 1.45;
  text-transform: none !important;
}

.crew-invoice-confirmation input {
  width: auto;
  min-height: 0;
  margin: 2px 0 0;
}

.crew-invoice-form__note {
  margin: 0;
  color: var(--theme-muted);
  font-size: 10px;
  line-height: 1.5;
}

.crew-invoice-form__submit {
  grid-column: 1 / -1;
  justify-self: end;
}

@media (max-width: 1180px) {
  .whatsapp-data-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .whatsapp-data-report__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid--four,
  .payment-profile-grid,
  .payment-totals-grid,
  .worker-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .worker-profile-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .whatsapp-settings-grid {
    grid-template-columns: 1fr;
  }

  .reconciliation-grid {
    grid-template-columns: 1fr;
  }

  .crew-invoice-layout {
    grid-template-columns: 1fr;
  }

  .reconciliation-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--theme-line);
  }

  .reconciliation-list {
    max-height: 430px;
  }

  .payment-profile-grid > div:nth-child(-n + 4),
  .payment-totals-grid > div:nth-child(-n + 4) {
    border-top: 1px solid var(--theme-line);
  }

  .payment-profile-grid > div:nth-child(-n + 2),
  .payment-totals-grid > div:nth-child(-n + 2) {
    border-top: 0;
  }

  .payment-profile-grid > div:nth-child(4n + 1),
  .payment-totals-grid > div:nth-child(4n + 1) {
    border-left: 1px solid var(--theme-line);
  }

  .payment-profile-grid > div:nth-child(2n + 1),
  .payment-totals-grid > div:nth-child(2n + 1) {
    border-left: 0;
  }
}

@media (min-width: 1101px) {
  body[data-workspace-scope="crew"] .reconciliation-filters {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.2fr);
  }
}

@media (min-width: 781px) and (max-width: 1100px) {
  .reconciliation-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reconciliation-search-filter { grid-column: 1 / -1; }
  body[data-workspace-scope="crew"] .reconciliation-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-workspace-scope="crew"] .reconciliation-search-filter { grid-column: auto; }
}

@media (max-width: 780px) {
  .whatsapp-data-filter-grid,
  .whatsapp-data-report__meta {
    grid-template-columns: 1fr;
  }

  .whatsapp-data-report__heading {
    flex-wrap: wrap;
  }

  .payment-filter-card,
  .payment-filter-card--compact,
  .reconciliation-filters,
  .settings-grid,
  .settings-grid--three,
  .settings-grid--four,
  .manual-payment-grid,
  .manual-kind-fields,
  .payment-editor,
  .payment-line {
    grid-template-columns: 1fr;
  }

  .payment-line__confirmation {
    grid-column: auto;
  }

  .access-user-fields {
    grid-template-columns: 1fr;
  }

  .access-user-fields .compact-button {
    width: 100%;
  }

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

  .reconciliation-source-note {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .reconciliation-source-status {
    margin-left: 49px;
  }

  .whatsapp-status-grid,
  .whatsapp-day-retrieval,
  .whatsapp-qr-card {
    grid-template-columns: 1fr;
  }

  .whatsapp-qr-card img {
    width: min(190px, 100%);
    height: auto;
    margin-right: 0;
  }

  .reconciliation-evidence-grid {
    grid-template-columns: 1fr;
  }

  .reconciliation-manager-evidence__heading,
  .reconciliation-proposal-form__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .reconciliation-evidence-gallery,
  .reconciliation-proposal-grid {
    grid-template-columns: 1fr;
  }

  .reconciliation-proposal-note {
    grid-column: auto;
  }

  .reconciliation-evidence-grid > div,
  .reconciliation-evidence-grid > div:nth-child(-n + 2) {
    border-top: 1px solid var(--theme-line);
    border-left: 0;
  }

  .reconciliation-evidence-grid > div:first-child {
    border-top: 0;
  }

  .reconciliation-actions {
    flex-direction: column;
  }

  .payment-cycle-note,
  .payment-detail-card__header,
  .worker-detail-card__header,
  .crew-payout-panel__heading,
  .crew-payout-section__heading,
  .crew-payout-card__heading,
  .crew-payout-batch__header {
    align-items: stretch;
    flex-direction: column;
  }

  .crew-payout-boundaries,
  .crew-payout-submission-form,
  .crew-invoice-form {
    grid-template-columns: 1fr;
  }

  .crew-payout-section__actions,
  .crew-payout-batch__actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .crew-invoice-form__wide,
  .crew-invoice-form__submit {
    grid-column: auto;
  }

  .worker-detail-section {
    grid-template-columns: 1fr;
  }

  .worker-profile-form__heading {
    flex-direction: column;
  }

  .worker-profile-field-grid {
    grid-template-columns: 1fr;
  }

  .worker-detail-header-actions {
    justify-content: flex-start;
  }

  .payment-detail-actions {
    justify-content: flex-start;
  }

  .payment-profile-grid,
  .payment-totals-grid,
  .worker-detail-grid {
    grid-template-columns: 1fr;
  }

  .worker-detail-grid > div.is-wide {
    grid-column: auto;
  }

  .payment-profile-grid > div,
  .payment-totals-grid > div,
  .payment-profile-grid > div:nth-child(-n + 2),
  .payment-totals-grid > div:nth-child(-n + 2) {
    border-top: 1px solid var(--theme-line);
    border-left: 0;
  }

  .payment-profile-grid > div:first-child,
  .payment-totals-grid > div:first-child {
    border-top: 0;
  }
}

@media (max-width: 520px) {
  .payment-summary,
  .reconciliation-summary,
  .crew-payout-summary {
    grid-template-columns: 1fr;
  }

  .crew-payout-section__actions,
  .crew-payout-row-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .crew-payout-section__actions .compact-button,
  .crew-invoice-form__submit {
    width: 100%;
  }
}

.hal-ehwal-controls {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(150px, 0.6fr) minmax(220px, 1.4fr);
  gap: 16px;
  padding: 22px;
}

.hal-ehwal-controls label {
  color: var(--theme-muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.hal-ehwal-controls input,
.hal-ehwal-controls select {
  width: 100%;
  min-height: 42px;
  margin-top: 7px;
  padding: 0 12px;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 12px;
  letter-spacing: normal;
  text-transform: none;
}

.hal-ehwal-card > .worker-list-message {
  margin: 0 22px 18px;
}

.hal-ehwal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 22px 22px;
}

.hal-ehwal-summary > div {
  padding: 18px;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  background: var(--theme-blue-surface);
}

.hal-ehwal-summary span,
.hal-ehwal-summary strong {
  display: block;
}

.hal-ehwal-summary span {
  color: var(--theme-muted);
  font-size: 11px;
}

.hal-ehwal-summary strong {
  margin-top: 6px;
  color: var(--theme-text);
  font-size: 26px;
}

.hal-ehwal-table td {
  white-space: normal;
}

.hal-ehwal-table td:nth-child(4) {
  min-width: 190px;
}

.hal-ehwal-dialog {
  width: min(calc(100vw - 32px), 640px);
  max-height: calc(100svh - 32px);
  margin: auto;
  background: var(--theme-surface);
}

.hal-ehwal-dialog .dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--theme-line);
}

.hal-ehwal-dialog h3 {
  margin: 0;
  font-size: 17px;
}

.hal-ehwal-dialog .dialog-close {
  border: 0;
  background: transparent;
  color: var(--theme-muted);
  cursor: pointer;
  font-size: 25px;
}

.hal-ehwal-dialog pre {
  max-height: min(70vh, 680px);
  margin: 0;
  padding: 22px;
  overflow: auto;
  color: var(--theme-text);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .hal-ehwal-controls,
  .hal-ehwal-summary {
    grid-template-columns: 1fr;
  }
}

/* Explicit payout selections and worker deduction review. */
.crew-payout-selection, .crew-bank-selection, .deduction-ledger { margin-top: 1.25rem; }
.crew-payout-selection label, .crew-bank-selection label, .deduction-receipt-item { display: flex; align-items: center; gap: .65rem; padding: .6rem 0; }
.crew-payout-selection input[type="checkbox"], .crew-bank-selection input[type="checkbox"], .deduction-receipt-item input { flex: 0 0 auto; width: 20px; height: 20px; }
.deduction-charge-form, .deduction-receipt-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; align-items: end; margin: 1rem 0; }
.deduction-charge-form label, .deduction-receipt-form label { display: grid; gap: .5rem; }
.deduction-ledger input, .deduction-ledger select { min-height: 44px; padding: .6rem; border: 1px solid var(--theme-line); border-radius: 8px; max-width: 100%; }
.deduction-ledger input[type="number"] { width: 130px; }
.deduction-ledger details { margin-top: 1rem; }
.deduction-ledger summary { cursor: pointer; padding: .7rem 0; font-weight: 600; }
.deduction-ledger h4 { margin-top: 1.5rem; }
.deduction-receipt-item { overflow-wrap: anywhere; }

/* Private legacy import and per-worker Finance review. */
.migration-card { padding: 1.5rem; margin-top: 1.25rem; }
.migration-card h2 { margin: 0 0 .75rem; font-size: 1.2rem; }
.migration-card p { line-height: 1.6; }
.migration-card label { display: flex; flex-direction: column; gap: .5rem; color: var(--theme-text); font-weight: 600; }
.migration-card input:not([type=checkbox]), .migration-card select { min-width: 0; width: 100%; padding: .75rem; border: 1px solid var(--theme-line); border-radius: .6rem; background: var(--theme-surface); color: var(--theme-text); }
.migration-filters, .migration-opening { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.migration-card .migration-select { flex-direction: row; align-items: center; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--theme-line); }
.migration-select span { flex: 1; }
.migration-card .migration-select { display: flex; }
.migration-card .migration-sheet-choice { flex: 1; flex-direction: row; align-items: center; margin: 0; min-width: 0; }
.migration-sheet-choice input[type=checkbox] { flex: 0 0 auto; }
.migration-month-control { flex: 0 1 290px; min-width: 0; }
.migration-month-control__fields { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 8px; }
.migration-month-control p { margin: 5px 0 0; color: var(--theme-muted); font-size: 11px; }
@media (max-width: 680px) { .migration-month-control { flex-basis: 100%; } .migration-sheet-choice { flex-basis: 100%; } }
.migration-record { border-top: 1px solid var(--theme-line); padding: 1.2rem 0; }
.migration-record h3 { font-size: 1rem; margin: 0; }
.migration-record details { margin: 1rem 0; }
.migration-record summary { cursor: pointer; font-weight: 600; }
.migration-values { display: grid; grid-template-columns: minmax(10rem, 1fr) 2fr; gap: .6rem 1rem; max-height: 28rem; overflow: auto; padding: 1rem; background: var(--theme-raised); }
.migration-values dt { font-weight: 600; }
.migration-values dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.migration-actions { display: flex; gap: 1rem; }
.migration-warning { color: var(--theme-amber-text); }
#migrationUpload { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; }
#migrationPreview { margin-top: 1.5rem; }
#migrationPreview > button { margin: 1rem .5rem 0 0; }
@media (max-width: 680px) {
  .migration-filters, .migration-opening { grid-template-columns: 1fr; }
  .migration-card .migration-select { flex-wrap: wrap; }
  .migration-values { grid-template-columns: 1fr; }
  .migration-values dd { margin-bottom: .6rem; }
}

.crew-finance-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.crew-finance-filters label { display: grid; margin: 0; gap: .4rem; font-size: .8rem; font-weight: 700; color: var(--theme-muted); }
.crew-finance-filters input { min-height: 44px; padding: .6rem .8rem; border: 1px solid var(--theme-line); border-radius: .6rem; background: var(--theme-surface); color: var(--theme-text); }
.crew-finance-flow { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.crew-finance-flow a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-height: 44px; padding: 10px 16px; line-height: 1.4; white-space: normal; text-align: center; }
.crew-finance-flow [aria-current=page] { background: #172238; color: var(--theme-text); }
.crew-finance-page .crew-payout-panel { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 680px) {
  .crew-finance-filters { width: 100%; }
  .crew-finance-flow a { flex: 1 1 45%; text-align: center; }
}

.reconciliation-timesheet-control { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:18px 20px; padding:20px; }
.reconciliation-timesheet-control select { width:100%; min-width:0; max-width:100%; }
#reconciliationTimesheetDescription { grid-column:1 / -1; min-width:0; color:var(--theme-muted); font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
.reconciliation-timesheet-details { display:grid; gap:8px; margin:0; padding-left:20px; }
.reconciliation-timesheet-details strong { color:var(--theme-text); font-weight:650; }
.reconciliation-timesheet-control > button { grid-column:1 / -1; justify-self:start; margin:0; }
@media(max-width:700px) { .reconciliation-timesheet-control { grid-template-columns:minmax(0,1fr); gap:14px; padding:16px; } }

/* Focused migration workflows and consistent attachment controls. */
.migration-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; padding: 6px; border: 1px solid var(--theme-line); border-radius: 12px; background: var(--theme-blue-surface); }
.migration-tabs button { flex: 1 1 210px; border: 0; border-radius: 8px; padding: 14px 18px; background: transparent; color: var(--theme-text); font: inherit; font-weight: 650; cursor: pointer; }
.migration-tabs button[aria-selected=true] { background: var(--theme-surface); color: var(--theme-rose-text); box-shadow: 0 2px 6px #14203312; }
.migration-tabs button:focus-visible, .file-drop:focus-within { outline: 2px solid #a41646; outline-offset: 3px; }
#migrationStatus { color: var(--theme-text); }
#migrationUpload { display: grid; grid-template-columns: minmax(0, 1fr); }
.file-drop { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; width: 100%; min-width: 0; padding: 16px; box-sizing: border-box; border: 1px dashed var(--theme-line); border-radius: 12px; background: var(--theme-blue-surface); color: var(--theme-text); text-align: left; }
.file-drop.is-dragging { border-color: var(--theme-rose-line); background: var(--theme-rose-surface); }
.file-drop.is-uploading { cursor: progress; }
.file-drop__icon { display: grid; grid-column: 1; grid-row: 1 / 3; place-items: center; width: 36px; height: 36px; border: 1px solid var(--theme-rose-line); border-radius: 50%; color: var(--theme-rose-text); font-size: 22px; }
.file-drop h3 { grid-column: 2; grid-row: 1; min-width: 0; margin: 0; font-size: 15px; line-height: 1.4; color: var(--theme-text); overflow-wrap: anywhere; }
.file-drop p { grid-column: 2 / -1; margin: 0; min-width: 0; max-width: 100%; overflow-wrap: anywhere; line-height: 1.5; font-size: 12px; color: var(--theme-muted); }
.file-drop p.file-drop__hint { grid-column: 2; grid-row: 2; }
.file-drop .browse-button { grid-column: 3; grid-row: 1 / 3; justify-self: end; width: 148px; min-width: 0; max-width: 100%; min-height: 36px; margin: 0; padding: 8px 13px; font-size: 12px; }
.file-drop .file-drop__selection { margin-top: 4px; color: var(--theme-text); font-weight: 600; }
.file-drop :is(.file-drop__error, .upload-message) { color: var(--theme-rose-text); }
.file-drop .upload-message.is-success { color: var(--theme-green-text); }
.file-drop :is(.file-drop__error, .upload-message):empty { display: none; }
.receipt-upload { grid-column: 1 / -1; min-width: 0; }
.reconciliation-evidence-upload > .file-drop { margin-top: 12px; }
@media (max-width: 600px) {
  .file-drop { grid-template-columns: 32px minmax(0, 1fr); padding: 12px; gap: 6px 10px; }
  .file-drop__icon { width: 32px; height: 32px; }
  .file-drop .browse-button { grid-column: 2; grid-row: 3; justify-self: start; }
  .migration-tabs button { flex-basis: 100%; }
}

.migration-unmatched-link { white-space: normal; color: var(--theme-amber-text); }
.migration-matched-count { flex: 0 0 auto !important; color: var(--theme-muted); font-size: 12px; }
.migration-unmatched-dialog { box-sizing: border-box; width: min(820px, calc(100vw - 32px)); max-height: 85dvh; margin: auto; padding: 24px; border: 1px solid var(--theme-line); border-radius: 18px; color: var(--theme-text); box-shadow: 0 24px 80px #10182840; overflow-y: auto; }
.migration-unmatched-dialog::backdrop { background: #10182899; backdrop-filter: blur(3px); }
.migration-unmatched-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.migration-unmatched-dialog h2 { margin: 0; font-size: 20px; }
.migration-unmatched-dialog p { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.migration-unmatched-record { border-top: 1px solid var(--theme-line); padding: 16px 0; }
.migration-unmatched-record h3, .migration-unmatched-record h4 { margin: 8px 0; }
.migration-unmatched-values { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 14px; font-size: 13px; }
.migration-unmatched-values dt { color: var(--theme-muted); }
.migration-unmatched-values dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .migration-unmatched-dialog { padding: 18px; } }

/* Compact legacy review table and source-linked balance editor. */
#migrationFilters { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 14px; padding: 18px; border: 1px solid var(--theme-line); border-radius: 12px; background: var(--theme-blue-surface); }
#migrationFilters label { min-width: 0; margin: 0; font-size: 12px; letter-spacing: 0; }
.migration-filter-workbook { grid-column: span 6; }
.migration-filter-sheet, .migration-filter-month { grid-column: span 3; }
.migration-filter-search { grid-column: span 9; }
.migration-filter-actions { grid-column: span 3; display: flex; gap: 8px; align-items: center; }
.migration-filter-actions button { flex: 1; min-height: 44px; }
#migrationFilters input, #migrationFilters select { height: 44px; padding: 8px 12px; }
.migration-records-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
.migration-records-toolbar p { margin: 0; font-weight: 650; }
.migration-records-toolbar a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; height: auto; box-sizing: border-box; text-decoration: none; }
.migration-review-tabs { margin-bottom: 12px; }
.migration-review-tabs button { flex-basis: 140px; padding: 10px 14px; }
.migration-filter-review { grid-column: span 6; }
.masterlist-review-summary { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.masterlist-review-summary h3 { margin: 0; }
.masterlist-review-summary p { font-weight: 500; }
.masterlist-review-table td > small { display: block; }
.masterlist-review-table td:last-child { white-space: nowrap; }
.masterlist-review-table .compact-button { min-height: 34px; padding: 6px 12px; }
.crew-review-badge { display: inline-flex; align-items: center; width: fit-content; padding: 4px 9px; border-radius: 999px; background: var(--theme-blue-surface); color: var(--theme-text); font-size: 12px; font-weight: 700; }
.crew-review-badge--updated { background: #fff; color: #151925; }
.crew-review-badge--held { background: var(--theme-rose-surface); color: var(--theme-rose-text); }
.crew-review-explanation { margin-top: 5px; color: var(--theme-muted); }
.migration-uploaded-workbooks { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--theme-line); }
.migration-uploaded-workbooks h3 { margin: 0 0 8px; font-size: 15px; }
.migration-uploaded-workbooks ul { margin: 0; padding: 0; list-style: none; }
.migration-uploaded-workbooks li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.migration-uploaded-workbooks li + li { border-top: 1px solid var(--theme-line); }
.migration-uploaded-workbooks li > div { min-width: 0; overflow-wrap: anywhere; }
.migration-uploaded-workbooks small { display: block; margin-top: 4px; color: var(--theme-muted); }
.migration-uploaded-workbook-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.migration-records-note { color: var(--theme-muted); font-size: 12px; }
.migration-records-scroll { max-height: 620px; max-height: min(65vh, 620px); overflow: auto; border: 1px solid var(--theme-line); border-radius: 12px; margin: 14px 0; }
.migration-records-scroll:focus-visible { outline: 2px solid #9e1741; outline-offset: 2px; }
.migration-records-table { width: 100%; min-width: 1100px; border-collapse: separate; border-spacing: 0; font-size: 13px; text-align: left; }
.migration-records-table th { position: sticky; top: 0; z-index: 1; background: var(--theme-blue-surface); padding: 12px 14px; border-bottom: 1px solid var(--theme-line); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--theme-muted); }
.migration-records-table td { padding: 14px; border-bottom: 1px solid var(--theme-line); vertical-align: top; color: var(--theme-text); }
.migration-records-table tr:last-child td { border-bottom: 0; }
.migration-records-table td:first-child { min-width: 190px; }
.migration-records-table td:nth-child(2) { white-space: nowrap; }
.migration-records-table td.migration-deduction-references { min-width: 225px; }
.migration-deduction-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.migration-deduction-list small { display: block; margin-top: 2px; color: var(--theme-muted); }
.migration-deduction-list + .migration-review-status { margin-top: 8px; }
.migration-deduction-details summary { cursor: pointer; font-weight: 650; }
.migration-deduction-details__values { margin: 5px 0 0; padding-left: 16px; color: var(--theme-muted); overflow-wrap: anywhere; }
.migration-worker-cell > span { font-weight: 650; }
.migration-worker-cell > small { display: block; margin-top: 4px; color: var(--theme-muted); }
.migration-record-actions { display: flex; flex-direction: column; align-items: start; gap: 8px; }
.migration-record-actions button { min-height: 36px; padding: 8px 10px; white-space: nowrap; }
.migration-record-dialog { box-sizing: border-box; width: min(1120px, calc(100vw - 32px)); max-height: 90dvh; margin: auto; overflow-y: auto; border: 1px solid var(--theme-line); border-radius: 18px; padding: 24px; color: var(--theme-text); box-shadow: 0 24px 80px #10182840; }
.migration-record-dialog::backdrop { background: #10182899; backdrop-filter: blur(3px); }
.migration-record-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.migration-record-dialog__header h2 { font-size: 20px; }
.migration-record-dialog__header button { flex: 0 0 auto; }
.migration-record-dialog > .masterlist-source-close { justify-content: flex-end; margin: 0 0 8px; }
.migration-record-dialog p { font-size: 13px; overflow-wrap: anywhere; }
.crew-workbook-editor { width: min(860px, calc(100vw - 32px)); }
.crew-workbook-editor .migration-record-dialog__header h2 { margin: 2px 0 0; overflow-wrap: anywhere; }
.crew-workbook-editor > p { margin: 8px 0 18px; text-align: center; color: var(--theme-muted); }
.crew-workbook-editor__overview { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--theme-line); border-radius: 10px; background: var(--theme-surface); }
.crew-workbook-editor__overview p, .crew-workbook-editor__identity p, .crew-workbook-editor__actions p { margin: 0; }
.crew-workbook-editor__overview ul { margin: 0; padding-inline-start: 18px; color: var(--theme-muted); font-size: 13px; }
.crew-workbook-editor__form, .crew-workbook-editor__fields { display: grid; gap: 10px; }
.crew-workbook-editor__form { margin-top: 16px; }
.crew-workbook-editor__status { display: grid; gap: 6px; width: min(280px, 100%); margin: 0; }
.crew-workbook-editor__status select { grid-area: 2 / 1; appearance: none; padding-inline-end: 2.75rem; }
.crew-workbook-editor__status::after { content: ''; grid-area: 2 / 1; align-self: center; justify-self: end; width: 8px; height: 8px; margin-inline-end: 1rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); pointer-events: none; }
@media (forced-colors: active) {
  .crew-workbook-editor__status select { appearance: auto; }
  .crew-workbook-editor__status::after { content: none; }
}
.crew-workbook-editor__identity { display: grid; gap: 6px; padding: 10px 14px; border: 1px solid var(--theme-line); border-radius: 10px; }
.crew-workbook-editor__identity[hidden] { display: none; }
.crew-workbook-editor__identity label { display: flex; align-items: center; gap: 8px; margin: 0; }
.crew-workbook-editor__identity input { width: auto; }
.crew-workbook-editor__evidence .migration-values { margin: 0 12px 12px; }
.crew-workbook-editor__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; padding-top: 8px; }
.crew-workbook-editor__actions p { margin-inline-end: auto; color: var(--theme-rose-text); }
.migration-review-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; }
.migration-source-values { min-width: 0; }
.migration-source-values .migration-values { grid-template-columns: minmax(100px, 1fr) minmax(0, 1.4fr); max-height: 55vh; font-size: 12px; padding: 14px; }
.migration-source-values dt { overflow-wrap: anywhere; }
.migration-opening-state { grid-column: 1 / -1; background: var(--theme-blue-surface); border-radius: 8px; padding: 12px; }
.migration-review-message { color: var(--theme-green-text); }
.migration-review-history { border-top: 1px solid var(--theme-line); margin-top: 18px; padding-top: 12px; }
@media (max-width: 850px) {
  .migration-filter-workbook, .migration-filter-search, .migration-filter-review { grid-column: span 12; }
  .migration-filter-sheet, .migration-filter-month, .migration-filter-actions { grid-column: span 6; }
  .migration-review-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  #migrationFilters { display: flex; flex-direction: column; align-items: stretch; padding: 12px; }
  .migration-record-dialog { padding: 16px; }
  .migration-opening { grid-template-columns: minmax(0, 1fr); }
}

.migration-opening-batch { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.migration-deduction-cards { display: flex; flex-direction: column; gap: 16px; }
.migration-deduction-card { padding: 16px; border: 1px solid var(--theme-line); border-radius: 12px; background: var(--theme-surface); }
.migration-deduction-card .migration-opening { margin: 0; }
.migration-deduction-card > button { min-height: 36px; margin-top: 8px; }
.migration-opening-summary { margin: 0; padding: 12px; border-radius: 8px; background: var(--theme-blue-surface); font-weight: 650; }
.migration-opening-batch > button { min-height: 44px; }

.migration-worker-link { border: 0; background: transparent; color: var(--theme-rose-text); padding: 0; min-height: 32px; text-align: left; text-decoration: underline; font-weight: 650; }
.migration-worker-search { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.migration-worker-search label { flex: 1 1 260px; margin: 0; }
.migration-worker-search input { min-height: 44px; }
.migration-worker-search button { min-height: 44px; }
.migration-worker-search + div { display: flex; flex-wrap: wrap; gap: 8px; }
.migration-worker-profile .worker-profile-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.migration-worker-profile > label { margin: 16px 0; }
@media (max-width: 600px) { .migration-worker-profile .worker-profile-field-grid { grid-template-columns: minmax(0, 1fr); } }

/* Page gutters align with the top bar; record and section headings remain visible. */
.page-heading-row > div,
.crew-payout-panel__heading > div { min-width: 0; }
.page-heading-row > div > p:last-child { line-height: 1.6; }
.migration-page > .page-heading { margin-bottom: 24px; }
.migration-page > .page-heading > .eyebrow { margin: 0 0 12px; color: var(--crimson); font-family: "SFMono-Regular", Consolas, monospace; font-size: 10.5px; letter-spacing: .08em; }
.migration-page > .page-heading > p:last-child { margin-bottom: 0; color: var(--theme-muted); font-size: 13.5px; line-height: 1.6; }
.crew-finance-filters { flex-shrink: 0; }
.crew-finance-filters > button { min-height: 44px; }
.crew-payslip-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 17px 17px; }
.crew-payslip-actions .compact-button { white-space: normal; line-height: 1.5; padding-top: 10px; padding-bottom: 10px; }
@media (max-width: 780px) {
  :root { --workspace-gutter: 20px; }
}
@media (max-width: 480px) {
  :root { --workspace-gutter: 16px; }
  .crew-finance-filters > label { flex: 1 1 100%; min-width: 0; }
  .crew-finance-filters input { width: 100%; min-width: 0; }
}

/* Legacy workbook preview: one scroll region keeps worksheet columns aligned. */
#migrationPreview > h3 { margin: 0 0 10px; font-size: 17px; overflow-wrap: anywhere; }
#migrationPreview > p { margin: 0 0 16px; color: var(--theme-muted); font-size: 13px; }
.migration-preview-scroll { max-height: min(460px, 60vh); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--theme-line); border-radius: 10px; }
.migration-preview-scroll:focus-visible { outline: 2px solid #a41646; outline-offset: 3px; }
.migration-preview-table { width: 100%; min-width: 850px; border-collapse: separate; border-spacing: 0; table-layout: fixed; text-align: left; color: var(--theme-text); font-size: 13px; }
.migration-preview-table th, .migration-preview-table td { padding: 12px 14px; border-bottom: 1px solid var(--theme-line); vertical-align: middle; overflow-wrap: anywhere; }
.migration-preview-table thead th { position: sticky; top: 0; z-index: 1; background: var(--theme-blue-surface); color: var(--theme-muted); font-size: 11px; font-weight: 750; }
.migration-preview-table th:first-child, .migration-preview-table td:first-child { width: 48px; padding: 12px; text-align: center; }
.migration-preview-table th:nth-child(2) { width: 24%; }
.migration-preview-table th:nth-child(3) { width: 85px; }
.migration-preview-table th:nth-child(4) { width: 205px; }
.migration-preview-table th:nth-child(5) { width: 280px; }
.migration-preview-table th:nth-child(6) { width: 110px; }
.migration-preview-table tbody th { font-weight: 650; }
.migration-preview-table tbody tr:last-child > * { border-bottom: 0; }
.migration-preview-table tbody tr.is-selected { background: var(--theme-rose-surface); }
.migration-preview-table input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--crimson); cursor: pointer; vertical-align: middle; }
.migration-preview-table .migration-preview-count { font-variant-numeric: tabular-nums; }
.migration-preview-table .migration-unmatched-link { min-height: 36px; padding: 8px 10px; font-size: 12px; line-height: 1.4; }
.migration-preview-table .migration-month-control__fields { grid-template-columns: minmax(0, 1fr) 72px; }
.migration-preview-table .migration-month-control input, .migration-preview-table .migration-month-control select { min-height: 38px; padding: 8px; font-size: 12px; }
.migration-preview-table .migration-month-control p { margin: 6px 0 0; font-size: 11px; line-height: 1.4; }
.migration-preview-table .migration-month-control p:empty { display: none; }
.migration-preview-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 16px; }
.migration-preview-summary { margin: 0; color: var(--theme-text); font-size: 13px; font-weight: 650; }
.migration-preview-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.migration-preview-actions button { min-height: 44px; padding: 10px 16px; white-space: normal; line-height: 1.4; }
.migration-card .migration-confirm-button { border-color: var(--crimson-deep); background: var(--crimson); color: var(--theme-text); }
.migration-card .migration-confirm-button:hover:not(:disabled) { background: var(--crimson-deep); }
.migration-card .migration-confirm-button:disabled { background: var(--theme-rose-surface); border-color: var(--theme-rose-line); color: var(--theme-rose-text); opacity: 1; cursor: not-allowed; }
@media (max-width: 600px) {
  .migration-preview-actions { width: 100%; }
  .migration-preview-actions button { flex: 1 1 180px; }
}

.migration-records-pagination { justify-content: flex-end; margin-top: 16px; gap: 8px; }
.migration-records-pagination:empty { display: none; }
.migration-records-pagination button { min-height: 40px; }
.migration-review-status { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.migration-review-status--pending { color: var(--theme-rose-text); background: var(--theme-rose-surface); }
.migration-review-status--reviewed { color: var(--theme-green-text); background: var(--theme-green-surface); }

.migration-bulk-dialog { width: min(760px, calc(100vw - 32px)); }
.migration-bulk-workbook { font-weight: 700; }
.migration-bulk-counts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; margin: 20px 0; border: 1px solid var(--theme-line); border-radius: 10px; overflow: hidden; }
.migration-bulk-counts dt, .migration-bulk-counts dd { margin: 0; padding: 12px; border-bottom: 1px solid var(--theme-blue-line); font-size: 13px; }
.migration-bulk-counts dd { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.migration-bulk-counts dt:first-child, .migration-bulk-counts dd:nth-child(2) { background: var(--theme-green-surface); color: var(--theme-green-text); font-weight: 700; }
.migration-bulk-counts dt:nth-last-child(2), .migration-bulk-counts dd:last-child { border-bottom: 0; }
.migration-bulk-alert { padding: 14px; border: 1px solid var(--theme-rose-line); border-radius: 10px; background: var(--theme-rose-surface); color: var(--theme-rose-text); }

.worker-preview__header { flex-wrap: wrap; gap: 10px; }
.worker-preview__header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.worker-preview__header-actions .compact-button { min-height: 34px; padding: 7px 10px; font-size: 11px; }
.worker-preview__list > div > span:last-child { min-width: 0; }
.migration-worker-profile { margin-top: 16px; }
@media (max-width: 600px) {
  .worker-preview__header-actions { width: 100%; justify-content: space-between; }
}

.review-master-guard { padding: 12px 14px; margin: 16px 0; border: 1px solid var(--theme-green-line); border-radius: 10px; background: var(--theme-green-surface); color: var(--theme-green-text); font-size: 12px; line-height: 1.6; }
.review-master-guard.is-blocking { border-color: var(--theme-rose-line); background: var(--theme-rose-surface); color: var(--theme-rose-text); }
.worker-preview__list > div.has-blocker { background: var(--theme-rose-surface); box-shadow: inset 3px 0 #b42345; }
#confirmReviewButton:disabled { background: var(--theme-inset); color: var(--theme-muted); cursor: not-allowed; }
.draft-master-choice { margin: 18px 0; padding: 16px; border: 1px solid var(--theme-blue-line); border-radius: 10px; background: var(--theme-blue-surface); }
.draft-master-choice h4 { margin: 0 0 10px; }
.draft-master-choice label { display: grid; gap: 7px; margin: 12px 0; color: var(--theme-text); }
.draft-master-choice input { min-height: 40px; width: 100%; padding: 8px 10px; border: 1px solid var(--theme-blue-line); border-radius: 8px; color: var(--theme-text); background: var(--theme-surface); }

/* Worker payroll: labelled controls, compact tabs and consistent contrast. */
#paymentDetail .payment-editor { display: block; min-width: 0; }
.payment-editor-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; margin-bottom: 4px; }
.payment-editor-tab { flex: 0 0 auto; min-height: 44px; padding: 10px 15px; border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-surface); color: var(--theme-text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.payment-editor-tab[aria-selected="true"] { background: #172238; color: var(--theme-text); border-color: var(--theme-line); }
.payment-editor-tab:focus-visible { outline: 3px solid #7e9ac4; outline-offset: 2px; }
#paymentDetail .payment-editor__section { padding: 20px; }
#paymentDetail .payment-editor__section h3 { font-size: 16px; margin-bottom: 8px; }
#paymentDetail .payment-editor__section > p, #paymentDetail .payment-editor__section label, .deduction-ledger label { color: var(--theme-text); font-size: 12px; line-height: 1.5; letter-spacing: normal; text-transform: none; }
#paymentDetail .payment-editor__section label { display: grid; gap: 6px; min-width: 0; }
#paymentDetail .payment-editor input, #paymentDetail .payment-editor select, #paymentDetail .payment-editor textarea, .deduction-ledger input, .deduction-ledger select, .deduction-ledger textarea { min-width: 0; width: 100%; min-height: 44px; margin-top: 0; padding: 10px 12px; border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-surface); color: var(--theme-text); font-size: 13px; }
#paymentDetail .payment-editor textarea, .deduction-ledger textarea { resize: vertical; min-height: 74px; }
#paymentDetail .payment-editor input::placeholder, #paymentDetail .payment-editor textarea::placeholder { color: var(--theme-muted); opacity: 1; }
#paymentDetail .payment-editor__section label > small[data-statutory-source] { color: var(--theme-text); font-size: 11px; }
#paymentDetail .payment-profile-grid span, #paymentDetail .payment-totals-grid span, #paymentDetail .payment-totals-grid small { color: var(--theme-text); font-size: 11px; }
#paymentDetail .payment-totals-grid > .is-primary span, #paymentDetail .payment-totals-grid > .is-primary small { color: var(--theme-text); }
#paymentDetail .payment-profile-grid strong { font-size: 13px; }
.payment-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.payment-fields-grid .field-span { grid-column: 1 / -1; }
.payment-hostel-collection { margin:16px 0; align-items:end; }
.payment-hostel-collection__carry { display:grid; gap:6px; padding:10px 0; color:var(--theme-text); font-size:13px; }
.payment-hostel-collection__carry strong { font-size:18px; font-variant-numeric:tabular-nums; }
#paymentDetail .payment-editor__section .payment-hostel-waiver { display:flex; align-items:center; gap:10px; min-height:44px; }
.payment-line__category { display:grid; gap:12px; min-width:0; }
#paymentDetail .payment-line--adjustment { grid-template-columns: minmax(140px, 1fr) minmax(100px, .6fr) minmax(180px, 1.5fr) auto; align-items: start; gap: 12px; margin-bottom: 16px; }
#paymentDetail .payment-line--prior { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 12px; margin-bottom: 16px; }
#paymentDetail .payment-editor__section .payment-line__confirmation { grid-column: 1 / -1; display: flex; align-items: center; }
#paymentDetail .payment-line__confirmation input { width: 20px; min-height: 20px; height: 20px; flex: 0 0 auto; }
#paymentDetail .payment-line .payment-line__remove { min-height: 44px; padding: 10px 14px; justify-self: start; color: var(--theme-rose-text); }
#paymentDetail .payment-add-line { min-height: 44px; padding: 10px 16px; border-style: solid; font-size: 13px; }
#paymentDetail .deduction-ledger { padding: 0; border: 0; border-top: 1px solid var(--theme-line); padding-top: 20px; margin-top: 20px; background: transparent; }
.deduction-charge-form, .deduction-receipt-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.deduction-charge-form > button, .deduction-receipt-form > button { min-height: 44px; padding: 10px 16px; justify-self: start; }
.deduction-receipt-form .receipt-upload { grid-column: 1 / -1; grid-row: 2; }
.deduction-ledger input[type="checkbox"] { width: 20px; min-height: 20px; padding: 0; }
#paymentDetail .payment-editor__section .deduction-receipt-item { display: flex; align-items: center; gap: 10px; }
#paymentDetail .payment-editor input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; flex: 0 0 auto; margin: 0; padding: 0; }
.deduction-ledger, .deduction-ledger h4, .deduction-ledger summary { color: var(--theme-text); }
.deduction-ledger h4 { font-size: 14px; }
.deduction-ledger .deduction-receipt-item a { color: var(--theme-text); }
.payment-attendance-details { min-width: 0; border: 1px solid var(--theme-line); border-radius: 10px; overflow: hidden; }
.payment-attendance-details > summary { padding: 16px; cursor: pointer; color: var(--theme-text); font-size: 13px; }
.payment-attendance-details > summary span { margin-left: 12px; color: var(--theme-text); }
.payment-save-area { margin: 0; }
.payment-save-message { margin: 0; color: var(--theme-text); font-size: 13px; white-space: pre-wrap; }
.payment-save-message:empty { display: none; }
.payment-save-message.is-success { color: var(--theme-green-text); }
.payment-save-message.is-error { color: var(--theme-rose-text); }
@media (max-width: 900px) {
  #paymentDetail .payment-line--adjustment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .payment-fields-grid, .deduction-charge-form, .deduction-receipt-form, #paymentDetail .payment-line--adjustment, #paymentDetail .payment-line--prior { grid-template-columns: minmax(0, 1fr); }
  #paymentDetail .payment-editor__section { padding: 14px; }
  .payment-attendance-details > summary span { display: block; margin: 6px 0 0; }
}

/* Private payslip delivery and recipient review. */
.payslip-delivery-dialog { width: min(980px, calc(100vw - 32px)); }
.payslip-delivery-content { display: grid; gap: 16px; color: var(--theme-text); font-size: 13px; }
.payslip-delivery-content p { margin: 0; line-height: 1.6; }
.payslip-email-preview { max-height: 420px; overflow: auto; }
.payslip-email-preview .crew-payout-table { min-width: 0; table-layout: fixed; white-space: normal; }
.payslip-email-preview th, .payslip-email-preview td { overflow-wrap: anywhere; }
.payslip-email-preview td.payslip-delivery-ready { color: var(--theme-green-text); }
.payslip-email-preview td.payslip-delivery-error { color: var(--theme-rose-text); }
.payslip-delivery-ready { color: var(--theme-green-text); }
.payslip-delivery-error { color: var(--theme-rose-text); }
.payslip-delivery-confirmation { display: flex; align-items: start; gap: 10px; color: var(--theme-text); }
.payslip-delivery-confirmation input { width: 20px; height: 20px; flex: 0 0 auto; }
.payslip-link-field { display: grid; gap: 8px; color: var(--theme-text); }
.payslip-link-field textarea { width: 100%; border: 1px solid var(--theme-line); border-radius: 8px; padding: 12px; font: inherit; color: var(--theme-text); overflow-wrap: anywhere; }
.crew-payslip-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Worker payroll approval checklist and focused reviews. */
.payment-review-notice {
  padding: 18px;
  border: 1px solid var(--theme-line);
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 13px;
}
.payment-review-notice > h3 { margin: 0 0 6px; color: var(--theme-text); font-size: 17px; }
.payment-review-checklist__summary { margin: 0 0 14px; color: var(--theme-text); }
.payment-review-checklist { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: payroll-review; }
.payment-review-checklist__item { display: grid; grid-template-columns: 28px minmax(0, 1fr) 176px 148px; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--theme-line); counter-increment: payroll-review; }
.payment-review-checklist__item::before { grid-column: 1; grid-row: 1; align-self: start; margin-top: 2px; content: counter(payroll-review); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--theme-raised); color: var(--theme-text); font-weight: 700; }
.payment-review-checklist__item > div { grid-column: 2; grid-row: 1; min-width: 0; }
.payment-review-checklist__item strong { display: block; color: var(--theme-text); font-size: 14px; overflow-wrap: anywhere; }
.payment-review-checklist__item p { margin: 5px 0 0; color: var(--theme-text); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.payment-review-checklist__badge { grid-column: 3; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 32px; box-sizing: border-box; text-align: center; line-height: 1.4; padding: 5px 9px; border-radius: 6px; background: var(--theme-raised); color: var(--theme-text); font-size: 11px; font-weight: 700; }
.payment-review-checklist__item.is-blocking .payment-review-checklist__badge { background: var(--theme-rose-surface); color: var(--theme-rose-text); }
.payment-review-checklist__item .compact-button { grid-column: 4; grid-row: 1; width: 100%; min-height: 44px; align-self: center; white-space: normal; line-height: 1.4; }
.payment-review-dialog { width: min(900px, calc(100vw - 32px)); margin: auto; color: var(--theme-text); }
.payment-review-dialog.payment-review-dialog--compact { width:min(560px,calc(100vw - 32px)); }
.payment-review-dialog .payment-dialog__card { padding:28px; }
.payment-review-dialog__header { display: flex; align-items: start; justify-content: center; gap: 16px; text-align:center; }
.payment-review-dialog__header h2 { margin: 0; color: var(--theme-text); font-size: 21px; line-height: 1.4; overflow-wrap: anywhere; }
.payment-review-dialog__context { margin: 16px 0 12px; color: var(--theme-text); font-weight: 600; text-align:center; overflow-wrap:anywhere; }
.payment-review-dialog__description { margin:0; text-align:center; }
.payment-review-dialog .payment-dialog__card > p { font-size: 14px; line-height: 1.65; }
.payment-review-dialog__content { min-width: 0; }
.payment-review-dialog__content > .payment-editor__section { margin: 16px 0; }
.payment-review-dialog__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.payment-review-dialog .payment-save-message { margin-top:16px; text-align:center; }
.payment-review-dialog__actions .compact-button, .payment-review-dialog__header .compact-button { min-height: 44px; }
.payment-review-dialog__content > label { display: grid; gap: 8px; color: var(--theme-text); font-size: 14px; }
.payment-review-dialog__content > label select { min-width: 0; width: 100%; min-height: 44px; padding: 10px; border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-surface); color: var(--theme-text); }
.payment-net-review { margin:20px 0; padding:18px; border:1px solid var(--theme-line); border-radius:10px; color:var(--theme-text); min-width:0; }
.payment-net-review h3 { margin:0 0 14px; font-size:16px; }
.payment-net-review__dates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 18px; margin:0 0 18px; font-size:13px; }
.payment-net-review__dates > div:last-child { grid-column:1 / -1; }
.payment-net-review__dates dt { color:var(--theme-muted); margin-bottom:4px; }
.payment-net-review__dates dd { margin:0; color:var(--theme-text); overflow-wrap:anywhere; }
.payment-net-review__table { width:100%; min-width:0; border-collapse:collapse; font-size:13px; line-height:1.5; }
.payment-net-review__table :is(th,td) { padding:9px 0; border-bottom:1px solid var(--theme-line); text-align:left; overflow-wrap:anywhere; }
.payment-net-review__table th { font-weight:500; }
.payment-net-review__table :is(th,td):last-child { text-align:right; padding-left:16px; font-variant-numeric:tabular-nums; }
.payment-net-review__table .is-deduction th { padding-left:12px; }
.payment-net-review__table :is(.is-subtotal,.is-net) :is(th,td) { font-weight:700; }
.payment-net-review__table .is-net :is(th,td) { border-bottom:0; font-size:16px; padding-top:14px; }
.payment-net-review__table .is-negative td { color:var(--theme-rose-text); }
.payment-deduction-breakdown { max-width: 42rem; margin: 12px 0 18px; }
.payment-deductions-button {
  appearance: none;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  white-space: nowrap;
  cursor: pointer;
}
.payment-deductions-button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.payroll-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 1000px) {
  .payment-review-checklist__item { grid-template-columns: 28px minmax(0, 1fr) 148px; gap: 8px 10px; }
  .payment-review-checklist__badge { grid-column: 2; grid-row: 2; justify-self: start; width: fit-content; max-width: 100%; }
  .payment-review-checklist__item .compact-button { grid-column: 3; grid-row: 1 / 3; }
}
@media (max-width: 600px) {
  .payment-review-notice { padding: 14px; }
  .payment-review-checklist__item { grid-template-columns: 28px minmax(0, 1fr); }
  .payment-review-checklist__item .compact-button { grid-column: 2; grid-row: 3; justify-self: start; width: min(148px, 100%); }
  .payment-review-dialog .payment-dialog__card { padding: 18px; }
  .payment-review-dialog__header h2 { font-size: 18px; }
  .payment-review-dialog__actions { flex-direction: column; align-items: stretch; }
  .payment-net-review { padding:14px; }
  .payment-net-review__dates { grid-template-columns:minmax(0,1fr); }
}

.reconciliation-decision-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.reconciliation-decision-choices legend { margin-bottom: 10px; padding: 0; color: var(--theme-text); font-size: 14px; font-weight: 700; }
.reconciliation-decision-option { display: flex; align-items: start; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--theme-blue-line); border-radius: 9px; background: var(--theme-surface); color: var(--theme-text); }
label.reconciliation-decision-option { cursor: pointer; }
.reconciliation-decision-option input[type=radio] { flex: 0 0 20px; width: 20px; height: 20px; margin: 2px 0 0; padding: 0; accent-color: #a41646; }
.reconciliation-decision-option strong { display: block; color: var(--theme-text); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.reconciliation-decision-option small { display: block; margin-top: 4px; color: var(--theme-text); font-size: 12px; font-weight: 400; line-height: 1.6; }
.reconciliation-decision-option.is-selected { border-color: var(--theme-rose-line); background: var(--theme-rose-surface); }
.reconciliation-decision-option:focus-within { outline: 2px solid #a41646; outline-offset: 2px; }

.reconciliation-list-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.reconciliation-list-actions .compact-button { min-height: 44px; }
.reconciliation-bulk-dialog { width: min(1180px, calc(100vw - 32px)); max-height: 90dvh; margin: auto; color: var(--theme-text); }
.reconciliation-bulk-header { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.reconciliation-bulk-header h2 { margin: 0; color: var(--theme-text); font-size: 22px; }
.reconciliation-bulk-context { color: var(--theme-text); font-weight: 700; overflow-wrap: anywhere; }
.reconciliation-bulk-dialog p { font-size: 13px; line-height: 1.6; }
.reconciliation-bulk-dialog input[type=checkbox] { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: #a41646; }
.reconciliation-bulk-results { display: grid; gap: 14px; }
.reconciliation-bulk-results:empty { display: none; }
.reconciliation-bulk-select-all { display: flex; align-items: start; gap: 10px; min-height: 44px; color: var(--theme-text); font-size: 14px; line-height: 1.6; }
.reconciliation-bulk-table-wrap { overflow: auto; max-height: 45dvh; border: 1px solid var(--theme-line); border-radius: 10px; }
.reconciliation-bulk-table-wrap table { min-width: 850px; width: 100%; }
.reconciliation-bulk-table-wrap th { position: sticky; top: 0; z-index: 1; background: var(--theme-blue-surface); }
.reconciliation-bulk-table-wrap td { vertical-align: top; white-space: normal; min-width: 155px; overflow-wrap: anywhere; }
.reconciliation-bulk-table-wrap td:first-child { min-width: 55px; }
.reconciliation-bulk-table-wrap .is-ready { color: var(--theme-green-text); }
.reconciliation-bulk-table-wrap .is-unavailable { color: var(--theme-rose-text); }
.reconciliation-bulk-results > button { justify-self: end; min-height: 44px; }
@media (max-width: 600px) {
  .reconciliation-list-actions { justify-content: flex-start; }
  .reconciliation-bulk-dialog .payment-dialog__card { padding: 18px; }
  .reconciliation-bulk-header h2 { font-size: 19px; }
  .reconciliation-bulk-results > button { justify-self: stretch; }
}
.reconciliation-panel-heading { flex-wrap: wrap; }
.reconciliation-list-actions { min-width: 0; max-width: 100%; }
.reconciliation-bulk-table-wrap table { font-size: 13px; line-height: 1.6; }
.reconciliation-bulk-table-wrap th { font-size: 11px; }
.reconciliation-bulk-table-wrap td > span, .reconciliation-bulk-table-wrap td > small { display: block; }
.reconciliation-bulk-table-wrap td > small { margin-top: 4px; color: var(--theme-muted); font-size: 12px; }

/* Finance sections share readable controls and retain mounted fields across tabs. */
.crew-payout-panel { color: var(--theme-text); min-width: 0; }
.crew-payout-panel > .crew-payout-message:empty { display: none; }
.crew-finance-tabs { min-width: 0; }
.crew-finance-tabs__list { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin: 20px 0 16px; border: 1px solid var(--theme-blue-line); border-radius: 12px; background: var(--theme-blue-surface); }
.crew-finance-tab { flex: 1 1 160px; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--theme-text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.crew-finance-tab[aria-selected="true"] { border-color: var(--theme-line); background: #172238; color: var(--theme-text); box-shadow: 0 2px 5px #17223818; }
.crew-finance-tab:hover:not([aria-selected="true"]) { background: var(--theme-surface); }
.crew-finance-tabs__panel { min-width: 0; }
.crew-finance-tabs__panel[hidden], .crew-payout-selection tr[hidden] { display: none; }
.crew-finance-tabs__panel > section { margin-top: 0; }
.crew-payslip-filters { display:grid; grid-template-columns:minmax(180px,1fr) minmax(180px,.8fr) minmax(220px,1.4fr); gap:14px; padding:0 20px 12px; }
.crew-payslip-filters label { display:grid; gap:6px; min-width:0; color:var(--theme-text); font-size:13px; font-weight:650; }
.crew-payslip-filters :is(input,select) { width:100%; min-width:0; min-height:40px; padding:9px 12px; border:1px solid var(--theme-line); border-radius:8px; background:var(--theme-surface); color:var(--theme-text); font:inherit; }
.crew-payslip-result-count { margin:0; padding:0 20px 14px; color:var(--theme-text); font-size:13px; }
#appraisal-reports .data-card__header h2 { margin: 0; font-size: 18px; }
#appraisal-reports .data-card__header p { max-width: 72ch; margin: 6px 0 0; color: var(--theme-muted); line-height: 1.5; }
#appraisal-reports .crew-payslip-filters { padding-top: 14px; }
.appraisal-report-summary { padding: 2px 20px 14px; }
.appraisal-report-summary__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 10px;
  font-size: 13px;
}
.appraisal-report-summary__controls label { display: inline-flex; align-items: center; gap: 8px; }
.appraisal-report-summary__controls input { width: 16px; height: 16px; margin: 0; }
.appraisal-report-summary__controls label:has(input:disabled) { color: var(--theme-muted); }
.appraisal-report-summary .calculation-summary { margin: 0; }
.appraisal-report-summary .calculation-summary__card > span,
.appraisal-report-summary .calculation-summary__card > small { font-size: 11px; }
.appraisal-report-summary .calculation-summary__card > strong { white-space: normal; overflow-wrap: anywhere; }
@media (min-width: 801px) and (max-width: 1099px) {
  #appraisal-reports .crew-payslip-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #appraisal-reports .crew-payslip-filters label:last-child { grid-column: span 2; }
}
@media (min-width: 1100px) {
  #appraisal-reports .crew-payslip-filters {
    grid-template-columns: minmax(0, .85fr) minmax(0, .7fr) minmax(0, 1.15fr) minmax(0, .85fr) minmax(0, 1.3fr);
  }
}
@media (max-width: 480px) { .appraisal-report-summary { padding-inline: 16px; } }
#appraisalReportMessage.is-error { color: var(--theme-rose-text); }
.appraisal-report-table :is(th, td):nth-child(n+2):not(:last-child) { text-align: right; font-variant-numeric: tabular-nums; }
.appraisal-report-table :is(th, td):first-child,
.appraisal-report-table :is(th, td):last-child { white-space: normal; }
.appraisal-report-table tfoot :is(th, td) { background: var(--theme-blue-surface); border-top: 1px solid var(--theme-line); font-weight: 700; }
.appraisal-report-outlet-button { appearance: none; min-height: 24px; padding: 4px 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 650; text-align: left; text-decoration: underline; text-underline-offset: 0.2em; }
.appraisal-report-outlet-button:hover { color: var(--theme-muted); }
.appraisal-report-outlet-button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.appraisal-report-outlet-button[aria-pressed="true"] { color: var(--theme-rose-text); }
.appraisal-report-workers-dialog .appraisal-report-table { min-width: 680px; }
.appraisal-report-worker-detail h3 { margin: 0 0 8px; }
.appraisal-report-comparison { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.appraisal-report-comparison small:empty { display: none; }
@media (max-width: 680px) { .appraisal-report-comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.payslip-delivery-dialog .crew-payslip-actions .compact-button { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:8px 13px; border:1px solid rgba(255,255,255,.65); border-radius:8px; background:#fff; color:#111; font-size:12px; font-weight:700; line-height:1.4; text-decoration:none; }
@media(max-width:800px) { .crew-payslip-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } .crew-payslip-filters label:last-child { grid-column:1/-1; } }
@media(max-width:480px) { .crew-payslip-filters { grid-template-columns:1fr; padding:0 16px 12px; } .crew-payslip-result-count { padding:0 16px 12px; } }
.crew-payout-panel .crew-payout-panel__heading p:last-child,
.crew-payout-panel .crew-payout-section__heading p,
.crew-payout-panel .crew-payout-card__heading p,
.crew-payout-panel .crew-payout-batch__header p,
.crew-payout-panel .crew-invoice-card > p,
.crew-payout-panel .crew-payout-empty,
.crew-payout-panel .crew-payout-readiness,
.crew-payout-panel .crew-invoice-form__note { color: var(--theme-text); font-size: 13px; line-height: 1.6; }
.crew-payout-panel .crew-payout-muted,
.crew-payout-panel .crew-payout-card__count,
.crew-payout-panel .crew-payout-table td > small,
.crew-payout-panel .crew-payout-summary small { color: var(--theme-text); font-size: 12px; }
.crew-payout-panel .crew-payout-summary span { color: var(--theme-text); font-size: 11px; }
.crew-payout-panel .crew-payout-summary strong { font-size: 24px; }
.crew-payout-panel .crew-payout-card__heading,
.crew-payout-panel .crew-payout-section__heading { padding: 20px; align-items: center; }
.crew-payout-panel .crew-payout-table-wrap { max-width: 100%; max-height: 560px; overflow: auto; }
.crew-payout-panel .crew-payout-table th { position: sticky; top: 0; z-index: 1; padding: 13px 16px; color: var(--theme-text); font-size: 11px; }
.crew-payout-panel .crew-payout-table td { padding: 14px 16px; color: var(--theme-text); font-size: 13px; white-space: normal; line-height: 1.5; }
.crew-payout-panel .crew-payout-table td:first-child { min-width: 200px; }
.crew-payout-panel .crew-payout-status { font-size: 11px; line-height: 1.4; }
.crew-payout-panel .compact-button,
.crew-payout-panel .view-button,
.crew-payout-panel .crew-payout-document-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; padding: 10px 16px; border-radius: 8px; font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1.4; text-align: center; white-space: normal; vertical-align: middle; text-decoration: none; }
.crew-payout-panel .view-button,
.crew-payout-panel .crew-payout-document-link { border: 1px solid var(--theme-line); background: var(--theme-surface); color: var(--theme-text); }
.crew-payout-panel .crew-payout-document-link { margin: 3px; }
.crew-payout-panel .crew-payout-danger-button,
.crew-payout-panel .crew-payout-hold-button { border-color: var(--theme-rose-line); color: var(--theme-rose-text); }
.crew-payout-panel .crew-payout-confirm-button { border-color: var(--theme-green-line); background: var(--theme-green-surface); color: var(--theme-green-text); }
.crew-payout-panel button:disabled { cursor: not-allowed; opacity: .6; }
.crew-payout-panel .crew-payout-row-actions,
.crew-payout-panel .crew-payout-batch__actions { flex-wrap: wrap; }
.crew-payout-panel .crew-payout-selection { display: grid; gap: 14px; margin: 0; padding: 20px; border-top: 1px solid var(--theme-blue-line); }
.crew-payout-panel .crew-payout-selection__toolbar,
.crew-payout-panel .crew-payout-selection__fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 16px; }
.crew-payout-panel .crew-payout-selection label,
.crew-payout-panel .crew-payout-submission-form label,
.crew-payout-panel .crew-invoice-form label { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; color: var(--theme-text); font-size: 13px; font-weight: 650; line-height: 1.5; letter-spacing: normal; text-transform: none; }
.crew-payout-panel .crew-payout-selection .crew-payout-check,
.crew-payout-panel .crew-invoice-form .crew-invoice-confirmation { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; }
.crew-payout-panel .crew-payout-selection input:not([type="checkbox"]),
.crew-payout-panel .crew-payout-selection select,
.crew-payout-panel .crew-payout-submission-form input,
.crew-payout-panel .crew-invoice-form :is(input:not([type="checkbox"]), select, textarea) { display: block; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-surface); color: var(--theme-text); font: inherit; font-size: 14px; }
.crew-payout-panel input[type="checkbox"] { flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; margin: 0; accent-color: #a41646; }
.crew-payout-panel .crew-payout-selection__table { max-height: 360px; border: 1px solid var(--theme-blue-line); border-radius: 8px; }
.crew-payout-panel .crew-payout-table--selection { min-width: 640px; }
.crew-payout-panel .crew-payout-table--selection td:first-child { min-width: 60px; width: 60px; }
.crew-payout-panel .crew-payout-selection .crew-payout-readiness { margin: 0; }
.crew-payout-panel .crew-payout-selection > p { margin: 0; color: var(--theme-text); font-size: 13px; }
.crew-payout-panel .crew-payout-selection > button { justify-self: end; }
.crew-payout-panel .crew-payout-batch-list { padding: 0 20px 20px; }
.crew-payout-panel .crew-payout-batch__header { gap: 16px; padding: 18px; }
.crew-payout-panel .crew-payout-batch__title-line { flex-wrap: wrap; }
.crew-payout-panel .crew-payout-batch > .crew-payout-document-link { margin: 14px 18px; }
.crew-payout-panel .crew-payout-submission-form { padding: 18px; }
.crew-payout-panel .crew-invoice-layout {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 940px), 1fr));
  align-items: start;
  padding: 0 20px 20px;
}
.crew-payout-panel .crew-invoice-card { padding: 20px; }
.crew-payout-panel .crew-invoice-history { container: invoice-history / inline-size; }
.crew-payout-panel .crew-invoice-history .crew-invoice-history__scroll-hint { display: none; color: var(--theme-muted); font-size: 12px; }
.crew-payout-panel .crew-invoice-card .crew-payout-table-wrap,
.crew-payout-panel .crew-invoice-card .crew-payout-empty { margin: 16px -20px -20px; }
.crew-payout-panel .crew-invoice-history .crew-payout-table-wrap { max-width: none; }
.crew-payout-panel .crew-invoice-table { min-width: 920px; }
.crew-payout-panel .crew-invoice-table :is(th, td) { vertical-align: top; }
.crew-payout-panel .crew-invoice-table :is(th, td):nth-child(1) { min-width: 190px; }
.crew-payout-panel .crew-invoice-table :is(th, td):nth-child(2) { min-width: 155px; }
.crew-payout-panel .crew-invoice-table :is(th, td):nth-child(3) { text-align: center; }
.crew-payout-panel .crew-invoice-table :is(th, td):nth-child(4) { text-align: right; white-space: nowrap; }
.crew-payout-panel .crew-invoice-table :is(th, td):nth-child(5) { white-space: nowrap; }
.crew-payout-panel .crew-invoice-table :is(th, td):nth-child(6) { min-width: 110px; }
.crew-payout-panel .crew-invoice-table :is(th, td):nth-child(7) { min-width: 230px; }
.crew-payout-panel .crew-invoice-table td:first-child > span { font-weight: 700; }
.crew-payout-panel .crew-invoice-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; }
.crew-payout-panel .crew-invoice-actions :is(.compact-button, .crew-payout-document-link) {
  min-height: 36px;
  margin: 0;
  padding: 7px 10px;
  font-size: 12px;
  white-space: nowrap;
}
@container invoice-history (max-width: 880px) {
  .crew-payout-panel .crew-invoice-history .crew-invoice-history__scroll-hint { display: block; }
}
.crew-payout-panel .crew-invoice-card h4,
.crew-payout-panel .crew-payout-batch h4 { font-size: 16px; }
@media (max-width: 1200px) {
  .crew-payout-panel .crew-invoice-layout { grid-template-columns: 1fr; }
  .crew-payout-panel .crew-payout-section__heading { align-items: flex-start; flex-wrap: wrap; }
}
@media (max-width: 680px) {
  .crew-payout-panel .crew-payout-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crew-payout-panel .crew-payout-selection__toolbar,
  .crew-payout-panel .crew-payout-selection__fields { grid-template-columns: 1fr; }
  .crew-payout-panel .crew-payout-selection,
  .crew-payout-panel .crew-payout-card__heading,
  .crew-payout-panel .crew-payout-section__heading { padding: 16px; }
  .crew-payout-panel .crew-payout-section__actions { width: 100%; }
  .crew-payout-panel .crew-payout-section__actions > button { width: 100%; min-width: 0; }
  .crew-payout-panel .crew-payout-selection > button { justify-self: stretch; }
  .crew-finance-tab { flex-basis: 130px; }
}

.crew-payout-panel .crew-invoice-confirmation { color: var(--theme-text) !important; font-size: 13px !important; }
.crew-payout-panel .crew-invoice-form .crew-payout-boundary { color: var(--theme-text); font-size: 13px; line-height: 1.6; }

/* Payout tasks stay distinct; completed steps retain a compact, reopenable summary. */
.crew-payout-batches-layout { display:grid; gap:18px; min-width:0; }
.crew-payout-panel .crew-payout-batches-layout > .crew-payout-batch-list { gap:18px; padding:0; }
.crew-payout-panel .crew-payout-task { min-width:0; margin:0; border:1px solid var(--theme-line); border-radius:12px; overflow:hidden; background:var(--theme-surface); }
.crew-payout-panel .crew-payout-task > .crew-payout-task__heading { display:flex; flex-direction:row; align-items:center; gap:12px; margin:0; padding:16px 18px; color:var(--theme-text); }
.crew-payout-task__heading:focus-visible { outline:2px solid var(--theme-rose-text); outline-offset:-4px; border-radius:10px; }
.crew-payout-task__copy { flex:1; min-width:0; }
.crew-payout-task__title { display:block; font-size:16px; font-weight:750; line-height:1.4; }
.crew-payout-task__meta { display:block; margin-top:4px; color:var(--theme-muted); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.crew-payout-panel .crew-payout-task__body { display:grid; gap:14px; min-width:0; padding:16px; border-top:1px solid var(--theme-line); }
.crew-payout-panel .crew-payout-task__body > .crew-payout-selection { gap:12px; padding:0; border:0; }
.crew-payout-panel .crew-payout-task__body > .crew-payout-batch__actions { justify-content:flex-end; }
.crew-payout-panel .crew-payout-task__body .crew-payout-readiness { margin:0; padding:0; border:0; background:none; color:var(--theme-text); }
.crew-payout-panel .crew-payout-selection__footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:2px; }
.crew-payout-panel .crew-payout-selection__footer p { margin:0; font-size:13px; line-height:1.5; }
.crew-payout-panel .crew-payout-selection__footer button { flex:none; }
.crew-payout-panel .crew-payout-selection__note,
.crew-payout-panel .crew-payout-task__empty { margin:0; color:var(--theme-muted); font-size:13px; line-height:1.5; }
.crew-payout-panel .crew-payout-step { border-radius:9px; background:rgba(255,255,255,.025); }
.crew-payout-panel .crew-payout-step > .crew-payout-task__heading { padding:12px 14px; }
.crew-payout-step .crew-payout-task__title { font-size:14px; }
.crew-payout-panel .crew-payout-step > .crew-payout-task__body { padding:14px; }
.crew-payout-panel .crew-payout-task__body > .crew-payout-submission-form { margin:0; padding:0; border:0; background:none; }
.crew-payout-panel .crew-payout-task__body > :is(.crew-payout-external-reference,.crew-payout-void-reason) { margin:0; padding:0; border:0; background:none; color:var(--theme-text); font-size:13px; }
.crew-payout-panel .crew-payout-task .crew-payout-table-wrap { max-height:320px; border:1px solid var(--theme-line); border-radius:8px; }
.crew-payout-panel .crew-payout-task .crew-payout-table { border-collapse:separate; border-spacing:0; }
.crew-payout-panel .crew-payout-task .crew-payout-table :is(th,td) { padding:11px 13px; }
.crew-payout-panel .crew-payout-batch__documents { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; }
.crew-payout-panel .crew-payout-batch__documents .crew-payout-document-link { margin:0; background:#fff; color:#111; }
@media (max-width:680px) {
  .crew-payout-panel .crew-payout-task > .crew-payout-task__heading { padding:14px; gap:8px; }
  .crew-payout-task__title { font-size:15px; }
  .crew-payout-task__meta { font-size:12px; }
  .crew-payout-panel .crew-payout-task__body { padding:12px; }
  .crew-payout-panel .crew-payout-step > .crew-payout-task__body { padding:10px; }
  .crew-payout-panel .crew-payout-selection__footer { flex-wrap:wrap; }
  .crew-payout-panel .crew-payout-selection__footer button { width:100%; }
  .crew-payout-panel .crew-payout-task__heading > .crew-payout-status { max-width:95px; }
}

/* Keep allowance and manual-deduction controls aligned even as notes grow. */
:is(#paymentDetail, .payment-review-dialog) .payment-line--adjustment { align-items: start; min-width: 0; }
:is(#paymentDetail, .payment-review-dialog) .payment-line--adjustment > label { display: grid; align-content: start; gap: 6px; margin: 0; min-width: 0; color: var(--theme-text); font-size: 13px; line-height: 20px; font-weight: 650; }
:is(#paymentDetail, .payment-review-dialog) .payment-line--adjustment :is(input, select, textarea) { width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-surface); color: var(--theme-text); font: inherit; font-size: 13px; line-height: 22px; }
:is(#paymentDetail, .payment-review-dialog) .payment-line--adjustment textarea { min-height: 74px; resize: vertical; }
:is(#paymentDetail, .payment-review-dialog) .payment-line--adjustment > .payment-line__remove { align-self: start; margin-top: 26px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--theme-rose-line); border-radius: 8px; background: var(--theme-surface); color: var(--theme-rose-text); font-size: 13px; line-height: 22px; }
:is(#paymentDetail, .payment-review-dialog) .payment-add-line { min-height: 44px; padding: 10px 16px; margin-top: 4px; border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-surface); color: var(--theme-text); font-size: 13px; font-weight: 700; }
:is(#paymentDetail, .payment-review-dialog) .payment-line--adjustment > .payment-line__remove:hover:not(:disabled) { background: var(--theme-rose-surface); border-color: var(--theme-rose-line); }
@media (max-width: 900px) {
  :is(#paymentDetail, .payment-review-dialog) .payment-line--adjustment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  :is(#paymentDetail, .payment-review-dialog) .payment-line--adjustment { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--theme-blue-line); border-radius: 10px; background: var(--theme-surface); }
  :is(#paymentDetail, .payment-review-dialog) .payment-line--adjustment > .payment-line__remove { margin-top: 0; justify-self: end; }
}

.saved-action-notice { position: fixed; z-index: 100; inset: auto 24px 24px auto; display: flex; align-items: center; gap: 14px; width: min(520px, calc(100vw - 32px)); max-height: 40dvh; overflow: auto; padding: 14px 16px; border: 1px solid var(--theme-green-line); border-radius: 10px; background: var(--theme-green-surface); color: var(--theme-green-text); box-shadow: 0 8px 30px #101a2e1c; }
.saved-action-notice p { margin: 0; min-width: 0; color: inherit; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.saved-action-notice button { flex: 0 0 auto; min-height: 44px; padding: 10px 12px; border: 1px solid currentColor; border-radius: 8px; background: var(--theme-surface); color: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.saved-action-notice.is-warning { border-color: var(--theme-amber-line); background: var(--theme-amber-surface); color: var(--theme-amber-text); }
.saved-action-notice button:focus-visible { outline: 3px solid #7e9ac4; outline-offset: 2px; }
@media (max-width: 600px) { .saved-action-notice { inset: auto 16px 16px; } }

/* Users & Roles: reusable roles, explicit task switches and readable admin forms. */
.access-tabs { display: flex; gap: 6px; padding: 6px; margin-bottom: 20px; border: 1px solid var(--theme-blue-line); border-radius: 12px; background: var(--theme-blue-surface); }
.access-tabs button { flex: 1; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 8px; background: transparent; color: var(--theme-text); font-weight: 700; cursor: pointer; }
.access-tabs button[aria-selected=true] { background: #172238; color: var(--theme-text); }
.access-users-page .access-user-fields { display: grid; grid-template-columns: minmax(180px,1.5fr) minmax(150px,.8fr) minmax(180px,1fr) auto; gap: 16px; align-items: end; }
.access-users-page label, .access-editor-dialog label { color: var(--theme-text); font-size: 13px; line-height: 1.5; }
.access-users-page .access-user-fields input, .access-users-page .access-user-fields select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--theme-line); border-radius: 8px; color: var(--theme-text); background: var(--theme-surface); }
.access-role-card { margin-top: 0; }
.access-role-note { margin: 0; padding: 16px 20px; color: var(--theme-text); font-size: 13px; line-height: 1.6; }
.access-users-page .table-wrap { max-height: 560px; overflow: auto; }
.access-users-page table th { position: sticky; top: 0; z-index: 1; background: var(--theme-raised); color: var(--theme-text); }
.access-users-page table td { color: var(--theme-text); }
.access-editor-dialog { width: min(1060px,calc(100vw - 32px)); max-height: 90dvh; margin: auto; padding: 0; border: 1px solid var(--theme-blue-line); border-radius: 14px; color: var(--theme-text); }
.access-editor-dialog .payment-dialog__card { padding: 24px; }
.access-editor-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.access-editor-header h2 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.access-editor-form { display: grid; gap: 18px; }
.access-editor-form > p { margin: 0; color: var(--theme-text); font-size: 13px; line-height: 1.6; }
.access-editor-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.access-editor-fields label { display: grid; gap: 8px; min-width: 0; font-weight: 650; }
.access-editor-fields input, .access-editor-fields select { min-width: 0; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-surface); color: var(--theme-text); font: inherit; }
.access-permission-scroll { min-width: 0; max-height: 50dvh; overflow: auto; border: 1px solid var(--theme-blue-line); border-radius: 10px; }
.access-permission-table { width: 100%; min-width: 880px; border-collapse: collapse; table-layout: fixed; }
.access-permission-table th:first-child { width: 190px; }
.access-permission-table th:nth-child(2) { width: 240px; }
.access-permission-table th { position: sticky; top: 0; z-index: 1; background: var(--theme-blue-surface); color: var(--theme-text); text-align: left; font-size: 12px; }
.access-permission-table :is(th,td) { padding: 12px 14px; border-bottom: 1px solid var(--theme-blue-line); vertical-align: top; }
.access-permission-table td:first-child { color: var(--theme-text); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.access-task-switches { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 8px 18px; min-width: 0; }
.access-permission-table .access-switch { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 10px; min-width: 0; max-width: 100%; min-height: 44px; margin: 0; cursor: pointer; font-size: 12px; line-height: 1.45; color: var(--theme-text); white-space: normal; }
.access-switch > span { min-width: 0; overflow-wrap: anywhere; }
.access-switch input[role=switch] { appearance: none; box-sizing: border-box; width: 38px; height: 22px; min-height: 22px; margin: 0; padding: 2px; border: 1px solid #cbd5e1; border-radius: 15px; background: #fff; color-scheme: light; cursor: pointer; }
.access-switch input[role=switch]::before { content: ''; display: block; width: 16px; height: 16px; border-radius: 50%; background: #64748b; box-shadow: 0 1px 3px #17223835; transition: transform .15s,background-color .15s; }
.access-switch input[role=switch]:checked { background: #fff; border-color: #fff; }
.access-switch input[role=switch]:checked::before { background: #111827; }
.access-switch input[role=switch]:checked::before { transform: translateX(16px); }
.access-switch input[role=switch]:disabled { opacity: 1; cursor: not-allowed; }
.access-switch input[role=switch]:disabled::before { background: #94a3b8; }
.access-switch input[role=switch]:disabled:checked::before { background: #475569; }
.access-custom-check { display: flex; align-items: center; gap: 10px; }
.access-custom-check input { flex: 0 0 20px; width: 20px; height: 20px; accent-color: #a41646; }
.access-editor-form > button[type=submit] { justify-self: end; min-height: 44px; }
.access-editor-dialog :is(button,input,select):focus-visible, .access-tabs button:focus-visible { outline: 3px solid #7e9ac4; outline-offset: 2px; }
.access-editor-dialog .settings-message { margin-top: 14px; }
.access-empty-card { padding: 24px; color: var(--theme-text); }
@media(max-width: 1100px) { .access-users-page .access-user-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width: 600px) { .access-editor-fields, .access-users-page .access-user-fields { grid-template-columns: minmax(0,1fr); } .access-editor-dialog .payment-dialog__card { padding: 16px; } .access-editor-header h2 { font-size: 18px; } .access-editor-form > button[type=submit] { justify-self: stretch; } }
.access-user-status--inactive { background: var(--theme-rose-surface); color: var(--theme-rose-text); }

/* Shared request loader stays above open dialogs; background polling stays quiet. */
.global-preloader { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 24px; border: 0; background: rgba(0,0,0,.7); color: var(--theme-text); z-index: 2147483646; }
.global-preloader[open] { display: grid; place-items: center; }
.global-preloader::backdrop { background: transparent; }
.global-preloader__content { display: grid; justify-items: center; gap: 18px; max-width: 440px; text-align: center; }
.global-preloader__content strong { font-size: 20px; letter-spacing: .2em; }
.global-preloader__content p { margin: 0; color: var(--theme-text); font-size: 14px; line-height: 1.6; }
.global-preloader__brand { width: 112px; height: 112px; display: grid; place-items: center; position: relative; }
.global-preloader__brand span { position: absolute; inset: 0; border: 2px solid #ffffff35; border-top-color: var(--theme-rose-line); border-radius: 50%; animation: appraisal-loading-turn 1.4s linear infinite; }
.global-preloader__brand img { width: 76px; height: 76px; animation: appraisal-loading-pulse 1.8s ease-in-out infinite; }
body.is-globally-loading { overflow: hidden; }
.timesheet-sync-gate { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px; margin-bottom: 20px; border: 1px solid var(--theme-blue-line); border-radius: 14px; background: var(--theme-surface); color: var(--theme-text); }
.timesheet-sync-gate h3 { margin: 0 0 8px; font-size: 18px; color: var(--theme-text); }
.timesheet-sync-gate p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--theme-text); }
.timesheet-sync-gate .compact-button { flex: 0 0 auto; min-height: 44px; }
.timesheet-sync-gate.is-ready { border-color: var(--theme-green-line); background: var(--theme-green-surface); }
.timesheet-sync-gate.is-ready h3 { color: var(--theme-green-text); }
@keyframes appraisal-loading-turn { to { transform: rotate(360deg); } }
@keyframes appraisal-loading-pulse { 0%,100% { transform: scale(.9); opacity: .75; } 50% { transform: scale(1); opacity: 1; } }
@media (max-width: 600px) { .timesheet-sync-gate { align-items: stretch; flex-direction: column; padding: 20px; } }
@media (prefers-reduced-motion: reduce) { .global-preloader__brand :is(span,img) { animation: none; } }

.outlet-filters { display: grid; grid-template-columns: minmax(220px,1fr) minmax(150px,220px) auto; gap: 16px; align-items: end; margin-bottom: 16px; }
.outlet-filter-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; }
.outlet-filter-actions .compact-button { white-space: nowrap; }
.outlet-filters label,.outlet-form-field { display: grid; gap: 8px; margin: 0; min-width: 0; font-size: 13px; font-weight: 650; color: var(--theme-text); }
.outlet-filters :is(input,select),.outlet-form-field :is(input,select,textarea),.outlet-worker-select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; margin: 0; color: var(--theme-text); border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-surface); font: inherit; }
.outlet-list-card { border: 1px solid var(--theme-blue-line); border-radius: 14px; overflow: hidden; background: var(--theme-surface); color: var(--theme-text); }
.outlet-list-header,.outlet-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.outlet-list-header > div { display: flex; gap: 12px; align-items: center; }
.outlet-list-header { flex-wrap: wrap; }
.outlet-pagination { flex-wrap: wrap; }
.outlet-pagination span { min-width: 44px; text-align: center; font-size: 13px; color: var(--theme-text); }
#outletDirectoryScroll { margin: 0 18px 18px; max-height: min(60dvh, calc(100dvh - 250px)); scroll-padding-top: 44px; }
#outletDirectoryScroll .outlet-table { min-width: 960px; }
#outletDirectoryScroll .outlet-table :is(th,td) { vertical-align: middle; }
#outletDirectoryScroll .outlet-table :is(th,td):nth-child(3) { min-width: 180px; }
#outletDirectoryScroll .outlet-table :is(th,td):last-child { text-align: right; padding-right: 16px; }
#outletDirectoryScroll .outlet-table td:last-child { width: 112px; }
.outlets-page #outletMessage:empty { display: none; }
.outlet-table-scroll { overflow: auto; max-height: 60dvh; border: 1px solid var(--theme-blue-line); border-radius: 8px; }
.outlet-table { width: 100%; min-width: 680px; border-collapse: separate; border-spacing: 0; color: var(--theme-text); font-size: 13px; }
.outlet-table :is(th,td) { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--theme-line); }
.outlet-table th { position: sticky; top: 0; background: var(--theme-blue-surface); color: var(--theme-text); z-index: 1; font-size: 12px; }
.outlet-table td { white-space: normal; overflow-wrap: anywhere; }
.outlet-table td:first-child { min-width: 180px; }
.outlet-table :is(button,a) { white-space: nowrap; }
.outlet-dialog { width: min(1120px,calc(100vw - 32px)); max-height: 92dvh; margin: auto; padding: 0; border-radius: 14px; border: 1px solid var(--theme-blue-line); color: var(--theme-text); }
.outlet-dialog.payment-deductions-dialog { width: min(540px,calc(100vw - 32px)); }
.payment-deductions-dialog .payment-net-review__table { margin-top: 12px; }
.outlet-dialog .payment-dialog__card { padding: 24px; }
.outlet-dialog-header { padding: 0 0 20px; align-items: start; }
.outlet-dialog-header h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: 22px; }
.outlet-tabs { flex-wrap: nowrap; overflow: auto; }
.outlet-tabs button { white-space: nowrap; flex: 0 0 auto; }
.outlet-tab-panel { max-height: 68dvh; overflow: auto; padding: 2px 4px 8px; }
.outlet-tab-panel h3 { font-size: 16px; margin: 20px 0 12px; }
.outlet-tab-panel details { padding: 14px 0; border-bottom: 1px solid var(--theme-blue-line); }
.outlet-tab-panel details p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.outlet-field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.outlet-field-wide { grid-column: 1 / -1; }
.outlet-profile-form > button { display: block; margin: 16px 0 0 auto; }
.outlet-row-actions { display: flex; gap: 8px; align-items: start; }
.outlet-worker-select { margin: 12px 0; }
.outlets-page #outletMessage { color: var(--theme-rose-text); font-size: 14px; }
.outlet-dialog :is(input,select,textarea,button,a):focus-visible { outline: 3px solid #7e9ac4; outline-offset: 2px; }
@media(max-width: 1024px) { .outlet-filters { grid-template-columns: minmax(0,1fr) minmax(140px,200px); } .outlet-filter-actions { grid-column: 1 / -1; } }
@media(max-width: 700px) { .outlet-filters,.outlet-field-grid { grid-template-columns: minmax(0,1fr); } .outlet-dialog .payment-dialog__card { padding: 18px; } .outlet-list-header { align-items: start; flex-direction: column; } }
@media(max-width: 700px) { .outlet-filter-actions { justify-content: flex-start; } #outletDirectoryScroll { margin: 0 12px 12px; max-height: 60dvh; } }

/* Shared action hierarchy: login crimson, quiet grey cancellation, green utilities. */
[data-button-tone] { min-height: 44px; border-radius: 9px !important; font-size: 13px !important; font-weight: 700 !important; line-height: 1.35 !important; padding: 11px 17px !important; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; text-decoration: none; box-sizing: border-box; }
[data-button-tone="positive"] { background: linear-gradient(135deg,var(--crimson),var(--crimson-deep)) !important; border: 1px solid var(--crimson-deep) !important; color: var(--theme-text) !important; box-shadow: 0 5px 14px rgba(158,23,64,.16); }
[data-button-tone="negative"] { background: var(--theme-raised) !important; border: 1px solid var(--theme-line) !important; color: var(--theme-text) !important; box-shadow: none !important; }
[data-button-tone="neutral"] { background: var(--theme-green-surface) !important; border: 1px solid var(--theme-green-line) !important; color: var(--theme-text) !important; box-shadow: none !important; }
[data-button-tone]:hover:not(:disabled) { filter: brightness(.97); }
[data-button-tone]:focus-visible { outline: 3px solid #8badd4; outline-offset: 3px; }
[data-button-tone]:disabled { opacity: .65; cursor: not-allowed; box-shadow: none; }
.icon-button[data-button-tone],.dialog-close[data-button-tone],.whatsapp-qr-close[data-button-tone] { width: auto; height: auto; min-width: 72px; flex: 0 0 auto; }
.dialog-actions,.crew-payout-section__actions,.payment-dialog__actions { align-items: center; flex-wrap: wrap; gap: 12px; }
.app-alert { padding: 12px 16px !important; border: 1px solid var(--theme-blue-line); border-left: 4px solid var(--theme-line); border-radius: 9px; background: var(--theme-blue-surface); color: var(--theme-text) !important; line-height: 1.55; font-size: 13px; overflow-wrap: anywhere; white-space: pre-line; }
.app-alert[data-alert-tone="error"] { background: var(--theme-rose-surface); border-color: var(--theme-rose-line); border-left-color: var(--theme-rose-line); color: var(--theme-rose-text) !important; }
.app-alert[data-alert-tone="warning"] { background: var(--theme-amber-surface); border-color: var(--theme-amber-line); border-left-color: var(--theme-amber-line); color: var(--theme-amber-text) !important; }
.app-alert[data-alert-tone="success"] { background: var(--theme-green-surface); border-color: var(--theme-green-line); border-left-color: var(--theme-green-line); color: var(--theme-green-text) !important; }
.app-alert:empty { display: none; }
.app-notice { width: min(560px,calc(100vw - 32px)); max-height: 88dvh; padding: 0; border: 1px solid var(--theme-line); border-radius: 15px; color: var(--theme-text); margin: auto; }
.app-notice::backdrop,dialog:not(#globalPreloader)::backdrop { background: rgba(16,24,40,.58); }
.app-notice-card { padding: 24px; }
.app-notice-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.app-notice-header h2 { margin: 0; font-size: 21px; color: var(--theme-text); }
.app-notice .dialog-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.app-notice-field { display: grid; gap: 8px; color: var(--theme-text); font-weight: 600; margin-top: 16px; }
.app-notice-field textarea { width: 100%; min-height: 100px; padding: 12px; color: var(--theme-text); border: 1px solid var(--theme-line); border-radius: 8px; resize: vertical; box-sizing: border-box; }
/* Upload review: compact collapsible details and a scannable worker table. */
.review-section { margin: 18px 0; border: 1px solid var(--theme-blue-line); border-radius: 11px; background: var(--theme-surface); min-width: 0; overflow: hidden; }
.review-section > summary { cursor: pointer; padding: 16px 18px; color: var(--theme-text); font-size: 15px; font-weight: 750; }
.review-section .review-fields { padding: 0 18px 18px; margin: 0; }
.review-worker-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.review-worker-stat { display: grid; gap: 4px; padding: 15px 18px; background: var(--theme-blue-surface); border: 1px solid var(--theme-blue-line); border-radius: 10px; color: var(--theme-text); }
.review-worker-stat strong { font-size: 30px; color: var(--theme-text); line-height: 1.15; }
.review-worker-stat span { font-size: 13px; font-weight: 650; }
.review-worker-stat.is-ready { background: var(--theme-green-surface); border-color: var(--theme-green-line); }
.review-worker-stat.is-warning { background: var(--theme-amber-surface); border-color: var(--theme-amber-line); }
.review-worker-scroll { overflow: auto; max-height: 360px; border-top: 1px solid var(--theme-blue-line); }
.review-worker-table { width: 100%; min-width: 700px; border-collapse: collapse; font-size: 13px; color: var(--theme-text); }
.review-worker-table th { text-align: left; position: sticky; top: 0; background: var(--theme-blue-surface); z-index: 1; color: var(--theme-text); padding: 12px 14px; font-size: 12px; }
.review-worker-table td { padding: 13px 14px; border-top: 1px solid var(--theme-line); vertical-align: middle; }
.review-worker-table td:first-child { font-weight: 700; color: var(--theme-text); }
.review-worker-table td:last-child { white-space: nowrap; }
.review-worker-table td button + button { margin-left: 8px; }
.review-worker-table .has-warning { background: var(--theme-amber-surface); }
.review-worker-table .has-blocker { background: var(--theme-rose-surface); }
.review-worker-status small { display: block; margin-top: 5px; color: var(--theme-amber-text); font-size: 12px; }
.review-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 18px; border-top: 1px solid var(--theme-blue-line); }
.review-actions #recheckDraftWorkers { margin-right: auto; }
@media(max-width:600px) { .review-worker-summary {gap: 8px;} .review-worker-stat { padding: 12px 10px; } .review-worker-stat strong {font-size: 26px;} .review-worker-stat span {font-size: 12px;} .review-actions > button {flex: 1 1 130px;} .app-notice-card {padding: 18px;} }
.review-dialog { width: min(1120px,calc(100vw - 32px)); max-height: 92dvh; }
.review-card .source-summary small { color: var(--theme-text); }
.review-actions { position: sticky; bottom: 0; z-index: 3; background: var(--theme-surface); padding: 16px 0 4px; box-shadow: 0 -8px 14px #fff; }

/* Appraisal dark workspace: one palette for cards, tables, forms and dialogs. */
:root {
  color-scheme: dark;
  --theme-canvas: #080d17;
  --theme-surface: #131c2d;
  --theme-raised: #1a263a;
  --theme-inset: #0d1524;
  --theme-line: #344157;
  --theme-text: #f3f5fa;
  --theme-muted: #b3bdce;
  --theme-rose-text: #ffacc4;
  --theme-rose-surface: #321c2a;
  --theme-rose-line: #723449;
  --theme-green-text: #a2e7c4;
  --theme-green-surface: #142e28;
  --theme-green-line: #346752;
  --theme-amber-text: #f4d18c;
  --theme-amber-surface: #322a1c;
  --theme-amber-line: #725b31;
  --theme-blue-text: #bdd5ff;
  --theme-blue-surface: #1b2a43;
  --theme-blue-line: #415e86;
}
.workspace {
  background: radial-gradient(ellipse at 85% 0,rgba(124,24,62,.12),transparent 44%),linear-gradient(145deg,#0d1422,#080d17 70%);
  color: var(--theme-text);
}
.workspace-topbar { background: rgba(13,20,34,.94); border-bottom-color: var(--theme-line); }
.workspace-sidebar { background: linear-gradient(165deg,#141f33,#0a111e); }
.workspace :is(h1,h2,h3,h4,strong),dialog :is(h1,h2,h3,h4) { color: var(--theme-text); }
/* Raised containers share the restrained highlight of the secure-access card. */
:is(.data-card,.settings-card,.outlet-list-card,.payment-filter-card,.timesheet-summary,.detail-metadata,.stat-card,.reconciliation-summary-card,.review-worker-stat,.crew-payout-section,.migration-workflow-panel,.worker-detail-card,.whatsapp-settings-card,.timesheet-sync-gate,.reconciliation-list-panel,.reconciliation-evidence-panel,.payment-editor__section,.review-section,.deduction-ledger,.whatsapp-data-card,.hal-ehwal-summary-card) {
  background-image: var(--theme-card-fill, linear-gradient(155deg,rgba(31,43,66,.75),rgba(13,20,33,.94)));
  box-shadow: 0 16px 38px rgba(0,0,0,.16);
}
/* A border image avoids pseudo-elements overlapping buttons or table headers. */
:is(.data-card,.settings-card,.outlet-list-card,.payment-filter-card,.timesheet-sync-gate,.crew-payout-section,.review-card,.duplicate-card,.payment-dialog__card,.app-notice-card) {
  border-top: 1px solid var(--theme-card-outline, rgba(255,255,255,.12));
}
:is(.review-card,.duplicate-card,.payment-dialog__card,.app-notice-card,.outlet-dialog) { background: linear-gradient(155deg,#192338,#0d1422); color: var(--theme-text); }
:is(.record-table,.review-worker-table,.outlet-table,.worker-table,.payment-table,.migration-records-table) thead th { background: #1b273d; color: #dce3ef; }

tr.is-public-holiday {
  color-scheme: light;
  --theme-text: #2d240f;
  --theme-muted: #594515;
  --theme-line: #d1b352;
  --theme-amber-text: #513800;
  --theme-amber-surface: #f2d675;
  --theme-rose-text: #791638;
  --theme-green-text: #16462f;
  color: var(--theme-text);
}

:is(.record-table, .outlet-table) tr.is-public-holiday > td {
  background-color: #ffe793;
}

.payment-attendance-table .is-public-holiday td:first-child small {
  display: block;
  color: var(--theme-muted);
}

.workspace :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]),dialog :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]) { color: var(--theme-text); background-color: var(--theme-inset); border-color: var(--theme-line); }
.workspace option,dialog option { color: var(--theme-text); background: var(--theme-surface); }
input[type="checkbox"],input[type="radio"] { accent-color: var(--crimson); }
.workspace input::placeholder,.workspace textarea::placeholder,dialog input::placeholder,dialog textarea::placeholder { color: #a4afc2; opacity: 1; }
[data-button-tone="negative"] { background: linear-gradient(135deg,#283246,#1e283a) !important; border-color: #46536a !important; color: #eef1f7 !important; }
[data-button-tone="neutral"] { background: linear-gradient(135deg,#21463e,#18382f) !important; border-color: #3e7061 !important; color: #f0f7f3 !important; }
[data-button-tone="positive"] { color: #fff !important; }
[data-button-tone]:disabled { opacity: .68; }
.review-worker-stat.is-ready { background: linear-gradient(135deg,#18392f,#142b26); }
.review-worker-stat.is-warning { background: linear-gradient(135deg,#3b2c22,#2c211c); }
.review-actions { background: #101929; box-shadow: 0 -8px 14px #101929; }
.app-alert { color: #dfe7f2 !important; }
.app-alert[data-alert-tone="error"] { color: #ffc1d2 !important; }
.app-alert[data-alert-tone="warning"] { color: #f6dba6 !important; }
.app-alert[data-alert-tone="success"] { color: #b6efd0 !important; }
/* Authentication stays compact; workspace utility styling must not leak here. */
.login-card { border-top-color: rgba(255,255,255,.12); }
#loginView .back-button { position: absolute; top: 12px; right: 18px; margin: 0; min-height: 44px; padding: 8px 4px; color: #c5cddd; font-size: 13px; }
#loginView .resend-button { min-height: 40px; padding: 8px 10px; color: #d0d7e4; font-size: 13px; }
#loginView .resend-button:disabled { color: #9da8bb; opacity: 1; cursor: not-allowed; }
#loginView :is(.back-button,.resend-button) { background: transparent; border: 0; box-shadow: none; }
#loginView .otp-heading strong { display: block; margin-top: 4px; overflow-wrap: anywhere; color: #edf0f8; }
#loginView .primary-button { color: #fff; min-height: 50px; }
#loginView :is(.back-button,.resend-button):focus-visible { outline: 2px solid #ff91b0; outline-offset: 3px; border-radius: 5px; }
@media(prefers-reduced-motion:reduce) { [data-button-tone],.login-card { transition: none; } }
:is(.workspace,dialog) :where([class$="-card"],[class*="-card "]) {
  background-image: var(--theme-card-fill, linear-gradient(155deg,rgba(29,40,62,.9),rgba(12,19,31,.96)));
  border-top: 1px solid var(--theme-card-outline, rgba(255,255,255,.12));
  box-shadow: 0 16px 38px rgba(0,0,0,.18);
}
:is(.workspace,dialog) .section-number { color: #ff9dbb; }
.whatsapp-qr-card img { border-color: #fff; background: #fff; }
.migration-page > .page-heading > .eyebrow { color: #ff9dbb; }
/* Intake feedback is informational; Ready is a summary card, never an action. */
.review-worker-stat.is-ready { background: #fff !important; border-color: #d5dce6; color: #243044; }
.review-worker-stat.is-ready :is(strong,span) { color: #243044; }
.upload-message[data-message-kind="note"] { display: block; width: auto; min-height: 0; padding: 0 !important; border: 0 !important; border-radius: 0; background: none !important; box-shadow: none; color: var(--theme-muted) !important; text-align: left; cursor: default; font-weight: 400; }

/* Quiet card outline with a centred, tapered pink highlight. */
:is(.login-card,.data-card,.settings-card,.outlet-list-card,.payment-filter-card,.timesheet-summary,.detail-metadata,.stat-card,.reconciliation-summary-card,.review-worker-stat:not(.is-ready),.crew-payout-section,.migration-workflow-panel,.worker-detail-card,.worker-master-current,.whatsapp-settings-card,.timesheet-sync-gate,.reconciliation-list-panel,.reconciliation-evidence-panel,.payment-editor__section,.review-section,.deduction-ledger,.whatsapp-data-card,.hal-ehwal-summary-card,.review-card,.duplicate-card,.payment-dialog__card,.app-notice-card,.access-empty-card,.access-role-card,.access-user-list-card,.crew-invoice-card,.crew-payout-card,.hal-ehwal-card,.migration-card,.migration-deduction-card,.payment-detail-card,.timesheet-detail-card,.whatsapp-activity-card,.whatsapp-control-card,.whatsapp-qr-card,.whatsapp-status-card) {
  position: relative;
  border: 1px solid var(--theme-card-outline, rgba(255,255,255,.12)) !important;
  box-shadow: 0 16px 38px rgba(0,0,0,.18);
}
:is(.login-card,.data-card,.settings-card,.outlet-list-card,.payment-filter-card,.timesheet-summary,.detail-metadata,.stat-card,.reconciliation-summary-card,.review-worker-stat:not(.is-ready),.crew-payout-section,.migration-workflow-panel,.worker-detail-card,.worker-master-current,.whatsapp-settings-card,.timesheet-sync-gate,.reconciliation-list-panel,.reconciliation-evidence-panel,.payment-editor__section,.review-section,.deduction-ledger,.whatsapp-data-card,.hal-ehwal-summary-card,.review-card,.duplicate-card,.payment-dialog__card,.app-notice-card,.access-empty-card,.access-role-card,.access-user-list-card,.crew-invoice-card,.crew-payout-card,.hal-ehwal-card,.migration-card,.migration-deduction-card,.payment-detail-card,.timesheet-detail-card,.whatsapp-activity-card,.whatsapp-control-card,.whatsapp-qr-card,.whatsapp-status-card,.file-drop)::before {
  content: "";
  position: absolute;
  inset: -1px 18% auto;
  height: 3px;
  background: linear-gradient(90deg,transparent,rgba(255,143,179,.28) 18%,rgba(255,143,179,.82) 50%,rgba(255,143,179,.28) 82%,transparent);
  clip-path: polygon(0 50%,18% 36%,50% 0,82% 36%,100% 50%,82% 64%,50% 100%,18% 64%);
  pointer-events: none;
}
.timesheet-sync-gate { width: min(100%,520px); margin: 0 auto 24px; padding: 20px 24px; gap: 24px; }
.timesheet-sync-gate > div { min-width: 0; }
.timesheet-sync-gate #timesheetSyncMessage { margin-top: 6px; color: var(--theme-muted); font-size: 13px; }
@media(max-width:600px) { .timesheet-sync-gate { padding: 20px; gap: 16px; } }

/* Requested compact workspace controls and directly editable staff directories. */
.workspace-topbar-status { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; min-width:0; }
.whatsapp-header-status { flex-wrap:wrap; gap:10px; max-width:100%; font-size:12px; }
.whatsapp-header-status button[data-button-tone] { min-height:32px; padding:7px 11px !important; }
.workspace-main [data-button-tone],dialog:not(#globalPreloader) [data-button-tone] { background:#fff !important; color:#111 !important; border:1px solid var(--theme-action-outline, rgba(255,255,255,.65)) !important; box-shadow:none !important; min-height:36px; padding:8px 13px !important; font-size:12px !important; }
.workspace-main [data-button-tone]:hover:not(:disabled),dialog [data-button-tone]:hover:not(:disabled) { background:#e8eaf0 !important; filter:none; }
.worker-profile-save[data-button-tone] { background:linear-gradient(135deg,var(--crimson),var(--crimson-deep)) !important; color:#fff !important; border-color:var(--crimson-deep) !important; min-height:40px; }
.worker-actions,.dialog-actions,.migration-preview-actions,.worker-detail-header-actions { gap:10px; }
.review-worker-table td:last-child { white-space:nowrap; }
.review-worker-table td:last-child button + button { margin-left:8px; }
.review-worker-table tr:is(.has-warning,.has-blocker) { background:rgba(255,255,255,.055) !important; }
.review-worker-table tr:is(.has-warning,.has-blocker) td { background:transparent !important; color:var(--theme-text); }
.review-worker-stat.is-ready { background:rgba(255,255,255,.075) !important; border-color:rgba(255,255,255,.12) !important; color:var(--theme-text); }
.review-worker-stat.is-ready :is(strong,span) { color:var(--theme-text); }
details > summary { display:flex; align-items:center; gap:12px; list-style:none; cursor:pointer; }
details > summary::-webkit-details-marker { display:none; }
details > summary::after { content:'⌄'; margin-left:auto; flex:none; font-size:20px; line-height:1; transition:transform .2s ease; }
details[open] > summary::after { transform:rotate(180deg); }
@supports (interpolate-size:allow-keywords) {
  details { interpolate-size:allow-keywords; }
  details::details-content { block-size:0; overflow:clip; transition:block-size .2s ease,content-visibility .2s; transition-behavior:allow-discrete; }
  details[open]::details-content { block-size:auto; }
}
details[open] > :not(summary) { animation:panel-reveal .18s ease; }
@keyframes panel-reveal { from {opacity:0;transform:translateY(-5px);} to {opacity:1;transform:none;} }
.app-notice-card { padding:30px; text-align:center; }
.app-notice-header { display:block; text-align:center; margin:0 0 18px; }
.app-notice-text { white-space:pre-line; color:var(--theme-text); line-height:1.7; margin:0; background:none; border:0; padding:0; }
.app-notice .dialog-actions,.dialog-close-footer { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; padding:0; margin:24px 0 0; }
.dialog-close-footer { padding:0 24px 24px; }
dialog :is(.review-card__header,.dialog-heading,.payment-dialog__header,.migration-dialog-header,.payment-review-dialog__header) { justify-content:center; text-align:center; }
.worker-directory-filters { padding:14px 20px; border-bottom:1px solid var(--theme-line); }
.worker-filter-grid { display:grid; grid-template-columns:2fr 1.4fr 1fr 1fr auto; gap:12px; align-items:end; padding-top:16px; }
.worker-filter-grid label { display:grid; gap:7px; font-size:13px; }
.worker-filter-grid input { min-width:0; width:100%; min-height:38px; padding:8px 10px; background:var(--theme-surface); color:var(--theme-text); border:1px solid var(--theme-line); border-radius:8px; }
.worker-list-page .data-card { display:flex; flex-direction:column; max-height:calc(100dvh - 180px); min-height:260px; }
.worker-list-page .worker-table-wrap { min-height:0; overflow:auto; flex:1; }
.worker-table thead { position:sticky; top:0; z-index:1; background:var(--theme-raised); }
.worker-list-page .worker-pagination { flex:none; margin:0; padding:12px 20px; }
.worker-detail-card--editable .worker-detail-card__header { position:sticky; top:0; z-index:4; background:linear-gradient(155deg,#192338,#0d1422); padding:18px 24px; border-bottom:1px solid var(--theme-line); }
.worker-detail-card--editable .worker-profile-form { margin:0; padding:22px 24px; background:transparent; border:0; }
.worker-detail-card--editable .worker-detail-section { margin:0; padding:22px 24px; min-width:0; }
.worker-contributions-card { display: grid; gap: 14px; margin: 16px 24px; padding: 16px; border: 1px solid var(--theme-line); border-radius: 10px; background: var(--theme-surface); }
.worker-contributions-card__header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.worker-contributions-card__header .payment-contribution-heading { gap: 8px 14px; }
.worker-contributions-card__progress { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.worker-contributions-card__cycle { color: var(--theme-muted); font-size: 12px; font-weight: 650; }
.worker-contributions-card h3, .worker-contributions-card p { margin: 0; }
.worker-contributions-card h3 { font-size: 15px; }
.worker-contributions-card p, .worker-contributions-card summary, .worker-contributions-card__header label { color: var(--theme-muted); font-size: 12px; }
.worker-contributions-card summary { width: fit-content; cursor: pointer; }
.worker-contributions-card details > .worker-detail-grid { margin-top: 10px; }
.worker-contributions-card__header label { display: flex; align-items: center; gap: 8px; }
.worker-contributions-card__amounts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.worker-contributions-card__amounts strong { font-size: 14px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .worker-contributions-card__amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .worker-contributions-card { margin-inline: 16px; padding: 12px; } }
.worker-profile-field-grid label,.deduction-charge-form label,.deduction-receipt-form label { display:grid; min-width:0; gap:7px; color:var(--theme-text); font-size:13px; }
.deduction-ledger { min-width:0; padding:20px; }
.deduction-ledger :is(input:not([type=checkbox]),select,textarea),.hostel-profile-form :is(input,textarea) { box-sizing:border-box; width:100%; min-width:0; min-height:38px; padding:9px 11px; color:var(--theme-text); background:var(--theme-surface); border:1px solid var(--theme-line); border-radius:8px; font:inherit; }
.deduction-charge-form,.deduction-receipt-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:start; margin-top:16px; }
.deduction-charge-form button,.deduction-receipt-form button { justify-self:start; }
.deduction-charge-form > .deduction-charge-form__notes { grid-column:1 / -1; }
.deduction-charge-form > .deduction-charge-form__custom { grid-column:1 / -1; }
.deduction-charge-form > .deduction-charge-form__actions { grid-column:1 / -1; justify-content:flex-end; flex-wrap:wrap; }
.deduction-ledger .record-table-wrap { max-height:360px; overflow:auto; margin:16px 0; }
.deduction-ledger .record-table { min-width:760px; width:100%; border-collapse:separate; border-spacing:0; }
.deduction-ledger .record-table th { position:sticky; top:0; z-index:1; padding:12px 14px; font-size:11px; }
.deduction-ledger .record-table td { padding:12px 14px; font-size:14px; vertical-align:middle; }
.deduction-ledger .record-table :is(th,td):nth-child(n+2):nth-child(-n+6) { text-align:right; font-variant-numeric:tabular-nums; }
.deduction-ledger .record-table td input { text-align:right; font-variant-numeric:tabular-nums; }
.deduction-ledger .record-table td small { display:block; margin-top:3px; color:var(--theme-muted); font-size:12px; }
.deduction-ledger .record-table :is(th,td):nth-child(7) { text-align:right; }
.deduction-ledger .record-table .worker-actions { flex-wrap:nowrap; justify-content:flex-end; }
.worker-detail-history td { white-space:pre-line; overflow-wrap:anywhere; }
.hostel-profile-form .settings-grid { margin:18px 0; }
@media(max-width:850px) {
 .workspace-topbar { align-items:start; gap:14px; flex-wrap:wrap; }
 .workspace-topbar-status { justify-content:flex-start; }
 .worker-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .worker-list-page .data-card { max-height:calc(100dvh - 220px); }
}
@media(max-width:540px) {
 .worker-detail-card--editable .worker-detail-card__header,.worker-detail-card--editable .worker-profile-form,.worker-detail-card--editable .worker-detail-section { padding:16px; }
 .deduction-charge-form,.deduction-receipt-form { grid-template-columns:1fr; }
 .worker-filter-grid { grid-template-columns:1fr; }
 .worker-directory-filters[open] { max-height:260px; overflow:auto; flex:none; }
}
@media(prefers-reduced-motion:reduce) { details::details-content,details > summary::after {transition:none;} details[open] > :not(summary) {animation:none;} }
.migration-record-dialog { background:linear-gradient(155deg,#192338,#0d1422); color:var(--theme-text); }
.migration-record-dialog__header { justify-content:center; text-align:center; }
.migration-record-dialog__header h2 { width:100%; }
.hostel-profile-form :is(.settings-grid,label) { min-width:0; }
.worker-detail-card--editable .worker-detail-section { display:block; }
.worker-detail-card--editable .worker-detail-section > h3 { margin:0 0 16px; }
.worker-detail-card--editable .worker-profile-form > label { display:grid; gap:8px; margin-top:16px; font-size:13px; color:var(--theme-text); }
.worker-detail-card--editable .worker-profile-form > label textarea { box-sizing:border-box; width:100%; min-height:70px; padding:10px 12px; border:1px solid var(--theme-line); border-radius:8px; background:var(--theme-surface); color:var(--theme-text); font:inherit; resize:vertical; }
.deduction-receipt-form .receipt-upload { grid-column:1 / -1; min-width:0; }
[data-button-tone] { background:#fff !important; color:#111 !important; border:1px solid var(--theme-action-outline, rgba(255,255,255,.65)) !important; box-shadow:none !important; }
.worker-detail-card--editable { overflow:clip; }
.workspace-main .worker-profile-save[data-button-tone]:hover:not(:disabled) { background:var(--crimson-deep) !important; color:#fff !important; }
/* Quiet status presentation and compact worker correction actions. */
.workspace-topbar-status > .workspace-status { height:40px; box-sizing:border-box; padding:4px 12px; font-size:12px; flex-wrap:nowrap; }
.whatsapp-header-status #timesheetSyncMessage { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workspace-topbar-status .whatsapp-header-status button[data-button-tone] { flex:none; height:30px; min-height:30px; padding:5px 10px !important; }
.hostel-directory-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:12px; margin-left:auto; }
.hostel-directory-actions .table-search { margin:0; }
.worker-review-toolbar { position:sticky; top:-24px; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 0; background:#172134; }
.worker-review-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; }
.worker-review-toolbar + .worker-profile-form { margin-top:0; }
.worker-detail-card--editable .worker-detail-section > summary { font-weight:700; font-size:16px; }
.worker-detail-card--editable .worker-detail-section > :not(summary) { margin-top:16px; }

/* Worker directories and profiles */
.worker-list-page .page-heading-row > div > p:last-child { font-size:14px; }
.worker-list-page .data-card__header strong { font-size:17px; }
.worker-list-page .data-card__header span { font-size:13px; }
.worker-directory-search { padding:16px 20px 0; }
.worker-directory-search label { display:grid; gap:7px; max-width:520px; color:var(--theme-text); font-size:13px; font-weight:600; }
.worker-directory-search input { box-sizing:border-box; width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--theme-line); border-radius:8px; background:var(--theme-surface); color:var(--theme-text); font:inherit; font-size:14px; }
.worker-directory-filters { padding:12px 20px 16px; }
.worker-directory-filters > summary { font-size:13px; font-weight:650; }
.worker-filter-grid { grid-template-columns:2fr 1fr 1fr auto; }
.worker-filter-grid input { box-sizing:border-box; min-height:44px; font-size:14px; }
.worker-list-page .worker-list-message { min-height:0; font-size:13px; }
.worker-list-page .worker-table { min-width:900px; }
.worker-list-page .worker-table th { padding:13px 16px; font-size:11px; }
.worker-list-page .worker-table td { padding:14px 16px; font-size:14px; }
.worker-list-page .worker-table td small { max-width:none; font-size:12px; }
.worker-list-page .worker-status { font-size:12px; }
.worker-list-page .worker-action { min-height:36px; padding:0 12px; font-size:12px; }
.worker-list-page .worker-pagination button { min-width:36px; height:36px; font-size:12px; }
.worker-list-page .worker-pagination > span { font-size:13px; }
.worker-detail-card__header > div > p:last-child { font-size:13px; }
.worker-detail-card--editable .worker-profile-field-group summary { font-size:15px; }
.worker-detail-card--editable .worker-profile-field-grid label { font-size:13px; font-weight:600; line-height:1.4; }
.worker-detail-card--editable .worker-profile-field-grid :is(input,select,textarea) { box-sizing:border-box; min-height:44px; font-size:14px; font-weight:400; line-height:1.45; }
.worker-detail-card--editable .worker-profile-field-grid textarea { min-height:76px; }
.worker-detail-card--editable .worker-profile-form > label { font-weight:600; }
.worker-detail-card--editable .worker-profile-form > label textarea { font-size:14px; font-weight:400; line-height:1.45; }
@media(max-width:850px) {
  .worker-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:540px) {
  .worker-directory-search { padding:16px 16px 0; }
  .worker-directory-filters { padding:12px 16px 16px; }
  .worker-filter-grid { grid-template-columns:minmax(0,1fr); }
  .worker-list-page .worker-pagination { flex-wrap:wrap; }
}
.worker-detail-card--editable [data-worker-charge-setup] .deduction-ledger {
  margin:0;
  padding:0;
  border:0 !important;
  background:transparent;
  box-shadow:none;
}
.worker-detail-card--editable [data-worker-charge-setup] .deduction-ledger::before { content:none; }
.deduction-ledger [data-new-charge] { border:1px solid var(--theme-line); border-radius:10px; }
.deduction-ledger [data-new-charge] > summary { padding:12px 14px; font-size:13px; }
.deduction-ledger [data-new-charge] > .deduction-charge-form { margin:0; padding:0 14px 14px; }
.deduction-ledger h4 { margin:24px 0 0; }
.deduction-receipt-form > button[type="submit"] { grid-column:1 / -1; justify-self:end; }
.review-worker-table button[data-button-tone] { min-height:30px; padding:6px 10px !important; }
@media(max-width:600px) {
 .worker-review-toolbar { top:-16px; align-items:flex-start; }
 .worker-review-actions { flex:1; }
 .hostel-directory-actions { width:100%; justify-content:flex-end; }
 .hostel-directory-actions .table-search { flex:1 1 180px; min-width:0; }
}
.timesheet-report-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; }
#timesheetReportsContent { display:grid; gap:20px; min-width:0; }
.timesheet-report-heading h2 { margin:0 0 8px; font-size:26px; }
.timesheet-report-heading > p { color:var(--theme-muted); overflow-wrap:anywhere; margin:0 0 22px; }
.timesheet-report-metadata { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin:0; }
.timesheet-report-metadata > div { min-width:0; }
.timesheet-report-metadata dt { color:var(--theme-muted); font-size:12px; margin-bottom:7px; }
.timesheet-report-metadata dd { margin:0; color:var(--theme-text); font-weight:600; overflow-wrap:anywhere; }
.timesheet-report-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.timesheet-report-summary article { margin:0; }
.timesheet-report-summary small:empty { display:none; }
.timesheet-report-scroll { max-height:480px; overflow:auto; }
.timesheet-report-table { min-width:850px; width:100%; }
.timesheet-report-table th { position:sticky; top:0; z-index:1; }
.timesheet-report-table td { vertical-align:top; }
.timesheet-report-table td small { display:block; margin-top:7px; color:var(--theme-muted); font-size:12px; white-space:normal; }
.report-document-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.report-document-actions .compact-button { white-space:nowrap; }
.report-status { display:inline-flex; padding:5px 9px; font-size:12px; border-radius:7px; background:rgba(255,255,255,.07); color:var(--theme-text); white-space:nowrap; }
.report-status--success { background:var(--theme-green-surface); color:var(--theme-green-text); }
.report-status--error { background:var(--theme-rose-surface); color:var(--theme-rose-text); }
.timesheet-report-empty { margin:0; padding:22px; color:var(--theme-muted); }
.timesheet-report-package-header { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.timesheet-report-package h3 { margin:0; font-size:18px; }
.timesheet-report-package > p { color:var(--theme-muted); }
.timesheet-report-folders { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:20px; }
.timesheet-report-folders > div { padding:16px; border:1px solid var(--theme-line); border-radius:10px; background:rgba(255,255,255,.025); }
.timesheet-report-folders p { margin:8px 0 0; color:var(--theme-muted); line-height:1.65; }
.timesheet-report-package .timesheet-report-privacy { font-size:12px; margin-bottom:0; }
@media(max-width:700px) { .timesheet-report-summary,.timesheet-report-metadata { grid-template-columns:repeat(2,minmax(0,1fr)); } .timesheet-report-folders { grid-template-columns:1fr; } .timesheet-report-heading h2 { font-size:22px; } }
.timesheet-report-heading,.timesheet-report-package { padding:22px; }
#binTimesheetDialog { width:min(1100px,calc(100vw - 32px)); }
#binTimesheetDialog .duplicate-card { padding:24px; }
#binReviewStatus { margin:16px 0; font-weight:750; color:var(--theme-text); }
#binReviewContent { display:grid; gap:14px; text-align:left; }
#binReviewContent details { min-width:0; padding:14px; border:1px solid var(--theme-line); border-radius:10px; }
#binReviewContent summary { cursor:pointer; font-size:14px; font-weight:700; }
.bin-review-issue { padding:14px 16px; border:1px solid var(--theme-line); border-radius:10px; background:rgba(255,255,255,.025); }
.bin-review-issue h3 { margin:0 0 7px; font-size:15px; }
.bin-review-issue p { margin:0; font-size:13px; line-height:1.6; color:var(--theme-muted); }
.bin-review-scroll { overflow:auto; max-height:36dvh; margin-top:14px; border:1px solid var(--theme-line); border-radius:8px; }
.bin-review-scroll table { min-width:720px; }
.bin-review-scroll th { position:sticky; top:0; z-index:1; }
.bin-review-scroll :is(th,td) { padding:12px; text-align:left; vertical-align:top; white-space:normal; overflow-wrap:anywhere; }
.bin-review-scroll th { font-size:11px; }
.bin-review-scroll td { font-size:12px; line-height:1.5; }
.bin-allocation-form .bin-review-scroll :is(th,td):first-child { width:80px; min-width:80px; }
.bin-allocation-form .bin-review-scroll th:first-child { white-space:nowrap; overflow-wrap:normal; word-break:normal; }
.bin-allocation-form { display:grid; gap:14px; margin-top:16px; }
.bin-allocation-form > label:not(.bin-allocation-all) { display:grid; gap:8px; font-size:13px; }
.bin-allocation-all { display:flex; align-items:center; gap:8px; font-size:13px; }
.bin-allocation-form > button { justify-self:end; }
#binReasonFields { margin-top:18px; text-align:left; }
.bin-source-preview { margin-top:12px; }
.bin-source-preview .record-table-wrap { max-height:35dvh; }
@media(max-width:600px) { #binTimesheetDialog .duplicate-card { padding:16px; } .bin-review-issue { padding:12px; } }
.timesheet-report-summary strong { font-size:28px; line-height:1.2; }
@media(max-width:600px) { .timesheet-report-heading,.timesheet-report-package { padding:16px; } }

/* Keep the case heading compact while preserving every existing approval action. */
.reconciliation-list-actions { margin-inline-start:auto; justify-content:flex-end; }
button[data-super-admin-action="true"]::before,
button[data-super-admin-action="true"]::after { content:'*'; color:#c91c4c; font-weight:900; flex:none; }

.workspace-topbar-status > .workspace-month { margin: 0; }
.workspace-topbar-status > .workspace-month[hidden] { display:none; }
.workspace .workspace-month input[type="month"] {
  width: auto;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0;
  background-color: transparent;
  font: inherit;
}

.workspace-month input:focus { outline: none; }
.workspace-month:has(input:focus-visible) {
  outline: 2px solid var(--theme-rose-text);
  outline-offset: 2px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--theme-line);
  border-radius: 999px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.theme-toggle:hover { background: var(--theme-raised); }
.theme-toggle:focus-visible { outline: 2px solid var(--theme-rose-text); outline-offset: 3px; }
.theme-toggle--login { position: absolute; inset: 12px 20px auto auto; z-index: 2; }
.login-view:has(.theme-toggle) { padding-block-start: max(62px, 4vh); }

.workspace-topbar-preferences {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.whatsapp-support-link {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--theme-line);
  border-radius: 50%;
  background: var(--theme-surface);
  color: var(--theme-green-text);
}

.whatsapp-support-link[hidden] { display: none; }
.whatsapp-support-link:hover { background: var(--theme-green-surface); }
.whatsapp-support-link:focus-visible { outline: 2px solid var(--theme-rose-text); outline-offset: 3px; }

.whatsapp-support-link svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle__track {
  display: grid;
  align-items: center;
  width: 28px;
  height: 16px;
  padding: 2px;
  border: 1px solid var(--theme-line);
  border-radius: 999px;
  background: var(--theme-inset);
}

.theme-toggle__track::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--theme-muted);
}

.theme-toggle[aria-checked="true"] .theme-toggle__track { background: var(--theme-rose-surface); border-color: var(--theme-rose-line); }
.theme-toggle[aria-checked="true"] .theme-toggle__track::before { justify-self: end; background: var(--theme-rose-text); }

:root[data-theme="light"] {
  color-scheme: light;
  --theme-canvas: #f3f5fa;
  --theme-surface: #fff;
  --theme-raised: #eaf0f7;
  --theme-inset: #f7f9fc;
  --theme-line: #c7d1df;
  --theme-text: #172438;
  --theme-muted: #4c5c72;
  --theme-rose-text: #931f49;
  --theme-rose-surface: #fcecf2;
  --theme-rose-line: #d49aaf;
  --theme-green-text: #185740;
  --theme-green-surface: #e9f6ef;
  --theme-green-line: #91bda9;
  --theme-amber-text: #674913;
  --theme-amber-surface: #fff3d9;
  --theme-amber-line: #d3b576;
  --theme-blue-text: #284f7f;
  --theme-blue-surface: #eaf1fb;
  --theme-blue-line: #a5bad5;
  --theme-card-fill: linear-gradient(var(--theme-surface), var(--theme-surface));
  --theme-card-outline: var(--theme-line);
  --theme-action-outline: var(--theme-line);
  --line: var(--theme-line);
  --text-soft: var(--theme-muted);
  --danger: var(--theme-rose-text);
  --success: var(--theme-green-text);
}

[data-theme="light"] :is(body,.workspace,.splash,.login-view) { background: var(--theme-canvas); color: var(--theme-text); }
[data-theme="light"] :is(.workspace-sidebar,.workspace-topbar,.login-card,.review-card,.duplicate-card,.payment-dialog__card,.app-notice-card,.outlet-dialog,.migration-record-dialog,.worker-detail-card--editable .worker-detail-card__header,.worker-review-toolbar,.add-worker-dialog__card > .review-card__header,.add-worker-dialog__actions) {
  background: var(--theme-surface);
}

[data-theme="light"] .login-card { box-shadow: 0 16px 48px #25384d1a; }
[data-theme="light"] .global-preloader { background: #f3f5faeb; }
[data-theme="light"] .global-preloader__brand span { border-color: var(--theme-line); border-top-color: var(--theme-rose-text); }
[data-theme="light"] :is(.workspace-brand,.workspace-scope,.workspace-scope__switch,.workspace-scope__fixed,.workspace-nav__group,.workspace-sidebar__footer,.logout-button,.login-card__footer) { border-color: var(--theme-line); }
[data-theme="light"] :is(.workspace-scope__switch,.workspace-scope__fixed,.worker-tab.is-active,.crew-finance-flow [aria-current=page],.payment-editor-tab[aria-selected="true"],.crew-finance-tab[aria-selected="true"],.access-tabs button[aria-selected="true"]) { background: var(--theme-raised); }
[data-theme="light"] .admin-summary__avatar { background: var(--theme-green-surface); }
[data-theme="light"] :is(.section-number,.migration-page > .page-heading > .eyebrow) { color: var(--theme-rose-text); }
[data-theme="light"] :is(.record-table,.review-worker-table,.outlet-table,.worker-table,.payment-table,.migration-records-table) thead th { background: var(--theme-blue-surface); color: var(--theme-text); }
[data-theme="light"] .review-actions { background: var(--theme-surface); box-shadow: 0 -8px 14px var(--theme-surface); }
[data-theme="light"] .review-worker-stat.is-ready { background: var(--theme-green-surface) !important; border-color: var(--theme-green-line) !important; }
[data-theme="light"] .review-worker-stat.is-warning { background: var(--theme-amber-surface); }
[data-theme="light"] .review-worker-table tr.has-warning { background: var(--theme-amber-surface) !important; }
[data-theme="light"] .review-worker-table tr.has-blocker { background: var(--theme-rose-surface) !important; }
[data-theme="light"] :is(.calculation-summary__card.is-primary,.payment-summary article.is-primary,.payment-totals-grid > div.is-primary,.reconciliation-retrieve-control,.report-status:not(.report-status--success,.report-status--error)) { background: var(--theme-blue-surface); }
[data-theme="light"] :is(.workspace-scope__switch button.is-active,.worker-pagination button.is-current,.confirm-button,.danger-button,.compact-button--accept,.migration-card .migration-confirm-button:not(:disabled)) { color: #fff; }
[data-theme="light"] .app-alert { color: var(--theme-blue-text) !important; }
[data-theme="light"] .app-alert[data-alert-tone="error"] { color: var(--theme-rose-text) !important; }
[data-theme="light"] .app-alert[data-alert-tone="warning"] { color: var(--theme-amber-text) !important; }
[data-theme="light"] .app-alert[data-alert-tone="success"] { color: var(--theme-green-text) !important; }
[data-theme="light"] #loginView :is(.back-button,.resend-button,.resend-button:disabled) { color: var(--theme-muted); }
[data-theme="light"] #loginView .otp-heading strong { color: var(--theme-text); }
[data-theme="light"] .login-view :is(.input-shell input,.otp-input) { background: var(--theme-inset); border-color: var(--theme-line); color: var(--theme-text); }
[data-theme="light"] .login-view :is(.input-shell input,.otp-input):focus { border-color: var(--theme-rose-text); }
[data-theme="light"] :is(.workspace,dialog,.login-view) :is(input,textarea)::placeholder { color: var(--theme-muted); }

.worker-profile-rate-note {
  margin: 0 0 12px;
  color: var(--theme-muted);
}

@media (min-width: 1100px) {
  .worker-profile-field-group--rates .worker-profile-field-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
