:root {
  --wf-bg: #f4f6fa;
  --wf-surface: #ffffff;
  --wf-surface-alt: #f8fafc;
  --wf-ink: #0f172a;
  --wf-muted: #475569;
  --wf-subtle: #64748b;
  --wf-line: #e2e8f0;
  --wf-brand: #0f766e;
  --wf-brand-dark: #134e4a;
  --wf-blue: #2563eb;
  --wf-amber: #b45309;
  --wf-red: #be123c;
  --wf-green: #15803d;
  --wf-shadow: 0 18px 48px rgba(15, 23, 42, .16), 0 4px 10px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--wf-bg);
  color: var(--wf-ink);
}

.wf-page {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 32px;
  align-items: start;
  padding: 24px 28px 80px;
  max-width: 1380px;
  margin: 0 auto;
}

.wf-page.multi {
  grid-template-columns: 1fr minmax(340px, 430px);
}

.wf-phone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  align-items: start;
}

.wf-state {
  background: #fff;
  border: 1px solid var(--wf-line);
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
  padding: 16px 14px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wf-state h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #0f172a;
  text-align: center;
}

.wf-state p {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--wf-subtle);
  text-align: center;
  max-width: 260px;
}

.wf-state-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--wf-brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.wf-state-label.blue {
  background: #eff6ff;
  color: var(--wf-blue);
}

.wf-state-label.amber {
  background: #fff7ed;
  color: var(--wf-amber);
}

.wf-state-label.red {
  background: #fff1f2;
  color: var(--wf-red);
}

.phone {
  width: 310px;
  max-width: 100%;
  background: #0f172a;
  border-radius: 36px;
  padding: 11px;
  box-shadow: var(--wf-shadow);
}

.phone.large {
  width: 380px;
  border-radius: 42px;
  padding: 14px;
}

.phone-screen {
  position: relative;
  background: var(--wf-bg);
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  display: flex;
  flex-direction: column;
}

.phone.large .phone-screen {
  border-radius: 32px;
}

.status-bar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 22px;
  padding: 4px 18px 0;
  font-size: 10px;
  font-weight: 600;
  color: #0f172a;
}

.phone.large .status-bar {
  height: 28px;
  padding: 4px 22px 0;
  font-size: 12px;
}

.status-bar::after {
  content: '';
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 18px;
  border-radius: 12px;
  background: #0f172a;
}

.phone.large .status-bar::after {
  top: 10px;
  width: 90px;
  height: 22px;
  border-radius: 14px;
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px 8px;
  background: #fff;
  border-bottom: 1px solid var(--wf-line);
}

.phone.large .app-nav {
  padding: 10px 14px 8px;
}

.app-nav .back {
  width: 22px;
  font-size: 18px;
  line-height: 1;
  color: var(--wf-blue);
}

.phone.large .app-nav .back {
  width: 28px;
  font-size: 20px;
}

.app-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  text-align: center;
}

.app-title .main {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.app-title .sub {
  margin-top: 1px;
  font-size: 10px;
  color: var(--wf-subtle);
}

.phone.large .app-title .main {
  font-size: 15px;
}

.phone.large .app-title .sub {
  font-size: 11px;
}

.app-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mic-btn,
.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ebf8ff;
  color: var(--wf-blue);
}

.mic-btn {
  width: 26px;
  height: 26px;
  font-size: 12px;
}

.phone.large .mic-btn {
  width: 30px;
  height: 30px;
  font-size: 15px;
}

.save-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--wf-blue);
}

.save-link.disabled {
  color: #94a3b8;
}

.tabs,
.segment-bar {
  display: flex;
  gap: 0;
  padding: 0 10px;
  background: #fff;
  border-bottom: 1px solid var(--wf-line);
}

.tab,
.segment {
  flex: 1;
  padding: 9px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--wf-subtle);
  border-bottom: 2px solid transparent;
}

.tab.active,
.segment.active {
  color: var(--wf-blue);
  border-bottom-color: var(--wf-blue);
}

.scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 92px;
  background: var(--wf-bg);
  scrollbar-width: thin;
}

