/* Business (client) portal pages. Colours and fonts come from portal.css. */
.cl label { margin-top: 12px; font-weight: 500; font-size: 13.5px; display: block; }
.cl input, .cl textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); width: 100%; font: inherit; color: var(--tx); }
.cl input:focus, .cl textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cl input { height: 40px; }
.cl textarea { resize: vertical; min-height: 90px; }
.gate-title { margin: 0 0 4px; }
button.mt { margin-top: 16px; }
.view { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.page-head .r { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.alert { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; font-weight: 600; }
.problems { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.problems li { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 8px 12px; }
.scroll { overflow-x: auto; margin-top: 12px; }
.kb-row { display: grid; grid-template-columns: minmax(230px, 2.2fr) 112px 104px 104px 76px 100px; gap: 12px; align-items: center; padding: 12px 2px; min-width: 760px; }
.kb-row + .kb-row { border-top: 1px solid var(--line); }
.kb-row.head { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--mu); padding-block: 6px; }
.kb-row input { height: 38px; margin: 0; }
.kb-row .nm { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kb-row .name { font-weight: 600; }
.kb-row .after { font-weight: 650; font-variant-numeric: tabular-nums; }
.kb-row input:disabled { opacity: 0.6; }
.recent-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.when { font-size: 12px; color: var(--mu); white-space: nowrap; }
#kb-discount, #kb-group { max-width: 240px; }

.kb-row .f { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; }
.kb-row .fl { display: none; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--mu); }
@media (max-width: 960px) {
  .scroll { overflow: visible; }
  .kb-row.head { display: none; }
  .kb-row { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; gap: 12px; padding: 16px 0; }
  .kb-row .nm { grid-column: 1 / -1; }
  .kb-row .fl { display: block; }
  .kb-row .f.wide { grid-column: 1 / -1; }
}

/* ---- home layout (reference E) ---- */
.ws-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; margin: 0 0 12px; }
.ws-logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); }
.ws-logo img { width: 100%; height: 100%; object-fit: cover; }
.ws-t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ws-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-t span { font-size: 12px; color: var(--mu); }
.side-live { margin-top: auto; background: linear-gradient(160deg, #2f6bff, #6a4dff); color: #fff; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.side-live span { font-size: 12px; opacity: .85; }
.userchip { display: inline-flex; align-items: center; gap: 9px; margin-left: 6px; }
.userchip .who { display: flex; flex-direction: column; line-height: 1.2; }
.userchip .who span { font-size: 12px; color: var(--mu); }
.kpi.h { flex-direction: row; align-items: center; gap: 14px; padding: 16px; }
.kpi.h .ic { width: 44px; height: 44px; border-radius: 12px; margin: 0; }
.kpi.h .ic svg { width: 22px; height: 22px; }
.ic.green { background: #dcfce7; color: #16a34a; } .ic.blue { background: #dbeafe; color: #2f6bff; }
.ic.purple { background: #ede9fe; color: #7c3aed; } .ic.orange { background: #ffedd5; color: #ea580c; }
.kpi.h .kb { min-width: 0; }
.kpi.h .v { font-size: 22px; margin: 0; }
.kpi.h .l { font-size: 12.5px; }
.grid2e { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.rows .thumb { width: 46px; height: 36px; border-radius: 8px; }
.ring-wrap .rows { flex: 1 1 160px; min-width: 0; }
@media (max-width: 960px) { .grid2e { grid-template-columns: minmax(0, 1fr); } .side-live, .ws-card { display: none; } .userchip .who { display: none; } .kpi.h { padding: 12px; gap: 10px; } .kpi.h .ic { display: grid; width: 38px; height: 38px; } }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border-radius: 99px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; background: var(--accent-soft); color: var(--mu); }
.chip.new { background: #dbeafe; color: #1d4ed8; } .chip.confirmed { background: var(--ok-bg); color: var(--ok); } .chip.cancelled { background: var(--bad-bg); color: var(--bad); }
.bk select { width: 150px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); font: inherit; color: var(--tx); }
.note-line { font-style: italic; }
@media (max-width: 960px) { .bk select { width: 100%; } }

.pw-form { display: grid; gap: 8px; max-width: 360px; }
.pw-form label { font-size: 12.5px; font-weight: 600; color: var(--mu); }
.pw-form input { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); font: inherit; color: var(--tx); }
.pw-form button { justify-self: start; margin-top: 4px; }
.pw-form .good { color: var(--ok); } .pw-form .bad { color: var(--bad); }
@media (max-width: 960px) { .pw-form input { font-size: 16px; } }

.flow { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; counter-reset: s; }
.flow li { flex: 1 1 150px; position: relative; background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; counter-increment: s; }
.flow li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-bottom: 4px; }
.flow li b { font-size: 13.5px; } .flow li span { font-size: 12.5px; color: var(--mu); }
.flow li.warn { background: var(--bad-bg); } .flow li.warn::before { background: var(--bad); }
.at-log { min-height: 180px; max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 0 10px; }
.at-msg { max-width: 82%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.at-msg.guest { align-self: flex-start; background: var(--field); border: 1px solid var(--line); }
.at-msg.bot { align-self: flex-end; background: #dbeafe; color: #0f172a; }
.at-msg small { display: block; margin-top: 4px; color: var(--bad); font-weight: 600; }
.at-form { display: flex; gap: 8px; }
.at-form input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); font: inherit; color: var(--tx); }
@media (max-width: 960px) { .at-form input { font-size: 16px; } }

/* ---- knowledge base ---- */
.kb-defaults { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 280px)); gap: 6px 24px; }
.kb-defaults .fld label { margin-top: 4px; }
.kb-defaults .fld input { margin-top: 6px; }
.kb-row .who { display: grid; gap: 4px; min-width: 0; }
.kb-row .who .sub { font-size: 12.5px; color: var(--mu); }
.kb-row .who input { height: 34px; font-size: 12.5px; }
.kb-row input[type=number] { text-align: right; }
.kb-row .after { display: inline-flex; align-items: center; height: 38px; padding: 0 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.kb-row .thumb { width: 52px; height: 52px; border-radius: 12px; }
#kb-state { margin: 0; padding: 9px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--tx); font-size: 13px; }
@media (max-width: 960px) { .kb-row .f.wide { grid-column: auto; } .kb-row .after { height: 40px; } }

/* ---- contacts ---- */
.ct-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.ct-tools input { flex: 1 1 240px; max-width: 360px; height: 38px; }
.seg-filter { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg-filter button { border: 1px solid var(--line); background: var(--panel); color: var(--mu); font-weight: 600; font-size: 12.5px; padding: 6px 12px; border-radius: 99px; }
.seg-filter button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cu-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--gap); align-items: start; }
.cu-wrap:has(#cu-panel[hidden]) { grid-template-columns: minmax(0, 1fr); }
.cu-head, .cu-btn { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) 90px minmax(130px, 1.2fr); gap: 12px; align-items: center; }
.cu-head { padding: 10px 12px; font-size: 12px; font-weight: 700; color: var(--mu); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.cu-rows > li.cu { padding: 0; }
.cu-btn { width: 100%; padding: 12px; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--tx); font: inherit; cursor: pointer; min-height: 56px; }
.cu-btn:hover, .cu-btn.sel { background: var(--accent-soft); }
.cu-btn.sel .av { background: var(--panel); }
.cu-btn .pill { white-space: nowrap; justify-self: start; }
.cu-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cu-who > div { min-width: 0; }
.cu-who b, .cu-who span.sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-who span.sub, .cu-last { font-size: 13px; color: var(--mu); }
.cu-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-panel { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 14px; }
.cu-panel[hidden] { display: none; }
.cu-top { display: flex; gap: 12px; align-items: center; }
.cu-top .av { width: 52px; height: 52px; font-size: 18px; }
.cu-top h3 { margin: 0; font-size: 18px; }
.cu-top p { margin: 2px 0 0; font-size: 13px; color: var(--mu); }
.cu-close { margin-left: auto; }
.cu-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cu-stats > div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; }
.cu-stats b { display: block; font-size: 18px; }
.cu-stats span { font-size: 12px; color: var(--mu); }
.cu-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cu-h { margin: 0; font-size: 12px; font-weight: 700; color: var(--mu); text-transform: uppercase; letter-spacing: .04em; }
.cu-tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cu-tl li { display: flex; gap: 10px; }
.cu-tl i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex: none; }
.cu-tl b { display: block; font-size: 14px; }
.cu-tl span { font-size: 13px; color: var(--mu); }
.cu-mem { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; white-space: pre-wrap; color: var(--mu); }
.cu-note textarea { width: 100%; min-height: 84px; resize: vertical; }
.cu-note .row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
@media (max-width: 960px) {
  .cu-wrap { grid-template-columns: minmax(0, 1fr); }
  .cu-head { display: none; }
  .cu-btn { grid-template-columns: minmax(0, 1fr) auto; }
  .cu-btn .cu-last, .cu-btn .cu-n { display: none; }
  .cu-panel { position: fixed; inset: 0; z-index: 30; border-radius: 0; overflow-y: auto; }
  .ct-tools input { max-width: none; font-size: 16px; }
}
.ct-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ct-act { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
button.sm { padding: 5px 12px; min-height: 32px; font-size: 12.5px; }
.btn-link { font-size: 12.5px; font-weight: 600; color: var(--accent); padding: 5px 8px; border-radius: 8px; }
.btn-link:hover { background: var(--accent-soft); }

/* ---- AI agent and team ---- */
.state { margin: 0; padding: 9px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--tx); font-size: 13px; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 8px; }
.seg-chip { border: 1px dashed var(--line); background: var(--panel); color: var(--accent); font-weight: 600; font-size: 12.5px; padding: 5px 11px; border-radius: 99px; }
.seg-chip:hover:not(:disabled) { background: var(--accent-soft); }
.seg-chip:disabled { opacity: .5; cursor: default; }
.flow.col { flex-direction: column; }
.flow.col li { flex: none; }
.tm-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 16px; align-items: end; }
.tm-form label { margin-top: 4px; }
.tm-form select, .tm-form input { margin-top: 6px; }
.tm-actions { display: flex; gap: 8px; }
.cl select { max-width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); font: inherit; color: var(--tx); }
.rows > li.tm { display: grid; grid-template-columns: 36px minmax(0, 1fr) 120px auto; gap: 12px; align-items: center; }
.tm-act { display: flex; gap: 8px; justify-content: flex-end; }
.tm-reset { grid-column: 2 / -1; display: flex; gap: 8px; align-items: center; }
.tm-reset input { max-width: 280px; height: 36px; }
@media (max-width: 960px) {
  .rows > li.tm { grid-template-columns: 36px minmax(0, 1fr); }
  .rows > li.tm select, .tm-act { grid-column: 1 / -1; }
  .tm-act { justify-content: flex-start; }
  .tm-reset { grid-column: 1 / -1; flex-wrap: wrap; }
  .tm-reset input, .tm-form input, .tm-form select, .cl select { font-size: 16px; max-width: none; }
}

