/* Base reset + responsive grid classes — verbatim port of the artifact's
   injected <style> block. Component classes (buttons, cards, inputs, ...) are
   added alongside the Jinja primitive macros in a later phase. */

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--bp-font);
  color: var(--bp-ink);
  background: var(--bp-bg);
}

/* KPI hero row: 5 → 3 (<=1180) → 2 (<=680) */
.bp-kpi {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 18px 22px 0;
}
@media (max-width: 1180px) {
  .bp-kpi {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 680px) {
  .bp-kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Analytics: two columns → one (<=920) */
.bp-analytics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 920px) {
  .bp-analytics {
    grid-template-columns: 1fr;
  }
}

/* Forecast tiles: three columns → one (<=760) */
.bp-ftiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 760px) {
  .bp-ftiles {
    grid-template-columns: 1fr;
  }
}

/* Deal detail: side-by-side → stacked (<=860) */
.bp-detail {
  display: flex;
  flex: 1;
  min-height: 0;
}
@media (max-width: 860px) {
  .bp-detail {
    flex-direction: column;
    overflow: auto;
  }
  .bp-detail-side {
    width: auto !important;
    border-right: none !important;
    border-bottom: 1px solid var(--bp-line);
  }
}

/* Settings: two columns → one (<=920) */
.bp-set {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 920px) {
  .bp-set {
    grid-template-columns: 1fr;
  }
}

.bp-row:hover {
  background: var(--bp-line-soft);
}

.bp-span {
  grid-column: 1 / -1;
}

/* --- Primitive component classes (port of the artifact style-factories) --- */
.bp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-family: var(--bp-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease, filter 0.15s ease;
}
.bp-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(10, 10, 11, 0.12);
}
.bp-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(10, 10, 11, 0.1);
}
.bp-btn--primary {
  background: var(--bp-violet);
  color: #fff;
}
.bp-btn--primary:hover:not(:disabled) {
  filter: brightness(1.08);
}
.bp-btn--neutral {
  background: var(--bp-surface);
  color: var(--bp-ink);
  border-color: var(--bp-line);
}
.bp-btn--neutral:hover:not(:disabled) {
  border-color: var(--bp-violet-line);
}
.bp-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.bp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 8px;
  border: 1px solid var(--bp-line);
  background: none;
  cursor: pointer;
  color: var(--bp-sub);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}
.bp-icon-btn:hover {
  background: var(--bp-line-soft);
  color: var(--bp-ink);
  transform: translateY(-1px);
}
.bp-icon-btn:active {
  transform: translateY(0);
}
.bp-input {
  width: 100%;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--bp-line);
  font-size: 14px;
  font-family: var(--bp-font);
  color: var(--bp-ink);
  background: var(--bp-surface);
}
.bp-input:focus {
  outline: none;
  border-color: var(--bp-violet-line);
}

.bp-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.bp-icon--muted {
  color: var(--bp-muted);
}
.bp-icon--violet {
  color: var(--bp-violet);
}
.bp-icon-btn.is-active {
  color: var(--bp-violet);
  border-color: var(--bp-violet-line);
}

