/* BakuPark panel — shared layout, tokens & header
   Use on every panel page: <link rel="stylesheet" href="panel.css">
   Content pages: wrap main in .page
   Full-bleed pages (map): only topbar uses gutters; overlays use var(--page-gutter)
*/
:root {
  --color-layer-floor-0: #fff;
  --color-layer-floor-1: #fff;
  --color-layer-floor-2: #fff;
  --color-content-primary: #191f1c;
  --color-content-secondary: #000a07a1;
  --color-content-tertiary: #00110b78;
  --color-content-link: #007042eb;
  --color-bg-action-primary: #2b8659;
  --color-bg-action-primary-hover: #246f4a;
  --color-bg-action-secondary: #00a04017;
  --color-border-separator: #002d1e12;
  --color-border-neutral: #00140d29;
  --color-neutral-secondary: #002d1e12;
  --color-neutral-secondary-hover: #002d1e1a;
  --color-special-brand: #2a9c64;
  --color-scrim: #00000047;
  --font: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --topbar-h: 3.5rem;
  --page-gutter: 1.5rem;
  --page-max: none;
  --radius-md: 10px;
  --radius-lg: 12px;
  --shadow-mega: 0 4px 6px -1px #1a1b231a, 0 2px 4px -1px #1a1b230f, 0 0 0 1px #1a1b230a;
}

@media (min-width: 1600px) {
  :root { --page-gutter: 2rem; }
}

@media (max-width: 960px) {
  :root { --page-gutter: 1rem; }
}

/* Hide protected pages until auth boot confirms session (no login flash) */
html.bp-boot body { visibility: hidden !important; }

/* —— Shared header —— */
.topbar {
  position: sticky;
  top: 0;
  /* Above Leaflet panes/controls (often 400–1000) so megas stay visible on /app */
  z-index: 1200;
  height: var(--topbar-h);
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  box-shadow: 0 1px 0 var(--color-border-separator);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  overflow: visible;
}

.topbar-inner {
  width: 100%;
  max-width: var(--page-max);
  margin: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-width: 0;
  height: 100%;
  overflow: visible;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  overflow: visible;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--color-content-primary);
  margin-right: 1.25rem;
  flex-shrink: 0;
  transition: opacity 0.15s var(--ease);
}
.logo:hover { opacity: 0.85; }
.logo em { font-style: normal; color: var(--color-special-brand); }

.nav-menus {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 0.1rem;
  position: relative;
  overflow: visible;
}
.nav-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  overflow: visible;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0 0.85rem;
  border: none;
  background: transparent;
  border-bottom: 3px solid transparent;
  color: var(--color-content-primary);
  font-size: 0.9375rem;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s var(--ease);
}
.nav-item:hover { border-bottom-color: var(--color-bg-action-secondary); }
.nav-item.is-active {
  border-bottom-color: var(--color-bg-action-primary);
  font-weight: 500;
}
.nav-item svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--color-content-secondary);
  transition: transform 0.2s var(--ease);
}
.nav-item.is-open svg { transform: rotate(180deg); }

.mega {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 50;
  display: none;
  min-width: 34rem;
  padding: 0.85rem;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-mega);
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.25rem;
  opacity: 0;
  transform: translateY(-4px);
}
.mega.mega-3 {
  grid-template-columns: 1fr 1fr 1fr;
  min-width: 46rem;
}
.mega.is-open {
  display: grid;
  animation: panelMegaIn 0.18s var(--ease) forwards;
}
@keyframes panelMegaIn {
  to { opacity: 1; transform: translateY(0); }
}
.mega-col h3 {
  font-size: 0.6875rem;
  font-weight: 650;
  color: var(--color-content-secondary);
  margin: 0.4rem 0.65rem 0.35rem;
  letter-spacing: 0.02em;
}
.mega-col a {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--color-content-primary);
  transition: background 0.12s var(--ease);
}
.mega-col a:hover { background: var(--color-neutral-secondary); }
.mega-col a.is-current {
  background: var(--color-bg-action-secondary);
  font-weight: 500;
}
.mega-col a.is-locked {
  color: var(--color-content-secondary);
  cursor: default;
  opacity: 0.72;
}
.mega-col a.is-locked:hover {
  background: transparent;
}
.mega-col a.is-locked.is-current {
  background: var(--color-neutral-secondary);
}
.mega-divider {
  height: 1px;
  background: var(--color-border-separator);
  margin: 0.35rem 0.35rem;
}

