/* MUVAIL · LA BASE COMÚN DE LAS PANTALLAS (10/10/2026, crm#2)
 *
 * Javier, al ver la primera pantalla interior en blanco: «tenemos que seguir con el mismo diseño,
 * que está genial». Así que todo lo que hay dentro de los programas sigue al portal: la escena de
 * cristal al fondo (desenfocada, para que se lea), tarjetas de cristal, el azul eléctrico para lo
 * principal, el marino para los títulos, la misma letra. Componentes reutilizables para todos los
 * programas de Muvail: lo que se haga aquí es para todos.
 *
 * Las medidas son normales (px), no las del portal (que calca una imagen): esto es una pantalla de
 * trabajo y tiene que adaptarse a cualquier ventana.
 */

:root {
  --azul: #0f10e8;            /* botón principal, logo, lo activo */
  --azul-suave: rgba(15, 16, 232, .08);
  --marino: #050936;          /* títulos */
  --texto: #14163a;
  --gris: #4b5068;
  --gris-claro: #6b7085;
  --borde: rgba(20, 22, 58, .10);
  --verde: #1ea86a;
  --peligro: #b3261e;
  --violeta: #5e2adc;
  --turquesa: #35d1d6;
  --cristal: rgba(255, 255, 255, .72);
  --cristal-borde: rgba(255, 255, 255, .92);
  --sombra: 0 10px 30px rgba(40, 50, 120, .10);
  --radio: 16px;
  --radio-boton: 24px;
  --fuente: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --lateral: 250px;
  --cabecera: 72px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--fuente); color: var(--texto); font-size: 15px; line-height: 1.4;
  background: #eef2fb; -webkit-font-smoothing: antialiased;
}

/* ── LA ESCENA AL FONDO: la misma del portal, desenfocada y aclarada ───────────────────────── */
.escena-fondo {
  position: fixed; inset: -4%; z-index: -1;
  background: url(escena.jpg) center / cover no-repeat;
  filter: blur(16px) saturate(1.05) brightness(1.04);
}
.escena-fondo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,.58) 100%);
}

/* ── LA CABECERA, COMO EN EL PORTAL ────────────────────────────────────────────────────────── */
.cabecera {
  height: var(--cabecera); display: flex; align-items: center; gap: 0; padding: 0 32px 0 28px;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--azul); text-decoration: none; }
