/* ==========================================================================
   Donkey · Inicio de sesión (mismo estilo que la landing)
   Solo presentación. No depende de Tailwind ni de compilar assets.
   ========================================================================== */
@font-face {
    font-family: "Google Sans";
    src: url("fonts/GoogleSans-VariableFont.woff2") format("woff2");
    font-weight: 400 700; font-display: swap;
}
.dk-login {
    --blue: #0047AB; --blue-hover: #003C91; --blue-bright: #1E6FD9;
    --navy: #102B3C; --navy-deep: #0B1D28; --sky: #5FA8D3; --sky-text: #8EC9EC;
    --pale: #CAE9FF; --frozen: #BEE9E8; --surface: #F5FBFF; --surface-2: #EDF4FF;
    --line: #D6E2EC; --muted: #42525E; --on-dark: #C9DCE8; --danger: #B42318;
    --ease: cubic-bezier(.2, .7, .2, 1);
    position: relative; display: grid; min-height: 100vh; min-height: 100dvh;
    font-family: "Google Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--navy); background: var(--surface);
    -webkit-font-smoothing: antialiased;
}
.dk-login *, .dk-login *::before, .dk-login *::after { box-sizing: border-box; }
.dk-login :focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.dk-login__brand :focus-visible { outline-color: var(--frozen); }
@media (min-width: 900px) { .dk-login { grid-template-columns: minmax(380px, 1fr) minmax(420px, 1fr); } }

/* Logo blanco */
.dk-login .donkey-logo { --logo-ink: #FFFFFF; --logo-accent: #FFFFFF; max-width: none; height: auto; display: block; }

/* ---------- Panel de marca ---------- */
.dk-login__brand {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column; gap: 20px;
    padding: 18px 20px 24px; color: #fff;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 70%);
}
.dk-login__brand::before { /* retícula de patio */
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
    background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%); mask-image: linear-gradient(180deg, #000, transparent 90%);
}
.dk-login__glow { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.dk-login__glow i { position: absolute; border-radius: 50%; filter: blur(70px); animation: dk-drift 18s ease-in-out infinite alternate; }
.dk-login__glow i:nth-child(1) { width: 420px; height: 420px; right: -140px; top: -140px; background: rgba(30, 111, 217, .55); }
.dk-login__glow i:nth-child(2) { width: 340px; height: 340px; left: -120px; bottom: -120px; background: rgba(98, 182, 203, .35); animation-duration: 24s; }
@keyframes dk-drift { to { transform: translate(-30px, 30px) scale(1.12); } }

.dk-login__back {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px 6px 10px;
    color: #fff; font-size: .9rem; font-weight: 500; text-decoration: none;
    border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.06);
    transition: background-color .2s, border-color .2s;
}
.dk-login__back:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); color: #fff; }
.dk-login__logo-link { align-self: flex-start; border-radius: 8px; }
.dk-login__logo { width: 130px; }
.dk-login__pitch, .dk-login__foot { display: none; }

@media (min-width: 900px) {
    .dk-login__brand { padding: 32px clamp(32px, 5vw, 64px) 36px; gap: 0; min-height: 100vh; min-height: 100dvh; position: sticky; top: 0; }
    .dk-login__logo-link { margin-top: auto; }
    .dk-login__logo { width: 170px; }
    .dk-login__pitch { display: block; margin-top: 28px; margin-bottom: auto; max-width: 30rem; }
    .dk-login__foot { display: block; font-size: .85rem; color: #B4C8D6; }
}
.dk-login__eyebrow { margin: 0 0 12px; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sky-text); }
.dk-login__headline { margin: 0; font-size: clamp(1.9rem, 1.2rem + 1.8vw, 2.7rem); line-height: 1.08; letter-spacing: -.02em; font-weight: 700; text-wrap: balance; }
.dk-login__headline span {
    display: block; background: linear-gradient(90deg, #A9D8F2, var(--frozen), #A9D8F2); background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; animation: dk-pan 8s ease-in-out infinite alternate;
}
@keyframes dk-pan { to { background-position: 100% 0; } }
.dk-login__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; }
.dk-login__chips li {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; font-size: .88rem; color: var(--on-dark);
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 999px;
}
.dk-login__chips li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--frozen); }

