:root {
  --cyan: #00ADEE;
  --cyan-2: #0b8fd0;
  --cyan-soft: #e6f7fe;
  --navy: #0b1e33;
  --navy-2: #123657;
  --gray: #5E6368;
  --ink: #0f2a3d;
  --muted: #64788a;
  --line: #e1eaf1;
  --bg: #f4f8fb;
  --card: #ffffff;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(11, 30, 51, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
#root { min-height: 100vh; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo svg { width: 32px; height: auto; display: block; }
.logo b { font-size: 22px; font-weight: 800; letter-spacing: -.4px; color: var(--cyan); }
.logo b i { font-style: normal; color: var(--gray); }
.logo.on-dark b { color: #fff; }
.logo.on-dark b i { color: rgba(255,255,255,.72); }

/* ---------- login ---------- */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 52px; color: #fff; background: radial-gradient(circle at 85% 10%, rgba(0,173,238,.45), transparent 45%), linear-gradient(140deg, var(--navy), var(--navy-2)); }
.auth-brand::after { content: ""; position: absolute; right: -120px; bottom: -140px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(0,173,238,.12); }
.auth-brand h1 { margin: 0 0 14px; max-width: 460px; font-size: 40px; line-height: 1.1; letter-spacing: -.8px; }
.auth-brand p { margin: 0; max-width: 440px; color: #c3d4e4; font-size: 16px; }
.auth-points { display: grid; gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; position: relative; z-index: 1; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: #dce8f3; }
.auth-points i { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(0,173,238,.2); color: #8fdcfa; font-style: normal; font-weight: 900; }
.demo-badge { align-self: flex-start; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); color: #cfe3f2; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; position: relative; z-index: 1; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card { width: 100%; max-width: 420px; padding: 34px 32px; }
.auth-card h2 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.4px; }
.auth-card .sub { margin: 0 0 24px; color: var(--muted); }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: #33495c; }
.input { position: relative; }
.input input { width: 100%; padding: 12px 14px; border: 1.5px solid #d3dee8; border-radius: 11px; background: #fbfdff; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.input input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0,173,238,.14); background: #fff; }
.input.err input { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(220,38,38,.1); }
.input .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 12px; font-weight: 700; }
.msg { min-height: 18px; margin-top: 6px; font-size: 13px; color: var(--bad); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 18px; font-size: 13px; color: var(--muted); }
.row-between label { display: inline-flex; align-items: center; gap: 6px; }
.link { border: 0; background: none; padding: 0; color: var(--cyan-2); font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 12px; font-weight: 800; transition: transform .12s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(90deg, var(--cyan), #22c1f5); color: #fff; box-shadow: 0 10px 22px rgba(0,173,238,.3); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(0,173,238,.4); }
.btn-primary[disabled] { opacity: .55; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: #eef4f8; color: #23415a; }
.btn-ghost:hover { background: #e3edf4; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-block { width: 100%; }
.alert { display: flex; gap: 10px; padding: 11px 13px; border-radius: 11px; font-size: 13px; margin-bottom: 16px; }
.alert-bad { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: var(--cyan-soft); color: #0b4f74; border: 1px solid #bfe8fa; }
.demo-creds { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 16px; }
.demo-creds summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); }
.demo-creds table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 12.5px; }
.demo-creds td { padding: 6px 4px; border-bottom: 1px solid #f0f4f7; }
.demo-creds code { padding: 2px 6px; border-radius: 6px; background: #f1f6fa; font-size: 12px; }
.demo-creds button { border: 0; background: none; color: var(--cyan-2); font-size: 12px; font-weight: 800; }
.otp { display: flex; gap: 8px; justify-content: space-between; margin: 6px 0 4px; }
.otp input { width: 48px; height: 56px; text-align: center; font-size: 22px; font-weight: 800; border: 1.5px solid #d3dee8; border-radius: 12px; outline: none; }
.otp input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0,173,238,.14); }
.otp.err input { border-color: var(--bad); }
.countdown { font-size: 13px; color: var(--muted); }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-rows: auto 1fr; min-height: 100%; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 12px 22px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .portal-name { padding-left: 16px; border-left: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 14px; }
.topbar .spacer { flex: 1; }
.vendor-pick { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.vendor-pick select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 700; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.avatar { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--navy-2)); color: #fff; font-weight: 800; font-size: 13px; }
.user-chip .who b { display: block; font-size: 13px; line-height: 1.1; }
.user-chip .who small { color: var(--muted); font-size: 11.5px; }
.role { padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.role-owner { background: var(--cyan-soft); color: #0b6e9c; }
.role-admin { background: #fff4e5; color: #b45309; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f1f6fa; color: #33495c; }
.shell { display: grid; grid-template-columns: 230px 1fr; }
.side { position: sticky; top: 61px; align-self: start; height: calc(100vh - 61px); padding: 22px 14px; border-right: 1px solid var(--line); background: #fff; }
.vendor-card { margin-bottom: 18px; padding: 14px; border-radius: 14px; background: linear-gradient(140deg, var(--navy), var(--navy-2)); color: #fff; }
.vendor-card small { color: #9fb7cc; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.vendor-card b { display: block; margin-top: 2px; font-size: 16px; }
.vendor-card .dot { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: #a7f3c4; }
.vendor-card .dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
.nav { display: grid; gap: 4px; }
.nav button, .nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: #3b5266; font-weight: 700; text-align: left; text-decoration: none; }
.nav button svg, .nav a svg { width: 18px; height: 18px; flex: none; }
.nav button:hover, .nav a:hover { background: #f2f7fb; }
.nav .nav-ext { margin-left: auto; display: flex; color: #8aa0b3; }
.nav .nav-ext svg { width: 14px; height: 14px; }
.nav button.on { background: var(--cyan-soft); color: #0b6e9c; }
.nav .badge { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 11px; }
.content { padding: 26px 28px 110px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.5px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* ---------- overview ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 16px 18px; }
.stat small { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.stat b { display: block; margin: 6px 0 2px; font-size: 22px; }
.stat span { font-size: 13px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.pill-ok { background: #e9f9ef; color: #15803d; }
.pill-warn { background: #fff4e5; color: #b45309; }
.pill-off { background: #f1f5f9; color: #64748b; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.panel { padding: 18px 20px; }
.panel h3 { margin: 0 0 12px; font-size: 16px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #f0f4f7; }
.list-row:first-of-type { border-top: 0; }
.list-row .ic { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--cyan-soft); color: var(--cyan-2); }
.list-row .ic svg { width: 20px; height: 20px; }
.list-row .t { flex: 1; min-width: 0; }
.list-row .t b { display: block; font-size: 14px; }
.list-row .t small { color: var(--muted); }

/* ---------- components ---------- */
.workspace { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, 1.05fr); gap: 18px; align-items: start; }
.comp { padding: 16px 18px; margin-bottom: 12px; transition: border-color .15s, box-shadow .15s; }
.comp.is-on { border-color: #bfe6f7; box-shadow: 0 10px 30px rgba(0,173,238,.1); }
.comp.is-changed { border-left: 4px solid var(--warn); }
.comp-head { display: flex; align-items: center; gap: 12px; }
.comp-head .ic { display: flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: #f1f6fa; color: #6b8297; }
.comp.is-on .comp-head .ic { background: linear-gradient(135deg, var(--cyan), var(--cyan-2)); color: #fff; }
.comp-head .ic svg { width: 22px; height: 22px; }
.comp-head .t { flex: 1; min-width: 0; }
.comp-head .t b { display: block; font-size: 15px; }
.comp-head .t small { color: var(--muted); font-size: 13px; }
.switch { position: relative; flex: none; width: 48px; height: 28px; border: 0; border-radius: 999px; background: #cfdbe5; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--cyan); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid rgba(0,173,238,.4); outline-offset: 2px; }
.comp-body { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0f4f7; }
.comp:not(.is-on) .comp-body { opacity: .5; }
.opt { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; }
.opt > span { font-size: 12px; font-weight: 800; color: #6b8297; letter-spacing: .5px; text-transform: uppercase; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { padding: 7px 12px; border: 1.5px solid #dbe6ee; border-radius: 10px; background: #fff; color: #33495c; font-size: 13px; font-weight: 700; }
.seg button:hover { border-color: #b9d6e6; }
.seg button.on { border-color: var(--cyan); background: var(--cyan-soft); color: #0b6e9c; }
.swatch { display: inline-flex; align-items: center; gap: 7px; }
.swatch i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.locked { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #f7fafc; color: var(--muted); font-size: 12.5px; }
.locked svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.locked code { color: #33495c; }
.admin-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-fields label { font-size: 11.5px; font-weight: 700; color: #6b8297; }
.admin-fields input { width: 100%; margin-top: 3px; padding: 7px 9px; border: 1px solid #d3dee8; border-radius: 8px; font-family: Consolas, monospace; font-size: 12.5px; }

.preview { position: sticky; top: 82px; padding: 14px; }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.preview-bar b { font-size: 14px; }
.preview-bar .tag { margin-left: 8px; }
.stage { position: relative; overflow: hidden; border-radius: 12px; background: repeating-linear-gradient(45deg, #eef3f7 0 10px, #f5f8fb 10px 20px); border: 1px solid var(--line); }
.stage-inner { position: absolute; top: 0; left: 0; transform-origin: 0 0; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.stage iframe { display: block; border: 0; width: 100%; height: 100%; background: #fff; }
.stage.mobile .stage-inner { border-radius: 26px; overflow: hidden; border: 8px solid #0f172a; }
.stage-ref { position: absolute; inset: 0; z-index: 2; overflow-y: auto; background: #eef3f7; opacity: 1; transition: opacity .35s ease; }
.stage-ref.fading { opacity: 0; }
.stage-ref img { display: block; width: 100%; height: auto; }
.stage-ref.mobile img { width: 320px; margin: 0 auto; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.ref-tag { position: sticky; top: 10px; left: 10px; z-index: 1; float: left; margin: 10px; padding: 6px 12px; border-radius: 999px; background: rgba(11,30,51,.88); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.stage-ref .ref-tag::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #fbbf24; animation: ref-pulse 1.2s ease-in-out infinite; }
@keyframes ref-pulse { 50% { opacity: .35; } }
.stage #snap { display: block; width: 100%; height: auto; }
.stage #snap.hidden, .stage iframe.hidden { display: none; }
.stage-status { z-index: 3; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 16px; border-radius: 999px; background: rgba(11,30,51,.88); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.stage { position: relative; }
.pill-info { background: #e6f7fe; color: #0b6e9c; }
.preview-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* ---------- install / activity ---------- */
.code { position: relative; padding: 18px 20px; border-radius: 14px; background: #0b1726; color: #d7e6f3; font: 13.5px/1.6 Consolas, "Courier New", monospace; overflow-x: auto; }
.code .k { color: #7dd3fc; } .code .a { color: #fbbf24; } .code .s { color: #a7f3d0; }
.code .copy { position: absolute; top: 12px; right: 12px; padding: 6px 12px; border: 0; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; font: 700 12px "Segoe UI", Arial, sans-serif; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.step { padding: 16px 18px; }
.step .n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--cyan-soft); color: #0b6e9c; font-weight: 800; }
.step b { display: block; margin: 10px 0 4px; }
.step p { margin: 0; color: var(--muted); font-size: 13.5px; }
.domains { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: #f1f6fa; font: 600 13px Consolas, monospace; }
.chip button { border: 0; background: none; color: var(--muted); font-weight: 900; }
.add-domain { display: flex; gap: 8px; margin-top: 10px; }
.add-domain input { flex: 1; padding: 9px 11px; border: 1px solid #d3dee8; border-radius: 10px; font-family: Consolas, monospace; }
.timeline { position: relative; margin: 0; padding: 0 0 0 22px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 18px; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--cyan); }
.timeline b { font-size: 14px; }
.timeline small { display: block; color: var(--muted); }
.timeline ul { margin: 6px 0 0; padding-left: 18px; color: #3b5266; font-size: 13.5px; }

/* ---------- publish bar, modal, toast ---------- */
.publish-bar { position: fixed; left: 50%; bottom: 20px; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 18px; border-radius: 16px; background: var(--navy); color: #fff; box-shadow: 0 18px 40px rgba(11,30,51,.35); transform: translate(-50%, 140%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.publish-bar.show { transform: translate(-50%, 0); }
.publish-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 4px rgba(251,191,36,.25); }
.publish-bar .btn-ghost { background: rgba(255,255,255,.12); color: #fff; }
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8,20,33,.5); }
.modal { width: 100%; max-width: 480px; padding: 24px; }
.modal h3 { margin: 0 0 6px; font-size: 20px; }
.modal p { margin: 0 0 14px; color: var(--muted); }
.modal ul { margin: 0 0 16px; padding-left: 18px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; }
.toasts { position: fixed; top: 16px; right: 16px; z-index: 60; display: grid; gap: 10px; }
.toast { display: flex; gap: 10px; align-items: flex-start; width: 340px; padding: 13px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 16px 36px rgba(11,30,51,.18); animation: toast-in .25s ease both; }
.toast .ti { flex: none; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: var(--cyan-soft); color: var(--cyan-2); font-weight: 900; }
.toast.ok .ti { background: #e9f9ef; color: var(--ok); }
.toast.bad .ti { background: #fef2f2; color: var(--bad); }
.toast b { display: block; font-size: 14px; }
.toast small { color: var(--muted); font-size: 13px; }
.toast .code-big { display: block; margin-top: 4px; font: 800 22px Consolas, monospace; letter-spacing: 4px; color: var(--navy); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- staff portal ---------- */
.auth-staff .auth-brand { background: radial-gradient(circle at 85% 10%, rgba(251,191,36,.28), transparent 45%), linear-gradient(140deg, #111827, #1f2937); }
.auth-staff .demo-badge { border-color: rgba(251,191,36,.5); color: #fde68a; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f8fbfd; color: #64788a; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-align: left; text-transform: uppercase; white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid #f0f4f7; vertical-align: middle; }
.tbl td small { display: block; color: var(--muted); font-size: 12px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafcfe; }
.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; }
.checks li { padding: 7px 10px; border-radius: 9px; background: #f7fafc; color: #33495c; }
.checks li.ok { background: #effaf3; color: #166534; }
.checks li.error { background: #fef2f2; color: #991b1b; }
.checks li.warn { background: #fff8eb; color: #92400e; }
.checks li small { color: inherit; opacity: .85; }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 1fr; }
  .preview { position: relative; top: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 28px; }
  .auth-brand h1 { font-size: 28px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: relative; top: 0; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { grid-template-columns: repeat(4, 1fr); }
  .split, .steps { grid-template-columns: 1fr; }
  .topbar .portal-name, .user-chip .who { display: none; }
}

/* ---- failure alerts (staff) ---- */
.pill-bad { background: #fef2f2; color: #b91c1c; }
.al-list { display: grid; gap: 12px; }
.al { padding: 16px 18px; border-left: 4px solid var(--bad); }
.al.is-warn { border-left-color: #f59e0b; }
.al.is-resolved { border-left-color: #cbd5e1; opacity: .8; }
.al-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.al-head b { font-size: 15px; }
.al-head .sp { flex: 1; }
.al-head small { color: var(--muted); font-size: 12.5px; }
.al-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px 22px; margin-top: 12px; font-size: 13.5px; }
.al-body small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.al-body a { color: #0b6e9c; word-break: break-all; }
.al-body code { font-size: 12.5px; word-break: break-word; }
.al-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.al-foot input { flex: 1; padding: 8px 10px; border: 1px solid #d3dee8; border-radius: 8px; font: inherit; }
.al-empty { padding: 28px; text-align: center; color: var(--muted); }
.pv-issues { margin-top: 10px; }
.pv-issues .alert { margin: 6px 0 0; font-size: 13px; }
.nav .badge.bad { background: var(--bad); }
@media (max-width: 760px) { .al-body { grid-template-columns: 1fr; } }

/* ---- asset bank (dealer) ---- */
.design { display: flex; align-items: center; gap: 14px; }
.design-thumb { width: 170px; height: 64px; object-fit: contain; object-position: center; border-radius: 10px; border: 1px solid var(--line); background: #f7fafc; }
.design-name { flex: 1; }
.design-name small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.modal.bank { max-width: 860px; }
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0 0 16px; max-height: 62vh; overflow: auto; padding: 2px; }
.bank-item { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; font: inherit; }
.bank-item:hover { border-color: #9ad8f2; }
.bank-item.on { border-color: var(--cyan, #00ADEE); box-shadow: 0 0 0 4px rgba(0,173,238,.12); }
.bank-item img { width: 100%; height: 110px; object-fit: contain; object-position: center; border-radius: 9px; background: #f7fafc; }
.bank-item small { color: var(--cyan-2, #0b8fd0); font-weight: 800; }
.bank-ph { display: block; height: 110px; border-radius: 9px; background: repeating-linear-gradient(45deg,#f1f5f9,#f1f5f9 8px,#e8eef3 8px,#e8eef3 16px); }

/* ---- staff card: advanced section, program terms ---- */
.adv { margin-top: 4px; border-top: 1px dashed var(--line); padding-top: 10px; }
.adv summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 700; }
.adv[open] summary { margin-bottom: 10px; }
.adv .opt { margin-bottom: 10px; }
.adv-note { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; }
.terms { display: grid; gap: 14px; }
.terms .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.terms select { padding: 8px 10px; border: 1px solid #d3dee8; border-radius: 8px; font: inherit; }
.terms .ro { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- websites / accounts picker (dealer with several websites, sales) and users (admin) ---- */
.role-sales { background: #eef2ff; color: #4338ca; }
.sites-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.acc-card { margin-bottom: 14px; padding: 6px 18px 10px; }
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f4f7; }
.acc-head b { font-size: 17px; }
.acc-head small { display: block; color: var(--muted); font-size: 12px; }
.star { padding: 7px 12px; border: 1.5px solid #dbe6ee; border-radius: 10px; background: #fff; color: #33495c; font-size: 13px; font-weight: 700; white-space: nowrap; }
.star:hover { border-color: #b9d6e6; }
.star.on { border-color: #f59e0b; background: #fffbeb; color: #b45309; }
.site-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-bottom: 1px solid #f0f4f7; }
.site-row:last-child { border-bottom: 0; }
.site-name { flex: 1 1 220px; min-width: 0; }
.site-name b { display: block; }
.site-name small, .site-meta { color: var(--muted); font-size: 13px; }
.user-form { padding: 18px 20px; }
.user-form h3 { margin: 0 0 12px; font-size: 16px; }
.uf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.uf-grid .field { margin: 0; }
.uf-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.uf-foot small { color: var(--muted); }
.input select { width: 100%; padding: 11px 12px; border: 1.5px solid #d3dee8; border-radius: 11px; background: #fbfdff; color: var(--ink); font: inherit; outline: none; }
.input select:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0,173,238,.14); }
.input select:disabled { opacity: .5; }
.tbl .input select { min-width: 150px; padding: 8px 10px; }
.u-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.u-actions .btn { padding: 8px 12px; }
.u-actions .input input { padding: 8px 10px; min-width: 170px; }
.btn-danger { color: #b91c1c; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 700px) { .page-head { flex-direction: column; align-items: stretch; } .sites-tools .input { width: 100% !important; } }