/**
 * Professional login — reference layout: form left (LTR stage), gold-line frame, image slot right.
 */
:root {
    --login-bg-deep: #0f111a;
    --login-bg: #121418;
    --login-gold: #c5a059;
    --login-gold-bright: #d4af37;
    --login-gold-glow: rgba(212, 175, 55, 0.32);
    --line-z: 2;
    --form-z: 5;
    --box-z: 3;
}

.login-professional-body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background-image: var(--login-page-bg, none);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
}

@media (min-width: 992px) {
    .login-professional-body {
        background-attachment: fixed;
    }
}

.login-professional-root {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.login-stage {
    flex: 1;
    min-height: 0;
}

.login-canvas {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: clip;
}

.login-lines {
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.line {
    position: absolute;
    display: block;
    z-index: var(--line-z);
    pointer-events: none;
}

/* Top double lines — full width band */
.top-line-1,
.top-line-2 {
    left: 4.7%;
    width: 92.6%;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(70, 55, 37, 0.1) 0%,
        rgba(144, 112, 74, 0.48) 8%,
        rgba(181, 146, 98, 0.62) 45%,
        rgba(158, 122, 81, 0.4) 85%,
        rgba(60, 45, 28, 0.1) 100%
    );
    box-shadow: 0 0 8px rgba(234, 198, 136, 0.15);
}

.top-line-1 {
    top: 1.55%;
}

.top-line-2 {
    top: 2.25%;
    opacity: 0.88;
}

@media (max-width: 999.98px) {
    .login-lines .left-outer,
    .login-lines .bottom-outer {
        display: none !important;
    }
}

/* Left vertical — frames the large (form) zone */
.left-outer {
    left: 0.55%;
    top: 23.1%;
    width: 2px;
    height: 72.5%;
    background: linear-gradient( 180deg,
    rgba(50, 38, 24, 0.12) 0%,
    rgba(196, 157, 104, 0.78) 22%,
    rgba(181, 144, 96, 0.88) 25%,
    rgba(162, 126, 84, 0.52) 64%,
    rgba(45, 32, 20, 0.1) 100% );
    box-shadow: 0 0 28px rgba(226, 187, 124, 0.18);
}

/* Bottom line — spans left / form sector only */
.bottom-outer {
    left: 0;
    bottom: 2.75%;
    width: 20.5%;
    height: 2px;
    background: linear-gradient( 90deg,
    rgba(50, 38, 24, 0.12) 10%,
    rgba(196, 157, 104, 0.78) 38%,
    rgba(186, 149, 101, 0.56) 88%,
    rgba(101, 77, 51, 0.18) 100% );
    box-shadow: 0 0 6px rgba(226, 187, 124, 0.12);
}

/* Faint right outer vertical */
.right-outer {
    right: 2.85%;
    top: 3.1%;
    width: 1px;
    height: 78.2%;
    background: linear-gradient(
        180deg,
        rgba(90, 68, 45, 0.08) 0%,
        rgba(152, 118, 77, 0.34) 18%,
        rgba(163, 127, 85, 0.26) 78%,
        rgba(70, 50, 32, 0.08) 100%
    );
}

/* Right framed panel */
.right-box {
    position: absolute;
    left: 59.1%;
    top: 20.1%;
    width: 24.1%;
    height: auto;
    min-height: 62.3%;
    max-height: min(88vh, 86%);
    z-index: var(--box-z);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: hidden;
}

.right-box-stack {
    position: relative;
    z-index: 4;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 0;
    overflow: visible;
    padding:
        clamp(0.5rem, 4%, 1rem)
        clamp(0.5rem, 4%, 1rem)
        clamp(72px, 20vh, 200px);
    gap: clamp(0.25rem, 1.5vw, 0.5rem);
    box-sizing: border-box;
}

.right-box-brand {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    gap: clamp(0.4rem, 2.5vw, 1rem);
    min-height: 0;
}

.right-box-logo-wrap {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.right-box-logo-img {
    display: block;
    max-width: 80%;
    width: auto;
    height: auto;
    max-height: min(40vh, 260px);
    object-fit: contain;
}

.login-slogan {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 0.25rem;
    font-size: clamp(1.05rem, 2.5vw, 1.45rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    line-height: 1.75;
    text-align: center;
    background: linear-gradient(118deg, #f8f4eb 0%, #e6d4a8 38%, #c5a059 72%, #a8863a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    min-height: 2.25em;
    transition: opacity 0.35s ease;
}

.login-slogan--typewriter {
    opacity: 0.96;
}

.login-slogan--typewriter.login-slogan--done {
    opacity: 1;
}

/* Anchored to bottom-left of .right-box (not in flex flow — position stable vs. inner layout) */
.gold-dust-slot {
    position: absolute;
    left: 0;
    bottom: -3%;
    right: auto;
    top: auto;
    width: auto;
    max-width: 58%;
    margin: 0;
    padding: 0;
    z-index: 6;
    background: transparent;
    box-sizing: border-box;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    pointer-events: none;
}

.box-top {
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(82, 63, 41, 0.18) 0%,
        rgba(170, 132, 86, 0.48) 20%,
        rgba(242, 210, 152, 0.95) 56%,
        rgba(175, 136, 90, 0.48) 82%,
        rgba(82, 63, 41, 0.16) 100%
    );
    box-shadow: 0 0 16px rgba(234, 198, 136, 0.3);
}

.box-top::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 86%;
    height: 8px;
    background: radial-gradient(circle, rgba(245, 214, 156, 0.95) 0%, rgba(238, 201, 137, 0.5) 38%, transparent 72%);
    filter: blur(15px);
    pointer-events: none;
}

.box-left {
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(80, 60, 38, 0.1) 0%,
        rgba(157, 122, 80, 0.28) 20%,
        rgba(182, 142, 94, 0.52) 36%,
        rgba(188, 147, 98, 0.82) 49%,
        rgba(182, 142, 94, 0.5) 62%,
        rgba(130, 99, 66, 0.24) 82%,
        rgba(65, 47, 30, 0.1) 100%
    );
    box-shadow: 0 0 13px rgba(238, 201, 137, 0.18);
}

.box-left::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 49%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 86%;
    background: radial-gradient(circle, rgba(245, 214, 156, 0.95) 0%, rgba(238, 201, 137, 0.42) 35%, transparent 72%);
    filter: blur(15px);
    pointer-events: none;
}

