﻿

:root {
    --navy: #071b4d;
    --text: #111827;
    --muted: #71809d;
    --teal: #00b8c5;
    --teal-dark: #008aa4;
    --blue: #079cff;
    --aqua: #00d8c5;
    --gold: #ffb000;
    --border: #bcecf3;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', Arial, sans-serif;
    color: var(--text);
    background: #f4fdff;
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

    button:focus-visible,
    input:focus-visible,
    a:focus-visible {
        outline: 3px solid #20bccc;
        outline-offset: 3px;
    }

svg {
    display: block;
}

/* =====================================================
   1. ANIMATED BACKGROUND
   ===================================================== */

.page-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient( ellipse at 75% 22%, rgba(126, 251, 250, .30), transparent 43% ), radial-gradient( ellipse at 8% 78%, rgba(58, 227, 236, .20), transparent 48% ), linear-gradient( 125deg, #ffffff 0%, #f2ffff 48%, #e8fdff 100% );
}

.background-waves {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: waveDrift 17s ease-in-out infinite alternate;
}

.wave-upper {
    animation: moveUpper 15s ease-in-out infinite alternate;
    transform-origin: center;
}

.wave-lower {
    animation: moveLower 18s ease-in-out infinite alternate;
    transform-origin: center;
}

/* Soft floating lights */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(22px);
    opacity: .55;
    pointer-events: none;
}

.orb-one {
    width: 320px;
    height: 320px;
    top: 10%;
    right: 17%;
    background: #9bffff;
    animation: floatOrb 9s ease-in-out infinite alternate;
}

.orb-two {
    width: 280px;
    height: 280px;
    left: -90px;
    bottom: 15%;
    background: #8be9fb;
    animation: floatOrb 12s ease-in-out infinite alternate-reverse;
}

.orb-three {
    width: 210px;
    height: 210px;
    right: 8%;
    bottom: 5%;
    background: #abfff5;
    animation: floatOrb 11s ease-in-out infinite alternate;
}

@keyframes floatOrb {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(25px, -32px, 0);
    }
}

@keyframes waveDrift {
    from {
        transform: translateX(-1%) scale(1.02);
    }

    to {
        transform: translateX(1%) scale(1.06);
    }
}

@keyframes moveUpper {
    from {
        transform: translate(-18px, 0);
    }

    to {
        transform: translate(20px, 14px);
    }
}

@keyframes moveLower {
    from {
        transform: translate(12px, 8px);
    }

    to {
        transform: translate(-20px, -14px);
    }
}


/* =====================================================
   2. TOP NAVIGATION
   ===================================================== */

