@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --kaynes-red: #a5252b;
    --red-bright: #d43b43;
    --ink: #101725;
    --muted: #8792a5;
    --cyan: #63dfff;
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: #080d17;
    color: #f7f9fc;
}

.login-shell {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(ellipse at 18% 52%, rgba(165,37,43,.25), transparent 38%), radial-gradient(ellipse at 78% 48%, rgba(21,91,131,.18), transparent 38%), linear-gradient(118deg, #090e18 0%, #101827 52%, #0a101b 100%);
}

.grid-overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: .22;
    background-image: linear-gradient(rgba(118,167,196,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(118,167,196,.09) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(90deg, #000, transparent 95%);
}

.ambient {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(95px);
    z-index: -2;
    pointer-events: none;
}

.ambient-one {
    background: rgba(165,37,43,.19);
    left: -180px;
    top: 22%;
}

.ambient-two {
    background: rgba(27,137,178,.12);
    right: -180px;
    bottom: -160px;
}

.brand-header {
    height: 92px;
    padding: 0 clamp(24px, 5vw, 76px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 3;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #fff;
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 11px;
    box-shadow: 0 7px 24px rgba(165,37,43,.25);
}

.brand-divider {
    width: 1px;
    height: 34px;
    background: rgba(255,255,255,.2);
}

.brand-name {
    font: 800 16px 'Manrope',sans-serif;
    letter-spacing: 2px;
}

    .brand-name span {
        display: block;
        font-size: 9px;
        letter-spacing: 3px;
        color: #aeb8c7;
        margin-top: 3px;
    }

.header-status {
    color: #a9b4c4;
    font-size: 10px;
    letter-spacing: 1.8px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.status-dot, .eyebrow span, .caption-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #54e3a1;
    box-shadow: 0 0 12px #54e3a1;
    display: inline-block;
}

.login-main {
    max-width: 1440px;
    min-height: calc(100vh - 92px);
    padding: 30px clamp(24px, 6vw, 90px) 24px;
    display: grid;
    grid-template-columns: minmax(0,1.1fr) minmax(390px,.9fr);
    align-items: center;
    gap: clamp(25px,5vw,90px);
    position: relative;
    z-index: 1;
}

.robot-panel {
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.robot-intro {
    align-self: flex-start;
    margin: 0 0 -18px 5%;
    position: relative;
    z-index: 2;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2.6px;
    color: #aab7c9;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .eyebrow span {
        background: #e34b53;
        box-shadow: 0 0 13px #e34b53;
    }

.robot-intro h1 {
    font: 800 clamp(35px,4vw,56px) 'Manrope',sans-serif;
    letter-spacing: -2.5px;
    margin: 13px 0 7px;
}

    .robot-intro h1 span {
        color: #f05a61;
    }

.robot-intro p {
    color: #aab5c5;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

.robot-stage {
    width: min(100%,590px);
    height: 470px;
    position: relative;
    margin-top: -3px;
}

#kaybotCanvas {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    z-index: 2;
    outline: none;
}

.robot-glow {
    position: absolute;
    width: 250px;
    height: 270px;
    left: 50%;
    top: 43%;
    transform: translate(-50%,-50%);
    border-radius: 50%;
    background: rgba(48,174,220,.16);
    filter: blur(75px);
}

.stage-ring {
    position: absolute;
    width: 310px;
    height: 80px;
    border: 1px solid rgba(90,207,239,.3);
    border-radius: 50%;
    left: 50%;
    bottom: 35px;
    transform: translateX(-50%) rotateX(65deg);
    box-shadow: 0 0 35px rgba(67,190,229,.12), inset 0 0 22px rgba(67,190,229,.08);
}

.stage-orbit {
    position: absolute;
    width: 370px;
    height: 110px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    left: 50%;
    top: 52%;
    transform: translate(-50%,-50%) rotate(-20deg);
}

.orbit-two {
    width: 420px;
    height: 150px;
    transform: translate(-50%,-50%) rotate(28deg);
    border-color: rgba(207,71,79,.16);
}

.robot-shadow {
    position: absolute;
    width: 190px;
    height: 24px;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    filter: blur(15px);
    border-radius: 50%;
    opacity: .7;
}

.robot-caption {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    font-size: 9px;
    letter-spacing: 2px;
    color: #c7d4e4;
    white-space: nowrap;
}

    .robot-caption small {
        color: #63dca6;
        font-size: 8px;
    }

.caption-pulse {
    width: 5px;
    height: 5px;
    margin-right: 7px;
}

.assistant-message {
    max-width: 390px;
    min-height: 47px;
    padding: 12px 18px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 15px;
    background: rgba(255,255,255,.055);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    gap: 11px;
    color: #d5deea;
    font-size: 12px;
    box-shadow: 0 12px 35px rgba(0,0,0,.14);
}

.message-icon {
    color: #f15c64;
    font-size: 17px;
}

.robot-footnote {
    color: #718197;
    font-size: 9px;
    letter-spacing: 2px;
    margin-top: 23px;
}

    .robot-footnote span {
        color: #e34b53;
        font-size: 14px;
        margin-right: 5px;
    }

.form-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.login-card {
    width: min(100%,455px);
    position: relative;
    overflow: hidden;
    padding: 38px 42px 25px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 25px;
    background: linear-gradient(145deg,rgba(255,255,255,.115),rgba(255,255,255,.055));
    box-shadow: 0 28px 90px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.13);
    backdrop-filter: blur(24px);
}

.card-topline {
    position: absolute;
    top: 0;
    left: 12%;
    width: 76%;
    height: 2px;
    background: linear-gradient(90deg,transparent,#e24a52,#69d9f5,transparent);
    box-shadow: 0 0 17px rgba(226,74,82,.5);
}

.card-heading {
    text-align: center;
    margin-bottom: 31px;
}

.mini-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin: 0 auto 15px;
    border-radius: 10px;
    background: var(--kaynes-red);
    color: white;
    font: 800 20px 'Manrope';
    box-shadow: 0 5px 18px rgba(165,37,43,.35);
}

.card-kicker {
    font-size: 9px;
    letter-spacing: 2.5px;
    font-weight: 700;
    color: #aab8c9;
}

.card-heading h2 {
    font: 800 31px 'Manrope',sans-serif;
    letter-spacing: -1.2px;
    margin: 7px 0 4px;
    color: #fff;
}

    .card-heading h2 span {
        color: #f16a70;
    }

.card-heading p {
    font-size: 12px;
    color: #aab5c5;
    margin: 0;
}

.form-field {
    margin-bottom: 21px;
}

    .form-field label {
        display: block;
        font-size: 9px;
        letter-spacing: 1.8px;
        font-weight: 700;
        color: #c2ccda;
        margin: 0 0 9px 2px;
    }

.input-wrap {
    height: 53px;
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 12px;
    background: rgba(5,12,23,.45);
    transition: .25s ease;
}

    .input-wrap:focus-within {
        border-color: rgba(92,210,245,.8);
        box-shadow: 0 0 0 3px rgba(92,210,245,.1),0 0 25px rgba(92,210,245,.08);
    }

.field-icon {
    width: 48px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

    .field-icon svg, .password-toggle svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: #8fa2b8;
        stroke-width: 1.6;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.input-wrap input {
    min-width: 0;
    flex: 1;
    height: 100%;
    border: 0;
    outline: 0;
    color: #f7fbff;
    background: transparent;
    font-size: 13px;
    padding: 0 10px 0 0;
}

    .input-wrap input::placeholder {
        color: #718197;
    }

.password-toggle {
    border: 0;
    background: transparent;
    width: 46px;
    height: 100%;
    display: grid;
    place-items: center;
    cursor: pointer;
}

    .password-toggle:hover svg {
        stroke: #65d8f3;
    }

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 3px 0 25px;
    font-size: 11px;
    color: #b8c4d3;
}

.remember-option {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

    .remember-option input {
        position: absolute;
        opacity: 0;
    }

.custom-check {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 5px;
    display: inline-grid;
    place-items: center;
}

.remember-option input:checked + .custom-check {
    background: #bd343b;
    border-color: #bd343b;
}

    .remember-option input:checked + .custom-check:after {
        content: '✓';
        color: #fff;
        font-size: 11px;
    }

.forgot-link {
    color: #e5a0a3;
    text-decoration: none;
}

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

.sign-in-btn {
    width: 100%;
    height: 54px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    background: linear-gradient(105deg,#a5252b,#cf3b43 55%,#a5252b);
    color: white;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .2px;
    box-shadow: 0 10px 27px rgba(165,37,43,.28);
    transition: transform .2s,box-shadow .2s;
}

    .sign-in-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 34px rgba(195,47,56,.4);
    }

    .sign-in-btn:active {
        transform: translateY(0);
    }

.button-arrow {
    font-size: 20px;
    line-height: 1;
    transition: transform .2s;
}

.sign-in-btn:hover .button-arrow {
    transform: translateX(4px);
}

.button-shine {
    position: absolute;
    top: -60%;
    left: -45%;
    width: 35%;
    height: 220%;
    transform: rotate(25deg);
    background: rgba(255,255,255,.17);
    filter: blur(8px);
    transition: left .65s;
}

.sign-in-btn:hover .button-shine {
    left: 120%;
}

.validation-message {
    color: #ff9b9f;
    font-size: 12px;
    margin: -12px 0 14px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #8392a6;
    font-size: 10px;
    margin-top: 23px;
}

.footer-lock {
    color: #65d8a7;
}

.copyright {
    color: #68778d;
    font-size: 10px;
    margin-top: 18px;
    text-align: center;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #8ce7ff;
    opacity: 0;
    box-shadow: 0 0 9px #8ce7ff;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(20px) scale(.5);
        opacity: 0
    }

    15% {
        opacity: .8
    }

    85% {
        opacity: .45
    }

    100% {
        transform: translateY(-170px) scale(1.3);
        opacity: 0
    }
}

.circuit {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg,transparent,rgba(77,190,225,.25),transparent);
    transform-origin: left;
}

    .circuit:after {
        content: '';
        position: absolute;
        right: 8%;
        top: -2px;
        width: 5px;
        height: 5px;
        border: 1px solid rgba(104,218,245,.6);
        border-radius: 50%;
        box-shadow: 0 0 12px rgba(104,218,245,.5);
    }

.circuit-a {
    width: 30%;
    left: 0;
    top: 34%;
    transform: rotate(8deg);
}

.circuit-b {
    width: 25%;
    right: 0;
    top: 28%;
    transform: rotate(170deg);
}

.circuit-c {
    width: 35%;
    left: 4%;
    bottom: 17%;
    transform: rotate(-8deg);
}

.circuit-d {
    width: 30%;
    right: 0;
    bottom: 23%;
    transform: rotate(188deg);
}

@media (max-width: 900px) {
    .login-main {
        grid-template-columns: 1fr;
        gap: 15px;
        padding-top: 35px;
    }

    .robot-panel {
        order: 2;
    }

    .form-panel {
        order: 1;
    }

    .robot-intro {
        align-self: center;
        text-align: center;
        margin: 0;
    }

        .robot-intro p br {
            display: none;
        }

    .robot-stage {
        height: 340px;
        max-width: 430px;
    }

    .assistant-message {
        margin-top: -8px;
    }

    .robot-footnote {
        margin-top: 15px;
    }
}

@media (max-width: 520px) {
    .brand-header {
        height: 75px;
        padding: 0 18px;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
    }

    .brand-name {
        font-size: 13px;
    }

    .header-status {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .login-main {
        padding: 25px 16px 28px;
    }

    .login-card {
        padding: 31px 23px 22px;
        border-radius: 20px;
    }

    .card-heading h2 {
        font-size: 28px;
    }

    .robot-stage {
        height: 290px;
    }

    .stage-orbit {
        width: 270px;
    }

    .orbit-two {
        width: 310px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

/* KayBot refinements: floating speech bubble beside the head. */
.assistant-message {
    position: absolute;
    z-index: 6;
    top: 17%;
    left: 68%;
    width: min(225px, 39%);
    min-height: 54px;
    padding: 12px 14px;
    border: 1px solid rgba(117, 214, 244, .28);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(35, 49, 68, .94), rgba(17, 27, 42, .92));
    box-shadow: 0 12px 34px rgba(0,0,0,.28), 0 0 22px rgba(73,190,225,.10);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 9px;
    color: #e3edf8;
    font-size: 11px;
    line-height: 1.45;
    transition: opacity .2s ease, transform .2s ease;
}

    .assistant-message::before {
        content: "";
        position: absolute;
        left: -7px;
        top: 22px;
        width: 13px;
        height: 13px;
        background: #202f42;
        border-left: 1px solid rgba(117,214,244,.28);
        border-bottom: 1px solid rgba(117,214,244,.28);
        transform: rotate(45deg);
    }

.message-icon {
    flex: 0 0 auto;
    color: #ff6870;
    font-size: 18px;
}

.robot-stage {
    margin-top: -18px;
}

@media (max-width: 900px) {
    .robot-stage {
        margin-top: -5px;
    }

    .assistant-message {
        top: 12%;
        left: 58%;
        width: min(205px, 40%);
    }
}

@media (max-width: 520px) {
    .assistant-message {
        top: 8%;
        left: 56%;
        width: 42%;
        padding: 9px 10px;
        font-size: 10px;
    }
}
/* Robot head shaking animation --not using the effect as of now*/
@keyframes robotNo {
    0% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(-15deg);
    }

    40% {
        transform: rotate(15deg);
    }

    60% {
        transform: rotate(-12deg);
    }

    80% {
        transform: rotate(12deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.robot-no {
    animation: robotNo 0.6s ease-in-out;
}