/* Academia CRESA — auth gamer (ligero, sin dependencias) */
@import url('cresa-ui-tokens.css?v=20260521-ui-consistency');

:root {
    --cresa-deep: #0a1628;
    --cresa-panel: rgba(15, 35, 68, 0.92);
    --cresa-blue: #2563eb;
    --cresa-blue-bright: #38bdf8;
    --cresa-gold: var(--cresa-gold-main);
    --cresa-text: #f1f5f9;
    --cresa-muted: #94a3b8;
    --cresa-danger: #fb7185;
    --cresa-success: #4ade80;
    --cresa-radius: 1.15rem;
    --cresa-font-display: "Fredoka", ui-rounded, system-ui, sans-serif;
    --cresa-font-body: "Nunito", ui-sans-serif, system-ui, sans-serif;
}

.cresa-auth-body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--cresa-font-body);
    color: var(--cresa-text);
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(56, 189, 248, 0.35) 0%, transparent 55%),
        radial-gradient(90% 60% at 100% 50%, rgba(37, 99, 235, 0.25) 0%, transparent 50%),
        radial-gradient(70% 50% at 0% 80%, rgba(234, 179, 8, 0.12) 0%, transparent 45%),
        linear-gradient(165deg, #050b14 0%, var(--cresa-deep) 40%, #0f172a 100%);
    -webkit-font-smoothing: antialiased;
}

.cresa-auth-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 2.5rem);
    position: relative;
    overflow-x: hidden;
}

.cresa-auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(250, 204, 21, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(250, 204, 21, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.45;
    z-index: 0;
}

.cresa-auth-glow {
    position: fixed;
    width: min(42rem, 120vw);
    height: min(42rem, 120vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, transparent 68%);
    top: -18%;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
    filter: blur(2px);
}

.cresa-auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 26rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
}

.cresa-auth-brand {
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
}

.cresa-auth-brand__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(4.5rem, 18vw, 5.5rem);
    height: clamp(4.5rem, 18vw, 5.5rem);
    margin: 0 auto 0.65rem;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.95) 0%, rgba(30, 64, 175, 0.98) 100%);
    border: 3px solid rgba(250, 204, 21, 0.88);
    box-shadow:
        0 0 0 1px rgba(14, 165, 233, 0.35),
        0 0 28px rgba(56, 189, 248, 0.35),
        0 10px 0 rgba(15, 23, 42, 0.85),
        0 14px 28px rgba(0, 0, 0, 0.45);
    font-family: var(--cresa-font-display);
    font-size: clamp(1.85rem, 7vw, 2.35rem);
    line-height: 1;
    transform: rotate(-3deg);
}

.cresa-auth-brand__title {
    font-family: var(--cresa-font-display);
    font-weight: 700;
    font-size: clamp(1.45rem, 5vw, 1.85rem);
    letter-spacing: 0.02em;
    margin: 0;
    text-shadow:
        0 0 18px rgba(56, 189, 248, 0.45),
        0 2px 0 rgba(15, 23, 42, 0.9);
}

.cresa-auth-brand__subtitle {
    margin: 0.35rem 0 0;
    font-size: clamp(0.92rem, 3.2vw, 1rem);
    font-weight: 600;
    color: var(--cresa-muted);
}

