/* ============================================================================
   KOREVRA SERVE — Korevra Control  (.portal-control / .ct-*)

   The operator plane. It is a deliberate sibling of the Admin & Finance
   console — same rhythm (12 / 16 / 24), same cards, same tables — wearing
   different chrome so nobody can mistake it for a customer's screen: a deep
   plum operator bar that stays dark in BOTH themes, an ESTATE / KOREVRA
   CONTROL marker, and plum where admin uses saffron.

   Every colour is a token. The only literals are #fff on brand fills, which
   is the house pattern (.btn-plum in serve.css).
   ==========================================================================*/
.portal-control {
  --ct-bar-h: 58px;
  --ct-on: #fff;
  --ct-on-2: rgba(255, 255, 255, 0.74);
  --ct-on-3: rgba(255, 255, 255, 0.16);
  min-height: 100vh;
  background: var(--bg);
}
.portal-control .ct-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------------------------------------------------------------- operator bar */
.ct-bar {
  position: sticky; top: 0; z-index: 40;
  min-height: var(--ct-bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 24px;
  background: linear-gradient(100deg, var(--plum-600), var(--plum) 55%, var(--plum-600));
  color: var(--ct-on);
  box-shadow: var(--shadow-2);
}
body:has(.offline-bar.in) .portal-control .ct-bar { top: 37px; }
body:has(.offline-bar.in) .portal-control .ct-shell { padding-top: 37px; }
.ct-bar-l { display: flex; align-items: center; gap: 14px; min-width: 0; flex-wrap: nowrap; overflow: hidden; }
.ct-bar-r { display: flex; align-items: center; gap: 8px; flex: none; }
.ct-mark { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.ct-mark b { font-weight: 800; }
.ct-mark-d { width: 9px; height: 9px; flex: none; background: var(--saffron); transform: rotate(45deg); border-radius: 2px; box-shadow: 0 0 0 4px rgba(245, 165, 36, 0.22); }
.ct-mark-sep { opacity: 0.45; }
.ct-mark span:not(.ct-mark-sep) { opacity: 0.88; letter-spacing: 0.16em; }
.ct-bar-sub { font-size: 12px; color: var(--ct-on-2); border-left: 1px solid var(--ct-on-3); padding-left: 14px; white-space: nowrap; }
.ct-ctx { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: var(--r-pill); background: var(--ct-on-3); color: var(--ct-on); max-width: 200px; }
.ct-ctx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-ctx .ic { width: 14px; height: 14px; flex: none; }
.ct-live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 6px 12px; border-radius: var(--r-pill); background: var(--ct-on-3); }
.ct-who { display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 4px; border-radius: var(--r-pill); background: var(--ct-on-3); transition: background var(--t-fast), transform var(--t-fast); text-align: left; color: var(--ct-on); }
.ct-who:hover { background: rgba(255, 255, 255, 0.26); }
.ct-who:active { transform: scale(0.98); }
.ct-who-a { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--saffron); color: #17121F; font-weight: 800; font-size: 12px; flex: none; letter-spacing: 0.02em; }
.ct-who-a-lg { width: 52px; height: 52px; font-size: 18px; }
.ct-who-t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ct-who-t b { font-size: 13px; white-space: nowrap; }
.ct-who-t span { font-size: 11px; color: var(--ct-on-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.ct-role { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 8px; border-radius: var(--r-pill); background: var(--ct-on); color: var(--plum-600); flex: none; }
.ct-role-support { background: var(--sky); color: #fff; }
.ct-role-engineer { background: var(--teal); color: #fff; }
.ct-role-owner { background: var(--saffron); color: #17121F; }
.ct-theme { color: var(--ct-on); }
.ct-theme:hover { background: var(--ct-on-3); color: var(--ct-on); }

/* ---------------------------------------------------------------- tabs */
.ct-tabs { position: sticky; top: var(--ct-bar-h); z-index: 30; display: flex; gap: 2px; padding: 0 24px; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ct-tabs::-webkit-scrollbar { display: none; }
body:has(.offline-bar.in) .portal-control .ct-tabs { top: calc(var(--ct-bar-h) + 37px); }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .ct-tabs { background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
}
.ct-tab { display: inline-flex; align-items: center; gap: 7px; padding: 13px 14px; font-size: 14px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color var(--t-fast), border-color var(--t-fast); }
.ct-tab .ic { width: 17px; height: 17px; }
.ct-tab:hover { color: var(--ink); }
.ct-tab.is-on { color: var(--plum-ink); border-color: var(--plum); }

/* ---------------------------------------------------------------- content */
.ct-content { flex: 1; width: 100%; max-width: 1480px; padding: 22px 24px 110px; }
.ct-sec { display: flex; flex-direction: column; gap: 18px; }
.ct-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ct-head h2 { font-size: 28px; letter-spacing: -0.02em; }
.ct-head-s { color: var(--ink-3); font-size: 14px; margin-top: 4px; }
.ct-head-a { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ct-live-i { display: inline-flex; align-items: center; gap: 6px; color: var(--basil-ink); font-weight: 600; }
.ct-h4 { margin: 16px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); font-weight: 700; }
.ct-role-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.ct-role-note .ic { width: 15px; height: 15px; }
.ct-unavail { align-items: flex-start; }
.ct-locked { opacity: 0.55; }
.ct-bullets { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ct-bullets li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.ct-bullets .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--plum-ink); }

/* ---------------------------------------------------------------- grid + KPIs */
.ct-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ct-span-4 { grid-column: span 4; } .ct-span-5 { grid-column: span 5; } .ct-span-6 { grid-column: span 6; } .ct-span-7 { grid-column: span 7; } .ct-span-12 { grid-column: span 12; }
.ct-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); gap: 12px; }
.ct-tile { transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base); }
.ct-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.ct-tile .kpi-v { font-size: 28px; }
.ct-tile-s { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.ct-st { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }

/* ---------------------------------------------------------------- needs attention */
.ct-attn .card-head { margin-bottom: 6px; }
.ct-attn-i { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 11px 12px; margin: 0 -12px; border-radius: var(--r-2); border-bottom: 1px solid var(--line); transition: background var(--t-fast), transform var(--t-fast); }
.ct-attn-i:last-of-type { border-bottom: 0; }
.ct-attn-i:hover { background: var(--bg-2); }
.ct-attn-i:active { transform: scale(0.995); }
.ct-attn-i > .ic { color: var(--ink-4); flex: none; }
.ct-attn-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--bg-2); color: var(--ink-3); }
.ct-attn-ic .ic { width: 17px; height: 17px; }
.ct-attn-i.is-rose .ct-attn-ic { background: var(--rose-wash); color: var(--rose-ink); }
.ct-attn-i.is-paprika .ct-attn-ic { background: var(--paprika-wash); color: var(--paprika-ink); }
.ct-attn-i.is-saffron .ct-attn-ic { background: var(--saffron-wash); color: var(--saffron-ink); }
.ct-attn-t { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.ct-attn-d { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.ct-clear { display: flex; align-items: center; gap: 12px; padding: 18px 4px; }
.ct-clear .ic { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--basil-wash); color: var(--basil-ink); flex: none; }
.ct-clear b { display: block; font-size: 14px; }
.ct-clear span { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.ct-byplan-r { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; padding: 9px 10px; margin: 0 -10px; border-radius: var(--r-2); transition: background var(--t-fast); }
.ct-byplan-r:hover { background: var(--bg-2); }

/* ---------------------------------------------------------------- filters + tables */
.ct-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ct-filters .search { min-width: 230px; flex: 1; }
.ct-filters .input { padding: 9px 14px; font-size: 14px; }
.ct-filters .search .input { padding-left: 38px; }
.ct-sel { width: auto; padding-right: 34px !important; }
.ct-count { margin-left: auto; white-space: nowrap; }
.ct-table th { position: sticky; top: 0; z-index: 2; }
.ct-row { cursor: pointer; }
.ct-row:focus-visible { outline-offset: -3px; }
.ct-cust { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.ct-cust-n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.ct-slug { font-size: 11.5px; color: var(--ink-3); }
.ct-site { color: var(--ink-2); max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-go { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--ink-4); transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.ct-row:hover .ct-go { background: var(--plum-wash); color: var(--plum-ink); transform: translateX(2px); }
.ct-reason { color: var(--ink-2); min-width: 220px; }
.portal-control tr.flash-new { animation: ct-row-flash 1.6s var(--ease-out); }
@keyframes ct-row-flash { 0% { background: var(--plum-wash); } 100% { background: transparent; } }

/* ---------------------------------------------------------------- forms */
.ct-form { display: flex; flex-direction: column; gap: 14px; }
.ct-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ct-err { font-size: 12px; font-weight: 600; color: var(--rose-ink); display: flex; align-items: center; gap: 4px; }
.ct-err::before { content: '▲'; font-size: 9px; }
.field.is-bad .input { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-wash); }
.ct-ta { font-family: var(--font-ui); line-height: 1.5; resize: vertical; }
.ct-modal .modal-body { padding-bottom: 8px; }
.ct-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 16px; margin: 12px 0 0; font-size: 13.5px; }
.ct-kv dt { color: var(--ink-3); white-space: nowrap; }
.ct-kv dd { margin: 0; word-break: break-word; }

/* ---------------------------------------------------------------- plan pickers */
.ct-plan-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.ct-plan-pick { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 14px; border-radius: var(--r-3); border: 1.5px solid var(--line-2); background: var(--card); transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast), background var(--t-fast); }
.ct-plan-pick:hover { border-color: var(--plum); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.ct-plan-pick.is-on { border-color: var(--plum); background: var(--plum-wash); box-shadow: 0 0 0 3px var(--plum-wash); }
.ct-plan-pick.is-locked { opacity: 0.6; }
.ct-plan-pick.is-locked:hover { transform: none; box-shadow: none; border-color: var(--line-2); }
.ct-plan-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ct-plan-h b { font-size: 15px; font-family: var(--font-display); font-weight: 600; }
.ct-plan-p { font-size: 13px; font-weight: 700; color: var(--plum-ink); white-space: nowrap; }
.ct-plan-p i { font-style: normal; font-weight: 500; color: var(--ink-4); font-size: 11px; }
.ct-plan-b { font-size: 12px; color: var(--ink-3); }
.ct-plan-l { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-3); }
.ct-plan-l b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ct-plan-f { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.ct-plan-f i { font-style: normal; display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2); }
.ct-plan-f .ic { width: 12px; height: 12px; color: var(--basil-ink); flex: none; }

/* ---------------------------------------------------------------- provision success */
.ct-done { text-align: center; padding: 6px 0 4px; }
.ct-done-ic { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--basil-wash); color: var(--basil-ink); animation: pop-in 0.5s var(--ease-spring) both; }
.ct-done-ic .ic { width: 28px; height: 28px; }
.ct-done h3 { font-size: 22px; }
.ct-done p { margin-top: 6px; font-size: 14px; }
.ct-done .ct-kv { text-align: left; max-width: 380px; margin: 16px auto 0; }
.ct-next { text-align: left; margin-top: 18px; }
.ct-next-i { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--card); margin-bottom: 8px; transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.ct-next-i:hover { border-color: var(--plum); background: var(--plum-wash); transform: translateX(2px); }
.ct-next-i > span:first-child { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2); color: var(--plum-ink); flex: none; }
.ct-next-i b { display: block; font-size: 14px; }
.ct-next-i .grow > span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.ct-next-i > .ic { color: var(--ink-4); flex: none; }

/* ---------------------------------------------------------------- customer detail */
.ct-cust-head { display: flex; flex-direction: column; gap: 12px; }
.ct-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); align-self: flex-start; padding: 4px 2px; transition: color var(--t-fast); }
.ct-back:hover { color: var(--plum-ink); }
.ct-cust-id { min-width: 0; }
.ct-cust-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ct-cust-title h2 { font-size: 30px; letter-spacing: -0.02em; }
.ct-cust-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.ct-cust-meta .mono { color: var(--ink-2); }
.ct-id { color: var(--ink-4) !important; }
.ct-cust-a { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-susp { margin-top: 12px; }
.ct-cust-head + .ct-grid { margin-top: 4px; }
@media (min-width: 901px) {
  .ct-cust-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'back back' 'id actions'; align-items: end; }
  .ct-back { grid-area: back; }
  .ct-cust-id { grid-area: id; }
  .ct-cust-a { grid-area: actions; justify-content: flex-end; }
}

