/* ===================== Asistente IA ===================== */
:root { --ai-1: #8b5cf6; --ai-2: #6366f1; --ai-3: #22d3ee; --ai-hot: #f472b6; }

/* botón de la cabecera */
.ai-pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 10px; margin-right: 6px; border-radius: 99px; font: 700 13px Inter, sans-serif; color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, var(--ai-1), var(--ai-2)); box-shadow: 0 4px 16px rgba(124,58,237,.38); transition: transform .12s; }
.ai-pill:hover { transform: translateY(-1px); }
.ai-pill.on { background: linear-gradient(135deg, #a855f7, #ec4899); animation: aiPulse 1.8s infinite; }
.ai-pill.on i { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; }
@keyframes aiPulse { 0% { box-shadow: 0 0 0 0 rgba(236,72,153,.55); } 70% { box-shadow: 0 0 0 10px rgba(236,72,153,0); } 100% { box-shadow: 0 0 0 0 rgba(236,72,153,0); } }
@media (max-width: 820px) { .ai-pill span { display: none; } .ai-pill { padding: 0 10px; } }

/* tarjeta "Resumen del asistente" en el chat */
.bubble.type-ai_summary { max-width: min(520px, 88%); }
.ai-card { border-radius: 12px; padding: 12px 14px 4px; margin: 2px 0 4px; background: linear-gradient(160deg, rgba(139,92,246,.18), rgba(34,211,238,.08)); border: 1px solid rgba(139,92,246,.35); }
.ai-card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ai-card-h b { display: block; font-size: 14px; }
.ai-card-h small { color: var(--muted); font-size: 12px; }
.ai-badge { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--ai-1), var(--ai-3)); flex-shrink: 0; }
.ai-card .text { line-height: 1.55; }