.icon-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--color-neutral-secondary);
  color: var(--color-content-primary);
  flex-shrink: 0;
  text-decoration: none;
  transition: background 0.12s var(--ease);
}
.icon-btn:hover { background: var(--color-neutral-secondary-hover); }
.icon-btn.primary {
  background: var(--color-bg-action-primary);
  color: #fdfffe;
}
.icon-btn.primary:hover { background: var(--color-bg-action-primary-hover); }

.icon-btn.sync {
  background: var(--color-bg-action-primary);
  color: #fdfffe;
}
.icon-btn.sync:hover { background: var(--color-bg-action-primary-hover); }
.icon-btn.sync:disabled {
  opacity: 0.7;
  cursor: wait;
}
.icon-btn.sync.is-busy svg {
  animation: bp-sync-spin 0.8s linear infinite;
}
@keyframes bp-sync-spin {
  to { transform: rotate(360deg); }
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.875rem;
  margin-left: 0.65rem;
  max-width: 11rem;
  color: var(--color-content-primary);
  padding: 0.35rem 0.25rem;
  border-radius: 8px;
}
.user-btn:hover { background: var(--color-neutral-secondary); }
.user-btn.is-open svg { transform: rotate(180deg); }
.user-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-btn svg {
  color: var(--color-content-secondary);
  flex-shrink: 0;
  transition: transform 0.15s var(--ease);
}

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 60;
  width: 17.5rem;
  padding: 0.55rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-mega);
  display: none;
}
.user-dropdown.is-open { display: block; }
.user-dropdown-card {
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  background: var(--color-neutral-secondary);
}
.user-dropdown-name {
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--color-content-primary);
  line-height: 1.3;
}
.user-dropdown-meta {
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--color-content-secondary);
}
.user-dropdown-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.35rem 0.35rem;
}
.user-dropdown-add {
  border: none;
  border-radius: 999px;
  height: 2.35rem;
  padding: 0 0.95rem;
  background: var(--color-neutral-secondary);
  color: var(--color-content-primary);
  font-size: 0.8125rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s var(--ease);
}
.user-dropdown-add:hover { background: var(--color-neutral-secondary-hover); }
.user-dropdown-add:disabled,
.user-dropdown-add.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.user-dropdown-add:disabled:hover,
.user-dropdown-add.is-disabled:hover {
  background: var(--color-neutral-secondary);
}
.user-dropdown-logout {
  border: none;
  background: transparent;
  color: #c62828;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.35rem 0.4rem;
}
.user-dropdown-logout:hover { opacity: 0.85; }