/* Primitives (port of the artifact's primitive components) */
.bp-mono {
  font-family: var(--bp-mono);
  font-weight: 700;
  font-size: 14px;
}
.bp-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 7px;
}
.bp-card {
  background: var(--bp-surface);
  border: 1px solid var(--bp-line);
  border-radius: 16px;
  padding: 20px;
}
.bp-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.bp-title__text {
  font-size: 15.5px;
  font-weight: 700;
}
.bp-title__right {
  font-size: 13px;
  color: var(--bp-muted);
}
.bp-label {
  font-size: 11.5px;
  color: var(--bp-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.bp-field {
  margin-bottom: 10px;
}
.bp-field .bp-label {
  margin-bottom: 4px;
}
.bp-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bp-violet-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--bp-violet);
  flex-shrink: 0;
  font-family: var(--bp-mono);
}
.bp-icon-chip {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bp-seg {
  display: inline-flex;
  background: var(--bp-line-soft);
  border: 1px solid var(--bp-line);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.bp-seg__opt {
  border: none;
  background: transparent;
  color: var(--bp-sub);
  font-weight: 600;
  font-size: 13.5px;
  font-family: var(--bp-font);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.bp-seg__opt.is-active {
  background: var(--bp-surface);
  color: var(--bp-violet);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* --- App shell: nav + KPI strip --- */
.bp-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.bp-nav {
  border-bottom: 1px solid var(--bp-line);
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bp-surface);
  flex-wrap: wrap;
}
.bp-nav__brand {
  padding: 11px 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.bp-nav__logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--bp-violet);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
}
.bp-nav__brandtext {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.3px;
}
.bp-nav__brandtext span {
  color: var(--bp-muted);
  font-weight: 500;
}
.bp-nav__tabs {
  display: flex;
  flex: 1;
  min-width: 200px;
  flex-wrap: wrap;
}
.bp-nav__tab {
  padding: 14px 13px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--bp-sub);
  font-size: 14px;
  font-weight: 400;
  font-family: var(--bp-font);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.bp-nav__tab:hover {
  color: var(--bp-violet);
}
.bp-nav__tab.is-active {
  border-bottom-color: var(--bp-violet);
  color: var(--bp-violet);
  font-weight: 600;
}
.bp-nav__right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.bp-nav__field {
  position: relative;
  display: flex;
  align-items: center;
}
.bp-nav__field > .bp-icon {
  position: absolute;
  left: 10px;
  pointer-events: none;
}
.bp-nav__search {
  width: 118px;
  padding: 7px 9px 7px 30px;
}
.bp-select {
  width: auto;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid var(--bp-line);
  font-size: 14px;
  font-family: var(--bp-font);
  background: var(--bp-surface);
  color: var(--bp-ink);
  cursor: pointer;
}
.bp-select--ccy {
  padding: 7px 9px 7px 30px;
  font-weight: 600;
  color: var(--bp-violet);
  font-family: var(--bp-mono);
}
.bp-main {
  flex: 1;
  padding: 18px 22px 22px;
  overflow-x: auto;
}
.bp-kpi-card {
  border: 1px solid var(--bp-line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--bp-surface);
  display: flex;
  gap: 11px;
  align-items: center;
}
.bp-kpi-card--hero {
  border-color: var(--bp-violet-line);
  background: linear-gradient(110deg, var(--bp-violet-soft), transparent 60%);
}
.bp-kpi-card__chip {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bp-kpi-card__body {
  min-width: 0;
}
.bp-kpi-card__val {
  font-family: var(--bp-mono);
  font-size: 19px;
  font-weight: 800;
  margin-top: 3px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-kpi-card .bp-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-view-placeholder {
  color: var(--bp-muted);
  padding: 64px 0;
  text-align: center;
  font-size: 15px;
}

/* --- Charts --- */
.bp-chart {
  position: relative;
  width: 100%;
}
.bp-gauge path {
  transition: stroke-dashoffset 0.6s ease;
}
.bp-gauge__val {
  font-family: var(--bp-mono);
  font-weight: 800;
}

/* --- Forecast view --- */
.bp-forecast {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bp-fc-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.bp-fc-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bp-fc-tile {
  display: flex;
  gap: 12px;
  align-items: center;
}
.bp-fc-tile__chip {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bp-fc-tile__body {
  min-width: 0;
}
.bp-fc-tile__val {
  font-family: var(--bp-mono);
  font-size: 20px;
  font-weight: 800;
  margin-top: 3px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-fc-tile .bp-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-fc-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--bp-sub);
}
.bp-fc-legend > span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.bp-fc-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.bp-fc-foot {
  font-size: 11.5px;
  color: var(--bp-muted);
  margin-top: 6px;
}

/* --- Pipeline kanban board --- */
.bp-board {
  display: flex;
  gap: 10px;
}
/* Columns flex to share the content width so the board fits laptop/desktop
   without a page-level horizontal scrollbar. Below ~1150px of content they hit
   min-width and .bp-main scrolls as a fallback. (Artifact used a fixed 214px
   column + min-width:max-content, which forced the board to ~1.5k px wide.) */
.bp-col {
  flex: 1 1 0;
  min-width: 128px;
  background: var(--bp-line-soft);
  border-radius: 14px;
  padding: 10px 8px;
  min-height: 420px;
  border: 1.5px dashed transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.bp-col.is-over {
  background: var(--bp-violet-soft);
  border-color: var(--bp-violet);
}
.bp-col--lost {
  background: var(--bp-red-soft);
  border: 1px solid rgba(220, 38, 38, 0.13);
}
.bp-col--lost.is-over {
  border: 1.5px dashed var(--bp-red);
}
.bp-col__head {
  margin-bottom: 9px;
  padding: 0 4px;
}
.bp-col__titlerow {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bp-col__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bp-sub);
}
.bp-col__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.bp-col__count {
  font-size: 12px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 8px;
}
.bp-col__acv {
  margin-top: 3px;
  display: block;
  padding-left: 13px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bp-muted);
}
.bp-col__title--lost {
  font-size: 13px;
  font-weight: 600;
  color: var(--bp-red);
  margin-bottom: 9px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bp-col__count--lost {
  background: #fff;
  color: var(--bp-red);
}
.bp-dealcard {
  background: var(--bp-surface);
  border-radius: 12px;
  padding: 11px;
  margin-bottom: 8px;
  border: 1px solid var(--bp-line);
  cursor: grab;
  user-select: none;
}
.bp-dealcard:active {
  cursor: grabbing;
}
.bp-dealcard__title {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}
.bp-dealcard__sub {
  font-size: 12px;
  color: var(--bp-sub);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.bp-dealcard__mid {
  color: var(--bp-muted);
}
.bp-dealcard__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bp-dealcard__val {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--bp-violet);
}
.bp-dealcard__permo {
  font-size: 11px;
  color: var(--bp-muted);
}
.bp-dealcard__foot {
  margin-top: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bp-dealcard__foot .bp-mono {
  font-size: 11px;
  font-weight: 500;
}
.bp-pill--ccy {
  color: var(--bp-muted);
  background: var(--bp-line-soft);
  border: 1px solid var(--bp-line);
}
.bp-lostcard {
  background: #fff;
  border-radius: 11px;
  padding: 9px;
  margin-bottom: 6px;
  border: 1px solid rgba(220, 38, 38, 0.13);
  cursor: pointer;
}
.bp-lostcard__org {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bp-red);
}
.bp-lostcard__meta {
  font-size: 12px;
  color: var(--bp-red);
  margin-top: 2px;
}
.bp-lostcard__meta .bp-mono {
  color: var(--bp-red);
  font-size: 12px;
  font-weight: 600;
}

/* --- Deals table --- */
.bp-card--flush {
  padding: 0;
  overflow: hidden;
}
.bp-tablewrap {
  overflow-x: auto;
}
.bp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.bp-table th {
  padding: 11px 16px;
  font-weight: 600;
  font-size: 11.5px;
  color: var(--bp-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--bp-line);
  white-space: nowrap;
  text-align: left;
}
.bp-th--sortable {
  cursor: pointer;
}
.bp-th--sortable.is-sorted {
  color: var(--bp-violet);
}
.bp-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--bp-line-soft);
}
.bp-table .bp-row {
  cursor: pointer;
}
.bp-td--strong {
  font-weight: 600;
}
.bp-td--sub {
  color: var(--bp-sub);
}
.bp-td--nowrap {
  white-space: nowrap;
}
.bp-td__val {
  font-size: 14px;
  font-weight: 700;
  color: var(--bp-violet);
}
.bp-td__permo {
  font-size: 11px;
  color: var(--bp-muted);
}
.bp-table__empty {
  padding: 2rem;
  text-align: center;
  color: var(--bp-muted);
}

/* --- Modals + deal form --- */
[x-cloak] {
  display: none !important;
}
.bp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.bp-modal {
  width: 460px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bp-surface);
  border-radius: 16px;
  border: 1px solid var(--bp-line);
  padding: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}
.bp-modal--sm {
  width: 340px;
}
.bp-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.bp-modal__title {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.3px;
}
.bp-modal__sub {
  font-size: 13px;
  color: var(--bp-sub);
  margin: 0 0 14px;
}
.bp-modal__actions {
  display: flex;
  gap: 8px;
}
.bp-iconbtn-plain {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bp-sub);
  display: flex;
  padding: 2px;
}
.bp-form-row {
  display: flex;
  gap: 10px;
}
.bp-form-row--end {
  align-items: flex-end;
}
.bp-grow {
  flex: 1;
}
.bp-w108 {
  width: 108px;
}
.bp-w120 {
  width: 120px;
}
.bp-mb14 {
  margin-bottom: 14px;
}
.bp-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--bp-sub);
  padding-bottom: 18px;
  cursor: pointer;
  white-space: nowrap;
}
.bp-form-hint {
  font-size: 12px;
  color: var(--bp-muted);
  margin-bottom: 14px;
}
.bp-btn--block {
  width: 100%;
  padding: 11px;
}
.bp-btn--danger {
  background: var(--bp-red);
  color: #fff;
}
.bp-btn--danger:disabled {
  background: #f0a6a6;
  opacity: 1;
}