/* paneles (docente, clave, institución, equipo) */
.ai-panel { display: flex; flex-direction: column; gap: 14px; }
.ai-panel .ab-l { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; }
.ai-panel .ab-l small { font-weight: 400; }
.ai-panel em.ok { color: var(--ok); font-style: normal; font-weight: 600; font-size: 12.5px; }
.ai-panel em.off { color: var(--warn); font-style: normal; font-weight: 600; font-size: 12.5px; }
.ai-info { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--field); color: var(--text-2); font-size: 13.5px; }
.ai-switch { padding: 12px 14px !important; border-radius: 12px; background: linear-gradient(135deg, rgba(139,92,246,.16), rgba(99,102,241,.06)); border: 1px solid rgba(139,92,246,.3); }
.ai-usage { padding: 14px; border-radius: 12px; background: var(--field); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.ai-u-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ai-u-top span { color: var(--text-2); font-variant-numeric: tabular-nums; }
.ai-usage small { color: var(--muted); }
.ai-u-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.ghost.danger-txt { color: var(--danger); }
.input.sm { padding: 6px 8px; font-size: 13.5px; width: 92px; }
.ai-bar { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.ai-bar.sm { height: 6px; margin-bottom: 4px; }
.ai-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ai-3), var(--ai-1)); transition: width .4s; }
.ai-bar.hot i { background: linear-gradient(90deg, var(--warn), var(--danger)); }
.ai-seg { grid-template-columns: repeat(5, 1fr); margin: 0; }
.ai-seg button.on, .ai-seg button.on:hover { background: var(--panel); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.ai-sec h4 { font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 4px 0 8px; }
.ai-teams, .ai-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ai-teams li, .ai-tasks li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--field); flex-wrap: wrap; }
.ai-teams .tn { font-weight: 600; }
.ai-teams small, .ai-tasks small { color: var(--muted); }
.ai-tasks li { flex-direction: column; align-items: flex-start; gap: 2px; border-left: 3px solid var(--ai-1); }
.ai-tasks li.late { border-left-color: var(--danger); }
.ai-live { margin-left: auto; color: #f472b6; font-style: normal; font-weight: 700; font-size: 12.5px; }
.ai-rs { padding: 10px 12px; border-radius: 10px; background: var(--field); margin-bottom: 8px; }
.ai-rs > div { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ai-rs small { color: var(--muted); }
.ai-rs p, .ai-sum { margin: 6px 0 0; color: var(--text-2); line-height: 1.5; }
.ai-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ai-kpis div { padding: 12px; border-radius: 12px; background: var(--field); text-align: center; }
.ai-kpis b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.ai-kpis small { color: var(--muted); }
.ai-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ai-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ai-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.ai-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ai-table td small { display: block; color: var(--muted); font-size: 12px; }
.ai-team { display: flex; flex-direction: column; gap: 14px; }
.ai-hero { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--field); }
.ai-hero b { display: block; }
.ai-hero small { color: var(--muted); }
.ai-mini-orb { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; background: radial-gradient(circle at 35% 30%, #fff 0 6%, transparent 7%), conic-gradient(from 200deg, var(--ai-3), var(--ai-1), var(--ai-hot), var(--ai-2), var(--ai-3)); opacity: .45; filter: saturate(.6); }
.ai-hero.on .ai-mini-orb { opacity: 1; filter: none; animation: aiSpin 6s linear infinite; box-shadow: 0 0 24px rgba(139,92,246,.6); }
@media (max-width: 560px) { .ai-two, .ai-kpis { grid-template-columns: 1fr; } .ai-seg { grid-template-columns: repeat(3, 1fr); } }

/* ---------- escenario de voz del líder (pantalla completa) ---------- */
.ai-stage { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; color: #f4f2ff; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #2a1660 0%, #120b2e 45%, #070512 100%);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); animation: aiIn .25s ease-out; }
.ai-stage.out { animation: aiOut .22s ease-in forwards; }
@keyframes aiIn { from { opacity: 0; transform: scale(1.03); } }
@keyframes aiOut { to { opacity: 0; transform: scale(.98); } }
.ais-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ais-bg i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: .35; animation: aiFloat 18s ease-in-out infinite alternate; }
.ais-bg i:nth-child(1) { background: #7c3aed; left: -20vmax; top: -10vmax; }
.ais-bg i:nth-child(2) { background: #0891b2; right: -25vmax; top: 20vmax; animation-delay: -6s; }
.ais-bg i:nth-child(3) { background: #db2777; left: 10vmax; bottom: -35vmax; opacity: .22; animation-delay: -12s; }
@keyframes aiFloat { to { transform: translate(6vmax, -4vmax) scale(1.1); } }
.ais-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.ais-x { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 16px; color: #fff; }
.ais-title { flex: 1; min-width: 0; }
.ais-title b { display: block; font: 700 17px Inter, sans-serif; }
.ais-title small { display: block; color: rgba(244,242,255,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ais-chip { padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.1); font: 700 13px Inter, sans-serif; font-variant-numeric: tabular-nums; }
.ais-chip.low { background: rgba(244,114,182,.25); color: #ffd1e8; }
.ais-main { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 8px 22px; min-height: 0; }

/* esfera */
.ais-orb { --lvl: 0; position: relative; width: min(58vw, 260px); aspect-ratio: 1; display: grid; place-items: center; }
.ais-orb > span { position: absolute; border-radius: 50%; }
.ais-orb .core { inset: 14%; background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.95) 0 5%, rgba(255,255,255,0) 22%), conic-gradient(from 210deg, var(--ai-3), var(--ai-1), var(--ai-hot), var(--ai-2), var(--ai-3));
  box-shadow: 0 0 calc(40px + var(--lvl) * 70px) rgba(139,92,246,.75), inset 0 -12px 40px rgba(7,5,18,.55);
  transform: scale(calc(.9 + var(--lvl) * .22)); transition: transform .08s linear; animation: aiSpin 14s linear infinite; }
.ais-orb .r1, .ais-orb .r2 { inset: 0; border: 2px solid rgba(167,139,250,.35); transform: scale(calc(.95 + var(--lvl) * .35)); transition: transform .1s linear; }
.ais-orb .r2 { inset: -9%; border-color: rgba(34,211,238,.2); transform: scale(calc(.92 + var(--lvl) * .5)); }
@keyframes aiSpin { to { transform: rotate(360deg) scale(calc(.9 + var(--lvl, 0) * .22)); } }
.ai-stage[data-state="idle"] .ais-orb .core { filter: saturate(.55) brightness(.8); animation-duration: 30s; }
.ai-stage[data-state="connecting"] .ais-orb .r1, .ai-stage[data-state="thinking"] .ais-orb .r1, .ai-stage[data-state="summarizing"] .ais-orb .r1 { border-style: dashed; animation: aiRing 1.6s linear infinite; }
@keyframes aiRing { to { transform: rotate(360deg); } }
.ai-stage[data-state="hearing"] .ais-orb .core, .ai-stage.talking .ais-orb .core { box-shadow: 0 0 calc(50px + var(--lvl) * 90px) rgba(34,211,238,.8), inset 0 -12px 40px rgba(7,5,18,.5); }
.ai-stage[data-state="speaking"] .ais-orb .core { box-shadow: 0 0 calc(50px + var(--lvl) * 100px) rgba(236,72,153,.7), inset 0 -12px 40px rgba(7,5,18,.5); }
.ais-state { margin: 0; font: 700 clamp(18px, 4.6vw, 24px) Inter, sans-serif; text-align: center; letter-spacing: -.2px; }
.ais-caption { max-width: 560px; width: 100%; max-height: 28vh; overflow-y: auto; text-align: center; color: rgba(244,242,255,.82); font-size: clamp(15px, 3.8vw, 17px); line-height: 1.55; min-height: 1.5em; }
.ais-warn { padding: 12px 16px; border-radius: 12px; background: rgba(245,166,35,.15); border: 1px solid rgba(245,166,35,.4); color: #ffe2b0; text-align: center; max-width: 460px; }

/* controles */
.ais-foot { position: relative; padding: 12px 18px 22px; display: flex; justify-content: center; }
.ais-pre, .ais-live { width: 100%; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ais-live.dim { opacity: .45; pointer-events: none; }
.ais-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.ais-modes button { padding: 11px 10px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #fff; text-align: left; }
.ais-modes button b { display: block; font-size: 14px; }
.ais-modes button small { color: rgba(244,242,255,.6); font-size: 12px; }
.ais-modes button.on { background: rgba(139,92,246,.25); border-color: rgba(167,139,250,.75); box-shadow: 0 0 0 1px rgba(167,139,250,.35) inset; }
.ais-go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 58px; border-radius: 99px; font: 800 17px Inter, sans-serif; color: #fff;
  background: linear-gradient(135deg, var(--ai-1), var(--ai-2) 55%, #0ea5e9); box-shadow: 0 10px 34px rgba(124,58,237,.55); transition: transform .12s, opacity .2s; }
.ais-go:active { transform: scale(.98); }
.ais-go:disabled { opacity: .4; box-shadow: none; }
.ais-go.loading { opacity: .7; }
.ais-note { color: rgba(244,242,255,.55); font-size: 12.5px; text-align: center; }
.ais-talk, .ais-mute { width: 100%; min-height: 92px; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; user-select: none; -webkit-user-select: none; touch-action: none;
  background: rgba(255,255,255,.08); border: 2px solid rgba(167,139,250,.55); transition: transform .1s, background .15s, border-color .15s; }
.ais-talk .ic, .ais-mute .ic { font-size: 28px; line-height: 1; }
.ais-talk b, .ais-mute b { font-size: 14.5px; }
.ai-stage.talking .ais-talk { background: linear-gradient(135deg, rgba(34,211,238,.4), rgba(139,92,246,.45)); border-color: #67e8f9; transform: scale(.98); }
.ais-mute.muted { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); }
.ais-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.ais-btn { height: 46px; border-radius: 14px; background: rgba(255,255,255,.08); color: #fff; font-weight: 600; font-size: 13.5px; padding: 0 10px; }
.ais-btn.strong { background: #f4f2ff; color: #2a1660; font-weight: 800; }
.ais-link { color: rgba(244,242,255,.55); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
@media (min-height: 760px) { .ais-orb { width: min(58vw, 300px); } }
@media (prefers-reduced-motion: reduce) { .ais-bg i, .ais-orb .core, .ai-pill.on, .ai-hero.on .ai-mini-orb { animation: none !important; } }

/* ===================== Google SSO e instituciones ===================== */
.sso-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 14px 0 12px; }
.sso-or::before, .sso-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.btn.sso-google { height: 44px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; text-decoration: none; gap: 10px; }
.btn.sso-google:hover { background: #f6f8fb; }
.sso-note { display: block; text-align: center; color: var(--muted); font-size: 12px; margin-top: 8px; }
.sso-switch { display: block; margin-top: 8px; color: var(--accent); text-align: center; font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.org-card { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--field); border: 1px solid var(--border); margin-top: 6px; }
.org-card-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.org-card-info > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.org-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.org-card-actions > button { flex: 0 0 auto; white-space: nowrap; }
.org-card small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--panel); font-size: 18px; flex-shrink: 0; }
.adm { display: flex; flex-direction: column; gap: 14px; }
.adm-intro, .adm-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--field); color: var(--text-2); font-size: 13.5px; }
.adm-list { display: flex; flex-direction: column; gap: 8px; }
.adm-org { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--border); text-align: left; color: var(--text); transition: border-color .12s, transform .12s; }
.adm-org:hover { border-color: var(--accent); transform: translateY(-1px); }
.adm-org.off { opacity: .55; }
.adm-org.ghost { background: transparent; border-style: dashed; }
.adm-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font: 800 18px Inter, sans-serif; color: #fff; background: linear-gradient(135deg, #0ea5e9, #6366f1); flex-shrink: 0; }
.adm-logo.g { background: var(--panel); font-size: 20px; }
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-main small { color: var(--muted); }
.adm-stats { display: flex; flex-direction: column; align-items: center; min-width: 58px; }
.adm-stats b { font-variant-numeric: tabular-nums; }
.adm-stats small { color: var(--muted); font-size: 11.5px; }
.adm-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.adm-kpis div { padding: 12px; border-radius: 12px; background: var(--field); text-align: center; }
.adm-kpis b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.adm-kpis small { color: var(--muted); }
.adm-ai { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; text-align: left; color: var(--text); background: linear-gradient(135deg, rgba(139,92,246,.16), rgba(99,102,241,.06)); border: 1px solid rgba(139,92,246,.3); }
.adm-ai > span:first-child { font-size: 22px; }
.adm-ai > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.adm-ai small { color: var(--muted); }
.adm-sec h4 { font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 4px 0 8px; }
.adm-find { margin-bottom: 8px; }
.adm-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.adm-people li { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px; }
.adm-people li:hover { background: var(--hover); }
.adm-people li > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-people small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.adm-role { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.adm-form label small { font-weight: 400; }
@media (max-width: 560px) { .adm-stats { display: none; } .adm-kpis { grid-template-columns: 1fr 1fr 1fr; } }
/* registro de institución */
.adm-intro.warn { background: rgba(245,166,35,.12); color: #f5c26b; }
.adm-choice { display: grid; gap: 8px; }
.adm-choice button { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--field); border: 2px solid var(--border); text-align: left; color: var(--text); transition: border-color .12s; }
.adm-choice button.on { border-color: var(--accent); background: var(--accent-soft); }
.adm-choice .ic { font-size: 24px; line-height: 1; }
.adm-choice span:last-child { display: flex; flex-direction: column; gap: 3px; }
.adm-choice small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.adm-choice em { align-self: flex-start; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: #fff; margin-top: 2px; }
.adm-dns { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--field); border: 1px solid var(--border); }
.adm-dns > div { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.adm-dns small { color: var(--muted); min-width: 110px; }
.adm-dns .v { align-items: center; }
.adm-dns code { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; background: var(--panel); font: 600 13px ui-monospace, Consolas, monospace; word-break: break-all; }
.adm-wait { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: var(--field); }
.adm-wait > span { font-size: 28px; }
.adm-wait small { display: block; color: var(--muted); }
.adm-reqs { display: flex; flex-direction: column; gap: 10px; }
.adm-req { padding: 12px 14px; border-radius: 14px; background: var(--field); border: 1px solid rgba(245,166,35,.45); display: flex; flex-direction: column; gap: 10px; }
.adm-req-top { display: flex; align-items: center; gap: 12px; }
.adm-req-note { margin: 0; color: var(--text-2); font-style: italic; }
.adm-req-btns { display: flex; justify-content: flex-end; gap: 8px; }
.adm-chip { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(245,166,35,.18); color: #f5c26b; white-space: nowrap; }
.adm-chip.dns { background: rgba(83,189,235,.16); color: var(--blue); }
.adm-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.adm-checks li { display: flex; gap: 8px; align-items: baseline; color: var(--text-2); }
.adm-checks li > span:first-child { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; flex-shrink: 0; transform: translateY(3px); }
.adm-checks li.ok > span:first-child { background: rgba(46,230,166,.18); color: var(--ok); }
.adm-checks li.warn > span:first-child { background: rgba(245,166,35,.18); color: var(--warn); }
.adm-checks li.no > span:first-child { background: rgba(255,92,108,.18); color: var(--danger); }
.adm-badge { font-style: normal; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; }
.adm-checks li > span:last-child { flex: 1; min-width: 0; }
.adm-dns > div { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 6px 10px; }
.adm-dns small { min-width: 0; }
.adm-val { display: flex; gap: 8px; align-items: center; min-width: 0; }
@media (max-width: 560px) { .adm-dns > div { grid-template-columns: 1fr; } }

/* ---------- pantalla del asistente en la clase en vivo (se presenta en Meet/Zoom) ---------- */
.ai-stage.class .ais-main { gap: 14px; }
.ai-stage.class .ais-orb { width: min(36vh, 240px); }
.ais-topic { margin: -4px 0 0; font: 800 clamp(20px, 3.2vw, 34px) Inter, sans-serif; text-align: center; letter-spacing: -.3px; background: linear-gradient(90deg, #c4b5fd, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; max-width: 900px; }
.ai-stage.class .ais-caption { max-width: 980px; max-height: 30vh; font-size: clamp(17px, 2.2vw, 26px); line-height: 1.5; color: #f4f2ff; }
.ais-chip.ghost { background: transparent; border: 1px solid rgba(255,255,255,.18); color: #f4f2ff; text-decoration: none; cursor: pointer; }
.ais-chip.ghost:hover { background: rgba(255,255,255,.08); }
.ais-pre.wide, .ais-live.wide { max-width: 760px; }
.ais-modes.three { grid-template-columns: repeat(3, 1fr); }
.ais-modes button[data-nonotes] { opacity: .5; }
.ais-fields, .ais-opts { display: flex; gap: 8px; width: 100%; flex-wrap: wrap; align-items: center; }
.ais-input { flex: 1; min-width: 200px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff; font-size: 15px; outline: none; }
.ais-input:focus { border-color: rgba(167,139,250,.8); }
.ais-input::placeholder { color: rgba(244,242,255,.45); }
.ais-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.ais-seg button { height: 36px; padding: 0 12px; border-radius: 9px; color: rgba(244,242,255,.7); font-weight: 600; font-size: 13px; white-space: nowrap; }
.ais-seg button.on { background: rgba(139,92,246,.4); color: #fff; }
.ais-check { display: inline-flex; align-items: center; gap: 8px; color: #f4f2ff; font-size: 13.5px; cursor: pointer; padding: 6px 4px; }
.ais-check input { width: 18px; height: 18px; accent-color: #8b5cf6; }
.ais-check small { color: rgba(244,242,255,.55); }
.ais-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.ais-act { height: 40px; padding: 0 14px; border-radius: 99px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); color: #fff; font-weight: 700; font-size: 13.5px; transition: background .12s, transform .1s; }
.ais-act:hover { background: rgba(139,92,246,.35); }
.ais-act:active { transform: scale(.97); }
.ais-ask { display: flex; gap: 8px; width: 100%; }
.ais-ask .ais-btn { padding: 0 18px; }
.ais-row.three { grid-template-columns: 1.4fr 1fr 1fr; }
.ais-talk.compact, .ais-mute.compact { min-height: 46px; border-radius: 14px; flex-direction: row; gap: 8px; }
.ais-talk.compact .ic, .ais-mute.compact .ic { font-size: 18px; }
.ais-talk.compact b, .ais-mute.compact b { font-size: 13px; }
.ais-show { position: absolute; right: 18px; bottom: 18px; height: 38px; padding: 0 14px; border-radius: 99px; background: rgba(255,255,255,.1); color: #fff; font-weight: 600; font-size: 13px; opacity: .55; }
.ais-show:hover { opacity: 1; }
.ai-stage.pres .ais-pre, .ai-stage.pres .ais-live, .ai-stage.pres .ais-head .ais-x, .ai-stage.pres .ais-head .ghost { display: none !important; }
.ai-stage.pres .ais-caption { max-height: 42vh; }
.ai-tip-b { padding: 12px 14px; border-radius: 12px; background: var(--field); }
.ai-tip-b ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text-2); }
.ai-tip-b p { margin: 6px 0 0; color: var(--text-2); }
@media (max-width: 700px) { .ais-modes.three, .ais-row.three { grid-template-columns: 1fr; } .ai-stage.class .ais-head .ghost { display: none; } }
.ai-stage.class[data-state="idle"] .ais-orb, .ai-stage.class[data-state="connecting"] .ais-orb { width: min(22vh, 170px); }
.ai-stage.class[data-state="idle"] .ais-caption { font-size: clamp(15px, 1.6vw, 18px); color: rgba(244,242,255,.75); }

/* ===================== Google Classroom ===================== */
.bubble.type-gc_work { max-width: min(480px, 88%); }
.gc-card { border-radius: 12px; padding: 12px 14px; margin: 2px 0 4px; background: linear-gradient(160deg, rgba(15,157,88,.16), rgba(15,157,88,.04)); border: 1px solid rgba(15,157,88,.4); display: flex; flex-direction: column; gap: 8px; }
.gc-card-h { display: flex; gap: 10px; align-items: center; }
.gc-card-h svg { width: 30px; height: 30px; flex-shrink: 0; }
.gc-card-h b { display: block; font-size: 14.5px; }
.gc-card-h small { color: var(--muted); font-size: 12px; }
.gc-desc { color: var(--text-2); font-size: 13.5px; max-height: 6.2em; overflow: hidden; }
.gc-stats { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); }
.gc-mine { font-size: 13.5px; padding: 6px 10px; border-radius: 8px; background: var(--field); }
.gc-mine.ok { color: var(--ok); }
.gc-open { text-decoration: none; }
.gc-panel { display: flex; flex-direction: column; gap: 14px; }
.gc-sync { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--field); }
.gc-sync.err { background: rgba(255,92,108,.1); }
.gc-sync > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.gc-sync small { color: var(--muted); }
.gc-sec h4 { font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 4px 0 8px; }
.gc-p { margin: 8px 0 0; color: var(--text-2); }
.gc-tip { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(15,157,88,.1); color: var(--text-2); font-size: 13px; }
.gc-pend { margin-top: 8px; }
.gc-pend summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13.5px; }
.gc-pend ul { list-style: none; padding: 0; margin: 8px 0 0; max-height: 200px; overflow-y: auto; }
.gc-pend li { display: flex; flex-direction: column; padding: 5px 0; border-bottom: 1px solid var(--border); }
.gc-pend li small { color: var(--muted); }
.gc-inv { display: flex; gap: 8px; margin: 10px 0 4px; }
.gc-works, .gc-courses, .gc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gc-list li { padding: 6px 0; color: var(--text-2); }
.gc-works li, .gc-courses li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--field); }
.gc-w { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gc-w small { color: var(--muted); }
.gc-o { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(15,157,88,.18); color: #34c77b; white-space: nowrap; }
.gc-o.whatsup { background: var(--accent-soft); color: var(--accent); }
.gc-ci { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0f9d58, #1a73e8); flex-shrink: 0; }
.gc-linked { font-style: normal; font-size: 12px; color: var(--muted); }
.gc-tablewrap { overflow: auto; max-height: 60vh; border: 1px solid var(--border); border-radius: 10px; }
.gc-table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.gc-table th, .gc-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.gc-table th { position: sticky; top: 0; background: var(--panel-2); font-weight: 600; color: var(--text-2); max-width: 140px; }
.gc-table th span { display: block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.gc-table th em { display: block; font-style: normal; font-size: 10.5px; color: var(--accent); }
.gc-table td.n { text-align: left; position: sticky; left: 0; background: var(--panel); }
.gc-table td.n small { display: block; color: var(--muted); font-size: 11.5px; }
.gc-table td.g { font-weight: 700; color: var(--text); }
.gc-table td.g small { color: var(--muted); font-weight: 400; }
.gc-table td.na, .gc-table td.s { color: var(--muted); }
.gc-table td i { font-style: normal; margin-left: 3px; }
.gc-legend { font-size: 12px; margin: 8px 0 0; }
.gc-pub { margin-top: 6px; padding: 10px 12px !important; border-radius: 12px; background: rgba(15,157,88,.1); border: 1px solid rgba(15,157,88,.35); }

/* ===================== Moodle ===================== */
.bubble.type-md_work { max-width: min(480px, 88%); }
.gc-card.md-card { background: linear-gradient(160deg, rgba(249,128,18,.16), rgba(249,128,18,.04)); border-color: rgba(249,128,18,.45); }
.gc-o.md { background: rgba(249,128,18,.18); color: #ffa24a; }
.gc-ci.md { background: linear-gradient(135deg, #f98012, #d35400); }
.gc-tip.md { background: rgba(249,128,18,.1); }
.md-pub { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(249,128,18,.08); border: 1px solid rgba(249,128,18,.35); }
.md-form .seg { margin-bottom: 4px; }

/* ---------- asistente de la clase: pantalla de preparación ordenada (1.41) ---------- */
.ais-head .ais-chip.ghost { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; font-weight: 600; }
.ais-head .ais-chip svg { width: 17px; height: 17px; }
.ai-stage.class:has(.ais-pre:not([hidden])) { overflow-y: auto; }
.ai-stage.class:has(.ais-pre:not([hidden])) .ais-main { flex: none; padding-top: 4px; gap: 10px; }
.ai-stage.class:has(.ais-pre:not([hidden])) .ais-orb { width: min(18vh, 130px); }
.ai-stage.class:has(.ais-pre:not([hidden])) .ais-state { font-size: 22px; }
.ai-stage.class:has(.ais-pre:not([hidden])) .ais-caption { font-size: 14.5px; max-width: 520px; max-height: none; color: rgba(244,242,255,.65); }
.ai-stage.class:has(.ais-pre:not([hidden])) .ais-foot { flex: none; padding-top: 6px; }
.ais-pre.wide { max-width: 720px; gap: 12px; padding: 18px; border-radius: 20px; background: rgba(12,8,30,.55); border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 20px 60px rgba(0,0,0,.35); backdrop-filter: blur(14px); align-items: stretch; }
.ais-sec { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.ais-sec[hidden] { display: none; }
.ais-sec h5 { margin: 0; font: 600 11px Inter, sans-serif; letter-spacing: .6px; text-transform: uppercase; color: rgba(244,242,255,.5); }
.ais-sec + .ais-sec { padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.ais-modes.three button { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 1px; align-items: center; padding: 12px; }
.ais-modes .am-ic { grid-row: span 2; color: var(--c); display: grid; }
.ais-modes .am-ic svg { width: 24px; height: 24px; }
.ais-modes button b { font-size: 14px; font-weight: 600; }
.ais-modes button small { font-size: 11.5px; line-height: 1.3; }
.ais-fields { flex-wrap: nowrap; }
.ais-fields .ais-input { min-width: 0; }
.ais-opts { justify-content: space-between; }
.ais-check { padding: 2px 2px 0; font-size: 13px; }
.ais-check small { font-size: 12px; }
.ais-pre .ais-go { height: 52px; font-size: 16px; margin-top: 4px; }
.ais-warn { display: flex; align-items: center; gap: 12px; text-align: left; max-width: none; width: 100%; padding: 10px 12px; }
.ais-warn .aw-ic { color: #fbbf24; display: grid; } .ais-warn .aw-ic svg { width: 22px; height: 22px; }
.ais-warn > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ais-warn b { font-size: 13.5px; color: #ffe8bf; } .ais-warn small { font-size: 12px; color: rgba(255,226,176,.75); }
.ais-btn.sm { height: 34px; padding: 0 14px; font-size: 13px; white-space: nowrap; border-radius: 10px; background: #fbbf24; color: #1c1300; font-weight: 700; }
@media (max-width: 700px) {
  .ais-fields { flex-wrap: wrap; } .ais-fields .ais-input { flex-basis: 100%; }
  .ais-opts { flex-direction: column; align-items: stretch; } .ais-opts .ais-seg { width: 100%; } .ais-opts .ais-seg button { flex: 1; }
  .ais-pre.wide { padding: 14px; border-radius: 16px; }
  .ais-warn { flex-wrap: wrap; } .ais-warn .ais-btn.sm { width: 100%; }
}
@media (min-width: 760px) {
  .ai-stage.class:has(.ais-pre:not([hidden])) .ais-main { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; row-gap: 2px; align-items: center;
    width: 100%; max-width: 720px; margin: 0 auto; padding: 6px 0 4px; }
  .ai-stage.class:has(.ais-pre:not([hidden])) .ais-orb { width: 86px; grid-row: span 2; }
  .ai-stage.class:has(.ais-pre:not([hidden])) .ais-state { text-align: left; align-self: end; }
  .ai-stage.class:has(.ais-pre:not([hidden])) .ais-caption { text-align: left; align-self: start; max-width: none; margin: 0; }
}
@media (max-width: 700px) { .ais-fields .ais-seg { width: 100%; } .ais-fields .ais-seg button { flex: 1; } .ai-stage.class:has(.ais-pre:not([hidden])) .ais-orb { width: 96px; } }
.ais-area { height: auto; min-height: 110px; padding: 12px 14px; line-height: 1.5; resize: vertical; font: inherit; font-size: 14.5px; width: 100%; }
.ais-hint { color: rgba(244,242,255,.5); font-size: 12px; }