@media (max-width: 960px) {
  .nav-menus { display: none; }
  .user-menu { display: none; }
  .topbar .icon-btn#open-search { display: none; }
  .topbar {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .topbar-left { gap: 0.15rem; }
  .logo { margin-right: 0.35rem; font-size: 1.15rem; }
  .topbar-right { gap: 0.4rem; }
}

/* —— Mobile hamburger —— */
.bp-menu-btn {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-content-primary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  margin-left: -0.35rem;
}
.bp-menu-btn:hover { background: var(--color-neutral-secondary); }
.bp-menu-btn .bp-menu-ico-close { display: none; }
body.bp-drawer-open .bp-menu-btn .bp-menu-ico-open { display: none; }
body.bp-drawer-open .bp-menu-btn .bp-menu-ico-close { display: block; }

@media (max-width: 960px) {
  .bp-menu-btn { display: inline-flex; }
}

/* —— Mobile nav drawer —— */
.bp-drawer-root {
  position: fixed;
  inset: 0;
  z-index: 1150;
  pointer-events: none;
}
.bp-drawer-root.is-open { pointer-events: auto; }
.bp-drawer-root[hidden] { display: none !important; }
body.bp-drawer-open .topbar { z-index: 1400; }
.bp-drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(26, 27, 35, 0.35);
  opacity: 0;
  transition: opacity 0.22s var(--ease);
}
.bp-drawer-root.is-open .bp-drawer-scrim { opacity: 1; }
.bp-drawer {
  position: absolute;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: min(22.5rem, 86vw);
  background: #fff;
  box-shadow: 4px 0 24px rgba(26, 27, 35, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform 0.26s var(--ease);
  overflow: hidden;
}
.bp-drawer-root.is-open .bp-drawer { transform: none; }
.bp-drawer-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem 0 1.5rem;
}
.bp-drawer-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.15rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.bp-drawer-profile:hover { background: var(--color-neutral-secondary); }
.bp-drawer-profile-text { flex: 1 1 auto; min-width: 0; }
.bp-drawer-profile-name {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.bp-drawer-profile-meta {
  margin-top: 0.15rem;
  font-size: 0.875rem;
  color: var(--color-content-secondary);
}
.bp-drawer-profile-chev {
  color: var(--color-content-tertiary);
  flex-shrink: 0;
}
.bp-drawer-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.25rem 1rem 0.85rem;
  height: 3rem;
  padding: 0 0.95rem;
  border-radius: 12px;
  background: var(--color-neutral-secondary);
  border: none;
  width: calc(100% - 2rem);
  cursor: pointer;
  color: var(--color-content-tertiary);
  font: inherit;
  font-size: 0.9375rem;
  text-align: left;
}
.bp-drawer-search svg { flex-shrink: 0; color: var(--color-content-secondary); }
.bp-drawer-acc { border-top: 1px solid var(--color-border-separator); }
.bp-drawer-acc:first-of-type { border-top: none; }
.bp-drawer-acc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.15rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--color-content-primary);
  cursor: pointer;
  text-align: left;
}
.bp-drawer-acc-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-content-secondary);
  transition: transform 0.18s var(--ease);
  flex-shrink: 0;
}
.bp-drawer-acc.is-open .bp-drawer-acc-btn svg { transform: rotate(180deg); }
.bp-drawer-acc-body {
  display: none;
  padding: 0 0.65rem 0.85rem;
}
.bp-drawer-acc.is-open .bp-drawer-acc-body { display: block; }
.bp-drawer-group-title {
  margin: 0.55rem 0.5rem 0.35rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--color-content-secondary);
}
.bp-drawer-link {
  display: block;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--color-content-primary);
  text-decoration: none;
}
.bp-drawer-link:hover { background: var(--color-neutral-secondary); }
.bp-drawer-link.is-current {
  background: var(--color-bg-action-secondary);
  font-weight: 650;
  color: var(--color-content-link);
}
.bp-drawer-link.is-locked {
  opacity: 0.45;
  pointer-events: none;
}
.bp-drawer-divider {
  height: 1px;
  background: var(--color-border-separator);
  margin: 0.45rem 1rem;
}
.bp-drawer-foot {
  margin-top: 0.35rem;
  border-top: 1px solid var(--color-border-separator);
  padding: 0.35rem 0.65rem 0;
}
.bp-drawer-actions {
  display: none;
  padding: 0 1.15rem 1rem;
  gap: 0.65rem;
  flex-direction: column;
}
.bp-drawer-actions.is-open { display: flex; }
.bp-drawer-actions .user-dropdown-add,
.bp-drawer-actions .user-dropdown-logout {
  width: 100%;
  justify-content: center;
  text-align: center;
  height: 2.75rem;
  border-radius: 999px;
}
.bp-drawer-actions .user-dropdown-logout {
  border: 1px solid #ff000033;
  background: #ff00000a;
}

