:root {
  color-scheme: dark;
  --bg: #0d0e12;
  --surface: #1a1b20;
  --surface-2: #141519;
  --surface-3: #202126;
  --sidebar: #15161a;
  --text: #f5f6f8;
  --muted: #999da8;
  --muted-2: #747883;
  --line: #2c2e35;
  --line-strong: #3a3d45;
  --yellow: #ffe12f;
  --yellow-soft: rgba(255, 225, 47, 0.11);
  --green: #43df91;
  --green-soft: rgba(67, 223, 145, 0.11);
  --red: #ff7178;
  --red-soft: rgba(255, 113, 120, 0.11);
  --orange: #f7c948;
  --orange-soft: rgba(247, 201, 72, 0.11);
  --violet: #ad91ff;
  --violet-soft: rgba(173, 145, 255, 0.12);
  font-family: Inter, Manrope, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

/* Readability pass: the first prototype used presentation-sized microcopy.
   These minimums keep the same density while making everyday use easier. */
.nav-item { font-size: 12px; }
.role-card__line strong,
.profile strong { font-size: 14px; }
.role-card__line span,
.profile > div > span,
.sync-card span,
.sync-card small { font-size: 11px; }
.topbar > div:first-child > strong { font-size: 18px; }
.period-control span { font-size: 11px; }
.period-control strong,
.period-control b { font-size: 13px; }
.preview-banner p,
.stat-note,
.card-header p,
.helper,
.summary-caption,
.formula-box span,
.breakdown-row span,
.attention-item span,
.workspace-toolbar > div:first-child span,
.permission-card p,
.form-hint p,
.form-field > span small { font-size: 11px; }
.stat-card__head,
.field-label,
.card-header h2,
.attention-item strong,
.breakdown-row strong,
.formula-box strong,
.workspace-toolbar > div:first-child strong,
.form-field > span,
.permission-card strong { font-size: 13px; }
.card-header h2 { font-size: 16px; }
.badge,
.presence-indicator,
.button,
.button.small,
.tab,
.data-table td,
.payment-link { font-size: 11px; }
.data-table th { font-size: 10px; }
.employee-cell strong,
.presence-table .employee-cell strong { font-size: 13px; }
.employee-cell span,
.presence-table .employee-cell span { font-size: 10px; }

.work-status-badge {
  color: var(--status-color);
  border-color: color-mix(in srgb, var(--status-color) 52%, transparent);
  background: color-mix(in srgb, var(--status-color) 13%, transparent);
}
.work-status-badge > i,
.status-color-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--status-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--status-color) 12%, transparent);
}
.vip-badge {
  color: #111216;
  border-color: var(--yellow);
  background: linear-gradient(135deg, #ffe12f, #ffbe3d);
  box-shadow: 0 7px 22px rgba(255,225,47,.14);
}
.profile-status-line,
.employee-meta-badges,
.presence-status-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.profile-status-line { margin-top: 7px; }
.profile-status-line .badge { min-height: 20px; padding: 2px 7px; font-size: 9px; }
.employee-meta-badges { margin-top: 7px; }
.employee-meta-badges .badge { min-height: 21px; padding: 3px 7px; font-size: 9px; }
.presence-status-stack { align-items: flex-start; flex-direction: column; }

.collector-order-form-card { margin-bottom: 18px; }
.collector-order-form .actions { align-items: center; justify-content: flex-end; }
.collector-order-form .actions .helper { margin: 0 auto 0 0; }
.collector-orders-table { min-width: 760px; }
.leaderboard-table { min-width: 640px; }
.profile-status-line .badge,
.employee-meta-badges .badge { font-size: 11px; }
.status-definition-item > div:nth-child(2) strong { font-size: 14px; }
.status-definition-item > div:nth-child(2) span { font-size: 12px; }
.qc-order-upload__copy strong { font-size: 14px; }
.qc-order-upload__copy small,
.qc-order-file-preview span,
.qc-order-form-actions > span,
.qc-order-shift-control > div small { font-size: 11px; }
.qc-order-file-preview strong,
.qc-order-shift-control > div strong { font-size: 13px; }
.role-history-summary > div:first-child strong,
.role-history-summary__items b,
.role-timeline__head strong,
.close-wizard-check strong,
.close-wizard-confirm strong { font-size: 13px; }
.role-history-summary > div:first-child span,
.role-timeline__head span,
.role-timeline__items > div > span,
.salary-days-head span,
.salary-day-formula,
.close-wizard-check span,
.close-wizard-check li,
.close-wizard-confirm small { font-size: 11px; }
.leaderboard-rank { color: var(--yellow); font-size: 18px; }
.leaderboard-vip-row { background: linear-gradient(90deg, rgba(255,225,47,.07), transparent 55%); }
.leaderboard-vip-row td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }

