/* Tokens / variables */
:root {
  --color-primary: #1f3a5f;
  --color-primary-hover: #294b77;
  --color-primary-active: #182f4c;
  --color-secondary: #4caf50;
  --color-secondary-hover: #439946;
  --color-bg: #f6f8fa;
  --color-surface: #ffffff;
  --color-surface-blue: #eaf3fb;
  --color-surface-green: #eef8f0;
  --color-surface-muted: #fbfdff;
  --color-surface-muted-blue: #f8fbff;
  --color-surface-muted-green: #f8fcf8;
  --color-border: #d9e1e7;
  --color-border-soft: #d4e0ea;
  --color-border-accent: #cfe0f0;
  --color-border-hover: #bfd0e0;
  --color-border-hover-strong: #b8c7d6;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-success: #22c55e;
  --color-info: #2563eb;
  --color-warn: #f59e0b;
  --color-warn-text: #b45309;
  --color-danger: #dc2626;
  --color-danger-hover: #c61f1f;
  --color-progress-track: #e9eef3;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-label-gap: 6px;
  --space-inline: 14px;
  --space-inline-lg: 18px;
  --space-panel-y: 20px;
  --radius-card: 14px;
  --radius-button: 12px;
  --radius-input: 10px;
  --radius-pill: 999px;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 24px rgba(15, 23, 42, 0.04);
  --shadow-subtle: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.12);
  --shadow-focus-soft: 0 0 0 3px rgba(37, 99, 235, 0.08);
  --size-card-min: 220px;
  --size-card-min-small: 180px;
}

/* Reset / base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2,
.panel h3 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hidden {
  display: none !important;
}

.eyebrow {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sub {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.5;
}

.muted,
.person-role,
.kpi-title,
.countdown-label,
.worker-mini-countdown,
.status-overview-eyebrow,
.worker-main-label,
.login-role-label {
  color: var(--color-text-muted);
  font-size: 14px;
}

.login-role-label,
.countdown-label,
.worker-mini-countdown,
.status-overview-eyebrow,
.worker-main-label {
  font-weight: 600;
}

.muted {
  line-height: 1.5;
}

.app-version {
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
}

.person-name,
.row-item .title,
.task-title {
  color: var(--color-text);
  font-weight: 600;
}

.person-name,
.row-item .title,
.task-title,
.dashboard-table-head span,
.module-label,
.worker-mini-countdown,
.worker-now-title,
.worker-now-step,
.status-overview-meta,
.help-request-message,
.focus-text,
.dashboard-table-cell p,
.admin-launcher-copy,
.dashboard-table-cell,
.dashboard-section-head > div,
.row-item > div,
.person-card > div {
  overflow-wrap: anywhere;
  min-width: 0;
}

/* Layout */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.05), transparent 34%),
    radial-gradient(circle at bottom right, rgba(76, 175, 80, 0.06), transparent 28%);
}

.app-shell {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-7);
}

.app-view,
.login-form,
.login-role-group,
.hero-copy,
.timeline,
.people-grid,
.responsibility-grid,
.help-grid,
.clean-grid,
.task-grid,
.admin-list,
.admin-step-list,
.task-steps,
.dashboard-table,
.admin-section-panel,
.admin-section-content,
.topbar-left > div:last-child,
.worker-step-copy,
.step-visual,
.counter-card,
.task-admin-card,
.admin-item-form {
  display: grid;
}

.app-view,
.login-form,
.login-role-group,
.content,
.panel,
.counter-card,
.task-admin-card,
.admin-item-form,
.hero-panel,
.worker-now-card,
.worker-focus-step,
.timeline,
.people-grid,
.responsibility-grid,
.help-grid,
.clean-grid,
.task-grid,
.admin-list,
.admin-step-list,
.task-steps,
.dashboard-table,
.admin-section-panel,
.admin-section-content,
.worker-grid,
.quick-help-actions,
.step-visual,
.topbar-left > div:last-child,
.worker-step-copy {
  gap: var(--space-3);
}

.hero-panel,
.worker-now-card,
.admin-section-panel,
.admin-section-content {
  gap: var(--space-5);
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: clamp(var(--size-card-min), 34vw, 360px);
  padding: 0;
  border: 0;
  background: transparent;
}

