* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    background: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

.login-container {
    display: flex;
    height: 100vh;
}

/* ========================================
   PANEL IZQUIERDO — estilo hero landing
======================================== */
.left-panel {
    width: 33%;
    background: linear-gradient(160deg, #0a4f3f 0%, #0d7c66 50%, #1a9e84 100%);
    color: white;
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

/* Imagen de ciudad de fondo, igual al hero de la landing */
.left-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1486325212027-8081e485255e?w=900&h=1200&fit=crop&q=60') center/cover no-repeat;
    opacity: 0.08;
    pointer-events: none;
}

.logo-section {
    position: relative;
    z-index: 1;
}

.logo-icon {
    margin-bottom: 20px;
}

.logo-icon img {
    height: 7rem;
}

.brand-title {
    font-size: 36px;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 10px;
}

.brand-title span {
    font-weight: 700;
    display: block;
}

.features-list {
    list-style: none;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.features-list li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 400;
    opacity: 0.95;
}

.check-icon {
    margin-right: 15px;
    flex-shrink: 0;
}

.footer-text {
    font-size: 14px;
    opacity: 0.7;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

/* ========================================
   PANEL DERECHO BLANCO
======================================== */
.right-panel {
    width: 67%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.form-container {
    max-width: 450px;
    width: 100%;
}

.form-title {
    font-size: 36px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
}

.form-subtitle {
    font-size: 16px;
    color: #0d7c66;
    margin-bottom: 40px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f8fafc;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #0d7c66;
    background: white;
    box-shadow: 0 0 0 3px rgba(13, 124, 102, 0.1);
}

.form-input::placeholder {
    color: #a0aec0;
    opacity: 1;
}

.form-input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #f56565;
    background: #fff5f5;
}

.form-group.valid::after {
    content: '✓';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #38a169;
    font-size: 16px;
    font-weight: bold;
}

.form-group.invalid::after {
    content: '!';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #e53e3e;
    font-size: 16px;
    font-weight: bold;
    background: #fed7d7;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   BOTÓN SUBMIT
======================================== */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: #0d7c66;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.btn-submit:hover {
    background: #095c4b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 124, 102, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ========================================
   SECCIÓN DEMO
======================================== */
.demo-section {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.demo-section::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}



/* ========================================
   MENSAJES Y LOADING
======================================== */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   MEJORAS PARA PASSWORD
======================================== */
.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
}

.toggle-password:hover {
    color: #0d7c66;
}

/* ========================================
   ANIMACIONES
======================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-container {
    animation: fadeInUp 0.6s ease-out;
}

* {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.form-input:focus-visible {
    outline: 2px solid #0d7c66;
    outline-offset: 2px;
}

.btn-submit:focus-visible {
    outline: 2px solid #0d7c66;
    outline-offset: 2px;
}

/* ========================================
   MEDIA QUERIES
======================================== */
@media (min-width: 1025px) {
    .left-panel  { width: 33%; padding: 60px 80px; }
    .right-panel { width: 67%; }
    .brand-title { font-size: 36px; }
    .features-list li { font-size: 18px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .left-panel  { width: 40%; padding: 40px 30px; }
    .right-panel { width: 60%; padding: 30px; }
    .brand-title { font-size: 30px; }
    .logo-icon img { height: 5rem; }
    .features-list li { font-size: 16px; }
    .form-title { font-size: 32px; }
    .form-subtitle { font-size: 15px; margin-bottom: 30px; }
    .form-container { max-width: 400px; }
}

@media (max-width: 768px) {
    body { overflow: auto; }

    .login-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .left-panel {
        width: 100%;
        padding: 30px 20px;
        min-height: auto;
        align-items: center;
        text-align: center;
    }

    .logo-section { text-align: center; }
    .logo-icon img { height: 4rem; }
    .brand-title { font-size: 26px; margin-bottom: 15px; }

    .features-list {
        margin-top: 20px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 15px;
    }

    .features-list li {
        font-size: 14px;
        margin-bottom: 0;
        flex: 0 0 auto;
    }

    .footer-text { margin-top: 15px; font-size: 12px; }

    .right-panel { width: 100%; padding: 40px 20px; }
    .form-container { max-width: 100%; }
    .form-title { font-size: 28px; text-align: center; }
    .form-subtitle { font-size: 14px; margin-bottom: 30px; text-align: center; }
    .form-group { margin-bottom: 20px; }
    .form-input { padding: 14px 16px; font-size: 14px; }
    .btn-submit { padding: 14px; font-size: 15px; }
    .login-container { animation: none; }
}

@media (max-width: 480px) {
    .left-panel { padding: 25px 15px; }
    .brand-title { font-size: 22px; }
    .logo-icon img { height: 3.5rem; }
    .features-list li { font-size: 13px; }
    .check-icon { width: 18px; height: 18px; margin-right: 8px; }
    .right-panel { padding: 30px 15px; }
    .form-title { font-size: 24px; }
    .form-subtitle { font-size: 13px; margin-bottom: 25px; }
    .form-input { padding: 12px 14px; font-size: 13px; }
    .btn-submit { padding: 12px; font-size: 14px; margin-bottom: 25px; }
    .error-message { padding: 10px 12px; font-size: 13px; }
}

@media (max-width: 320px) {
    .brand-title { font-size: 20px; }
    .features-list { flex-direction: column; align-items: center; }
    .features-list li { font-size: 12px; }
    .form-title { font-size: 22px; }
}

/* ========================================
   MODO OSCURO
======================================== */
@media (prefers-color-scheme: dark) {
    body { background: #1a202c; font-family: "Montserrat", sans-serif; }
    .right-panel { background: #2d3748; }
    .form-title { color: #e2e8f0; }
    .form-input { background: #4a5568; border-color: #4a5568; color: #e2e8f0; }
    .form-input:focus { background: #2d3748; border-color: #0d7c66; }
    .form-input::placeholder { color: #a0aec0; }
}

/* ========================================
   ENLACE CREAR CUENTA
======================================== */
.create-account-section {
    text-align: center;
    margin: 15px 0;
}

.create-account-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0d7c66;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    background: rgba(13, 124, 102, 0.05);
    transition: all 0.3s ease;
}

.create-account-link:hover {
    background: rgba(13, 124, 102, 0.1);
    transform: translateY(-1px);
}

.create-account-link i { font-size: 14px; }
/* ============================================================
   KONDOMINIUS — Login Loading (anillos verdes, overlay oscuro)
   ============================================================ */
.loading-spinner {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
    gap: 20px;
}
.knd-rings {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.knd-ring {
    position: absolute;
    border-radius: 50%;
    border-style: solid;
    border-color: transparent;
}
.knd-ring-1 {
    width: 100px; height: 100px;
    border-width: 2.5px;
    border-top-color: #ffffff;
    border-right-color: rgba(255,255,255,0.3);
    animation: kndSpinCW 1.1s linear infinite;
}
.knd-ring-2 {
    width: 72px; height: 72px;
    border-width: 2px;
    border-top-color: rgba(255,255,255,0.8);
    border-left-color: rgba(255,255,255,0.25);
    animation: kndSpinCCW 1.7s linear infinite;
}
.knd-ring-3 {
    width: 46px; height: 46px;
    border-width: 2px;
    border-top-color: rgba(255,255,255,0.9);
    border-right-color: rgba(255,255,255,0.2);
    animation: kndSpinCW 2.4s linear infinite;
}
.knd-ring-core {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.35);
    background: transparent;
}
@keyframes kndSpinCW  { to { transform: rotate(360deg);  } }
@keyframes kndSpinCCW { to { transform: rotate(-360deg); } }
.knd-loading-text {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: opacity 0.35s ease;
    font-family: "Montserrat", sans-serif;
}
/* El spinner inner viejo ya no se necesita */
.spinner { display: none !important; }
