/* ---------------------------------------------------------------------------
   Opportunities depth pass (GHL-TEARDOWN-OPPORTUNITIES.md): the record
   drawer (orx-*), the pipelines page and editor (ppl-*), and the board's
   quick actions, smart tags, stage colours and drop zones.
--------------------------------------------------------------------------- */

.g-btn.is-danger { background: #d92d20; border-color: #d92d20; color: #fff; }
.g-btn.is-danger:hover:not(:disabled) { background: #b42318; border-color: #b42318; }

/* ---------- record drawer ---------- */
.orx-backdrop { position: fixed; inset: 0; background: rgba(16, 24, 40, 0); z-index: 60; transition: background .15s; }
.orx-backdrop.is-open { background: rgba(16, 24, 40, .35); }
.orx {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(1040px, 100vw);
  background: var(--surface); display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(16, 24, 40, .18);
  transform: translateX(24px); opacity: 0; transition: transform .15s, opacity .15s;
}
.orx-backdrop.is-open .orx { transform: none; opacity: 1; }
.orx-head { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.orx-crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; }
.orx-crumb.is-current { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.orx-grow { flex: 1; }
.orx-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 7px;
  border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 0 4px;
}
.orx-iconbtn:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.orx-iconbtn:disabled { opacity: .35; cursor: default; }
.orx-ico { display: inline-flex; }
.orx-split { flex: 1; display: flex; min-height: 0; }
.orx-main { flex: 1; overflow-y: auto; min-width: 0; }
.orx-top { padding: 16px 22px 14px; border-bottom: 1px solid var(--line-soft); background: #fbfcfe; }
.orx-chip-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.orx-chip { font-size: 11.5px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 2px 8px; }
.orx-name { width: 100%; border: 1px solid transparent; border-radius: 7px; font: 600 20px/28px Inter, system-ui, sans-serif; padding: 2px 6px; margin-left: -6px; background: none; color: var(--text); }
.orx-name:hover, .orx-name:focus { border-color: var(--line); background: var(--surface); outline: none; }
.orx-topgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 12px; }
.orx-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.orx-label { font-size: 12.5px; font-weight: 500; color: #475467; }
.orx-input {
  width: 100%; box-sizing: border-box; border: 1px solid #d0d5dd; border-radius: 8px; padding: 7px 10px; font: 14px/20px Inter, system-ui, sans-serif;
  background: var(--surface); color: var(--text);
}
.orx-input:focus { outline: none; border-color: #84adff; box-shadow: 0 0 0 3px #d1e0ff; }
.orx-input.orx-narrow { width: auto; min-width: 140px; }
.orx-money { display: flex; align-items: center; border: 1px solid #d0d5dd; border-radius: 8px; overflow: hidden; background: var(--surface); }
.orx-money .orx-input { border: 0; box-shadow: none; }
.orx-cur { padding: 0 8px; color: var(--muted); font-size: 12.5px; border-right: 1px solid var(--line); }
.orx-progress { display: flex; gap: 4px; margin-top: 6px; overflow-x: auto; padding-bottom: 2px; }
.orx-step {
  flex: 1; min-width: 96px; border: 0; border-radius: 6px; background: #eaecf0; color: #475467; font-size: 12px; padding: 6px 8px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; cursor: pointer; text-align: left;
}
.orx-step.is-done { background: #d1e0ff; color: #1d4ed8; }
.orx-step.is-current { background: var(--brand); color: #fff; }
.orx-step-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.orx-step-tag { font-size: 10.5px; opacity: .85; }
.orx-body { padding: 18px 22px 40px; }
.orx-rail { width: 76px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; padding: 10px 6px; background: #fbfcfe; overflow-y: auto; }
.orx-rail-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; border-radius: 8px;
  padding: 8px 2px; color: var(--muted); cursor: pointer; font-size: 10.5px;
}
.orx-rail-item:hover { background: var(--hover); color: var(--text); }
.orx-rail-item.is-active { background: var(--brand-soft); color: var(--brand); }
.orx-rail-count { position: absolute; top: 3px; right: 10px; background: var(--brand); color: #fff; border-radius: 9px; font-size: 10px; min-width: 16px; padding: 0 4px; line-height: 16px; }
.orx-foot { display: none; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.orx-foot.is-dirty { display: flex; }
.orx-unsaved { font-weight: 600; color: #b54708; }
.orx-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.orx-panel-title { font-size: 16px; font-weight: 600; flex: 1; }
.orx-section { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 4px; margin-bottom: 14px; }
.orx-section-title { font-size: 13px; font-weight: 600; color: var(--text); margin: 10px 0 10px; }
.orx-section > .orx-section-title { margin-top: 0; }
.orx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.orx-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.orx-dim { color: var(--muted); font-size: 12.5px; }
.orx-p { margin: 0 0 10px; color: #344054; font-size: 14px; }
.orx-req { color: #d92d20; }
.orx-tags, .orx-followers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.orx-tag { display: inline-flex; align-items: center; gap: 4px; background: #f2f4f7; border: 1px solid #eaecf0; border-radius: 14px; padding: 2px 9px; font-size: 12px; }
.orx-x { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 0 0 2px; font-size: 14px; line-height: 1; }
.orx-add { width: auto; min-width: 150px; }
.orx-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.orx-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.orx-check.is-clash { color: #d92d20; font-weight: 600; }
.orx-meta { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 13px; padding-top: 6px; }
.orx-compose { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.orx-task-form { flex-direction: row; flex-wrap: wrap; align-items: center; }
.orx-task-form .orx-input { flex: 1; min-width: 150px; }
.orx-note, .orx-task, .orx-appt, .orx-pay, .orx-assoc, .orx-msg { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; }
.orx-note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.orx-note-body { white-space: pre-wrap; font-size: 14px; }
.orx-scope { font-size: 11px; font-weight: 600; background: #f2f4f7; color: #475467; border-radius: 6px; padding: 1px 7px; text-transform: capitalize; }
.orx-task { display: flex; align-items: center; gap: 10px; }
.orx-task-main { flex: 1; }
.orx-task.is-done .orx-task-title { text-decoration: line-through; color: var(--muted); }
.orx-appt, .orx-pay, .orx-assoc { display: flex; align-items: center; gap: 10px; }
.orx-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; flex-shrink: 0; }
.orx-msg.is-in { background: #f9fafb; }
.orx-msg.is-out { background: var(--brand-soft); }
.orx-empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: 13.5px; }
.orx-loading { color: var(--muted); padding: 20px; }
.orx-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.orx-seg button { border: 0; background: var(--surface); padding: 6px 12px; cursor: pointer; font-size: 13px; }
.orx-seg button.is-on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.orx-menu { position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 40, .16); padding: 6px; width: 220px; }
.orx-menu-head { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); padding: 6px 8px 4px; }
.orx-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; text-align: left; padding: 7px 8px; border-radius: 7px; cursor: pointer; font-size: 13.5px; color: var(--text); }
.orx-menu-item:hover:not(:disabled) { background: var(--hover); }
.orx-menu-item:disabled { opacity: .45; cursor: default; }
.orx-menu-item.is-danger { color: #d92d20; }
.orx-lr, .orx-cpick { position: relative; display: flex; align-items: center; gap: 4px; }
.orx-lr-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 90; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 24px rgba(16, 24, 40, .14); margin-top: 4px; max-height: 240px; overflow-y: auto; padding: 4px; }
.orx-lr-menu.is-open { display: block; }
.orx-lr-opt { display: block; width: 100%; border: 0; background: none; text-align: left; padding: 7px 9px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.orx-lr-opt:hover { background: var(--hover); }
.orx-lr-opt.is-create { color: var(--brand); font-weight: 600; }
.orx-lr-empty { padding: 8px 9px; color: var(--muted); font-size: 13px; }
.orx-form-section { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 4px 0 12px; }

/* ---------- board additions ---------- */
.oppo { cursor: pointer; }
.oppo.can-drag { cursor: grab; -webkit-touch-callout: none; }
/* The card in flight (public/opportunities-drag.js) and the board under it. */
.oppo-ghost { position: fixed; left: 0; top: 0; z-index: 70; margin: 0; pointer-events: none; cursor: grabbing; box-shadow: 0 12px 28px rgba(16, 24, 40, .18); opacity: .95; will-change: transform; }
body.oppo-dragging, body.oppo-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.oppo.dragging { opacity: .35; }
.oppo.moving { opacity: .6; pointer-events: none; }
.col.collapsed.over { outline: 2px dashed var(--brand); outline-offset: -2px; }
.oppo.compact { padding: 8px 10px; }
.oppo.compact .oppo-field { margin-top: 3px; }
.oppo.tinted { background: color-mix(in srgb, var(--stage) 10%, white); border-color: color-mix(in srgb, var(--stage) 35%, white); }
.oppo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--stage, var(--brand)); flex-shrink: 0; margin-top: 5px; }
.col.has-color { border-top: 3px solid var(--stage); }
.col-name .oppo-dot { margin-top: 0; }
.oppo-smart { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.oppo-quick { display: flex; gap: 4px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.oppo-qa { position: relative; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; width: 30px; height: 26px; cursor: pointer; color: var(--muted); font-size: 13px; }
.oppo-qa:hover:not(:disabled) { color: var(--brand); border-color: #b2ccff; }
.oppo-qa:disabled { opacity: .4; cursor: default; }
.oppo-qa-count { position: absolute; top: -7px; right: -7px; background: var(--brand); color: #fff; border-radius: 9px; font-size: 9.5px; min-width: 15px; line-height: 15px; padding: 0 3px; }
.ppl-tag { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 1px 8px; color: var(--tag, #2563eb); background: color-mix(in srgb, var(--tag, #2563eb) 12%, white); border: 1px solid color-mix(in srgb, var(--tag, #2563eb) 30%, white); }
button.ppl-tag { cursor: pointer; }
.board-wrap { position: relative; }
/* Every stage is a full-height lane, as on GHL's board, so a short stage
   still shows where a dragged card can go. */
.board-wrap .board { align-items: stretch; }
.oppo-dropzones { display: none; position: fixed; left: calc(var(--rail-w) + 24px); right: 24px; bottom: 18px; z-index: 40; gap: 12px; }
body.oppo-dragging .oppo-dropzones { display: flex; }
.oppo-zone { flex: 1; height: 64px; border-radius: 10px; display: grid; place-content: center; font-weight: 700; letter-spacing: .04em; border: 2px dashed; }
.oppo-zone.lost { background: #fef3f2; color: #d92d20; border-color: #fda29b; }
.oppo-zone.abandoned { background: #eff8ff; color: #1570ef; border-color: #84caff; }
.oppo-zone.won { background: #ecfdf3; color: #039855; border-color: #6ce9a6; }
.oppo-zone.over { filter: brightness(.95); border-style: solid; }
.ol-row { cursor: pointer; }
.ol-row:hover td { background: var(--hover); }

/* ---------- pipelines ---------- */
.ppl-empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ppl-empty-title { font-size: 17px; font-weight: 600; }
.ppl-nomatch { text-align: center; padding: 26px; }
.ppl-grip { color: var(--dim); cursor: grab; width: 24px; }
tr.ppl-over td { background: var(--brand-soft); }
.ppl-acts { display: flex; gap: 2px; }
.ppl-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 14px; }
.ppl-tabs button { border: 0; background: none; padding: 8px 12px; cursor: pointer; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; }
.ppl-tabs button.is-on { color: var(--brand); border-bottom-color: var(--brand); }
.ppl-stage-head { display: flex; align-items: center; gap: 10px; }
.ppl-stage-head .grow { flex: 1; }
.ppl-stages td { vertical-align: middle; }
.ppl-move { white-space: nowrap; width: 64px; }
.ppl-color { width: 36px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.ppl-prob { display: flex; align-items: center; gap: 4px; width: 90px; }
.ppl-opts { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.ppl-modes { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0; }
.ppl-preview { margin-top: 8px; }
.ppl-preview-card { width: 260px; background: #eef1f5; border-radius: 10px; padding: 10px; margin-top: 6px; }
.ppl-preview-card.mode-dot .ppl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--stage); display: inline-block; margin-right: 6px; }
.ppl-preview-card.mode-bgTint .ppl-preview-opp { background: color-mix(in srgb, var(--stage) 10%, white); }
.ppl-preview-stage { font-weight: 600; font-size: 13px; }
.ppl-preview-opp { background: var(--surface); border-radius: 8px; padding: 8px; margin-top: 8px; display: flex; gap: 8px; align-items: center; }
.ppl-tags table { margin-top: 8px; }
.ppl-prebuilt { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.ppl-tag.is-prebuilt { padding: 4px 10px; }
.ppl-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.ppl-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.ppl-swatch.is-on { border-color: var(--text); box-shadow: 0 0 0 2px #fff inset; }
.ppl-rule { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.ppl-rule-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; }
.ppl-rule-row .grow { flex: 1; }
.ppl-subs { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.ppl-warn { margin: 0 0 14px; padding-left: 18px; color: #344054; font-size: 14px; }
.ppl-setting { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.ppl-card-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.ppl-card-preview { margin-top: 6px; cursor: default; }
.ppl-modal .gcs-modal-body { max-height: calc(100vh - 220px); overflow-y: auto; }

@media (max-width: 720px) {
  .orx-rail { width: 56px; }
  .orx-rail-label { display: none; }
  .orx-two, .ppl-card-grid { grid-template-columns: 1fr; }
  .oppo-dropzones { left: 12px; right: 12px; }
}

/* Inside a modal the body scrolls and clips, so the picker's list opens in
   the flow instead of floating over it. */
.gcs-modal .orx-lr, .gcs-modal .orx-cpick { flex-wrap: wrap; }
.gcs-modal .orx-lr-menu { position: static; flex-basis: 100%; box-shadow: none; }
.orx-cpick > .orx-input, .orx-lr > .orx-input { flex: 1; min-width: 0; }
.ppl-card-preview .oppo-qa { width: auto; padding: 0 7px; font-size: 11px; }
.oppo-qa { display: inline-flex; align-items: center; justify-content: center; }

/* The board's ⋮, GHL's OpportunitiesActionMenu: icon, label, and an arrow on
   an item that leaves the board. */
.ol-more { padding: 6px; }
.ol-more-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: none; color: #344054; font: 14px/20px Inter, system-ui, sans-serif; text-align: left; cursor: pointer; }
.ol-more-item:hover:not(:disabled) { background: #f2f4f7; }
.ol-more-item:disabled { opacity: .5; cursor: not-allowed; }
.ol-more-item .grow { flex: 1; }
.ol-more-item svg { flex-shrink: 0; color: #475467; }

/* GHL's Create pipeline modal (openCreatePipeline): name, two option cards,
   then the stages table with Show in reports and Probability. */
.ppl-create .gcs-modal-body { max-height: calc(100vh - 230px); padding-right: 4px; }
.ppl-create .orx-input { height: 36px; border-radius: 4px; padding: 0 10px; }
.ppl-create .orx-input.is-err, .ppl-create .orx-input.is-err:focus { border-color: #f04438; box-shadow: 0 0 0 3px #fee4e2; }
.ppl-create .ppl-cr-name { margin-bottom: 12px; }
.ppl-create .ppl-cr-name .gcs-label { margin-bottom: 6px; }
.ppl-req { color: #f04438; margin-left: -2px; }
.ppl-cr-err { color: #f04438; font-size: 13px; line-height: 18px; margin-top: 6px; min-height: 0; }
.ppl-cr-err:empty { display: none; }
.ppl-cr-card { display: flex; align-items: center; gap: 24px; border: 1px solid #eaecf0; border-radius: 8px; padding: 18px 20px; margin-bottom: 16px; }
.ppl-cr-card .grow { flex: 1; min-width: 0; }
.ppl-cr-card-title { font-size: 14px; font-weight: 600; color: #101828; }
.ppl-cr-card-desc { font-size: 13px; line-height: 18px; color: #475467; margin-top: 2px; }
.ppl-cr-tiles { display: flex; gap: 8px; flex-shrink: 0; }
.ppl-cr-tile { width: 142px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; cursor: pointer; font: inherit; }
.ppl-cr-tile:hover { border-color: #84adff; }
.ppl-cr-tile.is-on { border: 2px solid #155eef; padding: 11px 7px; }
.ppl-cr-tile-stage { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #101828; }
.ppl-cr-tile-stage.mode-bgTint { background: #eff4ff; border-radius: 4px; padding: 2px 8px; }
.ppl-cr-dot { width: 8px; height: 8px; border-radius: 50%; background: #155eef; }
.ppl-cr-tile-label { font-size: 13px; color: #475467; }
.ppl-cr-tile.is-on .ppl-cr-tile-label { color: #155eef; }
.ppl-cr-stages-head { display: flex; align-items: center; margin: 8px 0 10px; }
.ppl-cr-stages-head .grow { flex: 1; }
.ppl-cr-stages-title { font-size: 16px; font-weight: 600; color: #101828; }
.ppl-cr-add { font-weight: 600; color: #155eef; }
.ppl-cr-box { border: 1px solid #eaecf0; border-radius: 8px; padding: 12px 16px 16px; }
.ppl-cr-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 188px 150px 36px; align-items: center; gap: 14px; padding: 6px 0; border-radius: 6px; }
.ppl-cr-row.is-head { font-size: 14px; font-weight: 500; color: #344054; padding: 0 0 4px; }
.ppl-cr-row.is-head > span { display: inline-flex; align-items: center; gap: 6px; }
.ppl-cr-row.is-over { box-shadow: inset 0 2px 0 #155eef; }
.ppl-cr-row.is-dragging { opacity: .5; }
.ppl-cr-grip { color: #98a2b3; cursor: grab; display: inline-flex; }
.ppl-cr-namecell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ppl-cr-namecell .ppl-color { flex-shrink: 0; width: 36px; height: 36px; }
.ppl-create .ppl-prob { width: auto; gap: 8px; }
.ppl-create .ppl-prob .orx-input { width: 110px; }
.ppl-create .ppl-prob .orx-input:disabled { background: #f9fafb; color: #98a2b3; }
.ppl-reports { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 36px; padding: 0 10px; border: 1px solid #d0d5dd; border-radius: 4px; background: #fff; color: #475467; cursor: pointer; font: inherit; }
.ppl-reports:hover, .ppl-reports.is-open { border-color: #84adff; }
.ppl-reports.is-open > .orx-ico { transform: rotate(180deg); }
.ppl-reports-icons { display: inline-flex; align-items: center; gap: 14px; }
.ppl-reports .orx-ico, .ppl-reports-item .orx-ico { display: inline-flex; }
.ppl-reports-menu { position: fixed; z-index: 1100; background: #fff; border: 1px solid #eaecf0; border-radius: 6px; box-shadow: 0 12px 24px rgba(16, 24, 40, .14); padding: 4px; }
.ppl-reports-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 4px; background: none; color: #344054; font: 14px/20px Inter, system-ui, sans-serif; cursor: pointer; text-align: left; white-space: nowrap; }
.ppl-reports-item:hover { background: #f2f4f7; }
.ppl-reports-item.is-on { background: #f5f8ff; }
.ppl-reports-item.is-on > .orx-ico:last-child { color: #155eef; }
.ppl-reports-item .grow { flex: 1; }

@media (max-width: 760px) {
  .ppl-cr-card { flex-direction: column; align-items: flex-start; }
  .ppl-cr-tiles { flex-wrap: wrap; }
  .ppl-cr-row { grid-template-columns: 20px minmax(0, 1fr) 36px; }
  .ppl-cr-row.is-head > span:nth-child(3), .ppl-cr-row.is-head > span:nth-child(4) { display: none; }
  .ppl-cr-row > .ppl-reports, .ppl-cr-row > .ppl-prob { grid-column: 2; }
}

/* "Add new opportunity", GHL's OpportunityModelV2: the section list and
   "Manage fields" on the left, the form beside it, scrolling on its own. */
.orx-create .gcs-modal-body { margin-top: 0; overflow: hidden; }
.orx-create .gcs-modal-foot { border-top: 1px solid var(--line); padding-top: 20px; }
.orx-cr { display: flex; min-height: 0; height: min(620px, calc(88vh - 210px)); }
.orx-cr-nav { position: relative; flex: 0 0 190px; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 12px 0; border-right: 1px solid var(--line); }
.orx-cr-navlist { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.orx-cr-navitem { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; }
.orx-cr-navitem:hover { background: var(--hover); }
.orx-cr-navitem.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.orx-cr-manage { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 4px; color: var(--brand); font-size: 13px; font-weight: 500; cursor: pointer; }
.orx-cr-manage:hover { text-decoration: underline; }
.orx-cr-pop { position: absolute; left: 0; right: 8px; bottom: 44px; z-index: 5; max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 24px rgba(16, 24, 40, .14); }
.orx-cr-pop-title { font-size: 13px; font-weight: 600; color: var(--text); }
.orx-cr-pop-hint { font-size: 12px; line-height: 1.4; }
.orx-cr-main { flex: 1; min-width: 0; overflow-y: auto; padding: 4px 4px 8px 20px; }
.orx-cr-sec + .orx-cr-sec { margin-top: 4px; }
.orx-cr-head { font-size: 14px; font-weight: 600; color: var(--text); padding: 14px 0 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.orx-cr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.orx-cr-grid > .is-full { grid-column: 1 / -1; }
/* The form scrolls on its own, so here the pickers' lists can float over it
   again (a list near the bottom grows the scroll instead of being cut off). */
.orx-create .orx-cpick, .orx-create .orx-lr { flex-wrap: nowrap; }
.orx-create .orx-lr-menu { position: absolute; box-shadow: 0 10px 24px rgba(16, 24, 40, .14); }
.orx-create .gcs-field { margin-bottom: 18px; }
.orx-create .gcs-label { font-size: 13px; margin-bottom: 6px; }
.orx-money-sym { padding: 0 0 0 10px; color: var(--text); font-size: 14px; white-space: nowrap; }
.orx-mpick { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 36px; box-sizing: border-box; padding: 3px 28px 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: text; }
.orx-mpick::after { content: ''; position: absolute; right: 12px; top: 13px; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.orx-mpick.is-focus { border-color: #84adff; box-shadow: 0 0 0 3px #d1e0ff; }
.orx-mpick-chips { display: contents; }
/* GHL's date picker: the field, then the month panel floating on the page. */
.orx-dp { display: flex; align-items: center; gap: 6px; height: 36px; box-sizing: border-box; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: 14px/20px Inter, system-ui, sans-serif; cursor: pointer; }
.orx-dp:hover { border-color: #84adff; }
.orx-dp.is-open, .orx-dp:focus-visible { outline: none; border-color: #84adff; box-shadow: 0 0 0 3px #d1e0ff; }
.orx-dp-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orx-dp.is-empty .orx-dp-text { color: var(--muted); }
.orx-dp > .orx-ico { display: inline-flex; color: var(--muted); }
.orx-dp-clear { display: none; align-items: center; border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer; }
.orx-dp:not(.is-empty):hover > .orx-dp-clear { display: inline-flex; }
.orx-dp:not(.is-empty):hover > .orx-ico { display: none; }
.orx-dp-pop { position: fixed; z-index: 1100; width: 260px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 28px rgba(16, 24, 40, .18); font: 13px/18px Inter, system-ui, sans-serif; }
.orx-dp-hd { display: flex; align-items: center; gap: 2px; padding: 10px 10px 6px; }
.orx-dp-nav { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; border-radius: 4px; background: none; color: var(--muted); cursor: pointer; }
.orx-dp-nav:hover { background: var(--hover); color: var(--text); }
.orx-dp-title { flex: 1; text-align: center; font-weight: 600; }
.orx-dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; padding: 0 10px 8px; }
.orx-dp-wd { text-align: center; font-size: 12px; padding: 6px 0; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.orx-dp-day { position: relative; height: 28px; border: 0; border-radius: 4px; background: none; color: var(--brand); font: inherit; cursor: pointer; }
.orx-dp-day.is-out { color: var(--muted); opacity: .7; }
.orx-dp-day:hover { background: var(--hover); }
.orx-dp-day.is-today::after { content: ''; position: absolute; top: 3px; right: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); }
.orx-dp-day.is-on { background: var(--brand); color: #fff; opacity: 1; }
.orx-dp-day.is-on.is-today::after { background: #fff; }
.orx-dp-ft { display: flex; justify-content: flex-end; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line-soft); }
.orx-dp-btn { border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); padding: 1px 8px; font: 12px/20px Inter, system-ui, sans-serif; cursor: pointer; }
.orx-dp-btn:hover { border-color: var(--brand); color: var(--brand); }
.orx-mpick-input { flex: 1; min-width: 80px; border: 0; outline: none; background: none; font: 14px/20px Inter, system-ui, sans-serif; color: var(--text); padding: 4px 2px; }
@media (max-width: 720px) {
  .orx-cr { flex-direction: column; height: auto; max-height: calc(88vh - 200px); }
  .orx-cr-nav { flex: none; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 8px; }
  .orx-cr-navlist { flex-direction: row; overflow-x: auto; }
  .orx-cr-pop { top: 100%; bottom: auto; }
  .orx-cr-main { padding-left: 0; }
  .orx-cr-grid { grid-template-columns: 1fr; }
}

/* Settings › Opportunities & Pipelines (renderOpportunitySettingsPage): the
   two tabs under the title, then either GHL's "Customize opportunity
   settings" card or the pipelines list. Theme variables throughout, so the
   light and dark themes (daylight.css, midnight.css) both carry it. */
.set-page.is-flush .ops-page { margin: 0; }
.ops-page .gcs-body.ops-body { padding: 24px 32px 40px; }
.ops-page .gcs-body.is-pipelines .page-body { padding: 0; }
.ops-h1 { font-size: 30px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); margin: 8px 0 28px; line-height: 1.2; }
.ops-card { max-width: 912px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 24px 16px; box-shadow: var(--shadow); }
.ops-row { padding: 16px 0; }
.ops-row-switch { display: flex; align-items: flex-start; gap: 18px; }
.ops-row-switch .gcs-switch { margin-top: 2px; width: 48px; height: 26px; }
.ops-row-switch .gcs-switch .gcs-slider::before { width: 20px; height: 20px; }
.ops-row-switch .gcs-switch input:checked + .gcs-slider::before { transform: translateX(22px); }
.ops-switch-text { min-width: 0; }
.ops-label { font-size: 16px; line-height: 24px; color: var(--text); }
.ops-link { background: none; border: 0; padding: 0; font: inherit; font-size: 16px; line-height: 24px; color: var(--ghl-blue, var(--brand)); cursor: pointer; text-align: left; }
.ops-link:hover { text-decoration: underline; }
.ops-more { margin: 6px 0 2px; padding: 10px 12px; border-radius: 8px; background: var(--hover); color: var(--text); font-size: 14px; line-height: 20px; max-width: 720px; }
.ops-desc { font-size: 16px; line-height: 24px; color: var(--muted); }
.ops-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; position: relative; }
.ops-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.ops-check-box { width: 20px; height: 20px; border: 1.5px solid var(--dim); border-radius: 5px; background: var(--surface); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; transition: background 0.12s, border-color 0.12s; }
.ops-check input:checked + .ops-check-box { background: var(--ghl-blue, var(--brand)); border-color: var(--ghl-blue, var(--brand)); }
.ops-check input:checked + .ops-check-box::after { content: ''; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.ops-check input:focus-visible + .ops-check-box { box-shadow: 0 0 0 3px var(--ghl-blue-soft, var(--brand-soft)); }
.ops-check input:disabled + .ops-check-box { opacity: 0.5; cursor: not-allowed; }
.ops-check + .ops-desc { margin-left: 30px; }
.ops-info { color: var(--muted); display: inline-flex; margin-left: 2px; }
.ops-foot { display: flex; justify-content: flex-end; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line); }
.ops-foot .g-btn { min-width: 150px; height: 44px; font-size: 16px; }
.ops-foot .g-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ops-modal .ops-h1 { display: none; }
.ops-modal .ops-card { border: 0; box-shadow: none; padding: 0; }
.ops-modal .ops-body { padding: 0; }

/* The pipelines table's column glyphs, the time of "Updated on", and the
   page number between Previous and Next. */
.ppl-table th { color: var(--text); font-size: 14px; font-weight: 500; }
.ppl-th-ico { display: inline-flex; vertical-align: -3px; margin-right: 6px; color: var(--muted); }
.ppl-when-time { color: var(--muted); }
.ppl-page-no { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--ghl-blue, var(--brand)); border-radius: 6px; color: var(--text); font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .ops-page .gcs-body.ops-body { padding: 16px; }
  .ops-h1 { font-size: 24px; }
  .ops-card { padding: 4px 16px 12px; }
}