.brand-mark.login-mark {
  width: min(100%, 460px);
  margin: 0 auto;
  justify-content: center;
}

.brand-mark.header-mark {
  width: clamp(240px, 28vw, 360px);
  flex: 0 0 auto;
}

.brand-image {
  width: 100%;
  height: auto;
}

.login-view {
  position: relative;
  width: min(100%, 520px);
  margin: var(--space-7) auto 0;
  padding: var(--space-6);
  gap: var(--space-5);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-muted) 100%);
}

.login-view h1,
.login-view .sub,
.login-view .muted,
.login-view .error-message {
  text-align: center;
}

.login-view .app-version {
  position: absolute;
  top: var(--radius-card);
  right: var(--space-4);
  max-width: 190px;
  text-align: right;
}

.topbar {
  position: sticky;
  top: var(--space-3);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-inline-lg) var(--space-5);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-width: 0;
}

.topbar-left h1 {
  font-size: 24px;
}

.topbar-right {
  display: grid;
  gap: var(--space-1);
  justify-items: end;
  text-align: right;
}

.topbar-right .app-version {
  text-align: right;
}

.current-user {
  font-size: 16px;
  font-weight: 600;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
}

.worker-grid {
  grid-template-columns: repeat(auto-fit, minmax(var(--size-card-min), 1fr));
}

.people-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.quick-help-actions {
  grid-template-columns: repeat(auto-fit, minmax(var(--size-card-min-small), 1fr));
  margin-bottom: var(--space-4);
}

.content {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Cards / panels */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.panel,
.counter-card,
.task-card,
.admin-item-form,
.task-admin-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-subtle);
}

.panel {
  padding: var(--space-panel-y) var(--space-5);
}

.panel h3 {
  color: var(--color-text);
}

.panel-tone-blue {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-muted-blue) 100%);
}

.panel-tone-green {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-muted-green) 100%);
}

.countdown-card,
.worker-now-card {
  border-color: var(--color-border-accent);
}

.countdown-card {
  background: linear-gradient(180deg, var(--color-surface-blue) 0%, var(--color-surface) 100%);
}

.worker-now-card {
  background: linear-gradient(180deg, var(--color-surface-muted-blue) 0%, var(--color-surface) 100%);
}

.worker-countdown-card,
.status-overview-card,
.metric-card {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: var(--space-5);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.9);
}

.worker-countdown-card {
  min-height: 100%;
  background: rgba(255, 255, 255, 0.88);
}

.status-overview-card {
  min-height: 184px;
  gap: var(--space-3);
  background: rgba(255, 255, 255, 0.92);
}

.metric-card {
  padding: var(--space-4);
  border-radius: var(--radius-button);
}

.help-request-card,
.timeline-item,
.row-item,
.dashboard-table-row {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  background: var(--color-surface);
}

.help-request-card {
  display: grid;
  gap: var(--space-3);
  border-radius: var(--radius-card);
}

.timeline-item,
.row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.timeline-item.active {
  border-color: rgba(37, 99, 235, 0.32);
  background: var(--color-surface-blue);
}

.person-card,
.counter-card,
.task-card {
  padding: var(--space-4);
}

.person-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.focus-step {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, var(--color-surface) 0%, #f9fcff 100%);
}

.worker-focus-step {
  gap: var(--space-5);
  padding: clamp(24px, 4vw, 36px);
  border-color: rgba(37, 99, 235, 0.18);
}

.step-image,
.admin-step-preview {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  object-fit: cover;
}

.step-image {
  max-height: 360px;
}

.admin-step-preview {
  max-height: 220px;
}

.step-image-placeholder,
.empty-state {
  padding: var(--space-5);
  border: 1px dashed var(--color-border-hover);
  border-radius: var(--radius-card);
  background: var(--color-surface-muted);
}

.step-image-placeholder {
  display: grid;
  place-items: center;
  min-height: 180px;
  text-align: center;
  color: var(--color-text-muted);
}

.worker-step-image {
  max-height: 420px;
}

.worker-step-image-placeholder {
  min-height: 220px;
}