.phone.large .scroll {
  padding: 12px 12px 100px;
}

.card,
.list-card,
.hero-card,
.action-tile,
.timeline-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.hero-card {
  overflow: hidden;
  margin-bottom: 12px;
}

.hero-band {
  position: relative;
  min-height: 86px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(150deg, #dbeafe 0%, #bfdbfe 45%, #a7f3d0 100%);
}

.hero-band.map {
  min-height: 96px;
}

.hero-band.route {
  background: linear-gradient(160deg, #cffafe 0%, #bfdbfe 45%, #fde68a 100%);
}

.hero-band.dark {
  background: linear-gradient(145deg, #1e293b 0%, #0f766e 100%);
  color: #fff;
}

.hero-pin {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--wf-blue);
  font-size: 10px;
  font-weight: 700;
}

.hero-body {
  padding: 10px 12px 12px;
}

.hero-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--wf-ink);
  line-height: 1.25;
}

.hero-sub {
  margin-top: 3px;
  font-size: 11px;
  color: var(--wf-subtle);
}

.pill-row,
.meta-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pill,
.mini-pill,
.count-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
}

.pill.green,
.mini-pill.green { background: #dcfce7; color: #166534; }
.pill.amber,
.mini-pill.amber { background: #fef3c7; color: #92400e; }
.pill.blue,
.mini-pill.blue { background: #dbeafe; color: #1d4ed8; }
.pill.red,
.mini-pill.red { background: #ffe4e6; color: #be123c; }

.section-kicker {
  padding: 6px 4px 6px;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--wf-subtle);
  font-weight: 800;
}

.list-card {
  overflow: hidden;
  margin-bottom: 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-top: 1px solid #edf2f7;
}

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

.row:first-child { border-top: 0; }

.row.tight { padding: 9px 12px; }

.row-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #ebf8ff;
  color: var(--wf-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.row-icon.amber {
  background: #fff7ed;
  color: var(--wf-amber);
}

.row-icon.green {
  background: #ecfdf5;
  color: var(--wf-green);
}

.row-icon.red {
  background: #fff1f2;
  color: var(--wf-red);
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--wf-ink);
}

.row-sub {
  margin-top: 1px;
  font-size: 11px;
  color: var(--wf-subtle);
}

.row-value {
  font-size: 11px;
  font-weight: 700;
  color: var(--wf-subtle);
}

.row-chevron {
  font-size: 12px;
  color: #cbd5e1;
}

.field-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-top: 1px solid #edf2f7;
}

.field:first-child { border-top: 0; }

.field-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--wf-subtle);
}

.field-value {
  font-size: 13px;
  color: var(--wf-ink);
}

.field-value.placeholder {
  color: #94a3b8;
}

.field-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding: 8px 10px;
  background: var(--wf-surface-alt);
  border: 1px solid var(--wf-line);
  border-radius: 8px;
  font-size: 13px;
}

.field-box.highlight {
  border-color: var(--wf-blue);
  background: #eff6ff;
  color: var(--wf-blue);
}

.segmented {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--wf-line);
  background: var(--wf-surface-alt);
  color: var(--wf-subtle);
  font-size: 11px;
  font-weight: 700;
}

.seg.active {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.split .field + .field {
  border-left: 1px solid #edf2f7;
}

.toggle {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5e1;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
}

.toggle.on {
  background: #22c55e;
}

.toggle.on::after {
  left: 18px;
}

.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.action-tile {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-tile.primary {
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  color: #fff;
}

.action-tile.primary .tile-sub {
  color: rgba(255,255,255,.82);
}

.tile-title {
  font-size: 13px;
  font-weight: 800;
}

.tile-sub {
  font-size: 10px;
  line-height: 1.35;
  color: var(--wf-subtle);
}

.bottom-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(244,246,250,0) 0%, #f4f6fa 40%);
}

.bottom-bar.large {
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
}

.fab,
.fab-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  font-weight: 700;
}

.fab {
  height: 42px;
  background: var(--wf-blue);
  color: #fff;
  font-size: 13px;
}

