/* === VARIABLES GLOBALES === */
:root {
    --primary: #1e3c72;
    --primary-light: #2a4f8c;
    --secondary: #00b4d8;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    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;
}

/* === CONTENEDOR PRINCIPAL === */
#app {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

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

/* === VISTAS (LOGIN / REGISTRO) === */
.vista {
    padding: 30px;
    display: none;
}

.vista.activa {
    display: block;
}

/* === TÍTULOS Y TEXTOS === */
h2 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.subtitulo {
    color: var(--gray);
    text-align: center;
    margin-bottom: 25px;
    font-size: 14px;
}

/* === FORMULARIOS === */
.form-grupo {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--dark);
    font-weight: 500;
    font-size: 14px;
}

label i {
    margin-right: 6px;
    color: var(--primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

/* === BOTONES === */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

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

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #0096b4;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* === ENLACES === */
.link {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}

.link:hover {
    color: var(--secondary);
}

/* === SEPARADORES === */
.separador {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.separador::before,
.separador::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e1e5e9;
}

.separador::before { left: 0; }
.separador::after { right: 0; }

.separador span {
    background: white;
    padding: 0 10px;
    color: var(--gray);
    font-size: 14px;
}

/* === UPLOAD DE FOTOS (SIMULADO) === */
.upload-area {
    border: 2px dashed var(--primary);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #f8f9fa;
}

.upload-area:hover {
    background: #e9ecef;
    border-color: var(--secondary);
}

.upload-area i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 10px;
}

.upload-area p {
    color: var(--gray);
    font-size: 14px;
}

input[type="file"] {
    display: none;
}

/* === MENSAJES === */
.mensaje {
    padding: 12px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.mensaje.error {
    background: #f8d7da;
    border-left: 4px solid var(--danger);
    color: #721c24;
}

.mensaje.success {
    background: #d4edda;
    border-left: 4px solid var(--success);
    color: #155724;
}

.mensaje.info {
    background: #d1ecf1;
    border-left: 4px solid var(--secondary);
    color: #0c5460;
}

/* === LOADING SPINNER === */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .vista {
        padding: 20px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .btn {
        padding: 12px;
    }
}