/* Área de clientes · estilos comunes (cliente y despacho), a partir del prototipo de Opcionalia. */
@font-face { font-family: Montserrat; font-weight: 400; font-display: swap; src: url(../vendor/montserrat-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 500; font-display: swap; src: url(../vendor/montserrat-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url(../vendor/montserrat-latin-700-normal.woff2) format('woff2'); }

:root {
  --azul: #2a4e92; --marino: #1e3882; --texto: #282828; --gris: #515156; --gris-claro: #76777b;
  --borde: #dfe2e8; --borde-campo: #b9bdc6; --fondo: #f4f5f7; --fondo-azul: #e9eef7;
  --naranja: #8a4413; --naranja-fondo: #fdf0e6; --naranja-borde: #e8c3a5; --naranja-texto: #6e370f;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: #e9ebef; color: var(--texto); font-family: Montserrat, 'Helvetica Neue', Arial, sans-serif; font-size: 15px; line-height: 22px; }
a { color: var(--azul); }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
[v-cloak] { display: none; }
h1 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; }
h2 { margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; }
p { margin: 0; }
.suave { color: var(--gris); }
.peq { font-size: 13px; line-height: 19px; }
.etiqueta-seccion { font-size: 13px; font-weight: 700; color: var(--azul); text-transform: uppercase; letter-spacing: .04em; }

/* Marco: en el móvil ocupa toda la pantalla; en el ordenador, una columna centrada. */
.marco { background: #fff; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; }
@media (min-width: 520px) { .marco { margin: 24px auto; min-height: calc(100vh - 48px); box-shadow: 0 2px 16px rgba(30,56,130,.18); } }
.marco.ancho { max-width: 1280px; }

.pila { display: flex; flex-direction: column; gap: 20px; padding: 20px 16px 24px; }
.pila.estrecha { gap: 8px; padding: 0; }
.acceso { flex-grow: 1; display: flex; flex-direction: column; gap: 24px; padding: 56px 28px 28px; }
.logo { width: 220px; height: 84px; object-fit: cover; align-self: flex-start; }

.campo { display: flex; flex-direction: column; gap: 8px; }
.campo label, .campo .rotulo { font-size: 13px; font-weight: 700; }
input[type=email], input[type=text], input:not([type]), select, textarea {
  min-height: 48px; padding: 0 14px; border: 1px solid var(--borde-campo); border-radius: 3px; font-size: 16px; color: var(--texto); background: #fff; width: 100%;
}
textarea { padding: 12px 14px; line-height: 22px; resize: vertical; }
input.codigo { height: 56px; font-size: 26px; letter-spacing: .4em; }
.casilla { display: flex; gap: 12px; align-items: center; min-height: 44px; cursor: pointer; }
.casilla input { width: 22px; height: 22px; accent-color: var(--azul); margin: 0; }

.boton { min-height: 50px; padding: 0 18px; border: 1px solid var(--azul); border-radius: 3px; background: var(--azul); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }
.boton.sec { background: #fff; color: var(--azul); }
.boton.texto { border: 0; background: transparent; color: var(--azul); font-weight: 500; min-height: 44px; }
.boton.peq { min-height: 40px; font-size: 13px; padding: 0 14px; }
.boton.aviso { background: #fff; color: var(--naranja); border-color: var(--naranja); }
.boton:disabled { background: var(--borde); border-color: var(--borde); color: var(--gris); cursor: default; }

.caja { background: var(--fondo); padding: 14px; display: flex; gap: 10px; align-items: flex-start; }
.error { background: var(--naranja-fondo); color: var(--naranja-texto); padding: 10px 12px; font-size: 14px; line-height: 20px; }
.ok { background: var(--fondo-azul); color: var(--marino); padding: 10px 12px; font-size: 14px; line-height: 20px; }

/* Cabecera y pestañas del cliente */
.cabecera { height: 64px; flex-shrink: 0; padding: 0 16px 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--borde); }
.cabecera img { width: 130px; height: 48px; object-fit: cover; }
.quien { display: flex; align-items: center; gap: 10px; min-width: 0; }
.quien .nombres { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.quien .nombres span { font-size: 12px; line-height: 16px; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.quien .nombres strong, .quien .nombres select { font-size: 13px; line-height: 16px; }
.quien .nombres select { min-height: 28px; padding: 0 4px; width: auto; max-width: 190px; }
.avatar { width: 36px; height: 36px; border-radius: 18px; background: var(--marino); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; border: 0; cursor: pointer; flex-shrink: 0; }
.contenido { flex-grow: 1; overflow-y: auto; }
.pestanas { height: 68px; flex-shrink: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 1px solid var(--borde); background: #fff; position: sticky; bottom: 0; }
.pestanas button { border: 0; border-top: 3px solid transparent; background: #fff; color: var(--gris); font-size: 11px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.pestanas button[aria-current=page] { border-top-color: var(--azul); color: var(--azul); font-weight: 700; }

.volver { display: flex; align-items: center; gap: 4px; }
.volver button { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; margin-left: -10px; }

.rejilla2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opcion { min-height: 52px; padding: 8px 10px; text-align: left; border: 1px solid var(--borde-campo); border-radius: 3px; background: #fff; color: var(--texto); font-size: 14px; line-height: 18px; font-weight: 500; cursor: pointer; }
.opcion[aria-pressed=true] { border-color: var(--azul); background: var(--azul); color: #fff; }
.grande { height: 84px; border: 1px dashed var(--azul); border-radius: 3px; background: #fff; color: var(--azul); font-size: 14px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.grande.lleno { border-style: solid; background: var(--azul); color: #fff; height: 72px; font-size: 15px; }
.archivo { display: flex; align-items: center; gap: 10px; padding: 8px 0 8px 12px; background: var(--fondo); }
.archivo span { flex-grow: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archivo button { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; flex-shrink: 0; }
.archivo.mal { background: var(--naranja-fondo); color: var(--naranja-texto); }

.fila { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--borde); }
.fila .linea { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fila .nombre { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.estado { flex-shrink: 0; font-size: 12px; line-height: 16px; font-weight: 700; padding: 4px 8px; border-radius: 3px; border: 1px solid var(--borde-campo); background: var(--fondo); color: var(--texto); white-space: nowrap; }
.estado.azul { background: var(--azul); border-color: var(--azul); color: #fff; }
.estado.claro { background: var(--fondo-azul); border-color: #b9c6e0; color: var(--marino); }
.estado.naranja { background: var(--naranja-fondo); border-color: var(--naranja-borde); color: var(--naranja); }
.nota { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: var(--naranja-fondo); }
.nota span { font-size: 13px; line-height: 19px; color: var(--naranja-texto); }

.tarjeta { border: 1px solid var(--borde); display: flex; flex-direction: column; }
.tarjeta > button { padding: 14px; border: 0; background: #fff; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; color: var(--texto); }
.mensaje { padding: 10px 12px; background: var(--fondo); font-size: 14px; line-height: 21px; white-space: pre-wrap; }
.mensaje.despacho { background: var(--fondo-azul); }
.mensaje.interna { background: #fff7d6; border-left: 3px solid #c9a227; }
.mensaje small { display: block; font-size: 12px; color: var(--gris); }

.centro { padding: 56px 24px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.circulo { width: 72px; height: 72px; border-radius: 36px; background: var(--azul); display: flex; align-items: center; justify-content: center; }
.cargando { padding: 40px; text-align: center; color: var(--gris); }
.pie { font-size: 12px; line-height: 17px; color: var(--gris-claro); }

/* Mis documentos (fase 2) */
.aviso-nuevos { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--azul); background: var(--fondo-azul); color: var(--marino); text-align: left; font-size: 14px; line-height: 20px; cursor: pointer; border-radius: 3px; }
.aviso-nuevos span[aria-hidden] { font-size: 22px; }
.migas { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--gris); margin-top: -8px; }
.migas button { border: 0; background: none; padding: 4px 0; color: var(--azul); font-size: inherit; cursor: pointer; text-decoration: underline; }
.explorador { display: flex; flex-direction: column; border-top: 1px solid var(--borde); }
.elemento { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--borde); background: #fff; color: var(--texto); text-align: left; font-size: 15px; cursor: pointer; }
.elemento svg { flex-shrink: 0; }
.elemento .nombre { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.elemento.vacia { color: var(--gris); }
.elemento.vacia svg { opacity: .5; }
.elemento:disabled { opacity: .6; cursor: wait; }
.nuevo { flex-shrink: 0; font-size: 11px; font-weight: 700; line-height: 16px; padding: 2px 6px; border-radius: 3px; background: var(--azul); color: #fff; }
.con-globo { position: relative; display: inline-flex; }
.globo-mini { position: absolute; top: -6px; right: -12px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--azul); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
/* Salir y «Mi empresa» (16/11/2026, observaciones de Opcionalia) */
.salir { width: 40px; height: 40px; border: 0; background: transparent; color: var(--gris); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-right: -8px; }
.salir:hover { color: var(--azul); }
.velo { position: fixed; inset: 0; background: rgba(20, 28, 48, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.dialogo { background: #fff; width: 100%; max-width: 360px; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 6px 28px rgba(0,0,0,.25); }
.dialogo .botones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.datos { margin: 0; display: flex; flex-direction: column; }
.datos > div { padding: 10px 0; border-bottom: 1px solid var(--borde); display: flex; flex-direction: column; gap: 2px; }
.datos dt { font-size: 12px; line-height: 16px; color: var(--gris); }
.datos dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
/* Área de la consulta, bien visible (observación de Opcionalia 16/11) */
.area { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; line-height: 18px; font-weight: 700; }
.area.fiscal_contable { background: var(--fondo-azul); color: var(--marino); }
.area.laboral_juridica { background: #e6f3ec; color: #1f5b3a; }