.login-topbar {
    min-height: 76px;
    width: 100%;
    padding: 10px clamp(18px, 4vw, 65px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    z-index: 5;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 4px 24px rgba(0, 129, 167, .10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.brand-symbol {
    display: grid;
    grid-template-columns: repeat(2, 20px);
    grid-template-rows: repeat(2, 20px);
    gap: 4px;
    flex-shrink: 0;
}

    .brand-symbol span {
        border-radius: 5px;
        background: linear-gradient( 135deg, #28e1e7, #007e9d );
        box-shadow: 0 2px 7px rgba(0, 145, 164, .19);
    }

        .brand-symbol span:nth-child(2),
        .brand-symbol span:nth-child(3) {
            background: linear-gradient( 135deg, #00afbd, #005e82 );
        }

.brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .brand-copy strong {
        font-size: clamp(19px, 2vw, 28px);
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: -1.1px;
    }

    .brand-copy small {
        font-size: 12px;
        color: #7181a5;
        margin-top: 4px;
    }

.header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-shrink: 0;
}

.header-help {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    color: #182334;
    font-size: 13px;
    font-weight: 500;
}

    .header-help svg {
        width: 22px;
        height: 22px;
        color: #00a8dc;
    }

.contact-button {
    padding: 11px 22px;
    border: 1.5px solid #00abd1;
    border-radius: 12px;
    color: #009bc7;
    background: #f1fdff;
    font-size: 13px;
    transition: background .25s, transform .25s, box-shadow .25s;
}

    .contact-button:hover {
        color: white;
        background: #009fc0;
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(0, 158, 190, .2);
    }


/* =====================================================
   3. TWO-COLUMN DESKTOP PAGE
   ===================================================== */

.login-main {
    width: min(100%, 1720px);
    min-height: calc(100svh - 130px);
    margin: 0 auto;
    padding: clamp(20px, 3vw, 42px) clamp(18px, 4vw, 65px);
    display: grid;
    grid-template-columns: minmax(0, 1.52fr) minmax(390px, 1fr);
    align-items: center;
    gap: clamp(25px, 3.2vw, 58px);
}

/* =====================================================
   4. LEFT HEADING
   ===================================================== */

.hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.hero-heading {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: clamp(20px, 3vw, 40px);
}

.heading-accent {
    width: 8px;
    height: 110px;
    border-radius: 20px;
    flex-shrink: 0;
    background: linear-gradient( to bottom, #00b5b3 0%, #00cebf 64%, #ffb500 100% );
}

.heading-copy {
    min-width: 0;
}

    .heading-copy p {
        margin: 0 0 3px;
        font-size: clamp(17px, 2vw, 28px);
        font-weight: 700;
        letter-spacing: 3px;
    }

    .heading-copy h1 {
        margin: 0;
        color: #06090d;
        font-size: clamp(32px, 3.65vw, 59px);
        font-weight: 800;
        line-height: 1.2;
        padding-bottom: 4px;
        letter-spacing: -2px;
    }


/* =====================================================
   5. CONNECTIVITY DIAGRAM
   ===================================================== */

.connect-map {
    position: relative;
    width: 100%;
    min-width: 0;
}

/* Central Re-Distribution hub */
.flow-hub {
    width: min(330px, 62%);
    min-height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 50px;
    border: 2px solid white;
    background: linear-gradient( 130deg, #00ced2, #00a9b6 60%, #008ea7 );
    color: white;
    box-shadow: 0 0 0 3px rgba(11, 216, 216, .12), 0 6px 23px rgba(0, 192, 207, .43);
    animation: hubGlow 3.5s ease-in-out infinite alternate;
}

    .flow-hub strong {
        position: relative;
        z-index: 2;
        font-size: clamp(13px, 1.6vw, 22px);
        font-weight: 700;
        white-space: nowrap;
    }

.hub-icon {
    position: relative;
    z-index: 2;
}

    .hub-icon svg {
        width: 40px;
        height: 40px;
        stroke-width: 1.8;
    }

.hub-shine {
    position: absolute;
    inset: -100% auto -100% -40%;
    width: 40%;
    z-index: 1;
    background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, .28), transparent );
    transform: rotate(30deg);
    animation: hubShimmer 5s linear infinite;
}

@keyframes hubGlow {
    from {
        box-shadow: 0 0 0 3px rgba(11, 216, 216, .10), 0 5px 17px rgba(0, 192, 207, .30);
    }

    to {
        box-shadow: 0 0 0 6px rgba(11, 216, 216, .13), 0 8px 27px rgba(0, 192, 207, .50);
    }
}

@keyframes hubShimmer {
    0%, 55% {
        left: -50%;
    }

    100% {
        left: 150%;
    }
}

/* Main diagram columns */
.flow-network {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(5px, 1.2vw, 17px);
    margin-top: 30px;
    padding-top: 23px;
}

    /* Horizontal connector line */
    .flow-network::before {
        content: "";
        position: absolute;
        top: 0;
        left: 10%;
        right: 10%;
        height: 3px;
        border-radius: 5px;
        background: linear-gradient( 90deg, #079cff 0%, #079cff 26%, #00d6c8 42%, #00d6c8 61%, #ffb000 80%, #ffb000 100% );
        transform-origin: center;
        animation: drawRail 1.3s ease-out both;
    }

    /* Vertical connector from hub to rail */
    .flow-network::after {
        content: "";
        position: absolute;
        top: -30px;
        left: calc(50% - 1.5px);
        width: 3px;
        height: 30px;
        background: #00d4cb;
        box-shadow: 0 0 9px #00dfd34d;
        animation: drawVertical .6s ease-out both;
    }

@keyframes drawRail {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

@keyframes drawVertical {
    from {
        transform: scaleY(0);
        transform-origin: top;
    }

    to {
        transform: scaleY(1);
        transform-origin: top;
    }
}

/* Three colour-coded branches */
.flow-branch {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding-top: 18px;
    --branch-color: #079cff;
    --branch-rgb: 7, 156, 255;
}

.branch-blue {
    --branch-color: #079cff;
    --branch-rgb: 7, 156, 255;
}

.branch-aqua {
    --branch-color: #00d7c6;
    --branch-rgb: 0, 215, 198;
}

.branch-gold {
    --branch-color: #ffb000;
    --branch-rgb: 255, 176, 0;
}

/* Vertical trunk */
.flow-branch::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 22px;
    left: 11px;
    width: 3px;
    border-radius: 5px;
    background: var(--branch-color);
    box-shadow: 0 0 8px rgba(var(--branch-rgb), .25);
    transform-origin: top;
    animation: drawVertical .85s ease-out both;
}

/* Connection to each card */
.flow-module {
    position: relative;
    padding-left: 28px;
    min-width: 0;
}

    /* Round light-up connector node */
    .flow-module::before {
        content: "";
        position: absolute;
        left: 3px;
        top: 24px;
        width: 15px;
        height: 15px;
        border-radius: 50%;
        border: 3px solid var(--branch-color);
        background: #f1ffff;
        box-shadow: 0 0 10px rgba(var(--branch-rgb), .50);
        z-index: 2;
        animation: connectorPulse 3s ease-in-out infinite;
    }

    /* Horizontal short link */
    .flow-module::after {
        content: "";
        position: absolute;
        left: 14px;
        top: 31px;
        width: 17px;
        height: 3px;
        background: var(--branch-color);
    }

@keyframes connectorPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(var(--branch-rgb), .25);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(var(--branch-rgb), .12), 0 0 12px rgba(var(--branch-rgb), .50);
    }
}

/* Module cards */
.module-card {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 65px;
    padding: 5px 8px 5px 4px;
    border: 1px solid rgba(var(--branch-rgb), .35);
    border-radius: 16px;
    background: rgba(255, 255, 255, .90);
    box-shadow: 0 7px 18px rgba(8, 126, 149, .13), inset 0 1px 0 rgba(255, 255, 255, .8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s, border-color .28s;
}

.flow-module:hover .module-card {
    transform: translateY(-4px);
    border-color: var(--branch-color);
    box-shadow: 0 11px 25px rgba(var(--branch-rgb), .22);
}

.module-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 47px;
    height: 47px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #ffffff;
    color: var(--branch-color);
    box-shadow: 0 0 0 1px rgba(var(--branch-rgb), .55), 0 3px 10px rgba(var(--branch-rgb), .12);
}

    .module-icon svg {
        width: 28px;
        height: 28px;
        stroke-width: 2.1;
    }

.module-name {
    font-size: clamp(10px, 1.05vw, 14px);
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}


/* =====================================================
   6. RIGHT LOGIN PANEL
   ===================================================== */

.login-panel {
    position: relative;
    width: 100%;
    max-width: 590px;
    margin: 0 auto;
    padding: clamp(24px, 3vw, 46px) clamp(22px, 3.1vw, 49px);
    border-radius: 23px;
    border: 1px solid rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .90);
    box-shadow: 0 18px 45px rgba(0, 145, 174, .12), 0 0 0 1px rgba(55, 221, 233, .18);
    backdrop-filter: blur(19px);
    -webkit-backdrop-filter: blur(19px);
    overflow: hidden;
}

    /* Gentle reflected light across login card */
    .login-panel::before {
        content: "";
        position: absolute;
        top: -170px;
        right: -150px;
        width: 320px;
        height: 320px;
        border-radius: 50%;
        background: radial-gradient( circle, rgba(69, 239, 237, .16), transparent 68% );
        pointer-events: none;
    }

/* Staff access badge */
.access-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 17px;
    border-radius: 40px;
    background: #e0f9fc;
    color: #101c2b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .4px;
}

    .access-badge svg {
        width: 24px;
        height: 24px;
        color: #009fd3;
    }

/* Login title */
.login-intro {
    margin-top: 26px;
    margin-bottom: 29px;
}

    .login-intro h2 {
        margin: 0 0 6px;
        font-size: clamp(30px, 3.15vw, 47px);
        line-height: 1.08;
        font-weight: 800;
        letter-spacing: -1.8px;
        color: #080c13;
    }

    .login-intro p {
        margin: 0;
        font-size: clamp(13px, 1.3vw, 17px);
        color: #252e3b;
        line-height: 1.5;
    }

/* =====================================================
   7. INPUT FIELDS
   ===================================================== */

.field-group {
    margin-bottom: 22px;
}

    .field-group label {
        display: block;
        margin-bottom: 9px;
        font-size: 14px;
        font-weight: 600;
        color: #171d28;
    }

/* Input with icon */
.input-shell {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 61px;
    padding: 0 17px;
    border: 1.5px solid #b3eaf3;
    border-radius: 12px;
    background: rgba(245, 254, 255, .65);
    transition: border-color .23s, box-shadow .23s, background .23s, transform .23s;
}

    .input-shell > svg {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
        color: #00b9ce;
        stroke-width: 2;
    }

    .input-shell:focus-within {
        border-color: #00bbc9;
        background: white;
        box-shadow: 0 0 0 4px rgba(0, 188, 205, .11), 0 7px 20px rgba(0, 154, 174, .09);
        transform: translateY(-1px);
    }

    .input-shell input {
        flex: 1;
        min-width: 0;
        width: 100%;
        height: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        color: #142744;
        font-size: 14px;
    }

        .input-shell input::placeholder {
            color: #9aa1c6;
            opacity: 1;
        }

/* Show/hide password button */
.password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #777ba5;
    transition: background .2s, color .2s, transform .2s;
}

    .password-toggle:hover {
        background: #e9f6fb;
        color: #008fa6;
        transform: scale(1.08);
    }

    .password-toggle svg {
        width: 22px;
        height: 22px;
    }