/* --- Deal detail --- */
.bp-mb8 { margin-bottom: 8px; }
.bp-mt8 { margin-top: 8px; }
.bp-mt16 { margin-top: 16px; }
.bp-mt18 { margin-top: 18px; }
.bp-w-auto { width: auto; }
.bp-w200 { width: 200px; }
.bp-spacer { flex: 1; }
.bp-inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; }

.bp-deal {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.bp-deal__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bp-line);
  font-size: 13px;
  color: var(--bp-sub);
}
.bp-deal__back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--bp-sub);
  text-decoration: none;
  font-weight: 600;
}
.bp-deal__sep { color: var(--bp-line); }
.bp-deal__crumbstrong { font-weight: 700; color: var(--bp-ink); }
.bp-deal__owner { display: inline-flex; align-items: center; gap: 7px; }
.bp-btn--sm { padding: 5px 11px; font-size: 13px; }
.bp-btn--won { color: var(--bp-green); background: var(--bp-green-soft); border-color: rgba(22, 163, 74, 0.2); }
.bp-btn--lost { color: var(--bp-red); background: var(--bp-red-soft); border-color: rgba(220, 38, 38, 0.2); }
.bp-deal__lostpanel { padding: 12px 0; border-bottom: 1px solid var(--bp-line); }
.bp-deal__lostlabel { font-size: 13px; color: var(--bp-sub); }

