:root {
  --brand: #FF3444;
  --brand-dark: #e62a39;
  --bg: #0f1117;
  --bg2: #0d1117;
  --panel: #161b22;
  --panel2: #21262d;
  --line: #30363d;
  --line2: #21262d;
  --text: #e1e4e8;
  --muted: #8b949e;
  --radius: 10px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Styled scrollbars — match dashboard chrome everywhere */
* { scrollbar-width: thin; scrollbar-color: var(--panel2) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--panel2); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--line); }
.props-col::-webkit-scrollbar-thumb, .steps-col::-webkit-scrollbar-thumb { border-color: var(--panel); }

/* Inline icon sizing */
.ico-svg { display: inline-block; vertical-align: middle; flex: none; pointer-events: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea {
  font-family: inherit;
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  font-size: 14px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
label { display: block; font-size: 12.5px; color: var(--muted); margin: 12px 0 5px; font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  border-radius: 6px; padding: 0 16px; height: 34px; font-size: 13px; font-weight: 600;
  line-height: 1; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { background: var(--panel2); border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.btn.ghost:hover { background: var(--line); border-color: #484f58; }
.btn.sm { height: 28px; padding: 0 12px; font-size: 12px; }
.btn.danger { background: var(--panel2); border: 1px solid var(--line); color: #f85149; font-weight: 500; }
.btn.danger:hover { border-color: #f85149; }

/* Login */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(ellipse 720px 480px at 50% 50%, rgba(255,52,68,.10), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(48,54,61,.55) 1px, transparent 0) 0 0/28px 28px,
    var(--bg2);
}
.login-card {
  background: var(--panel); padding: 36px; border-radius: 12px;
  width: 340px; border: 1px solid var(--line);
  box-shadow: 0 0 100px rgba(255,52,68,.12), 0 12px 40px rgba(0,0,0,.6);
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; font-weight: 700; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; font-weight: 500; }
.login-card .err { color: #f85149; font-size: 13px; min-height: 18px; margin-top: 10px; font-weight: 500; }

/* Top bar */
.top { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line); background: var(--panel); }
.top .crumb { color: var(--muted); font-size: 14px; font-weight: 500; }
.top .crumb a { color: var(--text); text-decoration: none; }
.top .spacer { flex: 1; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 22px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }

/* Cards grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: border-color .15s;
}
.card:hover { border-color: var(--brand); }
.card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.card .meta { color: var(--muted); font-size: 12.5px; }
.card .acts { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.empty { color: var(--muted); margin-top: 30px; text-align: center; }

/* Editor layout */
.editor { display: grid; grid-template-columns: 250px 1fr 420px; height: calc(100vh - 61px); }
@media (max-width: 1400px) { .editor { grid-template-columns: 230px 1fr 380px; } }
@media (max-width: 1120px) { .editor { grid-template-columns: 210px 1fr 340px; } }
.steps-col { border-right: 1px solid var(--line); padding: 16px 12px; overflow-y: auto; background: var(--panel); }
.step-tab {
  display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 8px;
  margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--muted);
  border: 1px solid transparent; cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.step-tab:hover { background: #1c2128; color: var(--text); }
.step-tab.active { background: rgba(255,52,68,.10); border-color: rgba(255,52,68,.30); color: #fff; }
.step-tab .ico { width: 18px; text-align: center; }
.step-tab.active .ico { color: var(--brand); }
.step-tab .del { margin-left: auto; color: var(--muted); font-size: 12px; }
.add-q { margin-top: 8px; width: 100%; }
.steps-sep { height: 1px; background: var(--line2); margin: 10px 4px 12px; }

.preview-col { padding: 26px; overflow-y: auto; display: grid; place-items: start center; background: var(--bg); }
.props-col { border-left: 1px solid var(--line); padding: 22px; overflow-y: auto; background: var(--panel); }
.props-col h4 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.props-col .hint { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; line-height: 1.5; }
.props-col label { font-size: 12.5px; }
.props-col > label:first-of-type { margin-top: 4px; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; padding: 8px; font-size: 13px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); border-radius: 6px; transition: border-color .12s, color .12s, background .12s; }
.seg button.on { border-color: var(--brand); color: var(--text); background: rgba(255,52,68,.10); }
/* Settings sub-tabs: wrap evenly, don't stretch/overflow */
.seg.subtabs { flex-wrap: wrap; gap: 7px; }
.seg.subtabs button { flex: 0 1 auto; padding: 7px 13px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.seg.subtabs button.on { font-weight: 600; }
/* Field label + description inside props editor */
.f-lbl { display: block; font-size: 12.5px; color: var(--text); font-weight: 600; margin: 12px 0 4px; }
.f-desc { font-size: 12px; color: var(--muted); line-height: 1.45; margin: 0 0 6px; }
.field-card { border: 1px solid var(--line); border-radius: 10px; padding: 11px; margin-bottom: 9px; background: var(--bg2); }
.opt-row { display: flex; gap: 6px; margin-bottom: 6px; }
.opt-row input { flex: 1; }
.opt-row button { background: var(--panel2); border: 1px solid var(--line); color: #f85149; border-radius: 6px; padding: 0 10px; }
.opt-card { border: 1px solid var(--line); border-radius: 10px; padding: 9px; margin-bottom: 8px; background: var(--bg2); transition: border-color .12s; }
.opt-card:hover { border-color: var(--panel2); }
.opt-card-main { display: flex; align-items: center; gap: 8px; }
.opt-card-main .opt-text { flex: 1; }
.opt-thumb { width: 34px; height: 34px; flex: none; border-radius: 8px; background: var(--panel2) center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; color: var(--muted); font-weight: 600; }
.opt-thumb.num { font-size: 14px; }
.opt-del { background: var(--panel2); border: 1px solid var(--line); color: #f85149; border-radius: 6px; width: 30px; height: 30px; flex: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.opt-del:hover { border-color: #f85149; }
.opt-media { display: flex; gap: 8px; margin-top: 8px; }
.opt-media-f { display: flex; flex-direction: column; }
.opt-media-f.grow { flex: 1; }
.opt-media-f .f-lbl { margin: 0 0 3px; }
.opt-media-f input { width: 84px; }
.opt-media-f.grow input { width: 100%; }
/* image upload controls */
.img-field { display: flex; align-items: center; gap: 8px; }
.img-field input { flex: 1; height: 38px; }
.img-thumb { width: 38px; height: 38px; flex: none; margin-top: 0; border-radius: 8px; background: var(--bg2) center/cover no-repeat; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.img-thumb .ico-svg { display: none; }
.img-thumb.empty .ico-svg { display: block; }
.btn.img-up { flex: none; height: 38px; padding: 0 12px; }
.opt-img-row { display: flex; align-items: center; gap: 6px; }
.opt-img-row input { flex: 1; }
.mini-up { flex: none; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); border-radius: 7px; padding: 6px 8px; cursor: pointer; display: grid; place-items: center; transition: border-color .12s, color .12s; }
.mini-up:hover { border-color: var(--brand); color: var(--brand); }
.feat-row .mini-up { align-self: stretch; color: var(--muted); }
.feat-row .mini-up:hover { color: var(--brand); }
.chk { display: flex; align-items: center; gap: 8px; margin: 9px 0; font-size: 13px; color: var(--text); }
.chk input { width: auto; }

/* ============================================================
   Live quiz preview — DO NOT restyle (client-facing quiz look).
   Font pinned so the panel font does not bleed into quizzes.
   ============================================================ */
.qp { background: #fff; color: #1a1a2e; border-radius: 14px; width: 100%; max-width: 720px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.35); font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.qp-pad { padding: 30px; }
.qp-split { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.qp-split.left { grid-template-columns: 1fr 1fr; }
.qp-split .qp-pad { display: flex; flex-direction: column; justify-content: space-between; }
.qp-main { display: flex; flex-direction: column; }
.qp-split .qp-main { flex: 1; justify-content: center; min-height: 0; }
.qp-split .qp-main > .qp-logo { align-self: flex-start; }
.qp-split .qp-pad[style*="center"] .qp-main > .qp-logo { align-self: center; }
.qp-split .qp-pad > .qp-foot { padding-top: 22px; }
.qp-foot { margin-top: 16px; }
.qp-foot .qp-phone { margin-top: 0; }
.qp-media { background: #e7e9f2 center/cover no-repeat; min-height: 340px; }
.qp h2 { font-size: 28px; margin: 0 0 14px; line-height: 1.2; font-weight: 700; }
.qp p.sub { color: #555; font-size: 17px; line-height: 1.35; margin: 0 0 20px; white-space: pre-line; }
.qp[dir="rtl"] { direction: rtl; text-align: right; }
.qp-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.qp-back { background: transparent; border: none; color: #8a8a8a; font-size: 14px; cursor: pointer; padding: 8px 4px; }
.qp-next { background: var(--brand); color: #fff; border: none; border-radius: 30px; padding: 12px 30px; font-weight: 600; font-size: 15px; cursor: pointer; box-shadow: 0 6px 18px rgba(255,52,68,.28); }
.qp-next:hover { filter: brightness(1.05); }
.qp .brand { font-weight: 700; font-size: 13px; }
.qp .slogan { color: #888; font-size: 12px; }
.qp .cta { background: var(--brand); color: #fff; border: none; border-radius: 30px; padding: 15px 30px; font-weight: 600; font-size: 17px; margin-top: 6px; }
.qp .cta-anim-pulse { animation: cta-pulse 1.6s ease-in-out infinite; }
.qp .cta-anim-bounce { animation: cta-bounce 1.4s ease-in-out infinite; }
.qp .cta-anim-shake { animation: cta-shake 2.6s ease-in-out infinite; }
.qp .cta-anim-glow { animation: cta-glow 1.8s ease-out infinite; }
.qp .cta-anim-blick { position:relative; overflow:hidden; }
.qp .cta-anim-blick::after { content:''; position:absolute; top:0; left:-30px; width:20px; height:100%; background:linear-gradient(90deg, rgba(255,255,255,.1) 10%, rgba(255,255,255,.25) 20%, rgba(255,255,255,.6)); transform:skewX(-45deg); animation:cta-blick 6s ease infinite; }
@keyframes cta-blick { 0%{ left:-30px; } 15%,100%{ left:120%; } }
@keyframes cta-pulse { 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.05); } }
@keyframes cta-bounce { 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-6px); } }
@keyframes cta-shake { 0%,88%,100%{ transform:translateX(0); } 91%{ transform:translateX(-4px); } 94%{ transform:translateX(4px); } 97%{ transform:translateX(-3px); } }
@keyframes cta-glow { 0%{ box-shadow:0 0 0 0 rgba(255,52,68,.5); } 70%,100%{ box-shadow:0 0 0 12px rgba(255,52,68,0); } }
.qp .opt { border: 1px solid #ddd; border-radius: 9px; padding: 12px 14px; margin: 8px 0; cursor: default; }
.qp .opt:hover { border-color: var(--brand); }
/* Marquiz-style answer options */
.qp-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--brand); color: var(--brand); background: #fff; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 7px; margin: 0 0 18px; }
.qp-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qp-opt { display: flex; align-items: center; gap: 12px; border: 1.5px solid #d8dbe8; border-radius: 10px; padding: 14px 16px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.qp-opt:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.qp-opt .box { width: 20px; height: 20px; border: 1px solid #cfd2e0; border-radius: 5px; flex: none; background: #f3f4f9; }
.qp-opt.other { background: #f3f4f9; color: #9aa0b4; }
.qp-opt.sel { border-color: var(--brand); }
.qp-opt-emoji.sm { font-size: 22px; line-height: 1; }
.qp-opt.card { position: relative; flex-direction: column; align-items: stretch; text-align: center; gap: 10px; padding: 12px; }
.qp-opt.card .qp-opt-img { width: 100%; height: 120px; border-radius: 8px; background: #f3f4f9 center/cover no-repeat; }
.qp-opt.card .qp-opt-emoji { font-size: 42px; line-height: 1.1; }
.qp-opt.card.sel::after { content: '✓'; position: absolute; top: 8px; right: 10px; color: var(--brand); font-weight: 700; }
.qp-select { width: 100%; padding: 14px 16px; border: 1px solid #e2e4ee; border-radius: 10px; background: #fff; font-size: 15px; cursor: pointer; }
@media (max-width: 560px) { .qp-opts { grid-template-columns: 1fr; } }
.qp .progress { height: 6px; background: #eee; border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.qp .progress i { display: block; height: 100%; width: 80%; background: var(--brand); }
.qp .field { margin: 10px 0; }
.qp .field label { color: #333; font-size: 13px; margin: 0 0 4px; }
.qp .field input { background: #f6f7fb; border: 1px solid #e0e2ee; color: #222; }
.qp .phone { display: flex; gap: 6px; align-items: stretch; }
.qp .phone .mask { width: 92px; flex: none; }
.qp .phone .pv-flag { flex: none; display: flex; align-items: center; gap: 7px; padding: 0 12px; background: #eef0f6; border: 1px solid #e0e2ee; border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.qp .phone input { flex: 1; }
.qp .tnx-ico { font-size: 40px; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.qp .tnx-ico .ico-svg { width: 44px; height: 44px; }
.qp-consent { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 4px; font-size: 13px; color: #444; line-height: 1.4; text-align: left; cursor: pointer; }
.qp-consent input { margin-top: 2px; flex: none; width: 16px; height: 16px; accent-color: var(--brand); }
.qp-consent a { color: var(--brand); text-decoration: underline; }
.qp-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.qp-social { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1px solid #e0e2ee; border-radius: 999px; background: #f6f7fb; color: #222; text-decoration: none; font-size: 14px; font-weight: 600; }
.qp-social:hover { border-color: var(--brand); }
.qp-social-ico { display: inline-flex; align-items: center; line-height: 0; }
.qp-social-ico svg { display: block; width: 18px; height: 18px; }
/* Bonuses (perks) */
.qp-bonus-btn { position: fixed; bottom: 18px; right: 18px; z-index: 50; display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 999px; padding: 10px 15px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.qp-bonus-btn:hover { filter: brightness(1.05); }
.qp-bonus-gift { font-size: 18px; line-height: 1; }
.qp-bonus-cnt { background: rgba(255,255,255,.25); border-radius: 999px; padding: 1px 9px; font-size: 13px; }
html[dir="rtl"] .qp-bonus-btn { right: auto; left: 18px; }
.qp-bonus-modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.5); padding: 16px; }
.qp-bonus-modal.open { display: flex; }
.qp-bonus-card { position: relative; background: #fff; color: #222; border-radius: 16px; max-width: 420px; width: 100%; max-height: 82vh; overflow: auto; padding: 22px; }
.qp-bonus-card h3 { margin: 0 0 2px; font-size: 20px; }
.qp-bonus-x { position: absolute; top: 12px; right: 14px; border: none; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: #999; }
.qp-bonus-sub { color: #888; font-size: 13px; margin-bottom: 14px; }
.qp-bonus-list { display: flex; flex-direction: column; gap: 10px; }
.qp-bonus-item { display: flex; align-items: center; gap: 12px; border: 1px solid #eceef5; border-radius: 12px; padding: 10px; }
.qp-bonus-item.locked { opacity: .5; }
.qp-bonus-ico { width: 46px; height: 46px; flex: none; border-radius: 10px; background: #f2f4fa center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.qp-bonus-txt { flex: 1; min-width: 0; }
.qp-bonus-t { font-weight: 700; font-size: 15px; }
.qp-bonus-d { color: #666; font-size: 13px; margin-top: 2px; }
.qp-bonus-state { flex: none; font-size: 16px; color: var(--brand); }
.qp-bonus-item.locked .qp-bonus-state { color: #aaa; }

/* Panel misc */
.muted-link { color: var(--muted); font-size: 13px; text-decoration: none; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--brand); padding: 11px 18px; border-radius: 9px; font-size: 14px; opacity: 0; transition: opacity .2s; box-shadow: 0 8px 28px rgba(0,0,0,.5); }
.toast.show { opacity: 1; }

/* ===== ANALYTICS-BLOCK ===== */
.dt { width: auto; padding: 6px 9px; font-size: 13px; height: 30px; accent-color: var(--brand); color-scheme: dark; cursor: pointer; }
.a-daterow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 6px; }
.a-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.ap { background: var(--panel2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .12s; }
.ap:hover { border-color: var(--brand); color: var(--text); }
.ap.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.a-range { display: flex; align-items: center; gap: 8px; }
.dt-field { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.dt-field span { flex: none; }
.dt-sep { color: var(--muted); }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.kpi .kv { font-size: 28px; font-weight: 700; color: #fff; }
.kpi .kl { color: var(--muted); font-size: 12px; margin-top: 4px; font-weight: 500; }
.a-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.a-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.a-card.span2 { grid-column: span 2; }
.a-card h4 { margin: 0 0 14px; font-size: 15px; font-weight: 600; }
.fun-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; align-items: center; margin-bottom: 10px; }
.fun-lbl { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fun-bar { position: relative; background: var(--bg2); border-radius: 6px; height: 26px; overflow: hidden; }
.fun-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); border-radius: 6px; min-width: 2px; }
.fun-bar span { position: absolute; right: 10px; top: 0; line-height: 26px; font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.sp-col { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.sp-col i { display: block; width: 100%; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.spark-x { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 6px; }
.a-tbl { width: 100%; border-collapse: collapse; }
.a-tbl td { padding: 8px 4px; border-bottom: 1px solid var(--line2); font-size: 13px; }
.a-tbl td.num { text-align: right; font-weight: 600; color: #fff; }
@media (max-width: 760px) { .kpi-row { grid-template-columns: repeat(2,1fr); } .a-grid { grid-template-columns: 1fr; } .a-card.span2 { grid-column: span 1; } .fun-row { grid-template-columns: 110px 1fr; } }

/* ===== CARD-BLOCK ===== */
.quiz-card .qc-head { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.quiz-card .qc-head h3 { margin:0; font-size:16px; }
.qc-rename { background:transparent; border:1px solid var(--line); color:var(--muted); border-radius:6px; width:28px; height:28px; flex:none; font-size:13px; line-height:1; cursor:pointer; transition:border-color .12s, color .12s; }
.qc-rename:hover { border-color:var(--brand); color:var(--text); }
.quiz-card .meta { display:flex; align-items:center; gap:8px; margin:9px 0 2px; }
.q-status { font-size:11px; font-weight:600; padding:2px 10px; border-radius:20px; text-transform:capitalize; background:var(--panel2); border:1px solid var(--line); color:var(--muted); }
.q-status.published { background:rgba(46,160,67,.15); border-color:rgba(46,160,67,.4); color:#3fb950; }
.q-status.draft { background:rgba(187,128,9,.15); border-color:rgba(187,128,9,.4); color:#d29922; }
.q-slug { font-size:12px; color:var(--muted); }
.acts.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:14px; }
.acts.grid2 .btn { width:100%; }

/* ===== MODAL-BLOCK ===== */
.modal-ov { position:fixed; inset:0; background:rgba(10,12,20,.62); display:grid; place-items:center; z-index:9999; padding:20px; animation:mfade .12s ease; }
@keyframes mfade { from { opacity:0 } to { opacity:1 } }
.modal-card { background:var(--panel,#161b22); border:1px solid var(--border,#30363d); border-radius:12px; width:100%; max-width:400px; padding:22px; box-shadow:0 18px 60px rgba(0,0,0,.5); animation:mpop .14s ease; }
@keyframes mpop { from { transform:translateY(8px); opacity:.6 } to { transform:translateY(0); opacity:1 } }
.modal-card h3 { margin:0 0 10px; font-size:17px; }
.modal-msg { margin:0 0 16px; color:var(--muted,#8b949e); font-size:14px; line-height:1.45; }
.modal-card input { width:100%; background:var(--bg,#0d1117); border:1px solid var(--border,#30363d); color:var(--fg,#e6edf3); border-radius:8px; padding:11px 12px; font-size:14px; outline:none; margin-bottom:18px; }
.modal-card input:focus { border-color:var(--brand,#FF3444); }
.modal-acts { display:flex; justify-content:flex-end; gap:10px; }
.btn.mdanger { background:var(--brand,#FF3444); border-color:var(--brand,#FF3444); color:#fff; }
.btn.mdanger:hover { filter:brightness(.92); }
/* SEO preview popup (item 18) */
.sp-card { max-width:520px; }
.sp-card .modal-acts { margin-top:18px; }
.sp-sec-l { font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted,#8b949e); font-weight:600; margin:16px 0 7px; }
.sp-sec-l:first-of-type { margin-top:4px; }
.sp-tab { display:flex; align-items:center; gap:8px; background:#e8eaed; color:#202124; border-radius:9px 9px 0 0; padding:8px 11px; max-width:340px; font-size:13px; box-shadow:inset 0 -2px 0 #fff; }
.sp-tab .ico-svg { color:#5f6368; flex:none; margin-left:auto; }
.sp-tab-t { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sp-fav { width:16px; height:16px; border-radius:3px; background-size:cover; background-position:center; flex:none; }
.sp-fav.ph { display:grid; place-items:center; background:#cdd1d6; color:#5f6368; }
.sp-serp { background:#fff; border-radius:10px; padding:13px 15px; }
.sp-serp-url { color:#202124; font-size:12px; }
.sp-serp-t { color:#1a0dab; font-size:18px; line-height:1.3; margin:2px 0 3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sp-serp-d { color:#4d5156; font-size:13px; line-height:1.45; }
.sp-og { border:1px solid var(--border,#30363d); border-radius:10px; overflow:hidden; max-width:400px; }
.sp-og-img { height:200px; background-size:cover; background-position:center; background-color:#0d1117; }
.sp-og-img.ph { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; color:var(--muted,#8b949e); font-size:12px; }
.sp-og-b { padding:10px 13px; background:var(--bg,#0d1117); }
.sp-og-t { font-size:14px; font-weight:600; color:var(--fg,#e6edf3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sp-og-d { font-size:12.5px; color:var(--muted,#8b949e); line-height:1.4; margin:2px 0 4px; max-height:36px; overflow:hidden; }
.sp-og-u { font-size:11px; text-transform:uppercase; color:var(--muted,#8b949e); letter-spacing:.03em; }

/* ===== LOGO-BLOCK ===== */
.logo { display:inline-flex; align-items:center; gap:9px; letter-spacing:normal; }
.top .logo { letter-spacing:normal; }
.logo-img { width:30px; height:30px; border-radius:8px; display:block; flex:none; }
.logo-tag { font-size:11px; font-weight:800; color:var(--brand); border:1px solid var(--brand); border-radius:5px; padding:2px 7px; letter-spacing:1.5px; line-height:1; }
.login-logo { display:flex; align-items:center; gap:8px; justify-content:center; margin:0 0 4px; }
.login-logo .logo { gap:11px; }
.login-logo .logo-img { width:46px; height:46px; border-radius:12px; }
.login-logo .logo-tag { font-size:14px; padding:4px 10px; letter-spacing:2px; }

/* ===== START-BLOCK (quiz start extras; light client theme) ===== */
.qp-logo { max-height:40px; max-width:60%; margin-bottom:14px; display:block; object-fit:contain; }
.qp[dir="rtl"] .qp-logo { margin-left:auto; }
.qp-bullets { list-style:none; padding:0; margin:16px 0 0; }
.qp-bullets li { position:relative; padding-left:20px; margin:9px 0; color:#333; font-size:14px; line-height:1.45; }
.qp-bullets li::before { content:''; position:absolute; left:0; top:7px; width:8px; height:8px; border-radius:50%; background:var(--brand,#FF3444); }
.qp[dir="rtl"] .qp-bullets li { padding-left:0; padding-right:20px; }
.qp[dir="rtl"] .qp-bullets li::before { left:auto; right:0; }
.qp-feat { margin-top:20px; }
.qp-feat-t { font-weight:700; font-size:13px; color:#1a1a2e; margin-bottom:10px; }
.qp-feat-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.qp-feat-card { display:flex; align-items:center; gap:10px; border:1px solid #e2e4ee; border-radius:10px; padding:10px 12px; background:#fff; }
.qp-feat-img { width:38px; height:38px; flex:none; border-radius:8px; background:#eef0f6 center/cover no-repeat; }
.qp-feat-txt { font-size:13px; color:#333; line-height:1.3; }
.qp-phone { margin-top:16px; font-size:16px; font-weight:700; color:var(--brand,#FF3444); text-decoration:none; display:inline-flex; align-items:center; gap:7px; white-space:nowrap; }
.qp-phone:hover { opacity:.85; }
.qp-phone .ico-svg { width:17px; height:17px; }
@media (max-width:560px){ .qp-feat-grid{ grid-template-columns:1fr; } }
.feat-row { display:grid; grid-template-columns:1fr 1fr auto auto; gap:6px; margin-bottom:6px; }
.feat-row input { width:100%; }
.feat-row button { background:var(--panel2); border:1px solid var(--line); color:#f85149; border-radius:6px; padding:0 10px; }

/* SETTINGS-SUBTABS-BLOCK */
.subtabs { margin-bottom: 14px; }
.set-body { margin-top: 4px; }
.integ-block { border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; margin: 14px 0; background: var(--bg2); }
.integ-block .ib-head { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.integ-block .ib-head .chk { margin: 0; }
.integ-block .ib-head .ico-svg { color: var(--brand); }
.gs-ok { display: flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; }
.integ-block .chk { margin: 0 0 4px; font-size: 14px; }
.integ-block .chk b { font-weight: 600; }
.integ-block .hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 4px 0 10px; }
.integ-block input[type="text"] { width: 100%; }
.integ-block .f-lbl { margin: 10px 0 4px; }
.integ-block .f-lbl:first-of-type { margin-top: 4px; }
.dom-steps { margin: 14px 0 4px; display: flex; flex-direction: column; gap: 9px; }
.dom-step { font-size: 13px; color: var(--muted); line-height: 1.45; }
.dom-step b { color: var(--text); font-weight: 600; }

/* --- users / RBAC --- */
.top .who { color: var(--muted); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.who-role { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; text-transform: none; letter-spacing: .2px; }
.who-role.role-admin { background: rgba(255,52,68,.16); color: var(--brand); }
.who-role.role-editor { background: rgba(139,148,158,.18); color: var(--muted); }
.wrap .hint { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 4px 0 18px; }
.utable { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.utable th, .utable td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.utable th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; background: var(--panel2); }
.utable tr:last-child td { border-bottom: none; }
.utable .uacts { text-align: right; white-space: nowrap; }
.utable .uacts .btn { margin-left: 6px; }
.utable .you { color: var(--brand); font-size: 11px; font-weight: 600; margin-left: 4px; }
.modal-card label.ml { display: block; margin: 12px 0 5px; font-size: 12px; color: var(--muted); font-weight: 600; }
.modal-card select { width: 100%; }

/* --- project role badges --- */
.prole { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; background: rgba(139,148,158,.18); color: var(--muted); }
.prole-admin, .prole-owner { background: rgba(255,52,68,.16); color: var(--brand); }
.prole-editor { background: rgba(88,166,255,.16); color: #58a6ff; }
.prole-viewer { background: rgba(139,148,158,.18); color: var(--muted); }
.card .qc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.card .qc-head h3 { margin: 0; }
.card .qc-head .prole { flex: none; }

/* --- notification bell --- */
.bell-wrap { position: relative; }
.bell-btn { position: relative; background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 9px; font-size: 15px; cursor: pointer; line-height: 1; }
.bell-btn:hover { background: var(--line); }
.bell-badge { position: absolute; top: -6px; right: -6px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.bell-drop { position: absolute; top: 40px; right: 0; width: 340px; max-height: 460px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.4); z-index: 60; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.bell-readall { background: none; border: none; color: var(--brand); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; text-transform: none; letter-spacing: 0; }
.bell-empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: 13px; }
.bell-item { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bell-item:last-child { border-bottom: none; }
.bell-item.unread { background: rgba(255,52,68,.05); }
.bell-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.bell-body { font-size: 13px; color: var(--muted); line-height: 1.45; }
.bell-acts { margin-top: 9px; display: flex; gap: 8px; }

/* --- access / members --- */
.acc-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px 18px; }
.acc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 0 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.acc-top h2 { margin: 0; font-size: 18px; }
.acc-h { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.mem-tag { display: inline-block; margin-left: 8px; font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.mem-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mem-row:last-child { border-bottom: none; }
.mem-row.pend { opacity: .8; }
.mem-row > div:first-child { min-width: 0; flex: 1; }
.mem-sub { font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.mem-ctl { display: flex; align-items: center; gap: 8px; flex: none; }
.mem-ctl select { width: auto; }
.add-mem { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: center; margin-top: 8px; }
.add-mem input, .add-mem select { width: 100%; }
.add-mem .btn { white-space: nowrap; }
@media (max-width: 680px) {
  .add-mem { grid-template-columns: 1fr 1fr; }
  .add-mem select, .add-mem .btn { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .add-mem { grid-template-columns: 1fr; }
}
