:root {
    --bg-blanco: #FFFFFF;
    --bg-fondo: #F8FAFC;
    --azul-principal: #2563EB;
    --azul-oscuro: #1E40AF;
    --verde-pistache: #A7F3D0;
    --verde-texto: #065F46;
    --texto-principal: #1E293B;
    --texto-secundario: #64748B;
    --border-color: #E2E8F0;
}

a {
    text-decoration: none;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(135deg, #F0F7FF 0%, #F0FDF4 100%);
    color: var(--texto-principal);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

header {
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-top {
    background-color: var(--bg-blanco);
    color: var(--azul-oscuro);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.btn-top:hover {
    border-color: var(--azul-principal);
    background-color: #EFF6FF;
    transform: translateY(-1px);
}

.btn-admin {
    background-color: var(--verde-pistache);
    color: var(--verde-texto);
    border: none;
}

.btn-admin:hover {
    background-color: #86EFAC;
    color: #064E3B;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    flex-grow: 1;
}

.brand-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--azul-principal);
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    
}

.brand-title span {
    color: var(--verde-texto);
}

.card-container {
    background-color: var(--bg-blanco);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.welcome-box {
    background-color: #F0FDF4;
    border: 1px solid var(--verde-pistache);
    color: var(--verde-texto);
    padding: 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.btn-login-toggle {
    width: 100%;
    background-color: var(--azul-principal);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-login-toggle:hover {
    background-color: var(--azul-oscuro);
}

.login-form {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
    opacity: 0;
    margin-top: 0;
    text-align: left;
}

.login-form.active {
    max-height: 350px; 
    opacity: 1;
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--texto-secundario);
    margin-bottom: 0.4rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--azul-principal);
}

.mensaje-error {
    color: #DC2626;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    display: none;
    font-weight: 600;
}

.btn-submit {
    width: 100%;
    background-color: var(--verde-texto);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: #044E38;
}

.btn-submit:disabled {
    background-color: #9CA3AF;
    cursor: not-allowed;
}

/* VENTANA FLOTANTE (MODAL DE VERIFICACIÓN) */
.modal-overlay-auth {
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-box-auth {
    background: var(--bg-blanco);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}