/* ===========================================================================
   TEMA 3 — acabado actual del sistema (adoptado el 2026-09-29), capa sobre tema2.css
   ---------------------------------------------------------------------------
   Toma lo aprendido del DESIGN.md (estilo editorial «Monad») sin cambiar la
   identidad del sistema:

     · lienzo cálido tipo pergamino en lugar del gris verdoso;
     · títulos en SERIF de peso normal (nunca negrita) — el serif «anuncia»;
     · etiquetas, insignias y encabezados de tabla en MONOESPACIADO pequeño en
       mayúsculas — el mono «instruye»;
     · botones, insignias y etiquetas en forma de PÍLDORA;
     · bordes finos (1 px) y sombras casi nulas en vez de sombras pesadas;
     · radios generosos en tarjetas;
     · manchas de color difuminadas y en movimiento lento como atmósfera.

   Se CONSERVAN los colores: el verde de la marca sigue siendo el color de
   acción, y los encabezados de color por área siguen igual. Los pasteles del
   diseño (menta, oro, cielo) sólo aparecen como decoración de fondo, nunca en
   un control.

   Pantallas nuevas: usar lo que ya está aquí (títulos serif 400, etiquetas
   mono, píldoras, bordes finos) en vez de estilos propios. Todo el movimiento
   respeta prefers-reduced-motion.
   =========================================================================== */

:root {
    --t3-lienzo: #f5f3ee;          /* pergamino, apenas cálido */
    --t3-hilo: #dcd8d0;            /* borde fino (Ash del diseño, más claro) */
    --t3-hilo-fuerte: #c9c4ba;
    --t3-tinta: #1f2a22;           /* texto principal, casi negro verdoso */
    --t3-grafito: #4e4d4d;
    --t3-humo: #7a7874;
    --t3-verde: #0d6e1f;           /* acción: el verde de siempre */
    --t3-verde-vivo: #1d8a32;
    --t3-menta: #a7e8c4;           /* decorativos: sólo atmósfera */
    --t3-oro: #ecda98;
    --t3-cielo: #b8d4ee;
    --t3-radio: 1.1rem;
    --t3-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, Cambria, "Times New Roman", serif;
    --t3-mono: "Cascadia Mono", "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* ── Lienzo y atmósfera ──────────────────────────────────────────────────── */
body {
    background-color: var(--t3-lienzo) !important;
    background-image: none !important;
    color: var(--t3-tinta);
}

/* Dos manchas difuminadas (menta y oro/cielo) que derivan despacio detrás del
   contenido. Fijas, sin captar clics, muy tenues: se sienten, no se leen. */
body::before, body::after {
    content: ""; position: fixed; z-index: -1; pointer-events: none;
    width: 46vw; height: 46vw; border-radius: 50%; filter: blur(80px); opacity: .38;
}
body::before {
    background: radial-gradient(circle at 40% 40%, var(--t3-menta), transparent 65%);
    top: -14vw; right: -10vw;
    animation: t3-deriva-a 38s ease-in-out infinite alternate;
}
body::after {
    background: radial-gradient(circle at 60% 60%, var(--t3-oro), var(--t3-cielo) 45%, transparent 70%);
    bottom: -18vw; left: -12vw; opacity: .28;
    animation: t3-deriva-b 46s ease-in-out infinite alternate;
}
@keyframes t3-deriva-a { to { transform: translate(-8vw, 10vh) scale(1.12); } }
@keyframes t3-deriva-b { to { transform: translate(10vw, -8vh) scale(1.08); } }

/* ── Tipografía: el serif anuncia, el mono instruye ──────────────────────── */
h1, h2, .h1, .h2, .display-6, .modal-title {
    font-family: var(--t3-serif);
    font-weight: 400 !important;
    letter-spacing: -.02em;
}
h2 { font-size: 1.75rem; }
h1 strong, h2 strong { font-weight: 500; }

.badge, .dropdown-header, .table > thead th, .form-label,
.card-header small, .text-uppercase {
    font-family: var(--t3-mono);
    letter-spacing: -.01em;
}
.table > thead th, .dropdown-header {
    text-transform: uppercase; font-size: .7rem; font-weight: 500; color: var(--t3-humo);
}
.form-label { font-size: .78rem; font-weight: 500; color: var(--t3-grafito); text-transform: uppercase; }

/* ── Tarjetas: borde fino, radio generoso, casi sin sombra ────────────────── */
.card {
    border: 1px solid var(--t3-hilo) !important;
    border-radius: var(--t3-radio);
    box-shadow: 0 1px 0 rgba(31, 42, 34, .03);
    background-color: rgba(255, 255, 255, .78);
    backdrop-filter: blur(6px);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(31, 42, 34, .07); }
.card-header { border-bottom: 1px solid var(--t3-hilo); }
.card-header:first-child { border-radius: calc(var(--t3-radio) - 1px) calc(var(--t3-radio) - 1px) 0 0; }
/* Las tarjetas de cifra dentro de otra tarjeta: sin vidrio doble. */
.card .card { background-color: rgba(255, 255, 255, .55); border-color: transparent !important; }
.card .card.bg-light { background-color: rgba(245, 243, 238, .9) !important; }

/* ── Píldoras: botones, insignias, etiquetas ─────────────────────────────── */
.btn { border-radius: 100px; padding-left: 1.1rem; padding-right: 1.1rem; }
.btn-sm { padding-left: .8rem; padding-right: .8rem; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-success { box-shadow: 0 1px 0 rgba(8, 60, 20, .2); }
.btn-success:hover { box-shadow: 0 6px 16px rgba(13, 110, 31, .25); }
.btn-outline-secondary, .btn-outline-primary, .btn-outline-success, .btn-outline-danger, .btn-outline-dark {
    border-width: 1px; background: rgba(255, 255, 255, .5);
}
.btn-group > .btn { border-radius: 0; }
.btn-group > .btn:first-child { border-top-left-radius: 100px; border-bottom-left-radius: 100px; }
.btn-group > .btn:last-child { border-top-right-radius: 100px; border-bottom-right-radius: 100px; }
.badge { border-radius: 100px; font-weight: 500; padding: .38em .75em; }

/* ── Controles de formulario ─────────────────────────────────────────────── */
.form-control, .form-select {
    border-color: var(--t3-hilo-fuerte); border-radius: .75rem; background-color: rgba(255, 255, 255, .85);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--t3-verde-vivo);
    box-shadow: 0 0 0 .22rem rgba(167, 232, 196, .55);
}
.input-group > .form-control, .input-group > .input-group-text, .input-group > .btn { border-radius: 0; }
.input-group > :first-child { border-top-left-radius: .75rem !important; border-bottom-left-radius: .75rem !important; }
.input-group > :last-child { border-top-right-radius: .75rem !important; border-bottom-right-radius: .75rem !important; }

/* ── Tablas: filas aireadas y separadores finos ──────────────────────────── */
.table { --bs-table-bg: transparent; }
.table > :not(caption) > * > * { border-bottom-color: var(--t3-hilo); }
.table-hover > tbody > tr { transition: background-color .12s ease; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: rgba(167, 232, 196, .18); }

/* ── Menús desplegables: aparecen con un deslizamiento corto ─────────────── */
.dropdown-menu {
    border: 1px solid var(--t3-hilo); border-radius: 1rem;
    box-shadow: 0 12px 32px rgba(31, 42, 34, .12);
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
}
.dropdown-menu.show { animation: t3-despliega .16s ease-out; }
@keyframes t3-despliega { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.dropdown-item { border-radius: .6rem; }
.dropdown-item:hover, .dropdown-item:focus { background: rgba(167, 232, 196, .32); color: var(--t3-verde); }

/* ── Alertas: franja fina y fondo translúcido ────────────────────────────── */
.alert { border-radius: 1rem; border-width: 1px; backdrop-filter: blur(4px); }

/* ── Barra superior: destello de luz que la recorre despacio ─────────────── */
.navbar-empresa-bar { position: relative; }
.navbar-empresa-bar::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .10) 50%, transparent 60%);
    background-size: 250% 100%; background-position: 130% 0;
    animation: t3-destello 11s ease-in-out infinite;
}
.navbar-empresa-bar > .container-fluid { position: relative; z-index: 1; }
@keyframes t3-destello { 0%, 55% { background-position: 130% 0; } 100% { background-position: -30% 0; } }