.empty-state h4 {
  margin-bottom: var(--space-2);
  font-size: 18px;
}

.empty-state .muted {
  margin: 0;
}

/* Buttons */
.btn,
.step-btn,
.quick-link,
.module-btn,
.worker-btn,
.admin-launcher-card {
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.btn,
.step-btn,
.quick-link {
  min-height: 48px;
  border-radius: var(--radius-button);
  line-height: 1.2;
  white-space: normal;
}

.btn,
.step-btn {
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover,
.module-btn:hover {
  transform: translateY(-1px);
}

.btn:disabled,
.step-btn:disabled,
.module-btn:disabled,
.worker-btn:disabled,
.admin-launcher-card:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-surface);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn-primary:active {
  background: var(--color-primary-active);
  border-color: var(--color-primary-active);
}

.btn-ghost {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-primary);
}

.btn-ghost:hover {
  background: var(--color-surface-muted-blue);
  border-color: var(--color-border-hover);
}

.btn-success {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-surface);
}

.btn-success:hover {
  background: var(--color-secondary-hover);
  border-color: var(--color-secondary-hover);
}

.btn-danger {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: var(--color-surface);
}

.btn-danger:hover {
  background: var(--color-danger-hover);
  border-color: var(--color-danger-hover);
}

.module-btn,
.worker-btn,
.admin-launcher-card,
.step-btn {
  cursor: pointer;
}

.module-btn {
  display: grid;
  place-items: center;
  gap: var(--space-2);
  min-height: 92px;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-primary);
  text-align: center;
  box-shadow: var(--shadow-subtle);
}

.module-btn:hover {
  border-color: var(--color-border-hover-strong);
}

.module-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-surface);
}

.module-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(31, 58, 95, 0.12);
  border-radius: var(--radius-input);
  background: var(--color-surface-blue);
}

.module-icon svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.module-btn.active .module-icon {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
}

.module-btn.active .module-icon svg {
  color: var(--color-surface);
}

.module-label {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
}

.worker-btn {
  display: grid;
  align-content: center;
  gap: var(--space-1);
  min-height: 72px;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-primary);
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow-subtle);
}

.worker-btn.active {
  border-color: rgba(76, 175, 80, 0.4);
  background: var(--color-surface-green);
}

.quick-actions,
.controls,
.action-row {
  display: flex;
  flex-wrap: wrap;
}

.controls,
.action-row {
  gap: var(--space-2);
}

.quick-actions {
  gap: var(--space-3);
}

.quick-action-btn {
  min-width: var(--size-card-min-small);
}

.quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 var(--space-inline);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
}

.step-btn {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-inline);
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  text-align: left;
  font-weight: 600;
}

.step-btn.done {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
}

/* Forms */
.role-toggle,
.form-grid {
  display: grid;
}

.role-toggle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.role-option {
  position: relative;
  display: grid;
  justify-items: start;
  gap: var(--space-label-gap);
  min-height: 88px;
  padding: var(--space-4) var(--space-inline-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-text);
  text-align: left;
  box-shadow: var(--shadow-subtle);
  cursor: pointer;
}

.role-option:hover {
  border-color: var(--color-border-hover);
  background: var(--color-surface-muted);
}

.role-option.active,
.role-option:has(.role-option-input:checked) {
  border-color: rgba(31, 58, 95, 0.24);
  background: linear-gradient(180deg, var(--color-surface) 0%, #f7fbff 100%);
  box-shadow: var(--shadow-focus-soft);
}

.role-option-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.role-option-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.role-option-copy {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.login-form label,
.form-grid label {
  display: grid;
  gap: var(--space-label-gap);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
}

.error-message {
  min-height: 20px;
  color: var(--color-danger);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 var(--space-inline);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  color: var(--color-text);
}

textarea {
  min-height: 120px;
  padding: var(--space-3) var(--space-inline);
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

input:focus,
select:focus,
textarea:focus,
.admin-launcher-card:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-info);
}

.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(var(--size-card-min), 1fr));
  gap: var(--space-3);
}

.inline-check {
  display: flex !important;
  align-items: center;
  gap: var(--space-2);
}

