/* Login page styles — scoped to .login-page and child elements */

html, body {
    height: 100%;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
    background: #031f44; /* prevents body colour showing around the fixed overlay */
}

.login-page {
    background: url('../images/ipros_bg.png') center center / cover no-repeat fixed;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 9999; /* sit above every app-layout element */
}

/* app.blade.php injects 30px/15px padding here; zero it out so body colour never bleeds through */
.content-wrapper {
    padding: 0 !important;
}

/* ---- Split container ---- */

.login-split-container {
    display: flex;
    height: calc(100vh - 48px); /* 48px = footer height */
    width: 100%;
}

/* ---- Left branding panel ---- */

.login-left {
    flex: 1;
    background: transparent; /* override app.blade.php gradient */
    display: flex;
    align-items: center;
    padding: 60px 80px;
}

.login-left-content {
    max-width: 540px;
}

.login-heading {
    font-family: 'DM Sans', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 24px;
    line-height: 1;
    letter-spacing: 0;
}

.login-heading .text-accent {
    color: #F5C518;
}

.connecting-img {
    max-width: 100%;
    height: auto;
    margin-bottom: 24px;
    display: block;
}

.login-subtext {
    font-family: 'DM Sans', sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #fff;
    line-height: 1;
    letter-spacing: 0;
    margin: 0;
}

/* ---- Right login panel ---- */

.login-right {
    flex: 0 0 52%;
    position: relative;
    background: transparent; /* override app.blade.php white background */
    box-shadow: none;        /* override app.blade.php box-shadow */
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 40px 80px 40px 48px;
}

/* Frosted-glass diagonal panel — dark navy overlay so white elements are readable */
.login-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    clip-path: polygon(45% 0%, 100% 0%, 100% 100%, 0% 100%);
    z-index: 1;
}

/* ---- Login card ---- */

.login-card {
    position: relative;
    z-index: 2; /* above ::before frosted panel */
    width: 100%;
    max-width: 360px;
    background: transparent; /* no white card — form floats on glass */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tm-logo {
    width: 130px;
    margin-bottom: 12px;
}

.login-brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff; /* white on dark glass */
    margin-bottom: 28px;
    letter-spacing: 4px;
    text-align: center;
}

/* ---- Alert banners ---- */

.login-alert-error {
    width: 100%;
    background: rgba(180, 30, 40, 0.75);
    color: #ffe8e8;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

.login-alert-success {
    width: 100%;
    background: rgba(20, 120, 60, 0.75);
    color: #e8ffe8;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

.login-loading-text {
    width: 100%;
    text-align: center;
    margin: 20px 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
}

/* ---- Form fields ---- */

.field-group {
    width: 100%;
    margin-bottom: 16px;
}

.field-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9); /* white on dark glass */
    margin-bottom: 6px;
}

.form-control-modern {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    transition: border-color 0.2s;
}

.form-control-modern:focus {
    border-color: rgba(255, 255, 255, 0.8);
    background: #fff;
}

.form-control-modern::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

/* ---- Password toggle ---- */

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .form-control-modern {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #bbb;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    color: #555;
}

/* ---- Sign In button ---- */

.btn-signin {
    width: 100%;
    padding: 13px;
    background: #1200c8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    transition: background 0.2s;
    box-sizing: border-box;
    cursor: pointer;
}

.btn-signin:hover {
    background: #0d0099;
}

/* ---- Forgot password ---- */

.forgot-link {
    color: rgba(255, 255, 255, 0.75); /* light on dark glass */
    font-size: 13px;
    text-decoration: underline;
    display: block;
    text-align: right;
    width: 100%;
}

.forgot-link:hover {
    color: #fff;
}

/* ---- "or" divider (shown in azure section) ---- */

.or-divider {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 20px 0 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.35);
}

.or-divider span {
    padding: 0 14px;
}

/* ---- Microsoft sign-in button ---- */

.btn-microsoft {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #444;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 800;
    padding: 11px;
    transition: box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.btn-microsoft:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #bbb;
    color: #333;
    text-decoration: none;
}

.btn-microsoft img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.mfa-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
}

/* ---- Validation feedback ---- */

.invalid-feedback {
    display: block;
    color: #ff8080; /* light red — readable on dark glass */
    font-size: 13px;
    margin-top: 4px;
}

/* ---- Footer ---- */

footer.footer-bar {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: 48px;
    z-index: 10;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.footer-bar-svg {
    flex: 0 0 120px;
    width: 120px;
    height: 100%;
    background: url('../images/footer_left_internal.svg') left center / 120px 100% no-repeat;
    background-color: #fff;
    z-index: 2;
}

.footer-bar-blue {
    flex: 1 1 auto;
    background: #1800e7;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #fff;
    padding-right: 40px;
    height: 100%;
    z-index: 1;
}

/* ---- Responsive ---- */

/* Counteract app.blade.php's 968px rule that stacks panels and hides the login form */
@media (max-width: 968px) and (min-width: 701px) {
    .login-split-container {
        flex-direction: row !important;
        height: calc(100vh - 48px) !important;
        min-height: unset !important;
    }

    .login-left {
        flex: 0 0 42%;
        overflow: hidden;
    }

    .login-right {
        flex: 1;
        padding: 24px 40px;
    }
}

/* Short landscape phones: full-width glass, centred card, no diagonal */
@media (orientation: landscape) and (max-height: 500px) {
    .login-left {
        display: none !important;
    }

    /* Stretch glass to cover the whole viewport */
    .login-right::before {
        clip-path: none;
        background: rgba(10, 20, 50, 0.45);
    }

    .login-right {
        flex: 1 !important;
        justify-content: center;
        padding: 16px 40px !important;
        overflow-y: auto;
    }

    .login-split-container {
        height: calc(100vh - 48px);
        overflow: hidden;
    }

    .login-page {
        overflow: hidden;
    }
}

@media (max-width: 1100px) {
    .login-heading {
        font-size: 2.4rem;
    }

    .login-right {
        flex: 0 0 56%;
    }
}

@media (max-width: 900px) {
    .login-left {
        padding: 40px;
    }

    .login-heading {
        font-size: 2rem;
    }

    .login-right {
        flex: 0 0 55%;
    }
}

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

    .login-left {
        display: none;
    }

    .login-right {
        flex: 1;
    }

    /* Remove diagonal on small screens */
    .login-right::before {
        clip-path: none;
    }

    .login-page {
        overflow-y: auto;
        position: relative;
    }

    html, body {
        overflow-y: auto;
    }
}
