:root {
    --primary-color: #0F172A; /* Azul profundo */
    --accent-color: #0EA5E9; /* Cyan suave */
    --text-color: #334155;
    --text-light: #64748B;
    --bg-light: #F8FAFC;
    --white: #FFFFFF;
    --border-color: #E2E8F0;
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    height: 100vh;
    overflow: hidden; /* Prevent scroll on desktop */
}

.container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* --- Login Panel (Left) --- */
.login-panel {
    flex: 1;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    /* justify-content: center; Removed to allow scrolling */
    padding: 2rem; /* Reduced padding */
    position: relative;
    max-width: 50%;
    z-index: 10;
    overflow-y: auto; /* Allow scrolling */
    height: 100%;
}

.login-content {
    max-width: 420px;
    margin: auto; /* Center vertically and horizontally */
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.header-text {
    margin-bottom: 1.5rem;
}

.header-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.header-text p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.form-group input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--primary-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.25rem;
}

.btn-primary:hover {
    background-color: #1E293B;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.75rem;
}

.form-footer a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.form-footer a:hover {
    color: var(--accent-color);
}

/* Microsoft Login Button & Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
    color: var(--text-light);
    font-size: 0.75rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider::before {
    margin-right: .5em;
}

.divider::after {
    margin-left: .5em;
}

.btn-microsoft {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--white);
    color: #5E5E5E;
    border: 1px solid #8c8c8c;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-microsoft:hover {
    background-color: #f3f3f3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-illustration {
    margin-top: 2rem;
    text-align: center;
    opacity: 0.9;
}

.promo-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    /* mix-blend-mode: multiply; Opcional si el fondo es blanco */
}

.login-footer {
    /* position: absolute; Removed to allow flow */
    margin-top: 2rem;
    width: 100%;
    text-align: center;
    color: var(--text-light);
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* --- Visual Panel (Right) --- */
.visual-panel {
    flex: 1;
    background-color: #1e293b; /* Fallback color */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-image 1s ease-in-out;
}

.visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.7));
    z-index: 1;
}

/* Floating Card */
.tips-card {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-left: 4px solid var(--accent-color);
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.tips-card h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.tips-card p {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.carousel-indicators {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #CBD5E1;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: var(--accent-color);
    width: 24px;
    border-radius: 4px;
}

/* Context Info (Bottom) */
.context-info {
    position: absolute;
    bottom: 3rem;
    left: 3rem;
    z-index: 2;
    color: var(--white);
    max-width: 80%;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.location-badge span {
    font-size: 0.875rem;
    font-weight: 500;
}

.context-tip {
    font-size: 1.125rem;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Form Message Styles (for contact.js) */
.form-message.success {
    color: #10b981; /* emerald-500 */
    background-color: #ecfdf5;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #10b981;
}

.form-message.error {
    color: #ef4444; /* red-500 */
    background-color: #fef2f2;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #ef4444;
}

/* --- Responsive --- */
@media (max-width: 960px) {
    .container {
        flex-direction: column-reverse; /* Login first on mobile? User said: "Primero login, Luego carrusel" -> Wait, usually login is top. Let's check instructions. */
        /* Instructions: "En mobile: Primero login, Luego carrusel de tips" */
        /* If I use column-reverse, visual panel (right in HTML) goes to top, login (left in HTML) goes to bottom. */
        /* Wait, HTML order is Login then Visual. */
        /* So flex-direction: column puts Login on top, Visual on bottom. */
        flex-direction: column;
        overflow-y: auto; /* Allow scroll on mobile */
    }

    .login-panel {
        max-width: 100%;
        padding: 2rem;
        min-height: auto; /* Let it take content height */
        flex: none; /* Don't expand to fill */
        height: auto;
        overflow: visible;
    }
    
    .visual-panel {
        min-height: 400px; /* Give it some height */
        flex: none;
        padding: 2rem;
    }

    .tips-card {
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .context-info {
        bottom: 1.5rem;
        left: 1.5rem;
    }
}
