/* Variables y base. El color de marca va en UNA variable: --marca. */
:root {
  --marca: #00756E;
  --marca-texto: var(--marca);
  --marca-suave: color-mix(in srgb, var(--marca) 12%, transparent);
  --fondo: #f1f4f4;
  --fondo-chat: #e9eeee;
  --superficie: #ffffff;
  --superficie2: #f6f8f8;
  --texto: #202426;
  --texto2: #5f6a6c;
  --borde: #e0e6e6;
  --mia: #d3eee9;
  --otra: #ffffff;
  --leido: #1e88e5;
  --error: #b3261e;
  --error-fondo: #fbeceb;
  --ok-fondo: #e4f4ee;
  --sombra: 0 6px 24px rgba(0, 0, 0, .14);
  --radio: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) { --fondo: #12171a; --fondo-chat: #0f1416; --superficie: #1b2123; --superficie2: #222a2d; --texto: #e8eded; --texto2: #9aa6a8; --borde: #2b3437; --mia: #0e4d49; --otra: #263033; --marca-texto: #4cc4b9; --leido: #5cb3ff; --error: #ff8a80; --error-fondo: #3a1f1d; --ok-fondo: #173a33; --sombra: 0 6px 24px rgba(0, 0, 0, .5); color-scheme: dark; }
}
:root[data-tema="oscuro"] { --fondo: #12171a; --fondo-chat: #0f1416; --superficie: #1b2123; --superficie2: #222a2d; --texto: #e8eded; --texto2: #9aa6a8; --borde: #2b3437; --mia: #0e4d49; --otra: #263033; --marca-texto: #4cc4b9; --leido: #5cb3ff; --error: #ff8a80; --error-fondo: #3a1f1d; --ok-fondo: #173a33; --sombra: 0 6px 24px rgba(0, 0, 0, .5); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--fondo); color: var(--texto); -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
a { color: var(--marca); }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; }

#app { height: 100dvh; display: flex; position: relative; overflow: hidden; background: var(--superficie); }

/* Pantallas anchas: dos columnas */
.col-izq { width: 100%; display: flex; flex-direction: column; min-height: 0; background: var(--superficie); position: relative; }
.col-der { position: absolute; inset: 0; z-index: 5; background: var(--fondo-chat); display: flex; flex-direction: column; min-height: 0; transform: translateX(100%); transition: transform .2s ease; }
body.en-chat .col-der { transform: none; }
.capa { position: absolute; inset: 0; z-index: 20; background: var(--superficie); display: flex; flex-direction: column; min-height: 0; }
@media (min-width: 820px) {
  .col-izq { width: 380px; flex: none; border-right: 1px solid var(--borde); }
  .col-der { position: static; transform: none; flex: 1; z-index: auto; }
  .capa { right: auto; width: 380px; border-right: 1px solid var(--borde); }
  .solo-movil { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
