:root {
  --bg: #ecf3f9;
  --bg-deep: #d4d4d4;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --line: rgba(37, 54, 74, 0.12);
  --line-strong: rgba(37, 54, 74, 0.22);
  --text: #102236;
  --muted: #4a5e70;
  --accent: #2596be;
  --accent-strong: #1d7aa0;
  --accent-soft: rgba(37, 150, 190, 0.1);
  --warm: #c78c00;
  --danger: #af3535;
  --danger-soft: rgba(175, 53, 53, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 16px 40px rgba(37, 150, 190, 0.14);
  --bottom-bar-h: 66px;
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  width: 100%;
  overflow-x: clip;
  background:
    radial-gradient(circle at top left, rgba(37, 150, 190, 0.08), transparent 34%),
    linear-gradient(180deg, #f3f8ff 0%, var(--bg) 48%, var(--bg-deep) 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: clip;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

[hidden] {
  display: none !important;
}

.shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.shell-standalone {
  display: block;
}

.sidebar {
  display: none;
}

.main {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px calc(var(--bottom-bar-h) + env(safe-area-inset-bottom, 0px));
}

.main-standalone {
  max-width: 520px;
  padding-bottom: 32px;
}

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(25, 32, 42, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.tab {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border-radius: 999px;
  color: rgba(242, 248, 252, 0.62);
  background: rgba(255, 255, 255, 0.02);
}

.tab.active {
  color: #f4f9ff;
  background: rgba(255, 255, 255, 0.12);
}

.tab-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-toggle {
  display: none;
}

.page-stack,
.call-flow,
.call-wizard {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

.flash-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.flash {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.flash-success {
  border-color: rgba(37, 150, 190, 0.24);
  background: rgba(37, 150, 190, 0.08);
}

.flash-error {
  border-color: rgba(175, 53, 53, 0.22);
  background: rgba(175, 53, 53, 0.08);
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sync-form {
  margin: 4px 0 0;
}

.sync-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.sync-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sync-status-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sync-status-meta {
  margin: 0;
  font-size: 0.9rem;
}

.page-title,
.call-title,
.brand-title,
.screen-title,
.card-title,
.section-title {
  font-family: 'Newsreader', serif;
}

.page-title,
.call-title {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.page-subtitle,
.call-subtitle,
.screen-copy,
.brand-copy,
.muted-text,
.rec-reason,
.rec-context {
  color: var(--muted);
}

.page-subtitle,
.call-subtitle,
.screen-copy,
.brand-copy {
  margin: 0;
  font-size: 0.92rem;
}

.card,
.rec-card,
.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}

.card {
  padding: 16px;
}

.call-command-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(37, 150, 190, 0.14), transparent 28%),
    linear-gradient(145deg, rgba(242, 248, 252, 0.95), rgba(240, 232, 221, 0.94));
}

.call-command-copy,
.call-command-text,
.call-wizard-body,
.call-stage-stack,
.call-stage-column {
  display: flex;
  flex-direction: column;
}

.call-command-copy,
.call-command-text,
.call-stage-column {
  gap: 10px;
}

.call-command-text {
  max-width: 42rem;
}

.call-title-compact {
  font-size: 1.45rem;
}

.call-wizard-body {
  gap: 16px;
}

.call-stage-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 16px;
  scroll-behavior: smooth;
}

.call-stage-stack::-webkit-scrollbar {
  width: 10px;
}

.call-stage-stack::-webkit-scrollbar-thumb {
  background: rgba(25, 32, 42, 0.16);
  border-radius: 999px;
}

.call-stage {
  flex: 0 0 auto;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.call-stage-grid {
  display: grid;
  gap: 16px;
}

.card-title,
.section-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.1;
}

.call-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px 18px;
  background:
    radial-gradient(circle at top right, rgba(37, 150, 190, 0.22), transparent 28%),
    radial-gradient(circle at bottom left, rgba(37, 150, 190, 0.12), transparent 32%),
    linear-gradient(155deg, #eaf6fc 0%, #f3f8ff 100%);
  border: 1px solid rgba(37, 150, 190, 0.14);
  box-shadow: var(--shadow);
}

.call-kicker,
.screen-step,
.brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(25, 32, 42, 0.08);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.call-hero .call-subtitle {
  margin-top: 10px;
  max-width: 34rem;
}

.progress-card {
  padding: 14px;
}

.progress-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(25, 32, 42, 0.04);
  color: var(--muted);
}

.progress-step.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.progress-step.complete {
  background: rgba(37, 150, 190, 0.08);
  color: var(--accent-strong);
}

.progress-index {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(25, 32, 42, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
}

.progress-step.active .progress-index,
.progress-step.complete .progress-index {
  background: rgba(37, 150, 190, 0.16);
}

.progress-label {
  font-size: 0.78rem;
  font-weight: 700;
}

.call-summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.summary-reset-button {
  min-height: 38px;
  padding: 0 14px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.summary-grid > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.summary-grid > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.summary-wide {
  grid-column: 1 / -1;
}

.summary-label {
  display: block;
  margin-bottom: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.screen-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.call-stage > .screen-actions:last-child,
.call-stage > #call-form-shell > .screen-actions:last-child {
  margin-top: auto;
}

.screen-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.screen-title {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.1;
}

.screen-fields,
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.field,
.row-main,
.preview-item,
.slot-button,
.selected-slot-card {
  display: flex;
  flex-direction: column;
}

.field {
  gap: 6px;
}

.field label {
  font-size: 0.82rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(74, 57, 39, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.86);
  padding: 12px 13px;
  color: var(--text);
  font-size: 16px;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(37, 150, 190, 0.24);
  border-color: var(--accent);
}

.field-full,
.field.full {
  grid-column: 1 / -1;
}

.error-text {
  margin: 0;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
}

.screen-actions,
.button-row,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-actions-spread {
  justify-content: space-between;
  align-items: center;
}

.screen-actions > *,
.button-row > *,
.quick-actions > *,
.page-header > * {
  min-width: 0;
  max-width: 100%;
}

.button-row-spaced {
  margin-top: 12px;
}

.status-copy {
  margin-top: 8px;
}

.button,
.button-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  max-width: 100%;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: normal;
  text-align: center;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

.button:hover,
.button-secondary:hover {
  transform: translateY(-1px);
}

.calendar-view-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-secondary.is-active {
  background: var(--accent);
  color: #fff;
}

.button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

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

.button-large {
  flex: 1 1 220px;
}

.button-secondary {
  color: var(--text);
  background: rgba(25, 32, 42, 0.07);
}

.preview-stack,
.match-stack,
.address-stack,
.preview-list,
.match-list,
.slot-list,
.recommendation-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.preview-item,
.slot-button,
.selected-slot-card {
  gap: 3px;
  padding: 14px;
  border: 1px solid rgba(37, 150, 190, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(37, 150, 190, 0.06);
}

.preview-item {
  border: 2px solid rgba(37, 150, 190, 0.4);
  background: rgba(255, 251, 246, 0.98);
  box-shadow: 0 1px 0 rgba(37, 150, 190, 0.08);
}

.preview-item-header,
.slot-header,
.slot-heading,
.preview-item-time,
.opening-team-badge {
  display: flex;
}

.preview-item-header,
.slot-header {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.preview-item-time,
.slot-heading,
.opening-team-badge {
  flex-direction: column;
}

.preview-item-time,
.slot-heading {
  width: 100%;
  align-items: flex-start;
  gap: 4px;
}

.preview-item-time,
.slot-heading {
  gap: 2px;
}

.preview-item-time strong,
.slot-heading .slot-title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  line-height: 1.05;
}

.preview-item-time span,
.slot-heading .slot-time {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(25, 32, 42, 0.9);
}

.preview-item-travel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(37, 150, 190, 0.12);
}

.preview-item-travel-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.travel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: rgba(37, 150, 190, 0.12);
}

.slot-warning-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(175, 53, 53, 0.28);
  background: rgba(175, 53, 53, 0.14);
  color: var(--danger);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.preview-item-travel-row span:last-child {
  color: rgba(25, 32, 42, 0.85);
  text-align: right;
  font-weight: 600;
}

.opening-team-badge {
  gap: 1px;
  min-width: 120px;
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(29, 122, 165, 0.18);
}

.opening-team-badge.has-meta {
  min-width: 144px;
}

.opening-team-kicker {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 248, 252, 0.74);
}

.opening-team-name {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.15;
}

.opening-team-meta {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(242, 248, 252, 0.82);
}

.stack-header,
.rec-header,
.truck-header,
.row-item,
.rec-window,
.match-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.call-wizard-body > *,
.call-stage-grid > *,
.call-stage-column > *,
.stack-header > *,
.rec-header > *,
.truck-header > *,
.row-item > *,
.rec-window > *,
.match-title-row > *,
.summary-header > *,
.calendar-day-header > *,
.calendar-event-header > * {
  min-width: 0;
}

.stack-header,
.truck-header,
.rec-header {
  align-items: center;
}

.match-button {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
  cursor: pointer;
}

.match-button.active {
  border-color: rgba(37, 150, 190, 0.35);
  background: rgba(37, 150, 190, 0.08);
}

.match-score {
  font-weight: 800;
  color: var(--accent-strong);
}

.slot-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.slot-button {
  align-items: stretch;
  width: 100%;
  appearance: none;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.slot-button:hover {
  transform: translateY(-1px);
}

.slot-row.selected .slot-button {
  border-color: rgba(37, 150, 190, 0.32);
  background: rgba(37, 150, 190, 0.1);
  box-shadow: 0 0 0 2px rgba(37, 150, 190, 0.08);
}

.slot-button:focus-visible,
.slot-dismiss:focus-visible {
  outline: 2px solid rgba(37, 150, 190, 0.28);
  outline-offset: 2px;
}

.slot-dismiss {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 800;
  cursor: pointer;
  align-self: flex-start;
}

.success-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(37, 150, 190, 0.08);
}

.empty-state {
  padding: 22px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-align: center;
}

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

.metric-card {
  padding: 12px;
  text-align: center;
}

.metric-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-strong);
}

.metric-label {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.two-col,
.truck-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.row-item {
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.row-main {
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.row-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.row-main strong,
.row-main span,
.row-end span,
.truck-header strong,
.truck-header .muted-text,
.calendar-event-title,
.calendar-event-location,
.page-subtitle,
.screen-copy,
.muted-text {
  overflow-wrap: anywhere;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-filter-row {
  display: flex;
  padding: 12px 0 4px;
}

.team-filter-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(37, 150, 190, 0.1);
  background: linear-gradient(145deg, rgba(255, 251, 246, 0.92), rgba(235, 241, 237, 0.92));
  box-shadow: var(--shadow);
}

.team-filter-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-filter-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calendar-toolbar-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-view-switch-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-view-switch-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar-view-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border-radius: 999px;
  background: rgba(25, 32, 42, 0.08);
  isolation: isolate;
}

.calendar-view-switch::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 8px 20px rgba(37, 150, 190, 0.2);
  transition: transform 160ms ease;
  z-index: 0;
}

.calendar-view-switch--openings::before {
  transform: translateX(100%);
}

.calendar-view-switch-option {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  transition: color 160ms ease;
}

.calendar-view-switch-option.is-active {
  color: #fff;
}

.calendar-view-switch-option:focus-visible {
  outline: 2px solid rgba(37, 150, 190, 0.36);
  outline-offset: 2px;
}

.calendar-range-form,
.calendar-range-fields {
  display: flex;
  gap: 8px;
}

.calendar-range-form {
  flex-direction: column;
}

.calendar-range-fields {
  flex-wrap: wrap;
}

.calendar-range-field {
  display: flex;
  flex: 1 1 130px;
  flex-direction: column;
  gap: 6px;
}

.calendar-range-input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(25, 32, 42, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
}

.calendar-range-submit {
  align-self: flex-start;
  min-height: 40px;
  padding: 0 16px;
}

.team-filter-kicker,
.team-filter-hint,
.team-filter-summary {
  margin: 0;
}

.team-filter-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-filter-title {
  margin: 2px 0 0;
  font-family: 'Newsreader', serif;
  font-size: 1.02rem;
  line-height: 1.1;
}

.team-filter-summary {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(37, 150, 190, 0.08);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
}

.team-filter-hint {
  color: var(--muted);
  font-size: 0.84rem;
}

@media (min-width: 640px) {
  .team-filter-toolbar {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
  }

  .calendar-toolbar-actions {
    flex-direction: row;
    align-items: end;
  }

  .calendar-view-switch-shell {
    min-width: 280px;
  }

  .calendar-range-form {
    flex-direction: row;
    align-items: end;
  }
}

.team-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-filter-pill {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 8px 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(25, 32, 42, 0.12);
  background: rgba(25, 32, 42, 0.06);
  color: rgba(25, 32, 42, 0.85);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.team-filter-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 150, 190, 0.26);
}

.team-filter-pill:focus-visible {
  outline: 2px solid rgba(37, 150, 190, 0.36);
  outline-offset: 2px;
}

.team-filter-pill-label {
  line-height: 1.1;
}

.team-filter-pill-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(25, 32, 42, 0.08);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.team-filter-pill.is-active {
  border-color: transparent;
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 150, 190, 0.18);
}

