/* =============================================================== Auris — tema
   Marca: coral #FF6656 (oreja) y azul marino #202C35 (logotipo). */
:root {
  --brand: #FF6656;
  --brand-600: #F04E3E;
  --brand-50: #FFF1EF;
  --brand-100: #FFE0DC;
  --ink: #202C35;
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --text: #202C35;
  --muted: #6B7785;
  --border: #DCE1E8;
  --border-strong: #C5CCD6;
  --ok: #16A34A;
  --danger: #DC2626;
  --info-bg: #EFF6FF;
  --info-border: #BFDBFE;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .18);
  --radius: 14px;
  --radius-sm: 10px;
  --omni-navy: #15304f; --omni-teal: #348a8a;
  --s0: #FF6656; --s1: #3B82F6; --s2: #10B981; --s3: #A855F7; --s4: #F59E0B; --s5: #0EA5E9;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1419; --surface: #161D24; --surface-2: #1B242C; --text: #E8ECF0; --muted: #93A0AD;
    --border: #323F4B; --border-strong: #465563; --brand-50: #2A1A1A; --brand-100: #3A2220; --info-bg: #13233A; --info-border: #24456E;
    --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25); --shadow-lg: 0 20px 50px rgba(0,0,0,.5);
    --omni-navy: #DCE6F0; --omni-teal: #4FB3B3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1419; --surface: #161D24; --surface-2: #1B242C; --text: #E8ECF0; --muted: #93A0AD;
  --border: #323F4B; --border-strong: #465563; --brand-50: #2A1A1A; --brand-100: #3A2220; --info-bg: #13233A; --info-border: #24456E;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25); --shadow-lg: 0 20px 50px rgba(0,0,0,.5);
  --omni-navy: #DCE6F0; --omni-teal: #4FB3B3;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.error { color: var(--danger); min-height: 1.2em; font-size: 13px; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
input, textarea, select, button { font: inherit; color: inherit; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------- Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
:root[data-theme="dark"] .logo { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo { color: #fff; } }
.logo img { display: block; }
.logo-sm img { width: 26px; height: 26px; } .logo-sm span { font-size: 22px; }
.logo-md img { width: 40px; height: 40px; } .logo-md span { font-size: 31px; }
.logo-lg img { width: 52px; height: 52px; } .logo-lg span { font-size: 44px; }

/* --------------------------------------------------------------- Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 10px; border: 1px solid transparent; background: var(--surface); cursor: pointer; font-weight: 600;
  white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(240, 78, 62, .35); }
.btn-primary:hover:not(:disabled) { background: var(--brand-600); text-decoration: none; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { filter: brightness(1.15); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 1px 2px rgba(220, 38, 38, .35); }
.btn-danger:hover:not(:disabled) { background: #B91C1C; text-decoration: none; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-soft { background: var(--brand-50); color: var(--brand-600); }
.btn-soft:hover:not(:disabled) { background: var(--brand-100); }
.btn-icon { width: 36px; padding: 0; background: transparent; border-color: var(--border); }
.btn-icon:hover { background: var(--surface-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }

/* --------------------------------------------------------------- Campos */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .select, .search input {
  height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-weight: 500; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .select:focus, .search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent), 0 0 10px color-mix(in srgb, var(--brand) 18%, transparent); }
.field input:disabled { background: var(--surface-2); color: var(--muted); }
.select { height: 34px; max-width: 360px; cursor: pointer; }

/* --------------------------------------------------------------- Acceso */
.auth { min-height: 100%; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand {
  background: radial-gradient(120% 90% at 0% 0%, #2B3A46 0%, var(--ink) 55%, #141C22 100%); color: #fff;
  display: flex; align-items: center; padding: 56px;
}
.auth-brand .logo { color: #fff; }
.auth-brand-inner { max-width: 460px; }
.auth-brand h2 { font-size: 30px; line-height: 1.2; letter-spacing: -.02em; margin: 34px 0 22px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; color: #C9D2DA; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; }
.auth-points .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 7px; flex: none; }
.auth-form-wrap { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.auth-card .fields { display: grid; gap: 12px; }
.mobile-only { display: none; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-brand { display: none; } .mobile-only { display: inline-flex; } }

/* --------------------------------------------------------------- Layout app */
.app { display: grid; grid-template-columns: var(--sidebar-w, 290px) 1fr; height: 100vh; }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column;
  padding: 16px 14px; gap: 12px; min-height: 0;
}
.sidebar-top { padding: 2px 4px 6px; }

/* Llamada detectada */
.call-card {
  border-radius: var(--radius); padding: 12px; background: linear-gradient(180deg, var(--brand-50), var(--surface));
  border: 1px solid var(--brand-100); display: grid; gap: 6px; box-shadow: var(--shadow-sm);
}
.call-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.call-label { font-size: 12px; color: var(--muted); }
.call-question { font-size: 13px; font-weight: 600; }
.call-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); position: relative; flex: none; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--brand); opacity: .6; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }

/* Búsqueda y lista */
.search { position: relative; }
.search .ic { position: absolute; left: 11px; top: 12px; color: var(--muted); }
.search input { width: 100%; padding-left: 34px; height: 38px; background: var(--surface-2); }
.meeting-list { list-style: none; margin: 0; padding: 0 2px; overflow-y: auto; flex: 1; min-height: 0; }
.meeting-list .group { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 12px 10px 6px; cursor: default; }
.meeting-list li.item { padding: 9px 10px; border-radius: 10px; cursor: pointer; display: grid; gap: 2px; border: 1px solid transparent; }
.meeting-list li.item:hover { background: var(--surface-2); }
.meeting-list li.item.active { background: var(--brand-50); border-color: var(--brand-100); }
.meeting-list .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.meeting-list .t span:last-child { overflow: hidden; text-overflow: ellipsis; }
.meeting-list .d { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.meeting-list .d .dur::before { content: "·"; margin-right: 6px; }
.meeting-list .rec { color: var(--brand); font-size: 10px; flex: none; }
.badge { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.badge-brand { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-600); }
.list-empty { padding: 20px 10px; color: var(--muted); font-size: 13px; text-align: center; }

/* Usuario */
.user-area { position: relative; border-top: 1px solid var(--border); padding-top: 10px; }
.user-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.user-btn:hover { background: var(--surface-2); }
/* Avatar del usuario: borde e iniciales en coral; con foto, la imagen recortada en círculo y centrada. */
.avatar { width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 85%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 14%, transparent), 0 0 10px color-mix(in srgb, var(--brand) 22%, transparent); overflow: hidden; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.avatar.has-photo { background: var(--surface-2); }
.avatar-lg { width: 84px; height: 84px; font-size: 28px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent), 0 0 16px color-mix(in srgb, var(--brand) 25%, transparent); }
.photo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.photo-acts { display: grid; gap: 6px; justify-items: start; }
.user-text { display: grid; min-width: 0; flex: 0 1 auto; }
.user-btn .chev { flex: none; margin-left: auto; }
.user-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--muted); }