.logo-marca { width: 34px; height: 27px; }
.logo-texto { font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1; margin-top: -4px; }
/* El logo de la empresa en la que se está (crm#234); sin logo, su inicial; sin empresa, el de Muvail. */
.logo-imagen { height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.logo-inicial { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--azul); color: #fff; font-size: 17px; font-weight: 700; }
.logo-nombre { font-size: 20px; font-weight: 700; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cabecera .hueco { flex: 1; }
.cabecera button, .cabecera .boton-cabecera {
  font: inherit; font-size: 15px; color: var(--texto); background: none; border: 0; padding: 8px 10px;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border-radius: 10px; white-space: nowrap;
}
.cabecera button:hover { background: rgba(255,255,255,.6); }
.chevron { width: 11px; height: 8px; }
.separador { width: 1px; height: 26px; background: var(--borde); margin: 0 12px; }
.icono { width: 40px; height: 40px; justify-content: center; position: relative; }
.icono svg { width: 22px; height: 22px; }
.punto { position: absolute; right: 7px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--azul); border: 2px solid #fff; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #dfe3fe; color: var(--marino);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}

/* ── EL CRISTAL ────────────────────────────────────────────────────────────────────────────── */
.cristal {
  background: var(--cristal); border: 1px solid var(--cristal-borde); border-radius: var(--radio);
  box-shadow: var(--sombra); backdrop-filter: blur(14px);
}

/* ── EL MENÚ LATERAL, DE CRISTAL ───────────────────────────────────────────────────────────── */
.lateral {
  position: fixed; left: 20px; top: calc(var(--cabecera) + 4px); bottom: 20px; width: var(--lateral);
  padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.lateral .seccion { font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--gris-claro); padding: 12px 12px 6px; }
.lateral button {
  font: inherit; font-size: 15px; color: var(--texto); text-align: left; cursor: pointer;
  background: none; border: 0; border-radius: 12px; padding: 10px 12px;
  display: flex; align-items: center; gap: 12px; width: 100%; white-space: nowrap;
}
.lateral button .etiqueta { overflow: hidden; text-overflow: ellipsis; }
.lateral button svg { width: 20px; height: 20px; color: var(--gris); flex: none; }
.lateral button:hover { background: rgba(255,255,255,.7); }
.lateral button.activa { background: var(--azul-suave); color: var(--azul); font-weight: 600; }
.lateral button.activa svg { color: var(--azul); }
.lateral button[disabled] { opacity: .45; cursor: default; }
.lateral button[disabled]:hover { background: none; }
.lateral .pronto { margin-left: auto; font-size: 11px; color: var(--gris-claro); font-weight: 500; }
.lateral .hueco { flex: 1; }

/* ── LA PANTALLA ───────────────────────────────────────────────────────────────────────────── */
.pantalla { margin-left: calc(var(--lateral) + 44px); padding: 12px 32px 40px 0; }
.pantalla h1 { margin: 6px 0 6px; font-size: 40px; line-height: 1.05; font-weight: 800; letter-spacing: -1.4px; color: var(--marino); }
.pantalla h1 .acento {
  background: linear-gradient(90deg, #2a62ff 0%, #4a3fe6 55%, #5e2adc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pantalla .subtitulo { margin: 0 0 22px; font-size: 17px; color: var(--gris); }
.tarjeta { padding: 22px 26px; margin-bottom: 18px; }
.tarjeta h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: var(--texto); }
.tarjeta p { margin: 0; color: var(--gris); }

/* ── BOTONES, COMO EL DE ENTRAR AL PORTAL ───────────────────────────────────────────────────── */
.principal {
  font: inherit; font-size: 16px; font-weight: 600; color: #fff; background: var(--azul);
  border: 0; border-radius: var(--radio-boton); height: 46px; padding: 0 26px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 20px rgba(15, 16, 232, .22); text-decoration: none;
}
.principal:hover { background: #0b0cc9; }
.principal svg { width: 18px; height: 14px; }
.secundario {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--azul); background: rgba(255,255,255,.75);
  border: 1px solid var(--cristal-borde); border-radius: var(--radio-boton); height: 42px; padding: 0 20px; cursor: pointer;
}
.secundario:hover { background: #fff; }

/* el «?» que explica, sólo al pulsarlo o pasar por encima */
.ayuda { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; border-radius: 50%; border: 1px solid var(--borde); color: var(--gris-claro); font-size: 12px; cursor: help; vertical-align: middle; }

/* ── EN PANTALLAS ESTRECHAS ────────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .lateral { position: static; width: auto; margin: 0 16px 12px; flex-direction: row; flex-wrap: wrap; padding: 8px; }
  .lateral .seccion, .lateral .hueco { display: none; }
  .lateral button { width: auto; }
  .pantalla { margin-left: 0; padding: 0 16px 32px; }
  .pantalla h1 { font-size: 30px; }
  .cabecera { padding: 0 12px; }
  .cabecera .texto { display: none; }
}

/* LOS CONTACTOS DE UNA FICHA (crm#155, /comun/contactos.js): teléfonos y correos con «+», cada uno con su
   etiqueta y el principal; personas de contacto. Una fila por dato, como el resto de formularios. */
.contactos-ficha { display: grid; gap: 12px; margin: 8px 0; }
.contactos-bloque { display: grid; gap: 6px; }
.contactos-titulo { font-weight: 600; }
/* El «+ para qué» y el «✎» de las etiquetas, cuando el programa lleva su lista (muvail-core#96). */
.contactos-para-que { margin-left: 10px; font-weight: 400; display: inline-flex; gap: 8px; }
.contactos-lista { display: grid; gap: 6px; }
.contactos-fila { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.contactos-fila input:not([type="radio"]) { flex: 1 1 160px; min-width: 0; }
.contactos-fila .c-etiqueta { flex: 0 1 130px; }
.contactos-fila .c-marca { display: inline-flex; align-items: center; gap: 4px; color: var(--gris, #6b7280); font-size: 13px; white-space: nowrap; }
.contactos-bloque .c-mas { justify-self: start; }