.fab.disabled {
  background: #cbd5e1;
}

.fab-secondary {
  margin-top: 6px;
  height: 36px;
  background: #fff;
  color: var(--wf-blue);
  border: 1px solid #bfdbfe;
  font-size: 12px;
}

.sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: flex;
  align-items: flex-end;
  z-index: 3;
}

.sheet {
  width: 100%;
  padding: 10px 12px 16px;
  border-radius: 18px 18px 0 0;
  background: var(--wf-bg);
  box-shadow: 0 -8px 20px rgba(15,23,42,.25);
}

.sheet-grabber {
  width: 36px;
  height: 4px;
  margin: 0 auto 8px;
  border-radius: 99px;
  background: #cbd5e1;
}

.sheet h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
}

.sheet-search {
  margin: 10px 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--wf-line);
  background: #fff;
  color: #94a3b8;
  font-size: 12px;
}

.lookup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
}

.lookup-row.selected {
  outline: 2px solid var(--wf-blue);
  outline-offset: -2px;
  background: #eff6ff;
}

.lookup-code {
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--wf-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.lookup-main {
  flex: 1;
}

.lookup-main .name {
  font-size: 13px;
  font-weight: 700;
}

.lookup-main .sub {
  font-size: 10px;
  color: var(--wf-subtle);
}

.calendar-card,
.schedule-card,
.kanban-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  margin-bottom: 12px;
  overflow: hidden;
}

.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  font-size: 11px;
  font-weight: 700;
}

.time-grid {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 0;
  padding: 6px 0;
}

.time-col {
  display: flex;
  flex-direction: column;
}

.time-label {
  height: 34px;
  padding: 4px 6px 0;
  font-size: 9px;
  color: var(--wf-subtle);
  text-align: right;
}

.slot-col {
  position: relative;
  min-height: 238px;
  border-left: 1px solid #edf2f7;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 33px,
      #edf2f7 33px 34px
    );
}

.slot {
  position: absolute;
  left: 10px;
  right: 10px;
  border-radius: 12px;
  padding: 8px 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.slot.green {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.slot.amber {
  background: #fff7ed;
  border-color: #fed7aa;
}

.slot .name {
  font-size: 12px;
  font-weight: 800;
}

.slot .sub {
  margin-top: 2px;
  font-size: 10px;
  color: var(--wf-subtle);
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--wf-blue);
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.evidence-card {
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--wf-line);
}

.photo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 78px;
  border-radius: 10px;
  background: linear-gradient(145deg, #e0f2fe, #fef3c7);
  color: #475569;
  font-size: 20px;
}

.photo-box.empty {
  background: repeating-linear-gradient(45deg, #f1f5f9 0 10px, #f8fafc 10px 20px);
  color: #94a3b8;
}

.receipt-box {
  height: 92px;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  color: var(--wf-subtle);
  font-size: 11px;
}

.notes {
  background: #fff;
  border: 1px solid var(--wf-line);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
  padding: 22px 26px;
}

.notes h1 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--wf-brand-dark);
}

.notes h2 {
  margin: 20px 0 6px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--wf-muted);
}

.notes p,
.notes li {
  font-size: 14px;
  color: #1f2937;
}

.notes ul {
  padding-left: 18px;
}

.mapping {
  display: grid;
  grid-template-columns: minmax(170px, auto) 1fr;
  gap: 8px 14px;
  align-items: baseline;
  font-size: 13px;
}

.mapping code {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #edf2f7;
  color: #1a365d;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
}

.voice-example,
.callout {
  margin: 6px 0;
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 3px solid var(--wf-blue);
  background: #f8fafc;
  color: #1f2937;
  font-size: 13px;
}

.voice-example .v-ico {
  margin-right: 6px;
  color: var(--wf-blue);
  font-weight: 700;
}

.tiny {
  font-size: 10px;
  color: var(--wf-subtle);
}

@media (max-width: 1100px) {
  .wf-page,
  .wf-page.multi {
    grid-template-columns: 1fr;
  }
}