/* Logo de la marca: un «respiro» leve al pasar el cursor. */
.navbar-brand img { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.navbar-brand:hover img { transform: rotate(-6deg) scale(1.12); }

/* ── Banner de inicio: la planta se desplaza despacio (efecto Ken Burns) ─── */
.t3-banner {
    border-radius: 1.4rem !important;
    background-size: auto, 115% auto !important;
    animation: t3-paneo 40s ease-in-out infinite alternate;
    position: relative; overflow: hidden;
}
@keyframes t3-paneo { from { background-position: 0 0, 0% 40%; } to { background-position: 0 0, 100% 40%; } }
.t3-banner h1 { font-size: 2.6rem; }

/* ── Revelado: las tarjetas entran con un deslizamiento corto (tema3.js) ─── */
.t3-revelar { opacity: 0; transform: translateY(10px); }
.t3-revelado { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .2, 1); }

/* ── Calendario: días que responden al cursor ────────────────────────────── */
.cal-mini { border-color: var(--t3-hilo) !important; border-radius: .9rem; background: rgba(255, 255, 255, .55); }
.cal-mini-dia { transition: transform .12s ease; }
.cal-mini-dia:hover { transform: scale(1.35); position: relative; z-index: 2; }
.cal-avance-barra { border-radius: 100px; }
.cal-avance-seg { transition: flex-grow .9s cubic-bezier(.2, .8, .2, 1); }

/* ── Inicio de sesión ────────────────────────────────────────────────────── */
.login-titulo { font-family: var(--t3-serif); font-weight: 400 !important; font-size: 3.1rem; }
.login-bienvenida { font-family: var(--t3-serif); font-weight: 400 !important; font-size: 2.1rem; }
.login-pilares li { font-family: var(--t3-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; }
.login-formulario { background: var(--t3-lienzo); }
.login-portada { position: relative; overflow: hidden; }
/* Burbujas de luz que suben despacio sobre la planta. */
.login-portada::before, .login-portada::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(40px);
}
.login-portada::before { width: 22rem; height: 22rem; background: rgba(167, 232, 196, .35); left: -6rem; bottom: -8rem; animation: t3-flota 18s ease-in-out infinite alternate; }
.login-portada::after  { width: 16rem; height: 16rem; background: rgba(236, 218, 152, .28); right: -4rem; top: -5rem; animation: t3-flota 22s ease-in-out infinite alternate-reverse; }
.login-portada > * { position: relative; z-index: 1; }
@keyframes t3-flota { to { transform: translate(3rem, -3rem) scale(1.15); } }
.login-logo { animation: t3-aparece .9s cubic-bezier(.3, 1.4, .5, 1) both .15s; }
@keyframes t3-aparece { from { opacity: 0; transform: scale(.7) rotate(-10deg); } }

@media (prefers-reduced-motion: reduce) {
    body::before, body::after, .navbar-empresa-bar::after, .t3-banner,
    .login-portada::before, .login-portada::after, .login-logo { animation: none !important; }
    .t3-revelar { opacity: 1; transform: none; }
    .card:hover, .btn:hover, .cal-mini-dia:hover { transform: none; }
}