/* Content pages (trips, lists, settings…) — full width, shared gutters */
.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0;
  padding: 2.5rem var(--page-gutter) 3.5rem;
}

@media (max-width: 960px) {
  .page {
    padding-top: 1.25rem;
    padding-bottom: 2.5rem;
  }
}

/* Global header search palette */
.search-root[hidden] { display: none !important; }
.search-root {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 12vh 1rem 1rem;
}
.search-scrim {
  position: absolute;
  inset: 0;
  background: var(--color-scrim, rgba(26, 27, 35, 0.45));
  animation: bp-search-fade 0.18s ease;
}
.search-modal {
  position: relative;
  width: 100%;
  max-width: 40rem;
  background: var(--color-layer-floor-1, #fff);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(26, 27, 35, 0.22);
  overflow: hidden;
  animation: bp-search-pop 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 1rem 0.5rem;
  height: 3.25rem;
  padding: 0 1rem;
  border-radius: 12px;
  border: 2px solid var(--color-bg-action-primary, #2b8659);
  background: #fff;
}
.search-field svg {
  flex-shrink: 0;
  color: var(--color-content-secondary);
}
.search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--color-content-primary);
}
.search-field input::placeholder { color: var(--color-content-tertiary); }
.search-body {
  min-height: 8rem;
  max-height: min(50vh, 22rem);
  overflow-y: auto;
  padding: 0.5rem 0.5rem 0.75rem;
}
.search-empty {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  color: var(--color-content-secondary);
  font-size: 0.95rem;
}
.search-empty svg { flex-shrink: 0; color: var(--color-content-tertiary); }
.search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--color-content-primary);
  font: inherit;
}
.search-result:hover,
.search-result.is-active {
  background: var(--color-neutral-secondary);
}
.search-result .ph {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #c8e6a0, #2b8659);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 650;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.search-result .ph.is-vehicle { background: linear-gradient(135deg, #a8c4e8, #3d6ea8); }
.search-result .ph.is-park { background: linear-gradient(135deg, #e8d4a8, #a8783d); }
.search-result-meta { min-width: 0; flex: 1; }
.search-result-name {
  font-weight: 550;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result-sub {
  font-size: 0.8rem;
  color: var(--color-content-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--color-border-separator);
  color: var(--color-content-secondary);
  font-size: 0.8rem;
}
.search-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.search-hints .kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.4rem;
  padding: 0 0.4rem;
  border-radius: 6px;
  background: var(--color-neutral-secondary);
  color: var(--color-content-primary);
  font-size: 0.7rem;
  font-weight: 650;
  font-family: inherit;
}
@keyframes bp-search-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes bp-search-pop {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* —— Header notifications —— */
.notif-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.notif-badge {
  position: absolute;
  top: -0.15rem;
  right: -0.15rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #de1929;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 0 0 2px #fff;
}
.notif-panel {
  position: fixed;
  z-index: 1400;
  width: min(22.5rem, calc(100vw - 1.5rem));
  max-height: min(28rem, 70vh);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(26, 27, 35, 0.16), 0 0 0 1px rgba(26, 27, 35, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font);
}
.notif-panel[hidden] { display: none !important; }
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border-separator);
}
.notif-panel-head strong {
  font-size: 0.9375rem;
  font-weight: 650;
}
.notif-mark-all {
  border: none;
  background: transparent;
  color: var(--color-content-link);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
}
.notif-mark-all:hover { background: var(--color-neutral-secondary); }
.notif-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem;
}
.notif-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--color-content-secondary);
  font-size: 0.875rem;
}
.notif-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  font: inherit;
}
.notif-item:hover { background: var(--color-neutral-secondary); }
.notif-item.is-unread {
  background: #00a0400f;
}
.notif-item.is-unread:hover { background: #00a04017; }
.notif-item-title {
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}
.notif-item-body {
  font-size: 0.8125rem;
  color: var(--color-content-secondary);
  line-height: 1.4;
  margin-bottom: 0.3rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.notif-item-meta {
  font-size: 0.75rem;
  color: var(--color-content-tertiary);
}

/* —— Header + add menu / fleet application modals —— */
.add-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.add-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 70;
  min-width: 13.5rem;
  padding: 0.45rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-mega);
}
.add-menu[hidden] { display: none !important; }
.add-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--color-content-primary);
  text-align: left;
}
.add-menu-item:hover { background: var(--color-neutral-secondary); }
.add-menu-ico {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--color-neutral-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-content-primary);
  flex-shrink: 0;
}

