:root {
  color-scheme: light;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #d8e1ea;
  --panel: #ffffff;
  --surface: #f7f9fb;
  --brand: #128b7e;
  --brand-dark: #0f766e;
  --brand-soft: #e7f5f3;
  --accent: #b7791f;
  --sidebar: #ffffff;
  --sidebar-text: #263445;
  --sidebar-muted: #94a3b8;
  --sidebar-active: #e7f5f3;
  --sidebar-active-text: #0f766e;
  --sidebar-active-border: #128b7e;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
  --planner-copy-bg: #f3e8ff;
  --planner-copy-bg-hover: #ede9fe;
  --planner-copy-border: #d8b4fe;
  --planner-copy-ink: #7e22ce;
  --weight-action: 600;
  --weight-heading: 650;
  --weight-label: 650;
  --weight-link: 650;
}

* {
  box-sizing: border-box;
}

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

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

button {
  border: 0;
  border-radius: 6px;
  min-height: 2.25rem;
  padding: 0.48rem 0.78rem;
  color: #ffffff;
  background: var(--brand);
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
  font-weight: var(--weight-action);
}

button:hover {
  background: var(--brand-dark);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  min-height: 2.25rem;
  padding: 0.48rem 0.78rem;
  color: #ffffff;
  background: var(--brand);
  line-height: 1.2;
  font-weight: var(--weight-action);
  white-space: nowrap;
}

.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2.25rem;
  border-radius: 6px;
  padding: 0.48rem 0.72rem;
  color: #ffffff;
  background: var(--brand);
  font-weight: var(--weight-action);
  white-space: nowrap;
}

.card-action:hover {
  background: var(--brand-dark);
}

.button:hover {
  background: var(--brand-dark);
}

.button.secondary {
  border: 1px solid var(--line);
  color: #344054;
  background: #ffffff;
}

.button.secondary:hover {
  color: var(--ink);
  background: #f8fafc;
}

button.danger {
  background: #b91c1c;
}

button.danger:hover {
  background: #991b1b;
}

.page {
  min-height: 100vh;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  width: min(100%, 420px);
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(24, 36, 51, 0.06);
}

.login-card h1 {
  margin: 0;
  font-size: 1.55rem;
}

.login-card p {
  margin: 0.4rem 0 1.5rem;
  color: var(--muted);
}

.login-card label {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem;
  font: inherit;
}

.login-card button {
  width: 100%;
}

.error {
  margin-bottom: 1rem;
  border-left: 4px solid #dc2626;
  padding: 0.75rem;
  background: #fef2f2;
  color: #991b1b;
}

.messages {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.message {
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  padding: 0.64rem 0.78rem;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
  font-weight: var(--weight-label);
}

.message.success {
  border-color: #bbf7d0;
  border-left-color: #16a34a;
  color: #166534;
  background: #f0fdf4;
}

.message.error {
  border-color: #fecaca;
  border-left-color: #dc2626;
  color: #991b1b;
  background: #fef2f2;
}

.message.warning {
  border-color: #fde68a;
  border-left-color: #ca8a04;
  color: #854d0e;
  background: #fffbeb;
}

.message.info {
  border-color: #bfdbfe;
  border-left-color: #2563eb;
  color: #1e40af;
  background: #eff6ff;
}

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

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 1.15rem 0.85rem;
}

.brand {
  display: grid;
  gap: 0.15rem;
  margin: 0 0 1.25rem;
  padding: 0.12rem 0.55rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
  font-weight: var(--weight-heading);
}

.brand small {
  color: var(--sidebar-muted);
  font-size: 0.74rem;
  font-weight: var(--weight-action);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  gap: 0.15rem;
}

.sidebar-section-label {
  display: block;
  margin: 1rem 0 0.35rem;
  padding: 0 0.55rem;
  color: var(--sidebar-muted);
  font-size: 0.68rem;
  font-weight: var(--weight-label);
  letter-spacing: 0;
}

.sidebar-section-label:first-child {
  margin-top: 0;
}

.sidebar-link {
  display: block;
  border-radius: 5px;
  padding: 0.58rem 0.72rem;
  color: var(--sidebar-text);
  font-weight: var(--weight-action);
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: var(--sidebar-active-text);
  background: var(--sidebar-active);
}

.sidebar-link.active {
  box-shadow: inset 3px 0 0 var(--sidebar-active-border);
}

.content {
  min-width: 0;
  padding: 0 1.75rem 2.5rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  min-height: 3.5rem;
  margin: 0 -1.75rem 1.45rem;
  border-bottom: 1px solid var(--line);
  padding: 0 1.75rem;
  background: rgba(255, 255, 255, 0.92);
}

.user-label {
  color: var(--muted);
  font-weight: var(--weight-label);
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}

.card,
.worker-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.08rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.card h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: var(--weight-label);
}

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

.worker-card h1 {
  margin: 0 0 1rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(220, 227, 236, 0.75);
}

.page-header > div:first-child {
  min-width: 0;
}

.page-header h1 {
  margin: 0;
  font-size: 1.62rem;
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: var(--weight-heading);
}

.page-header p {
  margin: 0.42rem 0 0;
  color: var(--muted);
}

.button-row,
.actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

td.actions {
  display: table-cell;
  min-width: 8.5rem;
  text-align: right;
  white-space: nowrap;
}

td.actions a,
td.actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border: 1px solid #d4dde8;
  border-radius: 6px;
  padding: 0.32rem 0.58rem;
  font-size: 0.84rem;
  line-height: 1.2;
  font-weight: var(--weight-action);
}

td.actions a {
  margin-right: 0.32rem;
  color: var(--brand-dark);
  background: #f8fafc;
}

td.actions form {
  display: inline-flex;
  justify-content: flex-end;
  margin: 0;
}

td.actions button {
  min-height: 2rem;
}

td.actions a:hover {
  border-color: var(--brand);
  color: #ffffff;
  background: var(--brand);
}

td.actions a:last-child {
  margin-right: 0;
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-bar label {
  color: var(--ink);
  font-size: 0.86rem;
}

.filter-bar input,
.filter-bar select {
  height: 2.38rem;
  border-color: #d6e1eb;
  color: var(--ink);
  font-weight: 400;
}

.filter-bar input::placeholder {
  color: #8794a6;
}

.filter-bar select:invalid,
.filter-bar input[type="date"]:invalid {
  color: #8794a6;
}

.filter-bar > button,
.filter-bar > .button {
  align-self: end;
  height: 2.38rem;
  min-height: 2.38rem;
  padding: 0 0.86rem;
}

.filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: -0.25rem 0 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  padding: 0.56rem 0.72rem;
  color: var(--muted);
  background: #f8fafc;
  font-weight: var(--weight-label);
}

.filter-summary a {
  color: var(--brand-dark);
  white-space: nowrap;
}

.filter-summary a:hover {
  text-decoration: underline;
}

.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: -0.25rem 0 1rem;
}

.quick-filter-row .button {
  min-height: 2.15rem;
  padding: 0.42rem 0.72rem;
}

.quick-filter-row .button.active {
  border-color: var(--brand);
  color: #ffffff;
  background: var(--brand);
}

.roster-bulk-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.roster-bulk-action-card h2 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.roster-bulk-action-card p {
  margin: 0;
  color: var(--muted);
}

.planner-week-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
  padding: 0.78rem 0.9rem;
}

.planner-week-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-wrap: wrap;
}

