/* ==========================================================
   TruBible Console — sign-in, dashboard, account, event editor,
   voice clone, sermon library.
   Loaded after /css/style.css and consumes its tokens only.
   ========================================================== */

/* `.navbar .nav-links > a` outranks `.btn-primary` in style.css, turning the
   logged-out "Start free" CTA text grey (public sermon page). Same fix as marketing.css. */
.navbar .nav-links > a.nav-cta,
.navbar .nav-links > a.nav-cta:hover {
  color: var(--text-on-primary);
  background: var(--grad-primary);
}

/* ---------- Shared console helpers ---------- */
.console-page { padding-top: 32px; }
.console-page .page-header { align-items: flex-end; }
.console-page .page-header h1 { line-height: 1.15; }
.page-header .eyebrow { margin-bottom: 8px; }
.page-header .page-actions .btn { min-height: 44px; }

.c-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.c-section-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading);
  font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.01em;
  color: var(--text);
}
.c-section-desc { color: var(--text-light); font-size: var(--fs-sm); margin-top: 4px; line-height: 1.55; }
.c-muted { color: var(--text-light); }
.c-mono { font-family: var(--font-mono); font-size: 0.86em; }
.c-row { display: flex; align-items: center; gap: 10px; }
.c-spacer { flex: 1; }

/* Small "field status" line (slug availability, password strength …) */
/* A legacy `.switch { width:44px; height:24px }` rule later in style.css squeezes the
   new `.switch > .switch-track` component; undo it for switches that carry a label. */
.form-group label.switch { display: inline-flex; width: auto; height: auto; margin-bottom: 0; font-weight: 500; min-height: 44px; }
label.switch:has(.switch-track) { display: inline-flex; width: auto; height: auto; }

.field-status {
  display: flex; align-items: center; gap: 6px;
  min-height: 20px; margin-top: 6px;
  font-size: var(--fs-xs); font-weight: 500; color: var(--text-light);
}
.field-status svg { width: 14px; height: 14px; flex-shrink: 0; }
.field-status.ok { color: var(--success); }
.field-status.bad { color: var(--danger); }
.field-status .spinner { width: 12px; height: 12px; border-width: 2px; }

/* Inline form error banner */
.form-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; margin-bottom: 16px;
  border: 1px solid var(--danger-border); border-radius: var(--radius-sm);
  background: var(--danger-bg); color: #b91c1c;
  font-size: var(--fs-sm); font-weight: 500; line-height: 1.45;
  animation: cShake 360ms var(--ease-out);
}
.form-alert:empty { display: none; }
.form-alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
@keyframes cShake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* ==========================================================
   AUTH — split screen
   ========================================================== */
.auth-split {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--bg);
}