/* Menús */
.menu { position: absolute; z-index: 30; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: grid; }
.menu-up { bottom: calc(100% + 6px); left: 0; right: 0; }
.menu-down { top: calc(100% + 6px); right: 0; }
.menu-float { position: fixed; left: auto; bottom: auto; z-index: 60; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; text-align: left; font-weight: 500; color: var(--text); }
.menu-item:hover { background: var(--surface-2); text-decoration: none; }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--border); margin: 4px 2px; }

/* --------------------------------------------------------------- Reunión */
.meeting { display: flex; flex-direction: column; height: 100vh; overflow: hidden; padding: 18px 22px 16px; gap: 12px; }
.topbar { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.topbar-main { flex: 1 1 320px; min-width: 0; }
.title-input { width: 100%; font-size: 24px; font-weight: 800; letter-spacing: -.02em; border: 0; background: transparent; padding: 2px 0; outline: none; color: var(--text); }
.title-input:focus { box-shadow: 0 2px 0 var(--brand-100); }
.meta { display: flex; align-items: center; gap: 10px; min-height: 22px; font-size: 13px; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.more { position: relative; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.chip-rec { background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-100); font-variant-numeric: tabular-nums; }

/* Barra de audio */
.audiobar {
  display: grid; grid-template-columns: minmax(200px, 1.4fr) minmax(200px, 1.4fr) minmax(180px, 1fr); gap: 18px; align-items: end;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow-sm);
}
.meter-block { display: grid; gap: 7px; min-width: 0; }
.meter-label { display: flex; align-items: center; flex-wrap: wrap; column-gap: 7px; row-gap: 2px; font-size: 12px; font-weight: 700; min-width: 0; }
.meter-label .ic { color: var(--muted); }
.meter-dev { flex-basis: 100%; font-weight: 500; color: var(--muted); white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.meter-dev:empty { display: none; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.meter-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #4ADE80, #22C55E 60%, #F59E0B 85%, var(--brand)); background-size: 100% 100%; transition: width .05s linear; }
.agent { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 12px; }
.agent-state { color: var(--muted); display: flex; align-items: center; gap: 8px; min-width: 0; line-height: 1.35; }
.agent-state > span:last-child { min-width: 0; }
.agent-state code { font-size: 11px; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }
.dot-ok, .dot-off { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; vertical-align: middle; margin-right: 6px; }
.agent-state .dot-ok, .agent-state .dot-off { margin-right: 0; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.dot-off { background: var(--muted); }
@media (max-width: 1100px) { .audiobar { grid-template-columns: 1fr 1fr; } .agent { grid-column: 1 / -1; } }

.status { font-size: 13px; color: var(--muted); min-height: 18px; }
.status.error { color: var(--danger); }
.banner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; }
.banner-info { background: var(--info-bg); border: 1px solid var(--info-border); }
.continues { font-size: 12px; color: var(--muted); }

/* Columnas */
/* Apuntes/Resumen y Transcripción: el ancho del panel de apuntes es --notes-w (tirador .panel-resizer, se guarda
   por estilo); sin valor, cada estilo usa su reparto por defecto. */
.columns { display: grid; grid-template-columns: var(--notes-w, 1fr) minmax(0, 1fr); gap: 14px; flex: 1; min-height: 0; }
.panel-resizer { position: absolute; top: 0; bottom: 0; right: -12px; width: 10px; cursor: col-resize; z-index: 5; }  /* Clásico: apuntes a la izquierda → tirador en su borde derecho */
.panel-resizer::after { content: ""; position: absolute; top: 12px; bottom: 12px; left: 4px; width: 2px; border-radius: 2px; background: transparent; transition: background .15s; }
.panel-resizer:hover::after, .resizing-notes .panel-resizer::after { background: var(--brand); }
.resizing-notes, .resizing-notes * { cursor: col-resize !important; user-select: none; }
@media (max-width: 1000px) { .panel-resizer { display: none; } }
@media (max-width: 1000px) { .app { grid-template-columns: 1fr; } .sidebar { display: none; } .columns { grid-template-columns: 1fr; } }
/* Celular: sin reunión abierta se ve la lista (barra lateral a pantalla completa); con reunión, botón «‹ Reuniones». */
.mobile-back { display: none; }
@media (max-width: 1000px) {
  /* Alto de la ventana: la lista hace scroll por dentro y el menú de usuario y la firma quedan fijos abajo. */
  body[data-view="emptyView"] .sidebar { display: flex; width: 100%; height: 100vh; height: 100dvh; }
  body[data-view="emptyView"] #emptyView { display: none; }
  .mobile-back { display: inline-flex; align-self: flex-start; margin-bottom: 4px; }
  /* La página entera hace scroll (en vez de paneles de alto fijo que se aplastan y se montan). */
  .app { height: auto; min-height: 100vh; }
  .meeting { height: auto; min-height: 100vh; overflow: visible; padding: 14px 16px; }
  .columns { flex: none; }
  .columns .panel { min-height: 60vh; }
}
@media (max-width: 700px) { .audiobar { display: none; } }  /* el capturador corre en el PC, no en el teléfono */
.panel { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; min-height: 0; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.panel h2 { margin: 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; align-self: flex-start; }
.tab { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 13px; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-body { flex: 1; min-height: 0; overflow-y: auto; }
.notes-area { border: 0; resize: none; outline: none; line-height: 1.6; padding: 4px 2px; background: transparent; font-size: 14px; }
.markdown { line-height: 1.65; padding: 2px; }
.markdown h1, .markdown h2, .markdown h3 { margin: 16px 0 6px; font-size: 15px; letter-spacing: -.01em; }
.markdown h1:first-child, .markdown h2:first-child { margin-top: 0; }
.markdown ul { padding-left: 20px; margin: 4px 0 10px; }
.markdown li { margin: 3px 0; }

/* Transcripción */
.transcript { flex: 1; overflow-y: auto; min-height: 0; padding-right: 4px; }
.turn { margin: 0 0 14px; }
.turn .who { font-weight: 700; font-size: 13px; cursor: pointer; }
.turn .who:hover { text-decoration: underline; }
.turn .time { color: var(--muted); font-size: 11px; margin-left: 8px; font-variant-numeric: tabular-nums; }
.turn p { margin: 3px 0 0; line-height: 1.55; }
.turn .pending { color: var(--text); opacity: .6; }
.interim { color: var(--muted); font-style: italic; min-height: 1.4em; margin-top: 6px; font-size: 13px; }
.speakers { display: flex; flex-wrap: wrap; gap: 6px; }
.speakers .chip { height: 24px; padding: 0 10px; color: #fff; cursor: pointer; font-size: 12px; font-weight: 600; border-radius: 999px; display: inline-flex; align-items: center; }
.part-divider { margin: 14px 0 10px; padding-top: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 1px dashed var(--border); }
.prev-part .turn { opacity: .7; }

/* Vacío */
.empty { display: grid; place-items: center; padding: 24px; }
.empty-inner { text-align: center; max-width: 440px; display: grid; gap: 10px; justify-items: center; }
.empty-icon { width: 64px; height: 64px; opacity: .95; }
.empty h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.02em; }

/* --------------------------------------------------------------- Modal de configuración */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(15, 20, 25, .45); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(2px); }
.modal-card { width: min(980px, 100%); max-height: min(760px, 94vh); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--border-strong) 55%, transparent); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border-strong); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { display: grid; grid-template-columns: 180px 1fr; min-height: 0; flex: 1; }
/* Configuración: navegación con icono y, en la activa, el mismo motivo que el avatar (borde fino coral,
   relleno tenue y halo); títulos de sección con una marca coral; campos con halo coral al enfocar. */
.settings-nav { border-right: 1px solid var(--border); padding: 14px 12px; display: grid; align-content: start; gap: 4px; background: var(--surface-2); }
.snav { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid transparent; background: transparent; padding: 9px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--muted); transition: background .15s, color .15s, border-color .15s, box-shadow .15s; }
.snav .ic { width: 17px; height: 17px; opacity: .8; }
.snav:hover { color: var(--text); background: color-mix(in srgb, var(--brand) 7%, transparent); }
.snav.active { color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 85%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 12%, transparent), 0 0 10px color-mix(in srgb, var(--brand) 20%, transparent); }
.snav.active .ic { opacity: 1; }
.settings-panes { padding: 20px 24px 24px; overflow-y: auto; }
.pane { display: grid; gap: 12px; align-content: start; }
.pane h3 { margin: 14px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.pane h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 14%, var(--surface)); border: 1px solid var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 12%, transparent), 0 0 8px color-mix(in srgb, var(--brand) 25%, transparent); flex: none; }
.pane h3::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pane h3:first-child { margin-top: 0; }
.pane h4 { margin: 0 0 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pane .btn { justify-self: start; }
@media (max-width: 700px) { .modal-body { grid-template-columns: 1fr; } .settings-nav { grid-auto-flow: column; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); } }

