:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #9c9c9c;
    --surface-color: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #22c55e;
    --focus-ring: rgba(37, 99, 235, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;  /* Respaldo para navegadores antiguos */
    min-height: 100dvh; /* Alto real visible en celular (descuenta la barra de URL) */
    padding: 1rem;
}

.login-container {
    background-color: var(--surface-color);
    width: 100%;
    max-width: 400px; /* Un poco más angosto que el registro para verse más elegante */
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    padding: 2.5rem 2rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.password-wrapper { 
    position: relative; 
    display: flex; 
    align-items: center; 
}

.password-wrapper input { 
    padding-right: 45px; 
}

.btn-toggle-password { 
    position: absolute; 
    right: 12px; 
    background: transparent; 
    border: none; 
    color: var(--text-muted, #64748b); 
    cursor: pointer; 
    display: flex; 
}

.btn-toggle-password:hover { 
    color: var(--primary-color, #2563eb);
}

.status-message {
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    display: none;
    font-weight: 500;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-submit:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Responsividad para móviles */
@media (max-width: 380px) {
    .login-container {
        padding: 1.5rem 1rem;
    }
}
