/* ============ VARIABLES Y RESET ============ */
:root {
    --primary-color: #d32f2f;
    --secondary-color: #232f3e;
    --error-color: #ff9900;
    --success-color: #4CAF50;
    --text-color: #333;
    --light-bg: #f0f2f5;
    --white: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ============ HEADER STYLES ============ */
header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    text-align: center;
}

/* ============ AUTH CONTAINER ============ */
.auth-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* ============ FORM STYLES ============ */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: var(--error-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.3s;
}

button[type="submit"]:hover {
    background: #e68a00;
}

/* ============ MESSAGES ============ */
.error {
    color: #d32f2f;
    background: #ffebee;
    padding: 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.success {
    color: #4CAF50;
    background: #e8f5e9;
    padding: 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

/* ============ FORM ELEMENTS ============ */
.required {
    color: #d32f2f;
    font-size: 0.9em;
}

.optional {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.vendedor-fields {
    transition: all 0.3s ease;
}

.verification-container {
    display: none;
}

/* ============ AUTH LINKS ============ */
.auth-links {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ============ MEDIA QUERIES ============ */
@media (max-width: 600px) {
    .two-columns {
        grid-template-columns: 1fr;
    }
    
    body {
        font-size: 14px;
    }
    
    .auth-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 0.6rem;
        font-size: 14px;
    }
    
    button[type="submit"] {
        padding: 0.8rem;
    }
}

.secondary-btn {
    background-color: #6c757d;
    color: white;
    margin-left: 10px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7ff;
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #4361ee, #3f37c9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.header p {
    color: #666;
    font-size: 1.1rem;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    transition: var(--transition);
}

.auth-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.form-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    text-align: center;
}

/* Switch estilo moderno */
.account-type-switch {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
}

.switch-container {
    display: flex;
    background: #e9ecef;
    border-radius: 50px;
    padding: 5px;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.switch-option {
    padding: 0.8rem 2rem;
    cursor: pointer;
    z-index: 1;
    font-weight: 600;
    color: #666;
    transition: var(--transition);
    text-align: center;
    position: relative;
    border-radius: 50px;
}

.switch-option.active {
    color: white;
}

.switch-slider {
    position: absolute;
    top: 5px;
    left: 5px;
    height: calc(100% - 10px);
    width: calc(50% - 10px);
    background: var(--primary-color);
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.switch-option:nth-child(1).active ~ .switch-slider {
    transform: translateX(0);
}

.switch-option:nth-child(2).active ~ .switch-slider {
    transform: translateX(100%);
}

/* Campos del formulario */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(72, 149, 239, 0.2);
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: center;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-links a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Campos específicos para vendedor */
.vendedor-fields {
    display: none;
    animation: fadeIn 0.5s ease;
}

.vendedor-fields.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mensajes de error/success */
.error, .success {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

/* Verificación de email */
.verification-container {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.verification-container p {
    margin-bottom: 1rem;
    color: #555;
}

/* Términos y condiciones */
.terms-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.terms-overlay.show {
    display: flex;
}

.terms-popup {
    background-color: white;
    width: 90%;
    max-width: 800px;
    height: 80%;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.terms-content {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    padding: 1rem;
    border-radius: 8px;
}

.terms-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.terms-actions button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    flex: 1;
}

.accept-btn {
    background-color: var(--primary-color);
    color: white;
}

.accept-btn:hover {
    background-color: var(--secondary-color);
}

.reject-btn {
    background-color: #e9ecef;
    color: var(--dark-color);
}

.reject-btn:hover {
    background-color: #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 1.5rem;
    }

    .two-columns {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .switch-option {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.2rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .switch-option {
        padding: 0.5rem 1rem;
    }
}

.hint {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}