:root {
    --header-h: 88px;
    --footer-h: 124px;

    --bg-deep: #020713;
    --bg-mid: #061128;
    --bg-panel: rgba(7, 23, 48, .95);

    --line: rgba(57, 151, 221, .22);
    --line-strong: rgba(31, 176, 255, .80);

    --text-main: #f2f7fd;
    --text: #d8e7f3;
    --muted: #7895ad;

    --blue: #159fff;
    --blue-hi: #24b6ff;
    --violet: #6946ff;
    --green: #00e58b;
}


/* =========================================================
   BASE
   ========================================================= */

* {
    box-sizing: border-box;
}


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


body {
    font-family:
        "Segoe UI Variable",
        "Segoe UI",
        Arial,
        sans-serif;

    color: var(--text);

    background: var(--bg-deep);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}


button,
input {
    font: inherit;
}


button {
    cursor: pointer;
}


.login-page {
    overflow: hidden;
}


.page-shell {
    width: 100vw;
    height: 100dvh;
    min-height: 720px;

    display: grid;

    grid-template-rows:
        var(--header-h)
        minmax(0, 1fr)
        var(--footer-h);

    overflow: hidden;

    background:
        radial-gradient(
            900px 600px at 12% 30%,
            rgba(84, 53, 219, .11),
            transparent 65%
        ),
        radial-gradient(
            900px 600px at 88% 30%,
            rgba(84, 53, 219, .11),
            transparent 65%
        ),
        radial-gradient(
            1200px 700px at 50% 110%,
            rgba(21, 159, 255, .10),
            transparent 70%
        ),
        linear-gradient(
            160deg,
            #020713 0%,
            #061128 47%,
            #031025 100%
        );
}


/* =========================================================
   REAL USER LOGO
   Cropped in CSS so the dark rectangle is not visible.
   ========================================================= */

.brand-logo {
    flex: 0 0 auto;

    background-image:
        url("/mail/static/vd-kontrol-logo.png");

    background-repeat:
        no-repeat;

    background-position:
        50% 57%;

    mix-blend-mode:
        screen;
}


.brand-logo-small {
    width: 68px;
    height: 70px;

    background-size:
        255% auto;

    filter:
        contrast(1.06)
        saturate(1.08)
        drop-shadow(
            0 0 10px
            rgba(38, 111, 255, .16)
        );
}


.brand-logo-main {
    width: 155px;
    height: 124px;

    margin:
        0
        auto
        2px;

    background-size:
        225% auto;

    filter:
        contrast(1.08)
        saturate(1.10)
        drop-shadow(
            0 0 22px
            rgba(40, 111, 255, .20)
        );
}


/* =========================================================
   HEADER
   ========================================================= */

.main-header {
    position: relative;

    z-index: 30;

    padding:
        0
        52px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid
        rgba(53, 147, 214, .24);

    background:
        linear-gradient(
            90deg,
            rgba(3, 17, 31, .98),
            rgba(5, 27, 47, .95) 56%,
            rgba(3, 17, 31, .98)
        );

    box-shadow:
        0
        7px
        25px
        rgba(0, 0, 0, .18);
}


.header-left {
    height: 100%;

    display: flex;
    align-items: center;
}


.brand-block {
    display: flex;
    align-items: center;
}


.brand-text {
    margin-left: 10px;
}


.brand-text strong {
    display: block;

    color: #f5f8fc;

    font-size: 21px;
    font-weight: 760;

    line-height: 1.05;

    letter-spacing: -.03em;
}


.brand-text span {
    display: block;

    margin-top: 4px;

    color: #25c5ff;

    font-size: 10px;
    font-weight: 500;
}


.header-divider {
    width: 2px;
    height: 48px;

    margin:
        0
        31px
        0
        36px;

    background:
        linear-gradient(
            180deg,
            #25b7ff,
            #1478d7
        );
}


.header-slogan strong {
    display: block;

    color: #9ed1f5;

    font-size: 18px;
    font-weight: 520;

    letter-spacing: -.012em;
}


.header-slogan span {
    display: block;

    margin-top: 7px;

    color: #6c8faa;

    font-size: 9px;

    letter-spacing: .07em;
}


.header-right {
    color: #7099b8;

    text-align: right;

    font-size: 10px;
    line-height: 1.45;
}


/* =========================================================
   STAGE
   ========================================================= */

.main-stage {
    position: relative;

    min-height: 0;

    display: grid;

    grid-template-columns:
        minmax(180px, 1fr)
        500px
        minmax(180px, 1fr);

    align-items: center;

    gap: 48px;

    padding:
        26px
        5vw
        28px;

    overflow: hidden;
}


