/* Reunión Notes Taken — hoja de estilos única.
   Tema profesional sobrio. Vistas automáticas:
   - Teléfono: < 640px  (video arriba, transcripción abajo, controles fijos)
   - Tablet/iPad: 640–1099px (transcripción a la derecha desde 900px)
   - Escritorio: ≥ 1100px (video + columna de transcripción de 360px)
*/
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #F8F9FB;
  --ink: #14171F;
  --ink-2: #414856;
  --muted: #646C7B;
  --line: #E2E5EB;
  --line-strong: #7D8594;
  --accent: #1E4FD6;
  --accent-ink: #FFFFFF;
  --accent-soft: #EAF0FD;
  --danger: #B42318;
  --danger-soft: #FDECEA;
  --success: #067647;
  --warn: #8A5A00;
  --media: #0B0D12;
  --chip: rgba(11, 13, 18, .72);
  --chip-ink: #F4F6FA;
  --scrim: rgba(14, 17, 22, .6);
  --switch-on: #4A74E0;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(20, 23, 31, .06), 0 8px 24px rgba(20, 23, 31, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1116;
    --surface: #161A22;
    --surface-2: #1B2029;
    --ink: #EEF1F6;
    --ink-2: #C3CAD6;
    --muted: #9AA3B2;
    --line: #272E3A;
    --line-strong: #6F788A;
    --accent: #7DA2FF;
    --accent-ink: #0B1220;
    --accent-soft: #1A2440;
    --danger: #FF8A80;
    --danger-soft: #3A1F1F;
    --success: #6FD6A0;
    --warn: #F2C46D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  --bg: #0E1116;
  --surface: #161A22;
  --surface-2: #1B2029;
  --ink: #EEF1F6;
  --ink-2: #C3CAD6;
  --muted: #9AA3B2;
  --line: #272E3A;
  --line-strong: #6F788A;
  --accent: #7DA2FF;
  --accent-ink: #0B1220;
  --accent-soft: #1A2440;
  --danger: #FF8A80;
  --danger-soft: #3A1F1F;
  --success: #6FD6A0;
  --warn: #F2C46D;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 20px; }