.planner-week-controls .button {
  min-height: 2rem;
  padding: 0.34rem 0.62rem;
}

.planner-week-range {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: var(--weight-heading);
  white-space: nowrap;
}

.planner-scope-chips {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  min-width: 0;
  flex-wrap: wrap;
}

.planner-scope-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  border: 1px solid #cde7e3;
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  color: var(--brand-dark);
  background: #f3fbf9;
  font-size: 0.82rem;
  font-weight: var(--weight-label);
  line-height: 1.2;
}

.planner-scope-multi-week .planner-scope-chip:first-child {
  color: #854d0e;
  border-color: #fde68a;
  background: #fffbeb;
}

.planner-filter-card {
  margin-bottom: 0.75rem;
}

.planner-filter-card-compact {
  padding: 0.86rem;
}

.planner-filter-bar {
  margin-bottom: 0;
}

.planner-filter-bar-compact {
  display: grid;
  grid-template-columns: minmax(130px, 0.75fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(135px, 0.82fr) minmax(135px, 0.82fr) auto auto;
  align-items: end;
  gap: 0.58rem;
}

.planner-filter-bar-compact button,
.planner-filter-bar-compact .button {
  min-height: 2.35rem;
  padding: 0.5rem 0.72rem;
}

.planner-filter-actions {
  display: contents;
}

.planner-shift-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.planner-shift-card {
  gap: 0.8rem;
}

.planner-scroll-frame {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding-bottom: 0;
}

.planner-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 0;
  min-width: 980px;
}

.planner-day-card {
  min-height: 12rem;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
}

.planner-day-card:last-child {
  border-right: 0;
}

.planner-weekend {
  background: #fff7ed;
}

.planner-day-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 0.52rem 0.62rem;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.planner-weekend header {
  background: #ffedd5;
}

.planner-day-card header div {
  display: grid;
  gap: 0.2rem;
}

.planner-day-card header span {
  color: var(--muted);
  font-size: 0.86rem;
}

.planner-day-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
}

.planner-add-shift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.68rem;
  height: 1.68rem;
  border: 1px solid #9fcfc7;
  border-radius: 5px;
  color: var(--brand-dark);
  background: #ffffff;
  font-size: 1rem;
  font-weight: var(--weight-link);
  line-height: 1;
  white-space: nowrap;
}

.planner-add-shift-square {
  flex: 0 0 auto;
}

.planner-add-shift:hover {
  border-color: var(--brand);
  color: #ffffff;
  background: var(--brand);
}

.planner-paste-shift {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.68rem;
  height: 1.68rem;
  min-height: 1.68rem;
  border: 1px solid var(--planner-copy-border);
  border-radius: 5px;
  padding: 0;
  color: var(--planner-copy-ink);
  background: var(--planner-copy-bg);
  cursor: pointer;
}

.planner-paste-shift svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.planner-paste-shift:hover,
.planner-paste-shift:focus {
  border-color: var(--planner-copy-ink);
  background: var(--planner-copy-bg-hover);
}

.planner-paste-shift-hidden {
  display: none;
}

.planner-day-shifts {
  display: grid;
  gap: 0.44rem;
  padding: 0.52rem;
}

.planner-shift-tile {
  display: grid;
  gap: 0.36rem;
  overflow: hidden;
  padding: 0.5rem;
  border: 0;
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  background: var(--brand-soft);
}

.planner-shift-copy {
  min-width: 0;
}

.planner-shift-time {
  display: block;
  color: var(--brand-dark);
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.planner-shift-meta {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.planner-shift-tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.planner-shift-tile .status-pill {
  padding: 0.12rem 0.38rem;
  font-size: 0.7rem;
}

.planner-shift-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.planner-shift-delete-form {
  display: inline-flex;
  margin: 0;
}

.planner-shift-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  min-height: 1.65rem;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.planner-shift-action svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.planner-shift-action:hover,
.planner-shift-action:focus {
  border-color: var(--line);
  color: var(--brand-dark);
  background: #ffffff;
}

.planner-shift-action-active {
  border-color: var(--planner-copy-border);
  color: var(--planner-copy-ink);
  background: var(--planner-copy-bg);
}

.planner-shift-action-active:hover,
.planner-shift-action-active:focus {
  border-color: var(--planner-copy-ink);
  color: var(--planner-copy-ink);
  background: var(--planner-copy-bg-hover);
}

.planner-shift-delete:hover,
.planner-shift-delete:focus {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fef2f2;
}

.planner-empty-day {
  margin: 0;
  min-height: 3.6rem;
}

.shift-modal-open {
  overflow: hidden;
}

.shift-modal-open .planner-scroll-frame {
  overflow: hidden;
}

.shift-modal-open .planner-date-grid {
  display: none;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 0;
  width: 100%;
}

.shift-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.42);
}

.shift-modal-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1040px, 100%);
  max-height: 85vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.shift-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.1rem;
  background: #ffffff;
}

.shift-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.shift-modal-header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.shift-modal-close {
  flex: 0 0 auto;
  width: 2rem;
  min-height: 2rem;
  padding: 0;
  color: var(--ink);
  background: #f8fafc;
  font-size: 1.35rem;
  line-height: 1;
}

.shift-modal-close:hover {
  color: #ffffff;
  background: var(--brand);
}

.shift-modal-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  max-width: none;
  gap: 0;
}

.shift-modal-body {
  display: grid;
  gap: 0.9rem;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.1rem;
  background: var(--surface);
}

.shift-modal-body .form-section {
  box-shadow: none;
}

.shift-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  border-top: 1px solid var(--line);
  padding: 0.85rem 1.1rem;
  background: #ffffff;
}

.shift-delete-confirm-dialog {
  width: min(560px, 100%);
  grid-template-rows: auto minmax(0, auto) auto;
}

.shift-delete-confirm-card {
  border: 1px solid #fecaca;
  border-radius: 7px;
  padding: 0.85rem;
  background: #fff7f7;
}

.shift-delete-confirm-card dl {
  display: grid;
  gap: 0.45rem 0.8rem;
  grid-template-columns: 7rem minmax(0, 1fr);
  margin: 0;
}

.shift-delete-confirm-card dt {
  color: var(--muted);
  font-weight: var(--weight-label);
}

.shift-delete-confirm-card dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: var(--weight-action);
}

.shift-modal-delete-button {
  background: #b91c1c;
}

.shift-modal-delete-button:hover,
.shift-modal-delete-button:focus {
  background: #991b1b;
}

.filter-bar label,
.field {
  display: grid;
  align-self: start;
  align-content: start;
  gap: 0.4rem;
  font-weight: var(--weight-label);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem 0.66rem;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(22, 135, 125, 0.14);
}

input[type="checkbox"] {
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 0;
  padding: 0;
  justify-self: start;
  align-self: center;
  accent-color: var(--brand);
}

.invoice-logo-field {
  min-width: 0;
}

.invoice-logo-field p {
  margin: 0;
  color: var(--muted);
  font-weight: 400;
}

.invoice-logo-current {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.65rem;
  background: #f8fafc;
}

.invoice-logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--brand-dark);
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: var(--weight-label);
}

.invoice-logo-current strong,
.invoice-logo-current span {
  display: block;
  min-width: 0;
}

.invoice-logo-current span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  color: var(--muted);
  font-weight: var(--weight-action);
}