.input-shell.has-error {
    border-color: #ed6576;
    box-shadow: 0 0 0 3px rgba(237, 101, 118, .10);
}

/* =====================================================
   8. REMEMBER ME / FORGOT PASSWORD
   ===================================================== */

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 5px 0 22px;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}

    .remember-label input {
        appearance: none;
        width: 21px;
        height: 21px;
        margin: 0;
        border: 2px solid #00afc2;
        border-radius: 5px;
        background: white;
        cursor: pointer;
        transition: background .2s, transform .2s, border-color .2s;
    }

        .remember-label input:checked {
            background: #00aebb;
            border-color: #00aebb;
            transform: scale(1.05);
        }

            .remember-label input:checked::after {
                content: "";
                display: block;
                width: 5px;
                height: 9px;
                border: solid white;
                border-width: 0 2px 2px 0;
                transform: rotate(45deg);
                margin: 2px 0 0 6px;
            }

.forgot-button {
    border: 0;
    padding: 5px 0;
    background: transparent;
    color: #182638;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 13px;
}

    .forgot-button:hover {
        color: #008fa6;
    }


/* =====================================================
   9. LOGIN BUTTON
   ===================================================== */

.login-submit {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    min-height: 61px;
    overflow: hidden;
    border: 0;
    border-radius: 13px;
    background: linear-gradient( 110deg, #007f9c 0%, #00b2c1 60%, #00c8c7 100% );
    color: white;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 7px 20px rgba(0, 153, 170, .18);
    transition: transform .22s, box-shadow .22s, filter .22s;
}

    .login-submit::before {
        content: "";
        position: absolute;
        z-index: -1;
        top: -100%;
        bottom: -100%;
        left: -45%;
        width: 38%;
        background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, .28), transparent );
        transform: rotate(25deg);
        transition: left .65s;
    }

    .login-submit:hover:not(:disabled) {
        transform: translateY(-3px);
        filter: brightness(1.04);
        box-shadow: 0 12px 27px rgba(0, 153, 170, .32);
    }

    .login-submit:hover::before {
        left: 120%;
    }

    .login-submit:active {
        transform: scale(.99);
    }

    .login-submit:disabled {
        cursor: default;
        opacity: .8;
    }

    .login-submit svg {
        width: 25px;
        height: 25px;
        transition: transform .25s;
    }

    .login-submit:hover svg {
        transform: translateX(5px);
    }

