/*
 * Nombre: mis-documentos/assets/mis-documentos.css
 * Autor: Deeplogistics.cl
 * Descripcion: Mis documentos (P174) — estilos del area del trabajador, PENSADOS PARA EL TELEFONO PRIMERO: una columna, letra de 17 px,
 *   botones y enlaces con al menos 48 px de alto, tablas que se leen como tarjetas en pantallas angostas (data-label), contraste AA,
 *   foco visible y sin desplazamiento horizontal. En pantallas anchas la lista pasa a dos o tres columnas. Misma paleta que el portal.
 *   P176: el area de texto del pedido de cambio de correo con el mismo estilo que los campos.
 * Fecha: 2026-09-27
 * Version: 2 (P176)
 */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Segoe UI", Roboto, Tahoma, Geneva, Verdana, sans-serif; color: #1f2233; background: #f4f5fb; line-height: 1.5; overflow-wrap: anywhere; }
a { color: #2d3160; }
a:focus, button:focus, input:focus, select:focus, summary:focus { outline: 3px solid #f0a500; outline-offset: 2px; }
.saltar { position: absolute; left: -9999px; top: 0; background: #fff; color: #222; padding: 10px 14px; }
.saltar:focus { left: 12px; top: 8px; z-index: 10; }
[hidden] { display: none !important; }

.marca { background: linear-gradient(135deg, #4a4f86 0%, #5b3f86 100%); color: #fff; padding: 14px 16px; }
.marca-nombre { margin: 0; font-weight: 700; font-size: 1.1rem; }
.marca-sub { margin: 2px 0 0; font-size: .92rem; }

.menu { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; background: #fff; border-bottom: 1px solid #dfe2f0; }
.menu a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 8px; font-weight: 600; text-decoration: none; background: #eef0fb; }
.menu a[aria-current="page"] { background: #4a4f86; color: #fff; }
.menu-salir { margin: 0 0 0 auto; }
.vence { margin: 0; padding: 8px 16px; font-size: .9rem; color: #444; background: #fff; border-bottom: 1px solid #dfe2f0; }

.contenido { max-width: 1100px; margin: 0 auto; padding: 16px 12px 8px; }
h1 { font-size: 1.4rem; margin: 4px 0 8px; color: #2d3160; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 0 0 10px; color: #2d3160; }
h3 { font-size: 1rem; margin: 14px 0 6px; color: #2d3160; }
.intro { margin: 0 0 14px; }
.ayuda { font-size: .9rem; color: #555; }

.tarjeta { display: block; background: #fff; border: 1px solid #dfe2f0; border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; }
.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border: 0; border-radius: 8px;
         background: #4a4f86; color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.boton:hover { background: #3b3f70; }
.boton[disabled] { opacity: .6; cursor: wait; }
.boton-secundario { background: #5f6368; }
.boton-secundario:hover { background: #45484c; }
.boton-grande { width: 100%; }

/* Entrada */
.formulario label { display: block; margin: 12px 0 4px; font-weight: 700; }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
    width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #8e94b8; border-radius: 8px; font: inherit; background: #fff; color: #1f2233;
}
input[aria-invalid="true"] { border: 2px solid #a12a22; }
.formulario .boton { margin-top: 18px; }
.error-campo { margin: 4px 0 0; color: #a12a22; font-weight: 600; font-size: .95rem; }
.error-general { background: #fdecea; color: #8a1f17; border-left: 6px solid #a12a22; border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; font-weight: 600; }
.error-general ul { margin: 6px 0 0; padding-left: 20px; }
.error-general p { margin: 0; }
.aviso { background: #eef0fb; color: #2d3160; border-left: 6px solid #4a4f86; border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; }
.aviso-firma { background: #fff4e0; color: #6b4300; border-left: 6px solid #d98a00; border-radius: 8px; padding: 12px 14px; margin: 10px 0 12px; font-weight: 700; }

/* Inicio */
.menu-inicio { list-style: none; margin: 0; padding: 0; }
.tarjeta-enlace { text-decoration: none; color: #1f2233; min-height: 88px; }
.tarjeta-enlace strong { display: block; font-size: 1.15rem; color: #2d3160; margin-bottom: 4px; }
.tarjeta-enlace span { display: block; }
.tarjeta-enlace:hover { border-color: #4a4f86; }
.marca-pendiente { margin-top: 8px; font-weight: 700; color: #6b4300; }

/* Lista */
.filtros summary { font-weight: 700; min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.filtros label { display: block; margin: 12px 0 4px; font-weight: 600; }
.fechas { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.acciones { display: grid; gap: 10px; margin-top: 16px; }
.resumen { margin: 4px 0 10px; font-weight: 600; }
.vacio { color: #444; }
.lista-documentos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.lista-documentos .tarjeta { margin: 0; }
.documento-titulo { font-size: 1.1rem; margin: 6px 0 8px; }
.documento-titulo a { display: inline-block; min-height: 44px; padding: 6px 0; }
.documento-datos, .datos { display: grid; grid-template-columns: 1fr; margin: 0; }
.documento-datos dt, .datos dt { font-size: .88rem; color: #555; margin-top: 6px; }
.documento-datos dd, .datos dd { margin: 0; font-weight: 600; }
.documento-estado { display: inline-block; margin: 0; padding: 4px 10px; border-radius: 999px; font-size: .9rem; font-weight: 700; background: #eef0fb; color: #2d3160; }
.estado-firmado, .estado-verde { background: #e3f4e8; color: #1c5e30; }
.estado-pendiente_firma { background: #fff4e0; color: #6b4300; }
.estado-firmado_por_ti { background: #e6effa; color: #1b3f6b; }   /* P200 (D26) */
.estado-rechazado, .estado-anulado { background: #fdecea; color: #8a1f17; }
.estado-gris { background: #eceff1; color: #37474f; }
.estado-ambar { background: #fff4e0; color: #6b4300; }
.paginas { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 16px 0; }

/* Ver */
.volver { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.ver-cabecera { margin-bottom: 10px; }
.ver-cabecera p { margin: 2px 0 6px; }
.hash { font-family: Consolas, "Courier New", monospace; font-size: .85rem; font-weight: 400; word-break: break-all; }
.ok { display: block; color: #1c5e30; font-weight: 700; }
.mal { color: #8a1f17; font-weight: 700; }
.etiqueta { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 999px; background: #4a4f86; color: #fff; font-size: .8rem; }
.archivos { margin: 0; padding-left: 20px; }
.archivos li { margin: 0 0 10px; }
.archivos a { display: inline-block; min-height: 40px; padding: 6px 0; font-weight: 600; }
.archivos .ayuda { display: block; }

/* Tablas: en el telefono cada fila es una tarjeta con la etiqueta de cada celda (data-label). */
.tabla { width: 100%; border-collapse: collapse; }
.tabla th, .tabla td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid #e4e6f2; }
.tabla th { background: #eef0fb; color: #2d3160; }
.tabla tr.propio td { background: #f6f7fd; }
@media (max-width: 720px) {
    .tabla-tarjetas thead { position: absolute; left: -9999px; }
    .tabla-tarjetas, .tabla-tarjetas tbody, .tabla-tarjetas tr, .tabla-tarjetas td { display: block; width: 100%; }
    .tabla-tarjetas tr { border: 1px solid #dfe2f0; border-radius: 10px; margin: 0 0 10px; padding: 6px 10px; }
    .tabla-tarjetas td { border: 0; padding: 4px 0; }
    .tabla-tarjetas td::before { content: attr(data-label); display: block; font-size: .85rem; color: #555; font-weight: 400; }
    .menu a { flex: 1 1 auto; justify-content: center; }
    .menu-salir { flex: 1 1 100%; margin: 0; }
    .menu-salir .boton { width: 100%; }
}

.pie { max-width: 1100px; margin: 0 auto; padding: 8px 16px 28px; color: #444; font-size: .92rem; }

@media (min-width: 721px) {
    .contenido { padding: 22px 20px 8px; }
    .boton-grande { width: auto; }
    .formulario { max-width: 520px; }
    .fechas { grid-template-columns: 1fr 1fr; }
    .acciones { display: flex; }
    .lista-documentos { grid-template-columns: repeat(2, 1fr); }
    .datos { grid-template-columns: minmax(160px, max-content) 1fr; gap: 6px 16px; }
    .datos dt { margin-top: 0; }
    .menu-inicio { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (min-width: 1024px) {
    .lista-documentos { grid-template-columns: repeat(3, 1fr); }
}
/* P244: Mi PIN de firma, bloques que se abren («¿No recuerdas tu PIN?», «Historial de mi PIN») */
details.tarjeta > summary { cursor: pointer; font-weight: 700; color: #2d3160; font-size: 1.05rem; min-height: 32px; }
details.tarjeta[open] > summary { margin-bottom: 10px; }

/* P242: aviso de privacidad con titulos de seccion y tablas (ficha de proveedores y plazos); en pantallas angostas cada fila es una tarjeta */
.aviso-texto .aviso-titulo { font-size: 1.05rem; margin: 18px 0 8px; color: #2d3160; }
.aviso-tabla-caja { overflow-x: auto; margin: 0 0 12px; }
.aviso-tabla { border-collapse: collapse; width: 100%; font-size: .92rem; }
.aviso-tabla th, .aviso-tabla td { border: 1px solid #cfd3e6; padding: 8px; vertical-align: top; text-align: left; }
.aviso-tabla th { background: #eef0fb; color: #2d3160; }
.pendiente { background: #fff3cd; padding: 0 3px; border-radius: 3px; }
#md-aviso-declaracion { margin: 0 0 12px; }
@media (max-width: 700px) {
    .aviso-tabla thead { display: none; }
    .aviso-tabla tr { display: block; border: 1px solid #cfd3e6; border-radius: 8px; margin: 0 0 10px; padding: 6px 10px; }
    .aviso-tabla td { display: block; border: 0; padding: 4px 0; }
    .aviso-tabla td::before { content: attr(data-titulo); display: block; font-weight: 700; font-size: .8rem; color: #555; }
}

/* P298 (abogada, 20-10): aviso fijo de DEMOSTRACION (empresa DEMO DT o cuenta de fiscalizador de demostracion); config/demostracion.php */
.sseg-demo-aviso { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; margin: 0; padding: 6px 12px; background: #7a1f1f; color: #fff;
    font-weight: 600; font-size: .95rem; line-height: 1.4; text-align: center; box-shadow: 0 -2px 4px rgba(0, 0, 0, .2); }
.sseg-demo-linea { display: block; }
.sseg-demo-hueco { height: 64px; }
