:root {
    --medical-blue: #0052cc;
    --light-teal: #00b4d8;
    --dark-slate: #1e293b;
    --glass-white: rgba(255, 255, 255, 0.85);
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background: radial-gradient(circle at top right, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
    min-height: 100vh;
}

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.glass-card {
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 28px;
    padding: 50px 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    animation: entrance 0.7s ease-out;
    /* FIX: Ensure the card doesn't expand/contract */
    display: flex;
    flex-direction: column;
}

.login-header {
    /* FIX: Added fixed margin to prevent jumping when labels move */
    margin-bottom: 30px; 
}

.medical-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--medical-blue), var(--light-teal));
    color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    box-shadow: 0 10px 15px rgba(0, 82, 204, 0.2);
}

.login-header h2 {
    font-weight: 700;
    color: var(--dark-slate);
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #64748b;
    font-size: 0.95rem;
}

/* --- FIX FOR JUMPING ICON --- */
.form-floating {
    height: 60px; 
    margin-bottom: 25px !important;
    display: flex; /* Added to help alignment */
    align-items: center; /* Centers content vertically */
}

.modern-input {
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    transition: all 0.2s ease-in-out;
    height: 100% !important; 
    padding-top: 10px !important; 
    padding-bottom: 10px !important;
    line-height: 1.5;
}

.form-floating > .form-control:focus, 
.form-floating > .form-control:not(:placeholder-shown) {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

.modern-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
    -webkit-text-fill-color: var(--dark-slate) !important;
}

/* Adjust label position so it doesn't overlap icons */
.form-floating > label {
    padding-left: 15px;
    transition: opacity 0.2s ease; /* Ensure this line is here for a smooth fade */
}

.modern-input:focus ~ label i,
.modern-input:not(:placeholder-shown) ~ label i {
    opacity: 0;
}

.modern-input:focus ~ label,
.modern-input:not(:placeholder-shown) ~ label {
    opacity: 0;
}

.modern-input:focus {
    border-color: var(--medical-blue) !important;
    box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1) !important;
}

.btn-trendy {
    width: 100%;
    background: linear-gradient(135deg, #001e4d 0%, #003380 50%, #0052cc 100%) !important;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 30, 77, 0.2);
}

.btn-trendy:hover {
    background: linear-gradient(135deg, #003380 0%, #0052cc 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 82, 204, 0.35);
    color: white;
}

.auth-status-msg {
    margin-top: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #ef4444;
    min-height: 20px; /* Reserve space so card doesn't jump when error appears */
}

@keyframes entrance {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .glass-card {
        padding: 40px 20px;
    }
}