/* Interruptores */
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.toggle input { display: none; }
.toggle span { width: 38px; height: 22px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; flex: none; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.toggle input:checked + span { background: var(--brand); }
.toggle input:checked + span::after { transform: translateX(16px); }

/* Control segmentado */
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; justify-self: start; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* Dispositivos (configuración → audio) */
.devices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .devices { grid-template-columns: 1fr; } }
.dev { display: grid; grid-template-columns: 1fr 96px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.dev .info { min-width: 0; display: grid; gap: 3px; }
.dev .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dev .tags:empty { display: none; }
.dev .tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.dev .tag.used { background: #DCFCE7; color: #166534; border-color: #BBF7D0; }
.dev .tag.err { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }
.dev .bar { height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.dev .bar > i { display: block; height: 100%; width: 0; background: var(--border); transition: width .15s; }
.dev .bar.active > i { background: linear-gradient(90deg, #4ADE80, #22C55E 60%, #F59E0B 85%, var(--brand)); }

/* Barras de desplazamiento discretas */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--muted); }

/* ---- ajustes de la interfaz dinámica */
.meeting-list .empty-list { padding: 18px 10px; font-size: 13px; color: var(--muted); cursor: default; text-align: center; }
.badge-rec { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-600); }
.badge-rec .pulse { width: 6px; height: 6px; }
.badge-rec .pulse::after { inset: -3px; border-width: 1.5px; }
.meter.active { border-color: color-mix(in srgb, #22C55E 35%, var(--border)); }
.meter-fill.hot { box-shadow: 0 0 8px color-mix(in srgb, var(--brand) 60%, transparent); }
.user-btn.open { background: var(--surface-2); }
.user-btn.open .chev { transform: rotate(180deg); }
.chev { transition: transform .15s ease; }
.btn-icon.open { background: var(--surface-2); }
.small.error { color: var(--danger, #DC2626); }

/* ---- Auris de escritorio: ventana sin barra de título */
.titlebar, .win-grip { display: none; }
/* Franja superior invisible (como una barra de título): arrastra la ventana y lleva los botones.
   Es transparente: el fondo de la barra lateral y del contenido continúa por debajo. */
.desktop .titlebar { display: flex; position: fixed; top: 0; left: 0; right: 0; height: 34px; z-index: 100; }
.tb-drag { flex: 1; }
.win-controls { display: flex; }
.win-controls button { width: 46px; height: 34px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.win-controls button:hover { background: var(--surface-2); color: var(--text); }
.win-controls button.close:hover { background: #E81123; color: #fff; }
.win-controls .ic { width: 15px; height: 15px; }
.desktop .sidebar { padding-top: 10px; }
.desktop .meeting { padding-top: 38px; }
.desktop .empty { padding-top: 58px; }
.desktop .auth-form-wrap { padding-top: 34px; }
.desktop .win-grip { display: block; position: fixed; right: 0; bottom: 0; width: 16px; height: 16px; z-index: 100; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, var(--border) 50%, var(--border) 58%, transparent 58%, transparent 70%, var(--border) 70%, var(--border) 78%, transparent 78%); }
.desktop.maximized .win-grip { display: none; }
/* Borde de la ventana sin marco: un filo naranja tenue para distinguirla del escritorio (no al maximizar). */
.desktop body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 300;
  border: 1px solid rgba(255, 102, 86, .45); box-shadow: inset 0 0 0 1px rgba(255, 102, 86, .12); }
.desktop.maximized body::after { display: none; }
.sidebar-top { padding: 4px 4px 10px; }

/* ---- Panel izquierdo redimensionable */
.sidebar { position: relative; }
.sidebar-resizer { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 20; }
.sidebar-resizer::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .15s; }
.sidebar-resizer:hover::after, .resizing-sidebar .sidebar-resizer::after { background: var(--brand); }
.resizing-sidebar, .resizing-sidebar * { cursor: col-resize !important; user-select: none !important; }

/* ---- Audio: selector de voz (estilo Discord) */
.voice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .voice-grid { grid-template-columns: 1fr; } }
.voice-col { display: grid; gap: 8px; min-width: 0; }
.voice-label { font-size: 13px; font-weight: 700; }
.dsel { position: relative; display: flex; align-items: center; }
.dsel select { width: 100%; height: 42px; appearance: none; -webkit-appearance: none; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; padding: 0 38px 0 40px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsel select:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.dsel select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.dsel select:disabled { opacity: .6; cursor: default; }
.dsel select option { background: var(--surface); color: var(--text); }
.dsel .ic { position: absolute; left: 13px; color: var(--muted); pointer-events: none; width: 17px; height: 17px; }
.dsel .ic.chev { left: auto; right: 13px; }
.meter-lg { height: 10px; }

/* ---- Audio: lista de dispositivos */
.dev-list { display: grid; gap: 8px; }
.dev2 { border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; display: grid; gap: 7px; background: var(--surface); }
.dev2.used { border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.dev2-head { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.dev2-state { margin-top: 1px; }
.dev2-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.dev2-state { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--muted); }
.dev2-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .5; }
.dev2-state.on { color: var(--ok); } .dev2-state.on::before { background: var(--ok); opacity: 1; }
.dev2-state.err { color: var(--danger); } .dev2-state.err::before { background: var(--danger); opacity: 1; }
.dev2-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dev2-tags .tag { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.dev2-tags .tag.used { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-100); }
.dev2 .meter { height: 6px; }
.dev2.off .meter { opacity: .45; }

/* ---- Pestaña «Resumen Reunión» */
.tab:disabled { opacity: .45; cursor: not-allowed; }
.tab-summary.ready { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand-600); }
.tab-summary.ready:hover { background: color-mix(in srgb, var(--brand) 24%, transparent); }
.tab-summary.ready.active { background: color-mix(in srgb, var(--brand) 26%, var(--surface)); color: var(--brand-600); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent); }
:root[data-theme="dark"] .tab-summary.ready, :root[data-theme="dark"] .tab-summary.ready.active { color: #FF8A7E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tab-summary.ready, :root:not([data-theme="light"]) .tab-summary.ready.active { color: #FF8A7E; } }
.tab-summary.flash { animation: summaryFlash 1.2s ease-out 2; }
@keyframes summaryFlash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }

/* =============================================================== Calendario */
.side-nav { display: grid; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent;
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.side-link:hover { background: var(--surface-2); }
.side-link.active { background: var(--brand-50); color: var(--brand-600); }
.side-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--brand); color: #fff; flex: none;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 35%, transparent); }
.side-ic .ic { width: 16px; height: 16px; }
.side-badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--brand); color: #fff; }

.vbadge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-600); white-space: nowrap; }
.vbadge::before { content: ""; width: 12px; height: 12px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zM16 10l5-3v10l-5-3z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zM16 10l5-3v10l-5-3z'/%3E%3C/svg%3E") center/contain no-repeat; }
.vbadge-off { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--border); }
.vbadge-off::before { display: none; }
:root[data-theme="dark"] .vbadge:not(.vbadge-off) { color: #FF8A7E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vbadge:not(.vbadge-off) { color: #FF8A7E; } }

.next-card { border-radius: var(--radius); padding: 12px; border: 1px solid var(--border); background: var(--surface-2); display: grid; gap: 5px; }
.next-card.soon { border-color: var(--brand-100); background: linear-gradient(180deg, var(--brand-50), var(--surface)); }
.next-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.next-when { font-size: 12px; font-weight: 700; color: var(--brand-600); }
.next-title { font-weight: 700; line-height: 1.3; }
.call-event { font-size: 12px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; }

.calendar { display: flex; flex-direction: column; height: 100vh; overflow: hidden; padding: 18px 22px 16px; gap: 14px; }
.desktop .calendar { padding-top: 38px; }
.cal-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cal-h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.seg-sm button { padding: 6px 12px; }
.cal-body { display: grid; grid-template-columns: 240px 1fr; gap: 16px; min-height: 0; flex: 1; }
.cal-side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.cal-side h4 { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cal-sources { display: grid; gap: 6px; }
.cal-src { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 8px; border-radius: 10px; border: 1px solid var(--border); }
.cal-src .dot { width: 10px; height: 10px; border-radius: 3px; }
.cal-src .nm { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.cal-src .sub { font-size: 11px; color: var(--muted); display: block; font-weight: 500; }
.cal-src .sub.err { color: var(--danger); }
.cal-src.off { opacity: .5; }
.cal-src .src-actions { display: flex; gap: 2px; }
.cal-src .src-actions button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.cal-src .src-actions button:hover { background: var(--surface-2); color: var(--text); }
.cal-legend { margin-top: auto; display: grid; gap: 6px; font-size: 12px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--border); }
.cal-agenda { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 18px; padding-right: 4px; }
.cal-day h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.cal-day.today h3 { color: var(--brand-600); }
.cal-day h3 .n { font-size: 11px; font-weight: 600; }
.cal-empty-day { font-size: 13px; color: var(--muted); padding: 8px 2px; }
.ev { display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--evc, var(--brand)); box-shadow: var(--shadow-sm); }
.ev.past { opacity: .62; }
.ev.now { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 45%, transparent); }
.ev-time { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.ev-time span { display: block; color: var(--muted); font-weight: 500; }
.ev-main { min-width: 0; display: grid; gap: 5px; }
.ev-title { font-weight: 700; overflow-wrap: anywhere; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.ev-people { display: inline-flex; align-items: center; }
.ev-people .av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff;
  margin-left: -5px; border: 2px solid var(--surface); }
.ev-people .av:first-child { margin-left: 0; }
.ev-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cal-welcome { margin: auto; text-align: center; max-width: 460px; display: grid; gap: 10px; justify-items: center; padding: 30px 10px; }
.cal-welcome .side-ic { width: 56px; height: 56px; border-radius: 16px; }
.cal-welcome .side-ic .ic { width: 28px; height: 28px; }
@media (max-width: 900px) { .cal-body { grid-template-columns: 1fr; } .cal-side { max-height: 220px; } .ev { grid-template-columns: 60px 1fr; } .ev-actions { grid-column: 1 / -1; justify-content: flex-start; } }

.event-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--brand-100); background: var(--brand-50); color: var(--brand-600);
  border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; max-width: 420px; }