.bulk-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.service-log-workbench,
.invoice-workbench,
.participant-workbench {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.service-log-status-grid,
.invoice-status-grid,
.participant-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.service-log-status-card,
.invoice-status-card,
.participant-status-card {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  min-height: 5.5rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.75rem 0.82rem;
  background: #ffffff;
}

.service-log-status-card:hover,
.service-log-status-card.active,
.invoice-status-card:hover,
.invoice-status-card.active,
.participant-status-card:hover,
.participant-status-card.active {
  border-color: var(--brand);
  background: #f8fffd;
}

.service-log-status-card span,
.invoice-status-card span,
.participant-status-card span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: var(--weight-label);
}

.service-log-status-card strong,
.invoice-status-card strong,
.participant-status-card strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
}

.service-log-status-card small,
.invoice-status-card small,
.participant-status-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.invoice-filter-panel,
.participant-filter-panel {
  display: grid;
  gap: 0.62rem;
  margin-bottom: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.78rem;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.invoice-filter-copy,
.participant-filter-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.invoice-filter-copy strong,
.participant-filter-copy strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.invoice-filter-copy span,
.participant-filter-copy span {
  color: var(--muted);
  font-size: 0.84rem;
}

.invoice-filter-bar,
.participant-filter-bar {
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.service-log-filter-bar {
  margin-bottom: 0.7rem;
}

.service-log-bulk-actions {
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.service-log-bulk-actions div {
  display: grid;
  gap: 0.14rem;
}

.service-log-bulk-actions strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.service-log-bulk-actions span {
  color: var(--muted);
  font-size: 0.82rem;
}

.table-card {
  overflow-x: auto;
  border: 1px solid #d5e0ea;
  border-radius: 6px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.table-card.card {
  display: block;
  padding: 0.78rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.service-log-table {
  min-width: 960px;
}

.invoice-table {
  min-width: 900px;
}

.participant-table {
  table-layout: fixed;
  min-width: 1000px;
}

.service-log-table .service-log-select-cell,
.service-log-table .service-log-hours-cell {
  width: 1%;
  white-space: nowrap;
}

.service-log-table th:nth-child(2),
.service-log-table .service-log-date-cell,
.service-log-table .service-log-status-cell {
  white-space: nowrap;
}

.service-log-table .service-log-person-cell {
  min-width: 8.5rem;
  overflow-wrap: anywhere;
  font-weight: var(--weight-action);
}

.service-log-table td.service-log-actions-cell {
  min-width: 10.5rem;
  white-space: normal;
}

.service-log-table td.service-log-actions-cell a {
  margin-bottom: 0.35rem;
}

.service-log-table .notes-cell {
  max-width: 20rem;
  min-width: 14rem;
}

.invoice-table .invoice-status-cell,
.invoice-table .invoice-total-cell {
  width: 1%;
  white-space: nowrap;
}

.invoice-table .invoice-number-cell {
  min-width: 10.5rem;
}

.invoice-table .invoice-participant-cell {
  min-width: 9.5rem;
  overflow-wrap: anywhere;
}

.invoice-table .invoice-period-cell {
  min-width: 13rem;
  white-space: nowrap;
}

.invoice-table td.actions {
  min-width: 7.5rem;
}

.participant-table th:nth-child(1),
.participant-table .participant-identity-cell {
  width: 27%;
}

.participant-table th:nth-child(2),
.participant-table .participant-contact-cell {
  width: 20%;
}

.participant-table th:nth-child(4),
.participant-table .participant-plan-cell {
  width: 13%;
}

.participant-table th:nth-child(3),
.participant-table .participant-status-cell {
  width: 8%;
  white-space: nowrap;
}

.participant-table th:nth-child(5),
.participant-table .participant-workers-cell {
  width: 12%;
}

.participant-table th:nth-child(6),
.participant-table .participant-coordinator-cell {
  width: 10%;
  color: #314052;
  overflow-wrap: anywhere;
}

.participant-table th:nth-child(7),
.participant-table td.actions {
  width: 10%;
}

.participant-identity {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  min-width: 0;
}

.participant-avatar,
.participant-worker-avatars span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #bfeee6;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #ccfbf1;
  font-weight: var(--weight-action);
  line-height: 1;
}

.participant-avatar {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.84rem;
}

.service-log-date-stack,
.service-log-person-stack,
.invoice-number-stack,
.invoice-participant-stack,
.invoice-period-stack,
.invoice-total-stack,
.participant-name-stack,
.participant-contact-stack,
.participant-plan-stack,
.participant-worker-stack {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.service-log-date-stack a,
.service-log-person-stack strong,
.invoice-number-stack a,
.invoice-participant-stack strong,
.invoice-period-stack strong,
.invoice-total-stack strong,
.participant-name-stack a,
.participant-contact-stack strong,
.participant-plan-stack strong,
.participant-worker-stack strong {
  color: var(--ink);
  font-weight: var(--weight-heading);
  line-height: 1.25;
}

.invoice-table .invoice-primary-text {
  color: #172437;
  font-size: 0.9rem;
  font-weight: var(--weight-action);
}

.invoice-table .invoice-secondary-text {
  color: #253348;
  font-size: 0.88rem;
  font-weight: 500;
}

.service-log-table .service-log-person-name {
  color: #253348;
  font-size: 0.88rem;
  font-weight: 500;
}

.service-log-date-stack span,
.service-log-person-stack span,
.invoice-number-stack span,
.invoice-participant-stack span,
.invoice-period-stack span,
.invoice-total-stack span,
.participant-name-stack span,
.participant-contact-stack span,
.participant-plan-stack span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: var(--weight-label);
  line-height: 1.25;
}

.participant-name-stack a {
  font-size: 0.92rem;
  font-weight: var(--weight-action);
}

.participant-contact-stack strong,
.participant-plan-stack strong {
  color: #253348;
  font-size: 0.86rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.participant-contact-stack span,
.participant-plan-stack span,
.participant-name-stack span {
  color: #5f718b;
  font-size: 0.76rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.participant-worker-stack {
  gap: 0.26rem;
}

.participant-worker-stack strong,
.participant-no-worker {
  color: #41516a;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.25;
}

.participant-worker-avatars {
  display: flex;
  align-items: center;
  min-height: 1.55rem;
}

.participant-worker-avatar {
  position: relative;
  cursor: default;
  outline: none;
}

.participant-worker-avatar::before,
.participant-worker-avatar::after {
  position: absolute;
  left: 50%;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.participant-worker-avatar::before {
  content: "";
  bottom: calc(100% + 0.18rem);
  width: 0.46rem;
  height: 0.46rem;
  background: #3156ad;
  transform: translate(-50%, 0.1rem) rotate(45deg);
}

.participant-worker-avatar::after {
  content: attr(data-worker-name);
  bottom: calc(100% + 0.42rem);
  min-width: max-content;
  border-radius: 6px;
  padding: 0.46rem 0.64rem;
  color: #ffffff;
  background: #3156ad;
  box-shadow: 0 10px 24px rgba(21, 36, 76, 0.18);
  font-size: 0.76rem;
  font-weight: var(--weight-action);
  line-height: 1.2;
  white-space: nowrap;
  transform: translate(-50%, 0.1rem);
}

.participant-worker-avatar:hover::before,
.participant-worker-avatar:hover::after,
.participant-worker-avatar:focus-visible::before,
.participant-worker-avatar:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0) rotate(45deg);
}

.participant-worker-avatar:hover::after,
.participant-worker-avatar:focus-visible::after {
  transform: translate(-50%, 0);
}

.participant-worker-avatar:focus-visible {
  box-shadow:
    0 0 0 2px #ffffff,
    0 0 0 4px rgba(49, 86, 173, 0.42);
}

.participant-worker-avatars span {
  width: 1.45rem;
  height: 1.45rem;
  margin-right: -0.28rem;
  border-color: #cdd7ff;
  color: #3730a3;
  background: #e0e7ff;
  font-size: 0.62rem;
}

.participant-no-worker {
  display: inline-flex;
  width: fit-content;
  border: 1px solid #e4e7eb;
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  color: #6b7280;
  background: #f8fafc;
}

.invoice-number-stack span,
.invoice-participant-stack span,
.invoice-period-stack span {
  color: #5f718b;
  font-size: 0.76rem;
  font-weight: 500;
}

.service-log-person-stack .service-log-role-label {
  color: #71819a;
  font-size: 0.75rem;
  font-weight: 400;
}

.invoice-total-stack {
  justify-items: end;
}

.service-log-notes-preview {
  overflow-wrap: anywhere;
  color: #314052;
  line-height: 1.35;
}

.roster-table {
  min-width: 860px;
}

.roster-table th:first-child,
.roster-table td.roster-date-cell,
.roster-table th:nth-child(2),
.roster-table td.roster-time-cell {
  width: 1%;
  white-space: nowrap;
}

.roster-table .roster-person-cell {
  min-width: 8.5rem;
  overflow-wrap: anywhere;
  font-weight: var(--weight-action);
}

.roster-table .roster-service-cell {
  min-width: 8rem;
  color: #314052;
  overflow-wrap: anywhere;
}

.roster-table .roster-next-action-cell {
  min-width: 10rem;
  color: var(--muted);
  font-weight: var(--weight-label);
}

.roster-table td.actions {
  min-width: 8.25rem;
}

th,
td {
  border-bottom: 1px solid #e3ebf2;
  padding: 0.62rem 0.75rem;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #fbfcfd;
  color: #5e6f87;
  font-size: 0.78rem;
  font-weight: var(--weight-label);
  text-transform: none;
}

.table-card th,
.table-card td {
  border-bottom: 1px solid #e3ebf2;
}

.table-card td {
  color: #172437;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.35;
}

.table-card .actions-heading {
  text-align: right;
}

.numeric-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sort-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.sort-link:hover {
  color: var(--brand-dark);
}

tbody tr:hover {
  background: #fbfcfd;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.72rem 0.85rem;
  color: var(--muted);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.pagination-summary {
  font-size: 0.9rem;
  font-weight: var(--weight-label);
}

.pagination-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  font-weight: var(--weight-label);
}

.pagination-links a,
.pagination-links .disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.32rem 0.68rem;
  background: #ffffff;
  line-height: 1.2;
}

.pagination-links a {
  color: var(--brand-dark);
}

.pagination-links a:hover {
  border-color: var(--brand);
  color: #ffffff;
  background: var(--brand);
}

.pagination-links .disabled {
  color: #98a2b3;
  background: #f8fafc;
}

.pagination-links > span:not(.disabled) {
  color: var(--muted);
  font-size: 0.88rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.5rem;
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.8rem;
  font-weight: var(--weight-action);
  line-height: 1;
  white-space: nowrap;
}

.status-pill.status-active,
.status-pill.status-approved,
.status-pill.status-confirmed,
.status-pill.status-issued,
.status-pill.status-paid,
.status-pill.status-current {
  color: #065f46;
  background: #d1fae5;
}

.status-pill.status-draft,
.status-pill.status-archived,
.status-pill.status-inactive,
.status-pill.status-not_provided,
.status-pill.status-completed {
  color: #475467;
  background: #eef2f6;
}

.status-pill.status-published,
.status-pill.status-submitted,
.status-pill.status-pending {
  color: #92400e;
  background: #fef3c7;
}

.status-pill.status-rejected,
.status-pill.status-cancelled,
.status-pill.status-no_show,
.status-pill.status-expired {
  color: #991b1b;
  background: #fee2e2;
}

.status-pill.status-invoiced {
  color: var(--brand-dark);
  background: #ccfbf1;
}

.record-form {
  display: grid;
  gap: 1.05rem;
  max-width: 1160px;
}

.info-notice {
  border: 1px solid #cde7e3;
  border-left: 3px solid var(--brand);
  border-radius: 7px;
  padding: 0.64rem 0.78rem;
  color: #35505d;
  background: #f3fbf9;
}

.info-notice p {
  margin: 0;
  line-height: 1.45;
}

.recurring-helper-notice {
  margin-bottom: 0.65rem;
}

.form-section {
  border: 1px solid #d5e0ea;
  border-radius: 7px;
  padding: 0.98rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.form-section h2 {
  margin: 0 0 0.88rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e3ebf2;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.25;
  font-weight: var(--weight-heading);
}

.form-grid {
  display: grid;
  gap: 0.86rem 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

.shift-service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.shift-service-grid .field {
  min-width: 0;
}

.shift-address-field,
.shift-instructions-field,
.shift-admin-notes-field {
  align-self: stretch;
}

.shift-address-field textarea,
.shift-instructions-field textarea,
.shift-admin-notes-field textarea {
  min-height: 5.15rem;
}

.support-item-form-grid {
  align-items: start;
}

.support-item-active-panel {
  display: grid;
  align-self: end;
  gap: 0.32rem;
  min-height: 4.9rem;
  border: 1px solid #d6e1eb;
  border-left: 3px solid var(--brand);
  border-radius: 7px;
  padding: 0.66rem 0.74rem;
  background: #fbfffe;
}

.support-item-active-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.support-item-active-panel .support-item-active-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  width: fit-content;
}

.support-item-active-panel .support-item-active-toggle input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.support-item-notes-field {
  grid-column: span 2;
}

.toggle-field {
  color: var(--ink);
}

.field span {
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.25;
  font-weight: var(--weight-label);
}

.field input,
.field select {
  height: 2.38rem;
  border-color: #d6e1eb;
  font-weight: 400;
}

.field textarea {
  min-height: 4.9rem;
  border-color: #d6e1eb;
  font-weight: 400;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8794a6;
}

.form-section-note {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.worker-access-section {
  border-color: #e0c9c9;
  background: #ffffff;
}

.worker-access-grid {
  display: grid;
  gap: 0.78rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.worker-access-panel {
  display: grid;
  gap: 0.55rem;
  border: 1px solid #d5e0ea;
  border-left: 3px solid var(--brand);
  border-radius: 7px;
  padding: 0.82rem 0.9rem;
  background: #ffffff;
}

.worker-access-panel-neutral {
  border-left: 3px solid var(--brand);
  background: #fbfffe;
}

.worker-access-panel-warning {
  border-color: #f1cfcf;
  border-left: 3px solid #dc2626;
  background: #fffafa;
}

.worker-archive-panel {
  border-left: 3px solid #dc2626;
}

.worker-access-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.25;
  font-weight: var(--weight-heading);
}

.worker-access-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
}

.worker-access-toggle input[type="checkbox"] {
  flex: 0 0 auto;
}

.worker-access-copy {
  display: grid;
  gap: 0.1rem;
}

.field-error {
  color: #b91c1c;
  font-size: 0.88rem;
  font-weight: 400;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-bottom: 2rem;
}

.detail-grid {
  display: grid;
  gap: 1.05rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-bottom: 1.05rem;
}

.detail-grid .card {
  gap: 1rem;
}

.shift-detail-page {
  display: grid;
  gap: 1.15rem;
}

.shift-detail-page .page-header {
  margin-bottom: 0;
}

.roster-workflow-card {
  gap: 0.95rem;
}

.roster-workflow-card .workflow-panel {
  align-items: center;
  padding: 0.9rem 1.05rem;
}

.shift-detail-grid {
  margin-top: 0.15rem;
}

.shift-info-card .detail-list {
  row-gap: 0;
}

.shift-info-card .detail-list dt,
.shift-info-card .detail-list dd {
  min-width: 0;
  padding-top: 0.68rem;
  padding-bottom: 0.68rem;
}

.detail-value {
  display: inline-block;
  max-width: 100%;
}

.detail-value-long {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.shift-cancel-card {
  border-left: 4px solid #dc2626;
  background: #fffafa;
  box-shadow: none;
}

.shift-cancel-card h2 {
  color: #991b1b;
}

.shift-cancel-card p {
  max-width: 48rem;
}

.shift-cancel-form {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
}

.shift-cancel-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: var(--weight-label);
}

.detail-list {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(8.5rem, 0.32fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #edf1f6;
  border-radius: 7px;
  background: #ffffff;
}

.detail-list dt {
  border-top: 1px solid #edf1f6;
  padding: 0.58rem 0.72rem;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 0.82rem;
  font-weight: var(--weight-label);
}

.detail-list dd {
  border-top: 1px solid #edf1f6;
  border-left: 1px solid #edf1f6;
  margin: 0;
  min-width: 0;
  padding: 0.58rem 0.72rem;
  color: #172437;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.detail-list dt:first-of-type,
.detail-list dd:first-of-type {
  border-top: 0;
}

.detail-empty {
  color: #94a3b8;
  font-weight: 400;
}

.related-records-card {
  gap: 0.85rem;
  overflow-x: auto;
}

.related-records-card h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: var(--weight-label);
}

.related-records-table {
  min-width: 620px;
}

.related-records-table th,
.related-records-table td {
  padding: 0.58rem 0.72rem;
  font-size: 0.86rem;
}

.tabs-placeholder {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tabs-placeholder span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  color: var(--muted);
  background: #f8fafc;
}

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

.readiness-list li {
  display: grid;
  gap: 0.2rem;
  border-left: 4px solid var(--line);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  background: #f8fafc;
}

.readiness-list li span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: var(--weight-label);
}

.readiness-list li.is-ready {
  border-left-color: var(--brand);
}

.readiness-list li.needs-attention {
  border-left-color: var(--accent);
}

.workflow-panel {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 1rem;
  background: #f8fafc;
}

.workflow-panel p {
  margin: 0.6rem 0 0;
  color: var(--muted);
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inline-form input {
  min-width: 140px;
}

.list-item {
  display: grid;
  gap: 0.35rem;
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}

.worker-shift-toolbar {
  display: grid;
  gap: 0.75rem;
  margin: 0.7rem 0 1.1rem;
}

.shift-summary {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0;
}

.shift-summary > span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  color: var(--brand-dark);
  background: #e7f5f3;
  font-weight: var(--weight-label);
}

.shift-summary > .shift-summary-attention {
  border-color: #f6d68b;
  color: #92400e;
  background: #fff7dc;
}

.shift-summary > .shift-summary-upcoming {
  border-color: #bde3df;
  color: var(--brand-dark);
  background: #e7f5f3;
}

.shift-summary > .shift-summary-completed {
  border-color: #d8c7f5;
  color: #6d4aa2;
  background: #f4efff;
}

.shift-summary-count {
  color: var(--brand-dark);
  font-size: 1rem;
  line-height: 1;
}

.shift-summary-attention .shift-summary-count {
  color: #92400e;
}

.shift-summary-completed .shift-summary-count {
  color: #6d4aa2;
}

.shift-filter-nav {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.shift-filter-nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  color: var(--brand-dark);
  background: #ffffff;
  font-weight: var(--weight-label);
}

.shift-filter-nav a:hover,
.shift-filter-nav a.filter-active {
  border-color: var(--brand);
  color: #ffffff;
  background: var(--brand);
}

.shift-section-title {
  margin: 1.3rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-transform: uppercase;
}

.shift-list-item {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  border-left: 4px solid var(--line);
  padding-left: 0.85rem;
}

.shift-list-item-top {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  min-width: 0;
}

.shift-list-main {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.shift-list-title {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  line-height: 1.25;
}

.shift-list-date,
.shift-list-time,
.shift-list-meta {
  min-width: 0;
}

.shift-list-meta {
  color: var(--ink);
}

.shift-list-status-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  min-width: 0;
}

.shift-list-view-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2rem;
  border: 1px solid #c8d4e3;
  border-radius: 6px;
  padding: 0.32rem 0.58rem;
  color: var(--brand-dark);
  background: #ffffff;
  font-size: 0.92rem;
  font-weight: var(--weight-action);
  line-height: 1.2;
}

.shift-list-view-action:hover {
  border-color: var(--brand);
  color: #ffffff;
  background: var(--brand);
}

.shift-list-secondary-action {
  touch-action: manipulation;
}

.shift-list-item-attention {
  border-left-color: var(--accent);
  background: #fffbeb;
}

.shift-list-item-upcoming {
  border-left-color: var(--brand);
}

.shift-list-item-past {
  color: var(--muted);
}

.list-item-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.list-item-actions form {
  margin: 0;
}

.list-item-actions a,
.list-item-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2rem;
  border: 1px solid #c8d4e3;
  border-radius: 6px;
  padding: 0.32rem 0.58rem;
  color: var(--brand-dark);
  background: #ffffff;
  font-size: 0.92rem;
  font-weight: var(--weight-action);
  line-height: 1.2;
}

.list-item-actions a:hover,
.list-item-actions button:hover {
  border-color: var(--brand);
  color: #ffffff;
  background: var(--brand);
}

.list-item-actions .primary-action,
.list-item-actions button {
  border-color: var(--brand);
  color: #ffffff;
  background: var(--brand);
}

.list-item-actions .primary-action:hover,
.list-item-actions button:hover {
  background: var(--brand-dark);
}

.empty-state {
  display: grid;
  gap: 0.72rem;
  justify-items: start;
  border: 1px dashed #cbd5e1;
  border-radius: 7px;
  padding: 1.15rem 1.2rem;
  color: var(--muted);
  background: #f8fafc;
}

.empty-state strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
}

.empty-state p {
  margin: 0;
  max-width: 48rem;
  line-height: 1.45;
}

.empty-state-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding-top: 0.1rem;
}

.worker-content {
  width: min(100%, 1040px);
}

.worker-card {
  margin: 1rem;
}

.worker-dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.worker-dashboard-page {
  display: grid;
  gap: 1rem;
}

.worker-priority-panel {
  margin-bottom: 0;
}

.worker-tool-grid {
  align-items: stretch;
}

.worker-tool-card {
  min-height: 9rem;
}

.worker-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.worker-table-scroll table {
  min-width: 30rem;
}

.dashboard-overview {
  display: grid;
  grid-template-columns: minmax(18rem, 0.85fr) minmax(28rem, 1.35fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-card {
  box-shadow: var(--shadow);
}

.dashboard-card h2 {
  font-size: 1.1rem;
}

.dashboard-card > div:first-child p,
.workflow-checklist-header p {
  margin-top: 0.18rem;
}

.operations-summary-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1fr;
}

.operations-summary-item {
  display: grid;
  gap: 0.2rem;
  min-height: auto;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 7px;
  padding: 0.68rem 0.8rem;
  background: #ffffff;
}

.operations-summary-item:hover {
  border-color: var(--brand);
  border-left-color: var(--brand);
  background: #f8fffd;
}

.operations-summary-item strong {
  font-size: 0.98rem;
}

.operations-summary-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.operations-summary-item.roster,
.operations-summary-item.review {
  border-left-color: var(--accent);
}

.operations-summary-item.invoice-ready,
.operations-summary-item.invoice-draft {
  border-left-color: var(--brand);
}

.operations-summary-item.invoice-issued {
  border-left-color: #64748b;
}

.summary-empty-state {
  display: grid;
  gap: 0.32rem;
  border: 1px dashed #cbd5e1;
  border-radius: 7px;
  padding: 1rem;
  color: var(--muted);
  background: #f8fafc;
}

.summary-empty-state strong {
  color: var(--ink);
}

.dashboard-workbench-header {
  margin-bottom: 1rem;
}

.dashboard-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

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

.dashboard-section-heading p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.dashboard-overview-strip {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.operations-overview-grid,
.common-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.72rem;
}

.operations-overview-item,
.common-action-item {
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.82rem 0.9rem;
  background: #ffffff;
}

.operations-overview-item:hover,
.common-action-item:hover {
  border-color: var(--brand);
  background: #f8fffd;
}

.operations-overview-item strong,
.common-action-item strong {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.25;
}

.operations-overview-item span,
.common-action-item span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.dashboard-workbench-grid {
  grid-template-columns: minmax(26rem, 1.18fr) minmax(26rem, 0.82fr);
}

.priority-queue-list {
  display: grid;
  gap: 0.58rem;
}

.priority-queue-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  padding: 0.72rem 0.82rem;
  background: #ffffff;
}

.priority-queue-item:hover {
  border-color: var(--brand);
  border-left-color: var(--brand);
  background: #f8fffd;
}

.priority-queue-item.invoice-ready,
.priority-queue-item.invoice-draft {
  border-left-color: var(--brand);
}

.priority-queue-item.invoice-issued {
  border-left-color: #64748b;
}

.priority-queue-count {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 7px;
  color: var(--brand-dark);
  background: #ccfbf1;
  font-weight: var(--weight-strong);
  line-height: 1;
}

.priority-queue-copy {
  display: grid;
  min-width: 0;
  gap: 0.16rem;
}

.priority-queue-copy strong {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.25;
}

.priority-queue-copy span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.priority-queue-label {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.common-actions {
  margin-top: 1rem;
}

.workflow-checklist {
  background: #fbfdfc;
  box-shadow: none;
}

.workflow-checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.72rem;
}

.workflow-checklist-badge {
  flex: 0 0 auto;
  width: fit-content;
  border: 1px solid #dce8e5;
  border-radius: 6px;
  padding: 0.22rem 0.48rem;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.76rem;
  font-weight: var(--weight-label);
}

.workflow-checklist-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-checklist-list li {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr) auto;
  gap: 0.62rem;
  align-items: start;
  border-top: 1px solid var(--line);
  padding: 0.66rem 0;
}