/* =========================================================
   BACKGROUND / GRID / GLOW
   ========================================================= */

.stage-glow {
    position: absolute;

    border-radius: 50%;

    pointer-events: none;
}


.stage-glow-center {
    width: 820px;
    height: 820px;

    left: 50%;
    top: -315px;

    transform:
        translateX(-50%);

    background:
        radial-gradient(
            circle,
            rgba(104, 62, 255, .18),
            rgba(38, 78, 188, .05) 43%,
            transparent 69%
        );
}


.stage-glow-left {
    width: 520px;
    height: 520px;

    left: -180px;
    top: 70px;

    background:
        radial-gradient(
            circle,
            rgba(72, 60, 221, .10),
            transparent 68%
        );
}


.stage-glow-right {
    width: 520px;
    height: 520px;

    right: -180px;
    top: 70px;

    background:
        radial-gradient(
            circle,
            rgba(72, 60, 221, .10),
            transparent 68%
        );
}


.floor-grid {
    position: absolute;

    left: -11%;
    right: -11%;

    bottom: -285px;

    height: 700px;

    transform:
        perspective(690px)
        rotateX(64deg);

    transform-origin:
        center bottom;

    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 72px,
            rgba(30, 112, 183, .25) 73px 74px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0 58px,
            rgba(30, 112, 183, .21) 59px 60px
        );

    opacity: .57;

    mask-image:
        linear-gradient(
            to top,
            #000 25%,
            rgba(0, 0, 0, .72) 62%,
            transparent 100%
        );

    -webkit-mask-image:
        linear-gradient(
            to top,
            #000 25%,
            rgba(0, 0, 0, .72) 62%,
            transparent 100%
        );
}


/* =========================================================
   CAMERAS - real image asset
   ========================================================= */

.camera {
    position: absolute;

    z-index: 4;

    top: 7.5%;

    width: clamp(280px, 26vw, 410px);
    aspect-ratio: 1672 / 941;

    opacity: .95;

    background-image:
        url("/mail/static/camera-purple.png");

    background-repeat:
        no-repeat;

    background-size:
        contain;

    background-position:
        center;

    filter:
        drop-shadow(0 0 30px rgba(95, 72, 255, .22))
        drop-shadow(0 0 80px rgba(73, 101, 255, .08));

    pointer-events: none;
}

.camera-left {
    left: 5.2%;

    transform:
        scaleX(-1)
        rotate(-10deg);

    transform-origin:
        center center;
}

.camera-right {
    right: 5.2%;

    transform:
        rotate(-10deg);

    transform-origin:
        center center;
}

.camera-body,
.camera-mount,
.camera-lens,
.camera-beam {
    display: none;
}

/* =========================================================
   SIDE TEXT
   ========================================================= */

.side-copy {
    position: relative;

    z-index: 5;

    justify-self: center;

    display: flex;
    flex-direction: column;

    color: #6796bf;

    font-size: 13px;
    font-weight: 600;

    line-height: 2.2;

    letter-spacing: .27em;

    text-transform: uppercase;
}


.side-copy i {
    display: block;

    width: 42px;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            #168fff,
            transparent
        );
}


.side-copy-left i {
    margin-top: 7px;
}


.side-copy-right i {
    margin-bottom: 7px;
}


/* =========================================================
   AUTH CARD
   ========================================================= */

.auth-card {
    position: relative;

    z-index: 12;

    width: 500px;

    justify-self: center;

    padding:
        19px
        38px
        27px;

    border:
        1px solid
        var(--line-strong);

    border-radius:
        16px;

    background:
        linear-gradient(
            165deg,
            rgba(14, 38, 74, .96),
            rgba(8, 26, 55, .97) 55%,
            rgba(4, 17, 35, .98)
        );

    box-shadow:
        0
        0
        0
        1px
        rgba(255, 255, 255, .025)
        inset,

        0
        30px
        70px
        rgba(0, 0, 0, .52),

        0
        0
        70px
        rgba(38, 116, 255, .13);

    backdrop-filter:
        blur(14px);
}


