:root {
  /* Shared visual roles. The older names below remain for existing screens. */
  --surface-page: #edf1f2;
  --surface-card: #ffffff;
  --surface-subtle: #f5f7f7;
  --text-primary: #13212a;
  --text-secondary: #56646d;
  --action-primary: #0c6b60;
  --action-primary-hover: #084d46;
  --border-default: #cfd8dc;
  --state-success: #18704f;
  --state-waiting: #805000;
  --state-error: #a12e2e;
  --focus-ring: #176d9a;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius-control: 7px;
  --radius-card: 12px;
  --bg: var(--surface-page);
  --paper: var(--surface-card);
  --paper-soft: var(--surface-subtle);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --accent: var(--action-primary);
  --accent-dark: var(--action-primary-hover);
  --line: var(--border-default);
  --success: var(--state-success);
  --info: #2f80ed;
  --danger: var(--state-error);
  --draft: #fff3dd;
  --open: #e7f5ef;
  --shadow: 0 1px 2px rgba(19, 33, 42, 0.05);
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1rem 1.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer a {
  color: inherit;
}

.account-summary {
  display: grid;
  gap: 0.7rem;
  margin: 1.25rem 0;
}

.account-summary div {
  display: grid;
  grid-template-columns: minmax(5rem, 0.35fr) 1fr;
  gap: 1rem;
}

.account-summary dt {
  color: var(--muted);
}

.account-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.danger-zone {
  border-color: #d9b5b5;
}

.danger-button {
  border: 0;
  border-radius: var(--radius-control);
  background: var(--danger);
  color: #fff;
  padding: 0.62rem 0.85rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.legal-page {
  max-width: 52rem;
  margin-inline: auto;
}

.legal-page h2 {
  margin-top: 1.8rem;
}

.legal-translation {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
  overflow-x: hidden;
}

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

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

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

.shell {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0.6rem 0.8rem 1.2rem;
}

.topbar,
.nav,
.panel,
.auth-card,
.day-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.8rem;
}

.brand {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--ink);
}

.tagline {
  display: none;
}

.topbar-actions,
.nav,
.toolbar,
.toolbar-actions,
.row-actions,
.inline-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-actions,
.row-actions {
  flex-wrap: wrap;
}

