/* ============================================================
   Bow Places — Component classes
   Sidebar shell, cards, buttons, forms, segmented, tables,
   drawers, modals, FAB, progress, photo-slot, map-placeholder.
   Pair with bow-tokens.css. Class prefix: .bow- (where ambiguous).
   ============================================================ */

/* === LAYOUT SHELL ============================================ */
.bow-app {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
}

/* SIDEBAR (desktop) */
.bow-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-elev);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: var(--sp-5) var(--sp-3);
  z-index: 30;
  transition: width var(--dur-2) var(--ease-out);
}
.bow-sidebar.collapsed { width: var(--sidebar-w-c); }
.bow-sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0 var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--line-faint);
  margin-bottom: var(--sp-4);
}
.bow-sidebar-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background-image: var(--bow-logo-icon);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.bow-sidebar-brand { display: flex; flex-direction: column; min-width: 0; }
.bow-sidebar-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--fg);
  line-height: 1;
}
.bow-sidebar-brand .brand-tag {
  font-size: 11px;
  color: var(--fg-3);
  margin-top: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.bow-sidebar.collapsed .bow-sidebar-brand,
.bow-sidebar.collapsed .bow-nav-item .label,
.bow-sidebar.collapsed .bow-nav-section-title,
.bow-sidebar.collapsed .bow-sidebar-user-info { display: none; }

.bow-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.bow-nav-section-title {
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 600;
  padding: var(--sp-4) var(--sp-3) var(--sp-2);
}
.bow-nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--fg-2);
  font-weight: 500;
  font-size: 14px;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
  position: relative;
  white-space: nowrap;
}
.bow-nav-item:hover { background: var(--bg-overlay); color: var(--fg); }
.bow-nav-item.active { background: var(--accent-tint); color: var(--fg); font-weight: 600; }
.bow-nav-item.active::before {
  content: '';
  position: absolute;
  left: -3px; top: 18%; bottom: 18%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 999px 999px 0;
}
.bow-nav-item .bow-nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: white;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1;
}

.bow-sidebar-footer {
  border-top: 1px solid var(--line-faint);
  padding-top: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.bow-sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  flex: 1;
  min-width: 0;
}
.bow-sidebar-user:hover { background: var(--bg-overlay); }
.bow-sidebar-user-info { min-width: 0; }
.bow-sidebar-user-info .name { font-weight: 600; font-size: 13px; color: var(--fg); }
.bow-sidebar-user-info .email {
  font-size: 11px;
  color: var(--fg-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.bow-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.bow-avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.bow-avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.bow-avatar-stack { display: inline-flex; }
.bow-avatar-stack .bow-avatar { border: 2px solid var(--bg-elev); margin-left: -8px; }
.bow-avatar-stack .bow-avatar:first-child { margin-left: 0; }

/* TOP BAR */
.bow-topbar {
  display: none;
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line-faint);
  padding: 0 var(--sp-5);
  align-items: center;
  gap: var(--sp-4);
  z-index: 30;
}
.bow-topbar-logo {
  width: 36px;
  height: 36px;
  background-image: var(--bow-logo-icon);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.bow-topbar-brand { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.bow-topbar-page-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--fg-2);
  margin-left: var(--sp-3);
}
.bow-topbar-spacer { flex: 1; }

/* MAIN CONTENT */
.bow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bow-main-inner {
  padding: var(--sp-7) var(--sp-7);
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

/* MOBILE TABBAR */
.bow-tabbar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--tabbar-h);
  background: var(--bg-elev);
  border-top: 1px solid var(--line-faint);
  z-index: 30;
  padding: 0 var(--sp-2);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bow-tabbar-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: var(--tabbar-h);
  gap: 2px;
}
.bow-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--fg-3);
  font-size: 10px;
  font-weight: 600;
  position: relative;
  border-radius: var(--r-sm);
}
.bow-tab-item.active { color: var(--fg); }
.bow-tab-item.active .bow-tab-icon { background: var(--accent-tint); color: var(--accent-strong); }
.bow-tab-icon {
  width: 40px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-1) var(--ease-out);
}