/* ---- Left brand panel ---- */
.auth-brand {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: var(--bg-dark);
  padding: 40px clamp(32px, 4vw, 64px);
  display: flex; flex-direction: column; gap: 36px;
}
.auth-brand::before {
  content: '';
  position: absolute; inset: -20%;
  z-index: -2;
  background:
    radial-gradient(40% 40% at 18% 22%, rgba(var(--primary-rgb), 0.55), transparent 70%),
    radial-gradient(38% 42% at 82% 18%, rgba(99, 102, 241, 0.45), transparent 70%),
    radial-gradient(46% 46% at 70% 86%, rgba(var(--accent-rgb), 0.50), transparent 70%),
    radial-gradient(30% 30% at 12% 90%, rgba(var(--primary-rgb), 0.30), transparent 70%);
  filter: blur(10px);
}
.auth-brand::after {
  /* faint grid texture */
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 85%);
}
.auth-brand-logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em;
  text-decoration: none; align-self: flex-start;
}
.auth-brand-logo:hover { color: #fff; text-decoration: none; }
.auth-brand-logo img { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,0.12); padding: 3px; }
.auth-brand-body { margin-top: auto; margin-bottom: auto; display: flex; flex-direction: column; gap: 28px; max-width: 520px; }
.auth-brand h2 {
  color: #fff;
  font-size: clamp(1.75rem, 1.1rem + 1.6vw, 2.5rem);
  line-height: 1.12; letter-spacing: -0.03em; font-weight: 700;
}
.auth-brand h2 .grad {
  background: linear-gradient(90deg, #67e8f9, #a5b4fc 55%, #c4b5fd);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-brand-lede { color: rgba(255,255,255,0.72); font-size: var(--fs-base); line-height: 1.6; margin-top: -12px; }

/* live translation mini demo */
.auth-demo {
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.5);
  padding: 18px 20px;
}
.auth-demo-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: var(--fs-xs); color: rgba(255,255,255,0.7); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.auth-demo-live { display: inline-flex; align-items: center; gap: 8px; color: #fecaca; }
.auth-demo-bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.auth-demo-bars span {
  width: 3px; border-radius: 2px; background: rgba(255,255,255,0.75);
  transform-origin: bottom;
  animation: cBars 1.1s var(--ease-in-out) infinite;
}
.auth-demo-bars span:nth-child(1) { height: 40%; animation-delay: -0.2s; }
.auth-demo-bars span:nth-child(2) { height: 90%; animation-delay: -0.5s; }
.auth-demo-bars span:nth-child(3) { height: 60%; animation-delay: -0.1s; }
.auth-demo-bars span:nth-child(4) { height: 80%; animation-delay: -0.7s; }
.auth-demo-bars span:nth-child(5) { height: 45%; animation-delay: -0.35s; }
@keyframes cBars { 0%, 100% { transform: scaleY(0.45); } 50% { transform: scaleY(1); } }
.auth-demo-src {
  margin-top: 14px; color: rgba(255,255,255,0.92); font-size: var(--fs-base); line-height: 1.5; font-weight: 500;
}
.auth-demo-src small { display: block; color: rgba(255,255,255,0.55); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 4px; }
.auth-demo-out {
  margin-top: 12px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.12);
  min-height: 76px;
}
.auth-demo-lang { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: #a5f3fc; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.auth-demo-lang img { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; }
.auth-demo-text { margin-top: 4px; color: #fff; font-size: 1.05rem; font-weight: 600; line-height: 1.45; }
.auth-demo-out.swap .auth-demo-lang, .auth-demo-out.swap .auth-demo-text { animation: cSwapIn 520ms var(--ease-out) both; }
.auth-demo-out.swap .auth-demo-text { animation-delay: 60ms; }
@keyframes cSwapIn { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }

.auth-props { display: grid; gap: 14px; }
.auth-prop { display: flex; align-items: flex-start; gap: 12px; color: rgba(255,255,255,0.86); font-size: var(--fs-sm); line-height: 1.5; }
.auth-prop strong { color: #fff; display: block; font-size: var(--fs-base); }
.auth-prop-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.14); color: #a5f3fc;
}
.auth-prop-icon svg { width: 18px; height: 18px; }

.auth-quote {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 20px;
  color: rgba(255,255,255,0.78); font-size: var(--fs-sm); line-height: 1.6;
}
.auth-quote blockquote { margin: 0; font-style: normal; }
.auth-quote figcaption { margin-top: 10px; display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.6); font-size: var(--fs-xs); }
.auth-quote figcaption strong { color: #fff; font-size: var(--fs-sm); }
.auth-quote .avatar-initials { width: 32px; height: 32px; }

/* ---- Right form side ---- */
.auth-main {
  display: flex; flex-direction: column;
  padding: 20px clamp(20px, 4vw, 48px) calc(20px + var(--safe-bottom));
  min-width: 0;
}
.auth-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.auth-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-light); font-size: var(--fs-sm); font-weight: 500;
  padding: 10px 6px; margin-left: -6px; border-radius: 8px;
}
.auth-back:hover { color: var(--text); text-decoration: none; background: var(--bg-hover); }
.auth-back svg { width: 16px; height: 16px; }
.auth-mobile-logo { display: none; }
.auth-lang {
  position: relative; display: inline-flex; align-items: center;
}
.auth-lang svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--text-light); pointer-events: none; }
.auth-lang select {
  appearance: none; -webkit-appearance: none;
  min-height: 40px; padding: 8px 32px 8px 34px;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--bg-card) url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 500; color: var(--text-secondary);
  cursor: pointer;
}
.auth-lang select:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--primary); }

.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 0; }
.auth-form-wrap { width: 100%; max-width: 400px; animation: fadeUp 0.5s var(--ease-out) both; }
.auth-form-wrap h1 { font-size: var(--fs-3xl); letter-spacing: -0.03em; line-height: 1.15; }
.auth-form-wrap .auth-subtitle { color: var(--text-muted); margin-top: 6px; font-size: var(--fs-base); }

/* segmented sign in / create account */
.auth-tabs {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  margin: 24px 0 20px; padding: 4px;
  background: var(--bg-hover); border: 1px solid var(--border); border-radius: 12px;
}
.auth-tabs::before {
  content: '';
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  background: var(--bg-card); border-radius: 9px; box-shadow: var(--shadow-sm);
  transition: transform var(--dur-slow) var(--ease-out);
}
.auth-tabs[data-mode="register"]::before { transform: translateX(100%); }
.auth-tabs button {
  position: relative; z-index: 1;
  border: 0; background: none; cursor: pointer;
  min-height: 40px; padding: 8px 10px; border-radius: 9px;
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; color: var(--text-light);
  transition: color var(--dur) ease;
}
.auth-tabs button[aria-selected="true"] { color: var(--text); }
.auth-tabs button:focus-visible { outline: none; box-shadow: var(--ring); }

.auth-main .google-btn {
  min-height: 48px; font-size: var(--fs-base); font-weight: 600;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease, transform var(--dur-fast) var(--ease-out);
}
.auth-main .google-btn:hover { border-color: var(--text-faint); box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; }
.auth-main .auth-divider { margin: 20px 0; }
.auth-main .auth-divider span { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

.auth-pane { animation: cPaneIn 360ms var(--ease-out) both; }
.auth-pane.from-left { animation-name: cPaneInLeft; }
@keyframes cPaneIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes cPaneInLeft { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }

.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.auth-label-row label { margin-bottom: 0 !important; }
.auth-forgot { font-size: var(--fs-sm); font-weight: 500; }

.auth-main .form-control { min-height: 48px; font-size: var(--fs-base); }
.auth-main .btn-submit { min-height: 50px; font-size: var(--fs-base); margin-top: 6px; }

.pw-toggle .ico-hide { display: none; }
.pw-toggle[aria-pressed="true"] .ico-show { display: none; }
.pw-toggle[aria-pressed="true"] .ico-hide { display: block; }
.input-group > .input-action { width: 40px; height: 40px; }
.input-group > .input-action:focus-visible { outline: none; box-shadow: var(--ring); }

/* password strength */
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.pw-meter span { height: 5px; border-radius: 4px; background: var(--bg-active); transition: background var(--dur) ease; }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--danger); }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--warning); }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: var(--primary); }
.pw-meter[data-score="4"] span { background: var(--success); }
.pw-meter-label { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: var(--fs-xs); color: var(--text-light); }
.pw-meter-label b { font-weight: 600; }
.pw-meter-label b[data-score="1"] { color: var(--danger); }
.pw-meter-label b[data-score="2"] { color: var(--warning); }
.pw-meter-label b[data-score="3"] { color: var(--primary); }
.pw-meter-label b[data-score="4"] { color: var(--success); }