/* limits table */
.ct-limits td, .ct-limits th { vertical-align: middle; }
.ct-limits tr.is-over td { background: var(--plum-wash); }
.ct-base { color: var(--ink-3); }
.ct-lim-in { max-width: 120px; padding: 7px 10px !important; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ct-pct { font-size: 11.5px; font-weight: 700; color: var(--ink-4); }
.ct-pct.is-near { color: var(--saffron-ink); }
.ct-pct.is-over { color: var(--paprika-ink); }

/* usage */
.ct-usage { display: flex; flex-direction: column; gap: 12px; }
.ct-usage-r { display: flex; flex-direction: column; gap: 6px; }

/* ledger verification */
.ct-verify-idle { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; }
.ct-verify-idle > .ic, .ct-verify-idle > span > .ic { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--bg-2); color: var(--ink-3); flex: none; }
.ct-verify-idle b { display: block; font-size: 14px; }
.ct-verify-idle span span, .ct-verify-idle div span { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.ct-verify-idle .btn { margin-left: auto; }
.ct-verify { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-2); background: var(--bg-2); border-left: 4px solid var(--ink-4); }
.ct-verify.is-ok { background: var(--basil-wash); border-color: var(--basil); }
.ct-verify.is-bad { background: var(--rose-wash); border-color: var(--rose); }
.ct-verify-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--card); }
.ct-verify.is-ok .ct-verify-ic { color: var(--basil-ink); }
.ct-verify.is-bad .ct-verify-ic { color: var(--rose-ink); }
.ct-verify b { display: block; font-size: 14.5px; }
.ct-verify span:not(.chip):not(.ct-verify-ic) { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.ct-hash { display: inline-block; max-width: 100%; padding: 4px 8px; border-radius: 6px; background: var(--bg-2); color: var(--ink-2); }

/* lifecycle */
.ct-life-note { margin-bottom: 12px; }
.ct-life { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.ct-life-i { display: flex; align-items: center; gap: 11px; text-align: left; padding: 12px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--card); transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.ct-life-i:hover:not(.is-off) { border-color: var(--line-2); background: var(--bg-2); transform: translateY(-1px); }
.ct-life-i.is-off { opacity: 0.5; cursor: not-allowed; }
.ct-life-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--bg-2); color: var(--ink-3); }
.ct-life-i:not(.is-off) .ct-life-ic.is-rose { background: var(--rose-wash); color: var(--rose-ink); }
.ct-life-i:not(.is-off) .ct-life-ic.is-basil { background: var(--basil-wash); color: var(--basil-ink); }
.ct-life-i b { display: block; font-size: 13.5px; }
.ct-life-i .grow > span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.35; }
.ct-life-i > .ic { color: var(--ink-4); flex: none; }
.ct-life-log { display: flex; flex-direction: column; gap: 8px; }
.ct-life-log-i { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ct-life-log-i:last-child { border-bottom: 0; padding-bottom: 0; }
.ct-life-form { display: flex; flex-direction: column; gap: 14px; }
.ct-life-form .callout { align-items: flex-start; }
.ct-life-form .input.is-good { border-color: var(--basil); box-shadow: 0 0 0 3px var(--basil-wash); }
.ct-enter .ct-bullets .ic { color: var(--teal-ink); }

/* ---------------------------------------------------------------- plans */
.ct-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.ct-plan-card { display: flex; flex-direction: column; }
.ct-plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ct-plan-price { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--plum-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ct-plan-price span { display: block; font-family: var(--font-ui); font-size: 11px; font-weight: 500; color: var(--ink-4); text-align: right; }
.ct-plan-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.ct-plan-stats b { color: var(--ink); font-size: 14px; }
.ct-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ct-feats li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.ct-feats .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--basil-ink); }

