/* =========================================================
   GENERADOR DE PLANOS TÉCNICOS
   Pantalla principal: index.php
   Archivo: css/inicio.css
   ========================================================= */


/* =========================================================
   1. VARIABLES GENERALES
   ========================================================= */

:root {
    --color-fondo: #f3eee7;
    --color-superficie: #fffdf9;
    --color-superficie-secundaria: #ebe3da;
    --color-superficie-oscura: #28231f;

    --color-primario: #a83f20;
    --color-primario-hover: #843018;
    --color-primario-suave: #f5ded4;

    --color-acento: #d58a1f;
    --color-acento-suave: #f8ebcf;

    --color-texto: #29231f;
    --color-texto-secundario: #6a5f57;
    --color-texto-claro: #fffdf9;

    --color-borde: #d8cec4;
    --color-borde-fuerte: #b8aa9d;

    --color-peligro: #a42f2f;
    --color-peligro-hover: #812323;
    --color-peligro-suave: #f9dddd;

    --color-exito: #357347;
    --color-exito-suave: #dff0e3;

    --color-advertencia: #8c5709;
    --color-advertencia-suave: #f8ebcf;

    --sombra-pequena:
        0 2px 8px rgba(45, 34, 25, 0.08);

    --sombra-media:
        0 12px 30px rgba(45, 34, 25, 0.12);

    --sombra-grande:
        0 24px 60px rgba(45, 34, 25, 0.2);

    --radio-pequeno: 8px;
    --radio-medio: 14px;
    --radio-grande: 22px;

    --ancho-maximo: 1240px;

    --transicion:
        180ms ease;
}


/* =========================================================
   2. REINICIO Y CONFIGURACIÓN GENERAL
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

button {
    border: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.pagina-inicio {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;

    color: var(--color-texto);
    background:
        radial-gradient(
            circle at top right,
            rgba(213, 138, 31, 0.12),
            transparent 30rem
        ),
        var(--color-fondo);

    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    line-height: 1.5;
}

.pagina-inicio h1,
.pagina-inicio h2,
.pagina-inicio h3,
.pagina-inicio p {
    margin-top: 0;
}

.pagina-inicio button,
.pagina-inicio a,
.pagina-inicio input,
.pagina-inicio select,
.pagina-inicio textarea {
    outline: none;
}

.pagina-inicio button:focus-visible,
.pagina-inicio a:focus-visible,
.pagina-inicio input:focus-visible,
.pagina-inicio select:focus-visible,
.pagina-inicio textarea:focus-visible {
    outline: 3px solid rgba(168, 63, 32, 0.3);
    outline-offset: 3px;
}


/* =========================================================
   3. ELEMENTOS DE ACCESIBILIDAD
   ========================================================= */

.solo-lectores {
    position: absolute;

    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;

    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
}


/* =========================================================
   4. ENCABEZADO
   ========================================================= */

.encabezado-principal {
    position: sticky;
    top: 0;
    z-index: 50;

    width: 100%;

    color: var(--color-texto-claro);
    background: var(--color-superficie-oscura);
    border-bottom: 3px solid var(--color-acento);
    box-shadow: var(--sombra-pequena);
}

.encabezado-principal__contenido {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    width: min(calc(100% - 40px), var(--ancho-maximo));
    min-height: 76px;
    margin-inline: auto;
}

.marca {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    min-width: 0;
    padding-block: 8px;
}

.marca__icono {
    display: grid;
    flex: 0 0 auto;
    place-items: center;

    width: 44px;
    height: 44px;

    color: var(--color-superficie-oscura);
    background: var(--color-acento);
    border-radius: 12px;
}