.bp-modal-root {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.bp-modal-root[hidden] { display: none !important; }
.bp-modal-scrim {
  position: absolute;
  inset: 0;
  background: var(--color-scrim);
}
.bp-modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(26, 27, 35, 0.18);
  animation: bp-search-pop 0.16s var(--ease);
}
.bp-modal-md { max-width: 28rem; }
.bp-modal-lg { max-width: 28rem; }
.bp-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
}
.bp-modal-head h2 {
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0;
}
.bp-modal-x {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  background: var(--color-neutral-secondary);
  color: var(--color-content-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.bp-modal-x:hover { background: var(--color-neutral-secondary-hover); }
.bp-modal-body { padding: 0.5rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.bp-field { display: flex; flex-direction: column; gap: 0.45rem; width: 100%; }
.bp-label {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--color-content-primary);
}
.bp-label .req, .bp-doc-title .req { color: #ad000ef0; margin-left: 2px; }
.bp-field input,
.bp-field select,
.bp-field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.85rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: var(--color-neutral-secondary);
  font: inherit;
  font-size: 0.9375rem;
  color: var(--color-content-primary);
  outline: none;
}
.bp-field textarea { min-height: 5rem; resize: vertical; }
.bp-field input:focus,
.bp-field select:focus,
.bp-field textarea:focus {
  background: #fff;
  border-color: var(--color-bg-action-primary);
}
.bp-hint {
  font-size: 0.75rem;
  color: var(--color-content-secondary);
  line-height: 1.35;
}

/* Searchable select / combobox */
.bp-combo {
  position: relative;
  width: 100%;
}
.bp-combo-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.bp-combo-input-wrap input {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 2.5rem 0.65rem 0.85rem;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: var(--color-neutral-secondary);
  font: inherit;
  font-size: 0.9375rem;
  color: var(--color-content-primary);
  outline: none;
}
.bp-combo.is-open .bp-combo-input-wrap input,
.bp-combo-input-wrap input:focus {
  background: #fff;
  border-color: var(--color-bg-action-primary);
}
.bp-combo-chev {
  position: absolute;
  right: 0.65rem;
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  background: transparent;
  color: var(--color-content-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease;
}
.bp-combo.is-open .bp-combo-chev { transform: rotate(180deg); }
.bp-combo-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 40;
  max-height: 16rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-mega, 0 12px 32px rgba(26, 27, 35, 0.16));
  border: 1px solid var(--color-border-separator);
}
.bp-combo-list[hidden] { display: none !important; }
.bp-combo-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  min-height: 2.75rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--color-content-primary);
  cursor: pointer;
}
.bp-combo-opt:hover,
.bp-combo-opt.is-active {
  background: var(--color-neutral-secondary);
}
.bp-combo-opt.is-selected { font-weight: 650; }
.bp-combo-empty {
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  color: var(--color-content-secondary);
}
.bp-phone-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
}
.bp-phone-code input { text-align: left; }
.bp-form-err {
  margin: 0;
  color: #ad000ef0;
  font-size: 0.875rem;
  font-weight: 600;
}
.bp-modal-actions {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
  padding-top: 0.35rem;
}
.bp-modal-actions-stack {
  flex-direction: column;
  margin-top: 0.5rem;
}
.bp-btn {
  height: 3rem;
  padding: 0 1.5rem;
  border: none;
  border-radius: 999px;
  background: var(--color-neutral-secondary);
  color: var(--color-content-primary);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 650;
  cursor: pointer;
}
.bp-btn:hover { background: var(--color-neutral-secondary-hover); }
.bp-btn.primary {
  background: var(--color-bg-action-primary);
  color: #fdfffe;
}
.bp-btn.primary:hover { background: var(--color-bg-action-primary-hover); }
.bp-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.bp-btn-block { width: 100%; }