.workflow-checklist-list li:first-child {
  border-top: 0;
}

.workflow-checklist-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.08rem;
  border: 1px solid #dce8e5;
  border-radius: 6px;
  color: var(--brand-dark);
  background: #ffffff;
  font-size: 0.74rem;
  font-weight: var(--weight-heading);
  line-height: 1;
}

.workflow-checklist-copy {
  min-width: 0;
}

.workflow-checklist-title-line {
  display: flex;
  align-items: baseline;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.workflow-checklist-title-line strong {
  display: inline;
}

.workflow-checklist-detail {
  display: inline;
  color: #5c7187;
  font-size: 0.78rem;
  font-weight: var(--weight-label);
  line-height: 1.25;
}

.workflow-checklist-detail::before {
  color: #9aadb8;
  content: "\00b7";
  margin-right: 0.38rem;
}

.workflow-checklist-description {
  display: block;
  margin-top: 0.08rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.workflow-checklist-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 0;
}

.workflow-checklist-action a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  min-height: 1.65rem;
  border: 1px solid #cdded9;
  border-radius: 6px;
  padding: 0.12rem 0.5rem;
  color: var(--brand-dark);
  background: #ffffff;
  text-align: center;
  font-weight: var(--weight-label);
  line-height: 1;
}

.workflow-checklist-action a:hover {
  border-color: var(--brand);
  background: #f3fbf9;
}