/* ---------------------------------------------------------------- operators */
.ct-actingbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-3); background: var(--plum-wash); border: 1px solid var(--line); }
.ct-roleseg { flex: none; background: var(--card); }
.ct-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ct-rolecol { padding: 14px; border-radius: var(--r-3); border: 1px solid var(--line); background: var(--card); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.ct-rolecol.is-on { border-color: var(--plum); box-shadow: 0 0 0 3px var(--plum-wash); }
.ct-rolecol-h { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--ink-3); }
.ct-rolecap { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-4); padding: 3px 0; }
.ct-rolecap .ic { width: 14px; height: 14px; flex: none; }
.ct-rolecap.is-on { color: var(--ink-2); }
.ct-rolecap.is-on .ic { color: var(--basil-ink); }
.ct-op { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ct-op .ct-who-a { background: var(--bg-3); color: var(--ink-2); }
.portal-control tr.is-me { background: var(--plum-wash); }
.ct-rm:hover:not(:disabled) { background: var(--rose-wash); color: var(--rose-ink); }
.ct-rm:disabled { opacity: 0.4; cursor: not-allowed; }
.ct-roleopts { display: grid; gap: 8px; }
.ct-roleopt { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 11px 13px; border-radius: var(--r-2); border: 1.5px solid var(--line-2); background: var(--card); transition: border-color var(--t-fast), background var(--t-fast); }
.ct-roleopt:hover { border-color: var(--plum); }
.ct-roleopt.is-on { border-color: var(--plum); background: var(--plum-wash); }
.ct-roleopt b { font-size: 14px; }
.ct-roleopt span { font-size: 11.5px; color: var(--ink-3); }
.ct-who-modal .ct-caps { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.ct-cap { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-4); }
.ct-cap .ic { width: 15px; height: 15px; flex: none; }
.ct-cap.is-on { color: var(--ink); }
.ct-cap.is-on .ic { color: var(--basil-ink); }
.ct-op-switch { display: grid; gap: 6px; }
.ct-op-pick { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 11px; border-radius: var(--r-2); border: 1px solid var(--line); transition: border-color var(--t-fast), background var(--t-fast); }
.ct-op-pick:hover { background: var(--bg-2); border-color: var(--line-2); }
.ct-op-pick.is-on { border-color: var(--plum); background: var(--plum-wash); }
.ct-op-pick b { display: block; font-size: 13.5px; }
.ct-op-pick .grow > span { display: block; font-size: 11.5px; color: var(--ink-3); }

/* ---------------------------------------------------------------- acting-inside banner
   Created by control.js when an operator enters a customer's account, and it
   follows them into that account. It is the only piece of Control chrome that
   lives outside the portal — deliberately, because the whole point is that you
   can never forget whose canteen you are standing in. */
.ct-acting {
  position: fixed; left: 18px; bottom: 18px; z-index: 690;
  display: flex; align-items: center; gap: 12px;
  max-width: min(560px, calc(100vw - 100px));
  padding: 10px 12px 10px 14px; border-radius: var(--r-3);
  background: var(--plum-600); color: var(--ct-on, #fff);
  box-shadow: var(--shadow-3);
  opacity: 0; transform: translateY(14px);
  transition: opacity var(--t-base), transform var(--t-base) var(--ease-spring);
}
.ct-acting.in { opacity: 1; transform: none; }
.ct-acting.is-hidden { opacity: 0; transform: translateY(14px); pointer-events: none; }
.ct-acting-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.18); flex: none; }
.ct-acting-t { min-width: 0; line-height: 1.3; }
.ct-acting-t b { display: block; font-size: 13.5px; }
.ct-acting-t span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, 0.76); }
.ct-acting-b { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 8px 13px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, 0.92); color: var(--plum-600); transition: background var(--t-fast), transform var(--t-fast); }
.ct-acting-b:hover { background: #fff; transform: translateY(-1px); }
.ct-acting-b .ic { width: 14px; height: 14px; }
.ct-acting-x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; color: rgba(255, 255, 255, 0.76); transition: background var(--t-fast), color var(--t-fast); }
.ct-acting-x:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .ct-span-4, .ct-span-5, .ct-span-6, .ct-span-7 { grid-column: span 12; }
  .ct-roles { grid-template-columns: minmax(0, 1fr); }
  .ct-bar-sub { display: none; }
}
@media (max-width: 900px) {
  .ct-bar { padding: 10px 16px; gap: 10px; }
  .ct-bar-sub { display: none; }
  .ct-tabs { padding: 0 12px; }
  .ct-content { padding: 18px 16px 120px; }
  .ct-who-t { display: none; }
  .ct-ctx { max-width: 130px; }
  .ct-cust-title h2 { font-size: 24px; }
}
@media (max-width: 640px) {
  .portal-control { --ct-bar-h: 52px; }
  .ct-bar { flex-wrap: nowrap; }
  .ct-mark span:not(.ct-mark-sep) { display: none; }
  .ct-mark-sep { display: none; }
  .ct-live { padding: 6px 9px; font-size: 12px; }
  .ct-form-2 { grid-template-columns: minmax(0, 1fr); }
  .ct-head h2 { font-size: 24px; }
  .ct-head-a { width: 100%; }
  .ct-head-a .btn { flex: 1; }
  .ct-count { margin-left: 0; }
  .ct-filters .search { min-width: 100%; }
  .ct-sel { width: 100%; }
  .ct-tab { padding: 12px 10px; }
  .ct-tab span { font-size: 13px; }
  .ct-life { grid-template-columns: minmax(0, 1fr); }
  .ct-acting { left: 12px; right: 82px; bottom: 12px; max-width: none; padding: 10px; }
  .ct-acting-t span { display: none; }
  .ct-acting-b span { display: none; }
  .ct-cust-a { width: 100%; }
  .ct-cust-a .btn { flex: 1; }
  .ct-verify-idle .btn { margin-left: 0; width: 100%; }
  .ct-actingbar { flex-direction: column; align-items: stretch; }
  .ct-roleseg { width: 100%; justify-content: space-between; }
  .ct-roleseg button { flex: 1; }
}

/* touch targets on phones */
@media (pointer: coarse) {
  .ct-tab { min-height: 44px; }
  .ct-life-i, .ct-next-i, .ct-attn-i, .ct-plan-pick { min-height: 48px; }
  .ct-acting-b, .ct-acting-x { min-height: 40px; }
}