.team-filter-pill.is-active .team-filter-pill-state {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.team-filter-pill:not(.is-active) {
  background: rgba(255, 255, 255, 0.64);
  color: rgba(25, 32, 42, 0.72);
  box-shadow: inset 0 0 0 1px rgba(25, 32, 42, 0.04);
}

.team-filter-pill:not(.is-active) .team-filter-pill-state {
  background: rgba(25, 32, 42, 0.06);
  color: rgba(25, 32, 42, 0.58);
}

.chip,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.chip {
  background: rgba(25, 32, 42, 0.06);
}

.pill.synced {
  background: rgba(37, 150, 190, 0.12);
  color: var(--accent-strong);
}

.pill.pending,
.pill.processing {
  background: rgba(37, 150, 190, 0.14);
  color: var(--warm);
}

.pill.failed,
.pill.needs_review {
  background: rgba(175, 53, 53, 0.12);
  color: var(--danger);
}

.rec-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 10px;
}

.rec-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-strong);
}

.rec-context {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.calendar-summary,
.calendar-days {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.calendar-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px 18px;
  background:
    radial-gradient(circle at top right, rgba(37, 150, 190, 0.18), transparent 34%),
    radial-gradient(circle at bottom left, rgba(37, 150, 190, 0.1), transparent 30%),
    linear-gradient(145deg, #f6fbff 0%, #e7f1f9 100%);
  border: 1px solid rgba(37, 150, 190, 0.14);
  box-shadow: var(--shadow);
}

.calendar-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 38rem;
}

.calendar-day-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.calendar-day-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 96px;
  padding: 12px 10px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(37, 150, 190, 0.12), rgba(37, 150, 190, 0.04));
  color: var(--accent-strong);
}

