@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
    --primary:        #1648B9;
    --primary-dark:   #143d9e;
    --primary-light:  #eef3fc;
    --bg-main: linear-gradient(135deg, #fff8f2 0%, #ffffff 50%, #fff3e8 100%);
    --text:#1a1a1a;
    --text-muted:#6b7280;
    --border-soft:var(--bg-main)(235,126,37,0.25);
    --border-base:#e5e7eb;
    --white:#ffffff;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.auth-page {
    min-height: 100vh;
    display: flex; 
    align-items: center; 
    justify-content: center;
    background: var(--bg-main);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
}

/* Grid Layout */
.auth-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    width: 900px;
    max-width: 95vw;
    min-height: 600px; 
    background: var(--white);
    border-radius: 24px;
    border: 1px solid var(--border-base);
    box-shadow: 0 20px 60px rgba(235,126,37,0.12);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Left Panel (Visual) */
.auth-visual {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%), url(/static/assets/bg-login.jpeg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--white);
    position: relative;
}

.visual-logo { display: flex; align-items: center; gap: 10px; font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 900; }
.visual-logo img { height: 36px; filter: brightness(0) invert(1); }

.visual-content h2 { font-family: 'Playfair Display', serif; font-size: 2.2rem; line-height: 1.15; margin-bottom: 1rem; }
.visual-content p { opacity: 0.8; font-size: 0.9rem; line-height: 1.6; }

/* Right Panel */
.auth-form-box { padding: 3rem; display: flex; flex-direction: column; justify-content: center; }

.auth-form { display: none; animation: fadeIn 0.4s ease forwards; }
.auth-form.active { display: block; }

.auth-form h3 { font-family: 'Playfair Display', serif; font-size: 1.8rem; margin-bottom: 0.5rem; color: var(--text); }
.subtitle { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 2rem; display: block; }
.destacado { color: var(--primary); }

/* Input Styling */
.input-group { margin-bottom: 1.25rem; }
.input-group label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; }

.input-wrapper {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-base);
    border-radius: 12px;
    padding: 0 1rem;
    transition: 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(235,126,37,0.1);
}

.input-wrapper input {
    width: 100%;
    padding: 0.85rem;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
}

/* Buttons and Links */
.btn-auth {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 1rem;
}

.btn-auth:hover { background: var(--primary-dark); transform: translateY(-2px); }

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}
.divider::before { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: var(--border-base); }
.divider span { position: relative; background: var(--white); padding: 0 10px; color: var(--text-muted); font-size: 0.8rem; }

.form-links { display: flex; justify-content: space-between; margin-top: 0.8rem; }
.link, .link-centered { color: var(--primary); text-decoration: none; font-size: 0.85rem; font-weight: 500; }
.link-centered { display: block; text-align: center; margin-top: 1rem; }

/* 1. Contenedor fijo en la esquina superior derecha */
#toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* 2. Estilo base de la alerta flotante */
.toast-item {
    pointer-events: auto;
    background-color: #ffffff;
    color: #1f2937;
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 300px;
    max-width: 420px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    border-left: 5px solid #ef4444;
    animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: all 0.4s ease;
}

/* 3. Icono del Toast */
.toast-item .toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-item.error {
    border-left-color: #ef4444;
}
.toast-item.error .toast-icon {
    color: #ef4444;
}

.toast-item.success {
    border-left-color: #10b981;
}
.toast-item.success .toast-icon {
    color: #10b981;
}

.toast-item.hide {
    animation: toastSlideOut 0.4s ease forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .form-links {display: flex; flex-direction: column; gap: 10px; align-items: center;}
    .auth-container {border: 2px solid var(--primary-light);}
}