.auth-card::before {
    content: "";

    position: absolute;

    inset: -1px;

    padding: 1px;

    border-radius:
        16px;

    pointer-events: none;

    background:
        linear-gradient(
            135deg,
            rgba(102, 69, 255, .48),
            transparent 36%,
            transparent 64%,
            rgba(30, 161, 255, .48)
        );

    -webkit-mask:
        linear-gradient(#000 0 0)
        content-box,
        linear-gradient(#000 0 0);

    -webkit-mask-composite:
        xor;

    mask-composite:
        exclude;
}


.auth-card h1 {
    margin:
        0;

    color:
        #f5f9fd;

    text-align:
        center;

    font-size:
        34px;

    font-weight:
        760;

    line-height:
        1.06;

    letter-spacing:
        -.044em;
}


.auth-card h1 span {
    color:
        #1ba7ff;
}


.auth-card h2 {
    margin:
        4px
        0
        0;

    color:
        #26c4ff;

    text-align:
        center;

    font-size:
        18px;

    font-weight:
        500;
}


.auth-description {
    margin:
        9px
        0
        21px;

    color:
        #94adc3;

    text-align:
        center;

    font-size:
        11px;

    line-height:
        1.5;
}


.auth-error {
    margin:
        -7px
        0
        13px;

    padding:
        9px
        11px;

    border:
        1px solid
        rgba(255, 97, 112, .30);

    border-radius:
        7px;

    background:
        rgba(116, 22, 35, .28);

    color:
        #ffc3cb;

    text-align:
        center;

    font-size:
        10px;
}


/* =========================================================
   FORM
   ========================================================= */

.form-group {
    margin-bottom:
        14px;
}


.form-group label {
    display:
        block;

    margin:
        0
        0
        7px
        2px;

    color:
        #c6d8e7;

    font-size:
        10px;

    font-weight:
        500;
}


.input-shell {
    height:
        52px;

    position:
        relative;

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    padding:
        0
        13px;

    border:
        1px solid
        #35698f;

    border-radius:
        8px;

    background:
        rgba(15, 48, 78, .91);

    transition:
        border-color .16s,
        box-shadow .16s;
}


.input-shell:focus-within {
    border-color:
        #2aabff;

    box-shadow:
        0
        0
        0
        3px
        rgba(42, 171, 255, .10);
}


.input-icon {
    width:
        19px;

    height:
        19px;

    flex:
        0
        0
        19px;

    fill:
        none;

    stroke:
        #8fb5d2;

    stroke-width:
        1.7;

    stroke-linecap:
        round;

    stroke-linejoin:
        round;
}


.input-shell input {
    min-width:
        0;

    height:
        100%;

    flex:
        1;

    border:
        0;

    outline:
        0;

    background:
        transparent;

    color:
        #f4f8fb;

    font-size:
        13px;

    font-weight:
        520;

    letter-spacing:
        .01em;
}


.input-shell input::placeholder {
    color:
        #6f8ba4;
}


.password-toggle {
    width:
        40px;

    height:
        40px;

    flex:
        0
        0
        40px;

    position:
        relative;

    display:
        grid;

    place-items:
        center;

    border:
        0;

    background:
        transparent;

    color:
        #7ca2c0;
}


.password-toggle svg {
    width:
        20px;

    height:
        20px;

    fill:
        none;

    stroke:
        currentColor;

    stroke-width:
        1.7;
}


.password-toggle.active {
    color:
        #36b8ff;
}


.password-toggle.active::after {
    content:
        "";

    position:
        absolute;

    width:
        22px;

    height:
        1px;

    background:
        currentColor;

    transform:
        rotate(-43deg);
}


.submit-button {
    width:
        100%;

    height:
        54px;

    margin-top:
        4px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        23px;

    border:
        0;

    border-radius:
        8px;

    background:
        linear-gradient(
            180deg,
            #1ab0ff,
            #0878f5
        );

    color:
        #fff;

    font-size:
        13px;

    font-weight:
        720;

    box-shadow:
        0
        10px
        28px
        rgba(0, 111, 255, .25);

    transition:
        filter .15s,
        transform .12s;
}


.submit-button:hover {
    filter:
        brightness(1.06);
}


.submit-button:active {
    transform:
        translateY(1px);
}


.submit-button b {
    font-size:
        20px;

    font-weight:
        400;
}


/* =========================================================
   API NOTE
   ========================================================= */

.api-note {
    margin-top:
        15px;

    display:
        flex;

    align-items:
        center;

    gap:
        11px;
}


.api-shield {
    width:
        27px;

    height:
        31px;

    flex:
        0
        0
        27px;

    display:
        grid;

    place-items:
        center;

    clip-path:
        polygon(
            50% 0,
            92% 15%,
            86% 72%,
            50% 100%,
            14% 72%,
            8% 15%
        );

    background:
        #1ba7ff;

    color:
        #031d32;

    font-size:
        12px;

    font-weight:
        900;
}


.api-note p {
    margin:
        0;

    color:
        #718ea7;

    font-size:
        8px;

    line-height:
        1.45;
}


/* =========================================================
   FOOTER
   ========================================================= */

.main-footer {
    position:
        relative;

    z-index:
        30;

    display:
        grid;

    grid-template-columns:
        repeat(4, 1fr);

    border-top:
        1px solid
        rgba(48, 143, 211, .22);

    background:
        linear-gradient(
            180deg,
            rgba(3, 18, 32, .97),
            rgba(2, 10, 19, .99)
        );

    backdrop-filter:
        blur(7px);
}


.feature {
    min-width:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        14px;

    padding:
        16px
        12px;

    color:
        #92acc0;

    text-align:
        left;
}


.feature + .feature {
    border-left:
        1px solid
        rgba(48, 143, 211, .18);
}


.feature strong {
    display:
        block;

    color:
        #bcd1e1;

    font-size:
        11px;

    font-weight:
        600;
}


.feature span {
    display:
        block;

    margin-top:
        3px;

    color:
        #6d899f;

    font-size:
        9px;
}


.feature-icon {
    width:
        38px;

    height:
        38px;

    flex:
        0
        0
        38px;

    display:
        grid;

    place-items:
        center;

    color:
        #14a8ff;

    font-size:
        29px;
}


.database-icon {
    position:
        relative;

    display:
        block;
}


.database-icon i {
    position:
        absolute;

    left:
        5px;

    width:
        28px;

    height:
        9px;

    border:
        2px solid
        #14a8ff;

    border-radius:
        50%;
}


.database-icon i:nth-child(1) {
    top:
        5px;
}


.database-icon i:nth-child(2) {
    top:
        14px;
}


.database-icon i:nth-child(3) {
    top:
        23px;
}


/* =========================================================
   1180px
   ========================================================= */

@media (max-width: 1180px) {

    :root {
        --header-h:
            82px;

        --footer-h:
            112px;
    }


    .main-header {
        padding:
            0
            26px;
    }


    .brand-logo-small {
        width:
            60px;

        height:
            62px;
    }


    .brand-text strong {
        font-size:
            18px;
    }


    .header-divider {
        margin:
            0
            24px;
    }


    .header-slogan strong {
        font-size:
            16px;
    }


    .header-right {
        display:
            none;
    }


    .main-stage {
        grid-template-columns:
            1fr
            455px
            1fr;

        gap:
            26px;

        padding-left:
            3vw;

        padding-right:
            3vw;
    }


    .auth-card {
        width:
            455px;
    }


    .side-copy {
        font-size:
            11px;

        letter-spacing:
            .20em;
    }


    .camera {
        width:
            clamp(220px, 23vw, 300px);

        top:
            10%;

        opacity:
            .88;
    }

    .camera-left {
        left:
            2.5%;
    }

    .camera-right {
        right:
            2.5%;
    }
}


/* =========================================================
   MOBILE / TABLET
   ========================================================= */

@media (max-width: 860px) {

    .login-page {
        overflow:
            auto;
    }


    .page-shell {
        height:
            auto;

        min-height:
            100dvh;

        display:
            block;
    }


    .main-header {
        height:
            72px;

        padding:
            0
            13px;
    }


    .brand-logo-small {
        width:
            52px;

        height:
            54px;

        background-size:
            255% auto;
    }


    .brand-text {
        margin-left:
            7px;
    }


    .brand-text strong {
        font-size:
            16px;
    }


    .brand-text span {
        font-size:
            8px;
    }


    .header-divider,
    .header-slogan,
    .header-right {
        display:
            none;
    }


    .main-stage {
        min-height:
            calc(
                100dvh
                -
                72px
            );

        display:
            grid;

        grid-template-columns:
            1fr;

        place-items:
            center;

        padding:
            24px
            15px
            34px;

        overflow:
            visible;
    }


    .floor-grid,
    .stage-glow,
    .camera,
    .side-copy {
        display:
            none;
    }


    .auth-card {
        width:
            min(
                100%,
                430px
            );

        padding:
            20px
            20px
            25px;
    }


    .brand-logo-main {
        width:
            132px;

        height:
            106px;
    }


    .auth-card h1 {
        font-size:
            29px;
    }


    .auth-card h2 {
        font-size:
            16px;
    }


    .input-shell {
        height:
            51px;
    }


    .main-footer {
        display:
            none;
    }
}
