*, *::before, *::after { box-sizing: border-box; }

/* Invisible scrollbars: vertical scroll works, bar hidden (all viewports / browsers) */
html {
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
html::-webkit-scrollbar { width: 0; height: 0; display: none; }

body {
    margin: 0;
    height: 100vh;
    font-family: 'Rubik', sans-serif;
    background: #f3f3f5;
    color: #130033;
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
body::-webkit-scrollbar { width: 0; height: 0; display: none; }

#form1,
.lf-page {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
#form1::-webkit-scrollbar,
.lf-page::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Nested panes (register popup, etc.) keep scroll but hide track */
.lf-page *,
#form1 * {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.lf-page *::-webkit-scrollbar,
#form1 *::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}
.lf-page {
    height: 100vh;
    max-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}
.lf-top-band {
    position: relative;
    width: 100%;
    height: 112px;
    background: url('../img/dashboard header design.png') no-repeat center top / cover;
    z-index: 1;
    pointer-events: none;
    flex-shrink: 0;
}
.lf-main-shell {
    position: relative;
    width: min(98vw, 1908px);
    align-self: center;
    border-radius: 26px 26px 0 0;
    padding: 12px 12px 0;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4.5px);
    -webkit-backdrop-filter: blur(4.5px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    z-index: 3;
    margin-top: -80px;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.lf-content {
    position: relative;
    min-height: 0;
    border-radius: 20px 20px 0 0;
    background: #fbfbfd;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    border: 1px solid #e9eaf0;
    border-bottom: none;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 46px 24px 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}
.lf-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
/* Same blob motion as #demoModal .lm-blob (keyframes in style_webpage.css) */
.lf-glow--orange {
    width: 200px; height: 200px;
    left: calc(50% - 550px);
    top: 136px;
    background: radial-gradient(circle, rgba(238, 104, 73, 0.5) 50%);
    filter: blur(20px);
    animation: blob-float 10s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
.lf-glow--yellow {
    width: 206px; height: 206px;
    right: calc(50% - 460px);
    top: 294px;
    background: radial-gradient(circle, rgba(255, 195, 40, 0.3) 30%);
    filter: blur(20px);
    animation: blob-float 11s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite 1.2s;
}
.lf-glow--blue {
    width: 115px; height: 115px;
    left: calc(50% - 500px);
    bottom: 120px;
    background: radial-gradient(circle, rgba(25, 106, 255, 0.3) 30%);
    filter: blur(20px);
    border-radius: 50%;
    animation: blob-float 9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite 2s;
}
.lf-login-card {
    width: min(92vw, 828px);
    min-height: clamp(520px, 56vw, 745px);
    position: relative;
    z-index: 1;
    background: url('../img/Union.png') no-repeat center top / 100% 100%;
    padding: clamp(10px, 1.5vw, 24px) clamp(10px, 1.5vw, 24px) clamp(12px, 1.2vw, 18px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.lf-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: calc(100% - 72px);
    margin: 0 auto 12px;
    padding: 0 8px;
}
.lf-back-link,
.lf-back-link:hover,
.lf-back-link:focus,
.lf-back-link:active,
.lf-back-link:visited {
    color: #3f83ff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color 0.2s;
}
.lf-back-link:hover { color: #1d4ed8; }
.lf-back-link * {
    text-decoration: none !important;
}
.lf-back-chevron {
    border-bottom: 0 !important;
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    text-decoration: none !important;
}
.lf-back-text {
    border-bottom: 1px solid currentColor;
    display: inline-block;
    line-height: 1.1;
    text-decoration: none !important;
}
.lf-lang-select {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
    color: #3f83ff;
    padding: 5px 22px 5px 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%233f83ff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 8px center;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    width: 119px;
    height: 34px;
    font-family: 'Rubik', sans-serif;
    cursor: pointer;
}
.lf-lang-select:focus { border-color: #3f83ff; }
.lf-card-body {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: clamp(248px, 21vw, 311px);
    position: absolute;
    left: 50%;
    top: 54%;
    transform: translate(-50%, -50%);
}
.lf-logo-block {
    margin-bottom: 14px;
    text-decoration: none;
}
.lf-logo-block a { text-decoration: none; }
.lf-logo-img {
    width: clamp(66px, 5.4vw, 95px);
    height: auto;
    display: block;
    margin: 0 auto 5px;
    object-fit: contain;
}
.lf-analytics-text {
    display: block;
    font-size: clamp(26px, 2.2vw, 36px);
    font-weight: 400;
    color: #130033;
    line-height: 1;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}
.lf-powered-text {
    display: block;
    font-size: clamp(10px, 0.9vw, 15px);
    font-weight: 400;
    color: #123773;
    letter-spacing: 0.01em;
}
#loginMessageContainer {
    width: 311px;
    max-width: 100%;
    margin: 0 auto 6px;
}
#loginMessageContainer .alert {
    font-size: 0.76rem;
    margin: 0;
    padding: 0.42rem 0.65rem;
}
.lf-field-group {
    width: clamp(248px, 21vw, 311px);
    max-width: 100%;
    margin: 0 auto 8px;
}
.lf-label {
    display: block;
    text-align: center;
    font-size: 12px;
    font-weight: 400;
    color: #808080;
    margin-bottom: 3px;
}
.lf-input {
    display: block;
    width: 100%;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    height: clamp(30px, 2.1vw, 34px);
    min-height: clamp(30px, 2.1vw, 34px);
    max-height: clamp(30px, 2.1vw, 34px);
    box-sizing: border-box;
    text-align: center;
    font-size: clamp(11px, 0.8vw, 12px);
    font-family: 'Rubik', sans-serif;
    color: #5b6170;
    background: #fff;
    padding: 0 12px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lf-input::placeholder { color: #c0c0c0; }
.lf-input:focus {
    border-color: #9cbaf8;
    box-shadow: 0 0 0 3px rgba(63, 131, 255, 0.13);
}
.lf-input:-webkit-autofill,
.lf-input:-webkit-autofill:hover,
.lf-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #111827;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    transition: background-color 5000s ease-in-out 0s;
}
.lf-remember-row {
    width: clamp(248px, 21vw, 311px);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto 10px;
}
.lf-check-wrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.lf-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3f83ff;
    margin: 0;
    cursor: pointer;
}
.lf-check-label {
    font-size: 11px;
    color: #808080;
    margin: 0;
    cursor: pointer;
}
.lf-remember-hint {
    font-size: 11px;
    color: #808080;
    margin: 1px 0 0;
    line-height: 1.2;
}
.lf-btn {
    display: block;
    width: clamp(248px, 21vw, 311px);
    max-width: 100%;
    height: clamp(30px, 2.1vw, 34px);
    min-height: clamp(30px, 2.1vw, 34px);
    max-height: clamp(30px, 2.1vw, 34px);
    border-radius: 4px;
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #808080;
    font-size: clamp(11px, 0.8vw, 12px);
    font-weight: 500;
    font-family: 'Rubik', sans-serif;
    line-height: clamp(28px, 2vw, 32px);
    text-align: center;
    box-sizing: border-box;
    margin: 0 auto 8px;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.1s;
    padding: 0;
}
.lf-btn:last-of-type { margin-bottom: 0; }
.lf-btn:hover  { background: #f5f5f9; }
.lf-btn:active { transform: scale(0.98); }
#btnShowRegister {
    margin-top: 10px;
}
.lf-btn--primary,
.lf-btn--microsoft {
    background: #3f83ff;
    border-color: #3f83ff;
    font-size: clamp(12px, 0.95vw, 14px);
    font-weight: 500;
    color: #fff !important;
}
.lf-btn--primary:hover,
.lf-btn--microsoft:hover {
    background: #2f72eb;
    border-color: #2f72eb;
    color: #fff !important;
}
.lf-card-footer {
    margin-top: 9px;
    text-align: center;
}
.lf-copyright-line {
    margin: 0;
    font-size: 10px;
    color: #808080;
    letter-spacing: 0.02em;
    line-height: 1.4;
}
.lf-footer-image-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
    line-height: 0;
}
.lf-footer-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top center;
}
.lf-register-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}
.lf-register-box {
    width: min(420px, 95vw);
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
    position: relative;
}
.lf-register-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.lf-register-close:hover { color: #374151; }
.lf-register-title  { margin: 0 0 10px; font-size: 1rem; color: #1f2937; font-weight: 700; }
.lf-register-text   { margin: 0; font-size: 0.88rem; color: #6b7280; line-height: 1.5; }
.lf-register-text a { color: #2563eb; }

@media (max-width: 1024px) {
    .lf-login-card  { width: min(94vw, 680px); min-height: 800px; }
    .lf-card-body   { max-width: 292px; top: 50%; }
    .lf-field-group,
    .lf-btn,
    .lf-remember-row,
    #loginMessageContainer { max-width: 292px; }
    .lf-analytics-text { font-size: 31px; }
}

@media (max-width: 767.98px) {
    /* One scroll surface: .lf-content (scrollbar hidden). Match dynamic viewport on phones. */
    html {
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }
    body {
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }
    /* dvh: usable height on phones (toolbars); scroll lives in .lf-content */
    .lf-page        { padding: 0; align-items: stretch; height: 100vh; height: 100dvh; max-height: 100dvh; }
    .lf-top-band    { height: 76px; }
    .lf-main-shell  { width: 100%; padding: 7px 7px 0; border-radius: 16px 16px 0 0; margin-top: -20px; }
    .lf-content     { border-radius: 13px 13px 0 0; padding: 14px 6px max(10px, env(safe-area-inset-bottom, 0px)); }
    .lf-login-card  { min-height: 750px; background-size: 100% 100%; padding: 10px 10px 14px; border-radius: 10px; width: min(100%, 336px); }
    .lf-topbar      { max-width: 100%; margin-bottom: 12px; padding: 0 2px; }
    .lf-back-link   { font-size: 12px; }
    .lf-lang-select { width: 106px; height: 30px; font-size: 12px; padding: 3px 18px 3px 8px; }
    .lf-logo-img        { width: 70px; height: auto; }
    .lf-analytics-text  { font-size: 27px; }
    .lf-powered-text    { font-size: 12px; }
    .lf-card-body,
    .lf-field-group,
    .lf-btn,
    .lf-remember-row,
    #loginMessageContainer { width: 100%; max-width: 268px; }
    .lf-field-group     { margin-bottom: 7px; }
    .lf-input           { width: 100%; height: 30px; min-height: 30px; max-height: 30px; font-size: 11px; }
    .lf-label           { font-size: 11px; }
    .lf-remember-row    { margin-bottom: 8px; }
    .lf-check-label,
    .lf-remember-hint   { font-size: 10px; }
    .lf-btn             { height: 30px; min-height: 30px; max-height: 30px; margin-bottom: 6px; font-size: 11px; line-height: 28px; }
    .lf-btn--primary,
    .lf-btn--microsoft  { font-size: 12px; }
    .lf-card-footer     { margin-top: 8px; }
    .lf-copyright-line  { font-size: 9px; }
    .lf-glow--orange    { width: 130px; height: 130px; left: calc(50% - 175px); top: 72px; }
    .lf-glow--yellow    { width: 115px; height: 115px; right: calc(50% - 190px); top: 205px; }
    .lf-glow--blue      { width: 88px;  height: 88px;  left: calc(50% - 156px); bottom: 84px; }
}
@media (max-width: 420px) {
    .lf-page        { padding: 0; }
    .lf-main-shell  { padding: 6px 6px 0; margin-top: -14px; }
    .lf-content     { padding: 10px 4px max(10px, env(safe-area-inset-bottom, 0px)); }
    .lf-login-card  { width: 100%; min-height: 700px; padding: 10px 10px 14px; }
    .lf-topbar      { margin-bottom: 10px; }
    .lf-back-link   { font-size: 11px; }
    .lf-lang-select { width: 96px; height: 28px; font-size: 11px; }
    .lf-logo-img    { width: 62px; }
    .lf-analytics-text { font-size: 23px; }
    .lf-powered-text   { font-size: 10px; }
    .lf-field-group, .lf-btn, .lf-remember-row, #loginMessageContainer, .lf-card-body { max-width: 242px; }
    .lf-label       { font-size: 10px; }
    .lf-input       { height: 28px; min-height: 28px; max-height: 28px; font-size: 10px; }
    .lf-btn         { height: 28px; min-height: 28px; max-height: 28px; font-size: 10px; line-height: 26px; }
    .lf-btn--primary, .lf-btn--microsoft { font-size: 11px; }
    .lf-card-body   { top: 54%; }
}
@media (max-width: 1280px) {
    .lf-main-shell   { width: min(98vw, 1880px); padding: 10px 10px 0; }
    .lf-content      { padding: 36px 14px max(12px, env(safe-area-inset-bottom, 0px)); }
    .lf-topbar       { max-width: calc(100% - 56px); }
    .lf-card-body    { top: 56%; }
    .lf-glow--orange { left: calc(50% - 430px); top: 110px; }
    .lf-glow--yellow { right: calc(50% - 420px); top: 292px; }
    .lf-glow--blue   { left: calc(50% - 410px); bottom: 116px; }
}
@media (min-width: 1600px) {
    .lf-login-card { width: 828px; min-height: 716px; }
    .lf-card-body  { top: 50%; }
    .lf-glow--yellow { right: calc(50% - 520px); }
}

body.modal-open,
html.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
}