body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
}

/* Hide header and footer on login page */
header, footer, .ipp-user-header {
    display: none !important;
}

/* Override parent container styles */
.ipp_column,
.ipp_row,
.ipp_page {
    display: block;
    padding: 0;
    width: 100%;
    margin: 0;
}

main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

li.error {
    color: var(--color-theme-dark-red);
}

/* Center the login content */
.ipp_page_content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Container */
.ipp_container {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease-out;
}

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

/* Logo - connected to panel */
.ipp_logo_heading {
    margin: 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px 20px 0 0;
    padding: 36px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

.ipp_logo_heading img {
    max-width: 280px;
    height: auto;
    border-radius: 8px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* Panel */
.ipp_panel {
    background: white;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 0;
    gap: 0;
}

.ipp_login_panel {
    padding: 40px;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.ipp_login_panel .ipp_header_1 {
    color: var(--color-theme-blue, #16365B);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 28px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.ipp_login_panel .ipp_header_1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    border-radius: 2px;
}

/* Form */
.ipp_login_panel .ipp_form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ipp_login_panel .ipp_form p {
    margin: 0;
    width: 100%;
}

.ipp_login_panel .ipp_form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-theme-button-blue, #16365B);
    margin-bottom: 8px;
    margin-top: 16px;
}

/* Input fields */
.ipp_login_panel input[type="text"],
.ipp_login_panel input[type="password"] {
    width: 100% !important;
    padding: 14px 18px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    background: #f8fafc !important;
    color: var(--color-theme-button-blue, #16365B) !important;
    transition: all 0.2s ease;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

.ipp_login_panel input[type="text"]:focus,
.ipp_login_panel input[type="password"]:focus {
    outline: none;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
    background: white !important;
}

.ipp_login_panel input[type="text"]:hover,
.ipp_login_panel input[type="password"]:hover {
    border-color: #cbd5e1 !important;
}

.ipp_login_panel input::placeholder {
    color: #94a3b8;
}

/* Forgot password */
.ipp_login_panel > a,
.ipp_login_panel .ipp_form > a {
    color: #6366f1 !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
    margin: 20px 0;
    text-align: right;
}

.ipp_login_panel a:hover {
    color: #4f46e5 !important;
    text-decoration: underline;
}

/* Button */
.ipp_login_panel .ipp_center {
    margin-top: 8px;
}

.ipp_login_panel .ipp_button_login {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    padding: 16px 24px !important;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35) !important;
    letter-spacing: 0.3px;
}

.ipp_login_panel .ipp_button_login + .ipp_button_login {
    margin-top: 16px !important;
}

.ipp_login_panel .ipp_button_login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45) !important;
}

.ipp_login_panel .ipp_button_login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3) !important;
}

.ipp_login_panel .ipp_button_login div {
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ipp_login_panel .ipp_button_login:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3), 0 4px 15px rgba(99, 102, 241, 0.35) !important;
}

/* Ensure Microsoft logo SVG is visible in login button */
.ipp_button_login svg {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Error messages */
.ipp_login_panel .messages {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.ipp_login_panel .messages li {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ipp_login_panel .messages li::before {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #dc2626;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .ipp_login_panel {
        padding: 28px 24px;
    }

    .ipp_logo_heading {
        padding: 24px 20px;
    }

    .ipp_logo_heading img {
        max-width: 220px;
    }
}
