/* ═══════════════════════════════════════════════════════════════
   JJ AUTOS — Admin UI Override
   Paleta: Negro #000 · Plata #94A3B8 · Carbono #0a0a0a
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* ── Variables de marca ──────────────────────────────────────── */
:root {
    --gold:       #94A3B8;
    --gold-light: #E2E8F0;
    --gold-dark:  #64748B;
    --black:      #000000;
    --carbon:     #0a0a0a;
    --surface:    #111111;
    --surface-2:  #181818;
    --border:     rgba(148, 163, 184, 0.15);
    --border-dim: rgba(255, 255, 255, 0.06);
    --text-dim:   #888888;
    --font-sans:  'Montserrat', sans-serif;
    --font-serif: 'Cinzel', serif;
}

/* ── Animaciones ────────────────────────────────────────────── */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes goldPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(148, 163, 184, 0); }
    50%       { box-shadow: 0 0 0 6px rgba(148, 163, 184, 0.08); }
}
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

/* ══════════════════════════════════════════════════════════════
   PANEL ADMIN COMPLETO (fondo global dark)
   ══════════════════════════════════════════════════════════════ */
body {
    font-family: var(--font-sans) !important;
}

/* Scrollbar dorada */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ══════════════════════════════════════════════════════════════
   LOGIN PAGE — WHITE & CENTERED THEME
   ══════════════════════════════════════════════════════════════ */

/* Fondo claro y limpio */
.login {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #111111;
}

.login #page { background: transparent; }

/* Contenedor central (Unfold lo centra por defecto ahora que no hay imagen) */
.login #page > div:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    min-height: 100vh;
}

/* Tarjeta de login principal */
.login .jj-login-card {
    animation: fadeSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
    color: #111111;
    overflow: hidden;
    padding: 3rem 2.5rem;
    position: relative;
    width: 100%;
}

.login .jj-login-brand,
.login .jj-login-form,
.login .jj-login-footer {
    position: relative;
    z-index: 1;
}

/* Marca / Logo centrado */
.login .jj-login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.login .jj-login-logo-wrap {
    align-items: center;
    background: transparent;
    display: flex;
    justify-content: center;
    padding: 0;
    width: 120px;
    transition: transform 0.3s ease;
}

.login .jj-login-logo-wrap:hover {
    transform: scale(1.05);
}

.login .jj-login-logo {
    display: block;
    max-height: 60px;
    width: auto;
}

.login .jj-login-kicker {
    color: var(--gold-dark);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
}

.login .jj-login-copy h1 {
    color: #000000;
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin: 0;
}

.login .jj-login-copy p:last-child {
    color: #666666;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0.5rem 0 0;
}

/* Separador */
.login .jj-login-brand + .flex,
.login .jj-login-brand + form {
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 1.5rem;
}

/* Formulario */
.login #login-form { display: grid; gap: 1.25rem; }

.login label {
    color: #444444;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    background: #fdfdfd !important;
    border: 1.5px solid rgba(0,0,0,0.15) !important;
    border-radius: 12px !important;
    color: #000000;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    min-height: 52px;
    transition: all 0.25s ease;
}

.login input[type="text"]:hover,
.login input[type="password"]:hover,
.login input[type="email"]:hover {
    border-color: rgba(148,163,184,0.5);
    background: #ffffff;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    background: #ffffff;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(148,163,184,0.15);
    outline: none;
}

/* Placeholder */
.login input::placeholder { color: #aaaaaa; }

/* Botón submit */
.login #login-form button[type="submit"] {
    background: var(--carbon);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    color: #ffffff;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    min-height: 54px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.login #login-form button[type="submit"]:hover {
    background: #000000;
    box-shadow: 0 12px 25px rgba(0,0,0,0.3);
    transform: translateY(-2px);
    color: var(--gold);
}

.login #login-form button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Toggle password */
.login .jj-password-field { position: relative; }
.login .jj-toggle-pw {
    align-items: center;
    background: transparent;
    border: 0;
    color: #888888;
    cursor: pointer;
    display: flex;
    justify-content: center;
    padding: 0 14px;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    margin: auto;
    transition: color 0.2s;
    z-index: 10;
}
.login .jj-toggle-pw:hover { color: var(--gold-dark); }
.login .jj-toggle-pw .material-symbols-outlined { font-size: 20px; }
.login .jj-password-field > div,
.login .jj-password-field > fieldset { position: relative; }
.login .jj-password-field input[type="password"],
.login .jj-password-field input[type="text"] { padding-right: 48px !important; }