.worker-action-summary {
  margin-bottom: 1rem;
}

.worker-action-summary h2 {
  font-size: 1.1rem;
}

.action-summary-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.action-summary-item {
  display: grid;
  gap: 0.2rem;
  min-height: 4.6rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  background: #ffffff;
}

.action-summary-item:hover {
  border-color: var(--brand);
  border-left-color: var(--brand);
  background: #f8fffd;
}

.action-summary-item strong {
  font-size: 1.05rem;
}

.action-summary-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.action-summary-item.needs-attention {
  border-left-color: var(--accent);
}

.action-summary-item.ready-for-log {
  border-left-color: var(--brand);
}

.action-summary-item.completed {
  border-left-color: #64748b;
}

.worker-app-shell {
  grid-template-columns: 220px minmax(0, 1fr);
}

.worker-mobile-header,
.worker-mobile-drawer,
.worker-mobile-drawer-backdrop {
  display: none;
}

.worker-mobile-menu-button,
.worker-mobile-close-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-weight: var(--weight-action);
}

.worker-sidebar {
  background: var(--sidebar);
}

.worker-sidebar-nav a {
  color: var(--sidebar-text);
}

.worker-main {
  display: grid;
  align-content: start;
  overflow-x: hidden;
}

.worker-topbar {
  margin: 0 0 1rem;
  padding: 0;
}