/* ---- calendar, bookings and trips ---- */
.trips-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 4px; }
.trips-cols h4 { margin: 8px 0 2px; font-size: 13px; color: var(--mu); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--gap); align-items: start; }
.cal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cal-nav h3 { margin: 0; flex: 1; text-align: center; font-size: 16px; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--mu); margin: 4px 0 10px; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-pending { background: #f59e0b; } .lg-confirmed { background: #16a34a; } .lg-blocked { background: #94a3b8; } .lg-free { background: transparent; border: 1px dashed var(--mu); }
.cal-scroll { overflow-x: auto; }
.wk-grid { display: grid; grid-template-columns: 76px repeat(7, minmax(66px, 1fr)); min-width: 560px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.wk-grid > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wk-h { padding: 10px; font-size: 13px; font-weight: 700; background: var(--panel); color: var(--tx); }
.wk-h small { display: block; font-weight: 500; color: var(--mu); font-size: 12px; }
.wk-h.today { background: var(--accent-soft); color: var(--accent); }
.wk-h.past { opacity: .6; }
.wk-slot { padding: 12px 8px; font-size: 13px; font-weight: 600; background: var(--panel); position: sticky; left: 0; z-index: 1; }
.wk-slot small { display: block; font-weight: 500; color: var(--mu); }
.wk-c { padding: 6px; min-height: 84px; display: flex; flex-direction: column; gap: 6px; background: var(--panel); }
.wk-c.past { opacity: .6; }
.wk-c.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.wk-chip, .wk-free { width: 100%; text-align: left; border-radius: 10px; padding: 8px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 44px; }
.wk-chip { border: 0; color: #fff; }
.wk-chip small { display: block; font-weight: 500; font-size: 12px; opacity: .95; }
.wk-chip.s-confirmed { background: #15803d; } .wk-chip.s-pending { background: #b45309; } .wk-chip.s-blocked { background: #64748b; }
.wk-free { flex: 1; border: 1px dashed var(--line); background: transparent; color: var(--mu); font-weight: 500; font-size: 12px; text-align: center; }
.wk-free:hover { border-color: var(--accent); color: var(--accent); }
.wk-chip.on { outline: 3px solid var(--accent-soft); outline-offset: 1px; box-shadow: 0 0 0 2px var(--accent); }
.cal-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 16px; align-items: end; }
.cal-form label, .cal-form .lab { margin-top: 4px; font-weight: 500; font-size: 13.5px; display: block; }
.cal-form input, .cal-form select { margin-top: 6px; width: 100%; }
.cal-form-actions { display: flex; gap: 8px; }
.cal-checks { display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 8px; }
.cal-checks label.chk { margin: 0; display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.cal-checks input { width: auto; height: auto; margin: 0; }
.cal-day { position: sticky; top: 12px; }
.cal-day .rows > li.bkr { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
.cal-day .rows > li.bkr .ct-act, .cal-day .rows > li.bkr .cancel-panel { grid-column: 2 / -1; justify-content: flex-start; }
@media (max-width: 960px) {
  .cal-layout, .trips-cols { grid-template-columns: minmax(0, 1fr); }
  .cal-day { position: static; }
  .cal-form input, .cal-form select { font-size: 16px; }
  .rows > li.bkr, .cal-day .rows > li.bkr { grid-template-columns: minmax(0, 1fr) auto; }
  .cal-day .rows > li.bkr .slot-t { grid-column: 1 / -1; }
  .rows > li.bkr .ct-act, .cal-day .rows > li.bkr .ct-act { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .cal-day .rows > li.bkr .cancel-panel { grid-column: 1 / -1; }
}
.pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
@media (max-width: 720px) {
  .rows > li.bkr { grid-template-columns: minmax(0, 1fr); }
  .rows > li.bkr .pills, .rows > li.bkr .ct-act { grid-column: 1 / -1; justify-content: flex-start; }
  .cal-day .rows > li.bkr { grid-template-columns: minmax(0, 1fr); }
  .cal-day .rows > li.bkr .pills, .cal-day .rows > li.bkr .ct-act, .cal-day .rows > li.bkr .cancel-panel { grid-column: 1 / -1; }
}
.chip-tab { border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.chip-tab:hover { filter: brightness(.96); }
.chip-tab.on { border-color: currentColor; box-shadow: 0 0 0 2px var(--accent-soft); }
.chip-tab:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }

/* Account: activity, usage, privacy */
.acct-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 14px 0 18px; }
.acct-tab { appearance: none; background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 10px 18px; margin-bottom: -1px; font: inherit; font-weight: 500; color: var(--nav-tx); cursor: pointer; min-height: 44px; }
.acct-tab.on { color: var(--nav-on-tx); border-bottom-color: var(--accent); font-weight: 600; }
.acct-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ac-row .when { flex: 0 0 150px; color: var(--mu); font-size: 13px; }
.ac-row .what { flex: 1 1 240px; font-weight: 500; }
.ac-row .who { flex: 0 0 150px; color: var(--nav-tx); }
.us-bar { height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 6px 0; }
.us-bar span { display: block; height: 12px; background: var(--accent); width: 0; }
.note-box { border: 1px solid var(--bad); background: var(--bad-bg); color: var(--tx); border-radius: 12px; padding: 14px; margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.note-box p { margin: 0; }
button.danger { background: var(--bad); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
button.danger:disabled { opacity: 0.45; cursor: not-allowed; }
@media (max-width: 640px) { .ac-row .when, .ac-row .who { flex-basis: 100%; } }
#ac-activity, #ac-usage, #ac-privacy { display: flex; flex-direction: column; gap: 16px; }
#ac-activity[hidden], #ac-usage[hidden], #ac-privacy[hidden] { display: none; }

/* Offers */
.of-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 6px; }
.of-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; box-shadow: var(--shadow); text-align: left; padding: 0; color: inherit; font: inherit; }
.of-card:hover { border-color: var(--accent); }
.of-img { height: 120px; background: var(--accent-soft); display: grid; place-items: center; color: var(--mu); font-size: 12.5px; background-size: cover; background-position: center; }
.of-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.of-body h4 { margin: 0; font-size: 14.5px; }
.of-body p { margin: 0; font-size: 12.5px; color: var(--mu); }
.chip.live { background: var(--ok-bg); color: var(--ok); } .chip.draft { background: var(--accent-soft); color: var(--mu); } .chip.scheduled { background: #dbeafe; color: #1d4ed8; } .chip.expired { background: var(--bad-bg); color: var(--bad); } .chip.hidden { background: var(--accent-soft); color: var(--mu); }
.chips-row button.on { background: var(--accent); color: #fff; }
.oe-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 960px) { .oe-grid { grid-template-columns: minmax(0, 1fr); } }
.oe-form { gap: 12px; }
.oe-l { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.oe-l input:not([type=checkbox]), .oe-l textarea { font: inherit; font-weight: 400; }
.oe-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.oe-check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.oe-photo { display: flex; gap: 12px; align-items: center; font-weight: 400; }
.oe-photo img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.oe-preview { position: sticky; top: 12px; }
.phone { width: 300px; max-width: 100%; margin: 0 auto; border: 8px solid #1c2433; border-radius: 30px; background: #ece5dd; overflow: hidden; }
.ph-bar { background: #075e54; color: #fff; padding: 10px 12px; display: flex; gap: 8px; align-items: center; font-size: 13px; }
.ph-av { width: 26px; height: 26px; border-radius: 50%; background: #cfd8dc; }
.ph-chat { padding: 12px 10px 16px; display: flex; flex-direction: column; gap: 6px; min-height: 360px; }
.bub { max-width: 88%; padding: 7px 9px; border-radius: 9px; font-size: 12.5px; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,.12); color: #111; }
.bub.guest { align-self: flex-end; background: #d9fdd3; }
.bub.bot { align-self: flex-start; background: #fff; }
.bub img { width: 100%; border-radius: 6px; margin-bottom: 6px; display: block; }
.ph-title { font-weight: 700; margin-bottom: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ph-text, .ph-cond, .ph-until { white-space: pre-wrap; overflow-wrap: anywhere; }
.ph-cond, .ph-until { color: #555; font-size: 11.5px; margin-top: 4px; }
.bub-btn { align-self: flex-start; width: 88%; background: #fff; color: #0a7cff; text-align: center; padding: 7px; border-radius: 9px; font-size: 12.5px; font-weight: 600; box-shadow: 0 1px 1px rgba(0,0,0,.12); }

/* Automations */
.au-hero { background: #0f1b3d; color: #fff; border-radius: 22px; padding: 22px 24px; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.au-hero-l { flex: 1 1 320px; min-width: 0; } .au-hero h2 { margin: 0 0 4px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.au-hero p { margin: 0 0 14px; color: #c7d2ee; max-width: 520px; }
.au-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.au-tabs button { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; font-weight: 700; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.au-tabs button.on { background: #fff; color: #0f1b3d; }
.au-stats { flex: 1 1 340px; display: flex; gap: 10px; flex-wrap: wrap; }
.au-stat { flex: 1 1 110px; background: rgba(255,255,255,.1); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; }
.au-stat b { font-size: 26px; font-weight: 800; line-height: 1.1; } .au-stat span { font-size: 12px; color: #c7d2ee; }
.au-stat:nth-child(1) b { color: #7fe3c6; } .au-stat:nth-child(2) b { color: #9db8ff; } .au-stat:nth-child(3) b { color: #ffd27a; }
.au-steps { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 6px; padding: 6px 0; }
.au-node { flex: 1 1 120px; min-width: 110px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; background: none; border: 0; color: inherit; font: inherit; padding: 6px; border-radius: 16px; cursor: pointer; }
.au-node.static { cursor: default; }
.au-node .ico { width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; }
.au-node.sel .ico { box-shadow: 0 0 0 5px rgba(35,88,232,.25); }
.au-node small { color: #1b4fd1; font-weight: 700; font-size: 12px; } .au-node b { font-weight: 700; }
.au-link { flex: 0 1 26px; min-width: 8px; height: 3px; border-radius: 3px; background: #c9d3ea; margin-top: 30px; }
.au-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; margin-top: 16px; }
.au-edit { flex: 1 1 340px; min-width: 0; gap: 12px; } .au-edit-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 16px; }
.au-sw { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; min-height: 44px; } .au-sw input { width: 20px; height: 20px; }
.au-warn { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fde9b8; color: #6b3f00; font-size: 13px; }
.au-phonecol { flex: 0 0 292px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.au-guard { flex: 0 0 250px; max-width: 100%; } .au-guard p { margin: 0 0 10px; }
.au-chart, .au-feed { flex: 1 1 380px; min-width: 0; }
.au-bars { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; }
.au-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--mu); }
.au-bar .col { height: 150px; width: 100%; max-width: 46px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.au-bar i { display: block; } .au-feedlist { list-style: none; margin: 0; padding: 0; }
.au-feedlist li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.au-feedlist li > div { flex: 1; min-width: 0; } .au-feedlist .t { font-weight: 700; } .au-feedlist .s { font-size: 12.5px; color: var(--mu); overflow-wrap: anywhere; }
.chip.bad { background: var(--bad-bg); color: var(--bad); } .chip.blue { background: #e1eaff; color: #1b4fd1; }

.ct-consent { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 8px; }
.ct-consent input { flex: 1; min-width: 0; }

/* Broadcasts */
.bc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.bc-grid.open { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 960px) { .bc-grid.open { grid-template-columns: minmax(0, 1fr); } }
.bc-panel { display: flex; flex-direction: column; gap: 12px; }
.bc-panel select, .bc-panel input { font: inherit; width: 100%; }
.bc-sum { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.bc-sum b { font-weight: 700; }
.bc-sum .big { font-size: 20px; font-weight: 800; }
.rows > li.bc { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1.2fr) auto auto; gap: 12px; align-items: center; }
.bc-bar { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bc-bar > i { display: block; height: 8px; background: var(--accent); }
.bc-bar.done > i { background: var(--ok); }
.bc-bar.paused > i { background: var(--warn); }
@media (max-width: 720px) { .rows > li.bc { grid-template-columns: minmax(0, 1fr) auto; } .rows > li.bc > :nth-child(n+3) { grid-column: 1 / -1; } }
.wk-chip small { font-size: 11px; overflow-wrap: anywhere; }
.wk-c.closed { background: repeating-linear-gradient(135deg, var(--panel), var(--panel) 6px, var(--line) 6px, var(--line) 7px); opacity: .55; }

/* Analytics tabs and the owner's monthly report (B8c). Uses the theme variables so light and dark both work. */
.an-tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.an-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; margin-bottom: -1px; color: var(--mu); font-weight: 600; }
.an-tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.rp { display: flex; flex-direction: column; gap: var(--gap); }
.rp-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.rp-month { display: flex; align-items: center; gap: 10px; }
.rp-month-name { font-size: 18px; min-width: 9ch; text-align: center; }
.rp-step { min-width: 40px; min-height: 40px; font-size: 18px; line-height: 1; }
.rp-step:disabled { opacity: .4; cursor: default; }
.rp-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-print-head { display: none; }
.rp-warn { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; }
.rp-hero { padding: 24px; }
.rp-headline { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 600; letter-spacing: -0.2px; }
.rp-sub { margin: 8px 0 0; color: var(--mu); font-size: 14px; }
.rp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.rp-tile { gap: 2px; }
.rp-tile-label { color: var(--mu); font-size: 12.5px; font-weight: 600; }
.rp-tile-value { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.2; }
.rp-tile-note { color: var(--mu); font-size: 12px; }
.rp-funs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.rp-fun-sub { margin: -6px 0 10px; color: var(--mu); font-size: 12.5px; }
.rp-fun-row { margin-bottom: 10px; }
.rp-fun-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.rp-track { height: 10px; border-radius: 6px; background: var(--chart-c); overflow: hidden; }
.rp-fill { height: 100%; border-radius: 6px; }
.rp-fill.a { background: var(--chart-a); } .rp-fill.b { background: var(--chart-b); }
.rp-foot { color: var(--mu); font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.rp[dir="rtl"] { font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif; }
@media (max-width: 860px) { .rp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-funs { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .rp-tools { width: 100%; } .rp-tools button { flex: 1; } .rp-headline { font-size: 18px; } }
@media print {
  .side, .tb, .page-head, .an-tabs, .rp-bar, .toast { display: none !important; }
  body, .main, .shell { background: #fff !important; color: #000 !important; display: block !important; }
  .rp { gap: 10px; }
  .rp-print-head { display: flex !important; justify-content: space-between; border-bottom: 1px solid #999; padding-bottom: 6px; }
  .card { box-shadow: none; break-inside: avoid; border-color: #bbb; }
  .rp-track { background: #ddd !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rp-fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.rp-tile-value.rp-small { font-size: 17px; line-height: 1.5; }

/* ---- Leads board and pipeline (B10) ---- */
.ld-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ld-tools input[type=search] { width: 220px; }
.ld-tools select { height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); font: inherit; color: var(--tx); }
.ld-sum { display: flex; gap: 8px; flex-wrap: wrap; }
.ld-sum:empty { display: none; }
.ld-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--gap); align-items: start; }
.ld-wrap:has(#ld-panel[hidden]) { grid-template-columns: minmax(0, 1fr); }
.ld-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.ld-col { background: var(--panel2); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 120px; }
.ld-col.over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.ld-colh { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.ld-colh .n { margin-left: auto; color: var(--mu); }
.ld-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ld-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; cursor: grab; }
.ld-card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ld-open { background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 44px; }
.ld-top { display: flex; justify-content: space-between; gap: 8px; }
.ld-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-top .sub, .ld-foot .sub { font-size: 12px; color: var(--mu); white-space: nowrap; }
.ld-want { font-size: 13px; color: var(--mu); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ld-foot .av.none { background: var(--panel2); color: var(--mu); }
.ld-move { height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--field); color: var(--tx); font: inherit; font-size: 12.5px; }
.ld-tabs { display: none; gap: 6px; overflow-x: auto; }
.ld-tabs button { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--tx); font: inherit; white-space: nowrap; }
.ld-tabs button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.pill.st.new { background: var(--accent-soft); color: var(--accent); }
.pill.st.talking { background: var(--warn-bg); color: var(--warn); }
.pill.st.offer { background: #ede9fe; color: #5b21b6; }
.pill.st.booked { background: var(--ok-bg); color: var(--ok); }
.pill.st.lost { background: var(--panel2); color: var(--mu); }
.pill.fu.overdue { background: var(--bad-bg); color: var(--bad); }
.pill.fu.today, .pill.fu.quiet { background: var(--warn-bg); color: var(--warn); }
.pill.fu.tomorrow, .pill.fu.soon { background: var(--accent-soft); color: var(--accent); }
.pill.fu.none { background: var(--panel2); color: var(--mu); }
.pl-steps { display: flex; gap: 4px; flex-wrap: wrap; }
.pl-steps button { flex: 1 1 auto; min-height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--tx); font: inherit; font-size: 12.5px; cursor: pointer; }
.pl-steps button[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.pl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pl-grid select, .pl-grid input { width: 100%; height: 40px; }
.pl-grid select { padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); font: inherit; color: var(--tx); }
.pl-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.cu-lead { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.cu-lead .sub { font-size: 12px; color: var(--mu); }
.cu-pipe .cu-head, .cu-pipe .cu-btn { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 80px minmax(110px, 1fr) minmax(130px, 1fr); }
@media (pointer: coarse) { .ld-move { min-height: 44px; } }
@media (max-width: 960px) {
  .cu-panel { position: static; } /* a profile that follows the scroll would cover the list on a phone */
  .ld-move, .pl-quick button, .pl-grid select, .pl-grid input { min-height: 44px; }
  .ld-wrap { grid-template-columns: minmax(0, 1fr); }
  .ld-board { grid-template-columns: minmax(0, 1fr); }
  .ld-col:not(.on) { display: none; }
  .ld-tabs { display: flex; }
  .ld-tools input[type=search] { width: 100%; }
  .cu-pipe .cu-head { display: none; }
  .cu-pipe .cu-btn { grid-template-columns: minmax(0, 1fr); }
}