.box-right {
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(70, 52, 34, 0.08) 0%,
        rgba(145, 111, 72, 0.16) 22%,
        rgba(170, 132, 86, 0.38) 46%,
        rgba(198, 157, 104, 0.86) 56%,
        rgba(170, 132, 86, 0.34) 68%,
        rgba(110, 82, 53, 0.14) 88%,
        rgba(60, 43, 28, 0.08) 100%
    );
    box-shadow: 0 0 9px rgba(234, 198, 136, 0.14);
}

.box-right::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 49%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 86%;
    background: radial-gradient(circle, rgba(245, 214, 156, 0.86) 0%, rgba(238, 201, 137, 0.35) 40%, transparent 74%);
    filter: blur(15px);
    pointer-events: none;
}

/* Extends past corners — blueprint feel */
.box-bottom {
    left: -10%;
    bottom: 0;
    width: 114%;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(78, 58, 37, 0.08) 0%,
        rgba(128, 98, 65, 0.18) 20%,
        rgba(158, 123, 82, 0.38) 48%,
        rgba(173, 135, 89, 0.42) 64%,
        rgba(109, 83, 55, 0.16) 100%
    );
}

.box-bottom::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 8px;
    background: radial-gradient(circle, rgba(245, 214, 156, 0.4) 0%, rgba(230, 190, 127, 0.16) 42%, transparent 78%);
    filter: blur(15px);
    pointer-events: none;
}

.gold-dust-slot-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(22vh, 200px);
    object-fit: contain;
    object-position: left bottom;
}

/* Form — visual left column */
.login-form-host {
    position: absolute;
    z-index: var(--form-z);
    left: 50%;
    top: 50%;
    transform: translate(-52%, -50%);
    width: min(92vw, 420px);
    max-width: 44vw;
}

