/* =================================================================
   TMU LMS - MODERN ENTERPRISE LOGIN SYSTEM
   High-Impact Branding, Glassmorphism, Micro-Interactions
   ================================================================= */

/* ---------------------- */
/* Base Page & Ambient Spheres */
/* ---------------------- */
.login-page-body {
    background: #f8fafc;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

.login-bg-sphere {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.sphere-1 {
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(242, 101, 34, 0.12) 0%, transparent 70%);
    top: -180px;
    left: -180px;
    filter: blur(50px);
}

.sphere-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    filter: blur(50px);
}

.sphere-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
    top: 45%;
    right: 20%;
    filter: blur(60px);
}

/* ---------------------- */
/* Page Wrapper & Navigation */
/* ---------------------- */
.login-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.login-top-bar {
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
}

.login-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.login-nav-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.login-nav-brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.login-nav-tag {
    font-size: 0.6rem;
    font-weight: 700;
    background: #fff7ed;
    color: #f26522;
    border: 1px solid #ffedd5;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    letter-spacing: 0.04em;
}

.login-top-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login-nav {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.825rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

    .btn-login-nav:hover {
        background: #f1f5f9;
        color: #f26522;
        border-color: #cbd5e1;
    }

/* ---------------------- */
/* Main Card Container */
/* ---------------------- */
.login-main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
}

.login-card-container {
    max-width: 1040px;
    width: 100%;
    margin: 0 auto;
}

.login-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(226, 232, 240, 0.9);
    overflow: hidden;
    border: none;
}

/* ---------------------- */
/* Left Showcase Panel */
/* ---------------------- */
.login-showcase {
    background: linear-gradient(150deg, #f26522 0%, #ea580c 45%, #c2410c 100%);
    padding: 3rem 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

    .login-showcase::before {
        content: '';
        position: absolute;
        width: 350px;
        height: 350px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
        top: -90px;
        right: -90px;
        pointer-events: none;
    }

    .login-showcase::after {
        content: '';
        position: absolute;
        width: 280px;
        height: 280px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(0, 0, 0, 0.15) 0%, transparent 70%);
        bottom: -70px;
        left: -70px;
        pointer-events: none;
    }

.showcase-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.775rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(8px);
}

.welcome-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    position: relative;
    z-index: 1;
}

.tmu-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #ffffff;
    padding: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tmu-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.welcome-text h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    line-height: 1.25;
}

.welcome-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Feature Box & Interactive Cards */
.feature-box {
    margin: auto 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 170px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    padding: 0.85rem 1.15rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    gap: 0.9rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

    .feature-item.visible {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

.feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #ffffff;
    flex-shrink: 0;
}

.feature-content h6 {
    margin: 0 0 0.15rem 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
}

.feature-content span {
    font-size: 0.775rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.35;
    display: block;
}

/* Showcase Metrics & Helpline */
.showcase-footer {
    margin-top: 1.75rem;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.25rem;
}

.showcase-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.showcase-stat {
    text-align: center;
    flex: 1;
}

    .showcase-stat strong {
        display: block;
        font-size: 1.25rem;
        font-weight: 800;
        color: #ffffff;
    }

    .showcase-stat small {
        font-size: 0.725rem;
        color: rgba(255, 255, 255, 0.85);
        font-weight: 500;
    }

.showcase-stat-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.25);
}

.showcase-helpline {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.775rem;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.45rem 1rem;
    border-radius: 9999px;
}

/* ---------------------- */
/* Right Form Panel */
/* ---------------------- */
.login-form {
    padding: 3rem 2.75rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.login-header {
    margin-bottom: 1.75rem;
}

.login-avatar-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff7ed;
    color: #f26522;
    border: 1.5px solid #ffedd5;
    font-size: 1.25rem;
    margin-bottom: 0.85rem;
}

.login-header h2 {
    color: #0f172a;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.25rem;
}

.login-header p {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
}

/* Form Controls & Floating Icons */
.input-group-custom {
    position: relative;
}

    .input-group-custom .input-icon {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        font-size: 0.95rem;
        pointer-events: none;
        z-index: 5;
        transition: color 0.15s ease;
    }

    .input-group-custom .form-control {
        height: 46px;
        border: 1.5px solid #e2e8f0;
        border-radius: 12px;
        padding-left: 2.75rem;
        padding-right: 2.75rem;
        font-size: 0.875rem;
        color: #0f172a;
        background: #ffffff;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

        .input-group-custom .form-control:focus {
            border-color: #f97316;
            box-shadow: 0 0 0 3.5px rgba(242, 101, 34, 0.12);
            background: #ffffff;
        }

        .input-group-custom .form-control:focus + .input-icon,
        .input-group-custom:focus-within .input-icon {
            color: #f26522;
        }

.btn-toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
    z-index: 5;
}

    .btn-toggle-password:hover {
        color: #0f172a;
    }