/* Message below login button */
.login-message {
    min-height: 16px;
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: #a34858;
}

    .login-message.success {
        color: #007f86;
    }

/* =====================================================
   10. LOGIN CARD FOOTER
   ===================================================== */

.login-card-footer {
    border-top: 1px solid #c6ccdf;
    margin-top: 14px;
    padding-top: 16px;
    text-align: center;
}

    .login-card-footer p {
        margin: 0 0 5px;
        font-size: 13px;
        color: #273341;
    }

    .login-card-footer strong {
        display: block;
        font-size: 13px;
        color: #101b2c;
        font-weight: 600;
    }

.demo-notice {
    display: block;
    margin-top: 12px;
    color: #7785a0;
    font-size: 10px;
}


/* =====================================================
   11. PAGE FOOTER
   ===================================================== */

.login-footer {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding: 10px clamp(18px, 4vw, 65px) 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 11px;
    color: #7180a1;
}

.footer-portal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .footer-portal svg {
        width: 21px;
        height: 21px;
        color: #00a6d0;
    }


/* =====================================================
   12. HELP DIALOG
   ===================================================== */

.help-dialog {
    width: min(410px, calc(100vw - 28px));
    padding: 24px;
    border: 1px solid #daf2f5;
    border-radius: 17px;
    box-shadow: 0 20px 65px rgba(0, 32, 55, .25);
    color: #263548;
    background: white;
}

    .help-dialog::backdrop {
        background: rgba(4, 27, 51, .45);
        backdrop-filter: blur(4px);
    }

