/* =============================================
   ConfBridge Manager — Professional Dashboard UI
   Complete Visual Redesign
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ─── Design Tokens ──────────────────────────────────────────────────────── */
:root{
  /* Primary brand — deep blue-indigo */
  --brand-50:#eef2ff;--brand-100:#e0e7ff;--brand-200:#c7d2fe;
  --brand-400:#818cf8;--brand-500:#6366f1;--brand-600:#4f46e5;--brand-700:#4338ca;

  /* Extended palette */
  --blue-50:#eff6ff;--blue-100:#dbeafe;--blue-200:#bfdbfe;
  --blue-400:#60a5fa;--blue-500:#3b82f6;--blue-600:#2563eb;--blue-700:#1d4ed8;
  --indigo-400:#818cf8;--indigo-500:#6366f1;--indigo-600:#4f46e5;
  --violet-400:#a78bfa;--violet-500:#8b5cf6;
  --emerald-400:#34d399;--emerald-500:#10b981;--emerald-600:#059669;
  --amber-400:#fbbf24;--amber-500:#f59e0b;--amber-600:#d97706;
  --rose-400:#fb7185;--rose-500:#f43f5e;

  /* Accent */
  --accent:#6366f1;--accent-hover:#4f46e5;
  --accent-soft:rgba(99,102,241,.08);--accent-glow:rgba(99,102,241,.18);
  --accent-light:#eef2ff;

  /* Surface system — warm neutral with depth */
  --surface-app:#f4f6fb;
  --surface-0:#ffffff;
  --surface-1:#f8f9fc;
  --surface-2:#f1f3f8;
  --surface-3:#e4e7ef;
  --surface-4:#d1d5e0;
  --surface-5:#9ca3b4;

  /* Legacy aliases for existing selectors */
  --s0:#ffffff;--s50:#f8f9fc;--s100:#f1f3f8;--s200:#e4e7ef;--s300:#d1d5e0;--s400:#9ca3b4;
  --tx:#1a1d2b;--tx2:#4a5068;--tx3:#8b92a8;

  /* Status */
  --ok:#059669;--ok-bg:#ecfdf5;--ok-bd:#a7f3d0;
  --warn:#d97706;--warn-bg:#fffbeb;--warn-bd:#fde68a;
  --err:#dc2626;--err-bg:#fef2f2;--err-bd:#fecaca;

  /* Room colors */
  --room-listen:#2563eb;--room-listen-bg:#eff6ff;--room-listen-bd:#bfdbfe;
  --room-speech:#059669;--room-speech-bg:#ecfdf5;--room-speech-bd:#a7f3d0;
  --room-admin:#d97706;--room-admin-bg:#fffbeb;--room-admin-bd:#fde68a;

  /* Layout */
  --header-h:60px;

  /* Radius — rounder, friendlier */
  --r-xs:4px;--r-sm:8px;--r-md:12px;--r-lg:16px;--r-xl:20px;--r-2xl:24px;--r-full:9999px;

  /* Shadows — layered for depth */
  --sh-xs:0 1px 2px rgba(0,0,0,.03);
  --sh-sm:0 1px 3px rgba(0,0,0,.04),0 1px 2px rgba(0,0,0,.03);
  --sh-md:0 4px 12px rgba(0,0,0,.06),0 1px 3px rgba(0,0,0,.04);
  --sh-lg:0 10px 30px rgba(0,0,0,.08),0 4px 10px rgba(0,0,0,.04);
  --sh-xl:0 20px 50px rgba(0,0,0,.12),0 8px 20px rgba(0,0,0,.06);
  --sh-glow:0 0 0 3px var(--accent-glow);
  --sh-card:0 1px 3px rgba(0,0,0,.04),0 0 0 1px rgba(0,0,0,.02);
  --sh-card-hover:0 8px 24px rgba(0,0,0,.08),0 2px 6px rgba(0,0,0,.04);

  /* Motion */
  --dur:.2s;--ease:cubic-bezier(.4,0,.2,1);--spring:cubic-bezier(.34,1.56,.64,1);
  --mono:'JetBrains Mono',monospace;
}

/* ─── Reset ───────────────────────────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:15px;scroll-behavior:smooth}
body{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  direction:rtl;background:var(--surface-app);color:var(--tx);line-height:1.6;
  height:100vh;overflow:hidden;
  -webkit-font-smoothing:antialiased;
}
button{font-family:inherit;cursor:pointer;border:none;outline:none;transition:all var(--dur) var(--ease)}
button:focus-visible{box-shadow:var(--sh-glow)}
input,select,textarea{
  font-family:inherit;outline:none;
  border:1.5px solid var(--surface-3);border-radius:var(--r-md);
  padding:.7rem 1rem;font-size:.875rem;width:100%;
  background:var(--surface-0);color:var(--tx);
  transition:all var(--dur) var(--ease);
}
input:focus,select:focus{
  border-color:var(--accent);
  box-shadow:var(--sh-glow);
}
input::placeholder{color:var(--surface-5)}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
code{font-family:var(--mono);font-size:.85em;background:var(--surface-2);padding:.15em .4em;border-radius:var(--r-xs)}

/* ─── App Shell ──────────────────────────────────────────────────────────── */
#app{height:100vh;display:flex;flex-direction:column;overflow:hidden}
#main-container{flex:1;display:flex;overflow:hidden;min-height:0}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER — Clean elevated bar with brand identity
   ═══════════════════════════════════════════════════════════════════════════ */
.app-header{
  height:var(--header-h);
  background:linear-gradient(180deg,rgba(255,255,255,.92) 0%,rgba(255,255,255,.82) 100%);
  backdrop-filter:blur(16px) saturate(180%);
  -webkit-backdrop-filter:blur(16px) saturate(180%);
  display:flex;align-items:center;padding:0 1.75rem;gap:1rem;
  border-bottom:1px solid rgba(228,231,239,.7);
  box-shadow:0 1px 2px rgba(15,23,42,.04),0 1px 0 rgba(255,255,255,.6) inset;
  position:sticky;top:0;z-index:100;
}
.header-brand{display:flex;align-items:center;gap:.85rem;min-width:0;flex-shrink:1}
.logo-icon{
  width:40px;height:40px;border-radius:12px;
  background:linear-gradient(135deg,var(--brand-500) 0%,var(--brand-600) 50%,var(--brand-700) 100%);
  display:flex;align-items:center;justify-content:center;
  color:#fff;flex-shrink:0;position:relative;
  box-shadow:0 4px 14px -3px rgba(99,102,241,.5),0 1px 2px rgba(99,102,241,.2),inset 0 1px 0 rgba(255,255,255,.25);
}
.logo-icon::before{
  content:'';position:absolute;inset:0;border-radius:inherit;
  background:linear-gradient(135deg,rgba(255,255,255,.22),transparent 55%);
  pointer-events:none;
}
.header-brand-text{display:flex;flex-direction:column;line-height:1.1;white-space:nowrap;gap:2px}
.brand-title{font-size:.95rem;font-weight:700;color:var(--tx);letter-spacing:-.025em}
.brand-subtitle{
  font-size:.64rem;font-weight:600;color:var(--tx3);
  letter-spacing:.08em;text-transform:uppercase;
}
.header-brand-sep{
  width:1px;height:28px;flex-shrink:0;margin:0 .35rem;
  background:linear-gradient(to bottom,transparent,var(--surface-3) 25%,var(--surface-3) 75%,transparent);
}

.header-breadcrumb{display:flex;align-items:center;gap:.25rem;font-size:.83rem;color:var(--tx3);min-width:0}
.header-breadcrumb a{
  color:var(--tx2);text-decoration:none;font-weight:500;
  padding:.35rem .65rem;border-radius:var(--r-sm);
  transition:background var(--dur) var(--ease),color var(--dur) var(--ease);
}
.header-breadcrumb a:hover{color:var(--accent);background:var(--accent-soft);text-decoration:none}
.header-breadcrumb .sep{
  display:inline-flex;align-items:center;justify-content:center;
  color:var(--surface-5);opacity:.7;
}
.header-breadcrumb .current{
  color:var(--tx);font-weight:600;
  padding:.35rem .7rem;border-radius:var(--r-sm);
  background:var(--surface-2);border:1px solid var(--surface-3);
}

.header-spacer{flex:1}

.header-user{
  display:flex;align-items:center;gap:.65rem;
  padding:.3rem .85rem;border-radius:var(--r-full);
  background:var(--surface-1);border:1px solid var(--surface-3);flex-shrink:0;
  transition:all var(--dur) var(--ease);
  cursor:default;
}
.header-user:hover{
  background:var(--surface-0);border-color:var(--brand-200);
  box-shadow:0 2px 10px -2px rgba(99,102,241,.18);
}
.header-user-avatar{
  width:32px;height:32px;border-radius:50%;
  background:linear-gradient(135deg,var(--brand-500),var(--brand-700));
  color:#fff;display:flex;align-items:center;justify-content:center;
  flex-shrink:0;font-size:.85rem;font-weight:700;letter-spacing:0;
  box-shadow:0 2px 6px -1px rgba(99,102,241,.4),inset 0 1px 0 rgba(255,255,255,.25);
  text-transform:uppercase;
}
.header-user-text{display:flex;flex-direction:column;line-height:1.2;white-space:nowrap;gap:2px}
.header-user-name{font-size:.82rem;font-weight:700;color:var(--tx);letter-spacing:-.01em}
.header-user-num{
  font-size:.7rem;font-weight:500;color:var(--tx3);
  font-family:var(--mono);letter-spacing:.01em;
}

.header-divider{
  width:1px;height:28px;flex-shrink:0;
  background:linear-gradient(to bottom,transparent,var(--surface-3) 25%,var(--surface-3) 75%,transparent);
}

.btn-logout-ghost{
  display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;padding:0;margin-inline-end:.25rem;
  background:transparent;color:var(--tx3);border-radius:var(--r-md);
  border:1px solid transparent;flex-shrink:0;cursor:pointer;
  transition:all var(--dur) var(--ease);
}
.btn-logout-ghost:hover{
  background:var(--err-bg);color:var(--err);
  border-color:var(--err-bd);
}
.btn-logout-ghost:active{transform:scale(.94)}
.btn-logout-ghost svg{flex-shrink:0}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN — Premium centered card with glass-like effects
   ═══════════════════════════════════════════════════════════════════════════ */
.login-page{
  flex:1;display:flex;align-items:center;justify-content:center;
  background:
    radial-gradient(ellipse at 30% 20%,rgba(99,102,241,.06) 0%,transparent 50%),
    radial-gradient(ellipse at 70% 80%,rgba(59,130,246,.05) 0%,transparent 50%),
    linear-gradient(160deg,#eef2ff 0%,#f0f4ff 30%,#f8f9fc 100%);
  padding:1.5rem;position:relative;overflow:hidden;
}
.login-page::before,.login-page::after{content:'';position:absolute;border-radius:50%;filter:blur(100px);pointer-events:none;opacity:.7}
.login-page::before{width:500px;height:500px;background:rgba(99,102,241,.08);top:-200px;left:-100px}
.login-page::after{width:400px;height:400px;background:rgba(59,130,246,.06);bottom:-150px;right:-100px}

.login-card{
  background:var(--surface-0);border:1px solid var(--surface-3);border-radius:var(--r-2xl);
  box-shadow:var(--sh-lg);
  padding:2.8rem 2.5rem;width:100%;max-width:420px;position:relative;z-index:1;
}
.login-card input{background:var(--surface-1);border-color:var(--surface-3)}
.login-card input:focus{border-color:var(--accent);background:var(--surface-0);box-shadow:var(--sh-glow)}
.login-card .form-group label{text-transform:none;letter-spacing:0;font-size:.82rem;color:var(--tx2)}

.login-logo{text-align:center;margin-bottom:2.2rem;position:relative}
.login-logo .icon-wrap{
  position:relative;
  width:76px;height:76px;
  background:linear-gradient(145deg,var(--brand-50),var(--brand-100));
  border:1px solid rgba(99,102,241,.15);border-radius:22px;
  display:inline-flex;align-items:center;justify-content:center;margin-bottom:1.2rem;
  color:var(--accent);
  box-shadow:0 8px 32px -8px rgba(99,102,241,.3),inset 0 1px 0 rgba(255,255,255,.9);
}
.login-logo .icon-wrap::before{
  content:'';position:absolute;inset:-16px;border-radius:50%;
  background:radial-gradient(circle,rgba(99,102,241,.18) 0%,transparent 65%);
  z-index:-1;pointer-events:none;
}
.login-logo .icon-wrap svg{color:var(--accent);position:relative;z-index:1}
.login-logo h1{font-size:1.55rem;font-weight:800;color:var(--tx);letter-spacing:-.03em;line-height:1.2}
.login-logo p{font-size:.84rem;color:var(--tx3);margin-top:.4rem;letter-spacing:.01em}

.form-group{margin-bottom:1.1rem}
.form-group label{display:block;font-size:.78rem;font-weight:600;color:var(--tx2);margin-bottom:.45rem;letter-spacing:.02em;text-transform:uppercase}
.form-group .input-wrap{position:relative}
.form-group .input-icon{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);color:var(--tx3);pointer-events:none;display:flex}
.form-group input.with-icon{padding-left:2.4rem}
.modal-card .form-group label{color:var(--tx2);text-transform:none;letter-spacing:0;font-size:.84rem}

.checkbox-row{display:flex;align-items:center;gap:.5rem;margin-bottom:1.1rem}
.checkbox-row input[type=checkbox]{width:17px;height:17px;accent-color:var(--accent);cursor:pointer;border-radius:var(--r-xs)}
.checkbox-row label{font-size:.82rem;color:var(--tx2);cursor:pointer}
.modal-card .checkbox-row label{color:var(--tx2)}

.btn-primary{
  width:100%;padding:.8rem 1.2rem;
  background:linear-gradient(135deg,var(--brand-500),var(--brand-600));
  color:#fff;
  border-radius:var(--r-md);font-size:.9rem;font-weight:700;text-align:center;
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  box-shadow:0 2px 12px rgba(99,102,241,.3);
  letter-spacing:-.01em;
}
.btn-primary:hover:not(:disabled){
  background:linear-gradient(135deg,var(--brand-600),var(--brand-700));
  box-shadow:0 6px 20px rgba(99,102,241,.4);
  transform:translateY(-1px);
}
.btn-primary:active:not(:disabled){transform:translateY(0)}
.btn-primary:disabled{opacity:.45;cursor:not-allowed}
.btn-primary svg,.btn-primary .btn-arrow{flex-shrink:0}

.form-error{
  display:flex;align-items:flex-start;gap:.55rem;
  background:var(--err-bg);color:var(--err);border:1px solid var(--err-bd);
  border-radius:var(--r-md);padding:.7rem .9rem;font-size:.84rem;margin-bottom:.9rem;font-weight:500;
  line-height:1.45;
  animation:fade-in-up .25s var(--ease);
}
.form-error svg{flex-shrink:0;margin-top:2px;color:var(--err)}
.form-error.shake{animation:fade-in-up .25s var(--ease), shake-x .4s var(--ease)}
.modal-card .form-error{background:var(--err-bg);color:var(--err);border-color:var(--err-bd)}

@keyframes fade-in-up{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
@keyframes shake-x{
  0%,100%{transform:translateX(0)}
  20%{transform:translateX(-6px)}
  40%{transform:translateX(6px)}
  60%{transform:translateX(-4px)}
  80%{transform:translateX(4px)}
}

/* ─── MFA — Two-step authentication view ────────────────────────────────── */
.mfa-view{animation:fade-in-up .3s var(--ease)}

.mfa-header{text-align:center;margin-bottom:1.4rem}
.mfa-header h2{
  font-size:1.15rem;font-weight:800;color:var(--tx);
  letter-spacing:-.02em;margin-bottom:.35rem;
}
.mfa-header p{
  font-size:.82rem;color:var(--tx3);line-height:1.5;
  max-width:320px;margin:0 auto;
}
.mfa-badge{
  position:relative;
  width:60px;height:60px;margin:0 auto .9rem;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:18px;
  background:linear-gradient(145deg,var(--brand-50),var(--brand-100));
  border:1px solid rgba(99,102,241,.18);
  color:var(--accent);
  box-shadow:0 6px 20px -6px rgba(99,102,241,.35),inset 0 1px 0 rgba(255,255,255,.9);
}
.mfa-badge::before{
  content:'';position:absolute;inset:-10px;border-radius:50%;
  background:radial-gradient(circle,rgba(99,102,241,.15) 0%,transparent 65%);
  z-index:-1;pointer-events:none;
}

.mfa-section-label{
  font-size:.72rem;font-weight:700;color:var(--tx3);
  text-transform:uppercase;letter-spacing:.08em;
  margin-bottom:.55rem;
}

/* Method list */
.mfa-methods{display:flex;flex-direction:column;gap:.5rem;margin-bottom:1rem}
.mfa-loading{
  padding:1rem;text-align:center;color:var(--tx3);font-size:.82rem;
  background:var(--surface-1);border:1px dashed var(--surface-3);
  border-radius:var(--r-md);
}
.mfa-method-card{
  display:flex;align-items:center;gap:.75rem;
  padding:.75rem .9rem;width:100%;
  background:var(--surface-0);color:var(--tx);
  border:1.5px solid var(--surface-3);border-radius:var(--r-md);
  text-align:right;cursor:pointer;
  transition:all var(--dur) var(--ease);
  box-shadow:var(--sh-xs);
}
.mfa-method-card:hover{
  background:var(--brand-50);border-color:var(--brand-200);
  box-shadow:var(--sh-md);transform:translateY(-1px);
}
.mfa-method-card:active{transform:translateY(0)}
.mfa-method-icon{
  flex-shrink:0;
  width:40px;height:40px;border-radius:var(--r-md);
  display:inline-flex;align-items:center;justify-content:center;
  background:linear-gradient(145deg,var(--brand-50),var(--brand-100));
  color:var(--accent);
  border:1px solid rgba(99,102,241,.15);
}
.mfa-method-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:.15rem}
.mfa-method-type{
  font-size:.7rem;font-weight:700;color:var(--tx3);
  text-transform:uppercase;letter-spacing:.06em;
}
.mfa-method-value{
  font-size:.9rem;font-weight:600;color:var(--tx);
  font-family:var(--mono);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  text-align:right;
}
.mfa-method-arrow{
  color:var(--tx3);flex-shrink:0;
  transition:transform var(--dur) var(--ease),color var(--dur) var(--ease);
}
.mfa-method-card:hover .mfa-method-arrow{
  color:var(--accent);transform:translateX(-3px);
}

/* Sent banner */
.mfa-sent-banner{
  display:flex;align-items:center;gap:.5rem;
  padding:.6rem .85rem;margin-bottom:1rem;
  background:var(--ok-bg);color:var(--ok);
  border:1px solid var(--ok-bd);border-radius:var(--r-md);
  font-size:.8rem;font-weight:500;line-height:1.4;
}
.mfa-sent-banner svg{flex-shrink:0}

/* Code entry */
.mfa-code-group{margin-bottom:.85rem}
.mfa-code-input{
  font-family:var(--mono);
  font-size:1.65rem;font-weight:700;
  text-align:center;letter-spacing:.45em;
  padding:.85rem 1rem;
  background:var(--surface-1);
  color:var(--tx);
}
.mfa-code-input::placeholder{
  color:var(--surface-4);letter-spacing:.35em;font-weight:500;
}
.mfa-code-input:focus{
  background:var(--surface-0);
  border-color:var(--accent);
  box-shadow:var(--sh-glow);
}

/* Secondary actions */
.mfa-secondary-actions{
  display:flex;align-items:center;justify-content:center;flex-wrap:wrap;
  gap:.35rem;margin-top:.95rem;
}
.mfa-sep{color:var(--tx3);font-weight:700;opacity:.5}
.link-btn{
  display:inline-flex;align-items:center;gap:.35rem;
  background:transparent;border:none;padding:.35rem .5rem;
  font-size:.78rem;font-weight:600;color:var(--accent);
  cursor:pointer;border-radius:var(--r-sm);
  transition:all var(--dur) var(--ease);
}
.link-btn:hover{background:var(--accent-soft);color:var(--accent-hover)}
.link-btn:disabled{opacity:.55;cursor:not-allowed}
.link-btn.is-sending{opacity:.7}
.link-btn svg{flex-shrink:0}

.mfa-back{
  display:flex;margin:1.3rem auto 0;
  color:var(--tx3);
}
.mfa-back:hover{color:var(--tx2);background:var(--surface-2)}

/* ═══════════════════════════════════════════════════════════════════════════
   TREE DASHBOARD — Modern card-based dashboard
   ═══════════════════════════════════════════════════════════════════════════ */
.tree-dashboard{
  flex:1;min-height:0;overflow-y:auto;
  background:var(--surface-app);
}
.tree-dashboard-inner{
  max-width:1320px;margin:0 auto;padding:1.5rem 2rem 3rem;
  display:flex;flex-direction:column;gap:1.25rem;
}