.auth-switch { text-align: center; margin-top: 22px; color: var(--text-light); font-size: var(--fs-sm); }
.auth-switch a { font-weight: 600; }
.auth-legal { text-align: center; color: var(--text-faint); font-size: var(--fs-xs); line-height: 1.6; }
.auth-legal a { color: var(--text-light); text-decoration: underline; text-underline-offset: 2px; }

@media (max-height: 979px) {
  .auth-quote { display: none; }
}
@media (max-height: 780px) {
  .auth-props { display: none; }
  .auth-brand-body { gap: 22px; }
}
@media (max-width: 1080px) {
  .auth-split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); }
  .auth-props { display: none; }
}
@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-main { background:
      radial-gradient(70% 40% at 50% 0%, rgba(var(--primary-rgb), 0.08), transparent 70%),
      radial-gradient(60% 30% at 100% 100%, rgba(var(--accent-rgb), 0.06), transparent 70%),
      var(--bg-page); }
  .auth-back span { display: none; }
  .auth-mobile-logo {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; color: var(--text); letter-spacing: -0.02em;
  }
  .auth-mobile-logo:hover { text-decoration: none; color: var(--text); }
  .auth-mobile-logo img { width: 30px; height: 30px; }
  .auth-center { align-items: flex-start; padding-top: 20px; }
  .auth-form-wrap {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md); padding: 28px 22px;
  }
}
@media (max-width: 380px) {
  .auth-form-wrap { padding: 24px 16px; }
  .auth-lang select { padding-right: 28px; }
}

/* ---- OAuth callback ---- */
.callback-page {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(var(--primary-rgb), 0.10), transparent 70%),
    radial-gradient(50% 40% at 100% 100%, rgba(var(--accent-rgb), 0.08), transparent 70%),
    var(--bg-page);
}
.callback-card {
  width: 100%; max-width: 400px; text-align: center;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 40px 28px;
  animation: fadeUp 0.45s var(--ease-out) both;
}
.callback-orb {
  position: relative; width: 72px; height: 72px; margin: 0 auto 22px;
  display: grid; place-items: center;
}
.callback-orb::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 20%, var(--primary) 45%, var(--indigo) 70%, var(--accent) 90%, transparent);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: cSpin 0.9s linear infinite;
}
.callback-orb img { width: 40px; height: 40px; }
.callback-orb.error::before { animation: none; background: var(--danger-border); }
@keyframes cSpin { to { transform: rotate(360deg); } }
.callback-card h1 { font-size: var(--fs-2xl); }
.callback-card p { color: var(--text-muted); margin-top: 6px; }
.callback-card .btn { margin-top: 22px; }

/* ==========================================================
   DASHBOARD
   ========================================================== */
