.login-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    position: relative;
}

.left-panel {
    background: linear-gradient(135deg, #5b73e8 0%, #7c4dff 50%, #e91e63 100%);
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="200" height="200" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.welcome-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
    max-width: 400px;
}

.brand-logo {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.welcome-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.welcome-subtitle {
    color: white !important;
    font-size: 14px;
    margin-bottom: 40px;
    line-height: 1.5;
}

.right-panel {
    background: white;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    position: relative;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-form-container .form-group {
    margin-bottom: 24px;
}

.login-form-container .form-label {
    display: block;
    color: #2d3748;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f7fafc;
    color: #2d3748;
}

.form-input::placeholder {
    color: #a0aec0;
}

.form-input:focus {
    outline: none;
    border-color: #5b73e8;
    background: white;
    box-shadow: 0 0 0 3px rgba(91, 115, 232, 0.1);
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.form-input:focus + .input-icon {
    color: #5b73e8;
}

.input-icon--toggle-password {
    /* Reset every button default so it stays a small transparent icon pinned
       to the right of the field (it inherits position:absolute from .input-icon). */
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0;
    padding: 0;
    cursor: pointer;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.input-icon--toggle-password:hover {
    color: #5b73e8;
}

/* Force the eye icon colour on the SVG itself. A CSS `fill` beats the inline
   fill="currentColor" attribute, so the icon can never render white-on-white
   regardless of what colour the <button> happens to inherit. */
.input-icon--toggle-password svg,
.input-icon--toggle-password svg path {
    fill: #64748b !important;
}

.input-icon--toggle-password:hover svg,
.input-icon--toggle-password:hover svg path {
    fill: #5b73e8 !important;
}

/* Keep typed text from sliding under the eye button */
.input-wrapper .form-input {
    padding-right: 48px;
}

form .login-btn {
    width: 100%;
    background: linear-gradient(135deg, #5b73e8 0%, #7c4dff 50%, #e91e63 100%) !important;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(91, 115, 232, 0.3);
}

.login-btn:hover::before {
    left: 100%;
}

.login-form-container .alert {
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: none;
}

.login-form-container .alert-danger {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.user-info {
    background: #e6fffa;
    color: #047857;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #a7f3d0;
}

.user-info a {
    color: #047857;
    font-weight: 600;
    text-decoration: none;
}

.user-info a:hover {
    text-decoration: underline;
}

.sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    width: 100%;
    padding: 18px 24px;
    background: #0078d4;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 120, 212, 0.4);
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.sso-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.sso-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 120, 212, 0.5);
    background: #106ebe;
    color: white;
}

.sso-btn:hover::before {
    left: 100%;
}

/* Disabled state — shown until the email resolves to a university with
   SSO enabled. Suppresses hover/transform so it reads as inert. */
.sso-btn.sso-btn--disabled,
button.sso-btn.sso-btn--disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    border: 1px solid #e5e7eb;
}

.sso-btn.sso-btn--disabled svg {
    filter: grayscale(1);
    opacity: .55;
}

.sso-btn.sso-btn--disabled::before {
    display: none;
}

.sso-btn.sso-btn--disabled:hover {
    background: #e5e7eb;
    color: #9ca3af;
    transform: none;
    box-shadow: none;
}

.sso-divider {
    text-align: center;
    margin: 16px 0;
    color: #a0aec0;
    font-size: 14px;
}

.login-link {
    text-decoration: none;
}

.login-link--center {
    display: block;
    text-align: center;
    margin-top: 8px;
}

@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
    }

    .left-panel,
    .right-panel {
        width: 100%;
    }

    .left-panel {
        padding: 40px 20px;
    }

    .right-panel {
        padding: 40px 20px;
    }
}

@media (max-width: 768px) {
    .welcome-title {
        font-size: 28px;
    }

    .welcome-subtitle {
        font-size: 16px;
    }

    .login-form-container {
        max-width: none;
    }
}