/* === CARDS ================================================== */
.bow-card {
  background: var(--bg-elev);
  border: 1px solid var(--line-faint);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--dur-2) var(--ease-out),
              border-color var(--dur-1) var(--ease-out),
              transform var(--dur-2) var(--ease-out);
}
.bow-card.padded { padding: var(--sp-5); }
.bow-card.hoverable:hover { box-shadow: var(--shadow-3); border-color: var(--line); }
.bow-card.outlined { box-shadow: none; }
.bow-card-header {
  padding: var(--sp-5) var(--sp-5) var(--sp-3);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}
.bow-card-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
  margin: 0;
}
.bow-card-subtitle { font-size: 13px; color: var(--fg-3); margin-top: 4px; }
.bow-card-body { padding: 0 var(--sp-5) var(--sp-5); }

/* Navy card (for hero blocks like proposal honorarium) */
.bow-card-navy {
  background: var(--bow-navy);
  color: var(--fg-on-dark);
  border-color: transparent;
}
.bow-card-navy .bow-card-title { color: var(--fg-on-dark); }
.bow-card-navy .bow-card-subtitle { color: var(--fg-on-dark-2); }

/* === BUTTONS =============================================== */
.bow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px var(--sp-4);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: all var(--dur-1) var(--ease-out);
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
}
.bow-btn:hover { transform: translateY(-1px); }
.bow-btn:active { transform: scale(0.97); }
.bow-btn:disabled { opacity: 0.5; pointer-events: none; }

.bow-btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px rgba(0,192,114,0.25);
}
.bow-btn-primary:hover { background: var(--accent-strong); box-shadow: 0 6px 18px rgba(0,192,114,0.30); }

.bow-btn-navy { background: var(--bow-navy); color: white; }
.bow-btn-navy:hover { background: #000F4D; }

.bow-btn-secondary {
  background: var(--bg-elev);
  border-color: var(--line);
  color: var(--fg);
}
.bow-btn-secondary:hover { background: var(--bg-overlay); border-color: var(--line-strong); }

.bow-btn-ghost { background: transparent; color: var(--fg-2); }
.bow-btn-ghost:hover { background: var(--bg-overlay); color: var(--fg); }

.bow-btn-danger { background: transparent; color: var(--danger); border-color: transparent; }
.bow-btn-danger:hover { background: rgba(238,38,62,0.08); }

.bow-btn.sm { padding: 6px var(--sp-3); font-size: 12px; }
.bow-btn.lg { padding: 14px var(--sp-5); font-size: 15px; }
.bow-btn.icon { padding: 10px; aspect-ratio: 1; }
.bow-btn.icon.sm { padding: 7px; }

.bow-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-2);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all var(--dur-1) var(--ease-out);
}
.bow-icon-btn:hover { background: var(--bg-overlay); color: var(--fg); }
.bow-icon-btn.active { background: var(--accent-tint); color: var(--accent-strong); }

/* === FORMS ================================================= */
.bow-field { display: flex; flex-direction: column; gap: 6px; }
.bow-field-label { font-size: 12px; font-weight: 600; color: var(--fg-2); letter-spacing: 0.02em; }
.bow-field-hint { font-size: 11px; color: var(--fg-3); }

.bow-input, .bow-select, .bow-textarea {
  width: 100%;
  padding: 11px var(--sp-4);
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg);
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.bow-input:focus, .bow-select:focus, .bow-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.bow-input::placeholder, .bow-textarea::placeholder { color: var(--fg-3); }
.bow-input.search {
  padding-left: 40px;
  background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236A7090' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-position: 14px center;
}
.bow-textarea { min-height: 80px; resize: vertical; }
.bow-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236A7090' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* Range thumb */
.bow-range { -webkit-appearance: none; width: 100%; background: transparent; }
.bow-range::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: var(--bg-muted); }
.bow-range::-moz-range-track { height: 4px; border-radius: 999px; background: var(--bg-muted); }
.bow-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: white; border: 2px solid var(--accent);
  box-shadow: 0 2px 4px rgba(0,27,116,0.15);
  cursor: pointer;
  margin-top: -7px;
}
.bow-range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: white; border: 2px solid var(--accent);
  box-shadow: 0 2px 4px rgba(0,27,116,0.15);
  cursor: pointer;
}