.dash-hero { margin-bottom: 28px; }
.dash-hero h1 { font-size: var(--fs-4xl); letter-spacing: -0.035em; }
.dash-hero h1 .wave { display: inline-block; }
.dash-date { color: var(--text-light); font-size: var(--fs-sm); font-weight: 500; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.dash-date svg { width: 15px; height: 15px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 36px; }
.kpi-grid .kpi { position: relative; overflow: hidden; transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.kpi-grid .kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-grid .kpi-label .icon-chip { width: 30px; height: 30px; border-radius: 9px; }
.kpi-grid .kpi-label .icon-chip svg { width: 16px; height: 16px; color: inherit; }
.kpi-grid .kpi-value { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); margin-top: 4px; }
.kpi-grid .kpi.is-live .kpi-value { color: var(--live); }
.kpi-meta .live-dot { width: 7px; height: 7px; margin-right: 5px; vertical-align: 1px; }
.kpi-grid .kpi .skeleton-text { width: 60%; height: 28px; margin: 6px 0 2px; }

.dash-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dash-section-head h2 { font-size: var(--fs-xl); letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.dash-section-head .count {
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; color: var(--text-light);
  background: var(--bg-hover); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 1px 9px;
}

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.team-tile {
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) ease;
}
.team-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-border); }
.team-tile:focus-within { border-color: var(--primary); box-shadow: var(--ring), var(--shadow-sm); }
.team-tile-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.team-tile-link:focus-visible { outline: none; }
.team-tile-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.team-avatar {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
  background: var(--grad-brand); color: #fff;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.01em;
  box-shadow: 0 6px 16px -6px rgba(var(--accent-rgb), 0.5);
}
.team-avatar svg { width: 24px; height: 24px; }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.team-avatar.v1 { background: linear-gradient(135deg, #0891b2, #2563eb); }
.team-avatar.v2 { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.team-avatar.v3 { background: linear-gradient(135deg, #0d9488, #0891b2); }
.team-avatar.v4 { background: linear-gradient(135deg, #7c3aed, #db2777); }
.team-tile-title { min-width: 0; flex: 1; }
.team-tile-title h3 { font-size: var(--fs-lg); line-height: 1.25; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-tile-url { color: var(--text-light); font-size: var(--fs-sm); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-tile-chevron { width: 20px; height: 20px; color: var(--text-faint); flex-shrink: 0; transition: transform var(--dur) var(--ease-out), color var(--dur) ease; }
.team-tile:hover .team-tile-chevron { transform: translateX(3px); color: var(--primary); }
.team-tile-badges { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.team-quota-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: var(--fs-sm); color: var(--text-light); margin-bottom: 8px; }
.team-quota-row strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.team-tile-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-top: 14px; border-top: 1px solid var(--border-light);
  font-size: var(--fs-sm); color: var(--text-muted);
}
.team-tile-foot .stat { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.team-tile-foot .stat svg { width: 15px; height: 15px; color: var(--text-light); }
.team-tile-foot .stat.live { color: var(--live); font-weight: 600; }
.team-tile-foot .btn { position: relative; z-index: 2; margin-left: auto; }
.team-tile .team-copy { min-height: 36px; padding: 6px 12px; }

.team-tile-add {
  align-items: center; justify-content: center; text-align: center; gap: 8px;
  min-height: 220px;
  border: 1.5px dashed var(--border-strong); background: transparent; box-shadow: none;
  font-family: inherit; color: var(--text-light); font-size: var(--fs-sm); cursor: pointer;
}
.team-tile-add strong { color: var(--text); font-size: var(--fs-base); font-weight: 600; }
.team-tile-add .icon-chip { margin-bottom: 4px; transition: transform var(--dur) var(--ease-spring); }
.team-tile-add:hover { background: var(--bg-card); border-color: var(--primary); border-style: dashed; }
.team-tile-add:hover .icon-chip { transform: scale(1.1) rotate(90deg); }
.team-tile-add:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--primary); }
@media (max-width: 640px) { .team-tile-add { min-height: 0; padding: 20px; } }
.team-tile-skeleton { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
.team-tile-skeleton .row { display: flex; gap: 14px; align-items: center; }
.team-tile-skeleton .skeleton-circle { width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; }

/* Getting-started checklist */
.setup-card {
  position: relative; overflow: hidden;
  padding: 24px; margin-bottom: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--primary-border);
  background: var(--grad-brand-soft), var(--bg-card);
}
.setup-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.setup-card h2 { font-size: var(--fs-xl); }
.setup-card .c-section-desc { color: var(--text-muted); }
.setup-progress { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); min-width: 180px; }
.setup-progress .progress { flex: 1; height: 6px; }
.setup-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; counter-reset: step; }
.setup-step {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.5;
  text-decoration: none;
}
a.setup-step:hover, button.setup-step:hover { border-color: var(--primary-border); box-shadow: var(--shadow); text-decoration: none; color: var(--text-muted); transform: translateY(-2px); }
button.setup-step { font-family: inherit; text-align: left; cursor: pointer; transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease, border-color var(--dur) ease; }
a.setup-step { transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease, border-color var(--dur) ease; }
.setup-step strong { color: var(--text); font-size: var(--fs-sm); }
.setup-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-bg); color: var(--primary); font-weight: 700; font-size: var(--fs-xs);
  border: 1px solid var(--primary-border);
}
.setup-step-num svg { width: 15px; height: 15px; }
.setup-step.done .setup-step-num { background: var(--success); color: #fff; border-color: var(--success); }
.setup-step.done strong { color: var(--text-light); text-decoration: line-through; text-decoration-color: var(--text-faint); }
.setup-step.next { border-color: var(--primary); box-shadow: var(--shadow-glow); }
.setup-step .go { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 600; font-size: var(--fs-xs); }
.setup-step .go svg { width: 14px; height: 14px; }

/* Welcome / empty state for brand-new users */
.welcome-card {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  text-align: center;
}
.welcome-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(var(--primary-rgb), 0.12), transparent 70%),
    radial-gradient(40% 50% at 100% 100%, rgba(var(--accent-rgb), 0.08), transparent 70%);
}
.welcome-icon {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px;
  display: grid; place-items: center; color: #fff; background: var(--grad-brand); box-shadow: var(--shadow-accent);
}
.welcome-icon svg { width: 30px; height: 30px; }
.welcome-card h2 { font-size: var(--fs-3xl); letter-spacing: -0.03em; }
.welcome-card > p { color: var(--text-muted); max-width: 520px; margin: 8px auto 0; }
.welcome-card .setup-steps { text-align: left; margin-top: 32px; }
.welcome-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* Create-team modal */
.modal-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; padding-right: 36px; }
.modal-head h2 { margin: 0 !important; font-size: var(--fs-2xl); }
.modal-head p { color: var(--text-light); font-size: var(--fs-sm); margin-top: 4px; }
.slug-input .input-prefix {
  position: absolute; left: 1px; top: 1px; bottom: 1px;
  display: flex; align-items: center; padding: 0 2px 0 13px;
  color: var(--text-light); font-size: var(--fs-sm); pointer-events: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.slug-input .form-control { padding-left: 40px; font-family: var(--font-mono); font-size: 0.92rem; }
.join-preview {
  display: flex; align-items: center; gap: 12px;
  margin-top: 4px; padding: 12px 14px;
  border-radius: 12px; border: 1px dashed var(--primary-border);
  background: var(--primary-bg);
  min-width: 0;
}
.join-preview .icon-chip { width: 34px; height: 34px; border-radius: 10px; background: var(--bg-card); }
.join-preview .icon-chip svg { width: 17px; height: 17px; }
.join-preview-label { font-size: var(--fs-xs); color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.join-preview-url { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--primary-dark); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join-preview-url .slug { color: var(--text); }

@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .setup-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .console-page { padding-top: 22px; }
  .dash-hero .page-actions { width: 100%; }
  .dash-hero .page-actions .btn { flex: 1; }
  .kpi-grid { margin-bottom: 28px; }
  .kpi-grid .kpi { padding: 14px 16px; }
  .kpi-grid .kpi-label { font-size: var(--fs-xs); }
  .kpi-grid .kpi-label .icon-chip { width: 26px; height: 26px; }
  .team-tile { padding: 16px; }
  .setup-card { padding: 18px; }
  .setup-steps { grid-template-columns: 1fr; }
  .welcome-card { text-align: left; }
  .welcome-icon { margin-left: 0; }
  .welcome-card > p { margin-left: 0; }
  .welcome-actions { justify-content: stretch; }
  .welcome-actions .btn { flex: 1 1 100%; }
}

/* ==========================================================
   SETTINGS LAYOUT (account + event editor)
   ========================================================== */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.settings-nav {
  position: sticky; top: calc(var(--nav-h) + 24px);
  display: flex; flex-direction: column; gap: 2px;
}
.settings-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--text-muted); font-size: var(--fs-sm); font-weight: 500;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.settings-nav a svg { width: 17px; height: 17px; color: var(--text-light); }
.settings-nav a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.settings-nav a.active { background: var(--bg-card); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); border: 1px solid var(--border); padding: 8px 11px; }
.settings-nav a.active svg { color: var(--primary); }
.settings-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.settings-section {
  scroll-margin-top: calc(var(--nav-h) + 20px);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.settings-section-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 0; }