/* Stats — Big hero metric cards */
.tree-stats{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;
}
.stat-card{
  position:relative;display:flex;align-items:center;gap:1rem;
  padding:1.1rem 1.3rem;background:var(--surface-0);
  border:1px solid var(--surface-3);border-radius:var(--r-xl);
  box-shadow:var(--sh-card);overflow:hidden;
  transition:all var(--dur) var(--ease);
}
.stat-card:hover{box-shadow:var(--sh-card-hover);transform:translateY(-1px)}
.stat-card::before{
  content:'';position:absolute;inset:0;pointer-events:none;opacity:.6;
}
.stat-active::before{background:linear-gradient(135deg,rgba(16,185,129,.06),transparent 60%)}
.stat-people::before{background:linear-gradient(135deg,rgba(59,130,246,.06),transparent 60%)}
.stat-icon{
  width:48px;height:48px;display:flex;align-items:center;justify-content:center;
  border-radius:var(--r-lg);flex-shrink:0;position:relative;z-index:1;
}
.stat-active .stat-icon{background:rgba(16,185,129,.1);color:var(--emerald-600)}
.stat-people .stat-icon{background:rgba(59,130,246,.1);color:var(--blue-600)}
.stat-body{display:flex;flex-direction:column;position:relative;z-index:1;min-width:0}
.stat-value{font-size:1.65rem;font-weight:800;color:var(--tx);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.stat-label{font-size:.76rem;color:var(--tx3);margin-top:.3rem;font-weight:500}
.stat-card .live-dot{
  position:absolute;top:.85rem;left:.85rem;width:8px;height:8px;border-radius:50%;
  background:var(--emerald-500);box-shadow:0 0 0 0 rgba(16,185,129,.7);
  animation:live-pulse 1.8s ease-in-out infinite;
}
.stat-active.is-live .stat-value{color:var(--emerald-600)}
@keyframes live-pulse{
  0%{box-shadow:0 0 0 0 rgba(16,185,129,.5)}
  70%{box-shadow:0 0 0 8px rgba(16,185,129,0)}
  100%{box-shadow:0 0 0 0 rgba(16,185,129,0)}
}

/* Toolbar — Clean elevated bar */
.tree-toolbar{
  display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;
  padding:.6rem .85rem;background:var(--surface-0);border:1px solid var(--surface-3);
  border-radius:var(--r-xl);box-shadow:var(--sh-card);
}
.tree-crumbs{display:flex;align-items:center;gap:.25rem;flex-wrap:wrap;flex:1;min-width:0}
.crumb{
  display:inline-flex;align-items:center;gap:.35rem;
  padding:.4rem .7rem;background:transparent;color:var(--tx2);
  border:1.5px solid transparent;border-radius:var(--r-md);
  font-size:.82rem;font-weight:500;cursor:pointer;
  transition:all var(--dur) var(--ease);
}
.crumb:hover{background:var(--surface-2);color:var(--tx)}
.crumb.active{
  background:var(--brand-50);color:var(--accent);
  border-color:var(--brand-200);font-weight:600;cursor:default;
}
.crumb svg{flex-shrink:0;opacity:.8}
.crumb-code{font-family:var(--mono);font-size:.7rem;opacity:.55;padding:.08rem .35rem;background:rgba(0,0,0,.04);border-radius:var(--r-sm)}
.crumb.active .crumb-code{background:rgba(99,102,241,.1);opacity:.85}
.crumb-sep{color:var(--tx3);opacity:.45;flex-shrink:0;margin:0 -.05rem}

.tree-toolbar-actions{display:flex;align-items:center;gap:.5rem;flex-shrink:0}
.tree-search{position:relative;display:flex;align-items:center}
.tree-search input{
  width:250px;padding:.5rem .75rem .5rem 2.2rem;
  background:var(--surface-1);border:1.5px solid var(--surface-3);border-radius:var(--r-md);
  font-size:.82rem;color:var(--tx);transition:all var(--dur) var(--ease);
}
.tree-search input:focus{background:var(--surface-0);border-color:var(--accent);box-shadow:var(--sh-glow);outline:none}
.tree-search .search-icon{position:absolute;left:.7rem;color:var(--tx3);pointer-events:none}

.btn-setup{
  display:inline-flex;align-items:center;gap:.4rem;
  padding:.5rem .9rem;
  background:linear-gradient(135deg,var(--brand-50),rgba(139,92,246,.08));
  color:var(--violet-500);
  border-radius:var(--r-md);font-size:.8rem;font-weight:600;
  border:1.5px solid rgba(139,92,246,.2);
  transition:all var(--dur) var(--ease);cursor:pointer;
}
.btn-setup:hover{
  background:linear-gradient(135deg,rgba(139,92,246,.14),rgba(99,102,241,.14));
  border-color:rgba(139,92,246,.35);transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(139,92,246,.15);
}
.btn-setup svg{flex-shrink:0}

.btn-back{
  display:flex;align-items:center;gap:.35rem;padding:.45rem .85rem;
  background:var(--surface-1);color:var(--tx2);border-radius:var(--r-md);
  font-size:.8rem;font-weight:600;border:1.5px solid var(--surface-3);
  transition:all var(--dur) var(--ease);
}
.btn-back:hover{background:var(--surface-2);color:var(--tx);border-color:var(--surface-4)}

/* Grid area */
.tree-grid-wrap{display:flex;flex-direction:column;gap:1rem;min-height:260px}
.grid-section-label{
  display:flex;align-items:center;gap:.55rem;
  padding:.4rem .15rem .15rem;
  font-size:.78rem;font-weight:700;color:var(--tx2);letter-spacing:.01em;
}
.grid-section-label .section-count{
  font-size:.7rem;color:var(--tx3);background:var(--surface-2);padding:.1rem .5rem;
  border-radius:var(--r-full);font-weight:600;
}

.tree-grid{
  display:grid;gap:1rem;
  grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
}

/* Cards — Elevated, rounded, with clear hover */
.tree-card{
  position:relative;display:flex;flex-direction:column;gap:.65rem;
  padding:1.1rem 1.15rem .95rem;
  background:var(--surface-0);border:1.5px solid var(--surface-3);border-radius:var(--r-xl);
  box-shadow:var(--sh-card);
  text-align:right;cursor:pointer;
  transition:all var(--dur) var(--ease);
  overflow:hidden;
}
.tree-card::before{
  content:'';position:absolute;inset:0;pointer-events:none;opacity:0;
  transition:opacity var(--dur) var(--ease);
}
.tree-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--sh-card-hover);
  border-color:var(--surface-4);
}
.tree-card:hover::before{opacity:1}

.card-top{display:flex;align-items:center;justify-content:space-between;gap:.5rem;position:relative;z-index:1}
.card-icon{
  width:46px;height:46px;display:flex;align-items:center;justify-content:center;
  border-radius:var(--r-lg);flex-shrink:0;
}
.folder-icon{
  background:linear-gradient(145deg,var(--surface-2),var(--surface-3));color:var(--tx2);
  border:1px solid var(--surface-3);
}
.conf-icon{
  background:linear-gradient(145deg,var(--brand-50),var(--brand-100));
  color:var(--accent);
  border:1px solid var(--brand-200);
}

.card-chip{
  display:inline-flex;align-items:center;gap:.3rem;
  font-size:.7rem;font-weight:700;
  padding:.22rem .6rem;border-radius:var(--r-full);
  font-variant-numeric:tabular-nums;
}
.card-chip-conf{background:var(--brand-50);color:var(--accent);border:1px solid var(--brand-200)}
.card-chip-conf svg{opacity:.85}
.card-chip-live{
  background:linear-gradient(135deg,var(--emerald-500),var(--emerald-600));color:#fff;
  box-shadow:0 2px 8px rgba(16,185,129,.3);
}
.card-chip-live .live-dot{
  width:6px;height:6px;border-radius:50%;background:#fff;
  box-shadow:0 0 0 0 rgba(255,255,255,.7);
  animation:live-pulse-sm 1.6s ease-in-out infinite;
}
@keyframes live-pulse-sm{
  0%{box-shadow:0 0 0 0 rgba(255,255,255,.7)}
  70%{box-shadow:0 0 0 6px rgba(255,255,255,0)}
  100%{box-shadow:0 0 0 0 rgba(255,255,255,0)}
}
.card-chip-idle{background:var(--surface-2);color:var(--tx3);border:1px solid var(--surface-3)}

.card-body{display:flex;flex-direction:column;gap:.2rem;position:relative;z-index:1}
.card-title{
  font-size:.95rem;font-weight:700;color:var(--tx);letter-spacing:-.01em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.card-path{font-size:.72rem;color:var(--tx3);line-height:1.3}
.card-path code{font-family:var(--mono);background:transparent;padding:0;color:var(--tx3)}

.card-foot{
  display:flex;align-items:center;justify-content:space-between;gap:.5rem;
  margin-top:.35rem;padding-top:.6rem;border-top:1px solid var(--surface-2);
  position:relative;z-index:1;
}
.card-count{font-size:.72rem;color:var(--tx3);font-weight:600}
.card-enter{
  width:24px;height:24px;display:flex;align-items:center;justify-content:center;
  border-radius:var(--r-sm);background:var(--surface-2);color:var(--tx3);
  transition:all var(--dur) var(--ease);
}
.tree-card-folder:hover .card-enter{background:var(--brand-50);color:var(--accent)}

/* Conf room — live-state accent */
.tree-card-conf::before{
  background:linear-gradient(135deg,rgba(99,102,241,.03),rgba(59,130,246,.03));
}
.tree-card-conf:hover{border-color:var(--brand-200)}
.tree-card-conf.is-live{border-color:rgba(16,185,129,.35)}
.tree-card-conf.is-live::before{
  opacity:1;
  background:linear-gradient(135deg,rgba(16,185,129,.05),transparent 60%);
}
.tree-card-conf.is-live .conf-icon{
  background:linear-gradient(145deg,rgba(16,185,129,.12),rgba(5,150,105,.08));
  border-color:rgba(16,185,129,.25);color:var(--emerald-600);
}
.card-enter-cta{
  display:inline-flex;align-items:center;gap:.3rem;
  font-size:.78rem;font-weight:700;color:var(--accent);
  transition:gap var(--dur) var(--ease);
}
.tree-card-conf:hover .card-enter-cta{gap:.5rem}
.tree-card-conf.is-live .card-enter-cta{color:var(--emerald-600)}
.card-edit-pairing{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:var(--r-sm);color:var(--tx3);opacity:.5;transition:all var(--dur) var(--ease);cursor:pointer}
.card-edit-pairing:hover{opacity:1;color:var(--accent);background:var(--accent-ghost)}

/* States */
.tree-loading-center{
  display:flex;align-items:center;justify-content:center;gap:.6rem;
  padding:3.5rem 1rem;color:var(--tx3);font-size:.86rem;
}
.tree-empty-state{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:.4rem;padding:4rem 1.5rem;text-align:center;color:var(--tx3);
  background:var(--surface-0);border:2px dashed var(--surface-3);border-radius:var(--r-xl);
}
.tree-empty-state .empty-icon{
  width:76px;height:76px;border-radius:50%;
  background:linear-gradient(145deg,var(--brand-50),var(--blue-50));
  display:flex;align-items:center;justify-content:center;margin-bottom:.6rem;
  color:var(--accent);opacity:.6;
}
.tree-empty-state h3{font-size:1.05rem;font-weight:700;color:var(--tx)}
.tree-empty-state p{font-size:.85rem;color:var(--tx3);margin-top:.2rem}
.tree-error{padding:2rem;text-align:center;color:var(--err);font-size:.88rem}
.tree-error a{color:var(--accent);text-decoration:underline;font-weight:600}

.rooms-idle{
  display:flex;align-items:center;justify-content:center;gap:.5rem;
  padding:1.3rem 1rem;color:var(--tx3);font-size:.84rem;
  background:var(--surface-0);border:2px dashed var(--surface-3);border-radius:var(--r-xl);
}
.rooms-idle svg{opacity:.5}

/* ═══════════════════════════════════════════════════════════════════════════
   ROOM VIEW — Professional multi-column workspace
   ═══════════════════════════════════════════════════════════════════════════ */
.room-fullpage{display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden;background:var(--surface-app)}

/* Action bar */
.room-action-bar{
  display:flex;align-items:center;gap:.75rem;padding:.65rem 1.5rem;
  background:var(--surface-0);border-bottom:1px solid var(--surface-3);
  box-shadow:0 1px 3px rgba(0,0,0,.03);
  flex-shrink:0;min-height:62px;flex-wrap:wrap;
}
.room-back-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:36px;height:36px;padding:0;
  background:transparent;color:var(--tx3);border-radius:var(--r-md);
  border:none;flex-shrink:0;cursor:pointer;transition:all var(--dur) var(--ease);
}
.room-back-btn:hover{background:var(--surface-2);color:var(--accent)}
.room-back-btn svg{flex-shrink:0}

.room-title-block{display:flex;align-items:center;min-width:0;gap:.35rem}
.room-title{font-size:1.05rem;font-weight:700;color:var(--tx);white-space:nowrap;margin:0;line-height:1.2;letter-spacing:-.01em}
.room-edit-pairing-btn{display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:var(--r-sm);border:1px solid var(--surface-3);background:var(--surface-0);color:var(--tx3);cursor:pointer;transition:all var(--dur) var(--ease);flex-shrink:0}
.room-edit-pairing-btn:hover{color:var(--accent);border-color:var(--accent);background:var(--accent-ghost)}

.action-bar-spacer{flex:1;min-width:.5rem}

/* Search box */
.search-box{position:relative;display:flex;align-items:center}
.search-box-icon{position:absolute;left:.6rem;color:var(--tx3);pointer-events:none;flex-shrink:0}
.search-box-input{
  width:170px;height:36px;padding:0 1.8rem 0 2rem;
  border:1.5px solid var(--surface-3);border-radius:var(--r-full);
  background:var(--surface-0);color:var(--tx);font-size:.82rem;
  font-family:var(--mono);direction:rtl;text-align:right;
  transition:all var(--dur) var(--ease);box-shadow:var(--sh-xs);
}
/* Input is RTL so the Hebrew placeholder hugs the right edge and the
   three trailing dots end up to its LEFT (end of Hebrew reading) —
   exactly like "חיפוש טלפון..." reads in Hebrew. Phone numbers typed
   later render as a natural LTR digit run within the RTL context
   (BiDi handles numeric runs correctly). Sans font + tight letter-spacing
   prevents any visible gap between the Hebrew word "טלפון" and the dots. */
.search-box-input::placeholder{
  color:var(--tx3);
  font-family:'Inter',system-ui,sans-serif !important;
  font-size:.78rem;
  letter-spacing:-0.2px;
  white-space:nowrap;
  text-overflow:clip;
}
.search-box-input:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:var(--brand-200);width:220px;background:var(--surface-1)}
.search-box-clear{
  position:absolute;right:.45rem;top:50%;transform:translateY(-50%);
  width:20px;height:20px;border:none;background:var(--surface-2);color:var(--tx3);
  border-radius:var(--r-full);cursor:pointer;font-size:.85rem;line-height:1;
  display:flex;align-items:center;justify-content:center;padding:0;
  transition:all var(--dur) var(--ease);
}
.search-box-clear[hidden]{display:none}
.search-box-clear:hover{background:var(--err-bg);color:var(--err)}

.search-hidden{display:none!important}

/* Room tabs — pill buttons with color coding.
   min-width:0 lets the flex container shrink below its content; the overflow
   rule then gives a horizontal scroll instead of wrapping or clipping when
   the column is too narrow for all tabs. Works across all widths, not just
   mobile. */
.room-tabs{
  display:flex;align-items:center;gap:.35rem;flex-shrink:1;min-width:0;
  overflow-x:auto;flex-wrap:nowrap;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;
}
.room-tabs::-webkit-scrollbar{display:none}
.room-tab{flex-shrink:0}
.room-tab{
  display:inline-flex;align-items:center;gap:.4rem;padding:.45rem .9rem;
  background:var(--surface-1);border:1.5px solid var(--surface-3);border-radius:var(--r-full);
  font-size:.78rem;font-weight:600;color:var(--tx2);white-space:nowrap;
  transition:all var(--dur) var(--ease);cursor:pointer;
}
.room-tab:hover{background:var(--surface-0);color:var(--tx);border-color:var(--surface-4);box-shadow:var(--sh-sm)}
.room-tab-icon{display:flex;align-items:center;opacity:.7}
.room-tab-icon svg{width:14px;height:14px}
.room-tab-label{font-weight:600}
.room-tab-path{display:none}
.room-tab[data-nav-room].active{
  background:var(--brand-50);color:var(--accent);border-color:var(--brand-200);
  box-shadow:0 2px 6px rgba(99,102,241,.12);
}
.room-tab[data-nav-room].active .room-tab-icon{opacity:1}
.room-tabs .room-tab:nth-child(1).active{background:var(--room-listen-bg);color:var(--room-listen);border-color:var(--room-listen-bd)}
.room-tabs .room-tab:nth-child(2).active{background:var(--room-speech-bg);color:var(--room-speech);border-color:var(--room-speech-bd)}
.room-tabs .room-tab:nth-child(3).active{background:var(--room-admin-bg);color:var(--room-admin);border-color:var(--room-admin-bd)}
.room-tab.active::after{
  content:'';width:6px;height:6px;border-radius:50%;
  background:currentColor;margin-inline-start:.2rem;
  box-shadow:0 0 0 2px rgba(255,255,255,.6);
}

/* Room body */
.room-body{flex:1;display:flex;overflow:hidden;background:var(--surface-app);min-height:0;padding:10px;gap:10px}
.room-columns{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:10px;overflow:hidden;min-height:0}