@media (min-width: 992px) {
    .login-form-host {
        left: 26%;
        transform: translate(-50%, -50%);
        width: 100%;
        max-width: min(600px, 34vw);
    }
}

@media (min-width: 1000px) {
    .right-box-logo-img {
        max-height: min(44vh, 340px);
    }
}

.bg-form-login-page {
    width: 100%;
    max-width: 600px;
    margin-inline: auto;
    background: rgb(92 97 116 / 0%) !important;
    backdrop-filter: blur(2px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(197, 160, 89, 0.32) !important;
    box-shadow:
        0 0 50px rgba(0, 0, 0, 0.45),
        0 0 28px rgba(212, 175, 55, 0.06) !important;
    opacity: 1 !important;
    border-radius: 20px !important;
}

.login-center {
    text-align: -moz-center !important;
}

.custom-input::placeholder {
    color: rgba(230, 225, 210, 0.55) !important;
    opacity: 1 !important;
    font-weight: normal;
}

.custom-input {
    border-color: rgba(197, 160, 89, 0.45) !important;
    color: #f0e6d2 !important;
    background-color: rgba(15, 17, 26, 0.35) !important;
}

.custom-input:focus {
    color: #faf6ee !important;
    font-weight: bold;
    border-color: rgba(212, 175, 55, 0.65) !important;
    box-shadow: 0 0 0 0.15rem rgba(212, 175, 55, 0.15);
}

.fv-plugins-message-container {
    font-weight: bold !important;
    font-size: 16px !important;
    color: #ff6b6b !important;
}

.btn-login-gold {
    background: linear-gradient(180deg, #d4af37 0%, #a8863a 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.55) !important;
    color: #0f111a !important;
    font-weight: 600 !important;
}

.btn-login-gold:hover {
    filter: brightness(1.06);
    color: #0f111a !important;
}

.login-link-muted {
    color: rgba(230, 225, 210, 0.75) !important;
}

.login-link-gold {
    color: var(--login-gold-bright) !important;
}

/* Tablet: keep composition, slightly wider form */
@media (max-width: 1199.98px) and (min-width: 992px) {
    .login-form-host {
        left: 28%;
        max-width: min(400px, 38vw);
    }

    .right-box {
        left: 67%;
        width: 30%;
    }
}

/* Mobile: brand block first (DOM), form below; fill viewport height */
@media (max-width: 991.98px) {
    .login-canvas {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        padding-inline: clamp(0.75rem, 4vw, 1.25rem);
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
        box-sizing: border-box;
    }

    .login-lines .line {
        opacity: 0.85;
    }

    .left-outer {
        height: 58%;
        top: 14%;
    }

    .bottom-outer {
        width: 78%;
    }

    .right-outer {
        height: 62%;
    }

    .right-box {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        max-width: 420px;
        height: auto;
        min-height: auto;
        max-height: none;
        flex: 0 1 auto;
        margin-inline: auto;
        margin-top: clamp(0.5rem, 2.5vh, 1rem);
        margin-bottom: 0;
        overflow: hidden !important;
    }

    .right-box-stack {
        flex: 0 1 auto;
        min-height: auto;
        overflow: visible !important;
        padding-bottom: clamp(56px, 18vw, 140px);
    }

    .right-box-brand {
        flex: 0 1 auto;
        min-height: auto;
        justify-content: center;
    }

    .gold-dust-slot {
        max-width: 62%;
    }

    .login-form-host {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        min-height: 0;
        max-width: 100%;
        width: 100%;
        padding: clamp(0.75rem, 4vw, 1.25rem);
        padding-top: clamp(0.75rem, 3vh, 1.25rem);
        margin-top: 0;
    }

    .login-stage {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 100dvh;
        min-height: 100svh;
    }
}

@media (max-width: 575.98px) {
    .top-line-1,
    .top-line-2 {
        left: 3%;
        width: 94%;
    }

    .left-outer {
        left: 3.5%;
    }
}