.settings-section-head .icon-chip { width: 38px; height: 38px; border-radius: 11px; }
.settings-section-head .icon-chip svg { width: 19px; height: 19px; }
.settings-section-body { padding: 20px 24px 24px; }
.settings-section-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 14px 24px; border-top: 1px solid var(--border-light);
  background: var(--bg-subtle); border-radius: 0 0 var(--radius) var(--radius);
}
.settings-section-foot .c-muted { margin-right: auto; font-size: var(--fs-xs); }
.settings-section.danger { border-color: var(--danger-border); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.settings-section .form-group:last-child { margin-bottom: 0; }

/* chip nav for phones */
@media (max-width: 860px) {
  .settings-layout { grid-template-columns: 1fr; gap: 16px; }
  .settings-nav {
    top: var(--nav-h);
    z-index: var(--z-sticky);
    flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none;
    margin: 0 -16px; padding: 10px 16px;
    background: rgba(246, 248, 251, 0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav a { flex-shrink: 0; white-space: nowrap; border: 1px solid var(--border); background: var(--bg-card); padding: 7px 12px; min-height: 38px; }
  .settings-nav a.active { padding: 7px 12px; border-color: var(--primary-border); background: var(--primary-bg); color: var(--primary-dark); box-shadow: none; }
  .settings-section { scroll-margin-top: calc(var(--nav-h) + 72px); }
}
@media (max-width: 640px) {
  .settings-section-head { padding: 18px 16px 0; }
  .settings-section-body { padding: 16px 16px 18px; }
  .settings-section-foot { padding: 12px 16px; }
  .settings-section-foot .btn { flex: 1; }
  .settings-section-foot .c-muted { flex-basis: 100%; }
  .form-row, .form-row.three { grid-template-columns: 1fr; }
}

/* ==========================================================
   ACCOUNT
   ========================================================== */
.profile-card { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
  background: var(--grad-brand); color: #fff;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.35rem;
  box-shadow: 0 0 0 4px var(--bg-card), 0 0 0 5px var(--border), var(--shadow-accent);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-family: var(--font-heading); font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-light); font-size: var(--fs-sm); margin-top: 4px; }
.profile-meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.profile-meta svg { width: 14px; height: 14px; flex-shrink: 0; }

.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lang-card {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; min-height: 52px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card);
  font: inherit; font-size: var(--fs-sm); font-weight: 500; color: var(--text-secondary);
  cursor: pointer; text-align: left;
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease, transform var(--dur-fast) var(--ease-out);
}
.lang-card:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.lang-card:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--primary); }
.lang-card img { width: 24px; height: 17px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(15,23,42,0.08); }
.lang-card .check { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; opacity: 0; transform: scale(0.6); transition: opacity var(--dur) ease, transform var(--dur) var(--ease-spring); }
.lang-card .check svg { width: 13px; height: 13px; }
.lang-card[aria-checked="true"] { border-color: var(--primary); background: var(--primary-bg); color: var(--text); font-weight: 600; }
.lang-card[aria-checked="true"] .check { opacity: 1; transform: none; }