/* Footer */
.login .jj-login-footer {
    border-top: 1px solid rgba(0,0,0,0.08);
    color: #777777;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    margin-top: 2rem;
    padding-top: 1.25rem;
    text-transform: uppercase;
    text-align: center;
}

/* Link volver al site (posicionado arriba a la izquierda por defecto) */
.login .absolute.flex.flex-row.items-center.justify-between.left-0.m-4.right-0.top-0 a {
    color: #555555;
    font-weight: 600;
    transition: color 0.2s;
}
.login .absolute.flex.flex-row.items-center.justify-between.left-0.m-4.right-0.top-0 a:hover {
    color: #000000;
}

/* ── Responsive Login ──────────────────────────────────────── */
@media (max-width: 600px) {
    .login #page > div:first-child {
        padding: 1.5rem;
    }
    .login .jj-login-card {
        padding: 2.5rem 1.5rem;
        border-radius: 20px;
    }
    .login .jj-login-copy h1 { font-size: 1.35rem; }
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL ADMIN PANEL (DARK MODE TWEAKS)
   ══════════════════════════════════════════════════════════════ */

/* Convertir el logo negro a blanco puro en el sidebar oscuro del panel y hacerlo MUCHO más grande */
body:not(.login) img[src*="logo.png"] {
    filter: brightness(0) invert(1);
    opacity: 0.95;
    transform: scale(2.2); /* Forzamos a que sea más del doble de grande */
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
    margin-left: 10px; /* Separar un poco del borde para que respire al crecer */
}

body:not(.login) img[src*="logo.png"]:hover {
    transform: scale(2.4); /* Crece aún más al pasar el mouse */
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(148, 163, 184, 0.6)); /* Brillo plata */
}

/* ══════════════════════════════════════════════════════════════
   INTERACTIVIDAD Y DINAMISMO (HOVERS Y TRANSICIONES)
   ══════════════════════════════════════════════════════════════ */

/* Efecto hover en los enlaces del menú lateral (Sidebar) */
#nav-sidebar a {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 12px !important;
}
#nav-sidebar a:hover {
    transform: translateX(8px); /* Desliza suavemente a la derecha */
    color: var(--gold) !important;
    background: rgba(148, 163, 184, 0.08) !important;
    box-shadow: inset 4px 0 0 var(--gold); /* Usamos inset para no romper el border-radius */
}

/* Tarjetas del Dashboard y Formularios (Glassmorphism sutil) */
.bg-base-900, .bg-white, fieldset {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease !important;
    border: 1px solid rgba(255,255,255,0.03);
}
.bg-base-900:hover, fieldset:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), 0 0 20px rgba(148, 163, 184, 0.04) !important;
    border-color: rgba(148,163,184,0.1);
}

/* Resaltado interactivo de filas en las tablas de la base de datos */
tbody tr {
    transition: background-color 0.25s ease, transform 0.25s ease !important;
}
tbody tr:hover {
    background-color: rgba(148, 163, 184, 0.05) !important;
    transform: scale(1.01); /* Se expande ligerísimamente */
    z-index: 10;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    border-radius: 10px;
}

/* Animación de pulso para los botones principales */
input[type="submit"], .bg-primary-600 {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
    border-radius: 10px !important;
}
input[type="submit"]:hover, .bg-primary-600:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 12px 30px rgba(148, 163, 184, 0.3) !important;
    filter: brightness(1.15);
}

/* Inputs de formularios interactivos con efecto de profundidad */
input[type="text"], input[type="email"], input[type="number"], input[type="password"], select, textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: rgba(255, 255, 255, 0.03) !important; /* Ligeramente más claro que el fondo oscuro */
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5); /* Sombra interior para hundimiento */
}
input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 8px 20px rgba(148, 163, 184, 0.15), inset 0 2px 4px rgba(0,0,0,0.2) !important;
    border-color: var(--gold) !important;
}

/* Fix para el ícono de ver contraseña (eye icon) en Unfold */
.relative > button.absolute {
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 12px !important;
    margin: 0 !important;
    box-shadow: none !important;
}
.relative > button.absolute:hover {
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Iconos y pequeñas insignias interactivos */
.material-symbols-outlined {
    transition: transform 0.3s ease, color 0.3s ease;
}
a:hover .material-symbols-outlined {
    transform: scale(1.15);
    color: var(--gold);
}