.cresa-auth-card {
    background: var(--cresa-panel);
    border-radius: var(--cresa-radius);
    border: 2px solid rgba(250, 204, 21, 0.55);
    padding: clamp(1.25rem, 4vw, 1.75rem);
    box-shadow:
        0 0 0 1px rgba(14, 165, 233, 0.2),
        0 0 32px rgba(37, 99, 235, 0.18),
        0 12px 0 rgba(15, 23, 42, 0.55),
        0 18px 36px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.cresa-auth-card__head {
    margin-bottom: 1.1rem;
}

.cresa-auth-card__title {
    font-family: var(--cresa-font-display);
    font-weight: 700;
    font-size: 1.35rem;
    margin: 0;
    color: #fef9c3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.cresa-auth-card__hint {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--cresa-muted);
    font-weight: 600;
}

.cresa-auth-field {
    margin-bottom: 1rem;
}

.cresa-auth-field:last-of-type {
    margin-bottom: 0;
}

.cresa-auth-label {
    display: block;
    font-family: var(--cresa-font-display);
    font-size: 0.88rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.cresa-auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.95rem;
    border-radius: 0.75rem;
    border: 2px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.65);
    color: var(--cresa-text);
    font-family: var(--cresa-font-body);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.cresa-auth-input::placeholder {
    color: rgba(148, 163, 184, 0.65);
    font-weight: 500;
}

.cresa-auth-input:hover {
    border-color: rgba(56, 189, 248, 0.45);
}

.cresa-auth-input:focus {
    border-color: rgba(250, 204, 21, 0.85);
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.35),
        0 0 20px rgba(56, 189, 248, 0.25);
    background: rgba(15, 23, 42, 0.85);
}

.cresa-auth-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-top: 1rem;
    justify-content: space-between;
}

.cresa-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cresa-muted);
    user-select: none;
}

.cresa-auth-check input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--cresa-blue);
    border-radius: 0.25rem;
}

.cresa-auth-link {
    color: var(--cresa-blue-bright);
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.cresa-auth-link:hover {
    border-bottom-color: rgba(250, 204, 21, 0.75);
    color: #fef08a;
}

.cresa-auth-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

@media (max-width: 520px) {
    .cresa-auth-actions--split {
        flex-direction: column;
        align-items: stretch;
    }

    .cresa-auth-actions--split .cresa-auth-link {
        text-align: center;
        order: 2;
    }

    .cresa-auth-actions--split .cresa-auth-btn {
        order: 1;
        width: 100%;
    }
}

.cresa-auth-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    font-family: var(--cresa-font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    padding: 0.85rem 1.5rem;
    border-radius: 9999px;
    color: #0f172a;
    background: var(--cresa-gold-gradient);
    border: 3px solid rgba(202, 138, 4, 0.85);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.55),
        0 5px 0 var(--cresa-gold-dark),
        0 10px 22px var(--cresa-gold-glow-soft);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    transition:
        transform 0.08s ease,
        filter 0.12s ease;
}

.cresa-auth-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.58),
        0 6px 0 var(--cresa-gold-dark),
        0 12px 24px var(--cresa-gold-glow-soft);
}

.cresa-auth-btn:active {
    transform: translateY(2px);
    opacity: 0.94;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.45),
        0 2px 0 var(--cresa-gold-dark),
        0 6px 14px var(--cresa-gold-glow-soft);
}

.cresa-auth-btn--wide {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.cresa-auth-foot {
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--cresa-muted);
}

.cresa-auth-foot a {
    color: var(--cresa-blue-bright);
    font-weight: 800;
}

.cresa-auth-errors {
    margin-top: 0.35rem;
    padding-left: 1.1rem;
    color: var(--cresa-danger);
    font-size: 0.85rem;
    font-weight: 700;
}

.cresa-auth-status {
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.65rem;
    background: rgba(22, 163, 74, 0.18);
    border: 1px solid rgba(74, 222, 128, 0.45);
    color: var(--cresa-success);
    font-size: 0.9rem;
    font-weight: 700;
}

/* Vistas Breeze heredadas (forgot password, etc.) sobre tarjeta oscura */
.cresa-auth-card .text-gray-600,
.cresa-auth-card .text-gray-700,
.cresa-auth-card .dark\:text-gray-400,
.cresa-auth-card .dark\:text-gray-300 {
    color: var(--cresa-muted) !important;
}

.cresa-auth-card .text-gray-800,
.cresa-auth-card .dark\:text-gray-200 {
    color: #e2e8f0 !important;
}

@media (min-width: 768px) {
    .cresa-auth-card {
        padding: 1.85rem 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cresa-auth-btn:hover,
    .cresa-auth-btn:active {
        transform: none;
    }
}