/* Segmented control */
.bow-segmented {
  display: inline-flex;
  background: var(--bg-muted);
  border-radius: var(--r-pill);
  padding: 4px;
  gap: 2px;
}
.bow-segmented button {
  padding: 7px var(--sp-3);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-3);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all var(--dur-1) var(--ease-out);
}
.bow-segmented button:hover { color: var(--fg-2); }
.bow-segmented button.active {
  background: var(--bg-elev);
  color: var(--fg);
  font-weight: 600;
  box-shadow: var(--shadow-1);
}

/* Toggle */
.bow-toggle {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  transition: background var(--dur-1) var(--ease-out);
  flex-shrink: 0;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.bow-toggle::after {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  position: absolute;
  left: 2px;
  top: 2px;
  transition: left var(--dur-1) var(--ease-out);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.bow-toggle.on { background: var(--accent); }
.bow-toggle.on::after { left: 18px; }

/* Chip */
.bow-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
}
.bow-chip.outline { background: transparent; border-color: var(--line); }
.bow-chip.lg { padding: 8px 14px; font-size: 13px; }

/* Badge / status pill */
.bow-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.bow-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bow-badge.sm { font-size: 10px; padding: 3px 8px; }

/* Score badge (A/B/C/D) */
.bow-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 999px;
}
.bow-score.a { background: rgba(0,192,114,0.12); color: #008C53; }
.bow-score.b { background: rgba(0,144,226,0.10); color: #006FB0; }
.bow-score.c { background: rgba(255,185,42,0.14); color: #B07900; }
.bow-score.d { background: rgba(238,38,62,0.10); color: #C41E33; }

/* Metric block */
.bow-metric-block { display: flex; flex-direction: column; gap: 4px; }
.bow-metric-block .value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.bow-metric-block .label { font-size: 12px; color: var(--fg-3); font-weight: 500; }
.bow-metric-block .delta {
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.bow-metric-block .delta.up { color: var(--success); }
.bow-metric-block .delta.down { color: var(--danger); }

/* The 'O' as decoration */
.bow-arc-deco {
  position: absolute;
  pointer-events: none;
  background-image: var(--bow-logo-icon);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.10;
}

/* Dividers */
.bow-hr { height: 1px; background: var(--line-faint); border: 0; margin: 0; }

/* Skeleton loader */
@keyframes bow-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.bow-skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 0%, var(--bg-elev-2) 50%, var(--bg-muted) 100%);
  background-size: 200% 100%;
  animation: bow-shimmer 1.6s infinite linear;
  border-radius: var(--r-sm);
}

/* Photo slot — drag-target placeholder */
.bow-photo-slot {
  background: linear-gradient(135deg, rgba(0,27,116,0.04), rgba(0,192,114,0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}
.bow-photo-slot::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--bow-logo-icon);
  background-size: 60%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08;
}
.bow-photo-slot > * { position: relative; z-index: 1; }

/* Page header */
.bow-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}
.bow-page-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}
.bow-page-subtitle { color: var(--fg-3); font-size: 15px; margin-top: 6px; }

/* Section header */
.bow-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.bow-section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
  margin: 0;
}

/* Table */
.bow-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.bow-table thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line-faint);
  background: var(--bg-elev-2);
  white-space: nowrap;
}
.bow-table tbody td {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--line-faint);
  vertical-align: middle;
}
.bow-table tbody tr:hover { background: var(--bg-overlay); }
.bow-table tbody tr:last-child td { border-bottom: 0; }

/* Mobile shell */
@media (max-width: 1024px) {
  .bow-sidebar { display: none; }
  .bow-topbar { display: flex; }
  .bow-tabbar { display: block; }
  .bow-main { padding-bottom: var(--tabbar-h); }
  .bow-main-inner { padding: var(--sp-5) var(--sp-5) var(--sp-7); }
}
@media (max-width: 640px) {
  .bow-main-inner { padding: var(--sp-4) var(--sp-4) var(--sp-7); }
  .bow-page-header { margin-bottom: var(--sp-5); }
}

/* Layout: topbar mode on desktop */
[data-layout="topbar"] .bow-sidebar { display: none; }
[data-layout="topbar"] .bow-topbar { display: flex; }
[data-layout="topbar"] .bow-main-inner { padding-top: var(--sp-6); }

/* Empty state */
.bow-empty {
  text-align: center;
  padding: var(--sp-8) var(--sp-5);
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-elev-2);
}
.bow-empty-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto var(--sp-4);
  background-image: var(--bow-logo-icon);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.4;
}
.bow-empty-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  margin-bottom: 6px;
}
.bow-empty-text { color: var(--fg-3); font-size: 14px; }