h2 { font-size: 15px; }
h3 { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
button, input, select { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input::placeholder { color: var(--muted); opacity: 1; }

/* ---------- Acceso ---------- */
.screen { min-height: 100vh; min-height: 100dvh; }
#lobby { display: flex; justify-content: center; align-items: center; padding: 24px 16px; }
.panel {
  width: min(440px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 32px 28px;
}
.brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.mark { width: 36px; height: 36px; border-radius: 9px; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.mark svg { width: 18px; height: 18px; stroke: currentColor; }
.brand-name { font-size: 14px; font-weight: 600; }
.lead { color: var(--muted); margin: 0 0 22px; }
.invite { display: grid; gap: 2px; background: var(--accent-soft); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px; color: var(--ink-2); }
.invite strong { color: var(--ink); font-weight: 600; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field em { font-style: normal; color: var(--danger); }
input[type="text"], select {
  width: 100%; height: 44px; padding: 0 12px;
  border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 14px;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237D8594' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
input[type="text"]:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.btn {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 16px; border-radius: var(--radius);
  font-weight: 600; font-size: 14px; border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn.block { width: 100%; }
.btn .ico-sm { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.icon { width: 44px; height: 44px; padding: 0; }
.btn.icon svg { width: 18px; height: 18px; }
.notice { color: var(--danger); font-size: 14px; margin: 0; }
.notice:empty { display: none; }
.notice:not(:empty) { margin-top: 12px; }
.hint { color: var(--muted); font-size: 13px; margin: 18px 0 0; }

/* ---------- Sala ---------- */
#room { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; height: 100vh; height: 100dvh; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; min-width: 0;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.title .name { font-weight: 600; font-size: 15px; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex-shrink: 0; }
.dot.ok { background: var(--success); }
.dot.bad { background: var(--danger); }
.top-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.top-actions .btn { height: 36px; padding: 0 12px; font-size: 13px; }
.timer-lbl { font-size: 12px; color: var(--muted); margin-right: 6px; }
.timer { font-size: 14px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; min-width: 0; }
.stage { position: relative; min-width: 0; min-height: 0; padding: 16px; overflow: auto; display: flex; flex-direction: column; }
.grid {
  flex: 1; min-height: 0; display: grid; gap: 12px; align-content: center;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tile {
  position: relative; min-width: 0; min-height: 0; width: 100%;
  aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--media); border: 1px solid var(--line);
}
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.me video { transform: scaleX(-1); }
.tile.screen video { object-fit: contain; background: #000; }
.avatar {
  position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%;
  background: #1B2029; color: #C3CAD6; display: grid; place-items: center;
  font-size: 24px; font-weight: 600;
}
.tile .label {
  position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px);
  background: var(--chip); color: var(--chip-ink);
  padding: 3px 9px; border-radius: 6px; font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile.off video { display: none; }

/* Modo orador: el primero grande y los demás en tira inferior */
.grid.speaker { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; }
.grid.speaker .tile:first-child { grid-column: 1 / -1; aspect-ratio: auto; height: 100%; min-height: 0; }
.grid.speaker .tile:not(:first-child) { aspect-ratio: 16 / 10; }

/* Transcripción */
.dialog { border-left: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.dialog-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.switch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; color: var(--muted); cursor: pointer; }
.switch input {
  appearance: none; -webkit-appearance: none; width: 30px; height: 18px; margin: 0; border-radius: 999px;
  background: var(--line-strong); position: relative; cursor: pointer; transition: background .15s;
}
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--switch-on); }
.switch input:checked::after { transform: translateX(12px); }
.log { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 16px 16px; display: grid; align-content: start; }
.empty { color: var(--muted); font-size: 14px; margin: 12px 0; }
.line { position: relative; padding: 12px 40px 12px 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.line:last-child { border-bottom: 0; }
.line::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: transparent; }
.line.important::before { background: var(--accent); }
.line .who { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.line .who b { font-weight: 600; color: var(--ink); }
.line .time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.line .text { margin-top: 2px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.star {
  position: absolute; right: 4px; top: 8px; width: 36px; height: 36px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 8px; cursor: pointer; color: var(--muted);
}
.star:hover { background: var(--surface-2); color: var(--ink); }
.star svg { width: 16px; height: 16px; }
.star[aria-pressed="true"] { color: var(--accent); }
.star[aria-pressed="true"] svg { fill: currentColor; }
.interim { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* Barra de controles */
.toolbar {
  display: flex; justify-content: center; align-items: stretch; gap: 6px; flex-wrap: wrap;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--surface);
}
.tool {
  appearance: none; cursor: pointer; min-width: 84px; min-height: 56px; padding: 6px 10px;
  display: grid; justify-items: center; align-content: center; gap: 3px;
  background: transparent; color: var(--ink-2);
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 12px; font-weight: 500;
}
.tool:hover { background: var(--surface-2); }
.tool svg { width: 20px; height: 20px; }
.tool[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
#btnMic[aria-pressed="false"], #btnCam[aria-pressed="false"], #btnTx[aria-pressed="false"] { background: var(--danger-soft); color: var(--danger); }
.tool.end { background: var(--danger); color: #fff; }
.tool.end:hover { filter: brightness(1.08); background: var(--danger); }
.tool[hidden] { display: none !important; }

/* ---------- Material ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; }
.sheet-card {
  width: min(820px, 100%); max-height: calc(100dvh - 40px); overflow: auto; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px;
}
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.sheet-head h2 { font-size: 20px; }
.meta { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.mat-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 20px 0 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.mat-actions .notice { margin: 0; color: var(--success); }
.mat-body { display: grid; gap: 24px; margin-top: 20px; }
.mat-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mat-list li { position: relative; padding-left: 14px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.mat-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.mat-list li .time { color: var(--muted); font-size: 12px; }
.mat-list li.none { color: var(--muted); }
.mat-list li.none::before { display: none; }
.mat-list li b { color: var(--ink); font-weight: 600; }
.mat-full {
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-top: 10px;
}
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 30;
  background: var(--ink); color: var(--bg); padding: 9px 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow); max-width: calc(100vw - 32px);
}

/* ---------- Tablet / iPad: 640–1099px ---------- */
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (min-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr) 360px; }
  .toolbar { padding-right: 360px; }
}

/* ---------- Teléfono: < 640px ---------- */
@media (max-width: 639px) {
  #room { height: auto; min-height: 100dvh; grid-template-rows: auto auto auto; }
  .topbar { flex-wrap: wrap; padding: 10px 12px; row-gap: 8px; }
  .title .name { font-size: 14px; }
  .top-actions { width: 100%; justify-content: space-between; }
  .timer-lbl { display: none; }
  .stage { padding: 10px; overflow: visible; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
  .tile { aspect-ratio: 4 / 3; border-radius: var(--radius); }
  .tile .label { font-size: 12px; left: 8px; bottom: 8px; }
  .avatar { width: 52px; height: 52px; font-size: 18px; }
  .dialog { border-left: 0; border-top: 1px solid var(--line); min-height: 240px; max-height: 46dvh; }
  .toolbar { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .tool { min-width: 0; width: 100%; min-height: 56px; padding: 6px 2px; font-size: 11px; }
  .top-actions .btn { padding: 0 10px; }
  .sheet { padding: 0; place-items: end center; }
  .sheet-card { width: 100%; max-width: 100%; max-height: 92dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 20px 16px; }
  .mat-actions { flex-direction: column; align-items: stretch; }
  .mat-actions .btn { width: 100%; }
}

/* ---- Ronda final: escritorio primero, teléfono secundario ---- */
.mark { margin-bottom: 14px; }
.sheet-head .btn.icon { border-color: transparent; }
.dialog { position: relative; }
.share-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent-soft); color: var(--ink); border-radius: var(--radius);
  padding: 8px 12px; margin-bottom: 12px; font-size: 13px;
}
.share-banner .btn { height: 36px; font-size: 13px; }
@media (min-width: 640px) and (max-width: 899px) {
  .dialog { border-left: 0; border-top: 1px solid var(--line); }
  .layout { grid-template-rows: minmax(0, 1fr) minmax(220px, 40%); }
  .stage { padding: 12px; }
}
@media (max-width: 639px) {
  .top-actions .btn { height: 44px; }
  .star { width: 44px; height: 44px; }
  .timer-lbl { display: inline; }
  .tool { font-size: 12px; }
  .dialog::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 24px;
    background: linear-gradient(transparent, var(--surface)); pointer-events: none;
  }
}

/* ---- Accesibilidad final ---- */
.tool.end { background: var(--danger); color: #FFFFFF; }
:root[data-theme="dark"] .tool.end { color: #0B1220; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tool.end { color: #0B1220; } }
@media (max-width: 639px) { .tool { font-size: 12px; } }

/* ---- Medidor de micrófono, portada y cuadrícula (ronda de audio y visual) ---- */
.meter { position: absolute; left: 10px; right: 10px; top: 10px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--success); transition: width .1s linear; }
.lobby-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--muted); }
.lobby-foot a { color: var(--muted); }
.grid { grid-auto-rows: minmax(0, 1fr); }
.grid .tile { height: 100%; aspect-ratio: auto; }
.grid[data-count="1"] .tile { aspect-ratio: 16 / 9; height: auto; max-height: 100%; }
.grid[data-count="2"] .tile { aspect-ratio: 4 / 3; height: auto; }

/* ---- Ronda visual 90%: escritorio primero, ajustes de teléfono ---- */
.tile { background: #1B2029; }
.avatar { background: #2A3140; }
.mat-full { font-variant-numeric: tabular-nums; }
@media (max-width: 639px) {
  .grid { grid-auto-rows: auto; }
  .grid .tile { height: auto; aspect-ratio: 4 / 3; }
  .topbar { flex-wrap: nowrap; }
  .top-actions { width: auto; gap: 8px; }
  .title .status { display: none; }
  .toolbar { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tool { min-height: 48px; font-size: 11px; }
}

/* ---- Última ronda: estado apagado sin depender del color; botones táctiles ---- */
#btnMic[aria-pressed="false"], #btnCam[aria-pressed="false"], #btnTx[aria-pressed="false"] { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); }
.tool.end { background: var(--danger); }
.top-actions .btn { height: 44px; }
.star { width: 44px; height: 44px; }
.line { padding-right: 48px; }

/* =========================================================
   TEMA VISUAL "PRESENCIA": color con carácter, profesional.
   Índigo + turquesa como marca; modo oscuro con brillo sutil.
   ========================================================= */
:root {
  --bg: #F3F4FB;
  --surface: #FFFFFF;
  --surface-2: #F6F7FD;
  --ink: #171A33;
  --ink-2: #3E4366;
  --muted: #62688A;
  --line: #E4E6F2;
  --line-strong: #7C82A6;
  --accent: #5B4BDB;
  --accent-ink: #FFFFFF;
  --accent-soft: #ECEAFF;
  --accent-2: #14A7AB;
  --grad: linear-gradient(135deg, #6D5CFF 0%, #3BB8C4 100%);
  --danger: #C2332B;
  --danger-soft: #FFE9E7;
  --success: #0E8A5F;
  --media: #161A33;
  --shadow: 0 1px 2px rgba(23, 26, 51, .06), 0 14px 36px rgba(60, 60, 140, .10);
  --scrim: rgba(23, 26, 51, .45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0C1C;
    --surface: #141731;
    --surface-2: #1B1F40;
    --ink: #F1F2FF;
    --ink-2: #C7CBEA;
    --muted: #9EA5CF;
    --line: #262B52;
    --line-strong: #5A6192;
    --accent: #9B8CFF;
    --accent-ink: #0A0C1C;
    --accent-soft: #262057;
    --accent-2: #4FD8DC;
    --danger: #FF7B72;
    --danger-soft: #3B1E30;
    --success: #5FE3B0;
    --media: #0F1229;
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 18px 48px rgba(0,0,0,.45);
    --scrim: rgba(4, 5, 14, .66);
    --switch-on: #7B6CF0;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0C1C; --surface: #141731; --surface-2: #1B1F40; --ink: #F1F2FF; --ink-2: #C7CBEA;
  --muted: #9EA5CF; --line: #262B52; --line-strong: #5A6192; --accent: #9B8CFF; --accent-ink: #0A0C1C;
  --accent-soft: #262057; --accent-2: #4FD8DC; --danger: #FF7B72; --danger-soft: #3B1E30; --success: #5FE3B0;
  --media: #0F1229; --shadow: 0 1px 2px rgba(0,0,0,.5), 0 18px 48px rgba(0,0,0,.45); --scrim: rgba(4,5,14,.66); --switch-on: #7B6CF0;
}

/* Fondo con luz suave (claro y oscuro) */
body {
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(109,92,255,.14), transparent 60%),
    radial-gradient(900px 560px at 110% 110%, rgba(59,184,196,.13), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body {
  background:
    radial-gradient(1000px 620px at 10% -12%, rgba(124,108,255,.22), transparent 62%),
    radial-gradient(900px 600px at 112% 112%, rgba(43,190,200,.16), transparent 62%),
    var(--bg); } }
:root[data-theme="dark"] body {
  background:
    radial-gradient(1000px 620px at 10% -12%, rgba(124,108,255,.22), transparent 62%),
    radial-gradient(900px 600px at 112% 112%, rgba(43,190,200,.16), transparent 62%),
    var(--bg);
}

/* Marca */
.mark { width: 44px; height: 44px; background: none; padding: 0; border-radius: 14px; box-shadow: 0 8px 22px rgba(91,75,219,.35); }
.mark svg { width: 44px; height: 44px; stroke: none; }
.brand-name { font-size: 15px; letter-spacing: -.01em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.app-logo { width: 28px; height: 28px; display: inline-grid; flex-shrink: 0; }
.app-logo svg { width: 28px; height: 28px; }

/* Portada */
.panel { border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(8px); }
#lobby .panel { background: color-mix(in srgb, var(--surface) 92%, transparent); }
h1 { font-size: 22px; }

/* Botones */
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(91,75,219,.28); border: 0; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06) saturate(1.05); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0A0C1C; } }
:root[data-theme="dark"] .btn.primary { color: #0A0C1C; box-shadow: 0 8px 22px rgba(124,108,255,.38); }
.btn.ghost, .btn.secondary { border-color: var(--line-strong); }

/* Barra de controles: pastillas con acento */
.toolbar { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); }
.tool { border-radius: 14px; }
.tool[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.tool.end { background: var(--danger); color: #fff; box-shadow: 0 8px 20px rgba(194,51,43,.28); }
:root[data-theme="dark"] .tool.end { color: #0A0C1C; background: var(--danger); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tool.end { color: #0A0C1C; } }

/* Videos: fondo con gradiente de marca y avatar con color por persona */
.tile { background: linear-gradient(160deg, var(--media), #0C0F24); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(10,12,28,.25); }
.avatar { background: var(--grad); color: #fff; box-shadow: 0 10px 28px rgba(91,75,219,.35); }
.tile .label { background: rgba(10,12,28,.62); backdrop-filter: blur(6px); }
.tile.screen { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Transcripción */
.line.important::before { background: var(--grad); }
.line .who b { color: var(--ink); }
.star[aria-pressed="true"] { color: var(--accent); }
.dialog { background: color-mix(in srgb, var(--surface) 94%, transparent); }
.topbar { background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); }
.status .dot.ok { box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent); }

/* Material */
.sheet-card { background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.mat-body h3 { color: var(--accent); }
.mat-full { background: var(--surface-2); }

/* ---- Funciones nuevas: búsqueda, aviso, etiquetas, edición ---- */
.dialog-head { flex-wrap: wrap; }
.search { flex: 1 1 100%; height: 36px; font-size: 13px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); }
.consent { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius); background: var(--accent-soft); color: var(--ink); font-size: 13px; }
.consent .btn { height: 34px; font-size: 13px; padding: 0 12px; }
.consent[hidden] { display: none; }
.tag { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.rename { cursor: pointer; border-bottom: 1px dotted var(--line-strong); }
.mat-edit { width: 100%; min-height: 220px; resize: vertical; margin-top: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