.worker-service-log-form-page {
  display: grid;
  gap: 1rem;
}

.worker-log-form-header h1 {
  margin: 0;
}

.worker-log-form-header p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.worker-log-shift-summary {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.85rem;
  background: #f8fafc;
}

.worker-log-shift-summary div {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.worker-log-shift-summary dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: var(--weight-label);
}

.worker-log-shift-summary dd {
  margin: 0;
  color: var(--ink);
  font-weight: var(--weight-action);
}

.worker-log-form {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-inline-size: 100%;
}

.worker-log-field-grid,
.worker-log-notes-grid {
  display: grid;
  gap: 0.9rem 1rem;
  min-width: 0;
  max-inline-size: 100%;
}

.worker-log-field-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.worker-log-notes-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.worker-service-log-form-page .field,
.worker-service-log-form-page input,
.worker-service-log-form-page select,
.worker-service-log-form-page textarea {
  min-width: 0;
  max-width: 100%;
  max-inline-size: 100%;
}

.worker-service-log-form-page input[type="time"],
.worker-service-log-form-page input[type="number"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

@supports (-webkit-touch-callout: none) {
  .worker-service-log-form-page input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    min-width: 0;
    width: -webkit-fill-available;
    max-width: -webkit-fill-available;
  }
}

.worker-service-log-form-page textarea {
  min-height: 8rem;
  resize: vertical;
}

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

.worker-shift-detail-page {
  display: grid;
  gap: 1rem;
}

.worker-detail-header {
  margin-bottom: 0;
}

.worker-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-top: 1px solid #edf1f6;
  padding-top: 1rem;
}

.worker-detail-actions form {
  margin: 0;
}