.bp-deal__statusbar { padding: 18px 4px 16px; border-bottom: 1px solid var(--bp-line); }
.bp-deal__closed { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bp-deal__badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.bp-deal__badge.is-won { background: var(--bp-green); }
.bp-deal__badge.is-lost { background: var(--bp-red); }
.bp-deal__closedlabel { font-size: 14.5px; font-weight: 700; }
.bp-deal__closedlabel.is-won { color: var(--bp-green); }
.bp-deal__closedlabel.is-lost { color: var(--bp-red); }
.bp-deal__closedval { font-size: 13px; color: var(--bp-muted); }

.bp-stepper { display: flex; position: relative; }
.bp-stepnode {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  z-index: 1;
}
.bp-stepbtn { background: none; border: none; cursor: pointer; padding: 0; }
.bp-stepdot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bp-surface);
  border: 2px solid var(--bp-line);
  color: #fff;
}
.bp-stepdot.is-done { background: var(--bp-violet); border-color: var(--bp-violet); }
.bp-stepdot.is-cur { border-color: var(--bp-violet); box-shadow: 0 0 0 4px var(--bp-violet-soft); }
.bp-steplabel { font-size: 12px; font-weight: 500; color: var(--bp-muted); margin-top: 8px; white-space: nowrap; }
.bp-steplabel.is-cur { font-weight: 700; color: var(--bp-violet); }
.bp-steplabel.is-done { font-weight: 600; color: var(--bp-ink); }
.bp-stepprob { font-size: 11px; font-weight: 600; color: var(--bp-muted); margin-top: 2px; }
.bp-stepprob.is-cur { color: var(--bp-violet); }