/* Layout preset buttons — toggle group */
.layout-preset-group{
  display:inline-flex;gap:2px;align-items:center;
  background:var(--surface-2);border-radius:var(--r-md);padding:3px;
}
.layout-preset-btn{
  border:0;background:transparent;padding:.38rem .55rem;
  border-radius:calc(var(--r-md) - 3px);cursor:pointer;
  font-size:.85rem;color:var(--tx3);
  display:inline-flex;align-items:center;justify-content:center;
  transition:all var(--dur) var(--ease);
}
.layout-preset-btn:hover{background:var(--surface-0);color:var(--tx)}
.layout-preset-btn.active{background:var(--accent);color:#fff;box-shadow:0 2px 6px rgba(99,102,241,.3)}
.layout-preset-btn.active:hover{background:var(--accent-hover);color:#fff}
.layout-preset-btn svg{display:block}

/* Focused/full-screen preset button — only visible when a column is active */
.layout-preset-focused-btn{opacity:.5}
.layout-preset-focused-btn.active{opacity:1;background:var(--accent);color:#fff;box-shadow:0 2px 6px rgba(99,102,241,.3)}

/* Hidden column in solo/focus view */
.room-col-hidden{display:none!important}

/* Back-to-split floating button */
.back-to-split-btn{
  position:absolute;bottom:1.1rem;left:50%;transform:translateX(-50%);
  display:inline-flex;align-items:center;gap:.5rem;
  padding:.45rem 1.1rem;
  background:var(--surface-0);color:var(--accent);
  border:1.5px solid var(--brand-200);border-radius:var(--r-full);
  font-size:.8rem;font-weight:600;white-space:nowrap;
  box-shadow:var(--sh-md);cursor:pointer;z-index:20;
  transition:all var(--dur) var(--ease);
}
.back-to-split-btn:hover{background:var(--brand-50);border-color:var(--accent);box-shadow:var(--sh-lg)}
.back-to-split-btn svg{flex-shrink:0}
/* Ensure room-body is positioned so the absolute button works */
.room-body{position:relative}

/* Soft, balanced elevation instead of the heavy bottom-weighted var(--sh-md).
   The first shadow is a hairline ring (spread 0.5px, no offset) that gives the
   card a clean outline on every edge equally. The second is a minimal drop
   (1px offset) for just enough depth to feel "lifted" — not "floating on a
   separate block" like the previous 4px drop created. Matches the top/bottom
   symmetry the user asked for. */
.room-single-col{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0;background:var(--surface-0);border-radius:var(--r-xl);border:1px solid var(--surface-3);box-shadow:0 0 0 .5px rgba(15,23,42,.02),0 1px 2px rgba(15,23,42,.04)}
.room-col{display:flex;flex-direction:column;overflow:hidden;background:var(--surface-0);min-height:0;border-radius:var(--r-xl);border:1px solid var(--surface-3);box-shadow:0 0 0 .5px rgba(15,23,42,.02),0 1px 2px rgba(15,23,42,.04);transition:border-color var(--dur) var(--ease),box-shadow var(--dur) var(--ease)}
.room-col:hover,.room-single-col:hover{box-shadow:0 0 0 .5px rgba(15,23,42,.04),0 2px 6px rgba(15,23,42,.05)}

/* Column header */
.room-col-header{
  padding:.9rem 1.15rem;
  background:var(--surface-0);
  display:flex;flex-direction:column;gap:.4rem;flex-shrink:0;
  border-bottom:1px solid var(--surface-3);
  border-radius:var(--r-xl) var(--r-xl) 0 0;
}
.room-col-title-row{display:flex;align-items:center;gap:.6rem;flex-wrap:nowrap}
.room-col-icon{
  display:flex;align-items:center;justify-content:center;
  width:34px;height:34px;border-radius:var(--r-md);
  background:linear-gradient(135deg,var(--brand-50),rgba(59,130,246,.06));
  color:var(--accent);flex-shrink:0;
}
.room-col-icon svg{width:18px;height:18px}
.room-col-name{font-size:.95rem;font-weight:700;color:var(--tx);letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.room-count{
  display:inline-flex;align-items:center;gap:.3rem;font-size:.76rem;color:var(--tx2);
  background:var(--surface-1);padding:.28rem .65rem;border-radius:var(--r-full);
  border:1px solid var(--surface-3);flex-shrink:0;margin-inline-start:auto;
}
.room-count svg{width:14px;height:14px;opacity:.55}
.room-count-num{font-size:.88rem;font-weight:700;color:var(--tx);font-family:var(--mono)}

/* Conf badges — compact so the column title (e.g. "חדר מנהלים") stays
   fully visible even in the narrow admin column when listeners are
   emphasized. Hebrew doesn't benefit from text-transform/letter-spacing,
   and the pill only needs to be a visual hint, not a heavy chip. */
.conf-badge{
  display:inline-flex;align-items:center;gap:.2rem;padding:.1rem .45rem;border-radius:var(--r-full);
  font-size:.64rem;font-weight:700;white-space:nowrap;flex-shrink:0;
}
.conf-badge.listen_all{background:linear-gradient(135deg,var(--blue-50),var(--blue-100));color:var(--blue-700);border:1px solid var(--blue-200)}
.conf-badge.speech{background:linear-gradient(135deg,#ecfdf5,#d1fae5);color:var(--ok);border:1px solid var(--ok-bd)}
.conf-badge.listen{background:var(--surface-2);color:var(--tx2);border:1px solid var(--surface-3)}
.conf-badge.broadcaster{background:linear-gradient(135deg,#f5f3ff,#ede9fe);color:var(--violet-500);border:1px solid #ddd6fe}
.conf-badge.user{background:#e0e7ff;color:#3730a3;border:1px solid #c7d2fe}
.conf-badge.admin{background:linear-gradient(135deg,#fffbeb,#fef3c7);color:var(--warn);border:1px solid var(--warn-bd)}

/* In a very narrow column (admin col in listeners-emphasized layout),
   the badge is redundant with the colored icon — drop it so the full
   title "חדר מנהלים" stays visible without ellipsis truncation. */
@container (max-width:240px){
  .room-col-header .conf-badge{display:none}
}

/* ═══════════════════════════════════════════════════════════════════════════
   SURVEY PANEL
   ═══════════════════════════════════════════════════════════════════════════ */
.survey-panel{
  flex-shrink:0;border-bottom:1px solid var(--surface-3);padding:.75rem 1.1rem;
  background:var(--surface-0);
}
.survey-panel-header{display:flex;align-items:center;gap:.5rem;margin-bottom:.65rem}
.survey-panel-title{font-size:.78rem;font-weight:700;color:var(--accent);display:flex;align-items:center;gap:.3rem}
.survey-panel-title svg{flex-shrink:0;width:14px;height:14px}
.survey-panel-total{font-size:.72rem;color:var(--tx3);margin-right:auto}

/* Bar chart */
.survey-panel-bars{display:flex;flex-direction:column;gap:.55rem}
.survey-bar-row{
  --row-color:var(--accent);
  display:flex;align-items:flex-start;gap:.65rem;
  padding:.55rem .75rem;border-radius:var(--r-lg);
  background:var(--surface-0);border:1.5px solid var(--surface-3);
  transition:all var(--dur) var(--ease);
  animation:surveyBarIn .32s var(--ease) both;
}
.survey-bar-row:hover{
  border-color:color-mix(in srgb,var(--row-color) 35%,var(--surface-3));
  box-shadow:0 4px 14px color-mix(in srgb,var(--row-color) 10%,transparent);
  transform:translateY(-1px);
}
.survey-bar-row.is-top{
  background:linear-gradient(180deg,color-mix(in srgb,var(--row-color) 5%,#fff),#fff);
  border-color:color-mix(in srgb,var(--row-color) 30%,var(--surface-3));
}
.survey-bar-key{
  width:34px;height:34px;border-radius:var(--r-md);
  background:linear-gradient(135deg,var(--row-color),color-mix(in srgb,var(--row-color) 65%,#000));
  color:#fff;font-size:.85rem;font-weight:800;
  display:flex;align-items:center;justify-content:center;
  font-family:var(--mono);flex-shrink:0;
  box-shadow:0 2px 8px color-mix(in srgb,var(--row-color) 25%,transparent);
}
.survey-bar-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:.35rem}
.survey-bar-heading{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}
.survey-bar-label{font-size:.84rem;font-weight:600;color:var(--tx);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.survey-bar-label-empty{color:var(--tx3);font-weight:500;font-style:italic}
.survey-bar-stats{display:inline-flex;align-items:baseline;gap:.35rem;flex-shrink:0;font-family:var(--mono)}
.survey-bar-count{font-size:1rem;font-weight:800;color:var(--row-color);line-height:1}
.survey-bar-pct{font-size:.74rem;font-weight:600;color:var(--tx3)}
.survey-bar-track{
  height:10px;background:color-mix(in srgb,var(--row-color) 8%,var(--surface-2));
  border-radius:var(--r-full);overflow:hidden;position:relative;
}
.survey-bar-fill{
  height:100%;
  background:linear-gradient(90deg,var(--row-color),color-mix(in srgb,var(--row-color) 70%,#fff));
  border-radius:var(--r-full);min-width:4px;
  transition:width .5s var(--ease);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.25);
}

/* Chart toggle — unified toggle group */
.survey-chart-toggle{
  display:inline-flex;gap:2px;align-items:center;
  background:var(--surface-2);border-radius:var(--r-md);padding:3px;
}
.chart-toggle-btn{
  padding:.38rem .55rem;border-radius:calc(var(--r-md) - 3px);
  background:transparent;display:inline-flex;align-items:center;justify-content:center;
  color:var(--tx3);transition:all var(--dur) var(--ease);
}
.chart-toggle-btn:hover{color:var(--tx);background:var(--surface-0)}
.chart-toggle-btn.active{background:var(--surface-0);color:var(--accent);box-shadow:var(--sh-sm)}
.chart-toggle-btn svg{display:block}

/* Pie / Donut */
.survey-chart-wrap{display:flex;align-items:center;gap:1.1rem;padding:.4rem 0;animation:surveyFadeIn .3s var(--ease)}
.survey-pie-stage{position:relative;flex-shrink:0;filter:drop-shadow(0 4px 14px rgba(15,23,42,.08))}
.survey-pie-svg{display:block}
.survey-pie-slice{transition:opacity var(--dur) var(--ease),transform var(--dur) var(--ease);transform-origin:center;transform-box:fill-box}
.survey-pie-stage:hover .survey-pie-slice{opacity:.7}
.survey-pie-stage .survey-pie-slice:hover{opacity:1;transform:scale(1.03)}
.survey-pie-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;text-align:center;line-height:1.15}
.survey-pie-center strong{font-size:1.5rem;font-weight:800;color:var(--tx);font-family:var(--mono);letter-spacing:-.02em}
.survey-pie-center span{font-size:.7rem;color:var(--tx3);font-weight:600}

/* Legend */
.survey-legend{display:flex;flex-direction:column;gap:.4rem;flex:1;min-width:0}
.survey-legend-item{
  --c:var(--accent);
  display:flex;align-items:center;gap:.55rem;
  padding:.45rem .65rem;border-radius:var(--r-md);
  background:var(--surface-0);border:1.5px solid var(--surface-3);
  position:relative;overflow:hidden;
  transition:all var(--dur) var(--ease);
}
.survey-legend-item::before{content:'';position:absolute;inset-inline-start:0;top:0;bottom:0;width:3px;background:var(--c)}
.survey-legend-item:hover{border-color:color-mix(in srgb,var(--c) 35%,var(--surface-3));transform:translateX(-2px)}
.survey-legend-swatch{width:10px;height:10px;border-radius:50%;flex-shrink:0;background:var(--c);box-shadow:0 0 0 2px color-mix(in srgb,var(--c) 20%,transparent)}
.survey-legend-meta{display:flex;align-items:baseline;gap:.4rem;flex:1;min-width:0}
.survey-legend-key{font-size:.72rem;font-weight:800;color:var(--c);font-family:var(--mono);min-width:14px;text-align:center;padding:.05rem .4rem;border-radius:var(--r-xs);background:color-mix(in srgb,var(--c) 10%,transparent)}
.survey-legend-name{font-size:.8rem;color:var(--tx);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.survey-legend-name-empty{color:var(--tx3);font-style:italic;font-weight:500}
.survey-legend-stats{display:inline-flex;align-items:baseline;gap:.3rem;flex-shrink:0;font-family:var(--mono)}
.survey-legend-count{font-size:.9rem;font-weight:800;color:var(--tx)}
.survey-legend-pct{font-size:.7rem;color:var(--tx3);font-weight:600}
.survey-panel-content{min-height:0}

@keyframes surveyBarIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@keyframes surveyFadeIn{from{opacity:0}to{opacity:1}}

/* ═══════════════════════════════════════════════════════════════════════════
   INFO FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.info-footer{flex-shrink:0;display:flex;flex-direction:column;background:var(--surface-0)}

/* Sheet */
.info-footer-sheet{border-bottom:1px solid var(--surface-2);background:var(--surface-0);max-height:480px;overflow:auto}
.info-footer-sheet[hidden]{display:none}
.info-footer-sheet.sheet-open{animation:sheetOpen .28s var(--ease) both}
.info-footer-sheet.sheet-closing{animation:sheetClose .25s var(--ease) forwards}
@keyframes sheetOpen{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@keyframes sheetClose{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(12px)}}
.info-footer-sheet-header{display:flex;align-items:center;justify-content:space-between;padding:.55rem 1rem;border-bottom:1px solid var(--surface-2);font-size:.82rem;font-weight:700;color:var(--tx)}
.info-footer-sheet-close{width:28px;height:28px;border-radius:var(--r-sm);background:transparent;border:none;color:var(--tx3);cursor:pointer;font-size:1.2rem;line-height:1;padding:0;transition:all var(--dur) var(--ease)}
.info-footer-sheet-close:hover{background:var(--surface-2);color:var(--tx)}
.info-panel{padding:.75rem 1rem}
.info-panel[hidden]{display:none}

/* Chips bar */
.info-footer-chips{display:flex;align-items:stretch;gap:.5rem;padding:.5rem 1rem}
.info-chip{
  display:inline-flex;align-items:center;gap:.45rem;
  padding:.38rem .8rem;min-height:34px;
  background:var(--surface-1);border:1.5px solid var(--surface-3);border-radius:var(--r-full);
  font-size:.78rem;font-weight:600;color:var(--tx2);cursor:pointer;
  transition:all var(--dur) var(--ease);
}
.info-chip[hidden]{display:none}
.info-chip:hover{background:var(--surface-0);border-color:var(--surface-4);color:var(--tx);box-shadow:var(--sh-sm)}

.info-chip.active{background:var(--blue-50);border-color:var(--blue-200);color:var(--blue-600)}
.info-chip.active .info-chip-count{background:var(--blue-600);color:#fff}
.info-chip.admin.active{background:var(--warn-bg);border-color:var(--warn-bd);color:var(--warn)}
.info-chip.admin.active .info-chip-count{background:var(--warn);color:#fff}

.info-chip-icon{display:flex;align-items:center;opacity:.8}
.info-chip-icon svg{width:14px;height:14px}
.info-chip-label{font-weight:600;white-space:nowrap}
.info-chip-count{
  background:var(--surface-3);color:var(--tx2);
  font-size:.7rem;font-weight:700;font-family:var(--mono);
  padding:.1rem .55rem;border-radius:var(--r-full);min-width:20px;text-align:center;white-space:nowrap;
  transition:all var(--dur) var(--ease);
}

/* Mini bars */
.info-chip-mini{display:inline-flex;align-items:center;gap:.3rem}
.info-chip-mini .mini-bar{display:inline-flex;align-items:center;gap:.2rem}
.info-chip-mini .mini-key{font-size:.66rem;font-weight:700;color:var(--tx3);font-family:var(--mono);min-width:8px;text-align:center}
.info-chip-mini .mini-track{display:inline-block;width:28px;height:6px;background:var(--surface-3);border-radius:var(--r-full);overflow:hidden}
.info-chip-mini .mini-fill{display:block;height:100%;background:linear-gradient(90deg,var(--blue-400),var(--accent));border-radius:var(--r-full);min-width:2px;transition:width .3s var(--ease)}

/* Prominent survey chip */
.info-chip.survey-chip-prominent{
  flex:1;min-width:0;
  background:linear-gradient(135deg,var(--blue-50) 0%,color-mix(in srgb,var(--accent) 8%,var(--surface-0)) 100%);
  border:1.5px solid var(--blue-200);color:var(--blue-700,var(--blue-600));
  min-height:44px;padding:.55rem 1.2rem;gap:.7rem;font-size:.82rem;
  border-radius:var(--r-lg,12px);
  box-shadow:var(--sh-sm);
  justify-content:flex-start;
}
.info-chip.survey-chip-prominent:hover{
  background:linear-gradient(135deg,var(--blue-100,var(--blue-50)) 0%,color-mix(in srgb,var(--accent) 14%,var(--surface-0)) 100%);
  border-color:var(--accent);box-shadow:var(--sh-md);
}
.info-chip.survey-chip-prominent .info-chip-icon{opacity:1;flex-shrink:0}
.info-chip.survey-chip-prominent .info-chip-icon svg{width:16px;height:16px}
.info-chip.survey-chip-prominent .info-chip-label{font-size:.88rem;font-weight:700;letter-spacing:.01em;flex-shrink:0}
.info-chip.survey-chip-prominent .survey-chip-bars{flex:1;min-width:0;justify-content:center}
.info-chip.survey-chip-prominent .info-chip-count{
  background:var(--blue-600);color:#fff;font-size:.73rem;padding:.15rem .7rem;
  flex-shrink:0;
}
.survey-chip-chevron{display:flex;align-items:center;margin-inline-start:auto;flex-shrink:0;opacity:.5;transition:transform .25s var(--ease),opacity .2s}
.survey-chip-chevron svg{width:14px;height:14px}
.info-chip.survey-chip-prominent:hover .survey-chip-chevron{opacity:.8}
.info-chip.survey-chip-prominent.active .survey-chip-chevron{transform:rotate(180deg);opacity:1}
.info-chip.survey-chip-prominent.idle{
  background:linear-gradient(135deg,var(--surface-1) 0%,var(--surface-0) 100%);
  border-color:var(--surface-3);color:var(--tx2);
}
.info-chip.survey-chip-prominent.idle .info-chip-count{background:var(--surface-4);color:var(--tx2)}
.info-chip.survey-chip-prominent.active{
  background:linear-gradient(135deg,var(--blue-100,var(--blue-50)) 0%,color-mix(in srgb,var(--accent) 12%,var(--surface-0)) 100%);
  border-color:var(--blue-300,var(--blue-200));color:var(--blue-700,var(--blue-600));
}

/* Survey chip bars */
.survey-chip-bars{display:inline-flex;align-items:center;gap:.45rem;flex-wrap:nowrap;overflow:hidden}
.survey-chip-bars:empty{display:none}
.survey-chip-item{display:inline-flex;align-items:center;gap:.3rem;padding:.1rem .35rem;border-radius:var(--r-sm);background:rgba(255,255,255,.55);border:1px solid rgba(59,130,246,.18)}
.survey-chip-key{font-size:.72rem;font-weight:800;color:var(--blue-700,var(--blue-600));font-family:var(--mono);min-width:10px;text-align:center}
.survey-chip-label-text{font-size:.7rem;font-weight:600;color:var(--tx2);max-width:70px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.survey-chip-track{display:inline-block;width:48px;height:7px;background:rgba(59,130,246,.12);border-radius:var(--r-full);overflow:hidden}
.survey-chip-fill{display:block;height:100%;background:linear-gradient(90deg,var(--blue-500,var(--blue-400)),var(--accent));border-radius:var(--r-full);min-width:2px;transition:width .3s var(--ease)}
.survey-chip-num{font-size:.7rem;font-weight:700;color:var(--blue-700,var(--blue-600));font-family:var(--mono);min-width:12px;text-align:center}

/* Admin origin tag */
.admin-origin-tag{display:inline-flex;align-items:center;justify-content:center;margin-inline-start:.35rem;width:20px;height:20px;padding:0;border-radius:50%;background:var(--warn-bg);color:var(--warn);border:1px solid var(--warn-bd);vertical-align:middle;cursor:help;flex-shrink:0;transition:transform var(--dur) var(--ease),box-shadow var(--dur) var(--ease)}
.admin-origin-tag svg{display:block;width:12px;height:12px}
.admin-origin-tag:hover{transform:scale(1.12);box-shadow:0 2px 8px rgba(0,0,0,.12)}
.admin-origin-listen{background:var(--room-listen-bg);color:var(--room-listen);border-color:var(--room-listen-bd)}
.admin-origin-speech{background:var(--room-speech-bg);color:var(--room-speech);border-color:var(--room-speech-bd)}
.card-subline .admin-origin-tag{margin-inline-start:0}

/* Info chip preview dots */
.info-chip-preview{display:inline-flex;align-items:center;gap:.22rem}
.info-chip-preview .dot{width:6px;height:6px;border-radius:50%;background:var(--warn)}
.info-chip-preview .more{font-size:.66rem;color:var(--tx3);font-family:var(--mono)}

/* sheetSlideUp replaced by sheetOpen/sheetClose above */

/* Survey drawer content */
.survey-drawer-content{display:flex;flex-direction:column;gap:.6rem}
.survey-info-box{display:flex;align-items:flex-start;gap:.45rem;background:var(--surface-0);border:1.5px solid var(--surface-3);border-radius:var(--r-md);padding:.55rem .75rem;font-size:.76rem;color:var(--tx2);line-height:1.5}
.survey-info-box svg{flex-shrink:0;margin-top:1px;color:var(--accent)}
.survey-info-box strong{color:var(--err);font-weight:700}

/* Survey toolbar */
.survey-toolbar{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;padding:.55rem .7rem;background:var(--surface-1);border:1.5px solid var(--surface-3);border-radius:var(--r-xl)}
.survey-toolbar-left{display:inline-flex;align-items:center;gap:.6rem;flex-wrap:wrap;flex:1;min-width:0}
.survey-toolbar-right{display:inline-flex;align-items:center;gap:.35rem;flex-wrap:wrap}
.survey-toolbar-sep{display:inline-block;width:1px;height:18px;background:var(--surface-3);margin:0 .15rem}
.survey-vote-count{font-size:.82rem;font-weight:700;color:var(--accent);font-family:var(--mono);padding:.15rem .6rem;border-radius:var(--r-full);background:color-mix(in srgb,var(--accent) 10%,transparent);letter-spacing:-.01em}
.survey-vote-count:empty{display:none}

/* Stats strip */
.survey-stats-strip{display:flex;gap:.5rem;padding:.1rem 0 .45rem;overflow-x:auto;scrollbar-width:none}
.survey-stats-strip::-webkit-scrollbar{display:none}
.survey-stats-strip[hidden]{display:none}
.survey-stat-card{flex:1;min-width:0;background:var(--surface-0);border:1.5px solid var(--surface-3);border-radius:var(--r-lg);padding:.55rem .65rem;display:flex;flex-direction:column;gap:.15rem;text-align:center;transition:border-color var(--dur) var(--ease)}
.survey-stat-card.accent{border-color:color-mix(in srgb,var(--accent) 35%,transparent);background:color-mix(in srgb,var(--accent) 5%,var(--surface-0))}
.survey-stat-card.highlight{border-color:color-mix(in srgb,var(--green-500,#22c55e) 35%,transparent);background:color-mix(in srgb,var(--green-500,#22c55e) 5%,var(--surface-0))}
.survey-stat-value{font-size:1.1rem;font-weight:800;color:var(--tx);line-height:1.2;font-family:var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.survey-stat-card.accent .survey-stat-value{color:var(--accent)}
.survey-stat-card.highlight .survey-stat-value{color:var(--green-600,#16a34a);font-family:inherit;font-size:.92rem;font-weight:700}
.survey-stat-sub{font-size:.75rem;font-weight:600;color:var(--tx3)}
.survey-stat-label{font-size:.68rem;font-weight:600;color:var(--tx3);white-space:nowrap}
.survey-stat-bar{height:4px;border-radius:2px;background:var(--surface-3);margin-top:.2rem;overflow:hidden}
.survey-stat-bar-fill{height:100%;border-radius:2px;background:var(--accent);transition:width .4s var(--ease)}

/* Chart area & empty state */
.survey-chart-area{min-height:0}
.survey-no-data{text-align:center;color:var(--tx3);font-size:.82rem;padding:.9rem 0}
.survey-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.4rem 1rem 1.2rem;text-align:center;gap:.45rem}
.survey-empty-icon{width:60px;height:60px;border-radius:50%;background:linear-gradient(145deg,var(--blue-50),var(--brand-50));display:flex;align-items:center;justify-content:center;color:var(--accent);margin-bottom:.25rem}
.survey-empty-icon svg{width:36px;height:36px}
.survey-empty-title{font-size:1.05rem;font-weight:700;color:var(--tx);margin:0}
.survey-empty-desc{font-size:.84rem;color:var(--tx2);line-height:1.65;margin:0;max-width:320px}
.survey-empty-desc strong{color:var(--accent);font-weight:700}
.survey-empty-notice{display:inline-flex;align-items:center;gap:.35rem;font-size:.74rem;color:var(--tx3);background:var(--surface-0);border:1.5px solid var(--surface-3);border-radius:var(--r-full);padding:.38rem .8rem;margin-top:.2rem}
.survey-empty-notice svg{flex-shrink:0;color:var(--amber-500,#f59e0b)}
.survey-empty-config{margin-top:.3rem;font-size:.8rem;padding:.4rem .9rem}

/* Survey stats strip */
.survey-stats-strip{display:flex;gap:.55rem;padding:.6rem .7rem;overflow-x:auto;flex-wrap:wrap}
.survey-stats-strip[hidden]{display:none}
.stat-card{flex:1 1 0;min-width:90px;background:var(--surface-0);border:1px solid var(--surface-3);border-radius:var(--r-md);padding:.55rem .65rem;text-align:center;position:relative}
.stat-card.accent{border-color:var(--accent);background:color-mix(in srgb, var(--accent) 5%, var(--surface-0))}
.stat-card.highlight{border-color:var(--green-500,#22c55e);background:color-mix(in srgb, var(--green-500,#22c55e) 5%, var(--surface-0))}
.stat-value{font-size:1.15rem;font-weight:700;color:var(--tx);line-height:1.2}
.stat-of{font-size:.78rem;font-weight:400;color:var(--tx3)}
.stat-label{font-size:.7rem;color:var(--tx3);margin-top:.15rem}
.stat-bar{height:4px;background:var(--surface-3);border-radius:2px;margin-top:.35rem;overflow:hidden}
.stat-bar-fill{height:100%;background:var(--accent);border-radius:2px;transition:width .3s ease}
.btn-survey-tool.danger{color:var(--red-600,#dc2626)}
.btn-survey-tool.danger:hover{background:color-mix(in srgb, var(--red-600,#dc2626) 10%, transparent)}

/* Play panel coming soon */
.play-coming-soon{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2.5rem 1rem;text-align:center;gap:.6rem}
.play-coming-icon{width:76px;height:76px;border-radius:50%;background:linear-gradient(145deg,var(--blue-50),var(--brand-50));display:flex;align-items:center;justify-content:center;color:var(--accent);margin-bottom:.4rem}
.play-coming-title{font-size:1.05rem;font-weight:700;color:var(--tx);margin:0}
.play-coming-desc{font-size:.84rem;color:var(--tx2);line-height:1.65;margin:0;max-width:340px}

/* Preset chips */
.preset-section{margin-bottom:.7rem}
.preset-label{font-size:.74rem;font-weight:600;color:var(--tx3);display:block;margin-bottom:.4rem}
.preset-chips{display:flex;flex-wrap:wrap;gap:.35rem}
.preset-chip{display:inline-flex;align-items:center;gap:.25rem;padding:.34rem .7rem;border-radius:var(--r-full);font-size:.74rem;font-weight:600;cursor:pointer;border:1.5px solid var(--surface-3);background:var(--surface-0);color:var(--tx2);transition:all var(--dur) var(--ease)}
.preset-chip:hover{background:var(--brand-50);border-color:var(--accent);color:var(--accent)}
.preset-chip.active{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 2px 6px rgba(99,102,241,.25)}
.preset-clear{color:var(--tx3);border-style:dashed}
.preset-clear:hover{border-color:var(--err);color:var(--err);background:#fef2f2}

/* Export buttons */
.btn-export{display:inline-flex;align-items:center;gap:.28rem;padding:.3rem .65rem;border-radius:var(--r-full);font-size:.72rem;font-weight:600;border:1.5px solid var(--surface-3);background:var(--surface-0);color:var(--tx2);cursor:pointer;transition:all var(--dur) var(--ease)}
.btn-export:hover{background:var(--surface-1);color:var(--tx);border-color:var(--surface-4)}
.btn-export:disabled,.btn-export[disabled]{opacity:.45;cursor:not-allowed;pointer-events:none}
.btn-export svg{flex-shrink:0}

/* Survey toolbar buttons */
.btn-survey-tool{display:inline-flex;align-items:center;gap:.35rem;padding:.38rem .75rem;border-radius:var(--r-full);font-size:.76rem;font-weight:600;border:1.5px solid transparent;background:var(--surface-0);color:var(--tx2);cursor:pointer;transition:all var(--dur) var(--ease);box-shadow:var(--sh-sm)}
.btn-survey-tool:hover{color:var(--accent);border-color:var(--brand-200);box-shadow:0 2px 8px rgba(99,102,241,.1)}
.btn-survey-tool:disabled,.btn-survey-tool[disabled]{opacity:.45;cursor:not-allowed;pointer-events:none;box-shadow:none;background:transparent}
.btn-survey-tool svg{flex-shrink:0}
.btn-survey-tool.danger{color:var(--red-500,#ef4444)}
.btn-survey-tool.danger:hover{border-color:var(--red-200,#fecaca);background:color-mix(in srgb,var(--red-500,#ef4444) 6%,var(--surface-0));box-shadow:0 2px 8px rgba(239,68,68,.1)}

/* ═══════════════════════════════════════════════════════════════════════════
   PLAY AUDIO PANEL
   ═══════════════════════════════════════════════════════════════════════════ */
.info-chip.play-chip-prominent{padding:.45rem .85rem;gap:.5rem;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 10%,var(--surface-0)),var(--surface-0));border:1.5px solid var(--blue-200,#c7d2fe);color:var(--blue-600,#4f46e5)}
.info-chip.play-chip-prominent:hover{background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 16%,var(--surface-0)),var(--surface-1));border-color:var(--accent);box-shadow:var(--sh-md)}
.info-chip.play-chip-prominent.active{background:linear-gradient(135deg,var(--accent),var(--blue-600));border-color:transparent;color:#fff;box-shadow:0 3px 14px rgba(99,102,241,.35)}
.info-chip.play-chip-prominent .info-chip-icon{opacity:1}

/* Panel shell */
.play-panel{display:flex;flex-direction:column;gap:.9rem;padding:.25rem;min-height:0}

/* Tabs — unified toggle group */
.play-panel-tabs{display:inline-flex;gap:2px;padding:3px;background:var(--surface-2);border-radius:var(--r-md);align-self:flex-start;border:1px solid var(--surface-3)}
.play-tab{display:inline-flex;align-items:center;gap:.35rem;padding:.45rem .9rem;border-radius:calc(var(--r-md) - 3px);font-size:.8rem;font-weight:600;color:var(--tx2);background:transparent;border:none;cursor:pointer;transition:all var(--dur) var(--ease)}
.play-tab:hover{color:var(--tx);background:var(--surface-1)}
.play-tab.active{background:var(--surface-0);color:var(--accent);box-shadow:var(--sh-sm)}
.play-tab svg{flex-shrink:0}

.play-tab-content{display:flex;flex-direction:column;gap:.7rem}
.play-tab-content[hidden]{display:none}

/* Dropzone */
.play-dropzone{border:2px dashed var(--surface-4);border-radius:var(--r-xl);background:var(--surface-1);padding:1.2rem 1rem;cursor:pointer;transition:all var(--dur) var(--ease);text-align:center}
.play-dropzone:hover,.play-dropzone.drag-over{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 5%,var(--surface-0))}
.play-dropzone-inner{display:flex;flex-direction:column;align-items:center;gap:.4rem;color:var(--tx2)}
.play-dropzone svg{color:var(--accent);opacity:.8}
.play-dz-title{font-size:.88rem;font-weight:600;color:var(--tx)}
.play-dz-sub{font-size:.72rem;color:var(--tx3)}

/* Selected file chip */
.play-selected-file{display:inline-flex;align-items:center;gap:.5rem;padding:.45rem .75rem;border-radius:var(--r-md);background:var(--surface-0);border:1.5px solid var(--surface-3);box-shadow:var(--sh-sm);align-self:flex-start;max-width:100%}
.play-sel-icon{color:var(--accent);display:flex;align-items:center;flex-shrink:0}
.play-sel-name{font-size:.82rem;font-weight:600;color:var(--tx);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}
.play-sel-size{font-size:.7rem;color:var(--tx3);font-family:var(--mono);padding:.1rem .45rem;border-radius:var(--r-full);background:var(--surface-2)}
.play-sel-clear{background:transparent;border:none;cursor:pointer;color:var(--tx3);font-size:1.15rem;line-height:1;padding:0 .25rem;border-radius:50%;transition:all var(--dur) var(--ease)}
.play-sel-clear:hover{color:var(--err);background:var(--surface-2)}

/* Destination row */
.play-dest-row{display:flex;flex-direction:column;gap:.3rem}
.play-dest-label{font-size:.72rem;font-weight:600;color:var(--tx3)}
.play-dest-wrap{display:inline-flex;align-items:stretch;gap:0;background:var(--surface-0);border:1.5px solid var(--surface-3);border-radius:var(--r-md);overflow:hidden;transition:border-color var(--dur) var(--ease)}
.play-dest-wrap:focus-within{border-color:var(--accent);box-shadow:var(--sh-glow)}
.play-dest-prefix{padding:.45rem .55rem;background:var(--surface-2);color:var(--tx3);font-family:var(--mono);font-size:.78rem;border-left:1px solid var(--surface-3)}
html[dir="rtl"] .play-dest-prefix{border-left:none;border-right:1px solid var(--surface-3)}
.play-dest-input{flex:1;border:none;background:transparent;padding:.45rem .55rem;font-size:.82rem;color:var(--tx);font-family:var(--mono);outline:none;min-width:0}
.play-dest-reset{background:transparent;border:none;cursor:pointer;color:var(--tx3);padding:0 .55rem;transition:color var(--dur) var(--ease)}
.play-dest-reset:hover{color:var(--accent)}

.play-hint{font-size:.72rem;color:var(--tx3);line-height:1.6}
.play-hint code{font-family:var(--mono);font-size:.7rem;padding:.1rem .35rem;border-radius:var(--r-sm);background:var(--surface-2);color:var(--tx2)}

/* Browser */
.play-browser{display:flex;flex-direction:column;gap:.45rem;border:1.5px solid var(--surface-3);border-radius:var(--r-xl);background:var(--surface-0);overflow:hidden}
.play-browser-toolbar{display:flex;align-items:center;gap:.4rem;padding:.45rem .6rem;background:var(--surface-1);border-bottom:1px solid var(--surface-3)}
.play-browser-up,.play-browser-refresh{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;background:var(--surface-0);border:1.5px solid var(--surface-3);border-radius:var(--r-sm);cursor:pointer;color:var(--tx2);transition:all var(--dur) var(--ease)}
.play-browser-up:hover:not(:disabled),.play-browser-refresh:hover{color:var(--accent);border-color:var(--brand-200)}
.play-browser-up:disabled{opacity:.4;cursor:not-allowed}
.play-browser-path{flex:1;font-family:var(--mono);font-size:.76rem;color:var(--tx2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.play-browser-list{max-height:220px;overflow-y:auto;display:flex;flex-direction:column}
.play-browser-loading,.play-browser-empty{padding:1.2rem .8rem;text-align:center;color:var(--tx3);font-size:.8rem}
.play-browser-empty-sub{font-size:.72rem;color:var(--tx3);margin-top:.3rem}
.play-browser-item{display:flex;align-items:center;gap:.5rem;padding:.55rem .75rem;background:transparent;border:none;text-align:inherit;cursor:pointer;font-size:.82rem;color:var(--tx);border-bottom:1px solid var(--surface-2);transition:background var(--dur) var(--ease)}
.play-browser-item:last-child{border-bottom:none}
.play-browser-item:hover{background:var(--surface-1)}
.play-browser-item.selected{background:color-mix(in srgb,var(--accent) 8%,var(--surface-0));color:var(--accent)}
.play-browser-item.selected .pbi-icon-audio{color:var(--accent)}
.pbi-icon{display:flex;align-items:center;color:var(--tx3);flex-shrink:0}
.pbi-icon-audio{color:var(--blue-600)}
.pbi-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.pbi-meta{font-size:.7rem;color:var(--tx3)}
.pbi-chev{color:var(--tx3)}
.pbi-action{font-size:.7rem;font-weight:600;color:var(--accent);padding:.15rem .5rem;border-radius:var(--r-full);background:color-mix(in srgb,var(--accent) 10%,transparent)}
.play-browser-item.selected .pbi-action{background:var(--accent);color:#fff}

/* Recent */
.play-recent:not(:empty){display:flex;flex-direction:column;gap:.4rem;margin-top:.3rem}
.play-recent-title{display:inline-flex;align-items:center;gap:.3rem;font-size:.72rem;font-weight:600;color:var(--tx3)}
.play-recent-list{display:flex;flex-wrap:wrap;gap:.35rem}
.play-recent-chip{display:inline-flex;align-items:center;gap:.3rem;padding:.32rem .65rem;border-radius:var(--r-full);background:var(--surface-0);border:1.5px solid var(--surface-3);color:var(--tx2);font-size:.74rem;font-weight:500;cursor:pointer;transition:all var(--dur) var(--ease);max-width:220px}
.play-recent-chip:hover{border-color:var(--accent);color:var(--accent)}
.play-recent-chip.selected{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 2px 6px rgba(99,102,241,.25)}
.play-recent-chip svg{flex-shrink:0;opacity:.75}
.play-recent-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Action row */
.play-action-row{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;padding:.6rem .7rem;border-radius:var(--r-xl);background:var(--surface-1);border:1.5px solid var(--surface-3);margin-top:.2rem}
.play-action-summary{flex:1;font-size:.82rem;color:var(--tx2);min-width:160px;overflow:hidden;text-overflow:ellipsis}
.play-action-summary strong{color:var(--tx);font-weight:600}
.play-sum-tag{display:inline-block;font-size:.68rem;font-weight:700;padding:.1rem .45rem;border-radius:var(--r-full);margin-left:.25rem;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent)}
.play-sum-dest{font-family:var(--mono);font-size:.72rem;color:var(--tx3);margin-right:.25rem}
.play-action-btn{display:inline-flex;align-items:center;gap:.45rem;padding:.6rem 1.2rem;border-radius:var(--r-full);background:linear-gradient(135deg,var(--brand-500),var(--brand-600));color:#fff;border:none;cursor:pointer;font-size:.85rem;font-weight:700;box-shadow:0 3px 12px rgba(99,102,241,.3);transition:all var(--dur) var(--ease)}
.play-action-btn:hover:not(:disabled){box-shadow:0 5px 18px rgba(99,102,241,.4);transform:translateY(-1px)}
.play-action-btn:disabled{background:var(--surface-3);color:var(--tx3);box-shadow:none;cursor:not-allowed}
.play-action-btn.busy{cursor:progress;opacity:.9}
.play-action-btn svg{flex-shrink:0}

/* Legend name (override fix) */
.survey-legend-name{font-size:.74rem;color:var(--tx2);font-weight:500}
.survey-bar-label-text{font-size:.74rem;font-weight:600;color:var(--tx2);font-family:var(--mono);min-width:50px;text-align:left;white-space:nowrap}

/* Key config modal */
.keyconfig-grid{display:flex;flex-direction:column;gap:.5rem}
.keyconfig-row{display:flex;align-items:center;gap:.5rem}
.keyconfig-num{width:32px;height:32px;border-radius:var(--r-sm);background:linear-gradient(135deg,var(--brand-500),var(--brand-600));color:#fff;font-size:.82rem;font-weight:700;display:flex;align-items:center;justify-content:center;font-family:var(--mono);flex-shrink:0;box-shadow:0 2px 6px rgba(99,102,241,.2)}
.keyconfig-input{flex:1;padding:.5rem .7rem;font-size:.84rem;border:1.5px solid var(--surface-3);border-radius:var(--r-md);background:var(--surface-0);min-width:0}
.keyconfig-input:focus{border-color:var(--accent);box-shadow:var(--sh-glow)}
.keyconfig-filter{display:flex;align-items:flex-start;gap:.55rem;margin-top:.85rem;padding:.7rem .8rem;background:var(--surface-1);border:1.5px solid var(--surface-3);border-radius:var(--r-md);cursor:pointer;transition:all var(--dur) var(--ease)}
.keyconfig-filter:hover{background:var(--brand-50);border-color:var(--brand-200)}
.keyconfig-filter input[type=checkbox]{width:16px;height:16px;margin-top:.15rem;cursor:pointer;accent-color:var(--accent);flex-shrink:0}
.keyconfig-filter-text{display:flex;flex-direction:column;gap:.15rem;line-height:1.35}
.keyconfig-filter-text strong{font-size:.82rem;color:var(--tx);font-weight:600}
.keyconfig-filter-text small{font-size:.72rem;color:var(--tx2);font-weight:400}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTION BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.action-buttons{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.btn-group{display:inline-flex;align-items:center;gap:.4rem}

.btn-action{
  display:inline-flex;align-items:center;gap:.35rem;padding:.48rem .95rem;
  border-radius:var(--r-full);font-size:.78rem;font-weight:600;
  border:1.5px solid var(--surface-3);background:var(--surface-0);color:var(--tx2);
  transition:all var(--dur) var(--ease);cursor:pointer;
}
.btn-action svg{flex-shrink:0}
.btn-action:hover:not(:disabled){background:var(--surface-1);color:var(--tx);border-color:var(--surface-4);box-shadow:var(--sh-sm)}
.btn-action:active:not(:disabled){transform:scale(.98)}
.btn-action:disabled{opacity:.4;cursor:not-allowed}

.btn-action.primary{color:#fff;border-color:transparent;background:linear-gradient(135deg,var(--brand-500),var(--brand-600));box-shadow:0 2px 8px rgba(99,102,241,.28)}
.btn-action.primary:hover:not(:disabled){box-shadow:0 4px 14px rgba(99,102,241,.4);filter:brightness(1.05)}

.btn-action.outlined{background:var(--surface-0);color:var(--tx2);border-color:var(--surface-4)}
.btn-action.outlined:hover:not(:disabled){background:var(--surface-1);color:var(--tx);border-color:var(--surface-5)}

.btn-action.subtle{background:transparent;color:var(--tx3);border-color:transparent}
.btn-action.subtle:hover:not(:disabled){background:var(--surface-2);color:var(--tx2)}

.btn-action.danger{color:var(--err);border-color:var(--err-bd);background:var(--surface-0)}
.btn-action.danger:hover:not(:disabled){background:var(--err-bg);border-color:var(--err);box-shadow:0 2px 10px rgba(220,38,38,.15)}

.btn-action.success{color:var(--ok);border-color:var(--ok-bd);background:var(--ok-bg)}
.btn-action.success:hover:not(:disabled){background:#a7f3d0;border-color:var(--ok)}
.btn-action.warning{color:var(--warn);border-color:var(--warn-bd);background:var(--warn-bg)}
.btn-action.warning:hover:not(:disabled){background:#fde68a;border-color:var(--warn)}

.action-divider{width:1px;height:22px;background:var(--surface-3);margin:0 .25rem;flex-shrink:0}
.toolbar-sep{width:1px;height:22px;background:var(--surface-3);margin:0 .35rem;flex-shrink:0}
.selection-bar{padding:.55rem 1rem;background:linear-gradient(135deg,var(--brand-50),var(--blue-50));border-bottom:1px solid var(--brand-200);display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;flex-shrink:0}
.selection-count{font-size:.78rem;font-weight:700;color:#fff;margin-inline-end:.35rem;background:linear-gradient(135deg,var(--brand-500),var(--brand-600));padding:.2rem .65rem;border-radius:var(--r-full);box-shadow:0 2px 6px rgba(99,102,241,.25);font-family:var(--mono)}

/* ═══════════════════════════════════════════════════════════════════════════
   HAND QUEUE
   ═══════════════════════════════════════════════════════════════════════════ */
.hand-queue{background:linear-gradient(135deg,#fffbeb,#fef3c7);border-bottom:1px solid var(--warn-bd);flex-shrink:0;position:relative}
.hand-queue::before{content:'';position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 95% 0%,rgba(245,158,11,.1),transparent 50%)}
.hand-queue-header{padding:.65rem 1.1rem;display:flex;align-items:center;gap:.6rem;position:relative}
.hand-queue-title{font-size:.82rem;font-weight:700;color:#92400e;flex:1;display:flex;align-items:center;gap:.4rem}
.hand-queue-title svg{flex-shrink:0}
.hand-queue-count{background:linear-gradient(135deg,var(--amber-500),#d97706);color:#fff;font-size:.7rem;font-weight:700;padding:.15rem .6rem;border-radius:var(--r-full);font-family:var(--mono);box-shadow:0 2px 6px rgba(217,119,6,.3)}
.hand-queue-pulse{width:9px;height:9px;background:var(--amber-500);border-radius:50%;animation:pulse 1.4s ease-in-out infinite;box-shadow:0 0 0 0 rgba(245,158,11,.6)}
.hand-queue-list{padding:0 .9rem .7rem;display:flex;flex-direction:column;gap:.4rem;max-height:160px;overflow-y:auto;position:relative}
.hand-queue-item{display:flex;align-items:center;gap:.6rem;padding:.55rem .8rem;background:#fff;border:1.5px solid var(--warn-bd);border-radius:var(--r-lg);font-size:.82rem;box-shadow:var(--sh-sm);transition:all var(--dur) var(--ease)}
.hand-queue-item:hover{box-shadow:var(--sh-md);transform:translateY(-1px)}
.hand-queue-item .phone{font-weight:600;flex:1;font-family:var(--mono);font-size:.82rem;color:#78350f}
.hand-queue-item .wait-time{color:#a16207;font-size:.74rem;font-variant-numeric:tabular-nums;font-family:var(--mono);background:#fef3c7;padding:.15rem .5rem;border-radius:var(--r-full)}
.hand-queue-item .btn-lower{padding:.3rem .75rem;background:var(--surface-0);border:1.5px solid var(--warn-bd);border-radius:var(--r-full);font-size:.74rem;font-weight:600;color:#92400e;transition:all var(--dur) var(--ease)}
.hand-queue-item .btn-lower:hover{background:var(--warn-bd);color:#78350f}
.hand-queue-item .btn-open-mic{padding:.3rem .8rem;background:linear-gradient(135deg,var(--emerald-500),var(--emerald-600));border:none;border-radius:var(--r-full);font-size:.74rem;font-weight:600;color:#fff;display:inline-flex;align-items:center;gap:.3rem;box-shadow:0 2px 8px rgba(5,150,105,.3);transition:all var(--dur) var(--ease)}
.hand-queue-item .btn-open-mic:hover{box-shadow:0 4px 14px rgba(5,150,105,.4);transform:translateY(-1px)}
.hand-queue-item .btn-open-mic svg{flex-shrink:0}

/* ═══════════════════════════════════════════════════════════════════════════
   PARTICIPANTS TABLE & CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.participants-wrap{flex:1;overflow-y:auto;min-height:0;display:flex;flex-direction:column;padding:0 .4rem;scrollbar-width:thin;scrollbar-color:var(--surface-4) transparent}
.participants-wrap.has-empty-state{justify-content:center}
.participants-wrap::-webkit-scrollbar{width:5px}
.participants-wrap::-webkit-scrollbar-thumb{background:var(--surface-4);border-radius:var(--r-full)}

.participants-table{width:100%;border-collapse:collapse}
.participants-table thead th{padding:.7rem .95rem;background:var(--surface-1);font-size:.7rem;font-weight:700;color:var(--tx3);text-align:right;border-bottom:1px solid var(--surface-3);white-space:nowrap;position:sticky;top:0;z-index:1;text-transform:uppercase;letter-spacing:.06em}
.participants-table tbody tr{border-bottom:1px solid var(--surface-2);transition:all var(--dur) var(--ease)}
.participants-table tbody tr:last-child{border-bottom:none}
.participants-table tbody tr:hover{background:var(--surface-1)}
.participants-table tbody tr.admin-row{background:linear-gradient(to left,#fefce8,#fffbeb);border-right:3px solid var(--amber-400)}
.participants-table tbody tr.admin-row:hover{background:linear-gradient(to left,#fef9c3,#fef3c7)}
.participants-table tbody tr.new-row{animation:rowSlideIn .4s var(--spring)}
.participants-table tbody tr.transferring{opacity:.45}
.participants-table tbody tr.fade-out{animation:rowFadeOut .35s var(--ease) forwards}
.participants-table tbody tr.selected{background:var(--brand-50);box-shadow:inset 3px 0 0 var(--accent)}

.participants-table{table-layout:auto;width:100%}
.participants-table td{padding:.6rem .65rem;font-size:.84rem;vertical-align:middle;text-align:right}
.participants-table thead th{text-align:right}
.participants-table td:first-child{padding-right:.8rem}
.participants-table td:last-child{padding-left:.8rem}

th.col-check,td.col-check{width:32px;text-align:center}
td.col-check input[type=checkbox]{width:16px;height:16px;accent-color:var(--accent);cursor:pointer;vertical-align:middle}
th.col-phone,td.col-phone{text-align:right}
td.col-phone{font-weight:600;white-space:nowrap;font-family:var(--mono);font-size:.85rem;letter-spacing:.01em;color:var(--tx);direction:ltr;unicode-bidi:isolate}

/* Sequential chip for duplicate-phone participants (e.g. one of several calls
   from the same number). Keeps phone numbers readable — chip isn't part of the
   phone itself; in card view it sits in the subline, not after the number. */
.phone-instance{display:inline-flex;align-items:center;gap:.22rem;margin-inline-start:.35rem;padding:.1rem .42rem .1rem .35rem;border-radius:var(--r-full);background:linear-gradient(135deg,#eef2ff,#e0e7ff);color:#4338ca;font-size:.66rem;font-weight:700;line-height:1;letter-spacing:.01em;border:1px solid #c7d2fe;vertical-align:middle;unicode-bidi:isolate;direction:ltr;white-space:nowrap;cursor:default;box-shadow:0 1px 0 rgba(67,56,202,.05)}
.phone-instance svg{flex:0 0 auto;opacity:.85}
.phone-instance-num{font-family:var(--mono);font-variant-numeric:tabular-nums}
.phone-instance-sep{margin:0 .08rem;opacity:.55;font-weight:500}
/* Dark theme */
html[data-theme="dark"] .phone-instance{background:linear-gradient(135deg,#1e1b4b,#312e81);color:#c7d2fe;border-color:#4338ca}
th.col-duration,td.col-duration{white-space:nowrap;width:1%;text-align:right}
th.col-status,td.col-status{width:1%;text-align:right}
th.col-survey,td.col-survey{width:1%;text-align:center}
th.col-actions,td.col-actions{width:1%;white-space:nowrap;text-align:right}

.cell-duration{font-size:.75rem;color:var(--tx3);white-space:nowrap;font-variant-numeric:tabular-nums;font-family:var(--mono);background:var(--surface-1);padding:.14rem .55rem;border-radius:var(--r-full);display:inline-block}
.cell-status{display:inline-flex;align-items:center;gap:.25rem;flex-wrap:nowrap;vertical-align:middle}

.status-icon{width:26px;height:26px;border-radius:var(--r-full);display:inline-flex;align-items:center;justify-content:center;cursor:default;pointer-events:none;border:1px solid transparent}
.status-icon svg{width:13px;height:13px}
.status-icon.muted{background:#fef2f2;color:var(--err);border-color:#fecaca}
.status-icon.speaking{background:#ecfdf5;color:var(--ok);border-color:#a7f3d0}
.status-icon.hand{background:#fffbeb;color:var(--warn);border-color:#fde68a;animation:pulse 1.4s ease-in-out infinite}
.status-icon.admin{background:#fef9c3;color:#92400e;border-color:#fde68a}

.cell-survey{font-size:.82rem;font-weight:700;color:var(--accent);font-family:var(--mono);background:var(--brand-50);padding:.2rem .6rem;border-radius:var(--r-full);display:inline-block;min-width:28px;text-align:center;border:1px solid var(--brand-200)}
.cell-survey:empty{background:transparent;padding:0;border:none}
.cell-survey:empty::before{content:'\2014';color:var(--tx3);font-weight:400}
.cell-actions{display:inline-flex;gap:.25rem;align-items:center;flex-wrap:nowrap;white-space:nowrap;vertical-align:middle}

/* Icon buttons */
.icon-btn{width:32px;height:32px;border-radius:var(--r-md);display:inline-flex;align-items:center;justify-content:center;border:1.5px solid var(--surface-3);background:var(--surface-0);color:var(--tx3);padding:0;transition:all var(--dur) var(--ease);box-shadow:var(--sh-xs)}
.icon-btn svg{width:15px;height:15px}
.icon-btn:hover{background:var(--surface-1);color:var(--tx);border-color:var(--surface-4);transform:translateY(-1px);box-shadow:var(--sh-sm)}
.icon-btn:active{transform:translateY(0)}
.icon-btn.danger{transition:all var(--dur) var(--ease)}
.icon-btn.danger:hover{background:#fee2e2;color:var(--err);border-color:#fca5a5;box-shadow:0 2px 10px rgba(220,38,38,.2)}
.icon-btn.danger:hover svg{color:var(--err)}
.icon-btn.success{background:var(--ok-bg);color:var(--ok);border-color:var(--ok-bd)}
.icon-btn.success:hover{background:#a7f3d0;box-shadow:0 2px 8px rgba(5,150,105,.18)}
.icon-btn.warning:hover{background:var(--warn-bg);color:var(--warn);border-color:var(--warn-bd);box-shadow:0 2px 8px rgba(217,119,6,.18)}

.icon-btn.open-mic{background:linear-gradient(135deg,var(--emerald-500),var(--emerald-600));color:#fff;border-color:transparent;box-shadow:0 2px 6px rgba(5,150,105,.3)}
.icon-btn.open-mic:hover{box-shadow:0 3px 12px rgba(5,150,105,.35)}
.icon-btn.open-mic span{display:none}
.icon-btn.return-listeners{background:var(--surface-1);color:var(--tx2);border:1.5px solid var(--surface-3);font-size:.73rem;width:auto;padding:0 .7rem;gap:.3rem;border-radius:var(--r-full);font-weight:600;height:32px}
.icon-btn.return-listeners:hover{background:var(--brand-50);color:var(--accent);border-color:var(--brand-200);box-shadow:0 2px 6px rgba(99,102,241,.1)}

.transferring-label{display:inline-flex;align-items:center;gap:.3rem;font-size:.76rem;color:var(--tx3);animation:fadeInOut 1.2s ease-in-out infinite;white-space:nowrap}

/* Container queries */
.room-col, .room-single-col{container-type:inline-size}
@container (max-width:580px){
  .participants-table th.col-survey,.participants-table td.col-survey{display:none}
  .participants-table td{padding:.45rem .5rem;font-size:.82rem}
  td.col-phone{font-size:.82rem}
  .cell-actions{gap:.2rem}
  .icon-btn{width:28px;height:28px}
  .icon-btn svg{width:13px;height:13px}
  .icon-btn.open-mic,.icon-btn.return-listeners{height:28px}
  .icon-btn.return-listeners span{display:none}
}
@container (max-width:440px){
  .participants-table th.col-duration,.participants-table td.col-duration{display:none}
  .status-icon{width:22px;height:22px}
  .status-icon svg{width:11px;height:11px}
}
@container (max-width:340px){
  .participants-table td{padding:.35rem .3rem;font-size:.78rem}
  .participants-table thead th{padding:.35rem .3rem;font-size:.7rem}
  td.col-phone{font-size:.78rem;letter-spacing:0}
  .participants-table th.col-status,.participants-table td.col-status{display:none}
  .icon-btn{width:26px;height:26px}
  .icon-btn svg{width:12px;height:12px}
  .cell-actions{gap:.15rem;flex-wrap:wrap}
  .participants-table tbody tr.admin-row{border-right-width:2px}
}
@container (max-width:240px){
  .participants-table thead{display:none}
  .participants-table tbody tr{display:flex;flex-wrap:wrap;padding:.35rem .45rem;gap:.2rem;align-items:center}
  .participants-table td{padding:.1rem .15rem;border:none;width:auto!important}
  td.col-check{flex:0 0 auto}
  td.col-phone{flex:1 1 auto;font-size:.8rem;font-weight:600}
  td.col-actions{flex:1 1 100%}
  td.col-actions .cell-actions{justify-content:flex-start;flex-wrap:wrap}
}

/* ═══════════════════════════════════════════════════════════════════════════
   ROOM EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */
/* Empty state — icon+text+desc. Sized so it looks harmonious across all
   column widths (wide listeners col, narrow admin col, etc.). Only the
   vertical breathing room scales; icon and typography are fixed so the
   three rooms feel visually consistent side-by-side. */
.room-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.85rem;padding:1.6rem 1rem;text-align:center;color:var(--tx2);width:100%;box-sizing:border-box;flex-shrink:0;animation:emptyFadeIn .35s var(--ease);user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;cursor:default}

.empty-icon-wrap{position:relative;display:flex;align-items:center;justify-content:center;width:68px;height:68px;flex-shrink:0}
.empty-pulse{position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle,rgba(99,102,241,.2) 0%,transparent 60%);animation:emptyPulse 2.4s ease-in-out infinite;pointer-events:none}
.empty-pulse-delayed{animation-delay:-1.2s}

.empty-icon{position:relative;z-index:1;width:52px;height:52px;border-radius:50%;background:linear-gradient(145deg,var(--brand-50),var(--blue-100));border:1px solid rgba(99,102,241,.2);display:inline-flex;align-items:center;justify-content:center;box-shadow:0 4px 16px rgba(99,102,241,.12),inset 0 1px 2px rgba(255,255,255,.6);flex-shrink:0}
.empty-icon svg{color:var(--accent);opacity:.92;width:22px;height:22px}

.empty-text{display:flex;flex-direction:column;gap:.3rem;max-width:360px;width:100%;min-width:0}
.empty-title{font-size:.92rem;font-weight:700;color:var(--tx);letter-spacing:-.01em;margin:0;line-height:1.3}
.empty-desc{font-size:.78rem;color:var(--tx3);line-height:1.55;margin:0;overflow-wrap:anywhere}

@keyframes emptyPulse{0%,100%{transform:scale(.8);opacity:.55}50%{transform:scale(1.3);opacity:0}}
@keyframes emptyFadeIn{from{opacity:0}to{opacity:1}}

/* Column-width breakpoints: icon + typography stay IDENTICAL across widths
   (so the three rooms side-by-side feel visually unified). Only the padding
   and horizontal breathing room shrink — a wide column gets generous space,
   a narrow column hugs tight. */
@container (max-width:380px){
  .room-empty{padding:1.2rem .7rem;gap:.7rem}
  .empty-text{max-width:none}
}
@container (max-width:260px){
  .room-empty{padding:.95rem .5rem;gap:.55rem}
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay{position:fixed;inset:0;background:rgba(15,23,42,.4);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;z-index:1000;padding:1rem;animation:fadeIn .15s var(--ease)}
.modal-card{background:var(--surface-0);border-radius:var(--r-2xl);box-shadow:var(--sh-xl);width:100%;max-width:500px;max-height:90vh;overflow-y:auto;animation:modalIn .25s var(--spring)}
.modal-header{padding:1.3rem 1.6rem 1rem;border-bottom:1px solid var(--surface-3);display:flex;align-items:center;gap:.65rem}
.modal-header h2{font-size:.95rem;font-weight:700;flex:1;color:var(--tx)}
.modal-close{width:32px;height:32px;border-radius:50%;background:var(--surface-1);border:1.5px solid var(--surface-3);font-size:.95rem;color:var(--tx3);display:flex;align-items:center;justify-content:center;transition:all var(--dur) var(--ease)}
.modal-close:hover{background:var(--err-bg);color:var(--err);border-color:var(--err-bd)}
.modal-body{padding:1.3rem 1.6rem;display:flex;flex-direction:column;gap:.9rem}
.modal-footer{padding:1rem 1.6rem;border-top:1px solid var(--surface-3);display:flex;gap:.5rem;justify-content:flex-end;background:var(--surface-1);border-radius:0 0 var(--r-2xl) var(--r-2xl)}
.btn-secondary{padding:.55rem 1.15rem;background:var(--surface-0);border:1.5px solid var(--surface-3);border-radius:var(--r-md);font-size:.84rem;font-weight:600;color:var(--tx2);transition:all var(--dur) var(--ease)}
.btn-secondary:hover{background:var(--surface-1);color:var(--tx);border-color:var(--surface-4)}

/* Confirm Dialog */
.modal-card.confirm-dialog-card{max-width:400px;padding:1.8rem 1.6rem 1.3rem;text-align:center;display:flex;flex-direction:column;align-items:center;gap:.95rem}
.confirm-dialog-icon{width:60px;height:60px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.confirm-danger .confirm-dialog-icon{background:var(--err-bg);color:var(--err);border:1.5px solid var(--err-bd)}
.confirm-warning .confirm-dialog-icon{background:var(--warn-bg);color:var(--warn);border:1.5px solid var(--warn-bd)}
.confirm-info .confirm-dialog-icon{background:var(--brand-50);color:var(--accent);border:1.5px solid var(--brand-200)}

.confirm-dialog-body{display:flex;flex-direction:column;gap:.4rem;width:100%}
.confirm-dialog-title{font-size:1.05rem;font-weight:700;color:var(--tx);line-height:1.4;margin:0}
.confirm-dialog-msg{font-size:.86rem;color:var(--tx2);line-height:1.55;margin:0}

.confirm-dialog-footer{display:flex;gap:.55rem;width:100%;padding-top:.55rem}
.confirm-dialog-footer button{flex:1;padding:.65rem 1rem;font-size:.86rem;font-weight:600;border-radius:var(--r-md);border:none;cursor:pointer;transition:all var(--dur) var(--ease)}
.confirm-dialog-cancel{background:var(--surface-0);border:1.5px solid var(--surface-3);color:var(--tx2)}
.confirm-dialog-cancel:hover{background:var(--surface-1);border-color:var(--surface-4);color:var(--tx)}
.confirm-dialog-cancel:focus-visible{box-shadow:var(--sh-glow)}

.confirm-btn-danger{background:var(--err);color:#fff;box-shadow:0 2px 10px rgba(220,38,38,.25)}
.confirm-btn-danger:hover{background:#b91c1c;box-shadow:0 4px 16px rgba(220,38,38,.35);transform:translateY(-1px)}
.confirm-btn-danger:focus-visible{box-shadow:0 0 0 3px rgba(220,38,38,.25)}

.confirm-btn-warning{background:var(--warn);color:#fff;box-shadow:0 2px 10px rgba(217,119,6,.25)}
.confirm-btn-warning:hover{background:#b45309;box-shadow:0 4px 16px rgba(217,119,6,.35);transform:translateY(-1px)}
.confirm-btn-warning:focus-visible{box-shadow:0 0 0 3px rgba(217,119,6,.25)}

.confirm-btn-info{background:var(--accent);color:#fff;box-shadow:0 2px 10px rgba(99,102,241,.25)}
.confirm-btn-info:hover{background:var(--accent-hover);box-shadow:0 4px 16px rgba(99,102,241,.35);transform:translateY(-1px)}
.confirm-btn-info:focus-visible{box-shadow:var(--sh-glow)}

/* Welcome Tour */
.welcome-tour-overlay.wt-leaving{animation:fadeOut .18s var(--ease) forwards}
.modal-card.welcome-tour-card{
  max-width:560px;position:relative;padding:0;display:flex;flex-direction:column;
  overflow:hidden;border:1px solid var(--surface-3);
}
.welcome-tour-card::before{
  content:"";position:absolute;inset:0 0 auto 0;height:3px;
  background:linear-gradient(90deg,var(--accent),var(--room-speech),var(--room-admin));
  opacity:.9;border-radius:var(--r-2xl) var(--r-2xl) 0 0;
}
.wt-skip-wrap{
  position:absolute;top:.75rem;inset-inline-start:.95rem;z-index:2;
  display:flex;gap:.25rem;align-items:center;
  transition:all .2s var(--ease);
}
.wt-skip-wrap.expanded{
  background:var(--surface-0);border:1px solid var(--surface-3);
  border-radius:var(--r-full);padding:.15rem .2rem;box-shadow:var(--sh-sm);
}
.wt-skip, .wt-skip-choice{
  padding:.3rem .7rem;border-radius:var(--r-full);
  background:transparent;border:1px solid transparent;color:var(--tx3);
  font-size:.78rem;font-weight:500;cursor:pointer;white-space:nowrap;
  transition:all var(--dur) var(--ease);
}
.wt-skip:hover, .wt-skip-choice:hover{background:var(--surface-2);color:var(--tx2)}
.wt-skip:focus-visible, .wt-skip-choice:focus-visible{box-shadow:var(--sh-glow);outline:none}
.wt-skip-choice.danger:hover{background:var(--err-bg);color:var(--err)}

.wt-illustration{
  display:flex;align-items:center;justify-content:center;
  padding:2.1rem 1.8rem 1rem;
  background:linear-gradient(180deg,var(--surface-1) 0%, var(--surface-0) 100%);
}
.wt-svg{width:100%;max-width:260px;height:auto;display:block}

.wt-counter{
  position:absolute;top:.75rem;inset-inline-end:.95rem;z-index:2;
  font-size:.72rem;font-weight:600;color:var(--tx3);letter-spacing:.01em;
  padding:.12rem .5rem;border-radius:var(--r-full);
  background:var(--surface-1);border:1px solid var(--surface-3);
}

.wt-title{
  font-size:1.15rem;font-weight:700;color:var(--tx);line-height:1.45;
  margin:.6rem 1.7rem .45rem;text-align:center;
}
.wt-body{
  font-size:.9rem;color:var(--tx2);line-height:1.7;
  margin:0 1.7rem 1.1rem;text-align:center;min-height:3.6em;
}
.wt-body strong{color:var(--tx);font-weight:700}

.wt-steps{
  display:flex;justify-content:center;gap:.45rem;
  padding:.2rem 0 1rem;
}
.wt-dot{
  width:7px;height:7px;border-radius:50%;background:var(--surface-3);
  cursor:pointer;transition:all var(--dur) var(--ease);
}
.wt-dot:hover{background:var(--surface-4)}
.wt-dot.active{background:var(--accent);width:22px;border-radius:var(--r-full)}

.wt-footer{
  display:flex;justify-content:space-between;align-items:center;gap:.6rem;
  padding:.95rem 1.7rem 1.3rem;border-top:1px solid var(--surface-3);
  background:var(--surface-1);
}
.wt-btn{
  padding:.6rem 1.3rem;border-radius:var(--r-md);font-size:.85rem;font-weight:600;
  border:1.5px solid transparent;cursor:pointer;transition:all var(--dur) var(--ease);
}
.wt-btn:focus-visible{outline:none;box-shadow:var(--sh-glow)}
.wt-btn-ghost{
  background:transparent;color:var(--tx2);border-color:var(--surface-3);
}
.wt-btn-ghost:hover{background:var(--surface-2);color:var(--tx);border-color:var(--surface-4)}
.wt-btn-ghost[hidden]{visibility:hidden;display:inline-flex !important}
.wt-btn-primary{
  margin-inline-start:auto;
  background:var(--accent);color:#fff;box-shadow:0 2px 10px rgba(99,102,241,.28);
}
.wt-btn-primary:hover{background:var(--accent-hover);box-shadow:0 4px 16px rgba(99,102,241,.4);transform:translateY(-1px)}

/* Header help button that re-opens the tour. */
.btn-help-ghost{
  width:34px;height:34px;border-radius:50%;
  background:transparent;border:1.5px solid var(--surface-3);color:var(--tx3);
  display:inline-flex;align-items:center;justify-content:center;
  transition:all var(--dur) var(--ease);cursor:pointer;
  font-weight:700;font-size:.9rem;flex-shrink:0;
}
.btn-help-ghost:hover{background:var(--accent-soft);color:var(--accent);border-color:var(--brand-200)}
.btn-help-ghost:focus-visible{outline:none;box-shadow:var(--sh-glow)}

@keyframes fadeOut{from{opacity:1}to{opacity:0}}

/* ═══════════════════════════════════════════════════════════════════════════
   GUIDED TOUR — spotlight + popover anchored to real UI elements
   ═══════════════════════════════════════════════════════════════════════════ */
.tour-root{position:fixed;inset:0;z-index:1100;pointer-events:none}
.tour-root.tour-leaving{animation:fadeOut .2s var(--ease) forwards}

/* Backdrop catches outside-clicks. When the step is anchored, the spotlight's
   outer box-shadow handles all the dimming so the element itself stays 100%
   visible (backdrop kept transparent to avoid stacking two layers of dim).
   When the step has no anchor (floating mode) there's no spotlight — we dim
   the backdrop directly so the popover doesn't float over a fully-bright UI. */
.tour-backdrop{
  position:fixed;inset:0;background:transparent;
  pointer-events:auto;animation:fadeIn .2s var(--ease);
  transition:background .25s var(--ease), backdrop-filter .25s var(--ease);
}
.tour-root.floating-step .tour-backdrop{
  background:rgba(15,23,42,.4);
  backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
}

.tour-spotlight{
  position:fixed;border-radius:var(--r-md);
  /* Inner ring: the accent glow that marks the anchor.
     Outer spread: only 35% dark so operators can still read the rest of the
     screen (previously .55, which fully obscured surrounding context). */
  box-shadow:0 0 0 4px rgba(99,102,241,.6), 0 0 0 9999px rgba(15,23,42,.35);
  transition:top .3s var(--ease), left .3s var(--ease),
             width .3s var(--ease), height .3s var(--ease);
  pointer-events:none;z-index:1101;
}

.tour-popover{
  position:fixed;background:var(--surface-0);
  border:1px solid var(--surface-3);border-radius:var(--r-xl);
  box-shadow:var(--sh-xl);padding:0;width:360px;max-width:calc(100vw - 32px);
  z-index:1102;pointer-events:auto;
  animation:tourPop .2s var(--spring);
  display:flex;flex-direction:column;
}
.tour-popover-floating{
  top:50% !important;left:50% !important;
  transform:translate(-50%,-50%);
  width:480px;
  animation:tourPopFloat .25s var(--spring);
}
@keyframes tourPop{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}
/* Keep the -50% translate during the animation — otherwise the keyframes
   rewrite `transform` to a raw scale() and the popover snaps off-center. */
@keyframes tourPopFloat{
  from{opacity:0;transform:translate(-50%,-50%) scale(.92)}
  to  {opacity:1;transform:translate(-50%,-50%) scale(1)}
}

.tour-skip-wrap{
  position:absolute;top:.55rem;inset-inline-start:.65rem;z-index:2;
  display:flex;gap:.25rem;align-items:center;
  transition:all .2s var(--ease);
}
.tour-skip-wrap.expanded{
  background:var(--surface-0);border:1px solid var(--surface-3);
  border-radius:var(--r-full);padding:.15rem .2rem;box-shadow:var(--sh-sm);
}
.tour-skip, .tour-skip-choice{
  padding:.25rem .65rem;border-radius:var(--r-full);
  background:transparent;border:1px solid transparent;color:var(--tx3);
  font-size:.76rem;font-weight:500;cursor:pointer;white-space:nowrap;
  transition:all var(--dur) var(--ease);
}
.tour-skip:hover, .tour-skip-choice:hover{background:var(--surface-2);color:var(--tx2)}
.tour-skip:focus-visible, .tour-skip-choice:focus-visible{outline:none;box-shadow:var(--sh-glow)}
.tour-skip-choice.danger:hover{background:var(--err-bg);color:var(--err)}

.tour-illustration{display:none}
.tour-illustration.has-illustration{
  display:flex;align-items:center;justify-content:center;
  padding:1.3rem 1.3rem .4rem;
  background:linear-gradient(180deg,var(--surface-1),var(--surface-0));
  border-radius:var(--r-xl) var(--r-xl) 0 0;
}
.tour-svg{width:100%;max-width:240px;height:auto;display:block}

/* Counter sits in the OPPOSITE corner of the skip button (which is at
   inset-inline-start). In RTL that's top-left, in LTR top-right — no
   collision either way. */
.tour-counter{
  position:absolute;top:.72rem;inset-inline-end:.95rem;z-index:2;
  font-size:.7rem;font-weight:600;letter-spacing:.01em;color:var(--tx3);
  padding:.12rem .45rem;border-radius:var(--r-full);
  background:var(--surface-1);border:1px solid var(--surface-3);
}

.tour-title{
  font-size:1rem;font-weight:700;color:var(--tx);line-height:1.4;
  margin:1.05rem 1.15rem .4rem;padding-inline-end:2rem;padding-inline-start:2rem;
}
.tour-popover-floating .tour-title{text-align:center;padding-inline-end:0;margin-top:.6rem;font-size:1.1rem}
.tour-body{
  font-size:.86rem;color:var(--tx2);line-height:1.7;
  margin:0 1.15rem .9rem;
}
.tour-popover-floating .tour-body{text-align:center;margin:0 1.7rem .9rem}
.tour-body strong{color:var(--tx);font-weight:700}
.tour-body code{
  background:var(--surface-2);padding:0 .28rem;border-radius:4px;
  font-size:.78rem;font-family:'JetBrains Mono',monospace;color:var(--tx);
}

.tour-steps{
  display:flex;justify-content:center;gap:.4rem;
  padding:.1rem 0 .8rem;
}
.tour-dot{
  width:6px;height:6px;border-radius:50%;background:var(--surface-3);
  cursor:pointer;transition:all var(--dur) var(--ease);
}
.tour-dot:hover{background:var(--surface-4)}
.tour-dot.active{background:var(--accent);width:18px;border-radius:var(--r-full)}

.tour-footer{
  display:flex;justify-content:space-between;align-items:center;gap:.5rem;
  padding:.7rem 1.15rem .9rem;border-top:1px solid var(--surface-3);
  background:var(--surface-1);border-radius:0 0 var(--r-xl) var(--r-xl);
}
.tour-btn{
  padding:.5rem 1.05rem;border-radius:var(--r-md);font-size:.82rem;font-weight:600;
  border:1.5px solid transparent;cursor:pointer;transition:all var(--dur) var(--ease);
}
.tour-btn:focus-visible{outline:none;box-shadow:var(--sh-glow)}
.tour-btn-ghost{background:transparent;color:var(--tx2);border-color:var(--surface-3)}
.tour-btn-ghost:hover{background:var(--surface-2);color:var(--tx);border-color:var(--surface-4)}
.tour-btn-ghost[hidden]{visibility:hidden;display:inline-flex !important}
.tour-btn-primary{
  margin-inline-start:auto;
  background:var(--accent);color:#fff;box-shadow:0 2px 8px rgba(99,102,241,.25);
}
.tour-btn-primary:hover{background:var(--accent-hover);box-shadow:0 4px 14px rgba(99,102,241,.35);transform:translateY(-1px)}
/* Continue-to-next-tour state: subtle arrow suffix + slight gradient so the
   user notices they're about to chain rather than end. */
.tour-btn-continue{
  background:linear-gradient(135deg,var(--accent),#8b5cf6);
  padding-inline-end:1.4rem;
}
.tour-btn-continue::after{
  content:"›";margin-inline-start:.35rem;font-size:1.05em;font-weight:700;
  display:inline-block;transform:scaleX(-1);  /* face the reading direction in RTL */
}

/* Arrow pointing at the anchored target. */
.tour-arrow{
  position:absolute;width:14px;height:14px;background:var(--surface-0);
  border:1px solid var(--surface-3);
  transform:rotate(45deg);z-index:-1;
  display:none;
}
/* Arrow positions use raw left/right (not inset-inline-*) because the JS
   placement names 'start'/'end' already carry the RTL-resolved meaning:
   'start' → popover on the RIGHT of the target → arrow on LEFT edge of
   popover pointing LEFT; 'end' → popover on LEFT of target → arrow on RIGHT
   edge of popover pointing RIGHT. Using inset-inline-* would flip the
   position again in RTL and land the arrow on the wrong side. */
.tour-arrow[data-dir="bottom"]{top:-8px;border-right-color:transparent;border-bottom-color:transparent}
.tour-arrow[data-dir="top"]{bottom:-8px;border-left-color:transparent;border-top-color:transparent}
.tour-arrow[data-dir="start"]{left:-8px;border-right-color:transparent;border-top-color:transparent}
.tour-arrow[data-dir="end"]{right:-8px;border-left-color:transparent;border-bottom-color:transparent}

/* ═══════════════════════════════════════════════════════════════════════════
   TOUR MENU — picker launched from the "?" button
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-card.tour-menu-card{
  max-width:520px;padding:0;overflow:hidden;
}
.tour-menu-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:1.1rem 1.4rem .85rem;
  border-bottom:1px solid var(--surface-3);
}
.tour-menu-header h2{
  margin:0;font-size:1.05rem;font-weight:700;color:var(--tx);
}
.tour-menu-close{
  width:30px;height:30px;border-radius:50%;
  background:var(--surface-1);border:1.5px solid var(--surface-3);color:var(--tx3);
  display:flex;align-items:center;justify-content:center;
  transition:all var(--dur) var(--ease);cursor:pointer;
}
.tour-menu-close:hover{background:var(--err-bg);color:var(--err);border-color:var(--err-bd)}

.tour-menu-lead{
  margin:1rem 1.4rem 0;font-size:.82rem;color:var(--tx2);line-height:1.6;
}
.tour-menu-kbd{
  display:inline-flex;align-items:center;justify-content:center;
  width:18px;height:18px;border-radius:4px;
  background:var(--surface-2);border:1px solid var(--surface-3);
  font-weight:700;font-size:.78rem;color:var(--tx);
  margin:0 .15rem;vertical-align:-2px;
}

.tour-menu-list{
  display:flex;flex-direction:column;gap:.5rem;
  padding:1rem 1.4rem 1.4rem;
}
.tour-menu-item{
  display:flex;align-items:center;gap:.85rem;
  padding:.9rem 1rem;text-align:start;
  background:var(--surface-0);border:1.5px solid var(--surface-3);
  border-radius:var(--r-lg);cursor:pointer;
  transition:all var(--dur) var(--ease);
}
.tour-menu-item:hover:not(.disabled){
  background:var(--accent-soft);border-color:var(--brand-200);
  transform:translateX(-2px);  /* shift toward content in RTL */
  box-shadow:var(--sh-sm);
}
.tour-menu-item:focus-visible{outline:none;box-shadow:var(--sh-glow);border-color:var(--accent)}
.tour-menu-item.disabled{opacity:.5;cursor:not-allowed}

.tour-menu-item-icon{
  width:32px;height:32px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:var(--accent-soft);color:var(--accent);
}
.tour-menu-item.seen .tour-menu-item-icon{
  background:var(--ok-bg, #ecfdf5);color:var(--ok, #059669);
}

.tour-menu-item-body{flex:1;min-width:0}
.tour-menu-item-title{
  font-size:.92rem;font-weight:600;color:var(--tx);line-height:1.35;
}
.tour-menu-item-sub{
  font-size:.76rem;color:var(--tx3);line-height:1.5;margin-top:.12rem;
}
.tour-menu-item-sub em{font-style:normal;color:var(--warn, #d97706)}
.tour-menu-item-arrow{color:var(--tx3);flex-shrink:0;display:flex}
.tour-menu-item:hover:not(.disabled) .tour-menu-item-arrow{color:var(--accent)}

/* Setup Modal */
.modal-card.setup-card{max-width:640px}
.setup-header-icon{width:34px;height:34px;border-radius:var(--r-md);background:linear-gradient(135deg,var(--brand-50),rgba(59,130,246,.06));color:var(--accent);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}

.setup-info{background:linear-gradient(135deg,var(--brand-50),#f5f3ff);border:1.5px solid var(--brand-200);border-radius:var(--r-lg);padding:.8rem 1.1rem;font-size:.82rem;color:#3730a3;line-height:1.55;display:flex;align-items:flex-start;gap:.6rem}
.setup-info svg{color:var(--accent);margin-top:.1rem}
.setup-info strong{font-weight:700;color:#1e1b4b}

/* ─── Setup intro: visual explanation of what will be created ───────────── */
.setup-intro{
  background:linear-gradient(135deg, var(--brand-50), #f5f3ff);
  border:1.5px solid var(--brand-200);
  border-radius:var(--r-lg);
  padding:1rem 1.1rem;
  display:flex; flex-direction:column; gap:.7rem;
}
.setup-intro-title{
  font-size:.9rem; font-weight:700; color:#1e1b4b;
}
.setup-intro-sub{
  font-size:.8rem; color:#3730a3; line-height:1.55;
}
.setup-flow-diagram{
  display:flex; align-items:center; justify-content:center;
  gap:.35rem; flex-wrap:wrap;
  padding:.35rem 0;
}
.setup-flow-node{
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.4rem .7rem;
  background:var(--surface-0);
  border:1.5px solid var(--surface-3);
  border-radius:999px;
  font-size:.78rem; font-weight:600;
  color:var(--tx);
  white-space:nowrap;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}
.setup-flow-icon{
  display:inline-flex; align-items:center; justify-content:center;
  width:24px; height:24px; border-radius:6px;
}
.setup-flow-label{color:var(--tx)}
.setup-flow-arrow{
  display:inline-flex; align-items:center;
  color:var(--tx3);
  /* SVG already draws a leftward chevron ("<"), which in RTL context flows
     with the reading direction — no transform needed. */
}

/* Role card polish — clearer visual hierarchy + pill tag for role type */
.setup-role-title-line{
  display:flex; align-items:center; gap:.45rem; flex-wrap:wrap;
}
.setup-role-step{
  display:inline-flex; align-items:center; justify-content:center;
  width:20px; height:20px; border-radius:50%;
  background:var(--surface-2, #eef0f5); color:var(--tx2);
  font-size:.7rem; font-weight:700; font-family:var(--mono);
  flex-shrink:0;
}
.setup-role-pill{
  font-size:.7rem; font-weight:600;
  padding:.1rem .55rem;
  border-radius:999px;
  line-height:1.4;
}

.setup-base-field{display:flex;flex-direction:column;gap:.35rem}
.setup-base-field label{font-size:.78rem;font-weight:600;color:var(--tx2);letter-spacing:.01em}
.setup-base-input{font-family:var(--mono);font-size:1rem;font-weight:600}
.setup-base-hint{font-size:.74rem;color:var(--tx3);line-height:1.5}
.setup-base-hint code{font-family:var(--mono);background:var(--surface-2);color:var(--tx2);padding:.08em .4em;border-radius:var(--r-xs);font-size:.72rem;font-weight:600}

.setup-roles-grid{display:flex;flex-direction:column;gap:.6rem}
.setup-role-card{border:1.5px solid var(--surface-3);border-radius:var(--r-lg);background:var(--surface-0);padding:.8rem .95rem;display:flex;flex-direction:column;gap:.6rem;transition:all var(--dur) var(--ease)}
.setup-role-card:focus-within{border-color:var(--accent);box-shadow:var(--sh-glow)}
.setup-role-head{display:flex;align-items:flex-start;gap:.6rem}
.setup-role-icon{width:32px;height:32px;border-radius:var(--r-sm);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.setup-role-title-wrap{display:flex;flex-direction:column;gap:.1rem;min-width:0;flex:1}
.setup-role-title{font-size:.92rem;font-weight:700;color:var(--tx);line-height:1.3}
.setup-role-desc{font-size:.78rem;color:var(--tx2);line-height:1.55;margin-top:.25rem}

.setup-role-fields{display:grid;grid-template-columns:1fr 1.3fr;gap:.55rem}
.setup-field{display:flex;flex-direction:column;gap:.25rem}
.setup-field label{font-size:.7rem;font-weight:600;color:var(--tx3);letter-spacing:.02em;text-transform:uppercase}
.setup-field-input{position:relative;display:flex;align-items:center}
.setup-field-input input{padding:.5rem .75rem;font-size:.85rem;border-radius:var(--r-sm);border-width:1.5px}
.setup-field-input input:focus{border-color:var(--accent);box-shadow:var(--sh-glow)}

.path-input-wrap{display:flex;align-items:stretch;background:var(--surface-1);border:1.5px solid var(--surface-3);border-radius:var(--r-sm);overflow:hidden;transition:all var(--dur) var(--ease)}
.path-input-wrap:focus-within{border-color:var(--accent);box-shadow:var(--sh-glow);background:var(--surface-0)}
.setup-path-prefix{display:flex;align-items:center;justify-content:center;padding:0 .55rem;background:transparent;color:var(--tx3);font-family:var(--mono);font-size:.95rem;font-weight:700;flex-shrink:0;border-left:1.5px solid var(--surface-3)}
.path-input-wrap input{border:none;background:transparent;flex:1;font-family:var(--mono);font-weight:600;border-radius:0;padding:.5rem .7rem}
.path-input-wrap input:focus{box-shadow:none;border:none}
.setup-path-input.invalid + *, .setup-path-input.invalid{}
.path-input-wrap:has(.invalid){border-color:var(--err);background:var(--err-bg)}
.path-input-wrap:has(.invalid) .setup-path-prefix{color:var(--err);border-left-color:var(--err-bd)}

.setup-name-input{font-size:.85rem}

.setup-steps-preview{background:var(--surface-1);border:1.5px solid var(--surface-3);border-radius:var(--r-lg);padding:.75rem .9rem;display:flex;flex-direction:column;gap:.5rem}
.setup-steps-title{font-size:.76rem;font-weight:700;color:var(--tx2);letter-spacing:.02em}

.setup-success{background:linear-gradient(135deg,#f0fdf4,#ecfdf5);border:1.5px solid var(--ok-bd);color:var(--ok);padding:.9rem 1.1rem;border-radius:var(--r-lg);display:flex;align-items:center;gap:.75rem}
.setup-success svg{flex-shrink:0;color:var(--ok)}
.setup-success-title{font-weight:700;font-size:.92rem;color:#065f46}
.setup-success-sub{font-size:.78rem;color:var(--ok);opacity:.85;margin-top:.1rem}

@media(max-width:640px){.setup-role-fields{grid-template-columns:1fr}}
.setup-steps{display:flex;flex-direction:column;gap:.45rem}
.setup-step{display:flex;align-items:center;gap:.7rem;padding:.65rem .9rem;border:1.5px solid var(--surface-3);border-radius:var(--r-lg);font-size:.84rem;background:var(--surface-0)}
.setup-step-num{width:28px;height:28px;border-radius:50%;background:var(--brand-50);color:var(--accent);font-weight:700;font-size:.74rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-family:var(--mono)}
.setup-step-info{flex:1}
.setup-step-name{font-weight:600;color:var(--tx)}
.setup-step-desc{font-size:.74rem;color:var(--tx3);margin-top:.05rem}
.setup-step-status{font-size:1rem;flex-shrink:0}
.setup-step.done{border-color:var(--ok-bd);background:var(--ok-bg)}
.setup-step.done .setup-step-num{background:var(--ok);color:#fff}
.setup-step.error{border-color:var(--err-bd);background:var(--err-bg)}
.setup-step.running{border-color:#a5b4fc;background:var(--brand-50);animation:stepPulse 1.2s ease-in-out infinite}
.setup-exists-warning{background:var(--warn-bg);border:1.5px solid var(--warn-bd);border-radius:var(--r-sm);padding:.3rem .55rem;font-size:.74rem;color:#92400e;margin-top:.3rem}

/* ═══════════════════════════════════════════════════════════════════════════
   TOASTS & SPINNER
   ═══════════════════════════════════════════════════════════════════════════ */
#toast-container{position:fixed;bottom:1.3rem;left:1.3rem;z-index:2000;display:flex;flex-direction:column-reverse;gap:.5rem;max-width:360px}
.toast{display:flex;align-items:center;gap:.65rem;padding:.7rem 1rem;background:var(--surface-0);color:var(--tx);border-radius:var(--r-lg);box-shadow:var(--sh-lg);font-size:.84rem;font-weight:500;animation:toastIn .2s var(--spring);border:1.5px solid var(--surface-3);border-right:3px solid transparent}
.toast.success{border-right-color:var(--emerald-400)}
.toast.error{border-right-color:var(--rose-400)}
.toast.info{border-right-color:var(--blue-400)}
.toast.warning{border-right-color:var(--amber-400)}
.toast-icon{font-size:.95rem;flex-shrink:0}
.toast-msg{flex:1;line-height:1.4}
.toast-count{
  font-size:.72rem;font-weight:700;padding:.08rem .4rem;border-radius:var(--r-full);
  background:rgba(0,0,0,.12);color:currentColor;opacity:.85;white-space:nowrap;
  margin-inline-start:.35rem;
}
.toast.fade-out{animation:toastOut .2s var(--ease) forwards}

.spinner{width:16px;height:16px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:spin .6s linear infinite;display:inline-block;opacity:.45}
.spinner.sm{width:12px;height:12px;border-width:1.5px}
.spinner.lg{width:26px;height:26px;border-width:2.5px}

/* In-button spinner for async actions (toolbar, etc.). Scoped to .is-busy so
   it doesn't conflict with buttons that render their own content. */
.btn-spinner{
  width:12px;height:12px;border:1.5px solid currentColor;border-top-color:transparent;
  border-radius:50%;animation:spin .6s linear infinite;display:inline-block;
  margin-inline-end:.4rem;vertical-align:-2px;
}
button.is-busy{opacity:.75;cursor:progress;pointer-events:none}
.loading-overlay{display:flex;align-items:center;justify-content:center;gap:.6rem;padding:3rem;color:var(--tx3);font-size:.86rem}

/* Admin panel */
#admin-panel-body{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.admin-strip-item{display:inline-flex;align-items:center;gap:.45rem;padding:.4rem .75rem;background:var(--surface-0);border:1.5px solid #fde68a;border-radius:var(--r-full);font-size:.78rem;transition:all var(--dur) var(--ease);box-shadow:var(--sh-xs)}
.admin-strip-item:hover{border-color:var(--amber-400);box-shadow:var(--sh-sm);transform:translateY(-1px)}
.admin-strip-icon{display:flex;align-items:center;color:var(--amber-500)}
.admin-strip-icon svg{width:13px;height:13px}
.admin-strip-phone{font-weight:600;font-family:var(--mono);font-size:.78rem;color:var(--tx)}
.admin-strip-status{display:flex;align-items:center;gap:.15rem}
.admin-strip-status .status-icon{width:20px;height:20px}
.admin-strip-status .status-icon svg{width:11px;height:11px}
.admin-strip-duration{font-size:.72rem;color:var(--tx3);font-variant-numeric:tabular-nums;font-family:var(--mono)}
.admin-strip-actions{display:flex;align-items:center;gap:.2rem}
.admin-strip-actions .icon-btn{width:26px;height:26px;border-radius:var(--r-sm)}
.admin-strip-actions .icon-btn svg{width:13px;height:13px}

/* Sort Select */
.sort-select{height:36px;width:auto;border-radius:var(--r-md);border:1.5px solid var(--surface-3);background:var(--surface-0);color:var(--tx2);padding:0 10px 0 28px;cursor:pointer;transition:all var(--dur) var(--ease);box-shadow:var(--sh-xs);font-size:.82rem;font-family:inherit;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 4 18 9'/%3E%3Cpolyline points='6 15 12 20 18 15'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:8px center;flex:0 0 auto}
.sort-select:hover{border-color:var(--brand-200);background-color:var(--brand-50);color:var(--accent)}
.sort-select:focus{outline:2px solid var(--accent);outline-offset:1px}

/* View Toggle */
.view-toggle{width:36px;height:36px;border-radius:var(--r-md);display:inline-flex;align-items:center;justify-content:center;border:1.5px solid var(--surface-3);background:var(--surface-0);color:var(--tx3);padding:0;cursor:pointer;transition:all var(--dur) var(--ease);box-shadow:var(--sh-xs)}
.view-toggle:hover{background:var(--brand-50);color:var(--accent);border-color:var(--brand-200);transform:translateY(-1px);box-shadow:var(--sh-sm)}
.view-toggle svg{width:16px;height:16px}

/* Zone Desc & Drop Hint */
.room-col-desc{font-size:.78rem;color:var(--tx3);line-height:1.5;padding:.1rem 0}
.room-drop-hint{display:flex;align-items:center;gap:.3rem;font-size:.74rem;color:var(--accent);font-weight:600;opacity:.55;padding:.1rem 0}
.room-drop-hint svg{flex-shrink:0;opacity:.7}

/* Drag & Drop States */
.dragging{opacity:.45;transform:scale(.97);transition:opacity .15s,transform .15s}
.drag-peer{opacity:.5;outline:2px dashed var(--accent);outline-offset:-2px;border-radius:var(--r-md);transition:opacity .15s}

/* Multi-drag ghost */
.drag-ghost{display:flex;align-items:center;gap:.5rem;direction:ltr}
.drag-ghost-stack{position:relative;width:160px;height:46px}
.drag-ghost-card{position:absolute;border-radius:8px;border:1.5px solid var(--surface-3);background:var(--surface-0);box-shadow:0 2px 8px rgba(0,0,0,.12)}
.drag-ghost-card.back2{width:140px;height:36px;top:0;left:10px;opacity:.45}
.drag-ghost-card.back1{width:150px;height:38px;top:3px;left:5px;opacity:.65}
.drag-ghost-card.front{width:160px;height:42px;top:4px;left:0;display:flex;align-items:center;justify-content:center;opacity:1}
.drag-ghost-phone{font-size:.82rem;font-weight:600;color:var(--tx);font-family:var(--mono);direction:ltr}
.drag-ghost-badge{background:var(--accent);color:#fff;font-size:.75rem;font-weight:700;min-width:22px;height:22px;border-radius:var(--r-full);display:flex;align-items:center;justify-content:center;padding:0 .4rem;box-shadow:0 2px 6px rgba(99,102,241,.4)}
body.is-dragging .room-col,body.is-dragging .room-single-col{border-style:dashed;border-color:var(--blue-400);background:linear-gradient(180deg,rgba(99,102,241,.03),rgba(59,130,246,.02));box-shadow:var(--sh-md),0 0 0 1px rgba(99,102,241,.08)}
body.is-dragging .room-col .room-drop-hint,body.is-dragging .room-single-col .room-drop-hint{opacity:1;color:var(--accent)}
.drag-over{background:var(--accent-soft)!important;border-color:var(--accent)!important;border-style:dashed!important;outline:2px dashed var(--accent);outline-offset:-6px;box-shadow:0 0 0 3px rgba(99,102,241,.15),var(--sh-lg)!important;transition:background .15s,outline .15s,border-color .15s}
.drag-over .room-drop-hint{opacity:1;color:var(--accent)}

/* Card Grid (view-cards mode) */
.cards-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:.55rem;padding:.6rem}
/* Select-all bar above the cards grid — mirrors the table view's header
   checkbox so users can select/deselect everything in a column in both
   layouts. Non-sticky to match the table thead (it scrolls with content). */
.cards-header{display:flex;align-items:center;padding:.45rem .75rem .2rem;flex-shrink:0}
.cards-select-all{display:inline-flex;align-items:center;gap:.4rem;font-size:.78rem;color:var(--tx2);cursor:pointer;user-select:none}
.cards-select-all input[type=checkbox]{width:15px;height:15px;accent-color:var(--accent);cursor:pointer}
.cards-select-all:hover{color:var(--tx)}

.participant-card{background:var(--surface-0);border:1.5px solid var(--surface-3);border-radius:var(--r-lg);padding:.55rem .7rem;display:flex;flex-direction:column;gap:.45rem;transition:all var(--dur) var(--ease);box-shadow:var(--sh-card);cursor:grab;position:relative;overflow:hidden;container-type:inline-size;container-name:pcard}
.participant-card.not-draggable{cursor:default}
.participants-table tr.not-draggable{cursor:default}
.participant-card::before{content:'';position:absolute;top:0;inset-inline-start:0;width:3px;height:100%;background:transparent;transition:background var(--dur) var(--ease)}
.participant-card:hover{box-shadow:var(--sh-card-hover);border-color:var(--surface-4);transform:translateY(-2px)}
.participant-card:hover::before{background:var(--surface-4)}
.participant-card.selected{border-color:var(--accent);background:var(--brand-50);box-shadow:0 0 0 2px var(--accent-glow),var(--sh-md)}
.participant-card.selected::before{background:var(--accent)}
.card-cb{width:16px;height:16px;accent-color:var(--accent);cursor:pointer;flex-shrink:0}
.participant-card.admin-card{background:linear-gradient(145deg,#fefce8,#fffbeb);border-color:var(--amber-400)}
.participant-card.admin-card::before{background:var(--amber-400)}
.participant-card.admin-card:hover{background:linear-gradient(145deg,#fef9c3,#fef3c7);box-shadow:0 4px 14px rgba(217,119,6,.15)}
.participant-card.transferring{opacity:.4}
.participant-card.new-row{animation:rowSlideIn .4s var(--spring)}
.participant-card.fade-out{animation:rowFadeOut .35s var(--ease) forwards}

.card-header{display:flex;align-items:flex-start;gap:.45rem}
.card-identity{flex:1;min-width:0;display:flex;flex-direction:column;gap:.2rem}
.card-phone{font-weight:700;font-family:var(--mono);font-size:.95rem;color:var(--tx);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:.01em;line-height:1.15}
.card-subline{display:flex;align-items:center;gap:.3rem;flex-wrap:wrap;font-size:.7rem;color:var(--tx3);min-height:18px}
.card-duration{font-variant-numeric:tabular-nums;font-family:var(--mono);font-size:.7rem;background:var(--surface-1);padding:.08rem .42rem;border-radius:var(--r-full);color:var(--tx2)}
.card-status{display:inline-flex;align-items:center;gap:.18rem}
.card-status .status-icon{width:18px;height:18px}
.card-status .status-icon svg{width:11px;height:11px}
.card-survey{font-size:.7rem;font-weight:700;color:#fff;font-family:var(--mono);background:linear-gradient(135deg,var(--brand-500),var(--brand-600));padding:.08rem .45rem;border-radius:var(--r-full);box-shadow:0 1px 3px rgba(99,102,241,.25)}

.card-actions{display:flex;align-items:center;gap:.3rem;flex-wrap:wrap;border-top:1px solid var(--surface-2);padding-top:.4rem}
.card-actions .icon-btn{flex-shrink:0}
.card-actions .icon-btn.return-listeners{flex:1 1 auto;min-width:0;justify-content:center}

@container pcard (max-width:190px){
  .card-actions .icon-btn span{display:none}
  .card-actions .icon-btn.return-listeners{flex:0 0 auto}
}
@container pcard (max-width:150px){
  .card-phone{font-size:.85rem}
  .card-subline .admin-origin-tag{width:16px;height:16px}
  .card-subline .admin-origin-tag svg{width:10px;height:10px}
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.85)}}
@keyframes stepPulse{0%,100%{border-color:#a5b4fc}50%{border-color:var(--accent)}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes fadeInOut{0%,100%{opacity:.3}50%{opacity:1}}
@keyframes modalIn{from{transform:translateY(12px) scale(.96);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}
@keyframes toastIn{from{transform:translateX(-16px) scale(.95);opacity:0}to{transform:translateX(0) scale(1);opacity:1}}
@keyframes toastOut{to{transform:translateX(-16px);opacity:0}}
@keyframes rowSlideIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}
@keyframes rowFadeOut{from{opacity:1}to{opacity:0;transform:translateX(-10px)}}
@keyframes slideIn{from{opacity:0;transform:translateY(-8px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
.slide-in{animation:slideIn .35s var(--ease) both}
.participant-card.slide-in{animation:slideIn .35s var(--ease) both}

/* ═══════════════════════════════════════════════════════════════════════════
   LARGE-ROOM ADAPTIVE MODE — disable animations for performance at scale
   ═══════════════════════════════════════════════════════════════════════════ */
.large-room .participants-table tbody tr.new-row{animation:none}
.large-room .participants-table tbody tr.fade-out{animation:none;display:none}
.large-room .participant-card.new-row{animation:none}
.large-room .participant-card.fade-out{animation:none;display:none}
.large-room .status-icon.hand{animation:none}
/* Disable row-level transitions in large rooms — with thousands of rows the
   repaints from `transition:all` on hover/selection make the UI feel heavy. */
.large-room .participants-table tbody tr{transition:none}
.large-room .participant-card{transition:none}
/* Virtual scrolling for cards relies on a predictable row height (card +
   grid gap). Pin the height in large-room mode so the scroller math matches
   what the user actually sees. 120px + space-between layout leaves a
   comfortable cushion around the header and the action row so neither is
   clipped when the subline carries extra chips (origin tag, duplicate-phone
   instance, status icons). Kept in sync with CARD_ROW_HEIGHT_PX in JS. */
.large-room .participant-card{height:120px;min-height:120px;max-height:120px;overflow:hidden;justify-content:space-between}
/* Keep subline on a single line so the header never grows and pushes the
   action row below the clip; overflow chips are elided rather than wrapped. */
.large-room .card-subline{flex-wrap:nowrap;overflow:hidden;min-width:0}
/* Prevent the action bar from wrapping and being pushed below the clip in
   narrow columns — the container query already hides button labels below
   190px, so the icons themselves fit on one row. */
.large-room .card-actions{flex-wrap:nowrap;overflow:hidden}

/* Virtual scroller spacers — empty rows/divs that fill the implicit area
   above and below the visible window so scroll height is correct. Never
   participate in layout beyond their height. */
.vspacer{padding:0!important;border:0!important;background:transparent!important;pointer-events:none}
.vspacer td{padding:0!important;border:0!important;height:inherit}
/* Fixed row height enforced in large-room mode so the virtual scroller can
   compute visible ranges correctly. Small rooms keep the organic layout.
   Border-bottom strengthened here — the default `--surface-2` (#f1f3f8)
   nearly vanishes against white when dozens of rows are visible at once,
   making the table read as one solid block. Using `--surface-3` (#e4e7ef)
   costs nothing at render time but restores visual row separation. */
.large-room .participants-table tbody tr{box-sizing:border-box;height:42px;min-height:42px;max-height:42px;border-bottom-color:var(--surface-3)}
/* Spacers must honor their inline height (which grows to thousands of px) —
   override the strict row-height rules above so they fill the implicit area. */
.large-room .participants-table tbody tr.vspacer,
.participants-table tbody tr.vspacer{height:auto;min-height:0;max-height:none}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media(max-width:900px){
  .room-columns{grid-template-columns:1fr!important;grid-template-rows:1fr 1fr;grid-auto-rows:1fr}
  .room-col{border-top:1px solid var(--surface-3)}
  .room-col:first-child{border-top:none}
  .room-tabs{flex-wrap:nowrap;overflow-x:auto;gap:.3rem;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .room-tabs::-webkit-scrollbar{display:none}
  .room-action-bar{flex-wrap:wrap;gap:.4rem;padding:.5rem .85rem;min-height:0}
  .search-box-input{width:130px}
  .search-box-input:focus{width:160px}
  .cards-grid{grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:.5rem;padding:.6rem}
}

@media(max-width:700px){
  .tree-dashboard-inner{padding:1rem .9rem 1.8rem;gap:.8rem}
  .tree-stats{grid-template-columns:1fr;gap:.55rem}
  .tree-toolbar{flex-direction:column;align-items:stretch;gap:.5rem}
  .tree-toolbar-actions{flex-direction:column;align-items:stretch}
  .tree-search input{width:100%}
  .tree-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:.65rem}
  .participants-table thead{display:none}
  .participants-table tbody tr{display:flex;flex-wrap:wrap;padding:.5rem .7rem;gap:.25rem;align-items:center}
  .participants-table td{padding:.12rem .15rem;border:none;width:auto!important}
  td.col-phone{font-size:.88rem;width:100%!important}
  td.col-actions{width:100%!important}
  td.col-actions .cell-actions{justify-content:flex-start;flex-wrap:wrap}
  .action-buttons{gap:.3rem}
  .btn-action .label{display:none}
  .action-divider{display:none}
  .modal-card{margin:.4rem;max-width:none}
  #toast-container{left:.7rem;right:.7rem;max-width:none}
  .brand-subtitle{display:none}
  .header-user-num{display:none}
  .room-action-bar{padding:.5rem .7rem}
  .info-chip-mini{display:none}
  .info-chip-preview{display:none}
  .info-footer-chips{padding:.4rem .6rem}
  .survey-chip-label-text{display:none}
  .survey-chip-track{width:24px}
  .info-chip.survey-chip-prominent{padding:.4rem .7rem;gap:.45rem;min-height:38px}
  .survey-panel{padding:.5rem .7rem}
  .survey-stats-strip{gap:.35rem}
  .survey-stat-card{padding:.4rem .45rem}
  .survey-stat-value{font-size:.92rem}
  .survey-stat-label{font-size:.62rem}
  .survey-bar-row{gap:.4rem;padding:.4rem .55rem}
  .survey-bar-key{width:28px;height:28px;font-size:.78rem}
  .survey-chart-wrap{flex-direction:column;gap:.7rem}
  .survey-pie-stage{align-self:center}
  .survey-toolbar{padding:.4rem .5rem;gap:.45rem}
  .btn-survey-tool span{display:none}
  .btn-survey-tool{padding:.35rem .5rem}
  .cards-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.4rem;padding:.45rem}
  .participant-card{padding:.4rem .55rem}
  .card-actions .icon-btn span{display:none}
  .btn-export span{display:none}
}

@media(max-width:480px){
  .app-header{padding:0 .85rem;gap:.5rem;height:54px}
  .header-breadcrumb{font-size:.74rem;gap:.15rem}
  .header-breadcrumb a,.header-breadcrumb .current{padding:.25rem .45rem}
  .header-user{padding:.25rem .3rem}
  .header-user-text{display:none}
  .header-user-avatar{width:30px;height:30px;font-size:.78rem}
  .header-divider{display:none}
  .logo-icon{width:34px;height:34px;border-radius:10px}
  .brand-title{font-size:.85rem}
  .btn-logout-ghost{width:34px;height:34px}
  .room-tab{padding:.35rem .65rem;font-size:.72rem;min-height:38px}
  .btn-action{padding:.38rem .65rem;font-size:.72rem;min-height:38px}
  .info-chip{min-height:38px}
  .tree-card{padding:.85rem .9rem}
  .stat-card{padding:.85rem 1rem}
  .login-card{padding:2rem 1.6rem}
}

/* =============================================
   Path Picker — popover attached to path <input> fields
   ============================================= */

.path-input-wrap.path-picker-wrap{position:relative}
.path-picker-btn{
  position:absolute; top:50%; transform:translateY(-50%);
  left:.4rem; /* RTL: appears on the left side of the input (away from text flow) */
  display:inline-flex; align-items:center; justify-content:center;
  width:26px; height:26px; padding:0;
  background:var(--surface-2); border:1px solid var(--surface-3);
  color:var(--tx2); border-radius:var(--r-sm);
  cursor:pointer; transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.path-picker-btn:hover{background:var(--accent-soft); color:var(--accent); border-color:var(--accent)}
.path-picker-btn:focus-visible{outline:none; box-shadow:0 0 0 3px var(--accent-glow)}
.path-picker-wrap .setup-path-input,
.path-picker-wrap input[type="text"]{padding-left:2.4rem}

.path-picker-popover{
  position:absolute; background:var(--surface-0);
  border:1px solid var(--surface-3);
  border-radius:var(--r-md);
  box-shadow:var(--sh-lg);
  z-index:1200;
  max-height:380px;
  display:flex; flex-direction:column;
  overflow:hidden;
  direction:rtl;
  font-size:.88rem;
}
.path-picker-head{padding:.5rem .65rem; background:var(--surface-1); border-bottom:1px solid var(--surface-3)}
.path-picker-breadcrumb{display:flex; align-items:center; gap:.25rem; flex-wrap:wrap; font-size:.8rem}
.pp-crumb{
  display:inline-flex; align-items:center; gap:.25rem;
  background:transparent; border:none; color:var(--tx2);
  padding:.2rem .45rem; border-radius:var(--r-sm);
  cursor:pointer; font-family:inherit; font-size:.78rem;
}
.pp-crumb:hover{background:var(--surface-2); color:var(--tx)}
.pp-crumb.active{background:var(--accent-soft); color:var(--accent); font-weight:600}
.pp-crumb-sep{color:var(--tx3); font-size:.72rem; user-select:none}

.path-picker-body{flex:1 1 auto; overflow-y:auto; padding:.4rem}
.path-picker-loading,.path-picker-empty,.path-picker-error{
  display:flex; align-items:center; justify-content:center; gap:.5rem;
  padding:1.5rem 1rem; color:var(--tx3); font-size:.85rem;
}
.path-picker-error{color:var(--err)}

.path-picker-grid{display:flex; flex-direction:column; gap:.2rem}
.path-picker-item{
  display:flex; align-items:center; gap:.55rem;
  width:100%; padding:.45rem .6rem; border-radius:var(--r-sm);
  background:transparent; border:1px solid transparent;
  cursor:pointer; text-align:right;
  font-family:inherit; color:var(--tx);
  transition:background .12s ease, border-color .12s ease;
}
.path-picker-item:hover:not(.disabled){background:var(--surface-1); border-color:var(--surface-3)}
.path-picker-item.selectable:hover{background:var(--accent-soft); border-color:var(--accent)}
.path-picker-item.disabled{opacity:.5; cursor:not-allowed}
.pp-item-icon{flex-shrink:0; color:var(--tx2); display:flex}
.pp-item-main{flex:1 1 auto; display:flex; flex-direction:column; align-items:flex-start; gap:.1rem; min-width:0}
.pp-item-name{font-weight:600; font-size:.85rem; color:var(--tx); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.pp-item-path{font-family:'JetBrains Mono',monospace; font-size:.7rem; color:var(--tx3); direction:ltr}
.pp-item-tag{
  display:inline-block; padding:.12rem .4rem;
  font-size:.65rem; font-weight:600;
  background:var(--surface-2); color:var(--tx2);
  border-radius:var(--r-full);
  flex-shrink:0;
}
.pp-item-tag-conf{background:var(--room-listen-bg); color:var(--room-listen)}
.pp-item-tag-dir{background:var(--accent-soft); color:var(--accent)}
.pp-item-arrow{color:var(--tx3); display:flex; flex-shrink:0; padding:.2rem; border-radius:var(--r-xs)}
.pp-item-arrow:hover{background:var(--surface-2); color:var(--tx2)}

.path-picker-footer{
  padding:.45rem .6rem; border-top:1px solid var(--surface-3);
  background:var(--surface-1); display:flex; justify-content:space-between; gap:.5rem;
}
.path-picker-clear,.path-picker-close{
  padding:.35rem .75rem; font-size:.78rem;
  border-radius:var(--r-sm);
}

/* =============================================
   Tree — Confbridge cards (primary with pills + orphan)
   ============================================= */

.tree-section-confbridge{
  /* Distinct label color for the new section */
  color:var(--room-listen);
}

/* Shared conf-type badge coloring — mirrors the existing room color system */
.conf-badge-listen_all,
.conf-badge-listen{color:var(--room-listen); background:var(--room-listen-bg); border:1px solid var(--room-listen-bd)}
.conf-badge-speech{color:var(--room-speech); background:var(--room-speech-bg); border:1px solid var(--room-speech-bd)}
.conf-badge-admin{color:var(--room-admin); background:var(--room-admin-bg); border:1px solid var(--room-admin-bd)}
.conf-badge-user{color:var(--tx2); background:var(--surface-2); border:1px solid var(--surface-3)}
.conf-badge-broadcaster{color:var(--violet-500); background:rgba(139,92,246,.08); border:1px solid rgba(139,92,246,.22)}

.card-top-chips{display:flex; gap:.35rem; flex-wrap:wrap; flex:1 1 auto; align-items:center}
.conf-type-chip{
  display:inline-flex; align-items:center; gap:.25rem;
  padding:.12rem .5rem; font-size:.68rem; font-weight:700;
  border-radius:var(--r-full);
}

.tree-card-conf-primary{
  /* Slightly more prominent than the basic conf card */
  border:1px solid var(--surface-3);
}
.tree-card-conf-primary.is-live{border-color:var(--room-listen-bd)}

.tree-card-conf-linkinfo{
  font-size:.72rem; color:var(--tx3);
  margin-top:.3rem;
}
.tree-card-conf-linkinfo code{
  font-family:'JetBrains Mono',monospace;
  font-size:.72rem; padding:.05rem .3rem;
  background:var(--surface-2); border-radius:var(--r-xs);
  color:var(--tx2); direction:ltr;
}

.tree-card-conf-child-pills{
  display:flex; flex-wrap:wrap; gap:.35rem;
  padding:.55rem .9rem .2rem;
  border-top:1px dashed var(--surface-3);
  margin-top:.2rem;
}
.tree-card-conf-child-pill{
  display:inline-flex; align-items:center; gap:.3rem;
  padding:.25rem .5rem;
  font-family:inherit; font-size:.72rem; font-weight:600;
  border-radius:var(--r-full);
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease;
}
.tree-card-conf-child-pill:hover{transform:translateY(-1px); box-shadow:var(--sh-sm)}
.tree-card-conf-child-pill .pill-label{opacity:.9}
.tree-card-conf-child-pill .pill-path{
  font-family:'JetBrains Mono',monospace; font-size:.68rem;
  padding:.02rem .3rem; background:rgba(255,255,255,.6); border-radius:var(--r-xs);
  direction:ltr;
}
.tree-card-conf-child-pill .pill-edit{
  opacity:.55; padding:.05rem;
  border-radius:var(--r-xs);
}
.tree-card-conf-child-pill .pill-edit:hover{opacity:1}

/* Skeleton state while ext.ini is loading */
.tree-card-conf-skeleton .conf-type-chip{
  background:var(--surface-2); color:var(--tx3); border-color:var(--surface-3);
  animation:ppskelpulse 1.4s ease-in-out infinite;
}
@keyframes ppskelpulse{0%,100%{opacity:.7}50%{opacity:1}}

/* =============================================
   Link Editor modal — styled like the existing setup modals
   ============================================= */

.link-editor-card{max-width:520px}
.link-editor-summary{
  padding:.7rem .85rem; background:var(--surface-1);
  border:1px solid var(--surface-3); border-radius:var(--r-md);
  margin-bottom:.9rem;
}
.link-editor-room{display:flex; align-items:center; gap:.55rem; flex-wrap:wrap}
.link-editor-room-label{font-size:.78rem; color:var(--tx3); font-weight:600}
.link-editor-room code{
  font-family:'JetBrains Mono',monospace; font-size:.82rem;
  padding:.1rem .4rem; background:var(--surface-0); border:1px solid var(--surface-3);
  border-radius:var(--r-xs); color:var(--tx); direction:ltr;
}
.link-editor-room-title{font-size:.82rem; color:var(--tx2)}
.link-editor-select{
  width:100%; padding:.55rem .7rem;
  background:var(--surface-0); border:1px solid var(--surface-3);
  border-radius:var(--r-sm); color:var(--tx);
  font-family:inherit; font-size:.92rem;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.link-editor-select:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-glow)}
.link-editor-hint{font-size:.72rem; color:var(--tx3); margin-top:.35rem; line-height:1.5}
.link-editor-unlink{
  color:var(--warn); border-color:var(--warn-bd); background:var(--warn-bg);
}
.link-editor-unlink:hover{background:var(--warn-bd)}

@media(max-width:700px){
  .path-picker-popover{max-height:320px}
  .tree-card-conf-child-pill .pill-path{display:none}
}

/* ─── Room Health Banner ───────────────────────────────────────────────── */
.room-health-banner{
  display:flex; flex-direction:column; gap:.8rem;
  padding:1rem 1.15rem 1.05rem;
  background:var(--warn-bg, #fff7ed);
  border:1px solid var(--warn-bd, #fed7aa);
  border-inline-start:4px solid var(--warn, #d97706);
  border-radius:var(--r-lg, 12px);
  margin:.6rem 1rem 0;
  color:var(--tx, #1f2937);
  font-size:.88rem;
  line-height:1.5;
  box-shadow:0 1px 3px rgba(217,119,6,.08);
}
.room-health-banner[hidden]{display:none}

/* Header row: icon + title/sub + actions */
.health-banner-header{
  display:flex; align-items:flex-start; gap:.9rem;
}
.health-banner-icon{
  flex-shrink:0; width:36px; height:36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(217,119,6,.12);
  color:var(--warn, #d97706);
}
.health-banner-head-text{flex:1; min-width:0}
.health-banner-title{
  font-weight:700; font-size:.98rem; color:var(--tx, #111827);
  line-height:1.35; margin:0 0 .15rem;
}
.health-banner-sub{
  font-size:.8rem; color:var(--tx2, #4b5563); line-height:1.5;
}
.health-banner-actions{
  display:flex; gap:.4rem; align-items:center; flex-shrink:0;
}
.health-banner-actions .btn-primary{
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.5rem 1rem; font-size:.85rem; white-space:nowrap;
  width:auto;
}
.health-banner-actions .btn-primary svg{flex-shrink:0}
.health-banner-actions .btn-primary:disabled{opacity:.7; cursor:progress}
.health-banner-dismiss{
  width:28px; height:28px; border-radius:50%;
  background:transparent; border:1px solid transparent;
  color:var(--tx3, #6b7280); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:all .15s ease;
}
.health-banner-dismiss:hover{background:var(--surface-2, #e5e7eb); color:var(--tx, #111827)}

/* Per-room cards */
.health-banner-rooms{
  display:flex; flex-direction:column; gap:.6rem;
}
.health-room{
  background:var(--surface-0, #fff);
  border:1px solid var(--surface-3, #e5e7eb);
  border-radius:var(--r-md, 10px);
  padding:.7rem .9rem;
}
.health-room-head{
  display:flex; flex-wrap:wrap; align-items:center; gap:.5rem;
  margin-bottom:.55rem;
  padding-bottom:.55rem;
  border-bottom:1px dashed var(--surface-3, #e5e7eb);
}
.health-room-path{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size:.86rem; font-weight:700; color:var(--tx, #111827);
  background:var(--surface-1, #f3f4f6);
  padding:.15rem .5rem; border-radius:6px;
  border:1px solid var(--surface-3, #e5e7eb);
}
.health-room-type{
  display:inline-block; padding:.12rem .55rem; border-radius:999px;
  font-size:.7rem; font-weight:600;
  background:var(--surface-1, #f3f4f6); color:var(--tx2, #4b5563);
  border:1px solid var(--surface-3, #e5e7eb);
}
.health-room-type.type-listen_all{
  background:var(--room-listen-bg, #eff6ff); color:var(--room-listen, #2563eb);
  border-color:var(--room-listen-bd, #bfdbfe);
}
.health-room-type.type-speech{
  background:var(--room-speech-bg, #fef3c7); color:var(--room-speech, #b45309);
  border-color:var(--room-speech-bd, #fde68a);
}
.health-room-type.type-admin{
  background:var(--room-admin-bg, #fce7f3); color:var(--room-admin, #be185d);
  border-color:var(--room-admin-bd, #fbcfe8);
}
.health-room-title{
  font-size:.84rem; color:var(--tx2, #4b5563);
  font-weight:500;
}

.health-room-body{
  display:flex; flex-direction:column; gap:.5rem;
}
.health-section{display:flex; flex-direction:column; gap:.3rem}
.health-section-label{
  display:inline-flex; align-items:center; gap:.3rem;
  font-size:.72rem; font-weight:700; letter-spacing:.02em;
  color:var(--tx3, #6b7280);
  text-transform:none;
}
.health-section-label.add{color:var(--ok, #059669)}
.health-section-label.remove{color:var(--warn, #d97706)}

.health-field-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
  gap:.4rem;
}
.health-field{
  display:flex; align-items:flex-start; gap:.55rem;
  padding:.45rem .6rem;
  background:var(--surface-1, #f9fafb);
  border:1px solid var(--surface-3, #e5e7eb);
  border-radius:var(--r-sm, 8px);
  transition:background .15s ease;
}
.health-field.add{
  background:rgba(5,150,105,.05);
  border-color:rgba(5,150,105,.2);
}
.health-field.remove{
  background:rgba(217,119,6,.05);
  border-color:rgba(217,119,6,.2);
}
.health-field-mark{
  flex-shrink:0; width:20px; height:20px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:.9rem; font-weight:700; line-height:1;
  margin-top:1px;
}
.health-field.add .health-field-mark{background:var(--ok, #059669); color:#fff}
.health-field.remove .health-field-mark{background:var(--warn, #d97706); color:#fff}
.health-field-text{
  flex:1; min-width:0; display:flex; flex-direction:column; gap:.15rem;
}
.health-field-name{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size:.76rem; font-weight:600;
  color:var(--tx, #111827);
  background:transparent; border:0; padding:0;
  word-break:break-all;
}
.health-field-desc{
  font-size:.75rem; color:var(--tx2, #4b5563); line-height:1.45;
}

.health-banner-hint{
  font-size:.75rem; color:var(--tx3, #6b7280);
  padding-top:.15rem;
  border-top:1px solid rgba(217,119,6,.12);
  padding-top:.6rem;
}
.health-banner-hint code{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size:.72rem;
  background:var(--surface-1, #f3f4f6); padding:.02rem .3rem; border-radius:4px;
}

@media(max-width:700px){
  .health-banner-header{flex-wrap:wrap}
  .health-banner-actions{width:100%; justify-content:flex-end}
  .health-field-grid{grid-template-columns:1fr}
}

/* ─── Tree view-mode toggle ────────────────────────────────────────────── */
.tree-view-toggle{
  display:inline-flex; gap:2px;
  background:var(--surface-1, #f3f4f6);
  border:1px solid var(--surface-3, #e5e7eb);
  border-radius:var(--r-sm, 8px);
  padding:2px;
}
.tree-view-btn{
  display:inline-flex; align-items:center; gap:.35rem;
  padding:.35rem .65rem;
  background:transparent; border:0; border-radius:6px;
  color:var(--tx2, #4b5563); font-size:.82rem; font-weight:500;
  cursor:pointer;
  transition: background .12s ease, color .12s ease;
}
.tree-view-btn:hover{color:var(--tx, #111827); background:rgba(0,0,0,0.03)}
.tree-view-btn.active{
  background:var(--surface-0, #fff);
  color:var(--accent, #4f46e5);
  box-shadow:0 1px 2px rgba(0,0,0,0.06);
}
.tree-view-btn svg{flex-shrink:0}

@media(max-width:700px){
  .tree-view-btn span{display:none}
  .tree-view-btn{padding:.45rem .55rem}
}

/* ─── Flat extension card (unified folder + confbridge) ────────────────── */
.tree-card-ext{
  position:relative;
  display:flex; flex-direction:column;
  background:var(--surface-0, #fff);
  border:1px solid var(--surface-3, #e5e7eb);
  border-radius:var(--r-md, 10px);
  padding:.85rem .95rem;
  text-align:start;
  cursor:pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease;
  min-height:112px;
}
.tree-card-ext:hover{
  border-color:var(--accent, #4f46e5);
  box-shadow:0 4px 12px rgba(79,70,229,.08);
}
.tree-card-ext:active{transform:translateY(1px)}
.tree-card-ext .card-top{
  display:flex; align-items:center; gap:.5rem;
  margin-bottom:.45rem;
}
.tree-card-ext .card-body{flex:1; min-width:0}
.tree-card-ext .card-title{
  font-size:.95rem; font-weight:600;
  color:var(--tx, #111827);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.tree-card-ext .card-path{margin-top:.2rem}
.tree-card-ext .card-path code{
  font-size:.72rem; color:var(--tx3, #6b7280);
  background:transparent; padding:0;
}
.tree-card-ext .card-foot{
  display:flex; justify-content:space-between; align-items:center;
  margin-top:.6rem; gap:.4rem;
}
.tree-card-ext .card-count{
  font-size:.72rem; color:var(--tx3, #6b7280);
}
.tree-card-ext .ext-card-actions{display:flex; gap:.35rem; align-items:center}
.tree-card-ext .card-enter{color:var(--tx3, #6b7280); display:inline-flex}
.tree-card-ext:hover .card-enter{color:var(--accent, #4f46e5)}

/* The small tinted dot on confbridge cards — subtle signal, no noise */
.ext-conf-dot{
  width:8px; height:8px; border-radius:50%;
  background:currentColor;
  flex-shrink:0;
  margin-inline-start:auto;
  box-shadow:0 0 0 3px var(--surface-0, #fff), 0 0 0 4px currentColor;
  opacity:.78;
}
.tree-card-ext-conf{border-color:var(--surface-3, #e5e7eb)}
.tree-card-ext-conf:hover{border-color:currentColor}
.tree-card-ext-conf.is-live{border-inline-start:3px solid var(--ok, #059669)}

/* "Enter conference room" CTA — the primary action zone on confbridge cards */
.ext-card-enter-room{
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.45rem .8rem;
  background:linear-gradient(135deg, var(--accent, #4f46e5), var(--accent-strong, #4338ca));
  border:1px solid transparent;
  color:#fff;
  border-radius:999px;
  font-size:.8rem; font-weight:600;
  cursor:pointer;
  box-shadow:0 1px 3px rgba(79,70,229,.25);
  transition: transform .1s ease, box-shadow .15s ease, filter .15s ease;
  white-space:nowrap;
}
.ext-card-enter-room:hover{
  box-shadow:0 4px 10px rgba(79,70,229,.35);
  filter:brightness(1.06);
}
.ext-card-enter-room:active{transform:translateY(1px)}
.ext-card-enter-room:focus-visible{
  outline:2px solid var(--accent, #4f46e5);
  outline-offset:2px;
}
.ext-card-enter-room svg{flex-shrink:0; stroke:#fff}
/* The card itself still hints it's clickable; bump the CTA on hover so the
   whole foot feels like the "enter room" zone */
.tree-card-ext-conf:hover .ext-card-enter-room{
  box-shadow:0 4px 14px rgba(79,70,229,.4);
  filter:brightness(1.08);
}

/* Icon tinting for confbridge in flat view — matches the colored-dot idea */
.tree-card-ext-conf .card-icon.conf-icon{
  background:transparent; color:currentColor;
}
.tree-card-ext-conf .card-icon.conf-icon svg{opacity:.85}

/* Grid layout adjustment — flat mode can show denser cards */
.tree-grid-flat{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:.75rem;
}