.nav {
  margin-top: 0.45rem;
  padding: 0.25rem 0.3rem;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.nav-link {
  padding: 0.28rem 0.45rem;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
  gap: 0.25rem;
}

.nav-link.is-current {
  background: #dcece8;
  color: var(--accent-dark);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-more {
  position: relative;
  z-index: 10;
}

.nav-more-summary {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.nav-more-summary::-webkit-details-marker {
  display: none;
}

.nav-more-summary span {
  margin-left: 0.2rem;
  font-size: 0.65rem;
}

.nav-more[open] .nav-more-summary {
  background: var(--surface-subtle);
  color: var(--text-primary);
}

.nav-more-items {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  display: grid;
  gap: 0.15rem;
  min-width: 12rem;
  padding: 0.35rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-card);
  box-shadow: 0 8px 24px rgba(19, 33, 42, 0.15);
}

.nav-more-items .nav-link {
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.nav-more-items .nav-link:hover {
  background: var(--surface-subtle);
  color: var(--text-primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.05rem;
  padding: 0 0.24rem;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.68rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: var(--space-1) var(--space-2);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
}

.status-badge--success {
  background: #e7f5ef;
  color: #14583e;
}

.status-badge--waiting {
  background: #fff3dd;
  color: var(--state-waiting);
}

.status-badge--error {
  background: #fff0ee;
  color: var(--state-error);
}

.message-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.unread-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 0.5rem;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--info);
  box-shadow: 0 0 0 1px rgba(47, 128, 237, 0.18);
}

.unread-dot[hidden] {
  display: none;
}

.content {
  margin-top: 0.55rem;
  min-width: 0;
}

.guide-shell {
  display: grid;
  gap: 0.65rem;
  max-width: 1040px;
  margin: 0 auto;
}

.guide-intro {
  padding: 0.45rem 0.1rem;
}

.guide-intro h1,
.guide-card h2,
.guide-notification-card h2 {
  margin: 0;
}

.guide-intro h1 {
  font-size: 1.45rem;
}

.guide-intro > p:last-child {
  max-width: 680px;
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.guide-platform-grid,
.guide-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.guide-card,
.guide-notification-card {
  min-width: 0;
}

.guide-platform-label {
  margin: 0 0 0.18rem;
  color: var(--success);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.guide-steps,
.guide-checklist {
  margin: 0.7rem 0 0;
  padding-left: 1.25rem;
}

.guide-steps li,
.guide-checklist li {
  padding: 0.24rem 0 0.24rem 0.12rem;
}

.guide-steps li::marker {
  color: var(--success);
  font-weight: 750;
}

.guide-source-link {
  display: inline-block;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.15rem;
}

.guide-note {
  margin: 0.65rem 0 0;
  padding: 0.5rem 0.6rem;
  border-left: 2px solid var(--success);
  background: var(--open);
  color: #3f5f4e;
  font-size: 0.76rem;
}

.guide-notification-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(280px, 1.4fr) auto;
  gap: 0.8rem;
  align-items: start;
}

.guide-steps-compact {
  margin-top: 0;
}

.guide-actions {
  display: flex;
  justify-content: flex-end;
}

.guide-notification-card > .guide-note {
  grid-column: 1 / -1;
  margin-top: 0;
}

.guide-basics {
  display: grid;
  gap: 0.55rem;
  margin: 0.7rem 0 0;
}

.guide-basics div {
  display: grid;
  grid-template-columns: minmax(90px, 0.35fr) 1fr;
  gap: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.guide-basics dt {
  font-weight: 750;
}

.guide-basics dd {
  margin: 0;
  color: var(--muted);
}

.panel,
.auth-card {
  padding: 0.8rem;
}

.auth-card,
.narrow {
  max-width: 560px;
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

.stack-form p {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.8rem;
}

input,
select,
textarea {
  width: 100%;
  padding: var(--space-2) 0.55rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-card);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--state-error);
  box-shadow: inset 3px 0 0 var(--state-error);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: var(--surface-subtle);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.errorlist {
  margin: var(--space-2) 0;
  padding-left: var(--space-6);
  color: var(--state-error);
  font-size: 0.875rem;
}

textarea {
  min-height: 6rem;
}

.stack-form input[type="color"] {
  width: 4.25rem;
  height: 2.75rem;
  padding: 0.2rem;
}

.settings-field {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}

.form-check-choice {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.form-check-choice input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  accent-color: var(--accent);
}

.form-check-choice small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  line-height: 1.4;
}

.primary-button,
.ghost-button,
.compact-button,
.link-button {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-control);
  padding: 0.38rem 0.58rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.primary-button {
  background: var(--action-primary);
  color: white;
  border-color: var(--action-primary);
}

.primary-button:hover {
  background: var(--action-primary-hover);
}

.ghost-button,
.compact-button,
.link-button {
  background: var(--paper);
  color: var(--ink);
}

.compact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.26rem 0.42rem;
  cursor: pointer;
  font-size: 0.8125rem;
  line-height: 1.15;
  white-space: nowrap;
}

.link-button {
  padding: 0;
  background: transparent;
}

.primary-button:disabled,
.ghost-button:disabled,
.compact-button:disabled,
.danger-button:disabled,
.primary-button[aria-busy="true"],
.ghost-button[aria-busy="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.primary-button[aria-busy="true"],
.ghost-button[aria-busy="true"] {
  pointer-events: none;
}

.danger {
  color: var(--danger);
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.user-chip {
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  background: var(--paper-soft);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 0.76rem;
  max-width: 100%;
}

.language-form select {
  width: auto;
  min-width: 3.6rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.3rem 0.4rem;
  font-size: 0.76rem;
}

.push-test-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0.85rem 0 1rem;
}

.push-diagnostic {
  display: grid;
  gap: 0.18rem;
  margin: 0.65rem 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
}

.push-diagnostic strong {
  font-size: 0.76rem;
}

.push-diagnostic span {
  color: var(--muted);
  font-size: 0.74rem;
}

.subscription-inactive {
  opacity: 0.75;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1rem;
}

.day-card {
  padding: 1rem;
}

.day-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.day-card h2,
.panel h1,
.panel h2,
.auth-card h1 {
  margin: 0 0 0.35rem;
}

.shift-list,
.list,
.messages,
.chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shift-list,
.list {
  display: grid;
  gap: 0.75rem;
}

.shift-card,
.list li {
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.shift-card.draft {
  background: var(--draft);
}

.shift-main,
.shift-meta {
  display: grid;
  gap: 0.15rem;
}

.shift-meta,
.user-chip,
.empty-state,
small {
  color: var(--muted);
}

.template-actions,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0 1rem;
}

.mini-link,
.chip {
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 0.78rem;
}

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

.team-header,
.section-heading,
.access-code-row,
.copy-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.team-header {
  margin: 0.15rem 0 0.65rem;
}

.team-header h1,
.team-header p,
.section-heading h2 {
  margin: 0;
}

.team-header p {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.team-panel + .team-panel,
.team-panel + .shared-link-details {
  margin-top: 0.55rem;
}

.team-panel {
  padding: 0.65rem 0.75rem;
}

.team-table th,
.team-table td {
  padding: 0.52rem 0.42rem;
  font-size: 0.78rem;
  vertical-align: middle;
}

.team-table td strong,
.team-table td small {
  display: block;
}

.team-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.team-actions > form {
  max-width: 100%;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.status-dot::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #b7b7b0;
}

.status-ready {
  color: var(--success);
}

.status-ready::before {
  background: var(--success);
}

.access-code-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 1rem;
  align-items: center;
  margin-bottom: 0.65rem;
  padding: 0.75rem;
  border: 1px solid #bdd8c8;
  border-radius: 10px;
  background: #f2f8f4;
}

.access-code-result strong,
.access-code-result small {
  display: block;
}

.access-code-result code {
  grid-row: span 2;
  padding: 0.35rem 0.5rem;
  border: 1px solid #bdd8c8;
  border-radius: 6px;
  background: white;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  cursor: text;
}

.access-code-result p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.access-code-row {
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
}

.access-code-row:first-child {
  margin-top: 0.4rem;
}

.access-code-row strong,
.access-code-row small {
  display: block;
}

.access-code-row span {
  color: var(--muted);
  font-size: 0.74rem;
}

.shared-link-details summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 650;
}

.shared-link-details p {
  color: var(--muted);
  font-size: 0.74rem;
}

.copy-line input {
  min-width: 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.messages {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.message {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
  font-size: 0.8rem;
}

.message.success {
  border-color: var(--state-success);
  background: #eef8f2;
}

.message.error {
  border-color: var(--state-error);
  background: #fff3f0;
}

.page-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.page-tabs::-webkit-scrollbar,
.nav::-webkit-scrollbar {
  display: none;
}

.page-tab {
  padding: 0.08rem 0 0.22rem;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  white-space: normal;
  line-height: 1.15;
}

.page-tab.active {
  border-color: var(--accent);
  color: var(--accent);
}

.schedule-eyebrow {
  margin: 0 0 0.12rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schedule-stats {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.schedule-stat {
  padding: 0.22rem 0.42rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.schedule-stat span {
  display: inline;
  color: var(--muted);
  font-size: 0.68rem;
}

.schedule-stat strong {
  display: inline;
  margin-left: 0.24rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.schedule-command-bar {
  display: block;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.schedule-calendar-toolbar {
  margin-bottom: 0.45rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.schedule-calendar-toolbar .schedule-stats {
  margin-top: 0.55rem;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.calendar-nav-copy {
  display: grid;
  gap: 0.1rem;
  margin-right: auto;
}

.calendar-nav-copy h1 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.2;
}

.calendar-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.schedule-view-toggle {
  display: inline-flex;
  padding: 0.12rem;
  border-radius: 999px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
}

.schedule-view-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.24rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.schedule-view-toggle .is-active {
  background: white;
  color: var(--ink);
  box-shadow: none;
}

.calendar-nav-copy span {
  color: var(--muted);
  font-size: 0.74rem;
}

.calendar-nav .ghost-button,
.calendar-nav .primary-button {
  padding: 0.32rem 0.5rem;
  font-size: 0.8125rem;
}

.schedule-command-copy p {
  display: none;
}

.schedule-command-copy h2 {
  margin: 0;
  font-size: 0.86rem;
}

.schedule-template-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.schedule-template-chip {
  padding: 0.2rem 0.38rem;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.schedule-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.55rem;
  align-items: end;
}

.schedule-filter-disclosure > summary {
  display: none;
}

.schedule-filter-grid label {
  display: grid;
  gap: 0.28rem;
}

.schedule-filter-grid span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.schedule-filter-grid select,
.schedule-filter-grid input {
  padding: 0.38rem 0.48rem;
  font-size: 0.78rem;
}

.schedule-filter-grid .schedule-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
}

.schedule-filter-grid .schedule-check input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  margin: 0;
}

.schedule-board-panel {
  padding: 0;
  overflow: hidden;
  contain: paint;
}

.schedule-board {
  max-height: min(72vh, 800px);
  overflow: auto;
}

.schedule-grid-header {
  position: sticky;
  top: 0;
  z-index: 3;
}

.schedule-grid-label {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface-card);
}

.schedule-grid-header .schedule-grid-label {
  z-index: 4;
}

.month-calendar-panel {
  padding: 0;
  overflow: hidden;
}

.month-weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.month-weekdays {
  background: var(--paper-soft);
  border-bottom: 1px solid var(--line);
}

.month-weekdays span {
  padding: 0.42rem 0.5rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
}

.month-day {
  min-width: 0;
  min-height: 150px;
  padding: 0.42rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.month-day:nth-child(7n) {
  border-right: 0;
}

.month-day.is-outside-month {
  background: #fafaf7;
  color: #98988f;
}

.month-day.is-today {
  box-shadow: inset 0 0 0 2px #1e6f5c;
}

.month-day-header,
.month-day-number,
.month-day-summary,
.month-shift {
  display: flex;
  align-items: center;
}

.month-day-header {
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 1.7rem;
}

.month-day-number {
  gap: 0.3rem;
}

.month-day-name {
  display: none;
}

.month-day-number strong {
  font-size: 0.82rem;
}

.month-add-shift {
  position: static;
  flex: 0 0 auto;
}

.month-shift-list {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.3rem;
}

.month-shift {
  min-width: 0;
  gap: 0.28rem;
  padding: 0.26rem 0.32rem;
  border-left: 2px solid var(--shift-color, var(--accent));
  border-radius: 5px;
  background: #f7f8f5;
  font-size: 0.65rem;
}

.month-shift.is-open {
  background: #f0f6f1;
}

.month-shift strong,
.month-shift span,
.month-shift small {
  min-width: 0;
}

.month-shift span,
.month-shift small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-shift span {
  flex: 1 1 auto;
  font-weight: 650;
}

.month-shift small {
  color: var(--muted);
}

.month-day-empty {
  color: #aaa99f;
  font-size: 0.66rem;
  padding: 0.3rem 0;
}

.month-more {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.month-day-summary {
  display: none;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 250px repeat(7, minmax(150px, 1fr));
  min-width: 1220px;
}

.schedule-grid + .schedule-grid {
  border-top: 1px solid var(--line);
}

.schedule-grid-summary .schedule-grid-label,
.schedule-grid-summary .schedule-cell {
  min-height: 78px;
  background: var(--surface-subtle);
}

.schedule-summary-label {
  display: grid;
  gap: 0.2rem;
}

.schedule-summary-label small {
  color: var(--muted);
}

.schedule-grid-label,
.schedule-day-heading,
.schedule-cell {
  min-height: 72px;
  padding: 0.42rem;
  border-right: 1px solid var(--line);
}

.schedule-grid-label:last-child,
.schedule-day-heading:last-child,
.schedule-cell:last-child {
  border-right: 0;
}

.schedule-grid-header .schedule-grid-label,
.schedule-grid-header .schedule-day-heading {
  min-height: 3rem;
  padding: 0.38rem 0.42rem;
  background: var(--paper-soft);
}

.schedule-grid-header .schedule-day-heading {
  padding-right: 2.7rem;
}

.schedule-grid-corner {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.schedule-day-heading {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  position: relative;
}

.schedule-day-heading strong {
  font-size: 0.78rem;
}

.schedule-day-heading span {
  color: var(--muted);
  font-size: 0.72rem;
}

.schedule-day-heading.is-today {
  background: #f0f0ea;
}

.schedule-day-title {
  display: grid;
  gap: 0.08rem;
}

.schedule-day-title .schedule-today-label {
  width: max-content;
  padding: 0.06rem 0.28rem;
  border-radius: 4px;
  background: #dcece8;
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 700;
}

.schedule-day-meta {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.schedule-day-meta small {
  padding: 0.03rem 0.16rem;
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 600;
}

.schedule-mini-action {
  position: absolute;
  right: 0.45rem;
  top: 0.45rem;
  width: 2rem;
  height: 2rem;
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.schedule-resource-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--paper-soft);
}

.resource-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.34rem;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.64rem;
  white-space: nowrap;
}

.employee-pill {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.employee-avatar {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 6px;
  background: var(--paper-soft);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.64rem;
}

.employee-pill small,
.schedule-resource-label small {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.68rem;
}

.schedule-cell {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  background: var(--paper);
}

.schedule-cell-open {
  background: #f7f8f3;
}

.schedule-summary-cell {
  display: grid;
  gap: 0.3rem;
  align-content: start;
}

.coverage-card {
  display: grid;
  gap: 0.18rem;
  padding: 0.45rem;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.coverage-card strong {
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.coverage-card-counts {
  font-size: 0.75rem;
  line-height: 1.3;
}

a.coverage-card:hover {
  border-color: var(--action-primary);
}

.staffing-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
}

.coverage-card.staffing-shortage,
.shift-block.staffing-shortage {
  background: #fae7e7;
  border-color: #e7baba;
}

.coverage-card.staffing-review,
.shift-block.staffing-review {
  background: #edf7f0;
  border-color: #bddbc7;
}

.coverage-card.staffing-complete,
.shift-block.staffing-complete {
  background: #dff1e7;
  border-color: #acd5bd;
}

.coverage-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.coverage-line span {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.coverage-chips {
  display: flex;
  gap: 0.28rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.coverage-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  padding: 0.08rem 0.16rem;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 700;
}

.coverage-chip-approved {
  background: #d7eee2;
  color: #175b40;
}

.coverage-chip-pending {
  background: #e4ebef;
  color: #3f5662;
}

.coverage-chip-empty {
  background: #f2f2ed;
  color: #8a8a80;
}

.coverage-chip-scheduled {
  background: #efefea;
  color: #57574e;
}

.coverage-chip-gap {
  background: #fae7c8;
  color: #76521f;
}

.coverage-empty {
  min-height: 100%;
  font-size: 0.68rem;
}

.shift-block {
  display: grid;
  gap: 0.18rem;
  padding: 0.34rem 0.38rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-left: 2px solid var(--shift-color, var(--accent));
  background: white;
  box-shadow: none;
}

a.shift-block {
  color: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

a.shift-block:hover {
  transform: none;
  box-shadow: none;
}

.scheduled-shift {
  background: #eef3f5;
}

.draft-shift {
  background: var(--draft);
}

.open-shift {
  background: #e3f4ed;
}

.shift-role-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #5d5d53;
  font-size: 0.68rem;
}

.shift-block strong {
  font-size: 0.7rem;
}

.shift-block span {
  color: #4d5149;
  font-weight: 600;
  font-size: 0.68rem;
}

.shift-block .shift-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.1rem 0.26rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
}

.shift-state-pending {
  background: #eef4fb;
  color: #2e5f93;
}

.shift-state-approved {
  background: #e8f6ef;
  color: #13724f;
}

.shift-state-denied {
  background: #fbecee;
  color: #9f3b4d;
}

.shift-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.schedule-mini-link {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.schedule-empty {
  min-height: 1.9rem;
  border: 1px dashed #d7d7cf;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #97978d;
  font-size: 0.68rem;
  background: var(--paper-soft);
}

.schedule-empty-minimal {
  min-height: 100%;
  border: 0;
  background: transparent;
}

.mobile-schedule {
  display: none;
  gap: 0.65rem;
}

.mobile-agenda-priority {
  display: grid;
  gap: 0.5rem;
}

.mobile-priority-card {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid #a9d4c6;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: #eef8f4;
}

.mobile-priority-card small {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 700;
}

.mobile-priority-card strong {
  font-size: 1rem;
}

.mobile-priority-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.mobile-priority-open {
  border-color: #bdd6e8;
  border-left-color: #2f6d94;
  background: #f0f6fa;
}

.mobile-priority-open small {
  color: #235f82;
}

.mobile-empty-day {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.mobile-empty-day > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  list-style: none;
}

.mobile-empty-day > summary::-webkit-details-marker {
  display: none;
}

.mobile-empty-day > summary span {
  color: var(--muted);
  font-size: 0.76rem;
}

.mobile-empty-day > summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 800;
}

.mobile-empty-day[open] > summary::after {
  content: "−";
}

.mobile-empty-day[open] > .mobile-day-card {
  margin: 0 0.5rem 0.5rem;
}

.mobile-day-card {
  padding: 0.7rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.mobile-day-header {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.mobile-day-header span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
}

.mobile-day-stats {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.mobile-day-stats span {
  margin: 0;
  padding: 0.16rem 0.3rem;
  border-radius: 999px;
  background: #f1f1ec;
  color: #626259;
  font-size: 0.68rem;
  font-weight: 700;
}

.mobile-lane + .mobile-lane {
  margin-top: 0.6rem;
}

.mobile-lane h3 {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-shift-stack,
.mobile-roster {
  display: grid;
  gap: 0.45rem;
}

.mobile-roster-row {
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbf8;
}

.mobile-roster-head,
.mobile-shift-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.mobile-shift-count {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.compact-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.shift-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0.8rem;
}

.shift-modal-shell[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shift-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 21, 0.22);
  backdrop-filter: blur(1px);
}

.shift-modal-backdrop a {
  display: block;
  width: 100%;
  height: 100%;
}

.shift-modal {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 1.6rem);
  overflow: auto;
  padding: 0.7rem;
}

.shift-modal-header,
.shift-modal-footer,
.shift-assign-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.shift-modal-header h2 {
  margin: 0;
  font-size: 1rem;
}

.shift-modal-body {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.shift-modal-summary,
.shift-modal-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem;
  background: #fbfbf8;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #ecece5;
}

.detail-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-row:first-child {
  padding-top: 0;
}

.detail-row span {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.66rem;
}

.detail-row strong {
  text-align: right;
  font-size: 0.84rem;
}

.detail-row-notes {
  align-items: flex-start;
}

.shift-modal-section h3 {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
}

.shift-edit-disclosure > summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.shift-edit-disclosure[open] > summary {
  margin-bottom: 0.65rem;
}

.modal-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.modal-metric {
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.modal-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-metric strong {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.84rem;
}

.modal-note {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.shift-modal-actions {
  display: grid;
  gap: 0.5rem;
}

.claim-status-card {
  display: grid;
  gap: 0.3rem;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf8;
}

.claim-status-card strong {
  font-size: 0.82rem;
}

.claim-status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.claim-status-card-pending {
  background: #f8fbff;
  border-color: #d6e4f4;
}

.claim-status-card-approved {
  background: #f3fbf7;
  border-color: #d4eadf;
}

.claim-status-card-denied {
  background: #fff7f8;
  border-color: #f0d7dc;
}

.shift-modal-footer {
  margin-top: 0.55rem;
  justify-content: flex-end;
}

.shift-create-modal {
  width: min(480px, 100%);
}

.shift-create-modal .shift-form {
  display: block;
}

.shift-form-group {
  min-width: 0;
  margin: 0 0 0.85rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.shift-form-group legend {
  padding: 0 0.25rem;
  font-weight: 700;
}

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

.shift-form-grid > div {
  min-width: 0;
}

.shift-form-grid > div:has(#id_employee),
.shift-form-grid > div:has(#id_open_for_claim) {
  grid-column: 1 / -1;
}

.shift-form p.shift-capacity-preview {
  display: block;
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
}

.shift-form .shift-form-field input[type="checkbox"] {
  width: auto;
}

.shift-publish-hint {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.shift-form .helptext {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.shift-create-modal .shift-form textarea {
  min-height: 4.5rem;
}

.shift-create-modal .shift-form > .primary-button {
  position: sticky;
  bottom: 0;
  width: 100%;
}

.shift-form p {
  margin-bottom: 0.55rem;
}

.shift-form label {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.shift-form input,
.shift-form select,
.shift-form textarea {
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
}

.shift-form textarea {
  min-height: 5rem;
}

.request-layout,
.request-queue-grid,
.request-self-grid {
  display: grid;
  gap: 0.7rem;
}

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

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

.queue-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.queue-stat {
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfbf8;
}

.queue-stat span {
  display: inline;
  color: var(--muted);
  font-size: 0.68rem;
}

.queue-stat strong {
  display: inline;
  margin-left: 0.2rem;
  font-size: 0.76rem;
}

.queue-list li {
  display: grid;
  gap: 0.28rem;
}

.request-layout .list > li {
  padding: 0.65rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.request-layout .list > li:last-child {
  border-bottom: 0;
}

.request-layout .list > li.quiet-empty {
  padding: 0.4rem 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.queue-list .row-actions {
  justify-content: flex-start;
  gap: 0.35rem;
}

.queue-decision {
  min-height: 2.25rem;
  padding-inline: 0.7rem;
  font-weight: 700;
}

.queue-decision.danger {
  border-color: var(--danger);
}

.request-kicker {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.message-shell {
  display: grid;
  gap: 0.75rem;
  width: min(800px, 100%);
  margin: 0 auto;
}

.message-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.2rem 0;
}

.message-page-header h1 {
  margin: 0;
  font-size: 1.2rem;
}

.conversation-list,
.message-thread {
  display: grid;
  gap: 0.45rem;
}

.conversation-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.8rem;
  color: var(--muted);
}

.conversation-card {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.conversation-card:hover {
  border-color: #aebdc4;
  transform: translateY(-1px);
}

.conversation-card.has-unread {
  border-color: #b8d6ff;
  background: #f7fbff;
}

.conversation-avatar {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border-radius: 50%;
  background: #e8eeee;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 750;
}

.conversation-card.has-unread .conversation-avatar {
  background: #dcecff;
  color: #1f62b5;
}

.conversation-card-content {
  min-width: 0;
}

.conversation-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.conversation-card-signals {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.conversation-card p,
.thread-message p,
.empty-state p {
  margin: 0;
}

.conversation-card p {
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-card small {
  display: block;
  margin-top: 0.15rem;
  color: #78858d;
  font-size: 0.68rem;
}

.announcement-badge {
  padding: 0.14rem 0.35rem;
  border-radius: 999px;
  background: var(--open);
  color: var(--success);
  font-size: 0.64rem;
  font-weight: 700;
}

.message-form-panel {
  width: min(620px, 100%);
}

.conversation-form #id_participants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.conversation-form #id_participants label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.conversation-form #id_participants input {
  width: auto;
}

.message-thread-shell {
  min-height: calc(100vh - 150px);
}

.load-earlier-messages {
  justify-self: center;
  margin: 0.3rem 0;
}

.message-thread {
  align-content: end;
  min-height: 280px;
  max-height: min(62vh, 640px);
  overflow-y: auto;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafa 0%, var(--paper) 100%);
  scroll-behavior: smooth;
}

.thread-message {
  width: min(82%, 560px);
  padding: 0.6rem 0.7rem;
  border: 1px solid #e2e8ea;
  border-radius: 12px 12px 12px 4px;
  background: var(--paper);
  box-shadow: 0 1px 1px rgba(19, 33, 42, 0.03);
}

.thread-message.is-mine {
  justify-self: end;
  border-color: #cae3da;
  border-radius: 12px 12px 4px 12px;
  background: #edf7f3;
}

.thread-message header {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.2rem;
}

.thread-message header strong,
.thread-message header small {
  font-size: 0.68rem;
}

.thread-message p {
  font-size: 0.82rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-live-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.25rem;
  color: var(--success);
  font-size: 0.68rem;
  font-weight: 650;
}

.message-live-status::before {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.message-live-status.has-error {
  color: var(--danger);
}

.message-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "message emojis"
    "message send";
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem;
}

.message-reply-form p {
  grid-area: message;
  margin: 0;
}

.message-reply-form .emoji-picker {
  grid-area: emojis;
}

.message-reply-form .primary-button {
  grid-area: send;
  justify-self: end;
  min-width: 7rem;
}

.message-reply-form label {
  display: none;
}

.message-reply-form textarea {
  min-height: 3.2rem;
  resize: vertical;
}

.employee-home-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.2rem 0 0.7rem;
}

.employee-home-header h1,
.employee-home-header p,
.employee-home-main h2,
.employee-home-side h2 {
  margin: 0;
}

.employee-home-header > div > p:last-child {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.employee-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 0.65rem;
  align-items: start;
}

.employee-home-side {
  display: grid;
  gap: 0.65rem;
}

.count-pill {
  display: inline-flex;
  width: max-content;
  min-width: 1.45rem;
  min-height: 1.45rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 750;
}

.opportunity-list,
.home-compact-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.opportunity-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--shift-color, var(--accent));
  border-radius: 8px;
  background: var(--open);
}

.opportunity-copy {
  display: grid;
  gap: 0.08rem;
}

.opportunity-copy strong {
  font-size: 0.86rem;
}

.opportunity-copy span {
  font-size: 0.78rem;
}

.opportunity-copy small {
  color: var(--success);
  font-weight: 700;
}

.home-compact-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.48rem 0;
  border-top: 1px solid var(--line);
}

.home-compact-list li:first-child {
  border-top: 0;
}

.home-compact-list li.empty-state {
  color: var(--muted);
  font-size: 0.875rem;
}

.home-compact-list li.empty-state a {
  color: var(--accent-dark);
}

.home-compact-list li div {
  display: grid;
  gap: 0.06rem;
}

.home-compact-list strong,
.home-compact-list span {
  font-size: 0.74rem;
}

.request-status {
  display: inline-flex;
  width: fit-content;
  padding: 0.16rem 0.34rem;
  border-radius: 999px;
  background: #e8edf0;
  color: #43535c;
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.request-status-approved {
  background: #d9efe4;
  color: #126040;
}

.request-status-pending {
  background: #fff0d3;
  color: #805918;
}

.request-status-denied {
  background: #f6dfdf;
  color: #8d2828;
}

.request-full-notice {
  display: block;
  margin-top: 0.2rem;
  color: var(--danger);
  font-weight: 700;
}

.notification-test-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.settings-existing {
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.settings-existing h2,
.settings-existing h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.settings-existing-list {
  gap: 0;
}

.settings-existing-list > li {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.settings-existing-list > li:last-child {
  border-bottom: 0;
}

.settings-summary-list > li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.settings-summary-list > li span {
  color: var(--muted);
  text-align: right;
}

.settings-help {
  margin-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.settings-help summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.75rem;
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 700;
}

.settings-help summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.25rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.settings-help[open] summary::after {
  transform: rotate(225deg);
}

.settings-help p {
  margin: 0 0 0.7rem;
}

.settings-help .ghost-button {
  display: inline-flex;
  margin-bottom: 0.7rem;
}

.notification-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.notification-choice input {
  width: auto;
  margin-top: 0.2rem;
}

.notification-choice span,
.notification-choice small {
  display: block;
}

.status-shift-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.status-shift-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.7rem !important;
  border: 1px solid var(--line) !important;
  border-left-width: 4px !important;
  border-radius: 8px;
}

.status-shift-withdraw {
  flex-wrap: wrap;
}

.status-shift-card .withdraw-action {
  width: 100%;
  justify-content: flex-end;
}

.withdraw-action .ghost-button {
  min-height: 2.75rem;
}

.status-shift-card > div,
.status-shift-main {
  display: grid;
  gap: 0.08rem;
}

.status-shift-main {
  flex: 1;
  min-width: 0;
  border-radius: 4px;
}

.status-shift-main small {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.swap-steps {
  display: grid;
  gap: 0.35rem;
  padding-left: 1.5rem;
  margin: 0.8rem 0;
}

.catalog-row-actions .mini-link,
.catalog-row-actions .compact-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.catalog-maintenance .settings-summary-list > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
}

.catalog-maintenance .settings-summary-list > li span {
  text-align: left;
  justify-self: start;
}

.catalog-maintenance button[type="submit"],
.maintenance-panel .primary-button,
.maintenance-panel .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.account-grid .stack-form + h2 {
  margin-top: 1.5rem;
}

.status-shift-approved {
  border-left-color: var(--success) !important;
  background: #eef8f2;
}

.status-shift-pending {
  border-left-color: #c38724 !important;
  background: #fff8e9;
}

.status-shift-denied {
  border-left-color: var(--danger) !important;
  background: #fcf0f0;
}

.compact-empty {
  display: grid;
  justify-items: start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  text-align: left;
}

.approval-pending-card {
  text-align: center;
}

.approval-mark {
  display: inline-flex;
  width: 2.4rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  background: var(--open);
  color: var(--success);
  font-size: 1.2rem;
  font-weight: 800;
}

.pending-registration-panel {
  margin-bottom: 0.55rem;
  border-color: #d6b46f;
  background: #fffaf0;
}

.incoming-swap-panel {
  border-color: #7fb7aa;
  background: #f2faf7;
}

.emoji-picker {
  display: flex;
  gap: 0.22rem;
  flex-wrap: wrap;
  margin: -0.25rem 0 0.55rem;
}

.emoji-picker button {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-soft);
  cursor: pointer;
  font-size: 1rem;
}

.emoji-picker button:hover {
  border-color: var(--accent);
  background: var(--open);
}

@media (max-width: 960px) {
  .two-column,
  .three-column,
  .guide-platform-grid,
  .guide-support-grid,
  .guide-notification-card,
  .request-queue-grid,
  .request-self-grid,
  .schedule-filter-grid,
  .modal-metric-grid {
    grid-template-columns: 1fr;
  }

  .employee-home-grid {
    grid-template-columns: 1fr;
  }

  .desktop-schedule {
    display: none;
  }

  .mobile-schedule {
    display: grid;
  }

  .toolbar,
  .schedule-command-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    align-items: flex-start;
  }

  .nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.4rem;
  }

  .toolbar-actions,
  .topbar-actions,
  .schedule-stats {
    flex-wrap: wrap;
  }

  .schedule-stats {
    flex-wrap: wrap;
  }

  .calendar-nav,
  .shift-modal-header,
  .shift-modal-footer,
  .shift-assign-form,
  .compact-list li,
  .detail-row {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-nav-copy,
  .detail-row strong {
    text-align: left;
  }

  .calendar-nav-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .queue-stat-grid {
    grid-template-columns: 1fr;
  }

  .guide-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .calendar-nav-actions > .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .calendar-nav-actions > .schedule-publish-form {
    grid-column: 1 / -1;
  }
  .queue-list .row-actions .queue-decision,
  .queue-list .row-actions .mini-link,
  .team-actions button,
  .mobile-day-card .ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.55rem 0.7rem;
  }

  .shell {
    padding: 0.55rem 0.55rem 1rem;
  }

  .topbar,
  .nav,
  .panel,
  .auth-card {
    border-radius: 10px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding: 0.55rem 0.6rem;
  }

  .employee-home-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .opportunity-card form,
  .opportunity-card .primary-button {
    width: 100%;
  }

  .brand {
    font-size: 0.96rem;
  }

  .tagline {
    display: none;
  }

  .topbar-actions {
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .user-chip {
    display: none;
  }

  .language-form {
    flex: 0 0 auto;
  }

  .topbar-logout .compact-button {
    padding: 0.3rem 0.42rem;
  }

  .team-header,
  .section-heading,
  .access-code-row {
    align-items: stretch;
    flex-direction: column;
  }

  .employee-home-grid .section-heading {
    flex-direction: row;
    align-items: center;
  }

  .team-header form,
  .team-header .primary-button {
    width: 100%;
  }

  .access-code-result {
    grid-template-columns: 1fr;
  }

  .access-code-result code {
    grid-row: auto;
    text-align: center;
  }

  .team-table thead {
    display: none;
  }

  .team-table,
  .team-table tbody,
  .team-table tr,
  .team-table td {
    display: block;
    width: 100%;
  }

  .team-table tr {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
  }

  .team-table td {
    padding: 0.12rem 0;
    border: 0;
  }

  .team-actions {
    justify-content: flex-start;
    margin-top: 0.35rem;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.2rem;
    padding: 0.25rem 0.3rem;
    max-width: 100%;
    overflow: visible;
  }

  .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 2.75rem;
  }

  .nav-more-summary {
    width: 100%;
  }

  .nav-link,
  .ghost-button,
  .primary-button {
    padding: 0.32rem 0.48rem;
  }

  .guide-intro h1 {
    font-size: 1.12rem;
  }

  .guide-card,
  .guide-notification-card {
    padding: 0.7rem;
  }

  .guide-basics div {
    grid-template-columns: 1fr;
    gap: 0.12rem;
  }

  .guide-actions .primary-button {
    width: 100%;
  }

  .message-page-header {
    align-items: flex-start;
  }

  .conversation-form #id_participants,
  .message-reply-form {
    grid-template-columns: 1fr;
  }

  .message-reply-form {
    grid-template-areas:
      "message"
      "emojis"
      "send";
  }

  .thread-message {
    width: 92%;
  }

  .message-thread {
    max-height: 56vh;
    min-height: 240px;
    padding: 0.65rem;
  }

  .message-reply-form .primary-button {
    justify-self: end;
  }

  .schedule-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding: 0.2rem 0.36rem;
  }

  .schedule-stat span {
    overflow-wrap: anywhere;
  }

  .schedule-command-bar {
    overflow: hidden;
  }

  .schedule-template-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .calendar-nav-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    width: 100%;
  }

  .schedule-view-toggle {
    justify-self: start;
  }

  .calendar-step-label {
    display: none;
  }

  .calendar-step {
    min-width: 2.2rem;
  }

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

  .schedule-filter-disclosure {
    margin-top: 0.45rem;
  }

  .schedule-filter-disclosure > summary {
    display: inline-flex;
    width: fit-content;
    padding: 0.28rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
  }

  .schedule-filter-disclosure > summary::-webkit-details-marker {
    display: none;
  }

  .schedule-filter-disclosure:not([open]) > .schedule-filter-grid {
    display: none;
  }

  .schedule-filter-disclosure > summary::after {
    content: "+";
    margin-left: 0.35rem;
  }

  .schedule-filter-disclosure[open] > summary::after {
    content: "−";
  }

  .schedule-check {
    grid-column: 1 / -1;
  }

  .schedule-filter-grid > .ghost-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .shift-create-modal .shift-form {
    display: block;
  }

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

  .mobile-day-card {
    padding: 0.65rem;
    border-radius: 10px;
  }

  .mobile-day-header .ghost-button {
    width: auto;
  }

  .mobile-shift-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .employee-avatar {
    width: 1.35rem;
    height: 1.35rem;
  }

  .page-tabs {
    flex-wrap: nowrap;
  }

  .month-weekdays span {
    padding: 0.35rem 0.1rem;
    font-size: 0.58rem;
  }

  .month-day {
    min-height: 70px;
    padding: 0.28rem;
  }

  .month-day-header {
    min-height: 1.35rem;
  }

  .month-day-number {
    width: 100%;
    justify-content: center;
  }

  .month-day-name {
    display: none;
  }

  .month-day-number strong {
    font-size: 0.76rem;
  }

  .month-add-shift,
  .month-shift-list {
    display: none;
  }

  .month-day-summary {
    display: flex;
    justify-content: center;
    gap: 0.18rem;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.15;
  }

  .month-day-summary span {
    min-width: 1rem;
    padding: 0.08rem 0.18rem;
    border-radius: 999px;
    background: var(--paper-soft);
    text-align: center;
  }

  .month-day-summary .is-open {
    color: var(--success);
    background: var(--open);
  }
}
html[data-native-platform] body {
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}

html[data-native-platform] .nav {
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
}


/* Colleagues and applications share the same read-only team disclosure. */
.shift-team-card { flex-wrap: wrap; }
.shift-team { width: 100%; min-width: 0; margin-top: 0.55rem; }
.shift-team summary { cursor: pointer; font-weight: 700; overflow-wrap: anywhere; }
.shift-team summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.shift-team summary .muted { font-weight: 400; }
.shift-team .shift-team-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; padding-top: 0.65rem; }
.shift-team h3 { font-size: 0.9rem; margin: 0 0 0.35rem; }
.shift-team-people { list-style: none; margin: 0; padding: 0; }
.shift-team .shift-team-people li { display: block; padding: 0.15rem 0; border: 0; overflow-wrap: anywhere; }
.shift-team p { margin: 0.45rem 0 0; font-size: 0.85rem; }
@media (max-width: 640px) { .shift-team .shift-team-columns { grid-template-columns: minmax(0, 1fr); } }


.workload-help { font-size: 0.82rem; line-height: 1.5; }

/* A daily roster replaces the empty person-by-person grid by default. */
.assigned-people-list { margin: 0; padding: 0 0 0 0.8rem; list-style: "– "; }
.assigned-people-list li { padding: 0.15rem 0; }
.assigned-people-list .assigned-people-empty { list-style: none; }
.assigned-people-list a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.4rem; min-height: 1.8rem; padding: 0.2rem 0; color: var(--ink); text-decoration: none; font-size: 0.82rem; overflow-wrap: anywhere; }
.assigned-people-list a:hover { text-decoration: underline; }
.assigned-people-list time { white-space: nowrap; font-size: 0.76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.assigned-people-list .assignment-draft { color: var(--muted); }
.schedule-person-details { border-top: 1px solid var(--line); }
.schedule-person-details > summary { padding: 0.7rem; cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.desktop-schedule[data-period="day"] .schedule-grid { min-width: 0; }

/* One comparable season total per candidate. */
.shift-modal.shift-modal-comparison { width: min(840px, 100%); }
.claim-group { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); min-width: 0; }
.claim-group-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.7rem; }
.claim-group-heading h4 { margin: 0; font-size: 1rem; }
.claim-group-heading p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.85rem; }
.applicant-comparison { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.83rem; }
.applicant-comparison th, .applicant-comparison td { padding: 0.7rem 0.5rem; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.applicant-comparison thead th { background: var(--surface-subtle); color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.applicant-comparison thead th:first-child { width: 42%; }
.applicant-comparison thead th:last-child { width: 28%; }
.applicant-comparison .comparison-number { text-align: center; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.comparison-person .request-full-notice { display: block; margin-top: 0.4rem; font-weight: 400; }
.comparison-actions .inline-form { display: inline-block; margin: 0 0.3rem 0.3rem 0; }
.comparison-actions button { width: auto; }
.comparison-help summary { cursor: pointer; }
.comparison-help { margin: 0.7rem 0; color: var(--muted); font-size: 0.8rem; }
@media (max-width: 760px) {
  .claim-group-heading { flex-direction: column; }
  .applicant-comparison, .applicant-comparison tbody { display: block; }
  .applicant-comparison thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  .applicant-comparison tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.8rem; padding: 0.7rem; border: 1px solid var(--line); border-radius: var(--radius-control); }
  .applicant-comparison th, .applicant-comparison td { min-width: 0; border: 0; padding: 0; }
  .applicant-comparison .comparison-person, .applicant-comparison .comparison-number, .comparison-actions { grid-column: 1 / -1; }
  .applicant-comparison .comparison-number { padding: 0.5rem; text-align: left; background: var(--surface-subtle); border-radius: var(--radius-control); }
  .comparison-number::before { content: attr(data-label); display: block; margin-bottom: 0.25rem; color: var(--muted); font-size: 0.75rem; }
  .comparison-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
  .comparison-actions .inline-form { margin: 0; }
  .assigned-people-list a { min-height: 2.75rem; align-content: center; }
}
