header, footer {
    display: none;
}

/* ===== Background ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: url('/images/bg/background-l.png') no-repeat center center;
    background-size: cover;
}
[data-bs-theme=dark] .login-page {
    background: url('/images/bg/background.png') no-repeat center center;
    background-size: cover;
}

/* ===== Theme Switch ===== */
.theme-switch {
    position: absolute;
    top: 3%;
    right: 3%;
    z-index: 1000;
}
.switch__input {
    cursor: pointer;
}

/* ===== Logo Section ===== */
.logo-image {
    max-width: 220px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
    transition: transform 0.3s ease;
}
.logo-image:hover {
    transform: scale(1.03);
}
.company-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #555;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}
.company-name-sub {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.25rem;
}
[data-bs-theme=dark] .company-name {
    color: #ccc;
}
[data-bs-theme=dark] .company-name-sub {
    color: #999;
}

/* ===== Login Card ===== */
.login-card {
    position: relative;
    padding: 2.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.6);
    max-width: 420px;
    width: 100%;
}
[data-bs-theme=dark] .login-card {
    background: rgba(30, 30, 46, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        0 1px 4px rgba(0, 0, 0, 0.2);
}

.login-line {
    position: absolute;
    left: -2px;
    top: 25px;
}

/* ===== Form Inputs with Drop Shadow ===== */
.input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
}
.input-group:focus-within {
    box-shadow: 0 4px 16px rgba(235, 0, 139, 0.12);
}
.input-group-text {
    background: #fff;
    border: none;
    border-radius: 12px 0 0 12px;
    padding: 10px 14px;
}
[data-bs-theme=dark] .input-group-text {
    background: #2a2a3e;
    color: #fff;
}
input.form-control {
    background: #fff;
    border: none;
    border-radius: 0 12px 12px 0;
    box-shadow: none;
    padding: 12px 14px;
    font-size: 0.95rem;
}
[data-bs-theme=dark] input.form-control {
    background: #2a2a3e;
    color: #fff !important;
}
.form-control:focus {
    box-shadow: none;
    border-color: transparent !important;
    outline: none;
}

/* ===== Microsoft SSO Button (Official Branding) ===== */
.btn-microsoft-primary {
    background-color: #ffffff;
    color: #5e5e5e;
    border: 1px solid #8c8c8c;
    border-radius: 4px; /* Microsoft uses sharp corners */
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    height: 41px;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}
.btn-microsoft-primary:hover {
    background-color: #f2f2f2;
    color: #333;
    border-color: #8c8c8c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.btn-microsoft-primary:active {
    background-color: #e6e6e6;
    box-shadow: none;
}
[data-bs-theme=dark] .btn-microsoft-primary {
    background-color: #2f2f2f;
    color: #ffffff;
    border-color: #555;
}
[data-bs-theme=dark] .btn-microsoft-primary:hover {
    background-color: #3a3a3a;
    color: #fff;
    border-color: #777;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ===== Login Submit Button ===== */
.btnSubmitlogin {
    text-align: center;
    width: 100%;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    background-color: #fff !important;
    color: #000 !important;
    border: 1px solid #ddd;
    transition: all 0.3s ease-in-out;
}
.btnSubmitlogin:hover {
    background-color: #eb008b !important;
    color: #fff !important;
    border-color: #eb008b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(235, 0, 139, 0.25);
}
.btnSubmitlogin:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(235, 0, 139, 0.1);
}
[data-bs-theme=dark] .btnSubmitlogin {
    background-color: #2a2a3e !important;
    color: #fff !important;
    border-color: #444;
    transition: all 0.3s ease-in-out;
}
[data-bs-theme=dark] .btnSubmitlogin:hover {
    background-color: #eb008b !important;
    color: #fff !important;
    border-color: #eb008b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(235, 0, 139, 0.35);
}

/* ===== Divider ===== */
.login-divider {
    position: relative;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}
.login-divider::before,
.login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #ddd;
}
.login-divider::before { left: 0; }
.login-divider::after { right: 0; }
[data-bs-theme=dark] .login-divider { color: #777; }
[data-bs-theme=dark] .login-divider::before,
[data-bs-theme=dark] .login-divider::after { background: #444; }

/* ===== Footer Links ===== */
.login-footer-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
[data-bs-theme=dark] .login-footer-links {
    border-top-color: rgba(255, 255, 255, 0.08);
}
.login-footer-links a {
    color: #888;
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s ease;
}
.login-footer-links a:hover {
    color: #eb008b;
    text-decoration: underline;
}
[data-bs-theme=dark] .login-footer-links a {
    color: #999;
}

/* ===== Title ===== */
.login-title {
    font-weight: 700;
    font-size: 1.6rem;
    color: #222;
}
[data-bs-theme=dark] .login-title {
    color: #eee;
}

/* ===== Alert ===== */
.alert-danger {
    border-radius: 10px;
}

/* ===== Spinner ===== */
.spinner {
    display: inline-block;
}
#countdownDisplay {
    font-size: 0.9rem;
}
.btn-primary:disabled {
    cursor: not-allowed;
}

/* ===== Modal (IT Admin) ===== */
.it-modal-content {
    border-radius: 16px !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}
[data-bs-theme=dark] .it-modal-content {
    background: rgba(30, 30, 46, 0.95) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}
.it-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eb008b, #ff6bb5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
}
.it-modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: #222;
    margin-bottom: 0.25rem;
}
[data-bs-theme=dark] .it-modal-title {
    color: #eee;
}
.it-modal-subtitle {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0;
}
.it-modal-cancel {
    color: #999;
    font-size: 0.85rem;
    text-decoration: none;
}
.it-modal-cancel:hover {
    color: #666;
}

/* ===== Autofill Fixes ===== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #fff inset !important;
}
input:-webkit-autofill {
    -webkit-text-fill-color: #000 !important;
}
[data-bs-theme=dark] input:-webkit-autofill,
[data-bs-theme=dark] input:-webkit-autofill:hover,
[data-bs-theme=dark] input:-webkit-autofill:focus,
[data-bs-theme=dark] input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #2a2a3e inset !important;
}
[data-bs-theme=dark] input:-webkit-autofill {
    -webkit-text-fill-color: #fff !important;
}

/* ===== Focus styles ===== */
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    color: inherit;
    border-color: transparent;
    box-shadow: none;
    outline: 0 none;
}

/* ===== Mini Microsoft Button (bottom-right) ===== */
.btn-microsoft-mini {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}
.btn-microsoft-mini:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: #999;
}
.btn-microsoft-mini:active {
    transform: scale(0.95);
}
[data-bs-theme=dark] .btn-microsoft-mini {
    background: rgba(40, 40, 56, 0.9);
    border-color: #555;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
[data-bs-theme=dark] .btn-microsoft-mini:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border-color: #777;
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
[data-bs-theme=dark] .loading-overlay {
    background: rgba(0, 0, 0, 0.6);
}
.loading-content {
    text-align: center;
}
.loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #eb008b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loading-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}
[data-bs-theme=dark] .loading-text {
    color: #ccc;
}

/* ===== Responsive ===== */
@media only screen and (max-width: 767px) {
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
        border-radius: 14px;
    }
    .logo-section-desktop {
        display: none;
    }
}
@media only screen and (max-width: 575px) {
    .login-card {
        padding: 1.75rem 1.25rem;
    }
}
