/* Paginas de autenticacion  inspirado en plantilla Dusty */

:root {
    --auth-primary: #7168ee;
    --auth-primary-dark: #5f56e8;
    --auth-ink: #2f384f;
    --auth-muted: #949ea9;
    --auth-border: #e8edf3;
    --auth-card-bg: #ffffff;
    --auth-page-bg: #f6f8fb;
    --auth-accent-side: #efcbab;
}

.auth-page-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Public Sans", system-ui, -apple-system, sans-serif;
    font-size: 0.9rem;
    color: var(--auth-ink);
    background: var(--auth-page-bg);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-page-grid {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    min-height: 100vh;
}

.auth-page-form-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.auth-card {
    width: min(100%, 420px);
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    padding: 32px 28px 28px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.auth-brand-logo {
    max-height: 40px;
    max-width: 220px;
    object-fit: contain;
}

.auth-brand-logo--kdd {
    max-height: 52px;
    max-width: min(100%, 300px);
    width: auto;
    height: auto;
}

.auth-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--auth-primary);
}

.auth-card h1 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--auth-ink);
}

.auth-card .auth-subtitle {
    margin: 0 0 24px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.auth-flash {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.875rem;
}

.auth-flash.notice {
    background: #edf7f3;
    border: 1px solid #b9ded2;
    color: #1a5c4a;
}

.auth-flash.error {
    background: #fff1f1;
    border: 1px solid #f5c4c4;
    color: #8b1e1e;
}

.auth-form label {
    display: block;
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--auth-ink);
}

.auth-form input[type="email"],
.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    font: inherit;
    color: var(--auth-ink);
    background: #fff;
    box-sizing: border-box;
    min-height: 44px;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(113, 104, 238, 0.15);
}

.auth-form .password-field {
    margin-top: 6px;
}

.auth-form .password-field input {
    margin-top: 0;
    width: 100%;
}

.auth-verify-notes {
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f6f7fb;
    border: 1px solid var(--auth-border);
}

.auth-verify-notes p {
    margin: 0 0 10px;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--auth-muted);
}

.auth-verify-notes p:last-child {
    margin-bottom: 0;
}

.auth-form-forgot {
    margin: -4px 0 16px;
    text-align: right;
    font-size: 0.8125rem;
}

.auth-form-forgot a {
    color: var(--brand, var(--auth-primary));
    font-weight: 600;
    text-decoration: none;
}

.auth-form-forgot a:hover {
    text-decoration: underline;
}

.auth-form-submit {
    margin-top: 8px;
}

.auth-form-submit .button,
.auth-form-submit button[type="submit"] {
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--brand, var(--auth-primary));
}

.auth-form-submit .button:hover,
.auth-form-submit button[type="submit"]:hover {
    background: var(--brand-dark, var(--auth-primary-dark));
}

.auth-card .resend-box {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--auth-border);
}

.auth-card .resend-box summary {
    cursor: pointer;
    color: var(--auth-muted);
    font-size: 0.85rem;
    font-weight: 500;
    list-style: none;
}

.auth-card .resend-box summary::-webkit-details-marker {
    display: none;
}

.auth-card .resend-form {
    margin-top: 12px;
}

.auth-card .resend-form .button.secondary {
    width: 100%;
    margin-top: 8px;
    border-radius: 10px;
}

.auth-page-links {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--auth-muted);
}

.auth-page-links a {
    color: var(--brand, var(--auth-primary));
    font-weight: 600;
    text-decoration: none;
}

.auth-page-links a:hover {
    text-decoration: underline;
}

/* Panel decorativo */
.auth-page-visual-col {
    display: flex;
    align-items: stretch;
    padding: 24px 24px 24px 0;
}

.auth-page-visual {
    flex: 1;
    border-radius: 20px;
    background: linear-gradient(145deg, var(--auth-primary) 0%, #963b68 45%, #131133 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.auth-page-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(239, 203, 171, 0.2) 0%, transparent 45%);
    pointer-events: none;
}

.auth-visual-content {
    position: relative;
    z-index: 1;
    max-width: 400px;
    color: #fff;
}

.auth-visual-kicker {
    margin: 0 0 12px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

.auth-visual-title {
    margin: 0 0 16px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1.25;
}

.auth-visual-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.auth-page-legal {
    text-align: center;
    padding: 12px 16px 20px;
    margin: 0;
    font-size: 0.75rem;
    color: var(--auth-muted);
}

.auth-page-legal a {
    color: var(--auth-muted);
    text-decoration: none;
}

.auth-page-legal a:hover {
    color: var(--auth-primary);
}

@media (max-width: 991px) {
    .auth-page-grid {
        grid-template-columns: 1fr;
    }

    .auth-page-visual-col {
        display: none;
    }

    .auth-page-form-col {
        padding: 24px 16px 16px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px 20px;
        border-radius: 12px;
    }
}