.event-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Modales simples */
.modal-md { width: min(620px, 100%); }
#mailPreviewModal, #botTestModal { z-index: 60; }  /* se abren sobre otro modal (correo, Configuración) */
.mail-preview { width: min(780px, 100%); height: min(860px, 94vh); max-height: 94vh; }
.mail-preview .modal-head p { margin: 2px 0 0; }
.mail-preview iframe { flex: 1; width: 100%; border: 0; background: #F6F7F9; }
.mail-preview .modal-pad { padding: 12px 20px; border-top: 1px solid var(--border); }
.modal-pad { padding: 18px 20px 20px; overflow-y: auto; display: grid; gap: 12px; }
.providers { display: grid; gap: 8px; }
.provider { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.provider > span:last-child { display: grid; gap: 2px; }
.provider:hover, .provider.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.pv-logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; flex: none; }
.pv-google { background: conic-gradient(#EA4335 0 25%, #FBBC05 0 50%, #34A853 0 75%, #4285F4 0); }
.pv-ms { background: #0078D4; }
.pv-ics { background: var(--brand); }
.pv-ics .ic { width: 20px; height: 20px; }
.ics-form { display: grid; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.ics-help { font-size: 13px; line-height: 1.5; }
.ics-help ol { margin: 6px 0 0; padding-left: 20px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.field textarea { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: inherit; font-weight: 400; color: var(--text); background: var(--surface); resize: vertical; }
.field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent), 0 0 10px color-mix(in srgb, var(--brand) 18%, transparent); }
.mail-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.people-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.people-pick button { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.people-pick button.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); }
.event-pick { display: grid; gap: 8px; }
.event-pick .ev { grid-template-columns: 64px 1fr auto; cursor: default; }

/* =============================================================== Acciones del resumen */
.notes-panel { position: relative; }
.summary-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; margin-top: 10px; border-top: 1px solid var(--border); }
.act { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.act:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.act .ic { width: 15px; height: 15px; }
.act-brand { background: color-mix(in srgb, var(--brand) 14%, transparent); border-color: color-mix(in srgb, var(--brand) 35%, transparent); color: var(--brand-600); }
:root[data-theme="dark"] .act-brand { color: #FF8A7E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .act-brand { color: #FF8A7E; } }
.chev-sm { width: 12px !important; height: 12px !important; opacity: .7; }
.summary-actions .menu { bottom: 40px; left: 0; min-width: 260px; }

/* =============================================================== Preguntar a Auris */
.transcript-panel { position: relative; }
.chat { position: absolute; inset: 0; background: var(--surface); border-radius: var(--radius); display: flex; flex-direction: column; z-index: 5;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border)); box-shadow: var(--shadow-lg); }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.chat-title { display: flex; gap: 10px; align-items: center; }
.chat-title img { width: 28px; height: 28px; }
.chat-title div { display: grid; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; line-height: 1.55; font-size: 14px; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.assistant p { margin: 0 0 8px; } .msg.assistant p:last-child { margin-bottom: 0; }
.msg.assistant ul, .msg.assistant ol { margin: 4px 0 8px; padding-left: 20px; }
.msg-actions { display: flex; gap: 6px; margin-top: 8px; }
.msg-actions button { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 8px; font: inherit; font-size: 12px; padding: 3px 8px; cursor: pointer; }
.msg-actions button:hover { color: var(--text); }
.typing::after { content: "▍"; animation: blink 1s steps(1) infinite; color: var(--brand); }
@keyframes blink { 50% { opacity: 0; } }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.chat-suggest button { border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border)); background: color-mix(in srgb, var(--brand) 6%, var(--surface));
  color: var(--text); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12px; cursor: pointer; }
.chat-suggest button:hover { border-color: var(--brand); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; max-height: 140px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font: inherit;
  background: var(--surface-2); color: var(--text); }
.chat-form textarea:focus { outline: none; border-color: var(--brand); }
.chat-empty { margin: auto; text-align: center; color: var(--muted); max-width: 320px; font-size: 13px; display: grid; gap: 8px; justify-items: center; }
.chat-empty img { width: 44px; height: 44px; }

/* Asignar hablante */
.speaker-pop { position: fixed; z-index: 120; min-width: 240px; max-height: 340px; overflow-y: auto; }
.speaker-pop .pop-title { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.speaker-pop .pop-input { padding: 6px 8px 8px; display: flex; gap: 6px; }
.speaker-pop .pop-input input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; background: var(--surface-2); color: var(--text); }
.speaker-pop .menu-item small { color: var(--muted); margin-left: auto; font-size: 11px; }
.av-sm { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.speaker-pop .menu-item { display: flex; align-items: center; gap: 8px; }
.chat-form .btn-primary.btn-icon { background: var(--brand); color: #fff; border: 0; width: 42px; height: 42px; flex: none; }
.chat-form .btn-primary.btn-icon:disabled { opacity: .5; }
.summary-actions .more { position: relative; }
/* Conectar calendario: niveles */
.tier { display: grid; gap: 8px; }
.tier-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.provider .pv-go { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--brand-600); white-space: nowrap; padding-left: 8px; }
.provider-hero { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.provider-hero .pv-go { background: var(--brand); color: #fff; padding: 6px 12px; border-radius: 8px; }
.provider.disabled { opacity: .55; }
.provider-sm { padding: 8px 10px; font-size: 13px; }
.provider-sm .pv-logo { width: 26px; height: 26px; font-size: 13px; border-radius: 7px; }
.tier-manual summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.tier-manual[open] summary { margin-bottom: 8px; }
.tier-manual .providers { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .tier-manual .providers { grid-template-columns: 1fr; } }
.ok-badge { color: var(--ok); font-weight: 700; }
.provider > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.provider-sm > span:nth-child(2) { display: inline; }
/* Marca: «i» en coral */
.wordmark b { color: var(--brand); font-weight: 800; letter-spacing: -.04em; margin-right: .01em; }

/* Refinado en vivo: texto de Deepgram aún sin reescribir por Scribe v2 */
.turn.prov p { opacity: .62; transition: opacity .4s; }

/* Importar grabaciones */
.import-btn { margin-top: 8px; }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.import-banner { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg, 0 8px 30px rgba(0,0,0,.18)); font-size: 14px; }
.spinner { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--border); border-top-color: #FF6656; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.drop-zone { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(255, 102, 86, .12); backdrop-filter: blur(2px); pointer-events: none; }
.drop-zone div { padding: 22px 30px; border: 2px dashed #FF6656; border-radius: 16px; background: var(--surface); font-size: 17px; font-weight: 600; }

/* Configuración → Bot: lista de voces con vista previa */
.voice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.voice-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; min-width: 0; }
.voice-opt.selected { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.voice-opt input { accent-color: var(--brand); }
.voice-opt .vo-text { display: grid; min-width: 0; flex: 1; }
.voice-opt .vo-name { font-weight: 600; font-size: 13px; }
.voice-opt .vo-desc { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-opt .vo-play { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: inherit; cursor: pointer; }
.voice-opt .vo-play.playing { background: var(--brand); color: #fff; border-color: var(--brand); }
.voice-list.disabled { opacity: .5; pointer-events: none; }
#prefBotGreeting { width: 100%; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; }

/* Configuración → Bot: cuenta de la empresa */
.cred-pf { display: grid; gap: 6px; margin: 10px 0 6px; }
.cred-pf { display: grid; gap: 8px; }
.cred-row { display: flex; align-items: center; gap: 10px; }
/* Bloque que se despliega bajo el interruptor activado: cuenta de esa plataforma, Guardar y Probar. */
.cred-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: -2px 0 6px 20px; padding: 12px 14px; border-left: 2px solid var(--border); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.cred-form .cred-actions, .cred-form .cred-msg { grid-column: 1 / -1; }
.cred-form .cred-msg { margin: 0; min-height: 0; }
.cred-form .cred-msg:empty { display: none; }
@media (max-width: 700px) { .cred-form { grid-template-columns: 1fr; margin-left: 0; } }
.cred-row .toggle { min-width: 150px; margin: 0; }
.cred-state { flex: 1; font-size: 12px; color: var(--muted); }
.cred-state.ok { color: var(--ok); }
.cred-state.pending { color: var(--warning, #D97706); }
.cred-state.error { color: var(--danger, #DC2626); }

/* Sin grabar: los medidores solo indican nivel (gris) */
.audiobar.idle .meter-fill { background: var(--muted); opacity: .45; }

/* ---------- Firma de OmniSoft (bajo el usuario, como en alinear.omnisoft.cl, más pequeña) ---------- */
.omni-brand:hover b { text-decoration: underline; }
.omni-sign { color: var(--muted); white-space: nowrap; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 6px; font-size: 10px; display: flex; padding: 6px 0 0; }
.omni-sign.on-auth { margin-top: 18px; }
.user-area .omni-sign { margin: 0 0 -12px 8px; width: var(--user-w, auto); flex-wrap: nowrap; }  /* pegada a la base y centrada bajo avatar + nombre (--user-w lo pone app.js): no se mueve con el ancho */
.omni-brand { align-items: center; gap: 4px; text-decoration: none; display: inline-flex; }
.omni-brand b { letter-spacing: -.2px; font-family: Poppins, Montserrat, "Segoe UI", system-ui, sans-serif; font-size: 12px; font-weight: 700; line-height: 1; }
.omni-mark { flex: none; width: 16px; height: 16px; }
.omni-mark .omni-navy, .omni-brand .omni-navy { fill: var(--omni-navy); color: var(--omni-navy); }
.omni-mark .omni-teal, .omni-brand .omni-teal { fill: var(--omni-teal); color: var(--omni-teal); }

.bot-connect { margin-left: 6px; vertical-align: middle; }


/* ------------------------------------------------- Configuración → Llamadas: comprobación guiada */
.check-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.checks { display: grid; gap: 6px; }
.checks:empty { display: none; }
.check { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.check-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--muted); }
.check-ok .check-ic { background: var(--ok); }
.check-warn .check-ic { background: #D97706; }
.check-fail .check-ic { background: var(--danger); }
.check-label { font-weight: 600; font-size: 13px; }
.check-detail { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.check .btn { align-self: center; white-space: nowrap; }
@media (max-width: 700px) { .check { grid-template-columns: 22px 1fr; } .check .btn { grid-column: 2; justify-self: start; } }

/* Papelera: enlace bajo la lista y elementos con Restaurar / Eliminar */
.trash-link { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 4px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; }
.trash-link:hover { background: var(--surface-2); color: var(--text); }
.trash-link .n { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.trash-link .n:empty { display: none; }
.meeting-list .trash-head { display: flex; align-items: center; justify-content: space-between; }
.meeting-list .trash-head button { border: 0; background: transparent; color: var(--danger); font: inherit; font-weight: 700; cursor: pointer; letter-spacing: inherit; text-transform: inherit; }
.meeting-list .trash-head button:hover { text-decoration: underline; }
/* Icono de papelera que aparece al posar el ratón sobre una reunión de la lista */
.meeting-list li.item { position: relative; }
.item-trash { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s, color .12s, background .12s; }
.item-trash svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.meeting-list li.item:hover .item-trash, .item-trash:focus-visible { opacity: 1; }
.item-trash:hover { color: var(--danger); background: var(--surface-2); }
.meeting-list li.item:hover .t { padding-right: 26px; }
.meeting-list li.item.leaving { opacity: .4; pointer-events: none; }
@media (hover: none) { .item-trash { opacity: .55; } .meeting-list li.item .t { padding-right: 26px; } }
.meeting-list .trash-item { gap: 4px; }
.trash-acts { display: flex; gap: 6px; margin-top: 4px; }
.trash-acts .btn { height: 26px; padding: 0 9px; font-size: 12px; }
.trash-acts .danger { color: var(--danger); }

/* Acerca de iAuris: tarjeta centrada con logo, versión y firma de OmniSoft */
.about-card { width: min(380px, 100%); padding: 34px 28px 24px; align-items: center; text-align: center; gap: 4px; position: relative; }
.about-close { position: absolute; top: 10px; right: 10px; }
.about-logo { width: 64px; height: 64px; margin-bottom: 8px; }
.about-card h2 { margin: 0; font-size: 24px; letter-spacing: -.3px; }
.about-version { margin: 0; font-size: 13px; font-weight: 600; color: var(--brand-600); padding: 2px 10px; border-radius: 999px; background: var(--brand-50); }
.about-tag { margin: 12px 0 0; color: var(--muted); line-height: 1.5; max-width: 300px; }
.about-dev { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); width: 100%; display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.about-dev .omni-brand b { font-size: 16px; }
.about-dev .omni-mark { width: 22px; height: 22px; }
.about-foot { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* Diálogo propio de confirmar/avisar (askDialog): tarjeta pequeña, icono, texto y dos botones */
.ask-card { width: min(440px, 100%); padding: 22px 22px 18px; gap: 18px; }
.ask-body { display: flex; gap: 14px; align-items: flex-start; }
.ask-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-50); color: var(--brand-600); }
.ask-icon .ic { width: 22px; height: 22px; }
.ask-danger .ask-icon { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.ask-card h2 { margin: 2px 0 4px; font-size: 16px; }
.ask-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.ask-card h2.hidden + p { color: var(--text); font-size: 15px; }
.ask-acts { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 480px) { .ask-acts { flex-direction: column-reverse; } .ask-acts .btn { width: 100%; } }

/* Reportar un problema */
.support-form { display: grid; gap: 12px; }
.support-form textarea { width: 100%; padding: 10px 12px; resize: vertical; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); outline: 0; font-weight: 400; }
.support-form textarea:focus { border-color: var(--brand); }
.support-form p:empty { display: none; }
.support-actions { display: flex; justify-content: flex-end; }
.support-back { justify-self: start; }
.support-form h3, .support-h { margin: 0 0 8px; font-size: 14px; }
.support-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.support-list button { width: 100%; display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; text-align: left; background: var(--surface-2); border: 0; border-radius: 8px; cursor: pointer; }
.support-list button span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-messages { display: grid; gap: 8px; }
.support-msg { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.support-msg.staff { background: var(--brand-50); }

/* Plan y créditos */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.plan-grid div { display: grid; gap: 2px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }
.plan-req { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
#planMsg:empty { display: none; }
@media (max-width: 560px) { .plan-grid { grid-template-columns: minmax(0, 1fr); } }