.signout-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.signout-row p { color: var(--text-light); font-size: var(--fs-sm); }

@media (max-width: 640px) {
  .profile-avatar { width: 56px; height: 56px; font-size: 1.15rem; }
  .lang-grid { grid-template-columns: 1fr 1fr; }
  .signout-row .btn { width: 100%; }
}

/* ==========================================================
   EVENT EDITOR
   ========================================================== */
.event-header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.event-header-meta .code-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  color: var(--text-muted); background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: var(--radius-full); padding: 2px 10px;
}
.radio-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.radio-card {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card);
  cursor: pointer; transition: border-color var(--dur) ease, background var(--dur) ease, box-shadow var(--dur) ease;
}
.radio-card:hover { border-color: var(--border-strong); }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card .icon-chip { width: 34px; height: 34px; border-radius: 10px; background: var(--bg-hover); color: var(--text-light); transition: background var(--dur) ease, color var(--dur) ease; }
.radio-card .icon-chip svg { width: 17px; height: 17px; }
.radio-card strong { display: block; font-size: var(--fs-sm); color: var(--text); }
.radio-card small { display: block; color: var(--text-light); font-size: var(--fs-xs); margin-top: 2px; line-height: 1.45; }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-bg); box-shadow: 0 0 0 1px var(--primary) inset; }
.radio-card:has(input:checked) .icon-chip { background: var(--bg-card); color: var(--primary); }
.radio-card:has(input:focus-visible) { box-shadow: var(--ring); }

.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.summary-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-light); background: var(--bg-subtle);
  min-width: 0;
}
.summary-item .icon-chip { width: 34px; height: 34px; border-radius: 10px; }
.summary-item .icon-chip svg { width: 17px; height: 17px; }
.summary-item small { display: block; color: var(--text-light); font-size: var(--fs-xs); font-weight: 500; }
.summary-item strong { display: block; color: var(--text); font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: var(--fs-sm); color: var(--text-light); }

.char-count { float: right; font-weight: 500; color: var(--text-faint); font-size: var(--fs-xs); }

.sub-card { border: 1px solid var(--border); border-radius: 12px; padding: 18px; background: var(--bg-card); }
.sub-card + .sub-card { margin-top: 14px; }
.sub-card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sub-card-head .icon-chip { width: 34px; height: 34px; border-radius: 10px; }
.sub-card-head .icon-chip svg { width: 17px; height: 17px; }
.sub-card-head h3 { font-size: var(--fs-base); margin: 0; }
.sub-card-head p { color: var(--text-light); font-size: var(--fs-sm); margin-top: 2px; line-height: 1.5; }
.sub-card-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; }
.code-box { font-family: var(--font-mono) !important; font-size: 0.8rem !important; background: var(--bg-subtle) !important; min-height: 84px; }

.session-list { display: flex; flex-direction: column; gap: 8px; }
.session-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card);
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease;
}
.session-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.session-row .icon-chip { width: 36px; height: 36px; border-radius: 10px; }
.session-row .icon-chip svg { width: 17px; height: 17px; }
.session-row .meta { flex: 1; min-width: 0; }
.session-row .meta strong { display: block; font-size: var(--fs-sm); color: var(--text); }
.session-row .meta span { font-size: var(--fs-xs); color: var(--text-light); }
.transcript-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.transcript-view { max-height: 440px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-subtle); padding: 6px 14px; }
.transcript-view .tline { padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: var(--fs-sm); line-height: 1.55; }
.transcript-view .tline:last-child { border-bottom: 0; }
.transcript-view .tmeta { display: flex; gap: 8px; align-items: center; color: var(--text-light); font-size: var(--fs-xs); font-weight: 600; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.transcript-view .ttr { display: flex; gap: 8px; margin-top: 4px; padding-left: 12px; border-left: 2px solid var(--primary-border); color: var(--primary-dark); }
.transcript-view .ttr b { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--primary); text-transform: uppercase; flex-shrink: 0; padding-top: 2px; }

/* Sticky save bar */
.save-bar {
  position: sticky; bottom: calc(12px + var(--safe-bottom)); z-index: var(--z-sticky);
  display: flex; align-items: center; gap: 12px;
  margin-top: 8px; padding: 12px 14px 12px 18px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease;
}
.save-bar-status { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-light); font-weight: 500; min-width: 0; margin-right: auto; }
.save-bar-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; transition: background var(--dur) ease; }
.save-bar.dirty { border-color: var(--warning-border); }
.save-bar.dirty .save-bar-status { color: var(--text); }
.save-bar.dirty .save-bar-status .dot { background: var(--warning); box-shadow: 0 0 0 4px rgba(217,119,6,0.15); }
@media (max-width: 640px) {
  .radio-cards { grid-template-columns: 1fr; }
  .save-bar {
    position: fixed; left: 0; right: 0; bottom: 0; margin: 0;
    border-radius: 18px 18px 0 0; border-bottom: 0;
    padding: 12px 16px calc(12px + var(--safe-bottom));
  }
  .save-bar .btn-cancel { display: none; }
  .save-bar .btn-primary { flex: 1 1 auto; max-width: 60%; }
  .event-page { padding-bottom: calc(110px + var(--safe-bottom)); }
  .session-row { flex-wrap: wrap; }
  .session-row .btn { width: 100%; }
  .sub-card { padding: 14px; }
  .sub-card-actions .btn { flex: 1; }
}

