/* Colores de la marca AlexDental. El cobre queda solo para avisos, no para la marca. */
:root {
    --verde: #0B7A78;
    --verde-oscuro: #0B3C49;
    --menta: #7FE3D6;
    --cobre: #B5631A;
    --fondo: #F4F8F8;
    --tarjeta: #FFFFFF;
    --borde: #DBE5E6;
    --texto: #1B2B33;
    --texto-suave: #3F4F57;
}

html { font-size: 16px; }

body {
    background: var(--fondo);
    color: var(--texto);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > .container { flex: 1; }

.barra { background: var(--verde-oscuro); }
.barra .marca, .barra .nav-link, .barra .quien { color: #fff; }
.barra .nav-link:hover { color: #cfe8e4; }
.barra .navbar-toggler { border-color: rgba(255, 255, 255, .5); }
.barra .navbar-toggler-icon { filter: invert(1); }
.quien small { color: #cfe8e4; }

h1, h2, h3 { color: var(--verde-oscuro); }

.tarjeta {
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: 14px;
    padding: 1.5rem;
}

.formulario-corto { max-width: 460px; margin: 0 auto; }

.btn-principal { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn-principal:hover, .btn-principal:focus { background: var(--verde-oscuro); border-color: var(--verde-oscuro); color: #fff; }

.modulo { height: 100%; }
.modulo .numero { color: var(--verde); font-weight: 700; font-size: 1.4rem; }
.modulo.proximo { opacity: .65; }
.etiqueta-proximo { font-size: .8rem; color: var(--texto-suave); }

.clave-temporal {
    font-family: Consolas, monospace;
    font-size: 1.3rem;
    letter-spacing: 2px;
    background: #fff;
    padding: .3rem .6rem;
    border-radius: 6px;
    border: 1px dashed var(--cobre);
}

.cambios { font-family: Consolas, monospace; font-size: .8rem; white-space: pre-wrap; word-break: break-word; max-width: 520px; }

.pie {
    border-top: 1px solid var(--borde);
    color: var(--texto-suave);
    font-size: .85rem;
    padding: 1rem 0;
}

/* Enlaces dentro de las tarjetas: con el color de la marca, no el azul del navegador */
.modulo h2 a, .enlace-tarjeta { color: var(--verde-oscuro); text-decoration: none; }
.modulo h2 a:hover { color: var(--verde); text-decoration: underline; }
.enlace-tarjeta { transition: border-color .15s, box-shadow .15s; }
.enlace-tarjeta:hover { border-color: var(--verde); box-shadow: 0 2px 10px rgba(15, 46, 58, .08); color: var(--texto); }
.enlace-tarjeta p { color: var(--texto-suave); }

a { color: var(--verde); }
a:hover { color: var(--verde-oscuro); }

.migas { font-size: .9rem; }
.migas a { text-decoration: none; }
.migas a::before { content: "← "; }

.buscador { max-width: 320px; }

.marca-prueba, .marca-estado {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    padding: .1rem .45rem;
    border-radius: 999px;
    vertical-align: middle;
}
.marca-prueba { background: #FBEBDD; color: #7A3F0C; border: 1px solid #E9C29C; }
.marca-estado { background: #ECEFEE; color: var(--texto-suave); border: 1px solid var(--borde); }

.formulario-ancho { max-width: 860px; margin: 0 auto; }
.formulario-ancho h2 { font-size: 1.05rem; margin-top: 1.25rem; color: var(--verde); }
.ayuda { font-size: .85rem; color: var(--texto-suave); }

.tabla-precios input { max-width: 160px; text-align: right; }

/* Órdenes de trabajo */
.estado { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.estado-recibida { background: #E8EEF3; color: #23415A; border-color: #C9D6E2; }
.estado-produccion { background: #E1F1EF; color: #0F4E4D; border-color: #B7DCD8; }
.estado-prueba { background: #FBF0DC; color: #6E4A08; border-color: #EBD3A4; }
.estado-terminada { background: #E3F2E1; color: #24561F; border-color: #BFDDBA; }
.estado-entregada { background: #ECEFEE; color: #3F4F57; border-color: var(--borde); }
.estado-cancelada { background: #F6E4E2; color: #7A2A22; border-color: #E5BDB8; }
/* Tablero de producción: columnas que se desplazan de lado dentro de su caja (la página no) */
.tablero { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: .75rem; align-items: flex-start; }
.tablero-columna { flex: 0 0 17rem; background: #E9F0F1; border-radius: 12px; padding: .6rem; }
.tablero-especial { background: #DFEDEC; }
.tablero-titulo { font-size: .85rem; font-weight: 700; margin: .1rem .2rem .6rem; color: var(--verde-oscuro); }
.tablero-tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-left: 4px solid var(--verde); border-radius: 10px; padding: .55rem .65rem; margin-bottom: .55rem; font-size: .9rem; }
.tablero-tarjeta.tarjeta-critica { border-left-color: var(--cobre); }
.tablero-tarjeta.tarjeta-no-paso { border-left-color: #7A2A22; background: #FDF6F5; }
.tablero-tarjeta a { text-decoration: none; }

/* Producción: etapas de cada trabajo */
.etapas { list-style: none; padding: 0; margin: 0; }
.etapa { border-left: 3px solid var(--borde); padding: .45rem 0 .55rem .8rem; }
.etapa + .etapa { border-top: 1px dashed var(--borde); }
.etapa-hecha { border-left-color: #8DC08A; }
.etapa-hecha strong { color: var(--texto-suave); }
.etapa-en_curso { border-left-color: var(--verde); }
.etapa-actual { background: #F1F8F6; }
.etapa select { max-width: 14rem; }
.marca-critico { display: inline-block; font-size: .7rem; font-weight: 700; padding: .05rem .4rem; border-radius: 4px; background: #FBEBDD; color: #7A3F0C; border: 1px solid #E9C29C; vertical-align: middle; }
.marca-no-paso { display: inline-block; font-size: .7rem; font-weight: 700; padding: .05rem .4rem; border-radius: 4px; background: #7A2A22; color: #fff; vertical-align: middle; }
.controles { list-style: none; padding: 0; margin: .35rem 0 0; font-size: .82rem; color: var(--texto-suave); }
.control-paso { font-weight: 700; color: #24561F; }
.control-no-paso { font-weight: 700; color: #7A2A22; }
.historia li.evento-produccion::before { background: #8DC08A; }

.marca-3d { display: inline-block; font-size: .7rem; font-weight: 700; padding: .1rem .45rem; border-radius: 4px; background: #16706F; color: #fff; vertical-align: middle; text-decoration: none; }
.marca-3d:hover { background: #0F2E3A; color: #fff; }
.marca-urgente { display: inline-block; font-size: .7rem; font-weight: 700; padding: .1rem .45rem; border-radius: 4px; background: #7A2A22; color: #fff; vertical-align: middle; }
.entrega-atrasada { color: #A5281C; font-weight: 600; }
.entrega-hoy { color: var(--cobre); font-weight: 600; }
.entrega-pronto { color: var(--verde); font-weight: 600; }
.grupo-atrasado { border-color: #E5BDB8; }
.grupo-atrasado h2 { color: #A5281C; }
.dato-titulo { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-suave); margin-bottom: .1rem; }
.historia { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--borde); }
.historia li { position: relative; padding: 0 0 .9rem .9rem; }
.historia li::before { content: ""; position: absolute; left: -6px; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--borde); }
.historia li.evento-estado::before { background: var(--verde); }
.historia li.evento-archivo::before { background: var(--cobre); }
.huella { font-family: Consolas, monospace; font-size: .7rem; word-break: break-all; }
.nav-pills .nav-link.active { background: var(--verde); }
.nav-pills .nav-link { color: var(--verde-oscuro); }

/* ───── Ayuda ───── */
.ayuda-pagina { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.ayuda-indice { position: sticky; top: 1rem; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; padding: 1rem; font-size: .9rem; }
.ayuda-indice-titulo { font-weight: 700; color: var(--verde-oscuro); margin-bottom: .5rem; }
.ayuda-indice ol { padding-left: 1.2rem; margin: 0; }
.ayuda-indice li { margin-bottom: .25rem; }
.ayuda-indice a { text-decoration: none; }
.ayuda-texto { max-width: 52rem; }
.ayuda-texto section { padding-top: 1.5rem; margin-top: 1rem; border-top: 1px solid var(--borde); scroll-margin-top: 1rem; }
.ayuda-texto h2 { font-size: 1.4rem; }
.ayuda-texto h3 { font-size: 1.05rem; margin-top: 1.2rem; color: var(--verde); }
.ayuda-texto li { margin-bottom: .35rem; }
.ayuda-texto figure { margin: 1rem 0 1.25rem; }
.ayuda-texto figure img { width: 100%; height: auto; border: 1px solid var(--borde); border-radius: 10px; box-shadow: 0 2px 10px rgba(15, 46, 58, .08); }
.ayuda-texto figcaption { font-size: .85rem; color: var(--texto-suave); margin-top: .35rem; }
.ayuda-texto details { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 10px; padding: .6rem .9rem; margin-bottom: .5rem; }
.ayuda-texto summary { font-weight: 600; cursor: pointer; }
.ayuda-texto details p { margin: .5rem 0 0; }
.ayuda-aviso { background: #FBF0DC; border: 1px solid #EBD3A4; border-radius: 12px; padding: .9rem 1.1rem; margin: 1rem 0; }
.ayuda-estados .estado { white-space: nowrap; }
.ayuda-nota { font-size: .9rem; color: var(--texto-suave); }
/* Botoncito «?» junto al título de cada pantalla: lleva a su parte de la ayuda */
.enlace-ayuda { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%;
    border: 1px solid var(--borde); color: var(--verde); font-size: .85rem; font-weight: 700; text-decoration: none; vertical-align: middle; margin-left: .35rem; }
.enlace-ayuda:hover { background: var(--verde); color: #fff; border-color: var(--verde); }

@media (max-width: 991px) {
    .ayuda-pagina { grid-template-columns: 1fr; }
    .ayuda-indice { position: static; }
}

/* Al imprimir la ayuda (o guardarla en PDF): solo el texto, sin menú ni pie */
@media print {
    header, footer, .d-print-none { display: none !important; }
    body { background: #fff; }
    .ayuda-pagina { display: block; }
    .ayuda-texto { max-width: none; }
    .ayuda-texto section { break-inside: auto; }
    .ayuda-texto figure { break-inside: avoid; }
    .ayuda-texto details { border: 0; padding: 0; }
    .ayuda-texto details > *:not(summary) { display: block; }
    a { color: inherit; text-decoration: none; }
}

/* Materiales */
.aviso-material { display: block; height: 100%; padding: .55rem .8rem; border-radius: 10px; background: #FBF0DC; border: 1px solid #EBD3A4; color: #6E4A08; text-decoration: none; font-size: .9rem; }
.aviso-material.aviso-grave { background: #F6E4E2; border-color: #E5BDB8; color: #7A2A22; }
a.aviso-material:hover { filter: brightness(.97); }
@media (min-width: 768px) { .quien span { white-space: nowrap; } }

/* Pantalla de entrada */
.barra .marca img { display: block; }
.acceso { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.acceso-marca { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 3rem;
    padding: 3.5rem clamp(2rem, 6vw, 5.5rem); background: var(--verde-oscuro); color: #fff; }
.acceso-marca > * { position: relative; }
.acceso-logo { width: min(100%, 300px); height: auto; margin-left: -.45rem; }
.acceso-mensaje { max-width: 30rem; }
.acceso-mensaje h2 { color: #fff; font-size: clamp(1.7rem, 2.7vw, 2.35rem); font-weight: 600; line-height: 1.2; margin-bottom: 1.5rem; }
.acceso-lista { list-style: none; margin: 0; padding: 0; }
.acceso-lista li { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .75rem; }
.acceso-lista svg { flex: none; margin-top: .2rem; }
.acceso-aliado { align-self: flex-start; max-width: 100%; padding: .85rem 1.1rem; border: 1px solid var(--menta); border-left-width: 4px; background: var(--verde-oscuro); }
.acceso-aliado span { display: block; color: var(--menta); font-size: .85rem; font-weight: 600; margin-bottom: .15rem; }
.acceso-aliado strong { display: block; color: #fff; font-size: 1.15rem; font-weight: 600; line-height: 1.25; }
.acceso-marca > .acceso-fondo { position: absolute; right: -9rem; bottom: -7rem; width: 42rem; max-width: none; height: auto; opacity: .16; pointer-events: none; }
.acceso-panel { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--tarjeta); }
.acceso-columna { width: 100%; max-width: 23rem; }
.acceso-caja h1 { font-weight: 600; }
@media (max-width: 860px) {
    .acceso { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .acceso-marca { padding: 1.5rem 1.25rem; gap: .9rem; }
    .acceso-lista { display: none; }
    .acceso-mensaje h2 { font-size: 1.15rem; margin: 0; font-weight: 500; }
    .acceso-marca > .acceso-fondo { width: 24rem; right: -8rem; bottom: -6rem; opacity: .12; }
    .acceso-aliado { padding: .55rem .8rem; }
    .acceso-aliado span { font-size: .78rem; }
    .acceso-aliado strong { font-size: 1rem; }
    .acceso-logo { width: 220px; }
    .acceso-panel { align-items: flex-start; }
}