.worker-primary-action {
  min-height: 2.5rem;
}

.worker-bottom-actions {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.errorlist {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  color: #b91c1c;
  font-size: 0.84rem;
  font-weight: var(--weight-action);
  list-style: none;
}

.invoice-preview-filter {
  display: grid;
  grid-template-columns: minmax(14rem, 1.25fr) minmax(10rem, 0.85fr) minmax(10rem, 0.85fr) auto;
  align-items: end;
  gap: 0.75rem;
}

.invoice-preview-filter label {
  display: grid;
  gap: 0.35rem;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: var(--weight-label);
}

.invoice-preview-filter input,
.invoice-preview-filter select,
.invoice-preview-filter button {
  min-height: 2.38rem;
}

.invoice-preview-filter input,
.invoice-preview-filter select {
  border-color: #d6e1eb;
  font-weight: 400;
}

.invoice-preview-filter select:invalid,
.invoice-preview-filter input[type="date"]:invalid {
  color: #8794a6;
}

.invoice-preview-table {
  border-color: #d5e0ea;
}

.invoice-preview-table.card {
  padding: 0;
}

.invoice-preview-table h2 {
  min-height: 2.65rem;
  margin: 0;
  border-bottom: 1px solid #e3ebf2;
  padding: 0.75rem 0.86rem;
  font-size: 0.96rem;
  font-weight: var(--weight-label);
}

.invoice-preview-table table {
  min-width: 940px;
}

.invoice-preview-table th,
.invoice-preview-table td {
  border-bottom: 1px solid #e3ebf2;
}

.invoice-preview-table th {
  padding: 0.62rem 0.75rem;
  color: #5e6f87;
  font-size: 0.78rem;
  font-weight: var(--weight-label);
  vertical-align: middle;
}

.invoice-preview-table td {
  padding: 0.62rem 0.75rem;
  color: #172437;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.35;
  vertical-align: middle;
}

.invoice-preview-table tr:last-child td {
  border-bottom: 0;
}

.invoice-preview-date-cell,
.invoice-preview-worker-cell,
.invoice-preview-hours-cell,
.invoice-preview-travel-cell {
  white-space: nowrap;
}

.invoice-preview-worker-cell {
  font-weight: var(--weight-action);
}

.invoice-preview-support-cell,
.invoice-preview-notes-cell {
  overflow-wrap: anywhere;
}

.invoice-preview-hours-cell,
.invoice-preview-travel-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.invoice-preview-table .status-pill {
  font-weight: var(--weight-label);
}

.invoice-preview-empty-state {
  justify-items: center;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 1.9rem 1rem 2rem;
  text-align: center;
  background: #fbfcfd;
}

.invoice-preview-empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: var(--weight-label);
}

.invoice-preview-empty-state p {
  max-width: 27rem;
  margin: 0.35rem auto 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.invoice-travel-claim {
  min-width: 10rem;
}

.invoice-travel-claim label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  font-weight: var(--weight-label);
}

.invoice-travel-claim input {
  width: 7rem;
}

.invoice-travel-claim small,
.invoice-travel-empty {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.invoice-travel-claim .errorlist {
  margin: 0 0 0.35rem;
  color: #b91c1c;
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .worker-app-shell {
    display: block;
    overflow-x: visible;
  }

  .worker-mobile-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 1rem;
    background: #ffffff;
  }

  .worker-mobile-brand {
    color: var(--ink);
    font-size: 1rem;
    font-weight: var(--weight-heading);
    line-height: 1.15;
  }

  .worker-mobile-role,
  .worker-mobile-user {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: var(--weight-label);
    line-height: 1.2;
  }

  .worker-mobile-user {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .worker-mobile-menu-button {
    display: inline-grid;
    place-items: center;
    gap: 0.18rem;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  }

  .worker-mobile-menu-button::before,
  .worker-mobile-menu-button::after,
  .worker-mobile-menu-icon {
    content: "";
    display: block;
    width: 1.12rem;
    height: 0.13rem;
    border-radius: 999px;
    background: var(--ink);
  }

  .worker-mobile-menu-icon {
    width: 1rem;
    background: var(--brand);
  }

  .worker-mobile-menu-button:hover,
  .worker-mobile-menu-button:focus {
    border-color: #bde3df;
    color: var(--ink);
    background: #f8fffd;
  }

  .worker-sidebar {
    display: none;
  }

  .worker-mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    background: rgba(15, 23, 42, 0.42);
  }

  .worker-mobile-drawer-backdrop[hidden],
  .worker-mobile-drawer[hidden] {
    display: none;
  }

  .worker-mobile-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    display: grid;
    align-content: start;
    width: min(19rem, 86vw);
    border-right: 1px solid var(--line);
    border-radius: 0 12px 12px 0;
    padding: 1rem;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  }

  .worker-mobile-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.9rem;
  }

  .worker-mobile-close-button {
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    font-size: 1.25rem;
    line-height: 1;
  }

  .worker-mobile-drawer-nav {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 0;
  }

  .worker-mobile-drawer-nav .sidebar-link {
    color: var(--ink);
  }

  .worker-mobile-drawer-nav .sidebar-link.active {
    color: var(--sidebar-active-text);
  }

  .worker-mobile-logout {
    border-top: 1px solid var(--line);
    padding-top: 0.9rem;
  }

  .worker-mobile-logout .button {
    width: 100%;
  }

  body.worker-nav-open {
    overflow: hidden;
  }
}

@media (max-width: 1050px) {
  .dashboard-overview {
    grid-template-columns: 1fr;
  }

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

  .operations-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .dashboard-workbench-grid,
  .operations-overview-grid,
  .common-actions-grid,
  .service-log-status-grid,
  .invoice-status-grid,
  .participant-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-log-bulk-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .workflow-checklist-list li {
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: 0.55rem 0.7rem;
  }

  .workflow-checklist-action {
    grid-column: 2;
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
  }
}