.calendar-month {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar-day-number {
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
}

.calendar-weekday {
  font-size: 0.82rem;
  color: var(--muted);
}

.calendar-day-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.calendar-day-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.calendar-date-label {
  margin: 0;
  font-size: 1.08rem;
}

.calendar-event-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calendar-event {
  display: grid;
  grid-template-columns: minmax(88px, 108px) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.calendar-event-time {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  font-weight: 800;
}

.calendar-event-window {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.calendar-event-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.calendar-event-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.calendar-event-title {
  margin: 0;
  font-size: 1rem;
}

.calendar-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-event-location {
  color: var(--muted);
}

.calendar-opening-context {
  display: grid;
  gap: 10px;
}

.calendar-opening-leg {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(37, 150, 190, 0.06);
}

.calendar-opening-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar-empty {
  padding: 28px 20px;
}

@media (max-width: 639px) {
  .call-summary {
    display: none;
  }
  .call-wizard-body {
    display: grid;
    grid-template-columns: 1fr;
  }
  .call-stage-stack {
    max-height: none;
    overflow: visible;
    scroll-snap-type: none;
    scroll-padding-top: 0;
  }
  .call-stage {
    min-height: auto;
  }
  .call-stage-grid {
    grid-template-columns: 1fr;
  }
  .summary-header,
  .stack-header,
  .rec-header,
  .truck-header,
  .row-item,
  .rec-window,
  .match-title-row,
  .calendar-day-header,
  .calendar-event-header {
    flex-wrap: wrap;
  }

  .summary-header,
  .stack-header,
  .rec-header,
  .truck-header,
  .row-item,
  .rec-window,
  .match-title-row,
  .calendar-day-header,
  .calendar-event-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .row-end,
  .preview-item-travel-row span:last-child {
    align-items: flex-start;
    text-align: left;
  }

  .slot-row {
    grid-template-columns: 1fr;
  }

  .slot-dismiss {
    justify-self: end;
  }

  .calendar-day-card,
  .calendar-event {
    grid-template-columns: 1fr;
  }

  .calendar-day-badge {
    min-height: 0;
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .calendar-day-header,
  .calendar-event-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 640px) {
  .main {
    padding-left: 22px;
    padding-right: 22px;
  }

  .screen-fields,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

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

@media (min-width: 640px) and (max-width: 959px) {
  .call-stage {
    min-height: auto;
  }

  .call-stage-stack {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
  }
}

@media (min-width: 960px) {
  .shell {
    background: transparent;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    width: 270px;
    flex-shrink: 0;
    padding: 22px 18px;
    background: rgba(25, 32, 42, 0.96);
    color: #f4f9ff;
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 6px 6px 18px;
  }

  .brand-kicker {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(242, 248, 252, 0.7);
  }

  .brand-title {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1;
  }

  .brand-copy {
    color: rgba(242, 248, 252, 0.7);
  }

  .nav-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .nav-link {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    color: rgba(242, 248, 252, 0.68);
    font-weight: 700;
  }

  .nav-link.active,
  .nav-link:hover {
    color: #f4f9ff;
    background: rgba(255, 255, 255, 0.1);
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #f4f9ff;
    font-weight: 700;
    cursor: pointer;
    font-size: 0;
    line-height: 0;
    position: relative;
  }

  .sidebar-toggle::before {
    content: "☰";
    font-size: 1.25rem;
    line-height: 1;
    color: inherit;
  }

  .sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .sidebar-toggle--outside {
    display: none;
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 60;
  }

  .sidebar-toggle--inside {
    margin-bottom: 18px;
  }

  .sidebar-prefers-collapsed .shell:not(.shell-standalone) .sidebar {
    display: none;
  }

  .sidebar-prefers-collapsed .shell:not(.shell-standalone) .sidebar-toggle--outside {
    display: inline-flex;
    border-color: rgba(255, 255, 255, 0.18);
    background: var(--warm);
    color: #fff;
  }

  .sidebar-prefers-collapsed .shell:not(.shell-standalone) .main {
    max-width: 1040px;
  }

  .shell.sidebar-collapsed .sidebar {
    display: none;
  }

  .shell.sidebar-collapsed .sidebar-toggle--outside {
    display: inline-flex;
    border-color: rgba(255, 255, 255, 0.18);
    background: var(--warm);
    color: #fff;
  }

  .shell.sidebar-collapsed .main {
    max-width: 1040px;
  }

  .bottom-bar {
    display: none;
  }

  .main {
    max-width: 1040px;
    padding: 28px 28px 32px;
  }

  .call-flow,
  .call-wizard {
    gap: 20px;
  }

  .call-wizard-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    min-height: calc(100vh - 120px);
  }

  .call-stage-stack {
    height: 100%;
    max-height: none;
    overflow-y: auto;
  }

  .call-stage {
    min-height: calc(100vh - 210px);
  }

  .call-summary {
    position: sticky;
    top: 28px;
  }

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

  .call-stage-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    align-items: start;
  }

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