.help-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.help-dialog h3 {
    margin: 0;
    font-size: 20px;
    color: var(--navy);
}

.help-dialog-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    width: 31px;
    height: 31px;
    background: #eef7fa;
    color: #177c9b;
}

.help-dialog p {
    margin: 17px 0;
    line-height: 1.6;
    font-size: 13px;
}

.help-dialog-ok {
    width: 100%;
    padding: 11px;
    border: 0;
    border-radius: 9px;
    background: #009bb2;
    color: white;
    font-weight: 700;
}


/* =====================================================
   13. SMALLER DESKTOP / LAPTOP
   ===================================================== */

@media (max-width: 1250px) and (min-width: 961px) {

    .login-main {
        grid-template-columns: minmax(0, 1.2fr) minmax(360px, .95fr);
        gap: 25px;
        padding-left: 22px;
        padding-right: 22px;
    }

    .hero-heading {
        gap: 13px;
    }

    .heading-copy h1 {
        font-size: clamp(30px, 3.5vw, 45px);
    }

    .module-card {
        padding: 4px 5px 4px 3px;
        gap: 4px;
    }

    .module-icon {
        width: 38px;
        height: 38px;
    }

        .module-icon svg {
            width: 22px;
            height: 22px;
        }

    .module-name {
        font-size: 10px;
    }

    .flow-module {
        padding-left: 25px;
    }

    .login-panel {
        padding: 26px;
    }
}