.status-workspace-grid { grid-template-columns: minmax(300px, .8fr) minmax(560px, 1.6fr); }
.status-definition-list { display: grid; gap: 8px; padding: 0 18px 18px; }
.status-definition-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}
.status-definition-item.archived { opacity: .62; }
.status-definition-item > div:nth-child(2) strong,
.status-definition-item > div:nth-child(2) span { display: block; }
.status-definition-item > div:nth-child(2) strong { font-size: 14px; }
.status-definition-item > div:nth-child(2) span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.status-color-dot { --status-color: #64748b; }
.status-color-field input[type="color"] { min-height: 43px; padding: 5px; cursor: pointer; }
.status-assignment-select { min-width: 170px; }
.employee-status-table { min-width: 700px; }

@media (max-width: 760px), (max-device-width: 760px) {
  .nav-item { font-size: 12px; }
  .page-heading h1 { font-size: 27px; }
  .page-heading p { font-size: 13px; }
  .preview-banner p { font-size: 11px; }
  .mobile-sync-control strong { font-size: 12px; }
  .mobile-sync-control small,
  .mobile-sync-control > b { font-size: 10px; }
  .presence-table td::before { font-size: 9px; }
  .status-workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .status-definition-item { grid-template-columns: 14px minmax(0, 1fr); }
  .status-definition-item > .table-actions,
  .status-definition-item > .badge { grid-column: 2; justify-self: start; }
  .collector-order-form .actions { align-items: stretch; flex-direction: column; }
  .collector-order-form .actions .helper { margin: 0; }
  .collector-order-form .actions .button { width: 100%; }
}

* { box-sizing: border-box; }

html, body { min-width: 320px; min-height: 100%; margin: 0; background: var(--bg); }

body {
  color: var(--text);
  background:
    radial-gradient(circle at 76% -10%, rgba(255, 225, 47, 0.055), transparent 34rem),
    linear-gradient(180deg, #101116 0, #0d0e12 44rem);
}

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

.app-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 1100px; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: 252px;
  min-height: 1100px;
  padding: 24px 16px 18px;
  border-right: 1px solid #2a2c32;
  background: linear-gradient(180deg, rgba(255, 225, 47, 0.025), transparent 17rem), var(--sidebar);
}

.logo { display: block; width: 154px; height: 26px; margin: 0 6px 24px; }

.eyebrow {
  display: block;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.role-card {
  padding: 14px;
  margin-bottom: 22px;
  border: 1px solid #303239;
  border-radius: 15px;
  background: #1d1e23;
}

.role-card__line { display: flex; align-items: center; gap: 10px; margin-top: 12px; }

.role-mark, .avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #15161a;
  border-radius: 10px;
  background: var(--yellow);
  font-weight: 900;
}

.role-mark { width: 34px; height: 34px; font-size: 11px; }
.role-card__line strong, .role-card__line span { display: block; }
.role-card__line strong { font-size: 13px; }
.role-card__line span { margin-top: 3px; color: #8e929d; font-size: 10px; }

.prototype-role-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-top: 13px;
  padding: 3px;
  border-radius: 9px;
  background: #111216;
}

.prototype-role-switch button {
  min-width: 0;
  padding: 7px 3px;
  color: #8d919b;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-size: 8.5px;
  font-weight: 800;
}

.prototype-role-switch button:hover,
.prototype-role-switch button:focus-visible { color: #fff; background: #25262b; }
.prototype-role-switch button.active { color: #111216; background: var(--yellow); }

.nav-label {
  padding: 8px 12px 7px;
  color: #6f737e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav { display: grid; gap: 5px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: #a2a5ae;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.nav-item svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: #fff; background: #24252a; box-shadow: inset 3px 0 0 var(--yellow); }
.nav-item.active svg { color: var(--yellow); }
.nav-item .count { margin-left: auto; padding: 2px 7px; color: #111216; border-radius: 999px; background: var(--yellow); font-size: 10px; font-weight: 900; }

.sidebar-spacer { flex: 1; }

.sync-card {
  padding: 15px 13px;
  margin: 0 2px 14px;
  border: 1px solid #303239;
  border-radius: 14px;
  background: #1d1e23;
}

.sync-card__title { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 11px; }
.sync-card__title i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(67,223,145,.08); }
.sync-card span, .sync-card small { display: block; color: #c8cad0; font-size: 10px; }
.sync-card small { margin-top: 6px; color: #747883; }
.sync-card[data-sync-state="failed"] { border-color: rgba(255,113,120,.42); background: var(--red-soft); }
.sync-card[data-sync-state="failed"] .sync-card__title i { background: var(--red); box-shadow: 0 0 0 4px rgba(255,113,120,.1); }
.sync-card[data-sync-state="partial"],
.sync-card[data-sync-state="pending"] { border-color: rgba(247,201,72,.38); background: var(--orange-soft); }
.sync-card[data-sync-state="partial"] .sync-card__title i,
.sync-card[data-sync-state="pending"] .sync-card__title i,
.sync-card[data-sync-state="running"] .sync-card__title i { background: var(--orange); box-shadow: 0 0 0 4px rgba(247,201,72,.1); }
.sync-card[data-sync-state="disabled"] .sync-card__title i { background: var(--muted-2); box-shadow: 0 0 0 4px rgba(116,120,131,.1); }
.sync-card[role="button"] { cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.sync-card[role="button"]:hover { border-color: rgba(255,225,47,.3); background: rgba(255,225,47,.05); }

.mobile-sync-control { display: none; }

.profile { display: flex; align-items: center; gap: 10px; padding: 14px 6px 0; border-top: 1px solid #2b2d33; }
.avatar { width: 34px; height: 34px; font-size: 11px; }
.avatar-frame,
.profile-avatar-button {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
}
.avatar.avatar-frame > .avatar__initials { position: relative; z-index: 0; margin: 0; color: #15161a; font: inherit; }
.avatar__image { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar__image[hidden] { display: none; }
.avatar-button,
.profile-avatar-button { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.avatar-button::after,
.profile-avatar-button::after {
  position: absolute;
  z-index: 3;
  right: -1px;
  bottom: -1px;
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  color: #111217;
  border: 1px solid #17181d;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .5);
  content: "\270E";
  font: 900 9px/1 sans-serif;
}
.avatar-button:hover,
.profile-avatar-button:hover { transform: translateY(-1px); box-shadow: 0 0 0 3px var(--yellow-soft); }
.avatar-button:focus-visible,
.profile-avatar-button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.profile-avatar-button .avatar__initials { margin: 0; color: #15161a; font-size: inherit; }
.profile div { min-width: 0; flex: 1; }
.profile strong, .profile span { display: block; }
.profile strong { font-size: 12px; }
.profile span { margin-top: 3px; color: #858993; font-size: 10px; }
.profile .profile-logout { padding: 7px; color: #8e929c; border: 0; background: transparent; cursor: pointer; }

.avatar-modal[hidden] { display: none; }
.avatar-modal {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}
.avatar-modal__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(5, 6, 9, .78); backdrop-filter: blur(6px); cursor: default; }
.avatar-modal__card {
  position: relative;
  width: min(100%, 480px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .46);
}
.avatar-modal__header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.avatar-modal__header h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.025em; }
.avatar-modal__close { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; padding: 0 0 2px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; font-size: 22px; line-height: 1; }
.avatar-modal__close:hover { color: var(--text); border-color: var(--line-strong); }
.avatar-editor { padding: 24px 22px; }
.avatar-editor__person { display: flex; align-items: center; gap: 16px; }
.avatar-editor__person > div { min-width: 0; }
.avatar-editor__person strong,
.avatar-editor__person span { display: block; }
.avatar-editor__person strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.avatar-editor__person > div > span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.avatar-editor__preview { width: 104px; height: 104px; border-radius: 28px; font-size: 27px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.avatar-editor__hint { margin: 20px 0 16px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.avatar-editor__input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.avatar-editor__error,
.avatar-editor__status { min-height: 0; margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 10px; line-height: 1.45; }
.avatar-editor__error { color: var(--red); border: 1px solid rgba(255,113,120,.35); background: var(--red-soft); }
.avatar-editor__status { color: var(--muted); border: 1px solid var(--line); background: var(--surface-2); }
.avatar-editor__status:empty { display: none; }
.avatar-modal__actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 16px 22px 20px; border-top: 1px solid var(--line); }
.avatar-modal__actions [data-avatar-delete] { margin-right: auto; }
.avatar-editor__pick { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.avatar-modal[data-busy="true"] .avatar-editor__pick { pointer-events: none; opacity: .55; }
body.avatar-modal-open { overflow: hidden; }

.main { min-width: 0; grid-column: 2; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  padding: 0 42px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 17, 22, .9);
}

.topbar > div:first-child > strong { display: block; margin-top: 5px; font-size: 16px; }
.topbar__right { display: flex; align-items: center; gap: 12px; }

.period-control {
  display: grid;
  grid-template-columns: auto auto 12px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.period-control span { color: #7e828c; font-size: 9px; }
.period-control strong { font-size: 11px; }
.period-control b { color: #7e828c; font-size: 11px; }

.bell {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #d7d9de;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.bell svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bell i { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border: 1px solid var(--surface); border-radius: 50%; background: var(--yellow); }

.preview-banner { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 42px; border-bottom: 1px solid rgba(255,225,47,.08); background: rgba(255,225,47,.025); }
.preview-banner span { padding: 4px 8px; color: #111216; border-radius: 6px; background: var(--yellow); font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.preview-banner p { margin: 0; color: #9da0a9; font-size: 10px; }

.prototype-controls { display: flex; align-items: center; gap: 11px; margin-left: auto; }
.prototype-controls button {
  min-height: 29px;
  padding: 0 10px;
  color: #d9dadd;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #1a1b20;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}
.prototype-controls button:hover { border-color: var(--yellow); color: var(--yellow); }

.content { max-width: 1520px; padding: 26px 42px 38px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-heading h1 { margin: 0; font-size: 31px; font-weight: 850; letter-spacing: -.045em; }
.page-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.sheet-status { display: flex; align-items: center; gap: 8px; padding: 9px 12px; color: var(--green); border: 1px solid rgba(67,223,145,.25); border-radius: 10px; background: var(--green-soft); font-size: 10px; font-weight: 750; }
.sheet-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sheet-status.demo { color: var(--orange); border-color: currentColor; background: var(--orange-soft); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { min-height: 124px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.stat-card.accent { border-color: rgba(255,225,47,.4); box-shadow: inset 0 3px 0 rgba(255,225,47,.88); }
.stat-card__head { display: flex; align-items: center; justify-content: space-between; color: #a5a8b0; font-size: 10px; font-weight: 700; }
.stat-icon { display: grid; width: 28px; height: 28px; place-items: center; color: var(--yellow); border-radius: 9px; background: var(--yellow-soft); font-size: 12px; }
.stat-value { display: block; margin-top: 16px; font-size: 28px; font-weight: 850; letter-spacing: -.035em; }
.stat-value.yellow { color: var(--yellow); }
.stat-value.green { color: var(--green); }
.stat-note { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: #868a94; font-size: 9px; }

.grid-main { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(330px, .9fr); gap: 18px; margin-bottom: 18px; }
.grid-main.qc { grid-template-columns: minmax(0, 1.28fr) minmax(390px, .92fr); }

.card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.card-header { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-header h2 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: -.02em; }
.card-header p { margin: 5px 0 0; color: #878b95; font-size: 9px; }
.card-body { padding: 18px; }

.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 4px 9px; border: 1px solid currentColor; border-radius: 999px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.badge.red { color: var(--red); background: var(--red-soft); }
.badge.green { color: var(--green); background: var(--green-soft); }
.badge.orange { color: var(--orange); background: var(--orange-soft); }
.badge.violet { color: var(--violet); background: var(--violet-soft); }
.badge.neutral { color: #a9acb4; background: #292b31; }

.presence-indicator { display: inline-flex; align-items: center; gap: 7px; color: #8c909a; font-size: 9px; font-weight: 800; white-space: nowrap; }
.presence-indicator::before { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(140, 144, 154, 0.12); content: ""; }
.presence-indicator.online { color: var(--green); }
.presence-indicator.online::before { box-shadow: 0 0 0 3px var(--green-soft), 0 0 10px rgba(57, 214, 139, 0.35); }
.presence-indicator.offline { color: #777b85; }
.presence-last-seen { display: block; margin-top: 5px; color: #6f737d; font-size: 8px; white-space: nowrap; }
.presence-table { min-width: 680px; }
.presence-table .employee-cell { display: flex; align-items: center; gap: 10px; }
.presence-table .employee-cell .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 9px; }
.presence-table .employee-cell strong,
.presence-table .employee-cell span { display: block; }
.presence-table .employee-cell strong { font-size: 11px; }
.presence-table .employee-cell span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.presence-table tr[data-online="true"] { background: linear-gradient(90deg, rgba(67,223,145,.035), transparent 42%); }
.presence-table .presence-indicator { font-size: 10px; }
.presence-self { display: inline-flex !important; width: fit-content; margin-top: 5px !important; padding: 3px 6px; color: var(--yellow) !important; border-radius: 999px; background: var(--yellow-soft); font-size: 7px !important; font-weight: 850; }
.presence-account-pending { color: var(--orange); font-size: 9px; font-weight: 800; }
.presence-directory-note { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 11px 18px; color: var(--muted); border-top: 1px solid var(--line); background: rgba(18,19,23,.7); font-size: 8px; line-height: 1.45; }
.presence-directory-note i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

.field-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: #d8dae0; font-size: 11px; font-weight: 750; }
.field-label span { color: #858993; font-size: 9px; font-weight: 500; }

.money-field {
  display: flex;
  align-items: center;
  min-height: 66px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #131418;
}
.money-field.red { border-color: var(--red); background: linear-gradient(90deg, var(--red-soft), #131418 60%); box-shadow: 0 0 0 3px rgba(255,113,120,.07); }
.money-field.green { border-color: rgba(67,223,145,.7); background: linear-gradient(90deg, var(--green-soft), #131418 60%); box-shadow: 0 0 0 3px rgba(67,223,145,.06); }
.money-field.orange { border-color: rgba(247,201,72,.7); background: linear-gradient(90deg, var(--orange-soft), #131418 60%); }
.money-field b { color: #7f838d; font-size: 23px; }
.money-field strong { flex: 1; margin-left: 7px; font-size: 28px; letter-spacing: -.03em; }
.money-field span { color: #c1c4ca; font-size: 11px; font-weight: 750; }

.prototype-money-input {
  min-width: 0;
  flex: 1;
  height: 62px;
  padding: 0 8px;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -.03em;
}

.prototype-money-input[aria-invalid="true"] { color: var(--red); }

.helper { margin: 9px 0 14px; color: #848893; font-size: 9px; line-height: 1.5; }

.compare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 14px; }
.compare-cell { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.compare-cell span, .compare-cell strong { display: block; }
.compare-cell span { color: #878b95; font-size: 9px; }
.compare-cell strong { margin-top: 8px; font-size: 16px; }
.compare-cell.danger { border-color: rgba(255,113,120,.35); background: var(--red-soft); }
.compare-cell.danger strong { color: var(--red); }
.compare-cell.success { border-color: rgba(67,223,145,.28); background: var(--green-soft); }
.compare-cell.success strong { color: var(--green); }

.alert { display: flex; align-items: flex-start; gap: 11px; padding: 12px; margin-top: 13px; border: 1px solid; border-radius: 11px; }
.alert__icon { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 900; }
.alert strong, .alert span { display: block; }
.alert strong { margin-top: 1px; font-size: 10px; }
.alert span { margin-top: 5px; font-size: 9px; line-height: 1.45; opacity: .78; }
.alert.red { color: #ff9ca1; border-color: rgba(255,113,120,.26); background: var(--red-soft); }
.alert.red .alert__icon { color: var(--red); background: rgba(255,113,120,.12); }
.alert.green { color: #83edb7; border-color: rgba(67,223,145,.24); background: var(--green-soft); }
.alert.green .alert__icon { color: var(--green); background: rgba(67,223,145,.12); }
.alert.orange { color: #f2d777; border-color: rgba(247,201,72,.25); background: var(--orange-soft); }
.alert.orange .alert__icon { color: var(--orange); background: rgba(247,201,72,.12); }
.alert.neutral { color: #c2c4ca; border-color: var(--line); background: var(--surface-2); }
.alert.neutral .alert__icon { color: #a6a9b1; background: #292b31; }

.actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.button { min-height: 40px; padding: 0 15px; border-radius: 10px; font-size: 10px; font-weight: 850; }
.button.secondary { color: #ededf0; border: 1px solid var(--line-strong); background: #1a1b20; }
.button.primary { color: #111216; border: 1px solid var(--yellow); background: var(--yellow); }
.button.danger { color: #ffadb1; border: 1px solid rgba(255,113,120,.4); background: var(--red-soft); }
.button.small { min-height: 31px; padding: 0 10px; font-size: 9px; }
.button:not(:disabled) { cursor: pointer; }
.button:disabled { cursor: not-allowed; opacity: .56; }
.button:not(:disabled):hover { filter: brightness(1.08); transform: translateY(-1px); }

.summary-card { border-color: rgba(255,225,47,.35); box-shadow: inset 0 3px 0 rgba(255,225,47,.88); background: radial-gradient(circle at 100% 0%, rgba(255,225,47,.07), transparent 13rem), var(--surface); }
.summary-eyebrow { color: #9b9ea7; font-size: 9px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.summary-total { display: block; margin-top: 16px; color: var(--yellow); font-size: 42px; font-weight: 900; letter-spacing: -.05em; }
.summary-caption { margin: 7px 0 16px; color: #8c909a; font-size: 9px; line-height: 1.45; }
.breakdown { display: grid; gap: 8px; }
.breakdown-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 43px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.breakdown-row span { color: #90949e; font-size: 9px; }
.breakdown-row strong { font-size: 12px; }
.breakdown-row.final { border-color: rgba(255,225,47,.25); background: var(--yellow-soft); }
.breakdown-row.final span, .breakdown-row.final strong { color: var(--yellow); }

.formula-box { padding: 13px; margin-top: 14px; border: 1px solid var(--line); border-radius: 11px; background: #121317; }
.formula-box span { display: block; color: #7f838d; font-size: 9px; }
.formula-box strong { display: block; margin-top: 7px; font-size: 12px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 14px; color: #898d97; border-bottom: 1px solid var(--line); background: #131418; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 13px 14px; color: #d6d8dd; border-bottom: 1px solid var(--line); font-size: 10px; }
.data-table tr:last-child td { border-bottom: 0; }
.money { color: #fff; font-weight: 800; }
.money.red { color: var(--red); }
.money.green { color: var(--green); }
.muted { color: #838791; }

.two-bottom { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .72fr); gap: 18px; }

.attention-list { display: grid; gap: 10px; }
.attention-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.attention-icon { display: grid; width: 34px; height: 34px; place-items: center; color: var(--red); border-radius: 10px; background: var(--red-soft); font-size: 12px; font-weight: 900; }
.attention-item strong, .attention-item span { display: block; }
.attention-item strong { font-size: 10px; }
.attention-item span { margin-top: 4px; color: #81858f; font-size: 9px; }
.attention-item a { color: #8db3ff; font-size: 9px; font-weight: 800; }
.attention-icon.green-icon { color: #101216; background: var(--green); }

.tabs { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #121317; }
.tab { padding: 7px 10px; color: #858993; border-radius: 7px; cursor: pointer; font-size: 9px; font-weight: 750; }
.tab.active { color: #111216; background: var(--yellow); }

.salary-stack { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 4px; }
.salary-part { min-height: 110px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.salary-part span, .salary-part strong, .salary-part small { display: block; }
.salary-part span { color: #92969f; font-size: 9px; }
.salary-part strong { margin-top: 13px; font-size: 22px; letter-spacing: -.035em; }
.salary-part small { margin-top: 8px; color: #747883; font-size: 8px; line-height: 1.4; }
.salary-part.sales { border-color: rgba(173,145,255,.25); background: var(--violet-soft); }
.salary-part.direct-orders { border-color: rgba(82,162,255,.28); background: rgba(82,162,255,.075); }
.salary-part.direct-orders strong { color: #8dbdff; }
.salary-part.bonus { border-color: rgba(67,223,145,.25); background: var(--green-soft); }
.salary-part.bonus strong { color: var(--green); }

.qc-daily-report {
  padding: 16px;
  margin-top: 12px;
  border: 1px solid rgba(255,225,47,.34);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(255,225,47,.075), rgba(19,20,24,.96) 42%);
}
.qc-daily-report__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.qc-daily-report__head > div > span,
.qc-daily-report__head > div > strong,
.qc-daily-report__head > div > small { display: block; }
.qc-daily-report__head > div > span { color: var(--yellow); font-size: 9px; font-weight: 850; }
.qc-daily-report__head > div > strong { margin-top: 5px; font-size: 16px; letter-spacing: -.015em; }
.qc-daily-report__head > div > small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.qc-daily-report .field-label { margin-top: 0; }
.qc-daily-report .money-field:focus-within { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,225,47,.07); }
.qc-daily-formula {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr) auto minmax(0, 1.1fr);
  gap: 8px;
  align-items: stretch;
  margin-top: 12px;
}
.qc-daily-formula > div { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.qc-daily-formula > div.accent { border-color: rgba(255,225,47,.34); background: var(--yellow-soft); }
.qc-daily-formula span,
.qc-daily-formula strong,
.qc-daily-formula small { display: block; }
.qc-daily-formula span { color: var(--muted); font-size: 8px; line-height: 1.35; }
.qc-daily-formula strong { margin-top: 7px; font-size: 15px; }
.qc-daily-formula small { margin-top: 4px; color: #737782; font-size: 7px; line-height: 1.35; }
.qc-daily-formula > i { display: grid; place-items: center; color: #686d77; font-size: 14px; font-style: normal; font-weight: 900; }
.qc-daily-alert { margin-bottom: 0; }
.qc-daily-report__actions { align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); }
.qc-daily-report__actions > span { max-width: 420px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.qc-daily-report__actions .button { min-width: 178px; }

.qc-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 18px; margin-top: 12px; border: 1px solid rgba(255,225,47,.35); border-radius: 12px; background: var(--yellow-soft); }
.qc-total span, .qc-total small { display: block; }
.qc-total span { color: #d8c65d; font-size: 9px; }
.qc-total small { margin-top: 6px; color: #8e895f; font-size: 8px; }
.qc-total strong { color: var(--yellow); font-size: 34px; letter-spacing: -.045em; }

.qc-sales-total-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr); gap: 12px; margin-top: 12px; }
.qc-sales-entry { display: grid; gap: 12px; padding: 16px; border: 1px solid rgba(173,145,255,.28); border-radius: 12px; background: linear-gradient(145deg, rgba(173,145,255,.10), rgba(24,25,30,.92)); }
.qc-sales-entry__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.qc-sales-entry__head span,
.qc-sales-entry__head small { display: block; }
.qc-sales-entry__head > div > span { font-size: 11px; font-weight: 800; }
.qc-sales-entry__head > div > small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.qc-sales-entry__fields { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(150px, 1.25fr) minmax(90px, .7fr); gap: 9px; align-items: end; }
.qc-rate-box { min-height: 63px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.qc-rate-box span,
.qc-rate-box strong { display: block; }
.qc-rate-box span { color: var(--muted); font-size: 8px; }
.qc-rate-box strong { margin-top: 8px; font-size: 15px; }
.qc-sales-input { display: grid; gap: 6px; }
.qc-sales-input > span { color: #d6d8dd; font-size: 8px; font-weight: 750; }
.qc-sales-input > div { display: flex; align-items: center; min-height: 43px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; background: #121317; }
.qc-sales-input > div:focus-within { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,225,47,.07); }
.qc-sales-input b { padding-left: 11px; color: var(--yellow); font-size: 13px; }
.qc-sales-input input { width: 100%; min-width: 0; padding: 0 10px; color: var(--text); border: 0; outline: 0; background: transparent; font-size: 13px; font-weight: 800; }
.qc-sales-input input[aria-invalid="true"] { color: var(--red); }
.qc-sales-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px dashed rgba(173,145,255,.34); border-radius: 10px; }
.qc-sales-preview span { color: var(--muted); font-size: 8px; }
.qc-sales-preview strong { color: var(--violet); font-size: 15px; }
.qc-sales-entry .button { width: 100%; }
.qc-sales-owner-note { color: #777b85; font-size: 8px; line-height: 1.4; text-align: center; }
.qc-sales-total-grid .qc-total { align-items: flex-start; flex-direction: column; justify-content: space-between; margin-top: 0; }
.qc-sales-total-grid .qc-total strong { margin-top: 18px; }

.approval-list { display: grid; gap: 10px; }
.approval-item { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.approval-head { display: flex; align-items: center; gap: 9px; }
.approval-head .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 9px; }
.approval-head div { flex: 1; }
.approval-head strong, .approval-head span { display: block; }
.approval-head strong { font-size: 10px; }
.approval-head span { margin-top: 3px; color: #81858f; font-size: 8px; }
.approval-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 11px; }
.approval-values div { padding: 8px; border-radius: 8px; background: #101115; }
.approval-values span, .approval-values strong { display: block; }
.approval-values span { color: #777b85; font-size: 7px; text-transform: uppercase; }
.approval-values strong { margin-top: 5px; font-size: 10px; }
.approval-values .diff strong { color: var(--red); }
.approval-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 10px; }

.tier-track { display: grid; grid-template-columns: .7fr 1fr 1.2fr 1fr 1fr 1fr; gap: 5px; margin-top: 14px; }
.tier { position: relative; min-height: 58px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.tier.active { border-color: rgba(255,225,47,.7); background: var(--yellow-soft); box-shadow: inset 0 2px 0 var(--yellow); }
.tier span, .tier strong { display: block; }
.tier span { color: #7e828c; font-size: 7px; }
.tier strong { margin-top: 8px; font-size: 11px; }
.tier.active strong { color: var(--yellow); }
.tier i { position: absolute; top: -7px; right: 7px; padding: 2px 5px; color: #111216; border-radius: 5px; background: var(--yellow); font-size: 6px; font-style: normal; font-weight: 900; text-transform: uppercase; }

.role-note { display: flex; align-items: center; gap: 8px; color: #858993; font-size: 9px; }
.role-note b { color: var(--yellow); }

.prototype-empty {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: #8b8f98;
  text-align: center;
}
.prototype-empty > span { display: grid; width: 42px; height: 42px; place-items: center; color: var(--green); border-radius: 50%; background: var(--green-soft); font-size: 18px; font-weight: 900; }
.prototype-empty strong { color: #eceef1; font-size: 13px; }
.prototype-empty p { margin: 0; font-size: 9px; }

.prototype-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: 390px;
  padding: 13px 16px;
  color: #111216;
  border-radius: 11px;
  background: var(--green);
  box-shadow: 0 18px 45px rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: 180ms ease;
  font-size: 10px;
  font-weight: 850;
}
.prototype-toast.error { color: #fff; background: #d94c55; }
.prototype-toast.neutral { color: #f1f2f4; border: 1px solid var(--line-strong); background: #24262d; }
.prototype-toast.show { opacity: 1; transform: translateY(0); }

[hidden] { display: none !important; }

.stat-value.compact {
  margin-top: 20px;
  font-size: 18px;
  letter-spacing: -.02em;
}

.stat-value.payment-status-value { font-size: 21px; }
.red-text { color: var(--red); }
.yellow-icon { color: var(--yellow); background: var(--yellow-soft); }

.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, .72fr);
  gap: 18px;
}

.payment-form-card { min-height: 610px; }
.payment-type-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  margin-bottom: 19px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111216;
}

.payment-type-switch button {
  min-height: 42px;
  color: #9397a1;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}

.payment-type-switch button:hover,
.payment-type-switch button:focus-visible { color: #fff; background: #23242a; }
.payment-type-switch button.active { color: #111216; background: var(--yellow); }

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

.form-field { display: grid; align-content: start; gap: 8px; min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-field > span { color: #d6d8dd; font-size: 10px; font-weight: 750; }
.form-field > span small { color: #7e828c; font-size: 8px; font-weight: 500; }
.form-field input,
.form-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: #f1f2f4;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  background: #121317;
  font-size: 10px;
}

.form-field select { cursor: pointer; }
.form-field input::placeholder { color: #666a75; }
.form-field input:focus,
.form-field select:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,225,47,.07); }
.form-field input[aria-invalid="true"],
.form-field select[aria-invalid="true"] { border-color: var(--red); }
.employee-report-date-field {
  width: min(280px, 100%);
  margin-bottom: 14px;
}
.employee-report-date-field input {
  min-width: 0;
  color-scheme: dark;
  font-size: 13px;
}
.field-label > b { font: inherit; }
.form-hint { min-height: 72px; padding: 11px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); }
.form-hint p { margin: 0; color: #7f838e; font-size: 9px; line-height: 1.45; }
.payment-warning { margin: 14px 0 0; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  margin-top: 13px;
  color: #b6b9c1;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 9px;
  line-height: 1.45;
  cursor: pointer;
}

.form-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--yellow); }
.form-check input[aria-invalid="true"] { outline: 2px solid var(--red); outline-offset: 2px; }
.form-errors { padding: 10px 12px; margin-top: 13px; color: #ffafb3; border: 1px solid rgba(255,113,120,.35); border-radius: 10px; background: var(--red-soft); font-size: 9px; line-height: 1.5; }
.payment-actions { align-items: center; justify-content: space-between; padding-top: 15px; border-top: 1px solid var(--line); }
.payment-actions > span { color: #747883; font-size: 8px; }
.npd-check-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.npd-check-row span, .npd-check-row strong { display: block; }
.npd-check-row span { color: #848893; font-size: 8px; }
.npd-check-row strong { margin-top: 5px; font-size: 10px; }
.payment-help .formula-box strong { color: #ddd08b; font-size: 10px; line-height: 1.55; }

.table-scroll { overflow-x: auto; }
.owner-grid { grid-template-columns: minmax(0, 1.18fr) minmax(400px, .82fr); }
.close-period-bar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 15px;
  padding: 15px 17px;
  margin-bottom: 18px;
  border: 1px solid rgba(67,223,145,.28);
  border-radius: 15px;
  background: linear-gradient(90deg, rgba(67,223,145,.09), rgba(255,225,47,.035));
}
.close-period-icon { display: grid; width: 42px; height: 42px; place-items: center; color: #101216; border-radius: 12px; background: var(--green); font-size: 17px; font-weight: 950; }
.close-period-copy span, .close-period-copy strong, .close-period-copy small { display: block; }
.close-period-copy span { color: #8d919b; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.close-period-copy strong { margin-top: 5px; font-size: 12px; }
.close-period-copy small { margin-top: 5px; color: #7e828c; font-size: 8px; line-height: 1.45; }
.close-period-total { min-width: 100px; text-align: right; }
.close-period-total span, .close-period-total strong { display: block; }
.close-period-total span { color: #858993; font-size: 8px; }
.close-period-total strong { margin-top: 5px; color: var(--green); font-size: 20px; letter-spacing: -.03em; }
.paid-button { min-height: 43px; color: #101216; border: 1px solid var(--green); background: var(--green); }
.paid-button:disabled { color: #767a83; border-color: var(--line); background: #24262b; }
.owner-tabs .tab { border: 0; background: transparent; }
.owner-tabs .tab.active { background: var(--yellow); }
.owner-attention-card { margin-bottom: 18px; border-color: rgba(255,225,47,.18); }
.owner-attention-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.owner-attention-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 11px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
}
.owner-attention-item:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.owner-attention-item.danger { border-color: rgba(255,113,120,.26); background: var(--red-soft); }
.owner-attention-item.warning { border-color: rgba(255,225,47,.24); background: var(--yellow-soft); }
.owner-attention-item.ready { border-color: rgba(67,223,145,.18); }
.owner-attention-icon { display: grid; width: 34px; height: 34px; margin: 0 !important; place-items: center; color: #111216 !important; border-radius: 10px; background: var(--yellow); font-size: 10px !important; font-weight: 950; }
.owner-attention-item.danger .owner-attention-icon { background: var(--red); }
.owner-attention-item.ready .owner-attention-icon { background: var(--green); }
.owner-attention-item.info .owner-attention-icon { color: var(--green) !important; background: rgba(67,223,145,.12); }
.owner-attention-item strong, .owner-attention-item small { display: block; }
.owner-attention-item strong { font-size: 10px; }
.owner-attention-item small { margin-top: 5px; color: #858993; font-size: 8px; line-height: 1.4; }
.owner-attention-item > b { color: #9ab9ff; font-size: 8px; white-space: nowrap; }
.owner-role-table td { padding-top: 17px; padding-bottom: 17px; }
.owner-payroll-card { margin-bottom: 18px; }
.owner-table { min-width: 1050px; }
.owner-table .employee-cell,
.owner-payment-table .employee-cell { display: flex; align-items: center; gap: 9px; }
.owner-table .employee-cell .avatar,
.owner-payment-table .employee-cell .avatar { width: 29px; height: 29px; border-radius: 8px; font-size: 8px; }
.owner-table .employee-cell strong,
.owner-table .employee-cell span,
.owner-payment-table .employee-cell strong,
.owner-payment-table .employee-cell span { display: block; }
.owner-table .employee-cell strong,
.owner-payment-table .employee-cell strong { font-size: 10px; }
.owner-table .employee-cell span,
.owner-payment-table .employee-cell span { margin-top: 3px; color: #757984; font-size: 8px; }
.owner-table .row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.owner-table .button { white-space: nowrap; }
.table-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.payment-link { max-width: 150px; padding: 0; overflow: hidden; color: #b9bdc6; border: 0; background: transparent; cursor: pointer; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.payment-link:hover { color: var(--yellow); }
.payment-link:disabled { color: #666a74; cursor: not-allowed; }
.owner-total-row td { border-top: 1px solid rgba(255,225,47,.35); background: var(--yellow-soft); }
.header-actions { display: flex; gap: 8px; }
.owner-foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .7fr); gap: 18px; }
.prototype-empty.compact { min-height: 160px; }
.bonus-log-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.bonus-log-item + .bonus-log-item { margin-top: 8px; }
.bonus-log-item strong, .bonus-log-item span { display: block; }
.bonus-log-item strong { font-size: 10px; }
.bonus-log-item span { margin-top: 4px; color: #7f838e; font-size: 8px; }
.bonus-log-item > b { color: var(--green); font-size: 13px; }

.payment-directory-head { gap: 20px; }
.payment-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.payment-filters button {
  min-height: 30px;
  padding: 0 10px;
  color: #92969f;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121317;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}
.payment-filters button.active { color: #111216; border-color: var(--yellow); background: var(--yellow); }
.owner-payment-table { min-width: 1020px; }
.payment-amount { display: grid; gap: 6px; min-width: 0; }
.payment-amount > strong { color: var(--yellow); font-size: 20px; font-variant-numeric: tabular-nums; }
.payment-amount > small { color: var(--muted); font-size: 12px; line-height: 1.45; white-space: normal; }
.payment-amount--modal { padding: 16px; margin-bottom: 16px; border: 1px solid rgba(255,225,47,.3); border-radius: 12px; background: var(--yellow-soft); }
.payment-amount--modal > strong { font-size: 28px; }
.payment-amount--modal > span { font-size: 14px; line-height: 1.5; }
.payment-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.payment-row-actions .button { white-space: normal; }
@media (max-width: 760px), (max-device-width: 760px) {
  .owner-payment-table { display: block; min-width: 0; width: 100%; }
  .owner-payment-table thead { display: none; }
  .owner-payment-table tbody { display: grid; gap: 14px; padding: 12px; }
  .owner-payment-table tr { display: grid; min-width: 0; padding: 6px; border: 1px solid var(--line); border-radius: 12px; }
  .owner-payment-table td { display: block; min-width: 0; padding: 9px; white-space: normal; overflow-wrap: anywhere; }
  .owner-payment-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
  .payment-row-actions { flex-direction: column; }
  .payment-row-actions .button { width: 100%; }
  [data-payment-modal] .detail-row { grid-template-columns: minmax(0, 1fr); }
}
.directory-note { margin-top: 18px; }

.archive-card { margin-bottom: 18px; }
.archive-table { min-width: 980px; }
.archive-table .button { white-space: nowrap; }
.archive-explainer { margin-top: 18px; }
.archive-period strong, .archive-period span { display: block; }
.archive-period strong { font-size: 10px; }
.archive-period span { margin-top: 4px; color: #767a84; font-size: 8px; }
.archive-modal-card { width: min(760px, 100%); }
.archive-modal-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 14px; }
.archive-modal-summary > div { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #121317; }
.archive-modal-summary span, .archive-modal-summary strong { display: block; }
.archive-modal-summary span { color: #7f838d; font-size: 8px; }
.archive-modal-summary strong { margin-top: 7px; font-size: 14px; }
.archive-people { display: grid; gap: 7px; }
.archive-person { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: #121317; }
.archive-person strong, .archive-person span { display: block; }
.archive-person strong { font-size: 9px; }
.archive-person span { margin-top: 4px; color: #777b86; font-size: 8px; }
.archive-person > b { font-size: 11px; }
.archive-person > em { color: #8d919b; font-size: 8px; font-style: normal; }

.prototype-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 30px; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(5,6,9,.78); backdrop-filter: blur(5px); cursor: pointer; }
.modal-card { position: relative; z-index: 1; width: min(560px, 100%); max-height: calc(100vh - 60px); overflow: auto; border: 1px solid #444750; border-radius: 16px; background: #1a1b20; box-shadow: 0 30px 100px rgba(0,0,0,.62); }
.modal-card > header { display: flex; align-items: center; justify-content: space-between; padding: 18px; border-bottom: 1px solid var(--line); }
.modal-card h2 { margin: 6px 0 0; font-size: 18px; }
.modal-card > header > button { display: grid; width: 34px; height: 34px; place-items: center; color: #a9adb6; border: 1px solid var(--line); border-radius: 9px; background: #121317; cursor: pointer; font-size: 20px; }
.modal-content { padding: 18px; }
.modal-person { display: flex; align-items: center; gap: 10px; padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid var(--line); }
.modal-person strong, .modal-person span { display: block; }
.modal-person strong { font-size: 12px; }
.modal-person span { margin-top: 4px; color: #858993; font-size: 9px; }
.detail-list { display: grid; gap: 8px; }
.detail-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #121317; }
.detail-row > span { color: #828690; font-size: 8px; }
.detail-row > strong { min-width: 0; overflow-wrap: anywhere; font-size: 10px; }
.copy-mini { min-height: 27px; padding: 0 8px; color: var(--yellow); border: 1px solid rgba(255,225,47,.28); border-radius: 7px; background: var(--yellow-soft); cursor: pointer; font-size: 8px; font-weight: 800; }
.modal-note { margin-top: 14px; color: #848893; font-size: 8px; line-height: 1.55; }
.salary-breakdown-modal-card { width: min(1040px, 100%); }
.salary-formula-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 14px; border: 1px solid rgba(255,225,47,.28); border-radius: 12px; background: var(--yellow-soft); }
.salary-formula-box span { grid-column: 1 / -1; color: #9b9eaa; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.salary-formula-box strong { font-size: 11px; line-height: 1.55; }
.salary-formula-box b { align-self: center; color: var(--yellow); font-size: 16px; white-space: nowrap; }
.salary-breakdown-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 16px; }
.salary-breakdown-summary > div { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.salary-breakdown-summary span, .salary-breakdown-summary strong { display: block; }
.salary-breakdown-summary span { color: #858993; font-size: 8px; }
.salary-breakdown-summary strong { margin-top: 7px; font-size: 13px; }
.role-history-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: #d9dbe0;
  font-size: 8px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}
.role-history-chip--operator { color: #78b9ff; border-color: rgba(79,154,255,.3); background: rgba(79,154,255,.09); }
.role-history-chip--collector { color: var(--green); border-color: rgba(67,223,145,.3); background: var(--green-soft); }
.role-history-chip--qc { color: var(--yellow); border-color: rgba(255,225,47,.3); background: var(--yellow-soft); }
.role-history-chip--owner { color: #c8a7ff; border-color: rgba(171,125,255,.3); background: rgba(171,125,255,.09); }

.role-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(255,225,47,.045), transparent);
}
.role-history-summary > div:first-child strong,
.role-history-summary > div:first-child span { display: block; }
.role-history-summary > div:first-child strong { font-size: 10px; }
.role-history-summary > div:first-child span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.role-history-summary__items { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.role-history-summary__items > span { display: grid; grid-template-columns: auto auto; align-items: center; gap: 4px 8px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.role-history-summary__items b { font-size: 10px; }
.role-history-summary__items small { grid-column: 1 / -1; color: var(--muted); font-size: 7px; text-align: right; }
.role-history-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.role-history-table-scroll > .data-table { min-width: 860px; }
.role-history-table-scroll:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }

.role-timeline { padding: 13px; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.role-timeline__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.role-timeline__head strong { font-size: 10px; }
.role-timeline__head span { color: var(--muted); font-size: 8px; }
.role-timeline__items { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.role-timeline__items > div { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 9px; background: #121317; }
.role-timeline__items > div > span { color: var(--muted); font-size: 8px; }
.role-timeline__items > div > b { color: var(--yellow); font-size: 7px; text-transform: uppercase; }
.role-change-button { border-color: rgba(255,225,47,.28); }
.salary-days-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 9px; }
.salary-days-head strong { font-size: 11px; }
.salary-days-head span { color: #858993; font-size: 8px; }
.salary-days-table { min-width: 930px; }
.salary-day-formula { display: block; max-width: 260px; color: #b8bbc4; font-size: 8px; line-height: 1.5; white-space: normal; }
.salary-empty { margin-top: 12px; }
.close-wizard-card { width: min(820px, 100%); }
.close-wizard-summary { display: grid; grid-template-columns: 1.15fr .8fr 1fr; gap: 8px; margin-bottom: 12px; }
.close-wizard-summary > div { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.close-wizard-summary span, .close-wizard-summary strong { display: block; }
.close-wizard-summary span { color: #858993; font-size: 8px; }
.close-wizard-summary strong { margin-top: 7px; font-size: 12px; }
.close-wizard-checks { display: grid; gap: 8px; }
.close-wizard-check { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.close-wizard-check.blocked { border-color: rgba(255,113,120,.26); background: var(--red-soft); }
.close-wizard-check.waiting { border-color: var(--line-strong); background: var(--surface-3); }
.close-wizard-check > i { display: grid; width: 34px; height: 34px; place-items: center; color: #111216; border-radius: 10px; background: var(--red); font-size: 10px; font-style: normal; font-weight: 950; }
.close-wizard-check.ready > i { background: var(--green); }
.close-wizard-check.waiting > i { color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); }
.close-wizard-check strong, .close-wizard-check span { display: block; }
.close-wizard-check strong { font-size: 10px; }
.close-wizard-check span { margin-top: 4px; color: #878b95; font-size: 8px; }
.close-wizard-check ul { padding: 0; margin: 7px 0 0; list-style: none; }
.close-wizard-check li { color: #b9bcc5; font-size: 8px; line-height: 1.55; }
.close-wizard-note { margin-top: 12px; }
.close-wizard-confirm { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 12px; margin-top: 12px; border: 1px solid rgba(67,223,145,.25); border-radius: 11px; background: rgba(67,223,145,.055); cursor: pointer; }
.close-wizard-confirm:has(input:disabled) { opacity: .48; cursor: not-allowed; }
.close-wizard-confirm input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--green); }
.close-wizard-confirm strong, .close-wizard-confirm small { display: block; }
.close-wizard-confirm strong { font-size: 10px; }
.close-wizard-confirm small { margin-top: 5px; color: #858993; font-size: 8px; line-height: 1.5; }
.close-wizard-actions { justify-content: flex-end; padding-top: 14px; }
.invite-modal-card { width: min(680px, 100%); }
.invite-link-field { display: grid; gap: 8px; }
.invite-link-field > span { color: #b8bbc3; font-size: 9px; font-weight: 800; }
.invite-link-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  background: #121317;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
}
.invite-link-field input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.invite-expiry { margin: 11px 0 0; color: #a9adb6; font-size: 9px; line-height: 1.5; }
.invite-actions { align-items: center; }

.workspace-page { display: grid; gap: 18px; }
.workspace-page .page-heading,
.workspace-page .stats-grid { margin-bottom: 0; }
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .72fr);
  gap: 18px;
  align-items: start;
}
.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px;
}
.workspace-toolbar > div:first-child strong,
.workspace-toolbar > div:first-child span { display: block; }
.workspace-toolbar > div:first-child strong { font-size: 11px; }
.workspace-toolbar > div:first-child span { margin-top: 5px; color: #7f838d; font-size: 9px; }
.toolbar-actions,
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.filter-chips button {
  min-height: 31px;
  padding: 0 10px;
  color: #9498a2;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121317;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}
.filter-chips button:hover { color: #fff; border-color: var(--line-strong); }
.filter-chips button.active { color: #111216; border-color: var(--yellow); background: var(--yellow); }
.workspace-table { min-width: 760px; }
.workspace-wide-button { width: 100%; margin-top: 14px; }
.workspace-empty { min-height: 300px; }
.workspace-empty .button { margin-top: 9px; }
.period-ring {
  display: grid;
  width: 142px;
  height: 142px;
  margin: 4px auto 18px;
  place-items: center;
  align-content: center;
  border: 9px solid #292b31;
  border-top-color: var(--yellow);
  border-right-color: var(--yellow);
  border-radius: 50%;
}
.period-ring strong { color: var(--yellow); font-size: 24px; letter-spacing: -.04em; }
.period-ring span { margin-top: 6px; color: #888c96; font-size: 8px; }
.compare-grid.large .compare-cell { min-height: 82px; padding: 15px; }
.compare-grid.large .compare-cell strong { margin-top: 10px; font-size: 18px; }
.case-comment { margin-top: 14px; }
.case-comment label,
.case-comment label > span { display: block; }
.case-comment label > span { margin-bottom: 8px; color: #aeb1ba; font-size: 9px; font-weight: 750; }
.case-comment textarea {
  width: 100%;
  min-height: 88px;
  padding: 12px;
  resize: vertical;
  color: #eff0f3;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  background: #121317;
  font-size: 10px;
  line-height: 1.5;
}
.case-comment textarea:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,225,47,.07); }
.activity-list { display: grid; gap: 10px; }
.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}
.activity-item i { display: grid; width: 34px; height: 34px; place-items: center; color: #111216; border-radius: 10px; background: var(--green); font-size: 11px; font-style: normal; font-weight: 900; }
.activity-item.current { border-color: rgba(255,225,47,.35); background: var(--yellow-soft); }
.activity-item.current i { background: var(--yellow); }
.activity-item strong,
.activity-item span { display: block; }
.activity-item strong { font-size: 10px; }
.activity-item span { margin-top: 5px; color: #7e828c; font-size: 8px; }
.payout-method-card { text-align: center; }
.payout-method-card .payout-method-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 5px auto 14px;
  place-items: center;
  color: #111216;
  border-radius: 18px;
  background: var(--yellow);
  font-size: 14px;
  font-weight: 950;
}
.payout-method-card > strong { display: block; font-size: 14px; }
.payout-method-card > p { margin: 8px auto 18px; color: #838792; font-size: 9px; line-height: 1.55; }
.workspace-approval-list { min-height: 242px; }
.readiness-list { display: grid; gap: 8px; }
.readiness-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 9px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.readiness-list span { color: #9498a2; font-size: 9px; }
.readiness-list strong { font-size: 10px; }
.green-dot,
.orange-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.orange-dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(247,201,72,.08); }
.workspace-people-table { min-width: 1160px; }
.adjustment-create .card-body { display: grid; gap: 15px; }
.adjustment-choice { display: grid; gap: 8px; }
.adjustment-option {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 10px;
  color: #e7e8eb;
  border: 1px solid rgba(67,223,145,.25);
  border-radius: 11px;
  background: var(--green-soft);
  cursor: pointer;
  text-align: left;
}
.adjustment-option.danger { border-color: rgba(255,113,120,.25); background: var(--red-soft); }
.content-time-page { min-width: 0; }
.content-time-page [data-content-time-root], .content-time-page .card { min-width: 0; max-width: 100%; }
.content-time-page > div > section { margin-bottom: 20px; }
.content-time-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.content-time-controls .form-field { width: min(100%, 460px); min-width: 0; }
.content-time-controls input, .content-time-controls select { box-sizing: border-box; width: 100%; min-width: 0; }
.content-clock { font-size: clamp(28px, 6vw, 52px); font-weight: 800; font-variant-numeric: tabular-nums; }
.content-time-controls .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.content-time-controls button { white-space: normal; }
.content-time-stats .stat-value { font-size: clamp(20px, 3vw, 32px); overflow-wrap: anywhere; }
.adjustment-option i { display: grid; width: 32px; height: 32px; place-items: center; color: #111216; border-radius: 9px; background: var(--green); font-size: 16px; font-style: normal; font-weight: 950; }
.adjustment-option.danger i { background: var(--red); }
.adjustment-option span,
.adjustment-option strong,
.adjustment-option small { display: block; }
.adjustment-option strong { font-size: 10px; }
.adjustment-option small { margin-top: 4px; color: #898d96; font-size: 8px; }
.compact-form { gap: 9px; }
.compact-form .form-field input,
.compact-form .form-field select { min-height: 39px; }
.period-progress-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.period-progress-head div span,
.period-progress-head div strong { display: block; }
.period-progress-head span { color: #858993; font-size: 9px; }
.period-progress-head strong { margin-top: 5px; font-size: 12px; }
.progress-track { height: 9px; margin: 12px 0 18px; overflow: hidden; border-radius: 999px; background: #292b31; }
.progress-track > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #d8b900, var(--yellow)); }
.period-checklist { margin-top: 8px; }
.permission-card {
  padding: 15px;
  border: 1px solid rgba(255,225,47,.25);
  border-radius: 12px;
  background: var(--yellow-soft);
}
.permission-card span,
.permission-card strong,
.permission-card p { display: block; }
.permission-card span { color: #948b4e; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.permission-card strong { margin-top: 8px; color: var(--yellow); font-size: 12px; }
.permission-card p { margin: 8px 0 0; color: #9a956c; font-size: 9px; line-height: 1.55; }

button:focus-visible,
[role="button"]:focus-visible,
.prototype-money-input:focus-visible,
.payment-type-switch button:focus-visible,
.payment-filters button:focus-visible,
.filter-chips button:focus-visible,
.adjustment-option:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.app-shell[hidden],
.auth-root[hidden] { display: none !important; }

body.auth-mode { min-width: 0; }

.auth-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  min-width: 320px;
  min-height: 100vh;
  overflow: auto;
  color: var(--text);
  background:
    radial-gradient(circle at 68% 4%, rgba(255, 225, 47, .085), transparent 32rem),
    linear-gradient(180deg, #101116, var(--bg));
}

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

.auth-card {
  width: min(100%, 430px);
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(26, 27, 32, .96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .36);
}

.auth-card--status { text-align: center; }
.auth-logo { display: block; width: 170px; height: auto; margin: 0 auto 28px; }
.auth-card h1 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.auth-card > p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-card form { display: grid; gap: 15px; margin-top: 24px; text-align: left; }
.auth-field { display: grid; gap: 7px; }
.auth-field span { color: #b8bbc3; font-size: 10px; font-weight: 750; }
.auth-field input {
  min-height: 46px;
  width: 100%;
  padding: 0 13px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: 0;
  background: var(--surface-2);
}
.auth-field input:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.auth-actions { display: grid; gap: 10px; margin-top: 5px; }
.auth-actions .button { width: 100%; min-height: 44px; }
.auth-error {
  padding: 11px 12px;
  color: var(--red);
  border: 1px solid rgba(255, 113, 120, .3);
  border-radius: 10px;
  background: var(--red-soft);
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
}
.auth-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  text-align: left;
}
.auth-person strong,
.auth-person span { display: block; }
.auth-person span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.auth-spinner {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto 22px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: auth-spin .8s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

.runtime-error-strip {
  padding: 10px 42px;
  color: var(--red);
  border-bottom: 1px solid rgba(255, 113, 120, .18);
  background: var(--red-soft);
  font-size: 10px;
}

.employee-fines-card { margin-top: 18px; }
.qc-shift-actions { align-items: center; justify-content: space-between; margin-top: 16px; }
.qc-shift-actions > span { color: var(--muted); font-size: 10px; line-height: 1.45; }

/* Private evidence attached by QC to employee fines. */
.fine-evidence-field {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .018);
}
.fine-evidence-field.has-error { border-color: rgba(255, 113, 120, .55); }
.fine-evidence-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fine-evidence-head div,
.fine-evidence-head strong,
.fine-evidence-head span { display: block; }
.fine-evidence-head strong { font-size: 13px; }
.fine-evidence-head span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.fine-evidence-head b { color: var(--yellow); font-size: 12px; white-space: nowrap; }
.fine-evidence-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px dashed rgba(247, 201, 72, .38);
  border-radius: 11px;
  background: rgba(247, 201, 72, .04);
  cursor: pointer;
}
.fine-evidence-picker:hover { border-color: rgba(247, 201, 72, .7); background: rgba(247, 201, 72, .07); }
.fine-evidence-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.fine-evidence-picker > span {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #171717;
  border-radius: 9px;
  background: var(--yellow);
  font-size: 20px;
  font-weight: 900;
}
.fine-evidence-picker strong,
.fine-evidence-picker small { display: block; }
.fine-evidence-picker strong { color: var(--text); font-size: 12px; }
.fine-evidence-picker small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.fine-evidence-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fine-evidence-preview__item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.fine-evidence-preview__item > img { display: block; width: 100%; height: 82px; object-fit: cover; background: #090a0d; }
.fine-evidence-preview__item > div { min-width: 0; padding: 7px 8px 8px; }
.fine-evidence-preview__item strong,
.fine-evidence-preview__item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fine-evidence-preview__item strong { font-size: 10px; }
.fine-evidence-preview__item span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.fine-evidence-preview__item > button {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 25px;
  height: 25px;
  padding: 0;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(10, 11, 14, .88);
  font-size: 17px;
  line-height: 1;
}
.fine-evidence-preview__item > button:hover { color: var(--red); border-color: rgba(255, 113, 120, .55); }
.fine-evidence-links { display: flex; flex-wrap: wrap; gap: 5px; min-width: 96px; }
.fine-evidence-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 7px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.fine-evidence-link:hover { border-color: var(--yellow); }
.fine-evidence-link > span {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #111;
  border-radius: 5px;
  background: var(--yellow);
  font-size: 9px;
  font-weight: 900;
}
.fine-evidence-link > b { font-size: 10px; }
.fine-evidence-link.compact { min-height: 27px; padding: 3px 6px 3px 4px; }
.fine-dispute-evidence {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.018);
}
.fine-dispute-evidence > span { color: var(--muted); font-size: 11px; }

/* QC orders and sales evidence */
.qc-order-entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .72fr);
  gap: 18px;
  align-items: start;
}
.qc-order-form-card { overflow: visible; }
.qc-order-fields { margin-bottom: 14px; }
.qc-order-money-input {
  display: flex;
  align-items: center;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #121317;
}
.qc-order-money-input:focus-within { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.qc-order-money-input b { padding-left: 13px; color: var(--yellow); font-size: 15px; }
.qc-order-money-input input { min-height: 46px; padding-left: 8px; border: 0; background: transparent; font-size: 13px; font-weight: 850; }
.qc-order-money-input input:focus { box-shadow: none; }
.qc-order-money-input:has(input[aria-invalid="true"]) { border-color: var(--red); }

.qc-order-upload {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 82px;
  padding: 14px;
  border: 1px dashed #464952;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,225,47,.035), rgba(18,19,23,.92));
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.qc-order-upload:hover,
.qc-order-upload:focus-within { border-color: rgba(255,225,47,.55); background: var(--yellow-soft); }
.qc-order-upload[hidden] { display: none; }
.qc-order-upload.has-error { border-color: rgba(255,113,120,.7); background: var(--red-soft); }
.qc-order-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.qc-order-upload__icon { display: grid; width: 42px; height: 42px; place-items: center; color: #111216; border-radius: 11px; background: var(--yellow); font-size: 18px; font-weight: 900; }
.qc-order-upload__copy strong,
.qc-order-upload__copy small { display: block; }
.qc-order-upload__copy strong { font-size: 11px; }
.qc-order-upload__copy small { margin-top: 6px; color: var(--muted); font-size: 8px; }

.qc-order-file-preview {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 82px;
  padding: 8px;
  border: 1px solid rgba(67,223,145,.28);
  border-radius: 12px;
  background: var(--green-soft);
}
.qc-order-file-preview[hidden] { display: none; }
.qc-order-file-preview img { width: 66px; height: 58px; object-fit: cover; border-radius: 9px; background: #101116; }
.qc-order-file-preview strong,
.qc-order-file-preview span { display: block; }
.qc-order-file-preview strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.qc-order-file-preview span { margin-top: 5px; color: var(--muted); font-size: 8px; }

/* Collector order evidence: 0–15 client-side previews, then on-demand journal links. */
.collector-order-evidence-field {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .018);
}
.collector-order-evidence-field.has-error { border-color: rgba(255, 113, 120, .62); background: rgba(255, 113, 120, .025); }
.collector-order-evidence-field.is-complete { border-color: rgba(67, 223, 145, .3); }
.collector-order-evidence-field:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.collector-order-evidence-field.is-busy .collector-order-evidence-picker,
.collector-order-evidence-field.is-busy .collector-order-file-preview__actions { opacity: .55; pointer-events: none; }
.collector-order-evidence-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.collector-order-evidence-head > div { min-width: 0; }
.collector-order-evidence-head strong,
.collector-order-evidence-head span { display: block; }
.collector-order-evidence-head strong { font-size: 13px; }
.collector-order-evidence-head span { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.collector-order-evidence-head b { flex: 0 0 auto; color: var(--yellow); font-size: 12px; white-space: nowrap; }
.collector-order-evidence-picker {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 78px;
  padding: 12px;
  border: 1px dashed #464952;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(255,225,47,.035), rgba(18,19,23,.92));
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.collector-order-evidence-picker:hover,
.collector-order-evidence-picker:focus-within { border-color: rgba(255,225,47,.58); background: var(--yellow-soft); }
.collector-order-evidence-picker[hidden] { display: none; }
.collector-order-evidence-picker > input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.collector-order-evidence-picker .qc-order-upload__copy { min-width: 0; }
.collector-order-paste-hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.collector-order-paste-hint kbd {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 6px;
  color: var(--text);
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  border: 1px solid #42454f;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #191b21;
}
.collector-order-paste-hint > strong { color: var(--green); font-size: 10px; }
.collector-order-paste-hint > strong:empty { display: none; }
.collector-order-paste-hint > strong.is-error { color: var(--red); }
.collector-order-file-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}
.collector-order-file-preview[hidden] { display: none; }
.collector-order-file-preview__item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-rows: minmax(48px, auto) auto;
  align-items: center;
  gap: 7px 10px;
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(67, 223, 145, .24);
  border-radius: 10px;
  background: var(--green-soft);
}
.collector-order-file-preview__item > img {
  grid-row: 1 / 3;
  display: block;
  width: 88px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  background: #090a0d;
}
.collector-order-file-preview__meta { min-width: 0; }
.collector-order-file-preview__meta strong,
.collector-order-file-preview__meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collector-order-file-preview__meta strong { font-size: 11px; }
.collector-order-file-preview__meta span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.collector-order-file-preview__actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.collector-order-file-preview__actions .button { min-height: 28px; padding: 4px 8px; }
.collector-order-evidence-links { display: flex; flex-wrap: wrap; gap: 5px; min-width: 152px; max-width: 290px; }
.collector-order-evidence-link { min-height: 29px; padding: 4px 7px 4px 5px; }
.collector-order-evidence-link > span {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #111;
  border-radius: 5px;
  background: var(--yellow);
  font-size: 9px;
  font-weight: 900;
}
.collector-order-evidence-link > b { font-size: 10px; }
.collector-order-readonly { color: var(--muted); font-size: 10px; white-space: nowrap; }
.collector-order-comment { display: block; max-width: 250px; margin-top: 5px; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.4; }
.collector-order-kpi { white-space: nowrap; }
.collector-order-row-actions { align-items: flex-start; min-width: 190px; }
.collector-order-row-actions .button { white-space: nowrap; }
.collector-order-edit-modal-card { width: min(780px, 100%); }
.collector-order-edit-form { display: grid; gap: 14px; }
.collector-order-edit-notice {
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  color: #e8e9ec;
  border: 1px solid rgba(255, 225, 47, .28);
  border-radius: 11px;
  background: var(--yellow-soft);
}
.collector-order-edit-notice strong { font-size: 12px; }
.collector-order-edit-notice span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.collector-order-edit-comment textarea {
  width: 100%;
  min-height: 86px;
  padding: 11px 12px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  background: #121317;
  resize: vertical;
  font-size: 11px;
  line-height: 1.5;
}
.collector-order-edit-comment textarea:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.collector-order-edit-comment textarea::placeholder { color: #666a75; }
.collector-order-edit-comment > small { color: var(--muted); font-size: 9px; text-align: right; }
.collector-order-edit-comment > small b { color: var(--text); }
.collector-order-edit-actions { margin-top: 0; padding-top: 2px; }

.qc-order-calculation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1.1fr);
  align-items: stretch;
  gap: 8px;
  margin-top: 14px;
}
.qc-order-calculation > div { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.qc-order-calculation > div.accent { border-color: rgba(255,225,47,.35); background: var(--yellow-soft); }
.qc-order-calculation > div span,
.qc-order-calculation > div strong,
.qc-order-calculation > div small { display: block; }
.qc-order-calculation > div span { color: var(--muted); font-size: 8px; }
.qc-order-calculation > div strong { margin-top: 8px; font-size: 18px; letter-spacing: -.025em; }
.qc-order-calculation > div small { margin-top: 5px; color: #717681; font-size: 7px; line-height: 1.4; }
.qc-order-calculation > i { display: grid; place-items: center; color: #686d77; font-size: 15px; font-style: normal; font-weight: 900; }
.qc-order-form-actions { align-items: center; justify-content: space-between; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.qc-order-form-actions > span { max-width: 380px; color: var(--muted); font-size: 8px; line-height: 1.5; }

.qc-order-day-card { position: sticky; top: 18px; }
.qc-order-day-total { display: block; margin: 2px 0 18px; color: var(--yellow); font-size: 40px; letter-spacing: -.05em; }
.qc-order-rule { margin-top: 14px; }
.qc-order-shift-control {
  display: grid;
  gap: 12px;
  padding: 13px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}
.qc-order-shift-control > div span,
.qc-order-shift-control > div strong,
.qc-order-shift-control > div small { display: block; }
.qc-order-shift-control > div span { color: var(--muted); font-size: 8px; }
.qc-order-shift-control > div strong { margin-top: 6px; font-size: 10px; }
.qc-order-shift-control > div small { margin-top: 5px; color: #737782; font-size: 8px; line-height: 1.45; }
.qc-order-shift-control.confirmed { border-color: rgba(67,223,145,.28); background: var(--green-soft); }
.qc-order-shift-control.confirmed > div strong { color: var(--green); }
.qc-order-shift-control .button { width: 100%; }
.qc-order-report-control {
  display: grid;
  gap: 12px;
  padding: 13px;
  margin-top: 10px;
  border: 1px solid rgba(173,145,255,.28);
  border-radius: 11px;
  background: var(--violet-soft);
}
.qc-order-report-control > div span,
.qc-order-report-control > div strong,
.qc-order-report-control > div small { display: block; }
.qc-order-report-control > div span { color: var(--muted); font-size: 8px; }
.qc-order-report-control > div strong { margin-top: 6px; font-size: 11px; }
.qc-order-report-control > div small { margin-top: 5px; color: #7f8390; font-size: 8px; line-height: 1.45; }
.qc-order-report-control .button { width: 100%; }
.qc-order-report-control.matched { border-color: rgba(67,223,145,.28); background: var(--green-soft); }
.qc-order-report-control.matched > div strong { color: var(--green); }
.qc-order-report-control.mismatch { border-color: rgba(255,113,120,.32); background: var(--red-soft); }
.qc-order-report-control.mismatch > div strong { color: var(--red); }
.qc-orders-table { min-width: 1120px; }
.qc-orders-table td { vertical-align: middle; }
.qc-order-number { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; font-weight: 800; }
.qc-order-comment {
  min-width: 150px;
  max-width: 280px;
  margin: 0;
  color: #d9dbe0;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.qc-order-comment-details { min-width: 150px; max-width: 280px; }
.qc-order-comment-details summary { color: #d9dbe0; cursor: pointer; list-style: none; line-height: 1.45; overflow-wrap: anywhere; }
.qc-order-comment-details summary::-webkit-details-marker { display: none; }
.qc-order-comment-details summary > .qc-order-comment-preview { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.qc-order-comment-details summary b { display: inline-block; margin-top: 5px; color: var(--yellow); font-size: 11px; font-weight: 750; }
.qc-order-comment-collapse { display: none; }
.qc-order-comment-details[open] summary { margin-bottom: 7px; }
.qc-order-comment-details[open] .qc-order-comment-preview,
.qc-order-comment-details[open] .qc-order-comment-expand { display: none; }
.qc-order-comment-details[open] .qc-order-comment-collapse { display: inline; }
.qc-order-comment-empty { color: var(--muted-2); white-space: nowrap; }
.qc-order-evidence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  color: #f1f2f4;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #17181d;
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.qc-order-evidence:hover { color: var(--yellow); border-color: rgba(255,225,47,.45); }

.owner-qc-orders-header { align-items: flex-end; }
.owner-qc-filters { display: flex; align-items: flex-end; gap: 8px; }
.owner-qc-filters label { display: grid; gap: 6px; }
.owner-qc-filters label > span { color: var(--muted); font-size: 8px; font-weight: 750; }
.owner-qc-filters select {
  min-height: 36px;
  padding: 0 32px 0 10px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: 0;
  background: #121317;
  font-size: 9px;
  font-weight: 750;
}
.owner-qc-filters select:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.owner-qc-manager-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.owner-qc-manager-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg, #18191e, #131418); }
.owner-qc-manager-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.owner-qc-manager-head .avatar { width: 32px; height: 32px; border-radius: 9px; font-size: 9px; }
.owner-qc-manager-head > div { min-width: 0; flex: 1; }
.owner-qc-manager-head strong,
.owner-qc-manager-head span { display: block; }
.owner-qc-manager-head strong { font-size: 11px; }
.owner-qc-manager-head span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.owner-qc-manager-head > .owner-qc-manager-total-wrap { flex: 0 0 auto; text-align: right; }
.owner-qc-manager-total-wrap span,
.owner-qc-manager-total-wrap small { display: block; max-width: 180px; }
.owner-qc-manager-total-wrap span { margin: 0 0 5px; }
.owner-qc-manager-total-wrap small { margin-top: 4px; color: var(--muted); font-size: 7px; line-height: 1.35; }
.owner-qc-manager-total { color: var(--yellow); font-size: 15px; }
.owner-qc-manager-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 11px; }
.owner-qc-manager-metrics > div { min-width: 0; padding: 9px; border-radius: 9px; background: var(--surface-2); }
.owner-qc-manager-metrics span,
.owner-qc-manager-metrics strong { display: block; }
.owner-qc-manager-metrics span { color: var(--muted); font-size: 7px; }
.owner-qc-manager-metrics strong { margin-top: 6px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.owner-qc-orders-table { min-width: 1240px; }
.owner-qc-orders-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: rgba(18,19,23,.72);
}
.owner-qc-orders-pagination[hidden] { display: none; }
.owner-qc-orders-pagination > span { color: var(--muted); font-size: 9px; }
.owner-qc-orders-pagination .button { min-width: 132px; }
.qc-sales-linked .button { width: 100%; }

/* Unified QC workspace: salary, order evidence and order history stay on one screen. */
.qc-unified-card { overflow: visible; }
.qc-unified-header { position: sticky; top: 0; z-index: 4; background: rgba(22,23,28,.96); backdrop-filter: blur(12px); }
.qc-unified-body { display: grid; gap: 18px; }
.qc-unified-section {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  scroll-margin-top: 88px;
}
.qc-unified-section__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.qc-unified-section__head > div > span,
.qc-unified-section__head h3,
.qc-unified-section__head p { display: block; }
.qc-unified-section__head > div > span { color: var(--yellow); font-size: 9px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.qc-unified-section__head h3 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.02em; }
.qc-unified-section__head p { max-width: 720px; margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.qc-unified-total-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 12px; margin-top: 12px; }
.qc-unified-total-row .qc-total,
.qc-unified-total-row .formula-box { margin-top: 0; }
.qc-unified-total-row .formula-box { display: flex; flex-direction: column; justify-content: center; }
.qc-order-form--unified { display: grid; gap: 14px; }
.qc-income-kind-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 5px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 13px; background: #111216; }
.qc-income-kind-switch button { display: grid; gap: 4px; min-width: 0; padding: 12px 14px; color: var(--muted); text-align: left; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; }
.qc-income-kind-switch button strong { color: #d6d8dd; font-size: 11px; }
.qc-income-kind-switch button span { font-size: 8px; line-height: 1.4; }
.qc-income-kind-switch button:hover { border-color: var(--line-strong); }
.qc-income-kind-switch button.active { border-color: rgba(255,225,47,.5); background: var(--yellow-soft); }
.qc-income-kind-switch button.active strong { color: var(--yellow); }
.qc-direct-order-form { display: grid; gap: 14px; }
.qc-direct-order-form[hidden] { display: none; }
.qc-direct-order-comment textarea {
  width: 100%;
  min-height: 88px;
  padding: 12px 13px;
  resize: vertical;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  background: #121317;
  line-height: 1.5;
}
.qc-direct-order-comment textarea:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.qc-direct-order-comment textarea[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.qc-direct-order-comment > span { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.qc-direct-order-comment > span small { color: var(--muted); font-weight: 600; }
.qc-direct-order-comment > small { display: flex; justify-content: space-between; gap: 10px; }
.qc-direct-order-comment > small b { color: var(--text); font-weight: 750; }
.qc-direct-order-preview { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 14px; padding: 14px 16px; border: 1px solid rgba(82,162,255,.28); border-radius: 11px; background: rgba(82,162,255,.075); }
.qc-direct-order-preview span { color: var(--muted); font-size: 9px; }
.qc-direct-order-preview strong { grid-row: 1 / span 2; grid-column: 2; color: #8dbdff; font-size: 24px; }
.qc-direct-order-preview small { color: #747d8a; font-size: 8px; }
.qc-income-history-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.qc-income-totals { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); flex: 1; gap: 8px; }
.qc-income-totals > div { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #121317; }
.qc-income-totals span,
.qc-income-totals strong { display: block; }
.qc-income-totals span { color: var(--muted); font-size: 8px; }
.qc-income-totals strong { margin-top: 7px; font-size: 15px; }
.qc-income-type { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 7px; font-size: 8px; font-weight: 850; white-space: nowrap; }
.qc-income-type.sale { color: #c6b6ff; background: var(--violet-soft); }
.qc-income-type.direct { color: #8dbdff; background: rgba(82,162,255,.10); }
.qc-unified-history .table-scroll { margin: 0 -18px -18px; width: calc(100% + 36px); }
.qc-daily-formula--with-orders { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.15fr) auto minmax(0, 1.05fr) auto minmax(0, 1.1fr); }

@media (max-width: 900px) {
  .qc-unified-total-row { grid-template-columns: 1fr; }
  .qc-unified-header { position: static; }
}

@media (max-width: 1260px) {
  .content, .topbar { padding-left: 28px; padding-right: 28px; }
  .preview-banner { padding-left: 28px; padding-right: 28px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .payment-layout, .owner-foot-grid, .workspace-grid { grid-template-columns: 1fr; }
  .workspace-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .close-period-bar { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .close-period-total { display: none; }
  .qc-sales-total-grid { grid-template-columns: 1fr; }
  .owner-attention-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .salary-breakdown-summary { grid-template-columns: repeat(2, 1fr); }
  .qc-order-entry-layout { grid-template-columns: 1fr; }
  .salary-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qc-order-day-card { position: static; }
  .owner-qc-manager-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .owner-attention-grid, .salary-breakdown-summary, .close-wizard-summary { grid-template-columns: 1fr; }
  .role-history-summary { align-items: stretch; flex-direction: column; }
  .role-history-summary__items { justify-content: flex-start; }
  .role-history-summary__items > span { flex: 1 1 132px; }
  .role-timeline__head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .role-timeline__items { display: grid; grid-template-columns: 1fr; }
  .owner-attention-item, .close-wizard-check { grid-template-columns: 34px minmax(0, 1fr); }
  .owner-attention-item > b, .close-wizard-check > button, .close-wizard-check > b { grid-column: 2; justify-self: start; }
  .prototype-modal { padding: 12px; }
  .modal-card { max-height: calc(100vh - 24px); }
  .close-wizard-actions { align-items: stretch; flex-direction: column-reverse; }
  .close-wizard-actions .button { width: 100%; }
  .qc-order-calculation { grid-template-columns: 1fr; }
  .qc-order-calculation > i { min-height: 18px; }
  .qc-daily-formula { grid-template-columns: 1fr; }
  .qc-daily-formula > i { min-height: 16px; }
  .qc-daily-report__head,
  .qc-daily-report__actions { align-items: stretch; flex-direction: column; }
  .qc-daily-report__actions .button { width: 100%; }
  .qc-order-upload,
  .qc-order-file-preview { grid-template-columns: 42px minmax(0, 1fr); }
  .qc-order-upload > .button,
  .qc-order-file-preview > .button { grid-column: 1 / -1; width: 100%; }
  .collector-order-evidence-head { align-items: flex-start; }
  .collector-order-evidence-picker { grid-template-columns: 42px minmax(0, 1fr); }
  .collector-order-evidence-picker > .button { grid-column: 1 / -1; width: 100%; }
  .collector-order-file-preview { grid-template-columns: 1fr; }
  .collector-order-file-preview__item { grid-template-columns: 82px minmax(0, 1fr); }
  .collector-order-file-preview__item > img { width: 82px; height: 74px; }
  .collector-order-file-preview__actions .button { flex: 1 1 88px; }
  .collector-order-edit-modal-card { width: 100%; }
  .collector-order-edit-form { gap: 12px; padding: 14px; }
  .collector-order-edit-actions { align-items: stretch; flex-direction: column-reverse; }
  .collector-order-edit-actions .button { width: 100%; }
  .qc-order-form-actions,
  .owner-qc-orders-header { align-items: stretch; flex-direction: column; }
  .qc-order-form-actions .button { width: 100%; }
  .qc-income-history-toolbar { align-items: stretch; flex-direction: column; }
  .qc-income-totals { width: 100%; }
  .qc-income-history-toolbar .filter-chips { justify-content: flex-start; }
  .qc-unified-section__head { align-items: stretch; flex-direction: column; }
  .owner-qc-filters { width: 100%; flex-direction: column; align-items: stretch; }
  .owner-qc-manager-grid { grid-template-columns: 1fr; }
  .owner-qc-orders-pagination { align-items: stretch; flex-direction: column; }
  .owner-qc-orders-pagination .button { width: 100%; }
}

/* max-device-width is a deliberate fallback for embedded/mobile browsers that
   expose a desktop layout viewport even though the visible screen is narrow. */
@media (max-width: 760px), (max-device-width: 760px) {
  html,
  body { min-width: 320px; width: 100%; overflow-x: hidden; }

  .app-shell { display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 100vh; overflow-x: clip; }
  .sidebar {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "logo profile"
      "role role"
      "nav nav";
    gap: 10px;
    width: 100%;
    min-height: 0;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .logo { grid-area: logo; align-self: center; width: 130px; height: auto; margin: 0; }
  .role-card { grid-area: role; padding: 10px 12px; margin: 0; }
  .role-card > .eyebrow { display: none; }
  .role-card__line { margin-top: 0; }
  .profile { grid-area: profile; min-width: 0; padding: 0; border-top: 0; }
  .profile .avatar { width: 30px; height: 30px; border-radius: 8px; }
  .profile div { max-width: 108px; }
  .profile .profile-logout { padding: 7px; font-size: 9px; }
  .sidebar-spacer,
  .sync-card { display: none; }
  .nav {
    grid-area: nav;
    display: flex;
    gap: 5px;
    width: calc(100vw - 28px);
    padding: 2px 0 3px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }
  .nav-label { display: none; }
  .nav-item { flex: 0 0 auto; min-height: 38px; padding: 8px 10px; font-size: 10px; white-space: nowrap; }
  .nav-item svg { width: 16px; height: 16px; }

  .main { grid-column: auto; width: 100%; max-width: 100%; min-width: 0; overflow-x: clip; }
  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 13px 14px;
  }
  .topbar__right { flex-wrap: wrap; width: 100%; }
  .period-control { flex: 1; min-width: 0; grid-template-columns: auto minmax(0, 1fr) 12px; }
  .period-control strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-sync-control {
    order: 3;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    color: #d7d9de;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
  }
  .mobile-sync-control[hidden] { display: none; }
  .mobile-sync-control > i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(67,223,145,.08); }
  .mobile-sync-control > span { min-width: 0; }
  .mobile-sync-control strong,
  .mobile-sync-control small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-sync-control strong { font-size: 10px; }
  .mobile-sync-control small { margin-top: 3px; color: #858993; font-size: 8px; }
  .mobile-sync-control > b { color: var(--yellow); font-size: 9px; font-weight: 850; }
  .mobile-sync-control:disabled { cursor: wait; opacity: .7; }
  .mobile-sync-control[data-sync-state="failed"] { border-color: rgba(255,113,120,.42); background: var(--red-soft); }
  .mobile-sync-control[data-sync-state="failed"] > i { background: var(--red); box-shadow: 0 0 0 4px rgba(255,113,120,.1); }
  .mobile-sync-control[data-sync-state="partial"],
  .mobile-sync-control[data-sync-state="pending"] { border-color: rgba(247,201,72,.38); background: var(--orange-soft); }
  .mobile-sync-control[data-sync-state="partial"] > i,
  .mobile-sync-control[data-sync-state="pending"] > i,
  .mobile-sync-control[data-sync-state="running"] > i { background: var(--orange); box-shadow: 0 0 0 4px rgba(247,201,72,.1); }
  .mobile-sync-control[data-sync-state="disabled"] > i { background: var(--muted-2); box-shadow: 0 0 0 4px rgba(116,120,131,.1); }
  .avatar-modal { align-items: end; padding: 10px; }
  .avatar-modal__card { max-height: calc(100dvh - 20px); overflow-y: auto; border-radius: 18px; }
  .avatar-modal__header { padding: 17px 16px; }
  .avatar-editor { padding: 20px 16px; }
  .avatar-editor__preview { width: 82px; height: 82px; border-radius: 22px; font-size: 22px; }
  .avatar-modal__actions { align-items: stretch; flex-direction: column-reverse; padding: 14px 16px 18px; }
  .avatar-modal__actions .button,
  .avatar-modal__actions .avatar-editor__pick { width: 100%; }
  .avatar-modal__actions [data-avatar-delete] { margin: 0; }
  .preview-banner { min-height: 0; padding: 10px 14px; }
  .preview-banner p { font-size: 9px; line-height: 1.4; }
  .content { width: 100%; max-width: 100%; min-width: 0; padding: 18px 14px 28px; overflow-x: clip; }

  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { font-size: 11px; }
  .sheet-status { align-self: flex-start; }
  .stats-grid { grid-template-columns: 1fr; gap: 10px; }
  .close-period-bar { grid-template-columns: 42px minmax(0, 1fr); align-items: start; }
  .close-period-bar .paid-button { grid-column: 1 / -1; width: 100%; }
  .grid-main,
  .grid-main.qc,
  .two-bottom,
  .payment-layout,
  .owner-grid,
  .owner-foot-grid,
  .workspace-grid,
  .qc-order-entry-layout { grid-template-columns: minmax(0, 1fr); }
  .workspace-page,
  .card,
  .card-body { min-width: 0; }
  .workspace-page,
  .card,
  .card-body,
  .page-heading,
  .stat-card { max-width: 100%; }
  .page-heading h1,
  .page-heading p,
  .card-header h2,
  .card-header p,
  .stat-note { overflow-wrap: anywhere; }
  .card-header { align-items: flex-start; flex-direction: column; gap: 9px; min-height: 0; }
  .card-header > .badge,
  .card-header > .tabs { align-self: flex-start; }
  .tabs { max-width: 100%; overflow-x: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .employee-report-date-field { width: 100%; }
  .grid-main > .card:first-child .actions {
    align-items: stretch;
    flex-direction: column;
  }
  .grid-main > .card:first-child .actions .button { width: 100%; }
  .compare-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .compare-cell { min-width: 0; padding: 10px 8px; }
  .compare-cell strong { overflow-wrap: anywhere; font-size: 14px; }
  .salary-stack,
  .qc-sales-entry__fields { grid-template-columns: 1fr; }
  .qc-income-kind-switch,
  .qc-income-totals { grid-template-columns: 1fr; }
  .qc-daily-report { padding: 14px; }
  .qc-unified-body { gap: 12px; padding: 12px; }
  .qc-unified-section { padding: 14px; border-radius: 12px; scroll-margin-top: 12px; }
  .qc-unified-history .table-scroll { margin: 0 -14px -14px; width: calc(100% + 28px); }
  .qc-unified-total-row .qc-total { align-items: flex-start; flex-direction: column; }
  .qc-unified-total-row .qc-total strong { margin-top: 12px; }
  .qc-daily-compare { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qc-daily-compare .compare-cell { min-width: 0; padding: 10px 8px; }
  .qc-daily-compare .compare-cell span { font-size: 8px; }
  .qc-daily-compare .compare-cell strong { font-size: 14px; overflow-wrap: anywhere; }
  .table-scroll { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .presence-table-scroll { overflow: visible; }
  .presence-table { min-width: 0; }
  .presence-table thead { display: none; }
  .presence-table,
  .presence-table tbody,
  .presence-table tr,
  .presence-table td { display: block; width: 100%; }
  .presence-table tbody { padding: 7px; }
  .presence-table tr { padding: 12px; margin-bottom: 7px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
  .presence-table tr:last-child { margin-bottom: 0; }
  .presence-table td { display: grid; grid-template-columns: minmax(108px, .8fr) minmax(0, 1.2fr); align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid rgba(255,255,255,.045); }
  .presence-table td:last-child { border-bottom: 0; }
  .presence-table td::before { color: #777b85; font-size: 7px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; content: attr(data-label); }
  .presence-table td:first-child { display: block; padding-top: 2px; }
  .presence-table td:first-child::before { display: none; }
  .presence-table .presence-loading-row { padding: 0; border: 0; background: transparent; }
  .presence-table .presence-loading-row td { display: block; border: 0; }
  .presence-table .presence-loading-row td::before { display: none; }
  .qc-orders-table { min-width: 1040px; }
  .owner-qc-orders-table { min-width: 1160px; }
  .qc-direct-order-comment textarea { min-height: 112px; resize: none; }
  .qc-order-comment,
  .qc-order-comment-details { min-width: 180px; max-width: 220px; }
  .qc-order-day-total { font-size: 34px; }
  .qc-order-day-card { position: static; }
  .owner-qc-manager-grid { grid-template-columns: 1fr; }
}

/* Final cascade for the larger production typography and new workspaces. */
body { font-size: 14px; line-height: 1.45; }
.nav-item { font-size: 14px; }
.role-card__line strong,
.profile strong { font-size: 15px; }
.role-card__line span,
.profile > div > span,
.sync-card span,
.sync-card small { font-size: 12px; }
.topbar > div:first-child > strong { font-size: 20px; }
.period-control span { font-size: 12px; }
.period-control strong,
.period-control b { font-size: 14px; }
.preview-banner p,
.stat-note,
.card-header p,
.helper,
.summary-caption,
.formula-box span,
.breakdown-row span,
.attention-item span,
.workspace-toolbar > div:first-child span,
.permission-card p,
.form-hint p,
.form-field > span small { font-size: 13px; }
.stat-card__head,
.field-label,
.attention-item strong,
.breakdown-row strong,
.formula-box strong,
.workspace-toolbar > div:first-child strong,
.form-field > span,
.permission-card strong { font-size: 14px; }
.card-header h2 { font-size: 18px; }
.badge,
.presence-indicator,
.button,
.button.small,
.tab,
.data-table td,
.payment-link { font-size: 13px; }
.data-table th { font-size: 11px; }
.employee-cell strong,
.presence-table .employee-cell strong { font-size: 14px; }
.employee-cell span,
.presence-table .employee-cell span { font-size: 12px; }
.status-workspace-grid { grid-template-columns: minmax(300px, .8fr) minmax(560px, 1.6fr); }
.collector-orders-table { min-width: 760px; }
.leaderboard-table { min-width: 640px; }

@media (max-width: 760px), (max-device-width: 760px) {
  .nav-item { font-size: 13px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading p { font-size: 14px; }
  .preview-banner p { font-size: 12px; }
  .mobile-sync-control strong { font-size: 13px; }
  .mobile-sync-control small,
  .mobile-sync-control > b { font-size: 11px; }
  .presence-table td::before { font-size: 10px; }
  .status-workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .collector-orders-table-scroll { overflow: visible; }
  .collector-orders-table { display: block; width: 100%; min-width: 0; }
  .collector-orders-table thead { display: none; }
  .collector-orders-table tbody,
  .collector-orders-table tr,
  .collector-orders-table td { display: block; width: 100%; }
  .collector-orders-table tbody { padding: 8px; }
  .collector-orders-table tr[data-collector-order-id] { padding: 12px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
  .collector-orders-table tr[data-collector-order-id]:last-child { margin-bottom: 0; }
  .collector-orders-table tr[data-collector-order-id] td {
    display: grid;
    grid-template-columns: minmax(112px, .8fr) minmax(0, 1.2fr);
    align-items: start;
    gap: 10px;
    padding: 8px 1px;
    border-bottom: 1px solid rgba(255,255,255,.055);
    white-space: normal;
  }
  .collector-orders-table tr[data-collector-order-id] td:last-child { border-bottom: 0; }
  .collector-orders-table tr[data-collector-order-id] td::before {
    color: #777b85;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
    content: attr(data-label);
  }
  .collector-orders-table tr:not([data-collector-order-id]) td { padding: 0; border: 0; }
  .collector-order-evidence-links,
  .collector-order-row-actions { width: 100%; min-width: 0; max-width: none; }
  .collector-order-row-actions { display: grid; grid-template-columns: 1fr; }
  .collector-order-row-actions .button { width: 100%; white-space: normal; }
  .collector-order-comment { max-width: none; }
}

/* Owner-only employee access directory. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.access-security-note {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 17px 19px;
  border-color: rgba(247, 201, 72, .32);
  background: linear-gradient(135deg, rgba(247, 201, 72, .1), rgba(247, 201, 72, .025));
}
.access-security-note__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--yellow);
  font-size: 25px;
  font-weight: 900;
  border: 1px solid rgba(247, 201, 72, .35);
  border-radius: 13px;
  background: rgba(247, 201, 72, .08);
}
.access-security-note strong { display: block; font-size: 15px; }
.access-security-note p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.access-toolbar__actions { flex-wrap: wrap; justify-content: flex-end; }
.access-search input,
.access-filter select {
  min-height: 38px;
  color: var(--text);
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--surface-2);
}
.access-search input { width: min(280px, 30vw); padding: 8px 12px; }
.access-filter select { padding: 8px 32px 8px 11px; }
.access-search input:focus,
.access-filter select:focus { border-color: rgba(247, 201, 72, .7); box-shadow: 0 0 0 3px rgba(247, 201, 72, .08); }
.access-table { min-width: 1080px; }
.access-table th:last-child { width: 270px; }
.access-login-cell,
.access-password-state,
.access-activity { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.access-login-cell code {
  max-width: 190px;
  overflow: hidden;
  color: #f1f2f5;
  font: 750 13px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.access-copy-login {
  padding: 0;
  color: var(--yellow);
  font-family: inherit;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
  border: 0;
  background: transparent;
}
.access-copy-login:hover { text-decoration: underline; }
.access-password-state strong { font-size: 13px; }
.access-password-state span,
.access-activity > span:not(.presence-indicator) { color: var(--muted); font-size: 11px; line-height: 1.35; }
.access-password-state.pending strong { color: var(--orange); }
.access-actions { align-items: flex-start; }
.access-actions .button { white-space: nowrap; }
.access-photo-action { color: var(--yellow); border-color: rgba(247, 201, 72, .38); }
.access-photo-action:hover { border-color: rgba(247, 201, 72, .72); background: rgba(247, 201, 72, .1); }
.access-directory-note {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}
.access-directory-note b { flex: 0 0 auto; color: var(--text); }

@media (max-width: 760px), (max-device-width: 760px) {
  .access-security-note { grid-template-columns: 36px minmax(0, 1fr); padding: 14px; }
  .access-security-note__icon { width: 36px; height: 36px; border-radius: 11px; }
  .access-toolbar,
  .access-toolbar__actions { align-items: stretch; flex-direction: column; width: 100%; }
  .access-toolbar__actions > *,
  .access-search input,
  .access-filter select { width: 100%; max-width: none; }
  .access-table-scroll { overflow: visible; }
  .access-table { min-width: 0; }
  .access-table thead { display: none; }
  .access-table,
  .access-table tbody,
  .access-table tr,
  .access-table td { display: block; width: 100%; }
  .access-table tbody { padding: 7px; }
  .access-table tr {
    padding: 13px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
  }
  .access-table tr:last-child { margin-bottom: 0; }
  .access-table td {
    display: grid;
    grid-template-columns: minmax(104px, .75fr) minmax(0, 1.25fr);
    align-items: start;
    gap: 10px;
    padding: 9px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
  }
  .access-table td:last-child { border-bottom: 0; }
  .access-table td::before {
    color: #777b85;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
    content: attr(data-label);
  }
  .access-table td:first-child { display: block; padding-top: 1px; }
  .access-table td:first-child::before { display: none; }
  .access-table .access-empty-row { padding: 0; border: 0; background: transparent; }
  .access-table .access-empty-row td { display: block; border: 0; }
  .access-table .access-empty-row td::before { display: none; }
  .access-login-cell code { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .access-actions { flex-direction: column; align-items: stretch; }
  .access-actions .button { width: 100%; }
  .access-directory-note { align-items: flex-start; flex-direction: column; }
  .fine-evidence-preview { grid-template-columns: 1fr; }
  .fine-evidence-preview__item { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; }
  .fine-evidence-preview__item > img { width: 92px; height: 72px; }
  .fine-evidence-preview__item > button { top: 50%; transform: translateY(-50%); }
  .fine-dispute-evidence { align-items: flex-start; flex-direction: column; }
}

/* Owner-only correction of a missed daily salary report. */
.owner-daily-report-card {
  border-color: rgba(255, 225, 47, .3);
  box-shadow: inset 0 3px 0 rgba(255, 225, 47, .82);
  scroll-margin-top: 18px;
}
.owner-daily-report-header { background: linear-gradient(90deg, rgba(255, 225, 47, .055), transparent 55%); }
.owner-daily-report-form { display: grid; gap: 14px; }
.owner-daily-report-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(190px, .8fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
}
.owner-daily-report-money {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #121317;
}
.owner-daily-report-money:focus-within { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.owner-daily-report-money.has-error { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.owner-daily-report-money b { color: var(--muted); font-size: 17px; }
.owner-daily-report-money input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 8px;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 19px;
  font-weight: 850;
}
.owner-daily-report-money input[aria-invalid="true"] { color: var(--red); }
.owner-daily-report-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 15px 16px;
  border: 1px solid rgba(67, 223, 145, .28);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(67, 223, 145, .09), rgba(19, 20, 24, .96) 58%);
}
.owner-daily-report-sheet.loading { border-color: var(--line-strong); background: var(--surface-2); }
.owner-daily-report-sheet.missing { border-color: rgba(247, 201, 72, .28); background: var(--orange-soft); }
.owner-daily-report-sheet > div > span,
.owner-daily-report-sheet > div > strong,
.owner-daily-report-sheet > div > small { display: block; }
.owner-daily-report-sheet > div > span { color: var(--green); font-size: 12px; font-weight: 850; letter-spacing: .02em; }
.owner-daily-report-sheet > div > strong { margin-top: 7px; color: var(--green); font-size: 29px; letter-spacing: -.035em; }
.owner-daily-report-sheet > div > small { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.owner-daily-report-sheet .button { min-width: 172px; }
.owner-daily-report-comparison {
  min-height: 42px;
  padding: 11px 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 12px;
  line-height: 1.5;
}
.owner-daily-report-comparison.match { color: var(--green); border-color: rgba(67, 223, 145, .28); background: var(--green-soft); }
.owner-daily-report-comparison.mismatch { color: var(--red); border-color: rgba(255, 113, 120, .32); background: var(--red-soft); }
.owner-daily-report-error {
  padding: 10px 12px;
  color: var(--red);
  border: 1px solid rgba(255, 113, 120, .3);
  border-radius: 10px;
  background: var(--red-soft);
  font-size: 12px;
  line-height: 1.45;
}
.owner-daily-report-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 2px; }
.owner-daily-report-actions > span { max-width: 760px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.owner-daily-report-actions .button { min-width: 210px; }

@media (max-width: 1100px) {
  .owner-daily-report-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-daily-report-amount-field { grid-column: 1 / -1; }
}

@media (max-width: 760px), (max-device-width: 760px) {
  .owner-daily-report-fields { grid-template-columns: minmax(0, 1fr); }
  .owner-daily-report-amount-field { grid-column: auto; }
  .owner-daily-report-sheet { grid-template-columns: minmax(0, 1fr); }
  .owner-daily-report-sheet .button,
  .owner-daily-report-actions .button { width: 100%; }
  .owner-daily-report-actions { align-items: stretch; flex-direction: column; }
}