.bp-detail {
  border: 1px solid var(--bp-line);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 16px;
  background: var(--bp-surface);
}
.bp-detail-side {
  width: 300px;
  flex-shrink: 0;
  border-right: 1px solid var(--bp-line);
  padding: 20px;
  overflow-y: auto;
}
.bp-detail-main { flex: 1; padding: 18px 22px; overflow-y: auto; min-width: 0; }
.bp-deal__headline { margin-bottom: 18px; }
.bp-deal__title { font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; letter-spacing: -0.2px; }
.bp-deal__big { font-size: 27px; font-weight: 800; }
.bp-deal__permo { font-size: 14px; color: var(--bp-muted); font-weight: 600; }
.bp-deal__approx { font-size: 13px; color: var(--bp-muted); margin-top: 2px; }
.bp-deal__pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.bp-deal__gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0 14px;
  border-bottom: 1px solid var(--bp-line-soft);
  margin-bottom: 14px;
}
.bp-sumrow { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--bp-line-soft); }
.bp-sumrow__label { font-size: 11px; color: var(--bp-muted); }
.bp-sumrow__val { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-comrow { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--bp-line-soft); font-size: 13.5px; }
.bp-comrow__k { color: var(--bp-sub); }
.bp-comrow__v { font-weight: 600; }
.bp-deal__services { display: flex; flex-wrap: wrap; gap: 5px; }


.bp-tabs { display: flex; border-bottom: 1px solid var(--bp-line); margin-bottom: 16px; gap: 2px; }
.bp-tab {
  padding: 9px 14px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--bp-sub);
  font-size: 13.5px;
  font-family: var(--bp-font);
}
.bp-tab.is-active { border-bottom-color: var(--bp-violet); color: var(--bp-violet); font-weight: 600; }

