* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.registration-container {
    background: white;
    width: 100%;
    max-width: 1000px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.panel-header {
    background: #f8f9fa;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.panel-header h1 {
    color: #004a87;
    font-size: 24px;
    text-transform: uppercase;
}

.form-cols-wrapper {
    display: flex;
    gap: 40px;
    padding: 30px;
}

.form-col {
    flex: 1;
}

.section-title {
    font-size: 16px;
    color: #004a87;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
    text-align: left;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.form-group input, .custom-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #004a87;
}

.security-section {
    padding: 0 30px 20px 30px;
    max-width: 50%;
}

.form-footer {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

button {
    background-color: #004a87;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button { width: 100%; }

button:hover {
    background-color: #003366;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#togglePassword, #toggleConfirmPassword {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #666;
}

.remember-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    text-align: left;
}

.footer-link {
    font-size: 13px;
    color: #888;
}

.footer-link a {
    color: #004a87;
    text-decoration: none;
    font-weight: bold;
}

/* --- PowerMeter & Password Requirements --- */

.password-strength-wrapper {
    margin-top: 10px;
}

.strength-bar {
    background: #e0e0e0;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

#strength-meter {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

#strength-text {
    font-size: 12px;
    color: #666;
}

#strength-text span {
    font-weight: bold;
}

.password-requirements {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    font-size: 12px;
}

.password-requirements li {
    color: #888;
    margin-bottom: 4px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-requirements li i {
    font-size: 7px;
}

/* Estados de Validación */
.password-requirements li.valid {
    color: #2e7d32;
}

/* Colores Dinámicos del Medidor */
.strength-weak { 
    background-color: #f44336; 
    width: 25% !important; 
}

.strength-medium { 
    background-color: #ffa000; 
    width: 50% !important; 
}

.strength-good { 
    background-color: #2196f3; 
    width: 75% !important; 
}

.strength-strong { 
    background-color: #4caf50; 
    width: 100% !important; 
}

/* Modal de Registro */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* Controlado por JS */
    align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: white; padding: 30px; border-radius: 12px;
    max-width: 500px; width: 90%; text-align: center;
}
.modal-options {
    display: flex; gap: 20px; margin: 25px 0;
}
.modal-card {
    flex: 1; padding: 25px; border: 2px solid #f0f0f0;
    border-radius: 10px; cursor: pointer; transition: 0.3s;
}
.modal-card:hover {
    border-color: #004a87; background: #f8fbff;
}
.modal-card i { font-size: 35px; color: #004a87; margin-bottom: 10px; }
.btn-close-modal {
    background: #888; padding: 8px 20px; font-size: 14px;
}
.type-toggle-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.type-toggle {
    display: inline-flex;
    background: #f0f0f0;
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.12);
}

.type-toggle a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #777;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.type-toggle a i {
    font-size: 15px;
}

.type-toggle a.active {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.type-toggle a:not(.active):hover {
    color: #444;
    background: rgba(255,255,255,0.5);
}

/* --- Sección de Contacto --- */
.contact-section {
    margin-top: 28px;
    padding: 0 30px 20px 30px;
}

.input-with-check {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.same-as-mobile {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.same-as-mobile input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #004a87;
}

.contact-note {
    font-size: 12.5px;
    color: #777;
    line-height: 1.5;
    margin: 0;
    padding: 10px 12px;
    background: #f5f8fb;
    border-left: 3px solid #004a87;
    border-radius: 4px;
}

.contact-note i {
    color: #004a87;
    margin-right: 5px;
}

/* --- Código Postal con autocompletado --- */
.postal-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.postal-input-wrapper input {
    padding-right: 36px;
}

.postal-spinner,
.postal-ok,
.postal-error {
    position: absolute;
    right: 10px;
    font-size: 15px;
    display: none;
    pointer-events: none;
}

.postal-spinner { color: #888; }
.postal-ok      { color: #2e9e5b; }
.postal-error   { color: #c0392b; }

.postal-spinner.visible,
.postal-ok.visible,
.postal-error.visible { display: inline-flex; }

.postal-hint {
    font-size: 12px;
    color: #888;
    margin: 5px 0 0;
}

.postal-hint.is-error { color: #c0392b; }

/* Campos autocompletados (readonly) */
input.autofilled {
    background: #f5f8fb;
    color: #444;
    cursor: default;
}

input.autofilled.filled {
    background: #eef6ee;
    color: #2e9e5b;
    font-weight: 500;
}
@media (max-width: 800px) {
    .form-cols-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    .security-section {
        max-width: 100%;
    }
    .form-footer {
        flex-direction: column;
        gap: 15px;
    }
}