/* Remember Me & Links */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0 !important;
    min-height: auto !important;
}

.form-check-input {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    margin: 0 !important;
    float: none !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 4px !important;
    cursor: pointer;
    flex-shrink: 0;
}

    .form-check-input:checked {
        background-color: #f26522 !important;
        border-color: #f26522 !important;
    }

    .form-check-input:focus {
        box-shadow: 0 0 0 2.5px rgba(242, 101, 34, 0.15) !important;
        border-color: #f26522 !important;
    }

.form-check-label {
    font-size: 0.825rem;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.link-orange {
    color: #ea580c;
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 600;
    transition: color 0.15s ease;
}

    .link-orange:hover {
        color: #c2410c;
        text-decoration: underline;
    }

/* Captcha Block */
.captcha-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .captcha-box .captcha-input-wrap {
        flex: 1 1 auto;
        min-width: 0;
    }

    .captcha-box .form-control {
        height: 44px;
        border: 1.5px solid #e2e8f0;
        border-radius: 10px;
        font-size: 0.85rem;
        padding: 0.45rem 0.65rem;
        width: 100%;
    }

        .captcha-box .form-control:focus {
            border-color: #f97316;
            box-shadow: 0 0 0 3.5px rgba(242, 101, 34, 0.12);
        }

.captcha-img-wrapper {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

#captchaImage {
    height: 44px;
    max-width: 105px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    object-fit: contain;
}

.btn-reload-captcha {
    width: 38px;
    height: 44px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

    .btn-reload-captcha:hover {
        background: #fff7ed;
        border-color: #ffedd5;
        color: #f26522;
        transform: rotate(90deg);
    }

/* Submit Button */
.btn-login-submit {
    background: linear-gradient(135deg, #f26522 0%, #ea580c 100%);
    border: none;
    color: #ffffff;
    height: 46px;
    width: 100%;
    font-size: 0.925rem;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(242, 101, 34, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    margin-top: 0.5rem;
}

    .btn-login-submit:hover {
        background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
        box-shadow: 0 8px 24px rgba(242, 101, 34, 0.38);
        transform: translateY(-1px);
        color: #ffffff;
    }

    .btn-login-submit:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(242, 101, 34, 0.2);
    }

.login-security-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.775rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

/* ---------------------- */
/* Bottom Footer Bar */
/* ---------------------- */
.login-bottom-bar {
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
    font-size: 0.8rem;
    color: #94a3b8;
}

.login-footer-links {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

    .login-footer-links a {
        color: #64748b;
        text-decoration: none;
        transition: color 0.15s ease;
    }

        .login-footer-links a:hover {
            color: #f26522;
        }

/* ---------------------- */
/* Responsive Breakpoints */
/* ---------------------- */
@media (max-width: 991px) {
    .login-form {
        padding: 2.25rem 1.75rem;
    }
    .login-top-bar,
    .login-bottom-bar {
        padding: 1rem 1.25rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .login-top-bar {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.65rem 0.85rem !important;
    }
    .login-top-links {
        gap: 0.35rem !important;
    }
    .btn-login-nav {
        padding: 0.35rem 0.65rem !important;
        font-size: 0.75rem !important;
    }
    .btn-login-nav:nth-child(2),
    .btn-login-nav:nth-child(3) {
        display: none !important; /* Keep only Home on very narrow phone viewports */
    }
    .login-nav-tag {
        display: none !important;
    }
    .login-nav-brand {
        font-size: 1.1rem !important;
    }
    .login-nav-logo {
        width: 32px !important;
        height: 32px !important;
    }
    .login-card-container {
        padding: 0 0.5rem !important;
        margin: 0.25rem auto 1rem auto !important;
    }
    .login-card {
        border-radius: 18px !important;
    }
    .login-form {
        padding: 1.5rem 1.15rem !important;
    }
    .login-header {
        margin-bottom: 1rem !important;
    }
    .login-header h2 {
        font-size: 1.35rem !important;
    }
    .login-header p {
        font-size: 0.8rem !important;
    }
    .login-avatar-badge {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    .input-group-custom .form-control {
        height: 42px !important;
        font-size: 0.85rem !important;
    }
    #captchaImage {
        max-width: 90px !important;
        height: 40px !important;
    }
    .btn-reload-captcha {
        width: 36px !important;
        height: 40px !important;
    }
    .captcha-box .form-control {
        height: 40px !important;
        font-size: 0.8rem !important;
    }
    .btn-login-submit {
        height: 44px !important;
        font-size: 0.875rem !important;
    }
    .login-bottom-bar {
        padding: 0.75rem !important;
        font-size: 0.725rem !important;
        flex-direction: column !important;
        gap: 0.4rem !important;
    }
}

/* =================================================================
   DARK MODE OVERRIDES (LOGIN PORTAL)
   ================================================================= */
html.darkmode .login-page-body,
body.darkmode.login-page-body,
[data-bs-theme="dark"] .login-page-body {
    background: #0b1120 !important;
    color: #f8fafc !important;
}

html.darkmode .login-nav-brand,
body.darkmode .login-nav-brand {
    color: #f8fafc !important;
}

html.darkmode .btn-login-nav,
body.darkmode .btn-login-nav {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

html.darkmode .btn-login-nav:hover,
body.darkmode .btn-login-nav:hover {
    background: #334155 !important;
    color: #f26522 !important;
    border-color: #475569 !important;
}

html.darkmode .login-card,
body.darkmode .login-card {
    background: #1e293b !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px #334155 !important;
}

html.darkmode .login-form,
body.darkmode .login-form {
    background: #1e293b !important;
}

html.darkmode .login-header h2,
body.darkmode .login-header h2 {
    color: #f8fafc !important;
}

html.darkmode .login-header p,
body.darkmode .login-header p {
    color: #94a3b8 !important;
}

html.darkmode .login-avatar-badge,
body.darkmode .login-avatar-badge {
    background: rgba(242, 101, 34, 0.15) !important;
    border-color: rgba(242, 101, 34, 0.3) !important;
    color: #fb923c !important;
}

html.darkmode .input-group-custom .form-control,
body.darkmode .input-group-custom .form-control {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html.darkmode .input-group-custom .form-control:focus,
body.darkmode .input-group-custom .form-control:focus {
    background: #0f172a !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 0 3.5px rgba(242, 101, 34, 0.25) !important;
}

html.darkmode .input-group-custom .input-icon,
body.darkmode .input-group-custom .input-icon {
    color: #64748b !important;
}

html.darkmode .input-group-custom .form-control:focus + .input-icon,
html.darkmode .input-group-custom:focus-within .input-icon,
body.darkmode .input-group-custom .form-control:focus + .input-icon,
body.darkmode .input-group-custom:focus-within .input-icon {
    color: #f26522 !important;
}

html.darkmode .btn-toggle-password,
body.darkmode .btn-toggle-password {
    color: #64748b !important;
}

html.darkmode .btn-toggle-password:hover,
body.darkmode .btn-toggle-password:hover {
    color: #f8fafc !important;
}

html.darkmode .form-check-label,
body.darkmode .form-check-label {
    color: #cbd5e1 !important;
}

html.darkmode .form-check-input,
body.darkmode .form-check-input {
    background-color: #0f172a !important;
    border-color: #475569 !important;
}

html.darkmode .captcha-box .form-control,
body.darkmode .captcha-box .form-control {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html.darkmode #captchaImage,
body.darkmode #captchaImage {
    border-color: #334155 !important;
    background: #0f172a !important;
}

html.darkmode .btn-reload-captcha,
body.darkmode .btn-reload-captcha {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

html.darkmode .btn-reload-captcha:hover,
body.darkmode .btn-reload-captcha:hover {
    background: #1e293b !important;
    border-color: #f26522 !important;
    color: #f26522 !important;
}

html.darkmode .login-security-footer,
body.darkmode .login-security-footer {
    color: #64748b !important;
}

html.darkmode .login-bottom-bar,
body.darkmode .login-bottom-bar {
    color: #64748b !important;
}

html.darkmode .login-footer-links a,
body.darkmode .login-footer-links a {
    color: #94a3b8 !important;
}

html.darkmode .login-footer-links a:hover,
body.darkmode .login-footer-links a:hover {
    color: #f8fafc !important;
}