.bp-composer { border: 1px solid var(--bp-violet-line); border-radius: 12px; padding: 14px; margin-bottom: 14px; background: var(--bp-violet-soft); }
.bp-composer__row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.bp-composer__open {
  width: 100%;
  text-align: left;
  background: var(--bp-surface);
  border: 1px solid var(--bp-line);
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 14px;
  font-size: 13.5px;
  color: var(--bp-muted);
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-family: var(--bp-font);
}
.bp-quicklog { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 22px; }
.bp-quicklog__btn {
  padding: 11px 8px;
  background: var(--bp-surface);
  border: 1px solid var(--bp-line);
  border-radius: 11px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--bp-sub);
  font-family: var(--bp-font);
}
.bp-actrow { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--bp-line-soft); align-items: center; }
.bp-actrow.is-done { opacity: 0.6; }
.bp-actrow.is-done .bp-actrow__subj { text-decoration: line-through; }
.bp-actrow__subj { font-size: 14px; font-weight: 600; }
.bp-actrow__date { font-size: 12px; font-weight: 500; color: var(--bp-muted); display: block; }
.bp-iconbtn-plain--green { color: var(--bp-green); }
.bp-textarea { min-height: 92px; resize: vertical; }
.bp-noteitem { background: var(--bp-surface); border: 1px solid var(--bp-line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.bp-noteitem__body { font-size: 14px; white-space: pre-wrap; }
.bp-noteitem__meta { font-size: 12px; color: var(--bp-muted); margin-top: 4px; }
.bp-logitem { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bp-line-soft); }
.bp-logdot { width: 6px; height: 6px; border-radius: 50%; background: var(--bp-violet-line); margin-top: 6px; flex-shrink: 0; }
.bp-logitem__text { font-size: 13.5px; }
.bp-logitem__meta { font-size: 12px; color: var(--bp-muted); margin-top: 2px; }
.bp-logitem__who { font-weight: 600; color: var(--bp-sub); }
.bp-deal__empty { font-size: 13.5px; color: var(--bp-muted); padding: 8px 0; }
.bp-deal__warn { font-size: 13.5px; color: var(--bp-amber); background: var(--bp-amber-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }

/* --- Analytics summary tiles --- */
.bp-mt10 { margin-top: 10px; }
.bp-mb6 { margin-bottom: 6px; }
.bp-muted { color: var(--bp-muted); }
.bp-recmix { display: flex; gap: 8px; margin-top: 8px; }
.bp-recmix__tile { flex: 1; border-radius: 11px; padding: 10px; text-align: center; }
.bp-recmix__tile--rec { background: var(--bp-violet-soft); }
.bp-recmix__tile--one { background: var(--bp-amber-soft); }
.bp-recmix__val { font-size: 16px; font-weight: 800; }
.bp-recmix__tile--rec .bp-recmix__val { color: var(--bp-violet); }
.bp-recmix__tile--one .bp-recmix__val { color: var(--bp-amber); }
.bp-wl { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.bp-wl__tile { border-radius: 12px; padding: 12px; text-align: center; }
.bp-wl__tile--won { background: var(--bp-green-soft); }
.bp-wl__tile--lost { background: var(--bp-red-soft); }
.bp-wl__val { font-size: 23px; font-weight: 800; }
.bp-wl__tile--won .bp-wl__val { color: var(--bp-green); }
.bp-wl__tile--lost .bp-wl__val { color: var(--bp-red); }
.bp-lossrow { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--bp-line-soft); font-size: 13.5px; }
.bp-lossrow__n { color: var(--bp-red); font-weight: 700; }
.bp-stucklabel { display: flex; align-items: center; gap: 5px; }
.bp-stuckrow { display: flex; justify-content: space-between; padding: 5px 6px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.bp-stuckrow:hover { background: var(--bp-line-soft); }

/* --- Forecast bookings table --- */
.bp-bookings__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 0; }
.bp-bookings__head .bp-title__text { margin: 0; }
.bp-table--sm th, .bp-table--sm td { padding: 9px 10px; }
.bp-td__won { font-weight: 700; color: var(--bp-green); }

/* --- Activities view --- */
.bp-actv { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.bp-actv--sep { border-bottom: 1px solid var(--bp-line-soft); }
.bp-actv.is-done { opacity: 0.6; }
.bp-actv__body { flex: 1; min-width: 0; }
.bp-clickable { cursor: pointer; }
.bp-actv__subj { font-size: 14px; font-weight: 600; }
.bp-actv.is-done .bp-actv__subj { text-decoration: line-through; }
.bp-actv__meta { font-size: 12px; color: var(--bp-sub); margin-top: 2px; }
.bp-actv__empty { padding: 2rem; text-align: center; color: var(--bp-muted); }

/* --- Guide view --- */
.bp-guide { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.bp-guide__hero { background: linear-gradient(110deg, var(--bp-violet-soft), transparent 60%); border-color: var(--bp-violet-line); }
.bp-guide__herotitle { font-size: 21px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 6px; }
.bp-guide__herosub { font-size: 14.5px; color: var(--bp-sub); line-height: 1.55; }
.bp-guide__services { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.bp-guide__service { border: 1px solid var(--bp-line); border-radius: 12px; padding: 12px 14px; }
.bp-guide__servicehead { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.bp-guide__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bp-guide__servicename { font-size: 14.5px; font-weight: 700; }
.bp-guide__servicedesc { font-size: 13.5px; color: var(--bp-sub); line-height: 1.5; }
.bp-guide__text { font-size: 14px; color: var(--bp-sub); line-height: 1.55; margin-bottom: 12px; }
.bp-guide__stages { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-guide__stage { display: flex; align-items: center; gap: 7px; border: 1px solid var(--bp-line); border-radius: 10px; padding: 7px 11px; }
.bp-guide__stagename { font-size: 13.5px; font-weight: 600; }
.bp-guide__stageprob { color: var(--bp-muted); font-weight: 700; }
.bp-guide__steps { margin: 0; padding-left: 18px; font-size: 14px; color: var(--bp-sub); line-height: 1.7; }
.bp-guide__steps b { color: var(--bp-ink); }
.bp-guide__note { font-size: 13px; color: var(--bp-muted); margin-top: 12px; padding: 10px 12px; background: var(--bp-line-soft); border-radius: 10px; }
.bp-guide__score { border-color: rgba(85, 9, 248, 0.18); }
.bp-guide__score b { color: var(--bp-ink); }
.bp-guide__p0 { margin-top: 0; }
.bp-guide__p1 { margin-bottom: 0; }

/* --- Auth pages --- */
.bp-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.bp-auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bp-surface);
  border: 1px solid var(--bp-line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}
.bp-auth-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--bp-violet);
  color: #fff;
  font-family: var(--bp-mono);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bp-auth-title {
  font-size: 19px;
  margin: 14px 0 2px;
}
.bp-auth-sub {
  color: var(--bp-sub);
  font-size: 14px;
  margin: 0 0 18px;
}
.bp-auth-label {
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bp-muted);
  margin: 12px 0 6px;
}
.bp-auth-submit {
  width: 100%;
  margin-top: 16px;
}
.bp-auth-divider {
  text-align: center;
  color: var(--bp-muted);
  font-size: 13px;
  margin: 16px 0;
}
.bp-auth-foot {
  text-align: center;
  font-size: 14px;
  color: var(--bp-sub);
  margin: 18px 0 0;
}
.bp-auth-foot a,
.bp-auth a:not(.bp-btn) {
  color: var(--bp-violet);
  text-decoration: none;
}
/* Google-style sign-in button: white, bordered, with the multicolor G mark. */
.bp-btn--google {
  background: #fff;
  color: #3c4043;
  border-color: var(--bp-line);
  font-weight: 600;
}
.bp-btn--google:hover {
  background: #f8f9fb;
}
.bp-gmark {
  flex: 0 0 auto;
}
.bp-nav__signout {
  display: inline-flex;
  margin: 0;
}
.bp-nav__signout .bp-icon-btn {
  color: var(--bp-red);
  border-color: rgba(220, 38, 38, 0.35);
}
.bp-nav__signout .bp-icon-btn:hover {
  background: var(--bp-red-soft);
}
.bp-auth-error {
  background: var(--bp-red-soft);
  color: var(--bp-red);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 4px;
}
.bp-auth-hint {
  color: var(--bp-muted);
  font-size: 12.5px;
  margin: 6px 0 0;
}

/* --- Settings (admin) --- */
.bp-settings { max-width: 1100px; margin: 0 auto; }
.bp-settings__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.bp-settings__title { font-size: 21px; font-weight: 800; letter-spacing: -0.4px; }
.bp-settings__actions { display: flex; align-items: center; gap: 8px; }
.bp-resetform { margin: 0; }
.bp-btn--dangerline { color: var(--bp-red); border-color: rgba(220, 38, 38, 0.27); }
.bp-setnote { font-size: 12px; color: var(--bp-muted); margin-top: 8px; }
.bp-mb4 { margin-bottom: 4px; }
.bp-mb10 { margin-bottom: 10px; }
.bp-mt14 { margin-top: 14px; }
.bp-w150 { width: 150px; }
.bp-icon-btn--danger { color: var(--bp-red); border-color: rgba(220, 38, 38, 0.27); }

/* Stage editor rows */
.bp-setrow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--bp-line-soft); }
.bp-stagecolor { width: 28px; height: 28px; min-width: 28px; border: 1px solid var(--bp-line); border-radius: 7px; padding: 0; background: none; cursor: pointer; }
.bp-stagecolor:disabled { cursor: default; opacity: 0.6; }
.bp-probwrap { display: flex; align-items: center; gap: 4px; width: 90px; }
.bp-probinput { text-align: right; }
.bp-probinput:disabled { opacity: 0.5; }
.bp-pct { font-size: 13px; color: var(--bp-muted); }

/* Service editor */
.bp-svc { border: 1px solid var(--bp-line); border-radius: 11px; padding: 10px; margin-bottom: 8px; }
.bp-svc__head { display: flex; gap: 8px; margin-bottom: 6px; }
.bp-svc__name { font-weight: 600; }
.bp-svc__desc { min-height: 46px; resize: vertical; font-size: 13px; }

/* Currency / FX editor */
.bp-fxrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--bp-line-soft); }
.bp-fxrow__code { width: 132px; min-width: 132px; }
.bp-fxrow__name { font-size: 12px; }
.bp-fxrow__eq { font-size: 13px; color: var(--bp-muted); }
.bp-fxrow__rate { font-family: var(--bp-mono); width: 110px; }
.bp-fxrow__rate:disabled { opacity: 0.5; }
.bp-fxrow__src { font-size: 11.5px; color: var(--bp-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-left: auto; }
.bp-fxfoot { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.bp-fxmsg { font-size: 13px; color: var(--bp-sub); }

/* Flat editable lists (salespeople / sources / sizes / loss) */
.bp-editrow { display: flex; gap: 8px; margin-bottom: 6px; }
.bp-editadd { display: flex; gap: 8px; margin-top: 8px; }

/* Pipeline rules */
.bp-setfoot { display: flex; align-items: center; gap: 10px; }
.bp-savedpill { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--bp-green); }

/* Team & access */
.bp-teamrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--bp-line-soft); }
.bp-teamrow__id { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.bp-teamrow__email { font-size: 14px; font-weight: 600; word-break: break-all; }
.bp-teamrow__you, .bp-teamrow__tag { font-size: 12.5px; }
.bp-inviteadd { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