/* Animations */
@keyframes bow-fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.bow-fade-in { animation: bow-fadeIn var(--dur-3) var(--ease-out); }

/* Grid helpers */
.bow-grid { display: grid; gap: var(--sp-4); }
.bow-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.bow-grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.bow-grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* Density adjustments */
[data-density="compact"] .bow-card.padded { padding: var(--sp-4); }
[data-density="compact"] .bow-card-header { padding: var(--sp-4) var(--sp-4) var(--sp-2); }
[data-density="compact"] .bow-card-body { padding: 0 var(--sp-4) var(--sp-4); }
[data-density="compact"] .bow-table tbody td { padding: var(--sp-3); }
[data-density="compact"] .bow-metric-block .value { font-size: 24px; }
[data-density="compact"] .bow-page-header { margin-bottom: var(--sp-5); }
[data-density="spacious"] .bow-card.padded { padding: var(--sp-6); }
[data-density="spacious"] .bow-main-inner { padding: var(--sp-8) var(--sp-7); }
[data-density="spacious"] .bow-metric-block .value { font-size: 38px; }

/* Modal */
.bow-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,27,116,0.45);
  backdrop-filter: blur(8px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: bow-fadeIn var(--dur-2) var(--ease-out);
}
.bow-modal {
  background: var(--bg-elev);
  border-radius: var(--r-xl);
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-4);
  border: 1px solid var(--line-faint);
}
.bow-modal.lg { max-width: 880px; }

/* Drawer (slides from right) */
.bow-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,27,116,0.40);
  backdrop-filter: blur(6px);
  z-index: 50;
}
.bow-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(560px, 100%);
  background: var(--bg-elev);
  z-index: 51;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-4);
  border-left: 1px solid var(--line-faint);
}
@media (max-width: 1024px) {
  .bow-drawer { width: 100%; max-width: 100%; }
}

/* Bucket (followup) */
.bow-bucket {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line-faint);
  background: var(--bg-elev);
}
.bow-bucket .bucket-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.bow-bucket .bucket-label { font-size: 12px; color: var(--fg-3); font-weight: 500; }
.bow-bucket .bucket-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-tint);
  color: var(--accent-strong);
}

/* Quick action button */
.bow-qa-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-2);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  cursor: pointer;
  transition: all var(--dur-1) var(--ease-out);
}
.bow-qa-btn:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-tint); }

/* Floating action button (mobile) */
.bow-fab {
  position: fixed;
  right: var(--sp-5);
  bottom: calc(var(--tabbar-h) + var(--sp-5));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 24px rgba(0,192,114,0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  border: 0;
  cursor: pointer;
}
@media (min-width: 1025px) { .bow-fab { display: none; } }

/* Progress bar */
.bow-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-muted);
  overflow: hidden;
}
.bow-progress > .fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width var(--dur-3) var(--ease-out);
}

/* Map placeholder (until tile layer is in place) */
.bow-map-placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(at 70% 30%, rgba(0,192,114,0.15) 0px, transparent 50%),
    radial-gradient(at 20% 80%, rgba(0,144,226,0.10) 0px, transparent 50%),
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(0,27,116,0.04) 18px 19px),
    repeating-linear-gradient(-45deg, transparent 0 18px, rgba(0,27,116,0.04) 18px 19px),
    var(--bg-muted);
  position: relative;
}

/* Hero with rainbow stripe (proposal client preview) */
.bow-hero-navy {
  background: var(--bow-navy);
  color: var(--fg-on-dark);
  border-radius: var(--r-xl);
  padding: var(--sp-7) var(--sp-6);
  position: relative;
  overflow: hidden;
}
.bow-hero-navy::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: linear-gradient(
    90deg,
    #EE263E 0%, #FFB92A 14%, #FDDB32 26%, #98D801 38%,
    #00C072 50%, #00BBDE 62%, #0090E2 74%, #8345BA 88%, #C04CAE 100%
  );
}
.bow-hero-navy .bow-hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--fg-on-dark-2);
  margin-bottom: var(--sp-3);
}
.bow-hero-navy .bow-hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4.4vw, 48px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}