/* ==========================================================
   VOICE CLONE
   ========================================================== */
.vc-container { max-width: 680px; margin: 0 auto; }
.vc-step { display: none; }
.vc-step.active { display: block; animation: fadeUp var(--dur-slow) var(--ease-out) both; }

.vc-stepper { display: flex; align-items: center; gap: 0; margin: 4px 0 24px; list-style: none; padding: 0; }
.vc-stepper li { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text-light); }
.vc-stepper li:last-child { flex: 0 0 auto; }
.vc-stepper li::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: var(--border); margin: 0 12px; min-width: 16px; transition: background var(--dur-slow) ease; }
.vc-stepper li:last-child::after { display: none; }
.vc-stepper .num {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--bg-card); border: 2px solid var(--border-strong); color: var(--text-light);
  font-size: var(--fs-xs); font-weight: 700;
  transition: background var(--dur) ease, border-color var(--dur) ease, color var(--dur) ease;
}
.vc-stepper .num svg { width: 15px; height: 15px; }
.vc-stepper .num .ico { display: none; }
.vc-stepper li.current { color: var(--text); }
.vc-stepper li.current .num { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15); }
.vc-stepper li.done { color: var(--text-muted); }
.vc-stepper li.done .num { border-color: var(--success); background: var(--success); color: #fff; }
.vc-stepper li.done .num .n { display: none; }
.vc-stepper li.done .num .ico { display: block; }
.vc-stepper li.done::after { background: var(--success); }
.vc-stepper .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vc-card { padding: 28px; }
.vc-card h3 { font-size: var(--fs-xl); margin-bottom: 6px; }
.vc-reading-text {
  position: relative;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px 22px 28px;
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin: 18px 0 8px;
  overflow: hidden;
}
.vc-reading-text::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad-brand); }

.vc-recorder { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0 4px; }
.vc-ring-wrap { position: relative; width: 152px; height: 152px; display: grid; place-items: center; }
.vc-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.vc-ring circle { fill: none; stroke-width: 6; }
.vc-ring .track { stroke: var(--border); }
.vc-ring .prog { stroke: url(#vcGrad); stroke-linecap: round; transition: stroke-dashoffset 300ms linear; }
.vc-level {
  position: absolute; inset: 22px; border-radius: 50%;
  background: rgba(220, 38, 38, 0.14);
  transform: scale(calc(1 + var(--lvl, 0) * 0.35));
  transition: transform 90ms linear, opacity var(--dur) ease;
  opacity: 0;
}
.vc-recorder.recording .vc-level { opacity: 1; }
.vc-record-btn {
  position: relative;
  width: 96px; height: 96px; border-radius: 50%;
  border: none; cursor: pointer; display: grid; place-items: center;
  background: linear-gradient(145deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 10px 24px -6px rgba(220, 38, 38, 0.55), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) ease;
}
.vc-record-btn svg { width: 36px; height: 36px; }
.vc-record-btn:hover { transform: scale(1.05); }
.vc-record-btn:active { transform: scale(0.97); }
.vc-record-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.3), 0 10px 24px -6px rgba(220, 38, 38, 0.55); }
.vc-record-btn.recording { background: linear-gradient(145deg, #1e293b, #0f172a); box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.5); }
.vc-record-btn.recording svg { width: 28px; height: 28px; }
.vc-timer { text-align: center; font-family: var(--font-heading); font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--text); line-height: 1.1; }
.vc-timer small { font-family: var(--font-body); font-size: var(--fs-sm); color: var(--text-faint); font-weight: 500; letter-spacing: 0; }
.vc-recorder.recording .vc-timer { color: var(--danger); }
.vc-hint { text-align: center; color: var(--text-light); font-size: var(--fs-sm); display: flex; align-items: center; gap: 8px; justify-content: center; }
.vc-recorder.recording .vc-hint { color: var(--danger); font-weight: 600; }
.vc-tips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 14px; color: var(--text-light); font-size: var(--fs-xs); }
.vc-tips span { display: inline-flex; align-items: center; gap: 6px; }
.vc-tips svg { width: 14px; height: 14px; color: var(--primary); }

.vc-preview-box { display: flex; align-items: center; gap: 14px; padding: 14px; margin: 18px 0; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-subtle); }
.vc-preview-box .icon-chip { width: 44px; height: 44px; border-radius: 12px; }
.vc-audio-preview { width: 100%; min-width: 0; flex: 1; height: 44px; }
.vc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.vc-upload { margin-top: 16px; }
.vc-upload .progress { height: 6px; }
.vc-upload-label { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-light); margin-bottom: 6px; font-weight: 500; }

