:root {
    --petroleo: #10303f;
    --petroleo-claro: #17485c;
    --ambar: #e8a33d;
    --ambar-oscuro: #cf8a22;
    --tinta: #16212a;
    --gris: #5d6b76;
    --linea: #d5dde3;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    color: var(--tinta);
    background: linear-gradient(160deg, var(--petroleo), var(--petroleo-claro));
    background-attachment: fixed;
}

.pagina {
    min-height: 100vh;
    display: flex;
}

/* ---------- Zona central ---------- */
.panel {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.tarjeta {
    width: 100%;
    max-width: 440px;
    padding: 34px;
    background: #fff;
    border: 1px solid var(--linea);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
}

    .tarjeta.ancha {
        max-width: 640px;
    }

    .tarjeta.centro {
        text-align: center;
    }

    .tarjeta h2 {
        margin: 0 0 4px;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 1.7rem;
    }

.subtitulo {
    margin: 0 0 8px;
    color: var(--gris);
}

/* ---------- Cajas del formulario ---------- */
.caja {
    margin-top: 20px;
    padding: 20px;
    background: #f6f9fa;
    border: 1px solid var(--linea);
    border-radius: 12px;
}

    .caja h3 {
        margin: 0 0 4px;
        padding-left: 10px;
        font-size: 1rem;
        border-left: 4px solid var(--ambar);
    }

label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 600;
    font-size: 0.88rem;
}

input, select {
    width: 100%;
    padding: 11px 12px;
    font: inherit;
    color: inherit;
    background: #fff;
    border: 1px solid #aebac3;
    border-radius: 8px;
}

    input:focus, select:focus {
        outline: 3px solid rgba(232, 163, 61, 0.45);
        border-color: var(--ambar-oscuro);
    }

.ayuda {
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--gris);
}

.fila {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ---------- Botones ---------- */
.boton {
    width: 100%;
    margin-top: 24px;
    padding: 13px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-weight: 700;
    color: var(--petroleo);
    background: var(--ambar);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(207, 138, 34, 0.35);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

    .boton:hover {
        background: var(--ambar-oscuro);
        transform: translateY(-1px);
    }

    .boton:active {
        transform: translateY(0);
    }

    .boton:focus-visible {
        outline: 3px solid rgba(23, 72, 92, 0.5);
        outline-offset: 2px;
    }

    .boton.grande {
        margin-top: 26px;
        padding: 16px 22px;
        font-size: 1.1rem;
    }

    .boton.secundario {
        color: var(--petroleo-claro);
        background: #fff;
        border: 2px solid var(--petroleo-claro);
        box-shadow: none;
    }

        .boton.secundario:hover {
            background: #e9f1f4;
        }

.acciones {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 12px;
}

.icono-grande {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    color: var(--petroleo);
    background: #fbeacb;
    border-radius: 50%;
}

/* ---------- Mensajes ---------- */
.mensaje {
    margin: 16px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
    text-align: left;
}

    .mensaje.ok {
        background: #e1f2e8;
        color: #176238;
    }

    .mensaje.error {
        background: #fbe6e3;
        color: #8c2a1c;
    }

[hidden] {
    display: none !important;
}
/* =====================================================================
   Componentes adicionales (mismo estilo: petróleo + ámbar)
   ===================================================================== */
.pagina { flex-direction: column; }
.panel { flex: 1; }
.contenido { width: 100%; max-width: 1100px; margin: 0 auto; padding: 28px 16px 48px; }

a { color: var(--petroleo-claro); font-weight: 600; }
a.boton { text-decoration: none; }

/* ---------- Barra superior ---------- */
.barra {
    display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
    padding: 12px 28px;
    background: rgba(8, 30, 41, 0.9);
    border-bottom: 3px solid var(--ambar);
}
    .barra a { color: #fff; text-decoration: none; }
    .barra a:hover { color: var(--ambar); }
    .barra .marca { font-family: Georgia, "Times New Roman", serif; font-size: 1.4rem; font-weight: 700; color: var(--ambar); }
.menu { display: flex; gap: 20px; flex: 1; }
.usuario { display: flex; gap: 14px; align-items: center; color: #dfe9ee; font-size: 0.9rem; }

/* ---------- Títulos sobre el fondo ---------- */
.titulo-pagina { margin: 0 0 18px; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
.enlace-volver { display: inline-block; margin-bottom: 14px; color: #fff; text-decoration: none; }
    .enlace-volver:hover { color: var(--ambar); }

/* ---------- Tarjetas ---------- */
.tarjeta.completa { max-width: 100%; margin-bottom: 20px; }
.tarjeta.ancha .caja:first-of-type { margin-top: 18px; }
.centrado { text-align: center; margin-top: 18px; }
.encabezado-tarjeta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
    .encabezado-tarjeta h2 { margin: 0; }

/* ---------- Botones ---------- */
.boton.chico { width: auto; margin-top: 0; padding: 8px 14px; font-size: 0.9rem; }
.boton-enlace { padding: 0; font: inherit; font-weight: 600; color: var(--petroleo-claro); background: none; border: 0; text-decoration: underline; cursor: pointer; }
    .boton-enlace:hover { color: var(--ambar-oscuro); }
    .boton-enlace.claro { color: #fff; }
    .boton-enlace.claro:hover { color: var(--ambar); }
    .boton-enlace.peligro { color: #a4301f; }
.pila { display: grid; gap: 12px; margin-top: 24px; }
    .pila .boton { margin-top: 0; }

/* ---------- Catálogo ---------- */
.productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.producto {
    display: flex; flex-direction: column; gap: 6px; padding: 18px;
    background: #fff; border: 1px solid var(--linea); border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
    .producto h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; }
    .producto .ayuda { margin: 0; }
    .producto .precio { margin: 4px 0; font-size: 1.35rem; font-weight: 700; color: var(--ambar-oscuro); }
    .producto .agregar { display: flex; gap: 8px; margin-top: auto; }
        .producto .agregar input { width: 80px; }
.paginador { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 22px 0; color: #fff; }

/* ---------- Tablas ---------- */
.tabla-wrap { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
    .tabla th {
        padding: 10px; text-align: left; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase;
        color: var(--gris); background: #eef3f5; border-bottom: 2px solid var(--linea);
    }
    .tabla td { padding: 10px; border-bottom: 1px solid var(--linea); vertical-align: top; }
    .tabla tr:last-child td { border-bottom: 0; }
.estado { display: inline-block; padding: 2px 10px; font-size: 0.8rem; font-weight: 600; border-radius: 999px; }
    .estado.ok { color: #176238; background: #e1f2e8; }
    .estado.baja { color: #8c2a1c; background: #fbe6e3; }
    .estado.pend { color: #8a5a10; background: #fbeacb; }
.vacio { margin: 8px 0; color: var(--gris); }
.herramientas { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
    .herramientas label { display: flex; align-items: center; gap: 8px; margin: 0; }
    .herramientas input { width: auto; }

/* ---------- Mensajes dentro de la página ---------- */
main > .mensaje { max-width: 100%; margin: 0 0 16px; }

/* ---------- Verificación CAPTCHA del inicio de sesión ---------- */
.captcha { margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--linea); border-radius: 10px; }
.captcha legend { padding: 0 6px; font-weight: 700; color: var(--petroleo-claro); }
.captcha p { margin: 4px 0 8px; }
.captcha label { margin-top: 8px; }
.captcha .boton-enlace { margin-top: 8px; }


.captcha { margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--linea); border-radius: 10px; }
.captcha-titulo { margin: 0 0 10px; font-weight: 700; color: var(--petroleo-claro); }
#turnstile-widget { min-height: 65px; }