/* Short desktop windows: reduce outer gaps */
@media (max-height: 780px) and (min-width: 961px) {

    .login-main {
        align-items: start;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .hero-heading {
        margin-bottom: 15px;
    }

    .heading-accent {
        height: 82px;
    }

    .flow-hub {
        min-height: 59px;
    }

    .flow-network {
        margin-top: 25px;
        padding-top: 14px;
    }

    .flow-branch {
        gap: 7px;
        padding-top: 12px;
    }

    .module-card {
        min-height: 52px;
    }

    .flow-module::before {
        top: 18px;
    }

    .flow-module::after {
        top: 25px;
    }

    .login-intro {
        margin-top: 17px;
        margin-bottom: 18px;
    }

    .field-group {
        margin-bottom: 15px;
    }

    .input-shell,
    .login-submit {
        min-height: 53px;
        height: 53px;
    }
}


/* =====================================================
   14. TABLET RESPONSIVE LAYOUT
   Heading -> Login -> Connections
   ===================================================== */

@media (max-width: 960px) {

    .login-main {
        width: 100%;
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "heading"
            "login"
            "connections";
        gap: 27px;
        padding: 30px 20px;
    }

    /* Allows the hero's children to be rearranged */
    .hero-panel {
        display: contents;
    }

    .hero-heading {
        grid-area: heading;
        width: min(100%, 750px);
        margin: 0 auto;
    }

    .connect-map {
        grid-area: connections;
        width: min(100%, 800px);
        margin: 12px auto 0;
    }

    .login-panel {
        grid-area: login;
        width: min(100%, 620px);
        max-width: 620px;
    }

    .heading-accent {
        height: 88px;
    }

    .heading-copy h1 {
        font-size: clamp(30px, 6vw, 48px);
    }

    .module-name {
        font-size: 12px;
    }

    .login-footer {
        padding-top: 12px;
    }
}


/* =====================================================
   15. MOBILE RESPONSIVE LAYOUT
   ===================================================== */

@media (max-width: 640px) {

    .login-topbar {
        min-height: 64px;
        padding: 9px 13px;
        gap: 9px;
    }

    .login-brand {
        gap: 9px;
    }

    .brand-symbol {
        grid-template-columns: repeat(2, 13px);
        grid-template-rows: repeat(2, 13px);
        gap: 3px;
    }

    .brand-copy strong {
        font-size: 16px;
        letter-spacing: -.65px;
    }

    .brand-copy small {
        font-size: 9px;
        line-height: 1.2;
    }

    .header-actions {
        gap: 5px;
    }

    .header-help {
        padding: 6px;
    }

        .header-help span {
            display: none;
        }

        .header-help svg {
            width: 20px;
            height: 20px;
        }

    .contact-button {
        padding: 8px 10px;
        border-radius: 9px;
        font-size: 11px;
    }

    .login-main {
        padding: 23px 12px 16px;
        gap: 21px;
    }

    .hero-heading {
        gap: 11px;
    }

    .heading-accent {
        width: 5px;
        height: 67px;
    }

    .heading-copy p {
        font-size: 13px;
        letter-spacing: 1.5px;
    }

    .heading-copy h1 {
        font-size: clamp(24px, 7vw, 35px);
        letter-spacing: -1px;
    }

    /* Comfortable mobile login form */
    .login-panel {
        border-radius: 17px;
        padding: 24px 19px;
    }

    .access-badge {
        padding: 9px 13px;
        font-size: 11px;
    }

        .access-badge svg {
            width: 20px;
            height: 20px;
        }

    .login-intro {
        margin-top: 20px;
        margin-bottom: 23px;
    }

        .login-intro h2 {
            font-size: 31px;
            letter-spacing: -1px;
        }

        .login-intro p {
            font-size: 13px;
        }

    .field-group {
        margin-bottom: 19px;
    }

        .field-group label {
            font-size: 13px;
        }

    .input-shell {
        height: 55px;
        padding: 0 12px;
        gap: 10px;
    }

        .input-shell input {
            font-size: 13px;
        }

    .login-options {
        gap: 8px;
        flex-wrap: wrap;
    }

    .remember-label,
    .forgot-button {
        font-size: 12px;
    }

    .login-submit {
        min-height: 55px;
        font-size: 17px;
    }

    /* Connectivity cards stack vertically on phones */
    .connect-map {
        margin-top: 8px;
    }

    .flow-hub {
        width: min(100%, 300px);
        min-height: 63px;
    }

        .flow-hub strong {
            font-size: 17px;
        }

    .hub-icon svg {
        width: 30px;
        height: 30px;
    }

    .flow-network {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 17px;
        max-width: 410px;
        margin: 16px auto 0;
        padding-top: 0;
    }

        /* Hide desktop connector rail on mobile */
        .flow-network::before,
        .flow-network::after {
            display: none;
        }

    .flow-branch {
        gap: 9px;
        padding-top: 5px;
    }

        .flow-branch::before {
            top: 0;
            bottom: 22px;
        }

    .flow-module {
        padding-left: 29px;
    }

        .flow-module::before {
            top: 18px;
        }

        .flow-module::after {
            top: 25px;
        }

    .module-card {
        min-height: 54px;
        border-radius: 13px;
        padding: 5px 10px;
    }

    .module-icon {
        width: 38px;
        height: 38px;
    }

        .module-icon svg {
            width: 23px;
            height: 23px;
        }

    .module-name {
        font-size: 13px;
    }

    /* Footer stacks nicely on mobile */
    .login-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 9px;
        padding: 12px 15px 22px;
    }

    /* Reduce background movement on small screens */
    .glow-orb {
        opacity: .35;
    }
}


/* =====================================================
   16. ACCESSIBILITY - REDUCED MOTION
   ===================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}





/* ============================================
   LOGIN PAGE - COMPACT ONE SCREEN DESKTOP
   Does not change mobile layout
   ============================================ */