/* Colores explícitos: el CSS del sistema (app.css) pinta h1–h6 y párrafos en gris */
.dk-login .dk-login__brand h2.dk-login__headline { color: #FFFFFF; }
.dk-login .dk-login__brand .dk-login__eyebrow { color: var(--sky-text); }
.dk-login .dk-login__brand .dk-login__foot { color: #C9DCE8; }
.dk-login .dk-login__brand .dk-login__chips li { color: #E2EDF4; }
.dk-login h1.dk-login__title { color: var(--navy); }
.dk-login .dk-login__subtitle, .dk-login .dk-login__help { color: var(--muted); }
.dk-login .dk-label { color: var(--navy); }

/* ---------- Formulario ---------- */
.dk-login__main { display: grid; place-items: center; padding: 28px 20px 40px; }
.dk-login__card {
    width: 100%; max-width: 420px; padding: 32px 28px;
    background: #fff; border: 1px solid var(--line); border-radius: 20px;
    box-shadow: 0 30px 60px -36px rgba(16, 43, 60, .55);
    animation: dk-rise .6s var(--ease) both;
}
@media (max-width: 899px) { .dk-login__main { margin-top: -18px; align-items: start; } .dk-login__card { position: relative; } }
@keyframes dk-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.dk-login__title { margin: 0; font-size: 1.75rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; color: var(--navy); }
.dk-login__subtitle { margin: 8px 0 24px; color: var(--muted); font-size: .98rem; }

.dk-alert {
    display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 12px 14px;
    color: var(--danger); background: #FEF3F2; border: 1px solid #FECDCA; border-radius: 12px; font-size: .92rem; font-weight: 500;
    animation: dk-shake .45s ease-in-out;
}
.dk-alert svg { flex: none; margin-top: 1px; }
@keyframes dk-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.dk-form { display: grid; gap: 18px; }
.dk-label { display: block; margin-bottom: 8px; font-size: .9rem; font-weight: 600; color: var(--navy); }
.dk-input-wrap { position: relative; }
.dk-input-icon { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: #6B7B87; pointer-events: none; transition: color .2s; }
.dk-input {
    display: block; width: 100%; min-height: 50px; padding: 12px 14px 12px 44px;
    font-family: inherit; font-size: 1rem; font-weight: 400; line-height: 1.3; color: var(--navy);
    background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.dk-input::placeholder { color: #8796A1; }
.dk-input:hover { border-color: #A9C4E6; }
.dk-input:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 71, 171, .14); }
.dk-input-wrap:focus-within .dk-input-icon { color: var(--blue); }
.dk-input--pass { padding-right: 50px; }
.dk-input.is-invalid { border-color: var(--danger); background: #FFFBFA; }
.dk-input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(180, 35, 24, .14); }
.dk-eye {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 42px; height: 42px; padding: 0;
    color: #5B6B77; background: transparent; border: 0; border-radius: 10px; cursor: pointer;
}
.dk-eye:hover { color: var(--blue); background: var(--surface-2); }
.dk-error { margin: 8px 0 0; color: var(--danger); font-size: .88rem; font-weight: 500; }

.dk-submit {
    position: relative; overflow: hidden; margin-top: 6px;
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 12px 20px;
    font-family: inherit; font-size: 1.02rem; font-weight: 600; line-height: 1.2; color: #fff; cursor: pointer;
    background: linear-gradient(135deg, var(--blue), #0A5BC9); border: 0; border-radius: 12px;
    box-shadow: 0 14px 30px -16px rgba(0, 71, 171, .9);
    transition: transform .2s var(--ease), box-shadow .2s, background-color .2s;
}
.dk-submit:hover { background: var(--blue-hover); transform: translateY(-1px); box-shadow: 0 18px 34px -16px rgba(0, 71, 171, 1); }
.dk-submit:active { transform: none; }
.dk-submit:disabled { opacity: .75; cursor: progress; transform: none; }
.dk-submit::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-120%);
    background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%);
    animation: dk-shine 4.5s var(--ease) 1.2s infinite;
}
@keyframes dk-shine { 30%, 100% { transform: translateX(120%); } }
/* Sin "display" aquí: Livewire controla la visibilidad de wire:loading */
.dk-submit__label svg { display: inline-block; vertical-align: -4px; margin-left: 6px; }
.dk-spinner {
    display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px;
    border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
    animation: dk-spin .8s linear infinite;
}
@keyframes dk-spin { to { transform: rotate(360deg); } }

.dk-login__help { margin: 22px 0 0; text-align: center; font-size: .9rem; color: var(--muted); }
.dk-login__help a { color: var(--blue); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
    .dk-login *, .dk-login *::before, .dk-login *::after { animation: none !important; transition-duration: .001ms !important; }
}