.bp-wizard-root .bp-modal { padding: 1.25rem 1.5rem 1.5rem; text-align: left; }
.bp-wizard-x { position: absolute; top: 0.85rem; right: 0.85rem; }
.bp-wizard-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: var(--color-neutral-secondary);
  display: grid;
  place-items: center;
  margin: 0.25rem auto 0.85rem;
}
.bp-wizard-title {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
}
.bp-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin: 0 auto 1.25rem;
  max-width: 10rem;
}
.bp-steps.is-4 {
  grid-template-columns: repeat(4, 1fr);
  max-width: 14rem;
}
.bp-steps span {
  height: 0.28rem;
  border-radius: 999px;
  background: var(--color-neutral-secondary);
}
.bp-steps span.is-on { background: var(--color-bg-action-primary); }
.bp-wizard-sub {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-content-secondary);
  line-height: 1.4;
  margin: -0.45rem 0 1rem;
}
.bp-doc-meta {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--color-content-secondary);
  font-weight: 550;
}
.bp-doc-meta strong { color: var(--color-content-primary); font-weight: 650; }
.bp-doc-modal-root[hidden] { display: none !important; }
.bp-doc-modal-root {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.bp-doc-modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(26, 27, 35, 0.45);
}
.bp-doc-modal {
  position: relative;
  width: min(52rem, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(26, 27, 35, 0.22);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  max-height: min(90dvh, 36rem);
}
@media (max-width: 720px) {
  .bp-doc-modal { grid-template-columns: 1fr; max-height: min(92dvh, 40rem); }
}
.bp-doc-preview {
  background: #f3f4f6;
  min-height: 14rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: hidden;
}
.bp-doc-preview img {
  max-width: 100%;
  max-height: min(50dvh, 22rem);
  object-fit: contain;
  border-radius: 8px;
}
.bp-doc-preview-fallback {
  color: var(--color-content-secondary);
  font-size: 0.875rem;
  font-weight: 550;
  text-align: center;
  padding: 1rem;
}
.bp-doc-form {
  padding: 1.35rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
}
.bp-doc-form h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.bp-doc-form p {
  font-size: 0.875rem;
  color: var(--color-content-secondary);
  line-height: 1.4;
  margin: 0;
}
.bp-doc-modal-x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  background: var(--color-neutral-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}
.bp-wizard-pane { display: flex; flex-direction: column; gap: 0.95rem; }
.bp-wizard-pane[hidden] { display: none !important; }
.bp-docs-title {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0;
  text-align: center;
}
.bp-docs-lead {
  font-size: 0.875rem;
  color: var(--color-content-secondary);
  text-align: center;
  margin: -0.35rem 0 0.35rem;
  line-height: 1.4;
}
.bp-doc {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border-separator);
}
.bp-doc:last-of-type { border-bottom: none; }
.bp-doc-title { font-size: 0.9375rem; font-weight: 650; margin-bottom: 0.25rem; }
.bp-doc-hint { font-size: 0.8125rem; color: var(--color-content-secondary); margin: 0 0 0.65rem; line-height: 1.4; }
.bp-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--color-neutral-secondary);
  font-size: 0.875rem;
  font-weight: 650;
  cursor: pointer;
}
.bp-file-btn:hover { background: var(--color-neutral-secondary-hover); }
.bp-file-name {
  margin-top: 0.45rem;
  font-size: 0.8125rem;
  color: var(--color-content-link);
  font-weight: 500;
  word-break: break-all;
}

.icon-btn[hidden], .add-wrap[hidden] { display: none !important; }