@media (min-width: 961px) {

    /* Reduce header height */
    .login-topbar {
        min-height: 66px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    /* Reduce outer vertical space */
    .login-main {
        min-height: calc(100dvh - 105px);
        padding-top: 8px;
        padding-bottom: 8px;
        align-items: center;
    }

    /* ===== LEFT SIDE HEADING ===== */

    .hero-heading {
        margin-bottom: 14px;
        gap: 15px;
        position: relative;
        top: -25px;
    }

    .heading-accent {
        height: 74px;
        width: 7px;
    }

    /* RE-DISTRIBUTION */
    .heading-copy p {
        font-size: clamp(16px, 1.45vw, 22px);
        letter-spacing: 2px;
    }

    /* Management Solution - smaller font */
    .heading-copy h1 {
        font-size: clamp(31px, 2.7vw, 46px);
        line-height: 1.05;
        letter-spacing: -1.5px;
    }

    /* ===== CENTRAL HUB ===== */

    .flow-hub {
        min-height: 58px;
        width: min(300px, 62%);
    }

    .hub-icon svg {
        width: 31px;
        height: 31px;
    }

    /* Connectivity network spacing */
    .flow-network {
        margin-top: 20px;
        padding-top: 12px;
    }

        .flow-network::after {
            top: -20px;
            height: 20px;
        }

    .flow-branch {
        gap: 8px;
        padding-top: 10px;
    }

    /* Slightly shorter connectivity cards */
    .module-card {
        min-height: 52px;
        border-radius: 12px;
    }

    .module-icon {
        width: 38px;
        height: 38px;
    }

        .module-icon svg {
            width: 23px;
            height: 23px;
        }

    /* Keep connector circles aligned */
    .flow-module::before {
        top: 18px;
    }

    .flow-module::after {
        top: 25px;
    }

    /* ===== RIGHT LOGIN PANEL ===== */

    .login-panel {
        padding: 20px 27px;
    }

    .access-badge {
        padding: 9px 13px;
    }

    .login-intro {
        margin-top: 15px;
        margin-bottom: 16px;
    }

        /* Welcome back heading */
        .login-intro h2 {
            font-size: clamp(28px, 2.35vw, 38px);
        }

    /* Input spacing */
    .field-group {
        margin-bottom: 12px;
    }

        .field-group label {
            margin-bottom: 6px;
        }

    .input-shell {
        height: 51px;
    }

    /* Remember me / Forgot password */
    .login-options {
        margin: 0 0 13px;
    }

    /* Login button */
    .login-submit {
        min-height: 51px;
    }

    .login-message {
        min-height: 12px;
        margin: 5px 0 0;
    }

    /* Bottom text inside login card */
    .login-card-footer {
        margin-top: 8px;
        padding-top: 10px;
    }

    .demo-notice {
        margin-top: 5px;
    }

    /* Main footer */
    .login-footer {
        padding-top: 3px;
        padding-bottom: 7px;
    }
}






/* Animate the text inside the heading.
   */

.heading-copy {
    animation: headingFloat 5s ease-in-out infinite;
}

@keyframes headingFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}







/* ================================================
   2. MANAGEMENT SOLUTION - TEXT SHIMMER
   ================================================ */

.heading-copy h1 {
    background: linear-gradient( 110deg, #080c13 30%, #176b78 68%, #080c13 65% );
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: headingShimmer 9s linear infinite;
}

@keyframes headingShimmer {
    0% {
        background-position: 100% center;
    }

    100% {
        background-position: -100% center;
    }
}


/* ================================================
   3. COLOURED VERTICAL LINE - GLOW
   ================================================ */

.heading-accent {
    animation: accentGlow 3s ease-in-out infinite;
}

@keyframes accentGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 200, 210, .15);
    }

    50% {
        box-shadow: 0 0 15px rgba(0, 200, 210, .55);
    }
}


/* ================================================
   4. CONNECTIVITY LINES - TRAVELLING LIGHT
   ================================================ */



.flow-branch::after {
    content: "";
    position: absolute;
    z-index: 3;
    left: 7px;
    top: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--branch-color);
    box-shadow: 0 0 8px var(--branch-color), 0 0 16px rgba(var(--branch-rgb), .35);
    pointer-events: none;
    /*Ball moving time*/
    animation: branchLightFlow 9s linear infinite;
}

@keyframes branchLightFlow {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        top: calc(100% - 25px);
        opacity: 0;
    }
}

/* Different timing for each branch */

.branch-blue::after {
    animation-delay: 0s;
}

.branch-aqua::after {
    animation-delay: -1.7s;
}

.branch-gold::after {
    animation-delay: -3.4s;
}


/* ================================================
   5. CONNECTIVITY CARDS - SOFT LIGHT SWEEP
   ================================================ */

