/* The operator app — sidebar shell, brand-accented, on the product system.
   The accent is the BUSINESS's colour (applyBrand sets --gold/--gold-dark/
   --green from their pick or their logo); everything below leans on those
   variables so one business's app is orange and another's is blue. */

.portal-body { background: #f6f8fa; margin: 0; font-family: "Figtree", system-ui, sans-serif; }

/* ---------- login ---------- */
.pt-login { min-height: 100vh; display: flex; background: #0b1f33; }
.pt-login-pitch { flex: 1; color: #fff; padding: 56px 60px; display: none; flex-direction: column; position: relative; overflow: hidden; }
.pt-login-pitch::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(45,212,191,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45,212,191,.06) 1px, transparent 1px);
  background-size: 30px 30px;
}
@media (min-width: 880px) { .pt-login-pitch { display: flex; } }
.pt-login-brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 17px; position: relative; }
.pt-login-brand .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--gold); display: flex; align-items: center; justify-content: center; }
.pt-login-pitch h1 { margin: auto 0 0; font-size: clamp(30px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; position: relative; }
.pt-login-pitch h1 b { color: #2dd4bf; }
.pt-login-pitch p { margin: 16px 0 0; max-width: 420px; font-size: 15px; color: rgba(255,255,255,.75); line-height: 1.65; position: relative; }
.pt-login-ticks { margin-top: 26px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: rgba(255,255,255,.6); position: relative; }
.pt-login-panel { width: 100%; background: #f6f8fa; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
@media (min-width: 880px) { .pt-login-panel { width: 520px; border-radius: 24px 0 0 24px; } }
.pt-login-card { width: 100%; max-width: 380px; }
.pt-login-card h2 { margin: 0; font-size: 26px; font-weight: 800; color: var(--green); letter-spacing: -0.02em; }
.pt-login-card .sub { margin: 8px 0 0; font-size: 14px; color: var(--body); line-height: 1.6; }
.pt-field-label { font-size: 12.5px; font-weight: 700; color: #333; margin: 22px 0 6px; }
.pt-input { width: 100%; border: 1.5px solid #cfd9e0; background: #fff; border-radius: 12px; padding: 14px 16px; font: inherit; font-size: 15px; }
.pt-input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.pt-code-row { display: flex; gap: 8px; }
.pt-code { width: 100%; max-width: 54px; height: 58px; background: #fff; border: 1.5px solid #cfd9e0; border-radius: 12px; text-align: center; font: inherit; font-size: 24px; font-weight: 800; color: var(--green); }
.pt-code:focus { outline: none; border-color: var(--gold); border-width: 2px; }
.pt-login-note { margin-top: 26px; font-size: 12.5px; color: #889; line-height: 1.6; }
.pt-err { color: #b3261e; font-size: 13px; margin-top: 10px; min-height: 18px; }

/* ---------- shell ---------- */
.pt-shell { display: flex; min-height: 100vh; }
.pt-side {
  width: 250px; flex-shrink: 0; background: #0b1f33; color: #fff;
  display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh; box-sizing: border-box;
}
.pt-side-biz { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.pt-side-logo { width: 38px; height: 38px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.pt-side-logo img { width: 100%; height: 100%; object-fit: cover; }
.pt-side-logo svg { width: 20px; height: 20px; }
.pt-side-name { font-weight: 800; font-size: 14.5px; line-height: 1.2; }
.pt-side-slug { font-size: 11px; color: rgba(255,255,255,.55); word-break: break-all; }
.pt-nav { margin-top: 14px; display: flex; flex-direction: column; gap: 3px; }
.pt-nav a {
  display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.75);
  padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none;
}
.pt-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.pt-nav a.on { background: var(--gold); color: #fff; }
.pt-nav a .n { margin-left: auto; background: var(--gold); color: #fff; font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.pt-nav a.on .n { background: rgba(255,255,255,.25); }
.pt-side-foot { margin-top: auto; font-size: 11.5px; color: rgba(255,255,255,.45); padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.1); line-height: 1.6; }
.pt-side-foot a { color: rgba(255,255,255,.6); }

.pt-main { flex: 1; padding: 30px 36px 60px; min-width: 0; }
.pt-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.pt-kicker { font-size: 11px; font-weight: 800; letter-spacing: .09em; color: var(--gold-dark); }
.pt-head h1 { margin: 6px 0 0; font-size: 27px; font-weight: 800; letter-spacing: -0.02em; color: var(--green); }
.pt-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.pt-card { background: #fff; border: 1px solid #e1e8ee; border-radius: 16px; }
.pt-strip { margin-top: 20px; display: flex; align-items: center; gap: 16px; padding: 15px 20px; flex-wrap: wrap; }
.pt-strip .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pt-strip .dot.live { background: #2e9e5b; box-shadow: 0 0 0 4px rgba(46,158,91,.18); }
.pt-strip .dot.off { background: #d97706; box-shadow: 0 0 0 4px rgba(217,119,6,.18); }
.pt-strip-link { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--gold-dark); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.pt-tiles { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.pt-tile { padding: 18px 20px; }
.pt-tile .lbl { font-size: 12px; font-weight: 700; color: #667; }
.pt-tile .big { font-size: 32px; font-weight: 800; color: var(--green); margin-top: 3px; font-variant-numeric: tabular-nums; }
.pt-tile .sub { font-size: 12px; color: #667; margin-top: 2px; }
.pt-tile .sub.up { color: #2e9e5b; font-weight: 700; }

.pt-cols { margin-top: 18px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; }
@media (max-width: 980px) { .pt-cols { grid-template-columns: 1fr; } }
.pt-panel { padding: 20px 22px; }
.pt-panel-head { display: flex; justify-content: space-between; align-items: center; }
.pt-panel-head h2 { margin: 0; font-size: 16px; font-weight: 800; color: var(--green); }
.pt-panel-head a { font-size: 13px; font-weight: 700; color: var(--gold-dark); text-decoration: none; }

.pt-lead { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid #eef2f4; }
.pt-lead:last-of-type { border-bottom: 0; }
.pt-lead .who { flex: 1; min-width: 0; }
.pt-lead .who b { font-size: 14px; color: var(--ink); }
.pt-lead .who .meta { font-size: 12.5px; color: #667; margin-top: 1px; }
.pt-lead .price { font-size: 15px; font-weight: 800; color: var(--green); white-space: nowrap; }
.pt-chip { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.pt-chip.new { color: var(--gold-dark); background: color-mix(in srgb, var(--gold) 14%, #fff); }
.pt-chip.booked { color: #2e9e5b; background: #e8f5ee; }
.pt-chip.done { color: #2e9e5b; background: #e8f5ee; }
.pt-chip.contacted { color: #667; background: #eef2f4; }
.pt-chip.closed { color: #99a; background: #f2f4f6; }
.pt-chip.test { color: #8a5a00; background: #fff3d6; }
.pt-pick { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--gold); cursor: pointer; }
.pt-bulk { position: sticky; top: 10px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 16px; padding: 10px 14px; background: #fff; border: 1px solid #e1e8ee; border-radius: 14px; font-size: 13px; }
.pt-bulk .hint { flex: 1; min-width: 200px; color: #556; }
.pt-bulk .pt-btn { padding: 8px 14px; font-size: 13px; }

.pt-rows { font-size: 13.5px; }
.pt-rows .r { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eef2f4; }
.pt-rows .r:last-child { border-bottom: 0; }
.pt-rows .r span { color: #667; }
.pt-rows .r b { color: var(--ink); font-variant-numeric: tabular-nums; }

.pt-note { margin-top: 12px; background: color-mix(in srgb, var(--gold) 10%, #fff); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: #444; line-height: 1.55; }
.pt-note b { color: var(--green); }

/* leads page */
.pt-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-filter { border: 1px solid #e1e8ee; background: #fff; color: #333; border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pt-filter.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.pt-leadcard { margin-top: 10px; overflow: hidden; }
.pt-leadcard.new-lead { border-left: 4px solid var(--gold); }
.pt-leadcard .top { display: flex; align-items: center; gap: 14px; padding: 16px 22px; cursor: pointer; }
.pt-leadcard .top b.who-name { font-size: 15px; color: var(--green); }
.pt-leadcard .detail { border-top: 1px solid #eef2f4; padding: 14px 22px; display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 14px; font-size: 13px; background: #fbfcfd; }
@media (max-width: 860px) { .pt-leadcard .detail { grid-template-columns: 1fr; } }
.pt-leadcard .detail .h { color: #889; font-weight: 700; font-size: 11px; letter-spacing: .04em; }
.pt-leadcard .detail .v { margin-top: 4px; color: #333; line-height: 1.55; word-break: break-word; }
.pt-lead-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 10px; padding: 10px 16px; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; border: 0; text-decoration: none; background: var(--gold); color: #fff; }
.pt-btn.ghost { background: #fff; border: 1.5px solid #e1e8ee; color: var(--green); font-weight: 700; }
.pt-btn.big { padding: 13px 22px; font-size: 14.5px; }
.pt-btn[disabled] { opacity: .5; pointer-events: none; }
.pt-empty { text-align: center; padding: 46px 20px; color: #889; font-size: 14px; line-height: 1.7; }

/* billing + page + settings shared */
.pt-plan { display: flex; align-items: center; gap: 18px; padding: 22px 24px; flex-wrap: wrap; }
.pt-plan .price { font-size: 34px; font-weight: 800; color: var(--green); }
.pt-plan .price small { font-size: 14px; color: #667; font-weight: 600; }
.pt-codebox { display: flex; align-items: center; gap: 10px; background: #102a43; border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.pt-codebox code { flex: 1; color: #b7f5ec; font-size: 12px; overflow-x: auto; white-space: nowrap; font-family: ui-monospace, monospace; }
.pt-linkline { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pt-linkline .url { font-size: 14.5px; font-weight: 700; color: var(--green); background: #f2f6f5; border-radius: 10px; padding: 11px 14px; }

.pt-swatches { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 10px; }
.pt-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.pt-swatch.on { border-color: var(--green); box-shadow: 0 0 0 2px #fff inset; }

/* the expiry banner — on every view until a card is on file */
.pt-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #0b1f33; color: #fff; border-radius: 14px; padding: 14px 18px; margin-bottom: 22px; }
.pt-banner .clock { width: 34px; height: 34px; border-radius: 10px; background: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; }
.pt-banner .txt { flex: 1; min-width: 220px; font-size: 14px; line-height: 1.45; }
.pt-banner .txt b { display: block; font-size: 15px; }
.pt-banner .txt span { color: rgba(255,255,255,.72); }
.pt-banner .pt-btn { background: var(--gold); white-space: nowrap; }
.pt-banner.expired { background: #7a2e22; }

/* the set-up checklist */
.pt-todo { margin-top: 18px; }
.pt-todo-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid #eef2f4; text-decoration: none; color: inherit; }
.pt-todo-row:last-of-type { border-bottom: 0; }
.pt-todo-row .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #cfd9e0; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #fff; }
.pt-todo-row.done .tick { background: #2e9e5b; border-color: #2e9e5b; }
.pt-todo-row.waiting .tick { border-color: #d97706; color: #d97706; }
.pt-todo-row .what { flex: 1; min-width: 0; }
.pt-todo-row .what b { display: block; font-size: 14px; color: var(--ink); }
.pt-todo-row.done .what b { color: #667; text-decoration: line-through; text-decoration-color: #cfd9e0; }
.pt-todo-row .what span { font-size: 12.5px; color: #667; }
.pt-todo-row .go { font-size: 13px; font-weight: 700; color: var(--gold-dark); white-space: nowrap; }
.pt-todo-bar { height: 6px; border-radius: 999px; background: #eef2f4; overflow: hidden; margin-top: 12px; }
.pt-todo-bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width .4s; }
.pt-mark { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--green); cursor: pointer; margin-top: 12px; }
.pt-mark input { width: 18px; height: 18px; accent-color: var(--gold); }

/* mobile shell: sidebar becomes a top bar + bottom tabs */
@media (max-width: 780px) {
  .pt-shell { flex-direction: column; }
  .pt-side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 12px 14px; }
  .pt-side-biz { border: 0; padding: 0; flex: 1; }
  .pt-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; margin: 0; flex-direction: row; background: #0b1f33; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; border-top: 1px solid rgba(255,255,255,.12); }
  .pt-nav a { flex-direction: column; gap: 2px; font-size: 10px; padding: 7px 8px; }
  .pt-nav a .n { display: none; }
  .pt-side-foot { display: none; }
  .pt-main { padding: 20px 16px 96px; }
}