@media (max-width: 1280px) {
  .planner-filter-bar-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .planner-filter-bar-compact button,
  .planner-filter-bar-compact .button {
    width: 100%;
  }

  .planner-filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.58rem;
  }
}

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

  .app-shell:not(.worker-app-shell) .sidebar {
    display: none;
  }

  .worker-topbar {
    align-items: center;
    justify-content: space-between;
    margin: 0 -1rem 1rem;
    min-height: 3.4rem;
    padding: 0 1rem;
  }

  .worker-main {
    display: block;
  }

  .worker-card {
    margin: 0 0 1rem;
    padding: 1rem;
  }

  .worker-shift-page {
    overflow: hidden;
    padding: 0.85rem;
  }

  .worker-shift-page h1 {
    margin-bottom: 0.72rem;
    font-size: 1.45rem;
  }

  .worker-shift-toolbar {
    gap: 0.65rem;
    margin: 0.25rem 0 0.85rem;
  }

  .worker-shift-page .shift-summary {
    display: grid;
    align-items: stretch;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem;
    margin: 0;
  }

  .worker-shift-page .shift-summary > span {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 0.08rem;
    min-height: 3.1rem;
    border-radius: 7px;
    padding: 0.52rem 0.55rem;
    font-size: 0.78rem;
    line-height: 1.2;
  }

  .worker-shift-page .shift-summary .shift-summary-count {
    display: block;
    font-size: 1.08rem;
    line-height: 1;
  }

  .worker-shift-page .shift-filter-nav {
    display: grid;
    align-items: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-bottom: 0;
  }

  .worker-shift-page .shift-filter-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 2.15rem;
    padding: 0.38rem 0.52rem;
    text-align: center;
    touch-action: manipulation;
  }

  .worker-content {
    width: 100%;
  }

  .worker-dashboard-grid,
  .action-summary-grid {
    grid-template-columns: 1fr;
  }

  .worker-dashboard-page {
    gap: 0.8rem;
  }

  .worker-dashboard-page .page-header {
    margin-bottom: 0;
    padding-bottom: 0.7rem;
  }

  .worker-priority-panel {
    gap: 0.65rem;
  }

  .worker-priority-panel > div:first-child {
    display: grid;
    gap: 0.2rem;
  }

  .worker-priority-panel h2 {
    font-size: 1rem;
  }

  .worker-priority-panel p {
    font-size: 0.9rem;
  }

  .worker-dashboard-page .action-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .worker-dashboard-page .action-summary-item {
    min-height: 0;
    padding: 0.65rem 0.55rem;
  }

  .worker-dashboard-page .action-summary-item strong {
    font-size: 0.92rem;
    line-height: 1.25;
  }

  .worker-dashboard-page .action-summary-item span {
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .worker-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .worker-tool-card {
    min-height: 0;
    padding: 0.85rem;
  }

  .worker-tool-card h2 {
    font-size: 0.98rem;
  }

  .worker-tool-card p {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .worker-tool-card .card-action {
    width: 100%;
    font-size: 0.88rem;
  }

  .operations-overview-grid,
  .common-actions-grid,
  .dashboard-workbench-grid,
  .service-log-status-grid,
  .invoice-status-grid,
  .participant-status-grid {
    grid-template-columns: 1fr;
  }

  .invoice-filter-copy,
  .participant-filter-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.18rem;
  }

  .invoice-workbench .dashboard-section-heading {
    display: grid;
    gap: 0.22rem;
  }

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

  .priority-queue-label {
    grid-column: 2;
    white-space: normal;
  }

  .workflow-checklist-header {
    display: grid;
    justify-content: stretch;
  }

  .workflow-checklist-action {
    justify-items: start;
  }

  .planner-week-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .planner-week-controls,
  .planner-scope-chips {
    justify-content: flex-start;
  }

  .planner-week-range {
    width: 100%;
  }

  .planner-filter-bar-compact {
    grid-template-columns: 1fr;
  }

  .planner-date-grid {
    grid-template-columns: repeat(7, minmax(140px, 1fr));
    min-width: 980px;
  }

  .shift-modal-backdrop {
    align-items: stretch;
    padding: 0.55rem;
  }

  .shift-modal-dialog {
    width: 100%;
    max-height: calc(100vh - 1.1rem);
  }

  .shift-modal-header,
  .shift-modal-body,
  .shift-modal-footer {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .shift-modal-body .form-section,
  .shift-modal-body .form-grid,
  .shift-modal-body .field,
  .shift-modal-body input,
  .shift-modal-body select,
  .shift-modal-body textarea {
    min-width: 0;
    max-width: 100%;
  }

  .shift-modal-body .form-grid {
    grid-template-columns: 1fr;
  }

  .shift-service-grid {
    grid-template-columns: 1fr;
  }

  .shift-modal-footer {
    justify-content: stretch;
    flex-direction: column-reverse;
  }

  .shift-list-item {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.55rem;
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: 7px;
    padding: 0.78rem;
    background: #ffffff;
    overflow: hidden;
  }

  .shift-list-item .status-pill {
    justify-self: start;
  }

  .shift-list-item-top {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .shift-list-status-row {
    width: 100%;
    justify-content: flex-start;
  }

  .shift-list-view-action {
    align-self: start;
    justify-self: end;
    min-height: 2.4rem;
    min-width: 4.2rem;
    padding: 0.42rem 0.75rem;
  }

  .worker-shift-page .shift-section-title {
    margin-top: 1.05rem;
    font-size: 0.82rem;
    letter-spacing: 0;
  }

  .worker-shift-page .shift-list-item + .shift-list-item {
    margin-top: 0.65rem;
  }

  .worker-shift-page .shift-list-title {
    display: grid;
    gap: 0.18rem;
    font-size: 0.98rem;
    overflow-wrap: anywhere;
  }

  .worker-shift-page .shift-list-meta {
    color: var(--muted);
    overflow-wrap: anywhere;
  }

  .shift-list-actions {
    width: 100%;
  }

  .shift-list-primary-action {
    gap: 0.5rem;
    padding-top: 0.15rem;
  }

  .shift-list-actions a,
  .shift-list-actions button {
    min-height: 2.5rem;
    touch-action: manipulation;
  }

  .shift-list-actions .primary-action,
  .shift-list-actions form,
  .shift-list-actions form button {
    width: 100%;
  }

  .worker-service-log-form-page {
    gap: 0.85rem;
  }

  .worker-log-shift-summary,
  .worker-log-field-grid,
  .worker-log-notes-grid {
    grid-template-columns: 1fr;
  }

  .worker-log-shift-summary {
    gap: 0.55rem;
    padding: 0.75rem;
  }

  .worker-service-log-form-page textarea {
    min-height: 7rem;
  }

  .worker-log-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .worker-log-form-actions button,
  .worker-log-form-actions .button {
    width: 100%;
  }

  .worker-shift-detail-page {
    gap: 0.85rem;
    padding: 0.95rem;
  }

  .worker-detail-header {
    gap: 0.75rem;
    padding-bottom: 0.7rem;
  }

  .worker-detail-header .button {
    width: 100%;
  }

  .worker-shift-detail-page .detail-list {
    gap: 0;
    border: 1px solid #edf1f6;
    border-radius: 7px;
    padding: 0.15rem 0.75rem;
    background: #ffffff;
  }

  .worker-shift-detail-page .detail-list dt {
    border-top: 1px solid #edf1f6;
    padding: 0.72rem 0 0.2rem;
    font-size: 0.82rem;
  }

  .worker-shift-detail-page .detail-list dd {
    border-top: 0;
    padding: 0 0 0.72rem;
  }

  .worker-shift-detail-page .detail-list dt:first-child {
    border-top: 0;
  }

  .worker-detail-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 0.55rem;
    padding-top: 0.85rem;
  }

  .worker-detail-actions form,
  .worker-detail-actions button,
  .worker-detail-actions .button,
  .worker-primary-action {
    width: 100%;
  }

  .shift-filter-nav a {
    font-size: 0.92rem;
  }

  .content {
    padding: 1rem;
  }

  .topbar {
    margin: -1rem -1rem 1rem;
    padding: 0 1rem;
  }

  .page-header {
    display: grid;
  }

  .page-header h1 {
    font-size: 1.55rem;
  }

  .support-item-notes-field {
    grid-column: 1 / -1;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .detail-list dd {
    border-left: 0;
  }

  .workflow-panel {
    grid-template-columns: 1fr;
  }

  .shift-cancel-form {
    grid-template-columns: 1fr;
  }

  .shift-cancel-form button {
    justify-self: start;
  }

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

  .pagination-links {
    justify-content: space-between;
  }
}

@media (max-width: 380px) {
  .worker-shift-page .shift-summary {
    grid-template-columns: 1fr;
  }

  .worker-shift-page .shift-summary > span {
    min-height: 2.75rem;
  }
}

@media (max-width: 340px) {
  .worker-shift-page .shift-filter-nav {
    grid-template-columns: 1fr;
  }
}