.module-card {
    position: relative;
    overflow: hidden;
}

    /* Decorative shine passing over the cards */

    .module-card::after {
        content: "";
        position: absolute;
        top: -50%;
        left: -45%;
        width: 35%;
        height: 200%;
        background: linear-gradient( 90deg, transparent, rgba(0, 210, 220, .13), transparent );
        pointer-events: none;
        transform: translateX(-200%) rotate(20deg);
        animation: cardLightSweep 4.5s ease-in-out infinite;
    }

@keyframes cardLightSweep {
    0% {
        transform: translateX(-200%) rotate(20deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    75% {
        opacity: 1;
    }

    90% {
        transform: translateX(700%) rotate(20deg);
        opacity: 0;
    }

    100% {
        transform: translateX(700%) rotate(20deg);
        opacity: 0;
    }
}

/* Stagger the shine across different branches */

.branch-blue .module-card::after {
    animation-delay: 0s;
}

.branch-aqua .module-card::after {
    animation-delay: -2s;
}

.branch-gold .module-card::after {
    animation-delay: -4s;
}


/* ================================================
   ACCESSIBILITY - REDUCED MOTION
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    .heading-copy,
    .heading-copy h1,
    .heading-accent,
    .flow-branch::after,
    .module-card::after {
        animation: none !important;
    }
}








/* ===============================================
   box animationsss
   =============================================== */

/* Keep the card and its existing styling */
.module-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

    /* Animated colour layer inside each box */
    .module-card::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
        border-radius: inherit;
        background: linear-gradient( 110deg, rgba(var(--branch-rgb), 0.95), rgba(var(--branch-rgb), 0.78) );
        transform: scaleX(0);
        transform-origin: left center;
        opacity: 0;
        transition: transform 0.3s cubic-bezier(.2, .8, .2, 1), opacity 0.3s ease;
        pointer-events: none;
    }

    /* Keep icons and text above the colour animation */
    .module-card .module-icon,
    .module-card .module-name {
        position: relative;
        z-index: 1;
    }

    /* Existing decorative shine remains on top */
    .module-card::after {
        z-index: 2;
        pointer-events: none;
    }

   

    .module-card.flow-active::before {
        transform: scaleX(1);
        opacity: 1;
    }

    .module-card.flow-active {
        border-color: var(--branch-color);
        box-shadow: 0 0 0 2px rgba(var(--branch-rgb), 0.20), 0 0 20px rgba(var(--branch-rgb), 0.38), 0 8px 20px rgba(var(--branch-rgb), 0.22);
    }

/* Blue activated boxes: white text */
.branch-blue .module-card.flow-active .module-name {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Aqua and yellow: dark text for readability */
.branch-aqua .module-card.flow-active .module-name,
.branch-gold .module-card.flow-active .module-name {
    color: #073044;
}

/* Icons brighten during activation */
.module-card.flow-active .module-icon {
    background: #ffffff;
    color: var(--branch-color);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55), 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Smooth text colour transition */
.module-card .module-name {
    transition: color 0.25s ease;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .module-card::before,
    .module-card .module-name {
        transition: none;
    }
}






/* ============================================
   CONNECTIVITY - ANIMATED BORDER ONLY
   ============================================ */

/* Disable the previous full-box colour effect */
.module-card.flow-active::before {
    opacity: 0 !important;
    transform: scaleX(0) !important;
}

/* Single clean animated border */
.module-card.flow-active {
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid var(--branch-color);
    outline: none;
    animation: singleBorderGlow 650ms ease-in-out;
}

/* Smooth glowing border animation */
@keyframes borderPulse {

    0% {
        box-shadow: 0 0 0 0 rgba(var(--branch-rgb), 0);
    }

    40% {
        box-shadow: 0 0 0 3px rgba(var(--branch-rgb), 0.35), 0 0 22px rgba(var(--branch-rgb), 0.55);
    }

    100% {
        box-shadow: 0 0 0 1px rgba(var(--branch-rgb), 0.15), 0 0 8px rgba(var(--branch-rgb), 0.20);
    }
}

/* Keep original text colours */
.branch-blue .module-card.flow-active .module-name,
.branch-aqua .module-card.flow-active .module-name,
.branch-gold .module-card.flow-active .module-name {
    color: #111827;
    text-shadow: none;
}

/* Keep original icon appearance */
.module-card.flow-active .module-icon {
    background: #ffffff;
    color: var(--branch-color);
    box-shadow: 0 0 0 1px rgba(var(--branch-rgb), 0.55), 0 3px 10px rgba(var(--branch-rgb), 0.12);
}
