/* ============================================================
   Believer · Onboarding prototype
   Enterprise/Fluent chrome + Believer navy brand accents.
   Themed via CSS custom props on [data-theme].
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@600;700&display=swap');

:root {
  --brand:        #253D83;
  --brand-hover:  #1C2F66;
  --brand-soft:   #EAEEF7;
  --sky:          #B1D4F1;
  --sky-soft:     #E8F1FB;
  --accent:       #FF814A;
  --accent-soft:  #FFEDE3;
  --green:        #107C41;
  --green-soft:   #DCF4E4;
  --amber:        #B8860B;
  --amber-soft:   #FBF0D6;
  --red:          #C0392B;
  --red-soft:     #FBE6E3;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-sm:    6px;
  --font: 'Segoe UI', -apple-system, system-ui, 'Helvetica Neue', sans-serif;
  --wordmark: 'Raleway', var(--font);
}

[data-theme="light"] {
  --page:        #F4F3F2;
  --surface:     #FFFFFF;
  --surface-2:   #F5F4F3;
  --surface-3:   #EDECEB;
  --sidebar:     #FFFFFF;
  --border:      #E6E4E2;
  --border-2:    #D6D4D1;
  --text:        #1F1E1D;
  --text-2:      #605E5C;
  --text-3:      #8A8784;
  --brand-fg:    #253D83;
  --shadow-card: 0 1px 2px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.04);
  --shadow-pop:  0 10px 32px rgba(15,20,40,.16), 0 2px 8px rgba(15,20,40,.08);
  --overlay:     rgba(20,24,38,.45);
}

[data-theme="dark"] {
  --page:        #1A1A1B;
  --surface:     #242526;
  --surface-2:   #2E2F31;
  --surface-3:   #37383A;
  --sidebar:     #202122;
  --border:      #3A3B3D;
  --border-2:    #4A4B4D;
  --text:        #F3F3F2;
  --text-2:      #B9B8B6;
  --text-3:      #87868A;
  --brand:       #3D5BB0;
  --brand-hover: #4D6BC0;
  --brand-soft:  #2A3354;
  --brand-fg:    #9DB4E8;
  --sky-soft:    #243349;
  --accent-soft: #3A2A20;
  --green-soft:  #1B3326;
  --amber-soft:  #322B14;
  --red-soft:    #3A211E;
  --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
  --shadow-pop:  0 12px 36px rgba(0,0,0,.6);
  --overlay:     rgba(0,0,0,.6);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: #2b2b2b;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
#root { height: 100vh; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ---------- Prototype role / theme switcher ---------- */
.protobar {
  position: fixed; z-index: 9000; bottom: 18px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  background: rgba(28,30,38,.92); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px; padding: 5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.protobar .pb-label {
  color: rgba(255,255,255,.55); font-size: 11.5px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; padding: 0 10px 0 12px;
}
.protobar button {
  border: 0; background: transparent; color: rgba(255,255,255,.7);
  font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 999px;
  display: flex; align-items: center; gap: 7px; transition: .18s;
}
.protobar button:hover { color: #fff; }
.protobar button.on { background: #fff; color: #1d2535; }
.protobar .pb-div { width: 1px; height: 20px; background: rgba(255,255,255,.16); margin: 0 4px; }

/* ============================================================
   DESKTOP APP SHELL
   ============================================================ */
.app {
  display: flex; height: 100vh; overflow: hidden;
  background: var(--page); color: var(--text);
}
.sidebar {
  width: 280px; flex-shrink: 0; background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; height: 100%;
}
.sb-logo { padding: 20px 22px 14px; }
.sb-logo img { height: 34px; display: block; }
[data-theme="dark"] .sb-logo img { filter: brightness(0) invert(1) opacity(.92); }
.sb-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.sb-nav::-webkit-scrollbar { width: 8px; }
.sb-nav::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 9px 12px; border: 0; background: transparent; text-align: left;
  border-radius: 8px; color: var(--text-2); font-size: 14.5px; font-weight: 500;
  position: relative; transition: background .14s, color .14s; margin: 1px 0;
}
.nav-item svg { width: 21px; height: 21px; flex-shrink: 0; stroke-width: 1.8; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { color: var(--brand-fg); font-weight: 600; background: var(--brand-soft); }
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.nav-item .ni-avatar { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.nav-sub { padding-left: 18px; }
.nav-caret { margin-left: auto; transition: transform .2s; opacity: .6; }
.nav-caret.open { transform: rotate(180deg); }
.nav-badge {
  margin-left: auto; background: var(--accent); color: #fff; font-size: 11px;
  font-weight: 700; min-width: 19px; height: 19px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.sb-foot { padding: 14px 22px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); line-height: 1.5; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 60px; flex-shrink: 0; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 22px; gap: 18px;
}
.tb-icon {
  width: 38px; height: 38px; border-radius: 8px; border: 0; background: transparent;
  color: var(--text-2); display: flex; align-items: center; justify-content: center;
  transition: background .14s;
}
.tb-icon:hover { background: var(--surface-2); color: var(--text); }
.tb-icon svg { width: 20px; height: 20px; stroke-width: 1.8; }
.tb-spacer { flex: 1; }
.tb-flag { width: 22px; height: 16px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px var(--border); }
.tb-user { display: flex; align-items: center; gap: 11px; padding-left: 6px; }
.tb-user .av { width: 38px; height: 38px; border-radius: 50%; }
.tb-user .nm { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.2; }
.tb-user .rl { font-size: 12px; color: var(--text-2); line-height: 1.3; }

.content { flex: 1; overflow-y: auto; padding: 30px 38px 60px; }
.content::-webkit-scrollbar { width: 11px; }
.content::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 3px solid var(--page); }
.page-wrap { max-width: 1180px; margin: 0 auto; }

/* page header */
.page-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.page-head h1 { font-size: 28px; font-weight: 700; margin: 0 0 5px; letter-spacing: -.01em; }
.page-head p { margin: 0; color: var(--text-2); font-size: 14.5px; max-width: 620px; line-height: 1.5; }
.page-head .ph-actions { margin-left: auto; display: flex; gap: 10px; flex-shrink: 0; }

/* sub-tabs */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.subtab {
  border: 0; background: transparent; padding: 11px 16px 13px; font-size: 14.5px;
  font-weight: 600; color: var(--text-2); position: relative; transition: color .14s;
  display: flex; align-items: center; gap: 8px;
}
.subtab:hover { color: var(--text); }
.subtab.on { color: var(--brand-fg); }
.subtab.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2.5px; background: var(--brand); border-radius: 2px; }
.subtab svg { width: 17px; height: 17px; stroke-width: 1.9; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 6px; border: 1px solid transparent; padding: 9px 16px;
  font-size: 14px; font-weight: 600; transition: .15s; white-space: nowrap; text-decoration: none;
}
.btn svg { width: 17px; height: 17px; stroke-width: 2; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-subtle { background: transparent; color: var(--text-2); }
.btn-subtle:hover { background: var(--surface-2); color: var(--text); }
.btn:active { transform: scale(.98); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { padding: 18px 20px; }
.stat .s-label { font-size: 13px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.stat .s-label svg { width: 16px; height: 16px; }
.stat .s-val { font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.stat .s-sub { font-size: 12.5px; color: var(--text-3); margin-top: 7px; }
.stat .s-ico { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }

/* filter bar */
.filterbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11.5px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
.select, .search {
  height: 36px; border: 1px solid var(--border-2); border-radius: 6px; background: var(--surface);
  color: var(--text); padding: 0 12px; font-size: 14px; min-width: 150px;
}
.search { padding-left: 34px; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.select:focus, .search:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }

/* table / list */
.nlist { display: flex; flex-direction: column; gap: 0; }
.nrow {
  display: grid; grid-template-columns: minmax(0,1fr) 200px 120px 250px; align-items: center; gap: 16px;
  padding: 14px 18px; border-bottom: 1px solid var(--border); transition: background .12s; cursor: pointer;
}
.nrow:last-child { border-bottom: 0; }
.nrow:hover { background: var(--surface-2); }
.nrow-head { font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; cursor: default; background: var(--surface-2); }
.nrow-head:hover { background: var(--surface-2); }
.person { display: flex; align-items: center; gap: 13px; min-width: 0; }
.person .meta .nm { font-weight: 600; font-size: 15px; }
.person .meta .sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

.avatar { border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; overflow: hidden; }

/* progress */
.pbar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.pbar > i { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .6s cubic-bezier(.2,.7,.2,1); }
.pct { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.chip svg { width: 13px; height: 13px; }
.chip.done { background: var(--green-soft); color: var(--green); }
.chip.prog { background: var(--brand-soft); color: var(--brand-fg); }
.chip.idle { background: var(--amber-soft); color: var(--amber); }
.chip.new  { background: var(--sky-soft); color: var(--brand-fg); }
[data-theme="dark"] .chip.idle { color: #E2B95B; }
[data-theme="dark"] .chip.done { color: #5DD08A; }

/* modal */
.modal-overlay { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 24px; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-pop); width: 100%; max-width: 520px; animation: pop .22s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 8px; }
.modal-head h3 { margin: 0; font-size: 19px; font-weight: 700; }
.modal-x { margin-left: auto; border: 0; background: transparent; color: var(--text-2); width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.modal-x:hover { background: var(--surface-2); }
.modal-body { padding: 8px 24px 4px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px 22px; }

textarea.input, input.input {
  width: 100%; border: 1px solid var(--border-2); border-radius: 6px; background: var(--surface);
  color: var(--text); padding: 10px 12px; font-size: 14px; resize: vertical; line-height: 1.5;
}
.input:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }

/* drawer (newcomer detail) */
.drawer-overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 1000; animation: fade .18s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 94vw; background: var(--surface); box-shadow: var(--shadow-pop); z-index: 1001; display: flex; flex-direction: column; animation: slidein .26s cubic-bezier(.2,.8,.2,1); }
@keyframes slidein { from { transform: translateX(40px); opacity: .4; } }
.drawer-head { padding: 22px 26px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px 26px; }
.drawer-foot { padding: 16px 26px; border-top: 1px solid var(--border); display: flex; gap: 10px; }

/* timeline (newcomer detail steps) */
.tline { position: relative; padding-left: 30px; }
.tline::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tstep { position: relative; padding: 0 0 22px; }
.tstep:last-child { padding-bottom: 0; }
.tstep .tdot { position: absolute; left: -30px; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 2px solid var(--border-2); }
.tstep.done .tdot { background: var(--green); border-color: var(--green); }
.tstep.done .tdot svg { width: 11px; height: 11px; color: #fff; stroke-width: 3; }
.tstep .tt { font-weight: 600; font-size: 14.5px; }
.tstep .td { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.tstep.done .tt { color: var(--text-2); }

/* analytics cards */
.chart-card { padding: 22px 24px; }
.chart-card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.chart-card .csub { font-size: 13px; color: var(--text-3); margin: 0 0 18px; }
.analytics-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.legend { display: flex; flex-direction: column; gap: 11px; }
.legend .lrow { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.legend .ldot { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.legend .lval { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.tooltip { position: absolute; pointer-events: none; background: var(--text); color: var(--surface); padding: 6px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; transform: translate(-50%, -130%); z-index: 5; box-shadow: var(--shadow-pop); opacity: 0; transition: opacity .12s; }
.tooltip.show { opacity: 1; }

/* reminders */
.rem-card { padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.rem-card + .rem-card { margin-top: 12px; }
.summary-banner { display: flex; align-items: center; gap: 18px; padding: 22px 26px; border-radius: 14px; background: linear-gradient(110deg, var(--brand-soft), var(--sky-soft)); border: 1px solid var(--border); margin-bottom: 26px; }
.summary-banner .sb-num { font-size: 44px; font-weight: 800; color: var(--brand-fg); line-height: 1; }

/* empty / misc */
.muted { color: var(--text-2); }
.sr-section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 0 0 14px; }

/* toast */
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-pop); z-index: 9500; display: flex; align-items: center; gap: 10px; animation: pop .2s ease; }
.toast svg { width: 18px; height: 18px; color: #5DD08A; }

/* ============================================================
   Templates — onboarding content builder
   ============================================================ */
.tpl-layout { display: grid; grid-template-columns: 268px 1fr; gap: 20px; align-items: start; }

/* rail */
.tpl-rail { position: sticky; top: 0; }
.tpl-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); margin-bottom: 9px; cursor: pointer; transition: .15s; color: var(--text); }
.tpl-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-card); }
.tpl-card.on { border-color: var(--brand); background: var(--brand-soft); }
.tpl-ico { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; padding: 0; overflow: hidden; }
.tpl-ico.lg { width: 46px; height: 46px; border-radius: 12px; }
.tpl-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpl-card-body { display: flex; flex-direction: column; min-width: 0; }
.tpl-card-name { font-weight: 700; font-size: 14px; line-height: 1.25; }
.tpl-card-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* editor */
.tpl-editor { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.tpl-editor-head { display: flex; flex-direction: column; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.tpl-editor-head h2 { color: var(--text); }
.tpl-head-main { display: flex; align-items: center; gap: 14px; }
.tpl-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tpl-canvas { padding: 22px 24px 26px; max-width: 760px; }

/* block */
.blk { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 12px; position: relative; transition: .15s; }
.blk:hover { border-color: var(--border-2); }
.blk.preview { background: var(--surface-2); }
.blk-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.blk-badge { width: 30px; height: 30px; border-radius: 8px; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.blk-grip { color: var(--text-3); cursor: grab; opacity: .5; }
.blk-main { flex: 1; min-width: 0; }
.blk-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.blk-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.blk-tools { display: flex; gap: 2px; opacity: 0; transition: .15s; }
.blk:hover .blk-tools { opacity: 1; }
.blk-tools button { width: 26px; height: 26px; border-radius: 6px; border: none; background: transparent; color: var(--text-2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.blk-tools button:hover { background: var(--surface-3); color: var(--text); }
.blk-tools button.danger:hover { background: var(--red-soft); color: var(--red); }
.blk-tools button:disabled { opacity: .3; cursor: default; }
.blk-title-input, .blk-line { width: 100%; border: 1px solid transparent; background: transparent; font: inherit; color: var(--text); border-radius: 6px; padding: 4px 6px; margin-left: -6px; }
.blk-title-input { font-size: 15.5px; font-weight: 700; }
.blk-title-input:hover, .blk-line:hover { border-color: var(--border); }
.blk-title-input:focus, .blk-line:focus { border-color: var(--brand); background: var(--surface); outline: none; }
.blk-title-static { font-size: 15.5px; font-weight: 700; color: var(--text); }
.blk-area { width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 13.5px; color: var(--text); resize: vertical; margin-top: 8px; }
.blk-area:focus { border-color: var(--brand); outline: none; }
.blk-text { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.blk-line { font-size: 13.5px; margin-top: 6px; }

/* video block */
.blk-video { margin-top: 9px; }
.blk-video-thumb { position: relative; height: 0; padding-bottom: 56.25%; border-radius: 9px; overflow: hidden; background: linear-gradient(135deg, #253D83, #255B84); }
.blk-video-thumb > * { position: absolute; }
.blk-video-img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.blk-video-frame { inset: 0; width: 100%; height: 100%; border: 0; }
.blk-play { top: 50%; left: 50%; transform: translate(-50%,-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.94); color: #253D83; display: flex; align-items: center; justify-content: center; padding-left: 3px; box-shadow: 0 3px 12px rgba(0,0,0,.3); transition: .15s; }
.blk-video-thumb:hover .blk-play { transform: translate(-50%,-50%) scale(1.08); }
.blk-dur { bottom: 8px; right: 9px; background: rgba(0,0,0,.7); color: #fff; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px; }
.blk-yt { top: 8px; left: 8px; display: flex; align-items: center; gap: 4px; background: #FF0000; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 5px; letter-spacing: .02em; }
.blk-video-src { font-size: 12.5px; color: var(--text-3); margin-top: 7px; }
.blk-video-edit { margin-top: 9px; display: flex; flex-direction: column; gap: 8px; }
.blk-line-ico { display: flex; align-items: center; gap: 7px; color: var(--text-3); border: 1px solid var(--border); border-radius: 8px; padding: 2px 10px; }
.blk-line-ico:focus-within { border-color: var(--brand); }
.blk-line-ico .blk-line { margin: 0; padding: 7px 0; }
.blk-line-ico .blk-line:hover, .blk-line-ico .blk-line:focus { border-color: transparent; background: transparent; }
.blk-video-row { display: flex; gap: 8px; }
.blk-video-row .blk-line { border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; margin: 0; }
.blk-line-sm { max-width: 130px; }
.blk-warn { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--amber); }

/* image block */
.blk-image { margin-top: 9px; }
.blk-image-ph { height: 96px; border-radius: 9px; background: var(--surface-2); border: 1px dashed var(--border-2); display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.blk-cap { font-size: 12.5px; color: var(--text-3); margin-top: 7px; font-style: italic; }

/* task block */
.blk-task { display: flex; align-items: center; gap: 10px; margin-top: 9px; background: var(--brand-soft); border-radius: 9px; padding: 10px 12px; }
.blk-task .tdot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--brand); flex-shrink: 0; }
.blk-task-desc { font-size: 13.5px; color: var(--text-2); }

/* quiz block */
.blk-quiz { margin-top: 9px; }
.blk-q { font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.blk-q-opt { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; margin-top: 7px; font-size: 13.5px; color: var(--text-2); }
.blk-q-opt.correct { border-color: var(--green); background: var(--green-soft); color: var(--text); }
.blk-q-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-2); background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; }
.blk-q-opt.correct .blk-q-radio { background: var(--green); border-color: var(--green); }
.blk-q-add { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; font-size: 12.5px; font-weight: 600; color: var(--brand-fg); background: transparent; border: none; cursor: pointer; padding: 4px 2px; }

/* add-block palette */
.blk-add { margin-top: 6px; }
.blk-add-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px; border: 1.5px dashed var(--border-2); border-radius: var(--radius); background: transparent; color: var(--text-2); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: .15s; }
.blk-add-btn:hover { border-color: var(--brand); color: var(--brand-fg); background: var(--brand-soft); }
.blk-palette { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-pop); padding: 14px 16px; }
.blk-palette-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 14px; margin-bottom: 12px; color: var(--text); }
.blk-palette-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.blk-opt { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 11px; align-items: center; text-align: left; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); cursor: pointer; transition: .15s; }
.blk-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.blk-opt .blk-badge { grid-row: 1 / 3; }
.blk-opt-name { font-weight: 700; font-size: 13.5px; color: var(--text); }
.blk-opt-hint { font-size: 11.5px; color: var(--text-3); }
.tpl-empty { text-align: center; padding: 34px; color: var(--text-3); font-size: 14px; }

@media (max-width: 1080px) { .tpl-layout { grid-template-columns: 1fr; } .tpl-rail { position: static; } }

/* live pilot newcomers panel */
.live-panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--brand-soft), var(--surface) 60%); padding: 16px 18px; margin-bottom: 20px; }
.live-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(16,124,65,.5); animation: livepulse 1.8s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(16,124,65,.45); } 70% { box-shadow: 0 0 0 7px rgba(16,124,65,0); } 100% { box-shadow: 0 0 0 0 rgba(16,124,65,0); } }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.live-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 13px; }

/* templates real editor — name/desc inputs + appearance bar */
.tpl-name-input { width: 100%; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 22px; font-weight: 700; color: var(--text); border-radius: 9px; padding: 9px 12px; }
.tpl-desc-input { width: 100%; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 14px; color: var(--text-2); border-radius: 9px; padding: 9px 12px; margin-top: 8px; }
.tpl-name-input:hover, .tpl-desc-input:hover { border-color: var(--border-2); }
.tpl-name-input:focus, .tpl-desc-input:focus { border-color: var(--brand); background: var(--surface); outline: none; }
.appbar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.appbar-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-right: 2px; }
.appbar-div { width: 1px; height: 22px; background: var(--border-2); margin: 0 8px; }
.app-ico { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.app-ico:hover { border-color: var(--brand); color: var(--brand-fg); }
.app-ico.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.app-col { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.app-col.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }

/* image block — upload preview */
.blk-image-ph { position: relative; min-height: 96px; border-radius: 9px; background: var(--surface-2); border: 1px dashed var(--border-2); display: flex; align-items: center; justify-content: center; color: var(--text-3); overflow: hidden; transition: .15s; }
.blk-image-ph:hover { border-color: var(--brand); color: var(--brand-fg); }
.blk-image-ph.has { border-style: solid; padding: 0; min-height: 0; }
.blk-image-empty { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 13px; padding: 26px; }
.blk-image-img { display: block; width: 100%; max-height: 340px; object-fit: cover; }
.blk-image-change { position: absolute; top: 8px; right: 8px; display: flex; align-items: center; gap: 5px; background: rgba(0,0,0,.62); color: #fff; border: none; border-radius: 7px; padding: 5px 9px; font-size: 12px; font-weight: 600; cursor: pointer; }
.blk-image-change:hover { background: rgba(0,0,0,.8); }

/* WhatsApp action button */
.btn-wa { background: #25D366; color: #fff; border: 1px solid #25D366; text-decoration: none; }
.btn-wa:hover { background: #1ebe5b; border-color: #1ebe5b; color: #fff; }
.btn-wa svg { color: #fff; }

/* ============================================================
   Choice block — branching path (gamification)
   ============================================================ */
.choice-edit { margin-top: 8px; }
.choice-hint { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #7A5CA8; margin: 4px 0 12px; }
.choice-branch { border: 1px solid var(--border); border-left: 3px solid var(--bc, var(--brand)); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: var(--surface); }
.choice-branch-head { display: flex; align-items: center; gap: 9px; }
.choice-bico { width: 30px; height: 30px; border-radius: 8px; color: #fff; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; flex-shrink: 0; }
.choice-del { width: 28px; height: 28px; border-radius: 7px; border: none; background: transparent; color: var(--text-3); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.choice-del:hover { background: var(--red-soft); color: var(--red); }
.choice-del:disabled { opacity: .3; cursor: default; }
.choice-branch-body { margin-top: 10px; padding-left: 6px; }
.choice-subblk { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface-2); }
.choice-subhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.choice-empty { font-size: 13px; color: var(--text-3); padding: 8px 0 10px; }
.choice-addblk { display: flex; align-items: center; gap: 6px; width: 100%; justify-content: center; padding: 9px; border: 1.5px dashed var(--border-2); border-radius: 8px; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.choice-addblk:hover { border-color: var(--bc, var(--brand)); color: var(--brand-fg); }
.choice-palette { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.choice-palette .blk-opt { display: flex; align-items: center; gap: 8px; grid-template-columns: none; grid-template-rows: none; padding: 8px 11px; }
.choice-cancel { display: flex; align-items: center; gap: 5px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.choice-addbranch { display: flex; align-items: center; gap: 7px; justify-content: center; width: 100%; padding: 11px; border: 1.5px dashed #7A5CA8; border-radius: 10px; background: transparent; color: #7A5CA8; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.choice-addbranch:hover { background: rgba(122,92,168,.08); }
/* preview */
.choice-prev { margin-top: 8px; }
.choice-q { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14.5px; margin-bottom: 8px; color: #7A5CA8; }
.choice-branches { display: flex; flex-direction: column; gap: 8px; }
.choice-branch-prev { display: flex; align-items: center; gap: 10px; border: 1px solid; border-left-width: 3px; border-radius: 9px; padding: 10px 12px; }

/* New-onboarding picker modal */
.pick-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 16px 0 9px; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pick-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); cursor: pointer; transition: .15s; }
.pick-row:hover { border-color: var(--brand); background: var(--brand-soft); }
.pick-blank { border-style: dashed; }
.pick-ico { width: 38px; height: 38px; border-radius: 10px; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pick-name { display: block; font-weight: 700; font-size: 14px; color: var(--text); }
.pick-sub { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; }

/* logo moved into the top bar (sidebar removed) */
.tb-logo { height: 30px; display: block; margin-right: 6px; }
[data-theme="dark"] .tb-logo { filter: brightness(0) invert(1) opacity(.92); }
/* branded confirm pop-up */
.confirm-ico { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #a5322a; border-color: #a5322a; }

/* icon-only ghost button (e.g. delete newcomer) */
.icon-btn { padding: 6px 8px; }
.icon-btn:hover { background: var(--red-soft); color: var(--red); border-color: var(--red-soft); }

/* custom onboarding icon upload button */
.app-upload { overflow: hidden; padding: 0; }
.app-upload.on { border-color: var(--brand); }

/* ============================================================
   Welcome gate (first-run, before registration)
   ============================================================ */
.welcome { max-width: 560px; margin: 40px auto 0; display: flex; flex-direction: column; align-items: center; }
.welcome-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 40px 40px 32px; text-align: center; width: 100%; }
.welcome-logo { height: 56px; margin-bottom: 18px; }
.welcome-card h1 { font-size: 26px; font-weight: 800; margin: 0 0 10px; letter-spacing: -.01em; }
.welcome-lead { color: var(--text-2); font-size: 15px; line-height: 1.6; margin: 0 auto 26px; max-width: 440px; }
.welcome-points { display: flex; flex-direction: column; gap: 14px; text-align: left; margin-bottom: 28px; }
.welcome-point { display: flex; align-items: flex-start; gap: 13px; }
.welcome-pico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; background: var(--brand-soft); color: var(--brand-fg); display: flex; align-items: center; justify-content: center; }
.welcome-pt { font-weight: 700; font-size: 14.5px; }
.welcome-ptxt { font-size: 13px; color: var(--text-2); margin-top: 1px; line-height: 1.45; }
.welcome-cta { width: 100%; justify-content: center; font-size: 15px; padding: 13px; }
.welcome-login { margin-top: 14px; font-size: 13.5px; color: var(--text-2); }
.welcome-login button { background: none; border: none; color: var(--brand-fg); font-weight: 700; cursor: pointer; font-size: 13.5px; }
.welcome-note { margin-top: 16px; font-size: 12.5px; color: var(--text-3); text-align: center; max-width: 460px; line-height: 1.5; }

/* chip buttons (message templates / mail providers) */
.chip-btn { border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: .14s; }
.chip-btn:hover { border-color: var(--brand); color: var(--brand-fg); }
.chip-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* clickable newcomer row + detail blocks */
.nrow-click { cursor: pointer; }
.nc-misc { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; }
.nc-misc-ico { width: 26px; height: 26px; border-radius: 7px; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nc-misc-t { font-size: 14px; font-weight: 600; }
.nc-misc-s { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }

/* ── Banner: výzva k ověření e-mailu ─────────────────────────── */
.verify-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 14px 26px 0; padding: 11px 16px;
  background: var(--amber-soft); border: 1px solid #EBD9A8; border-radius: 12px;
}
.vb-badge {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  font-size: 12px; font-weight: 700; color: var(--amber);
  background: #fff; border: 1px solid #EBD9A8; border-radius: 999px; padding: 4px 10px;
}
.vb-text { flex: 1; min-width: 220px; font-size: 13.5px; color: #6B5410; line-height: 1.5; }
.vb-text strong { color: #4A3A0B; }
.vb-btn {
  flex: none; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  color: #fff; background: var(--amber); border: none; border-radius: 9px; padding: 8px 16px;
}
.vb-btn:hover { filter: brightness(1.06); }
.vb-btn:disabled { opacity: .6; cursor: default; }

/* ── „Směřuje" chip v přehledu nováčků (zvolený směr z rozcestníku) ── */
.path-chip {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px;
  font-size: 11.5px; font-weight: 600; line-height: 1;
  color: var(--pc, var(--brand)); background: color-mix(in srgb, var(--pc, var(--brand)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--pc, var(--brand)) 30%, transparent);
  border-radius: 999px; padding: 4px 9px;
}
.path-chip svg { flex: none; }

/* ── Přepínač jazyka v hlavičce ─────────────────────────────── */
.lang-switch { display: inline-flex; border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; margin-right: 4px; }
.lang-opt {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .03em;
  padding: 5px 9px; border: none; background: transparent; color: var(--text-3); cursor: pointer; line-height: 1;
}
.lang-opt:hover { color: var(--text-2); }
.lang-opt.on { background: var(--brand-soft); color: var(--brand-fg); }

/* ── Modal správců společenství ─────────────────────────────── */
.admin-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.admin-row + .admin-row { border-top: 1px solid var(--border); }