.inline-check input {
  width: 18px;
  height: 18px;
  min-height: auto;
  padding: 0;
}

/* Admin */
.admin-item-form,
.task-admin-card {
  gap: var(--space-4);
  padding: var(--space-4);
}

.admin-step-form {
  background: #f9fbfc;
}

.admin-launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--size-card-min), 1fr));
  gap: var(--space-4);
}

.admin-launcher-card {
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: var(--space-4);
  min-height: 156px;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-text);
  text-align: left;
  box-shadow: var(--shadow-subtle);
}

.admin-launcher-card:hover {
  border-color: var(--color-border-hover);
  background: var(--color-surface-muted);
}

.admin-launcher-copy {
  display: grid;
  gap: var(--space-2);
}

.admin-launcher-copy h3,
.admin-section-topbar h3,
.dashboard-section-head h3 {
  margin: 0;
}

.admin-launcher-copy .muted,
.admin-section-topbar .muted,
.dashboard-section-head .muted {
  margin: 0;
}

.admin-launcher-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: var(--space-label-gap) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-surface-blue);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
}

.admin-section-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

/* Dashboard */
.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.leader-status-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-4);
}

.leader-status-grid-balanced {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leader-status-grid > .status-overview-card {
  grid-column: span 2;
}

.leader-status-grid-balanced > .status-overview-card {
  grid-column: span 1;
}

.leader-status-grid > .status-overview-card-wide {
  grid-column: span 3;
}

.status-overview-value,
.counter-value,
.countdown-time {
  color: var(--color-primary);
  font-weight: 700;
}

.status-overview-value {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.05;
}

.status-overview-value-time,
.countdown-time {
  letter-spacing: -0.04em;
}

.status-overview-meta {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.dashboard-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-3);
}

.dashboard-section-head .muted {
  margin-top: var(--space-1);
}

.dashboard-table-head,
.dashboard-table-row {
  display: grid;
  align-items: center;
  gap: var(--space-3);
  grid-template-columns: minmax(180px, 1.1fr) minmax(220px, 1.4fr) minmax(140px, 0.9fr) minmax(120px, 0.7fr);
}

.dashboard-progress-head,
.dashboard-progress-row {
  grid-template-columns: minmax(170px, 1fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) minmax(220px, 1.2fr) minmax(240px, 1.3fr);
}

.dashboard-table-head {
  padding: 0 var(--space-4);
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
}

.dashboard-table-cell p {
  margin: 0;
}

.dashboard-table-status {
  display: flex;
  justify-content: flex-start;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.counter-card {
  gap: var(--space-3);
}

.counter-value {
  font-size: 32px;
  line-height: 1.1;
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--color-progress-track);
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-secondary);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
}

.status-danger {
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-danger);
}

.status-warn {
  background: rgba(245, 158, 11, 0.14);
  color: var(--color-warn-text);
}

.status-info {
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-info);
}

.status-success {
  background: rgba(34, 197, 94, 0.12);
  color: var(--color-success);
}

/* Worker view */
.worker-now-header {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(var(--size-card-min), 0.8fr);
  gap: var(--space-4);
  align-items: start;
}

.worker-now-title {
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.05;
}

.worker-now-step {
  color: var(--color-text-muted);
  font-size: 18px;
  font-weight: 600;
}

.worker-countdown-support {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.4;
}

.worker-focus-task,
.worker-focus-status {
  color: var(--color-text);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
}

.worker-focus-status {
  font-size: clamp(22px, 2.8vw, 28px);
}

.worker-main-label-spaced {
  margin-top: var(--space-2);
}

.worker-primary-action {
  width: 100%;
  min-height: 64px;
  font-size: 18px;
}

.focus-text {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--color-text);
}

.help-request-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.help-request-message {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
}

.timeline-time {
  color: var(--color-primary);
  font-weight: 700;
  white-space: nowrap;
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-card);
  background: var(--color-primary);
  color: var(--color-surface);
  font-size: 14px;
  font-weight: 700;
}

/* Responsive */
body.mode-leader-desktop .content {
  grid-template-columns: 1fr;
  align-items: start;
}