.vc-result { text-align: center; }
.vc-result-icon {
  width: 76px; height: 76px; margin: 6px auto 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--warning-bg); color: var(--warning);
  position: relative;
}
.vc-result-icon svg { width: 34px; height: 34px; }
.vc-result-icon.processing::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--warning); border-right-color: var(--warning);
  animation: cSpin 1s linear infinite;
}
.vc-result-icon.ready { background: var(--success-bg); color: var(--success); animation: cPop 520ms var(--ease-spring) both; }
.vc-result-icon.failed { background: var(--danger-bg); color: var(--danger); animation: cPop 520ms var(--ease-spring) both; }
@keyframes cPop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.vc-status { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 16px; border-radius: 12px; margin: 16px 0; font-size: var(--fs-sm); font-weight: 500; border: 1px solid transparent; text-align: left; }
.vc-status svg { width: 18px; height: 18px; flex-shrink: 0; }
.vc-status.processing { background: var(--warning-bg); border-color: var(--warning-border); color: #92400e; }
.vc-status.ready { background: var(--success-bg); border-color: var(--success-border); color: #065f46; }
.vc-status.failed { background: var(--danger-bg); border-color: var(--danger-border); color: #991b1b; }
#result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#result-actions.hidden { display: none !important; }

@media (max-width: 640px) {
  .vc-card { padding: 20px 16px; }
  .vc-stepper .lbl { display: none; }
  .vc-stepper li.current .lbl { display: inline; }
  .vc-reading-text { font-size: 1.02rem; padding: 18px 16px 18px 20px; line-height: 1.75; }
  .vc-actions .btn, #result-actions .btn { flex: 1 1 100%; }
  .vc-preview-box { flex-direction: column; align-items: stretch; }
  .vc-preview-box .icon-chip { display: none; }
}

/* ==========================================================
   SERMON LIBRARY (public)
   ========================================================== */
.sermons-hero { display: flex; align-items: center; gap: 18px; }
.sermons-hero .team-avatar { width: 56px; height: 56px; border-radius: 16px; font-size: 1.2rem; }
.sermon-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.sermon-toolbar .search-wrapper { flex: 1; min-width: 200px; max-width: 380px; position: relative; }
.sermon-toolbar .search-wrapper svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-light); pointer-events: none; }
.sermon-toolbar .search-wrapper .form-control { padding-left: 40px; }
.sermon-count { color: var(--text-light); font-size: var(--fs-sm); font-weight: 500; }

.sermon-list { display: flex; flex-direction: column; gap: 12px; }
.sermon-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 16px 18px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease, transform var(--dur) var(--ease-out);
}
.sermon-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.sermon-card.playing { border-color: var(--primary); box-shadow: var(--shadow-glow); }
.sermon-play {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--grad-brand); color: #fff;
  box-shadow: var(--shadow-primary);
  transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) ease;
}
.sermon-play:hover { transform: scale(1.06); }
.sermon-play:focus-visible { outline: none; box-shadow: var(--ring), var(--shadow-primary); }
.sermon-play svg { width: 22px; height: 22px; }
.sermon-play .i-pause, .sermon-play .i-load { display: none; }
.sermon-card.playing .sermon-play .i-play { display: none; }
.sermon-card.playing .sermon-play .i-pause { display: block; }
.sermon-card.loading .sermon-play .i-play, .sermon-card.loading .sermon-play .i-pause { display: none; }
.sermon-card.loading .sermon-play .i-load { display: block; animation: cSpin 0.9s linear infinite; }
.sermon-info { min-width: 0; }
.sermon-info h3 { font-size: var(--fs-base); line-height: 1.35; margin: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sermon-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; color: var(--text-light); font-size: var(--fs-sm); }
.sermon-meta span { display: inline-flex; align-items: center; gap: 5px; }
.sermon-meta svg { width: 14px; height: 14px; }
.sermon-actions { display: flex; gap: 6px; }
.sermon-actions .btn { min-height: 40px; }
.sermon-player { grid-column: 1 / -1; display: none; align-items: center; gap: 12px; padding-top: 4px; }
.sermon-card.open .sermon-player { display: flex; animation: fadeIn var(--dur) ease both; }
.sermon-time { font-size: var(--fs-xs); color: var(--text-light); font-variant-numeric: tabular-nums; min-width: 40px; }
.sermon-time.end { text-align: right; }
.sermon-seek { flex: 1; min-width: 0; }
.sermon-speed { min-height: 32px; padding: 4px 10px; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .sermons-hero .team-avatar { width: 46px; height: 46px; border-radius: 13px; }
  .sermon-card { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; padding: 14px; }
  .sermon-actions { grid-column: 1 / -1; }
  .sermon-actions .btn { flex: 1; }
  .sermon-play { width: 46px; height: 46px; }
  .sermon-toolbar .search-wrapper { max-width: none; flex-basis: 100%; }
}

/* Voice cloning plan gate (free teams) */
.vc-locked { text-align: center; padding: 40px 28px; max-width: 560px; margin: 8px auto 0; }
.vc-locked .icon-chip { margin: 0 auto 16px; }
.vc-locked h2 { font-size: var(--fs-2xl); margin-bottom: 8px; }
.vc-locked-perks { list-style: none; display: inline-flex; flex-direction: column; gap: 8px; margin: 20px auto 24px; text-align: left; }
.vc-locked-perks li { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); }
.vc-locked-perks svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; }
.vc-locked-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 480px) { .vc-locked { padding: 32px 18px; } .vc-locked-actions .btn { width: 100%; } }