.marca__icono svg {
    width: 27px;
    height: 27px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.marca__texto {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.marca__texto strong {
    overflow: hidden;

    color: var(--color-texto-claro);
    font-size: 1rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marca__texto small {
    margin-top: 2px;

    color: #d8cdc3;
    font-size: 0.76rem;
}

.navegacion-principal {
    display: flex;
    align-items: center;
    gap: 18px;
}

.navegacion-principal__enlace {
    position: relative;

    padding: 12px 4px;

    color: #ddd4cc;
    font-size: 0.92rem;
    font-weight: 600;

    transition:
        color var(--transicion),
        background-color var(--transicion);
}

.navegacion-principal__enlace:hover,
.navegacion-principal__enlace--activo {
    color: var(--color-texto-claro);
}

.navegacion-principal__enlace--activo::after {
    content: "";

    position: absolute;
    right: 4px;
    bottom: 4px;
    left: 4px;

    height: 3px;

    background: var(--color-acento);
    border-radius: 999px;
}


/* =========================================================
   5. BOTONES
   ========================================================= */

.boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 43px;
    padding: 10px 17px;

    border: 1px solid transparent;
    border-radius: 10px;

    font-weight: 700;
    line-height: 1.2;
    text-align: center;

    transition:
        color var(--transicion),
        background-color var(--transicion),
        border-color var(--transicion),
        box-shadow var(--transicion),
        transform var(--transicion);
}

.boton:hover {
    transform: translateY(-1px);
}

.boton:active {
    transform: translateY(0);
}

.boton:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.boton svg {
    flex: 0 0 auto;

    width: 19px;
    height: 19px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.boton--principal {
    color: #ffffff;
    background: var(--color-primario);
    border-color: var(--color-primario);
    box-shadow: 0 5px 14px rgba(168, 63, 32, 0.22);
}

.boton--principal:hover {
    background: var(--color-primario-hover);
    border-color: var(--color-primario-hover);
    box-shadow: 0 7px 18px rgba(132, 48, 24, 0.28);
}

.boton--secundario {
    color: var(--color-texto);
    background: var(--color-superficie);
    border-color: var(--color-borde-fuerte);
}

.boton--secundario:hover {
    color: var(--color-primario);
    background: var(--color-primario-suave);
    border-color: var(--color-primario);
}

.boton--peligro {
    color: #ffffff;
    background: var(--color-peligro);
    border-color: var(--color-peligro);
}

.boton--peligro:hover {
    background: var(--color-peligro-hover);
    border-color: var(--color-peligro-hover);
}

.boton--grande {
    min-height: 50px;
    padding: 13px 21px;
    border-radius: 12px;
}

.boton-icono {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;

    width: 40px;
    height: 40px;
    padding: 0;

    color: var(--color-texto-secundario);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;

    transition:
        color var(--transicion),
        background-color var(--transicion),
        border-color var(--transicion),
        transform var(--transicion);
}

.boton-icono:hover {
    color: var(--color-primario);
    background: var(--color-primario-suave);
    border-color: rgba(168, 63, 32, 0.22);
}

.boton-icono:active {
    transform: scale(0.96);
}

.boton-icono svg {
    width: 21px;
    height: 21px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   6. CONTENIDO PRINCIPAL
   ========================================================= */

.contenido-principal {
    flex: 1;

    width: min(calc(100% - 40px), var(--ancho-maximo));
    margin-inline: auto;
    padding-block: 42px 64px;
}


/* =========================================================
   7. PRESENTACIÓN
   ========================================================= */

.presentacion {
    position: relative;

    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    align-items: center;
    gap: 45px;

    min-height: 380px;
    padding: 46px 52px;
    overflow: hidden;

    color: var(--color-texto-claro);
    background:
        linear-gradient(
            130deg,
            #28231f 0%,
            #362c26 62%,
            #49382d 100%
        );

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radio-grande);
    box-shadow: var(--sombra-media);
}

.presentacion::before {
    content: "";

    position: absolute;
    top: -110px;
    right: -100px;

    width: 310px;
    height: 310px;

    background: rgba(213, 138, 31, 0.1);
    border: 1px solid rgba(213, 138, 31, 0.18);
    border-radius: 50%;
}

.presentacion::after {
    content: "";

    position: absolute;
    bottom: -150px;
    left: 35%;

    width: 290px;
    height: 290px;

    background: rgba(168, 63, 32, 0.11);
    border-radius: 50%;
}

.presentacion__informacion,
.presentacion__ilustracion {
    position: relative;
    z-index: 1;
}

.presentacion__informacion {
    max-width: 610px;
}

.presentacion__etiqueta {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 16px;
    padding: 6px 11px;

    color: #ffe0aa;
    background: rgba(213, 138, 31, 0.13);
    border: 1px solid rgba(213, 138, 31, 0.35);
    border-radius: 999px;

    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.presentacion__etiqueta::before {
    content: "";

    width: 7px;
    height: 7px;

    background: var(--color-acento);
    border-radius: 50%;
}

.presentacion h1 {
    max-width: 680px;
    margin-bottom: 17px;

    color: #ffffff;
    font-size: clamp(2rem, 4.4vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.presentacion p {
    max-width: 590px;
    margin-bottom: 28px;

    color: #ddd2c9;
    font-size: 1rem;
    line-height: 1.72;
}

.presentacion__ilustracion {
    display: flex;
    align-items: center;
    justify-content: center;
}

.presentacion__ilustracion svg {
    width: 100%;
    max-width: 520px;
    filter: drop-shadow(0 18px 25px rgba(0, 0, 0, 0.22));
}

.ilustracion__fondo {
    fill: rgba(255, 253, 249, 0.05);
}

.ilustracion__estructura {
    fill: none;
    stroke: #efe3d8;
    stroke-width: 4;
    stroke-linejoin: round;
}

.ilustracion__linea {
    fill: none;
    stroke: rgba(239, 227, 216, 0.28);
    stroke-width: 2;
    stroke-dasharray: 7 7;
}

.ilustracion__objeto {
    stroke-width: 3;
}

.ilustracion__objeto--maquina {
    fill: #a83f20;
    stroke: #f1ab8f;
}

.ilustracion__objeto--tarima {
    fill: #c78322;
    stroke: #f5d18e;
}

.ilustracion__detalle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.72);
    stroke-width: 3;
    stroke-linecap: round;
}


/* =========================================================
   8. TARJETAS DE RESUMEN
   ========================================================= */

.resumen {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;

    width: calc(100% - 52px);
    margin: -30px auto 50px;
}

.resumen__tarjeta {
    display: flex;
    align-items: center;
    gap: 15px;

    min-width: 0;
    min-height: 94px;
    padding: 19px 21px;

    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: var(--radio-medio);
    box-shadow: var(--sombra-media);
}

.resumen__icono {
    display: grid;
    flex: 0 0 auto;
    place-items: center;

    width: 46px;
    height: 46px;

    color: var(--color-primario);
    background: var(--color-primario-suave);
    border-radius: 12px;
}

.resumen__icono svg {
    width: 24px;
    height: 24px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.resumen__tarjeta div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.resumen__tarjeta strong {
    overflow: hidden;

    color: var(--color-texto);
    font-size: 1rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resumen__tarjeta span:last-child {
    margin-top: 3px;

    color: var(--color-texto-secundario);
    font-size: 0.78rem;
}


/* =========================================================
   9. SECCIÓN DE PLANOS
   ========================================================= */

.seccion-planos {
    min-height: 330px;
}

.seccion-planos__encabezado {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;

    margin-bottom: 25px;
}

.seccion-planos__etiqueta {
    display: block;
    margin-bottom: 5px;

    color: var(--color-primario);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.seccion-planos__encabezado h2 {
    margin-bottom: 4px;

    color: var(--color-texto);
    font-size: clamp(1.55rem, 2.5vw, 2.1rem);
    line-height: 1.2;
}

.seccion-planos__encabezado p {
    margin-bottom: 0;
    color: var(--color-texto-secundario);
}

.herramientas-planos {
    display: flex;
    align-items: center;
    gap: 11px;
}

.buscador {
    position: relative;
    display: block;
}

.buscador svg {
    position: absolute;
    top: 50%;
    left: 14px;

    width: 19px;
    height: 19px;

    color: var(--color-texto-secundario);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;

    pointer-events: none;
    transform: translateY(-50%);
}

.buscador input {
    width: min(280px, 34vw);
    min-height: 44px;
    padding: 10px 15px 10px 42px;

    color: var(--color-texto);
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: 10px;

    transition:
        border-color var(--transicion),
        box-shadow var(--transicion),
        background-color var(--transicion);
}

.buscador input::placeholder {
    color: #8c8076;
}

.buscador input:hover {
    border-color: var(--color-borde-fuerte);
}

.buscador input:focus {
    background: #ffffff;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 4px rgba(168, 63, 32, 0.11);
}

.selector-orden select {
    min-height: 44px;
    padding: 10px 37px 10px 13px;

    color: var(--color-texto);
    background-color: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: 10px;

    font-weight: 600;

    transition:
        border-color var(--transicion),
        box-shadow var(--transicion);
}

.selector-orden select:hover {
    border-color: var(--color-borde-fuerte);
}

.selector-orden select:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 4px rgba(168, 63, 32, 0.11);
}


/* =========================================================
   10. CUADRÍCULA Y TARJETAS DE PLANOS
   ========================================================= */

.cuadricula-planos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.tarjeta-plano {
    min-width: 0;
    overflow: hidden;

    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: var(--radio-medio);
    box-shadow: var(--sombra-pequena);

    transition:
        border-color var(--transicion),
        box-shadow var(--transicion),
        transform var(--transicion);
}

.tarjeta-plano:hover {
    border-color: var(--color-borde-fuerte);
    box-shadow: var(--sombra-media);
    transform: translateY(-3px);
}

.tarjeta-plano__vista-previa {
    position: relative;

    height: 185px;
    overflow: hidden;

    background: #e7ddd3;
    border-bottom: 1px solid var(--color-borde);
}

.miniatura-plano {
    width: 100%;
    height: 100%;
}

.miniatura-plano__fondo {
    fill: #eee7df;
}

.miniatura-plano__rejilla {
    opacity: 0.55;
}

.miniatura-plano pattern path {
    fill: none;
    stroke: #c7baad;
    stroke-width: 0.8;
}

.miniatura-plano__hangar {
    fill: rgba(255, 253, 249, 0.66);
    stroke: #493d34;
    stroke-width: 3;
}

.miniatura-plano__maquina {
    fill: #a83f20;
    stroke: #7f2d18;
    stroke-width: 2;
}

.miniatura-plano__tarima {
    fill: #d19436;
    stroke: #8c5709;
    stroke-width: 2;
}

.tarjeta-plano__escala {
    position: absolute;
    right: 11px;
    bottom: 11px;

    padding: 5px 9px;

    color: #ffffff;
    background: rgba(40, 35, 31, 0.88);
    border-radius: 7px;

    font-size: 0.7rem;
    font-weight: 700;
}

.tarjeta-plano__contenido {
    padding: 19px;
}

.tarjeta-plano__titulo {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;

    margin-bottom: 17px;
}

.tarjeta-plano__titulo > div {
    min-width: 0;
}

.tarjeta-plano__titulo h3 {
    overflow: hidden;
    margin-bottom: 4px;

    color: var(--color-texto);
    font-size: 1.08rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tarjeta-plano__descripcion {
    display: -webkit-box;
    min-height: 38px;
    margin-bottom: 0;
    overflow: hidden;

    color: var(--color-texto-secundario);
    font-size: 0.8rem;
    line-height: 1.45;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.tarjeta-plano__datos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;

    margin: 0 0 18px;
    padding: 14px 0;

    border-top: 1px solid var(--color-borde);
    border-bottom: 1px solid var(--color-borde);
}

.tarjeta-plano__datos div {
    min-width: 0;
}

.tarjeta-plano__datos dt {
    margin-bottom: 3px;

    color: var(--color-texto-secundario);
    font-size: 0.7rem;
    font-weight: 600;
}

.tarjeta-plano__datos dd {
    overflow: hidden;
    margin: 0;

    color: var(--color-texto);
    font-size: 0.79rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tarjeta-plano__acciones {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tarjeta-plano__acciones .boton-editar-plano {
    flex: 1;
}

.boton-eliminar-plano:hover {
    color: var(--color-peligro);
    background: var(--color-peligro-suave);
    border-color: rgba(164, 47, 47, 0.22);
}


/* =========================================================
   11. ESTADOS DE CARGA Y LISTAS VACÍAS
   ========================================================= */

.estado-carga {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 240px;

    color: var(--color-texto-secundario);
    font-weight: 600;
}

.estado-carga__indicador {
    width: 24px;
    height: 24px;

    border: 3px solid var(--color-borde);
    border-top-color: var(--color-primario);
    border-radius: 50%;

    animation: girar 800ms linear infinite;
}

.estado-vacio,
.estado-sin-resultados {
    display: flex;
    flex-direction: column;
    align-items: center;

    min-height: 310px;
    padding: 48px 24px;

    text-align: center;
    background: rgba(255, 253, 249, 0.72);
    border: 2px dashed var(--color-borde-fuerte);
    border-radius: var(--radio-grande);
}

.estado-vacio__icono {
    display: grid;
    place-items: center;

    width: 74px;
    height: 74px;
    margin-bottom: 19px;

    color: var(--color-primario);
    background: var(--color-primario-suave);
    border-radius: 22px;
}

.estado-vacio__icono svg {
    width: 39px;
    height: 39px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.estado-vacio h3,
.estado-sin-resultados h3 {
    margin-bottom: 7px;
    font-size: 1.3rem;
}

.estado-vacio p,
.estado-sin-resultados p {
    max-width: 520px;
    margin-bottom: 21px;

    color: var(--color-texto-secundario);
}

.estado-sin-resultados {
    min-height: 230px;
}


/* =========================================================
   12. VENTANAS MODALES
   ========================================================= */

.ventana-modal {
    width: min(calc(100% - 30px), 650px);
    max-height: calc(100vh - 30px);
    padding: 0;
    overflow: hidden;

    color: var(--color-texto);
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: var(--radio-grande);
    box-shadow: var(--sombra-grande);
}

.ventana-modal[open] {
    animation: mostrarModal 220ms ease-out;
}

.ventana-modal::backdrop {
    background: rgba(29, 24, 20, 0.72);
    animation: mostrarFondo 180ms ease-out;
}

.ventana-modal__contenido {
    max-height: calc(100vh - 30px);
    padding: 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ventana-modal__encabezado {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 23px;
}

.ventana-modal__encabezado h2 {
    margin-bottom: 5px;
    font-size: 1.55rem;
    line-height: 1.2;
}

.ventana-modal__encabezado p {
    margin-bottom: 0;

    color: var(--color-texto-secundario);
    font-size: 0.9rem;
}

.ventana-modal__etiqueta {
    display: block;
    margin-bottom: 5px;

    color: var(--color-primario);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ventana-modal--pequena {
    width: min(calc(100% - 30px), 470px);
    text-align: center;
}

.ventana-modal--pequena .ventana-modal__contenido {
    padding: 34px;
}

.ventana-modal--pequena h2 {
    margin-bottom: 9px;
    font-size: 1.45rem;
}

.ventana-modal--pequena p {
    margin-bottom: 25px;
    color: var(--color-texto-secundario);
}

.ventana-modal--pequena p strong {
    color: var(--color-texto);
}

.icono-advertencia {
    display: grid;
    place-items: center;

    width: 66px;
    height: 66px;
    margin: 0 auto 18px;

    color: var(--color-peligro);
    background: var(--color-peligro-suave);
    border-radius: 20px;
}

.icono-advertencia svg {
    width: 36px;
    height: 36px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   13. FORMULARIOS
   ========================================================= */

.formulario__fila {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.campo {
    position: relative;
    margin-bottom: 18px;
}

.campo label {
    display: inline-block;
    margin-bottom: 7px;

    color: var(--color-texto);
    font-size: 0.84rem;
    font-weight: 750;
}

.campo__opcional {
    color: var(--color-texto-secundario);
    font-size: 0.75rem;
    font-weight: 500;
}

.campo input,
.campo select,
.campo textarea {
    display: block;

    width: 100%;
    min-height: 44px;
    padding: 10px 13px;

    color: var(--color-texto);
    background: #ffffff;
    border: 1px solid var(--color-borde-fuerte);
    border-radius: 9px;

    transition:
        border-color var(--transicion),
        box-shadow var(--transicion),
        background-color var(--transicion);
}

.campo textarea {
    min-height: 88px;
    resize: vertical;
}

.campo input::placeholder,
.campo textarea::placeholder {
    color: #94887d;
}

.campo input:hover,
.campo select:hover,
.campo textarea:hover {
    border-color: #948579;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
    background: #ffffff;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 4px rgba(168, 63, 32, 0.11);
}

.campo-medida {
    position: relative;
}

.campo-medida input {
    padding-right: 48px;
}

.unidad-seleccionada {
    position: absolute;
    top: 50%;
    right: 13px;

    color: var(--color-texto-secundario);
    font-size: 0.82rem;
    font-weight: 750;

    pointer-events: none;
    transform: translateY(-50%);
}

.campo__error {
    display: block;
    min-height: 18px;
    margin-top: 5px;

    color: var(--color-peligro);
    font-size: 0.72rem;
    font-weight: 650;
}

.campo--invalido input,
.campo--invalido select,
.campo--invalido textarea {
    border-color: var(--color-peligro);
    box-shadow: 0 0 0 3px rgba(164, 47, 47, 0.1);
}

.campo__contador {
    margin-top: 5px;

    color: var(--color-texto-secundario);
    font-size: 0.7rem;
    text-align: right;
}

.aviso-medidas {
    display: flex;
    align-items: flex-start;
    gap: 11px;

    margin: 1px 0 24px;
    padding: 13px 15px;

    color: var(--color-advertencia);
    background: var(--color-advertencia-suave);
    border: 1px solid rgba(140, 87, 9, 0.2);
    border-radius: 10px;
}

.aviso-medidas svg {
    flex: 0 0 auto;

    width: 20px;
    height: 20px;
    margin-top: 1px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.aviso-medidas p {
    margin: 0;
    font-size: 0.79rem;
    line-height: 1.5;
}

.ventana-modal__acciones {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;

    padding-top: 20px;
    border-top: 1px solid var(--color-borde);
}


/* =========================================================
   14. NOTIFICACIONES
   ========================================================= */

.contenedor-notificaciones {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 100;

    display: flex;
    flex-direction: column;
    gap: 10px;

    width: min(calc(100% - 44px), 390px);

    pointer-events: none;
}

.notificacion {
    display: flex;
    align-items: flex-start;
    gap: 11px;

    width: 100%;
    padding: 14px 16px;

    color: var(--color-texto);
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-left: 5px solid var(--color-primario);
    border-radius: 11px;
    box-shadow: var(--sombra-media);

    pointer-events: auto;
    animation: mostrarNotificacion 240ms ease-out;
}

.notificacion--exito {
    background: var(--color-exito-suave);
    border-left-color: var(--color-exito);
}

.notificacion--error {
    background: var(--color-peligro-suave);
    border-left-color: var(--color-peligro);
}

.notificacion--saliendo {
    animation: ocultarNotificacion 180ms ease-in forwards;
}

.notificacion__icono {
    display: grid;
    flex: 0 0 auto;
    place-items: center;

    width: 25px;
    height: 25px;

    color: var(--color-primario);
}

.notificacion--exito .notificacion__icono {
    color: var(--color-exito);
}

.notificacion--error .notificacion__icono {
    color: var(--color-peligro);
}

.notificacion__icono svg {
    width: 22px;
    height: 22px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notificacion__contenido {
    flex: 1;
    min-width: 0;
}

.notificacion__contenido strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.84rem;
}

.notificacion__contenido p {
    margin: 0;
    font-size: 0.77rem;
}


/* =========================================================
   15. PIE DE PÁGINA
   ========================================================= */

.pie-pagina {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    width: min(calc(100% - 40px), var(--ancho-maximo));
    margin-inline: auto;
    padding-block: 24px;

    color: var(--color-texto-secundario);
    border-top: 1px solid var(--color-borde);

    font-size: 0.76rem;
}

.pie-pagina p {
    margin: 0;
}


/* =========================================================
   16. AVISO CUANDO JAVASCRIPT ESTÁ DESACTIVADO
   ========================================================= */

.aviso-javascript {
    position: fixed;
    right: 20px;
    bottom: 20px;
    left: 20px;
    z-index: 200;

    padding: 15px;

    color: #ffffff;
    background: var(--color-peligro);
    border-radius: 10px;
    box-shadow: var(--sombra-media);

    font-weight: 700;
    text-align: center;
}


/* =========================================================
   17. ANIMACIONES
   ========================================================= */

@keyframes girar {
    to {
        transform: rotate(360deg);
    }
}

@keyframes mostrarModal {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mostrarFondo {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes mostrarNotificacion {
    from {
        opacity: 0;
        transform: translateX(28px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ocultarNotificacion {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(28px);
    }
}


/* =========================================================
   18. DISEÑO RESPONSIVO: TABLET
   ========================================================= */

@media (max-width: 1020px) {
    .presentacion {
        grid-template-columns: minmax(0, 1fr) 330px;
        gap: 25px;
        padding: 40px;
    }

    .resumen {
        width: calc(100% - 32px);
    }

    .cuadricula-planos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .seccion-planos__encabezado {
        align-items: flex-start;
        flex-direction: column;
    }

    .herramientas-planos {
        width: 100%;
    }

    .buscador {
        flex: 1;
    }

    .buscador input {
        width: 100%;
    }
}


/* =========================================================
   19. DISEÑO RESPONSIVO: TABLET PEQUEÑA
   ========================================================= */

@media (max-width: 780px) {
    .encabezado-principal {
        position: relative;
    }

    .encabezado-principal__contenido {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;

        width: min(calc(100% - 30px), var(--ancho-maximo));
        padding-block: 14px;
    }

    .navegacion-principal {
        justify-content: space-between;
        width: 100%;
    }

    .presentacion {
        grid-template-columns: 1fr;
        padding: 38px 32px;
    }

    .presentacion__ilustracion {
        display: none;
    }

    .resumen {
        grid-template-columns: 1fr;
        width: calc(100% - 28px);
        margin-top: -22px;
    }

    .resumen__tarjeta {
        min-height: 78px;
    }

    .contenido-principal {
        width: min(calc(100% - 30px), var(--ancho-maximo));
        padding-top: 28px;
    }

    .pie-pagina {
        width: min(calc(100% - 30px), var(--ancho-maximo));
    }
}


/* =========================================================
   20. DISEÑO RESPONSIVO: TELÉFONO
   ========================================================= */

@media (max-width: 600px) {
    .marca__texto small {
        display: none;
    }

    .navegacion-principal__enlace {
        font-size: 0.84rem;
    }

    .navegacion-principal .boton {
        min-height: 40px;
        padding: 9px 12px;
        font-size: 0.8rem;
    }

    .presentacion {
        min-height: auto;
        padding: 32px 23px;
        border-radius: 17px;
    }

    .presentacion h1 {
        font-size: clamp(2rem, 11vw, 2.7rem);
    }

    .presentacion p {
        font-size: 0.91rem;
    }

    .presentacion .boton {
        width: 100%;
    }

    .resumen {
        gap: 11px;
        width: calc(100% - 18px);
        margin-bottom: 40px;
    }

    .seccion-planos__encabezado {
        margin-bottom: 20px;
    }

    .herramientas-planos {
        align-items: stretch;
        flex-direction: column;
    }

    .selector-orden select {
        width: 100%;
    }

    .cuadricula-planos {
        grid-template-columns: 1fr;
    }

    .tarjeta-plano__vista-previa {
        height: 200px;
    }

    .formulario__fila {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ventana-modal {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 16px;
    }

    .ventana-modal__contenido {
        max-height: calc(100vh - 20px);
        padding: 22px 18px;
    }

    .ventana-modal--pequena .ventana-modal__contenido {
        padding: 28px 20px;
    }

    .ventana-modal__acciones {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .ventana-modal__acciones .boton {
        width: 100%;
    }

    .pie-pagina {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .contenedor-notificaciones {
        right: 12px;
        bottom: 12px;
        width: calc(100% - 24px);
    }
}


/* =========================================================
   21. TELÉFONOS MUY PEQUEÑOS
   ========================================================= */

@media (max-width: 390px) {
    .encabezado-principal__contenido,
    .contenido-principal,
    .pie-pagina {
        width: calc(100% - 22px);
    }

    .marca__icono {
        width: 39px;
        height: 39px;
    }

    .marca__texto strong {
        font-size: 0.9rem;
    }

    .navegacion-principal {
        align-items: stretch;
        flex-direction: column;
    }

    .navegacion-principal__enlace {
        display: none;
    }

    .presentacion {
        padding: 28px 19px;
    }

    .tarjeta-plano__datos {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   22. REDUCCIÓN DE MOVIMIENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}