body.mode-leader-desktop .content > * {
  grid-column: 1 / -1;
}

body.mode-leader-desktop .hero-panel {
  grid-template-columns: 1fr;
  align-items: start;
}

body.mode-leader-desktop .module-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

body.mode-worker-tablet .app-shell {
  padding: var(--space-4) var(--space-4) var(--space-7);
}

body.mode-worker-tablet .topbar {
  padding: var(--space-4);
}

body.mode-worker-tablet .topbar-right {
  justify-items: start;
  text-align: left;
}

body.mode-worker-tablet .module-grid {
  grid-template-columns: repeat(auto-fit, minmax(var(--size-card-min-small), 1fr));
  gap: var(--space-4);
}

body.mode-worker-tablet .btn,
body.mode-worker-tablet .module-btn,
body.mode-worker-tablet .worker-btn,
body.mode-worker-tablet .step-btn {
  min-height: 56px;
}

body.mode-worker-tablet .module-btn {
  min-height: 108px;
}

body.mode-worker-tablet .module-icon {
  width: 34px;
  height: 34px;
}

body.mode-worker-tablet .module-label {
  font-size: 18px;
}

body.mode-worker-tablet .content {
  gap: var(--space-4);
}

body.mode-worker-tablet .panel {
  padding: var(--space-5);
}

body.mode-worker-tablet .countdown-time {
  font-size: clamp(48px, 8vw, 68px);
}

body.mode-worker-tablet .quick-actions {
  flex-direction: column;
}

body.mode-worker-tablet .quick-action-btn {
  width: 100%;
  min-height: 60px;
  font-size: 18px;
}

body.mode-worker-tablet .focus-text {
  font-size: 26px;
}

body.mode-worker-tablet .step-image {
  max-height: 420px;
}

body.mode-worker-tablet .worker-now-header {
  grid-template-columns: 1fr;
}

body.mode-worker-tablet .worker-now-title {
  font-size: clamp(32px, 8vw, 46px);
}

body.mode-worker-tablet .worker-now-step {
  font-size: 22px;
}

body.mode-worker-tablet .worker-primary-action {
  min-height: 72px;
  font-size: 22px;
}

body:not(.role-worker) .login-view .btn.btn-primary {
  min-height: 54px;
}

@media (max-width: 1024px) {
  .module-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

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

  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

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

  .leader-status-grid > .status-overview-card,
  .leader-status-grid > .status-overview-card-wide {
    grid-column: auto;
  }

  .worker-now-header {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: var(--space-4) var(--space-3) var(--space-6);
  }

  .topbar {
    gap: var(--space-4);
    padding: var(--space-4);
  }

  .topbar-left {
    gap: var(--space-4);
  }

  .topbar-left h1 {
    font-size: 20px;
  }

  .panel {
    padding: var(--space-4);
  }

  .brand-mark.header-mark {
    width: min(100%, 280px);
  }

  .admin-section-topbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .login-view {
    margin-top: var(--space-5);
    padding: var(--space-5);
  }

  .role-toggle {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-left,
  .topbar-right {
    width: 100%;
  }

  .topbar-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-right {
    justify-items: start;
    text-align: left;
  }

  .module-grid,
  body.mode-worker-tablet .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-row,
  body.mode-leader-desktop .content {
    grid-template-columns: 1fr;
  }

  .help-request-head {
    flex-direction: column;
    align-items: flex-start;
  }

  body.mode-leader-desktop .content > .countdown-card {
    grid-column: auto;
  }

  body.mode-leader-desktop .hero-panel,
  .leader-status-grid,
  .dashboard-table-head,
  .dashboard-table-row {
    grid-template-columns: 1fr;
  }

  .leader-status-grid > .status-overview-card,
  .leader-status-grid > .status-overview-card-wide {
    grid-column: auto;
  }

  .dashboard-table-head {
    display: none;
  }

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

  .row-item,
  .timeline-item {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .module-grid,
  body.mode-worker-tablet .module-grid {
    grid-template-columns: 1fr;
  }

  .controls,
  .action-row {
    flex-direction: column;
  }

  .btn,
  .quick-link,
  .step-btn {
    width: 100%;
  }
}
