/* login-novo: dark look for backend/login.php and backend/register.php.
   Everything is scoped to html.vhl-ready (set by js/login.js once the new layout is built), so if the
   script never runs the original page shows unchanged. */

html.vhl-pre body { visibility: hidden !important; }

html.vhl-ready {
    /* background from the Login tab; fields, panels and borders follow it */
    --vhl-bg: var(--vhl-bg-set, #12181C);
    --vhl-surface: #191F24;
    --vhl-surface: color-mix(in srgb, var(--vhl-bg) 95%, #ffffff);
    --vhl-surface2: #20272D;
    --vhl-surface2: color-mix(in srgb, var(--vhl-bg) 90%, #ffffff);
    --vhl-line: #2E363D;
    --vhl-line: color-mix(in srgb, var(--vhl-bg) 84%, #ffffff);
    --vhl-line2: #3B444C;
    --vhl-line2: color-mix(in srgb, var(--vhl-bg) 77%, #ffffff);
    --vhl-text: #E8EDF2;
    --vhl-soft: #C3CCD5;
    --vhl-muted: #9AA6B2;
    /* secondary colour from the Login tab: links, focused fields, focus rings */
    --vhl-link: var(--vhl-link-set, #2BB3C0);
    --vhl-ring: rgba(43,179,192,.3);
    --vhl-ring: color-mix(in srgb, var(--vhl-link) 32%, transparent);
    --vhl-radius: 10px;
    background: var(--vhl-bg);
    color-scheme: dark;
}
html.vhl-ready body {
    background: var(--vhl-bg) !important;
    background-image: none !important;
    color: var(--vhl-text);
    min-height: 100vh;
    margin: 0;
}
html.vhl-ready .vhl-hidden { display: none !important; }

/* ------------------------------------------------------------------ layout */
.vhl { display: flex; min-height: 100vh; width: 100%; background: var(--vhl-bg); color: var(--vhl-text); }
.vhl-side { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; padding: 32px 56px 24px; box-sizing: border-box; }
.vhl-pano { flex: 1.15 1 560px; min-width: 0; padding: 14px; box-sizing: border-box; display: flex; position: sticky; top: 0; height: 100vh; align-self: flex-start; }
.vhl.vhl-nopano .vhl-pano { display: none; }
.vhl.vhl-nopano .vhl-side { flex-basis: 100%; }

.vhl-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.vhl-logo { display: inline-flex; align-items: center; text-decoration: none !important; color: var(--vhl-text) !important; }
.vhl-logo img { display: block; width: auto; max-width: 240px; object-fit: contain; }
.vhl-logo-text { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }

.vhl-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 36px 0; }
.vhl-box { width: 100%; max-width: 384px; }

.vhl-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: 13px; color: var(--vhl-muted); }
.vhl-foot a { color: var(--vhl-muted) !important; text-decoration: none; }
.vhl-foot a:hover { color: var(--vhl-text) !important; }
/* the platform footer (footer_login.php), moved here */
.vhl-foot .vhl-orig-foot { position: static !important; width: auto !important; background: transparent !important; border: 0 !important;
    box-shadow: none !important; padding: 0 !important; margin: 0 !important; color: var(--vhl-muted) !important; font-size: 13px !important; height: auto !important; }
.vhl-foot .vhl-orig-foot { display: block !important; min-width: 0; max-width: 100%; }
.vhl-foot .vhl-orig-foot * { color: inherit; background: transparent !important; font-size: inherit !important; white-space: normal !important; line-height: 1.6 !important; }
.vhl-foot .vhl-orig-foot .container, .vhl-foot .vhl-orig-foot .container-fluid { max-width: none; padding: 0; margin: 0; }
.vhl-foot .vhl-orig-foot a { color: var(--vhl-muted) !important; }
.vhl-foot .vhl-orig-foot a:hover { color: var(--vhl-text) !important; }

/* ------------------------------------------------------------------ language switcher */
.vhl-lang ul { list-style: none; margin: 0; padding: 0; }
.vhl-lang .lang_switcher_login { position: relative !important; display: block; margin: 0 !important; top: auto !important; left: auto !important; right: auto !important; }
.vhl-lang .nav-link { display: inline-flex !important; align-items: center; gap: 8px; height: 38px; padding: 0 12px !important; border: 1px solid var(--vhl-line);
    border-radius: 999px; color: var(--vhl-text) !important; font-size: 13px; font-weight: 600; background: var(--vhl-surface); }
.vhl-lang .nav-link:hover, .vhl-lang .nav-link:focus { border-color: var(--vhl-line2); background: var(--vhl-surface2); }
.vhl-lang .nav-link img { height: 13px !important; border-radius: 2px; }
.vhl-lang .nav-link::after { display: inline-block !important; content: ''; width: 7px; height: 7px; border-right: 2px solid var(--vhl-muted); border-bottom: 2px solid var(--vhl-muted);
    transform: rotate(45deg) translate(-2px, -2px); margin-left: 2px; border-top: 0; border-left: 0; vertical-align: middle; }
.vhl-lang .vhl-lang-code { display: none; font-weight: 700; letter-spacing: .02em; }
.vhl-lang .dropdown-menu { position: absolute; top: calc(100% + 6px) !important; right: 0 !important; left: auto !important; transform: none !important;
    min-width: 180px; width: max-content; max-width: calc(100vw - 32px); background: var(--vhl-surface); border: 1px solid var(--vhl-line); border-radius: 12px;
    padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.45); max-height: 60vh; overflow: auto; }
.vhl-lang .dropdown-item { color: var(--vhl-soft) !important; border-radius: 8px; padding: 7px 10px; font-size: 14px; }
.vhl-lang .dropdown-item:hover { background: var(--vhl-surface2); color: var(--vhl-text) !important; }
.vhl-lang .dropdown-item.lang_active { color: var(--vhl-text) !important; background: var(--vhl-surface2); font-weight: 600; }

/* ------------------------------------------------------------------ title */
.vhl-box h1, .vhl-box h4, .vhl-box #title_login, .vhl-box #title_register { color: var(--vhl-text) !important; font-size: 28px !important; font-weight: 700 !important;
    letter-spacing: -.5px; margin: 0 0 6px !important; line-height: 1.2; }
.vhl-box #description_login { color: var(--vhl-muted) !important; font-size: 15px; margin: 0 0 24px !important; }
.vhl-box > .text-center:first-child { margin-bottom: 22px; }
.vhl-box #title_register { margin-bottom: 24px !important; }

/* ------------------------------------------------------------------ fields */
.vhl-box form { margin: 0; }
.vhl-box .form-group { margin-bottom: 16px; }
.vhl-box .form-group.row { margin-left: 0; margin-right: 0; }
.vhl-box .form-group.row > [class*="col-"] { padding-left: 0; padding-right: 0; }
.vhl-box .form-group.row.mb-0 > [class*="col-"] > .form-group { margin-bottom: 16px; }
.vhl-label, .vhl-box label:not(.form-check-label):not(.custom-control-label) { display: block; color: var(--vhl-text); font-size: 14px; font-weight: 600; margin: 0 0 6px; text-align: left; }
.vhl-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vhl-label-row a { font-size: 13px; font-weight: 500; color: var(--vhl-link) !important; text-decoration: none; }
.vhl-label-row a:hover { text-decoration: underline; }
.vhl-field { position: relative; }

.vhl-box .form-control, .vhl-box .form-control-user {
    height: 46px !important; border-radius: var(--vhl-radius) !important; padding: 0 14px !important; font-size: 15px !important;
    background: var(--vhl-surface) !important; color: var(--vhl-text) !important; border: 1px solid var(--vhl-line2) !important;
    box-shadow: none !important; text-align: left; transition: border-color .15s, box-shadow .15s; }
.vhl-box .form-control::placeholder { color: #7D8995 !important; }
.vhl-box .form-control:focus { border-color: var(--vhl-link) !important; box-shadow: 0 0 0 3px var(--vhl-ring) !important; }
.vhl-box .form-control.error-highlight, .vhl-box .form-control.is-invalid { border-color: #F07178 !important; box-shadow: 0 0 0 3px rgba(240,113,120,.2) !important; }
.vhl-box input[type="password"].form-control, .vhl-field .form-control { padding-right: 46px !important; }
.vhl-box input:-webkit-autofill { -webkit-text-fill-color: var(--vhl-text); -webkit-box-shadow: 0 0 0 40px var(--vhl-surface) inset !important; caret-color: var(--vhl-text); }
.vhl-box .btn_show_hide_passw { position: absolute; right: 4px !important; top: 4px !important; left: auto !important; width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center; margin: 0 !important; color: var(--vhl-muted) !important; cursor: pointer; font-size: 15px; transform: none !important; }
.vhl-box .btn_show_hide_passw:hover { color: var(--vhl-text) !important; }

/* checkboxes */
.vhl-box .form-check { display: flex; align-items: flex-start; gap: 10px; padding-left: 0; text-align: left; }
.vhl-box .form-group.text-center .form-check, .vhl-box .text-center .form-check { justify-content: flex-start; }
.vhl-box .form-check input[type="checkbox"], .vhl-box input[type="checkbox"].form-check-input {
    position: static; margin: 1px 0 0 !important; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--vhl-accent); cursor: pointer; }
.vhl-box .form-check-label { color: var(--vhl-soft); font-size: 14px; cursor: pointer; line-height: 1.4; }
.vhl-box .form-check-label a { color: var(--vhl-link) !important; text-decoration: underline; cursor: pointer; }
.vhl-box #marketing_consent_container, .vhl-box .form-group.row:has(#terms_and_conditions) { margin-bottom: 10px; }
.vhl-box #marketing_consent_container > div, .vhl-box .form-group.row:has(#terms_and_conditions) > div { margin-top: 0 !important; text-align: left !important; }

/* captcha */
.vhl-box #captcha_canvas { display: block; margin: 0 auto 10px; border-radius: 8px; background: #fff; max-width: 100%; }
.vhl-box .form-group.row:has(#captcha_canvas) > div { text-align: center; }

/* password strength (sign-up) */
.vhl-strength { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.vhl-strength-bars { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.vhl-strength-bars span { height: 4px; border-radius: 2px; background: var(--vhl-line); transition: background .2s; }
.vhl-strength-word { font-size: 12px; font-weight: 600; min-width: 44px; text-align: right; color: var(--vhl-muted); }
.vhl-strength[data-level="1"] .vhl-strength-bars span:nth-child(-n+1) { background: #F07178; }
.vhl-strength[data-level="1"] .vhl-strength-word { color: #F59AA0; }
.vhl-strength[data-level="2"] .vhl-strength-bars span:nth-child(-n+2) { background: #E5A93B; }
.vhl-strength[data-level="2"] .vhl-strength-word { color: #EDC174; }
.vhl-strength[data-level="3"] .vhl-strength-bars span:nth-child(-n+3) { background: #3DBE7A; }
.vhl-strength[data-level="3"] .vhl-strength-word { color: #6FD39D; }
.vhl-strength[data-level="4"] .vhl-strength-bars span { background: #3DBE7A; }
.vhl-strength[data-level="4"] .vhl-strength-word { color: #6FD39D; }
.vhl-hint-text { display: block; margin-top: 6px; font-size: 12px; color: var(--vhl-muted); text-align: left; }

/* ------------------------------------------------------------------ buttons */
.vhl-box .btn { border-radius: var(--vhl-radius) !important; font-size: 15px !important; font-weight: 600 !important; text-transform: none; letter-spacing: 0;
    box-shadow: none !important; padding: 0 16px !important; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.vhl-box .btn-block + .btn-block { margin-top: 10px; }
.vhl-box .btn-primary, .vhl-box .btn-success, .vhl-box #btn_login, .vhl-box #btn_register {
    background: var(--vhl-accent) !important; border: 1px solid var(--vhl-accent) !important; color: var(--vhl-on-accent) !important; }
.vhl-box .btn-primary:hover, .vhl-box .btn-success:hover, .vhl-box #btn_login:hover, .vhl-box #btn_register:hover { filter: brightness(1.12); }
.vhl-box .btn-primary:focus-visible, .vhl-box .btn-outline-primary:focus-visible { outline: 3px solid var(--vhl-ring); outline-offset: 2px; }
.vhl-box .btn-outline-primary, .vhl-box #btn_login_passkey, .vhl-box #btn_pwa_install {
    background: var(--vhl-surface) !important; border: 1px solid var(--vhl-line2) !important; color: var(--vhl-text) !important; min-height: 44px; font-size: 14px !important; font-weight: 500 !important; }
.vhl-box .btn-outline-primary:hover, .vhl-box #btn_login_passkey:hover, .vhl-box #btn_pwa_install:hover { background: var(--vhl-surface2) !important; border-color: var(--vhl-muted) !important; }
.vhl-box .btn.disabled, .vhl-box .btn:disabled { opacity: .6; }
.vhl-box #btn_login { margin-top: 22px; }
.vhl-box #btn_register { margin-top: 18px; width: 100%; }
.vhl-box .disabled { pointer-events: none; opacity: .55; }

/* social: original circles stay (hidden), new full-width buttons call them */
.vhl-box .btn-circle { display: none !important; }
.vhl-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--vhl-muted); font-size: 13px; }
.vhl-or::before, .vhl-or::after { content: ''; flex: 1; height: 1px; background: var(--vhl-line); }
.vhl-box .strike { display: none !important; }
.vhl-social { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vhl-social.vhl-one { grid-template-columns: minmax(0, 1fr); }
.vhl-social button { height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--vhl-line2); border-radius: var(--vhl-radius);
    background: var(--vhl-surface); color: var(--vhl-text); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; padding: 0 12px; }
.vhl-social button:hover { background: var(--vhl-surface2); border-color: var(--vhl-muted); }
.vhl-social button:focus-visible { outline: 3px solid var(--vhl-ring); outline-offset: 2px; }
.vhl-social button svg { width: 18px; height: 18px; flex-shrink: 0; }
.vhl-social button i { font-size: 17px; }

/* links under the form */
.vhl-box hr { display: none; }
.vhl-box .vhl-links { margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 14px; }
.vhl-box .vhl-links > div, .vhl-box .vhl-links > br { margin: 0 !important; }
.vhl-box .vhl-links br { display: none; }
.vhl-box .vhl-links a, .vhl-box a.small { font-size: 14px !important; color: var(--vhl-link) !important; text-decoration: none; }
.vhl-box .vhl-links a:hover { text-decoration: underline; }
.vhl-box .vhl-switch { color: var(--vhl-link) !important; background: none !important; border: 0 !important; padding: 0 !important; min-height: 0 !important;
    font-weight: 600 !important; font-size: 14px !important; display: inline !important; }
.vhl-box .vhl-back { color: var(--vhl-muted) !important; font-weight: 500 !important; }
.vhl-box .vhl-back i { font-size: 11px !important; }

/* forgot-password mode */
.vhl-box .row { margin-left: 0; margin-right: 0; }
.vhl-box .row > .col-md-12 { padding-left: 0; padding-right: 0; }
.vhl-box .row.disabled { opacity: .55; }

/* ------------------------------------------------------------------ 360 panel */
.vhl-pano-in { position: relative; flex: 1; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--vhl-surface); border: 1px solid var(--vhl-line); min-height: 0; }
.vhl-stage { position: relative; flex: 1; min-height: 0; background: color-mix(in srgb, var(--vhl-bg) 80%, #000000); }
.vhl-stage > img.vhl-poster, .vhl-stage > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }
.vhl-stage > iframe { opacity: 0; transition: opacity .6s ease; }
.vhl-stage > iframe.vhl-loaded { opacity: 1; }
/* strip under the tour */
.vhl-cap { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; border-top: 1px solid var(--vhl-line); background: var(--vhl-surface); }
.vhl-cap-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.vhl-cap-text b { font-size: 17px; font-weight: 700; letter-spacing: -.2px; color: var(--vhl-text); line-height: 1.3; }
.vhl-cap-sub { font-size: 13px; color: var(--vhl-muted); line-height: 1.45; }
.vhl-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--vhl-muted); margin-bottom: 2px; }
.vhl-dot { width: 7px; height: 7px; border-radius: 50%; background: #3DBE7A; box-shadow: 0 0 0 3px rgba(61,190,122,.22); }
html.vhl-ready .vhl-pano a.vhl-open, html.vhl-ready .vhl-pano a.vhl-open:visited {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--vhl-radius);
    background: var(--vhl-surface2) !important; color: var(--vhl-text) !important; border: 1px solid var(--vhl-line2) !important;
    font-size: 14px; font-weight: 600; text-decoration: none !important; white-space: nowrap; line-height: 1; }
html.vhl-ready .vhl-pano a.vhl-open:hover, html.vhl-ready .vhl-pano a.vhl-open:focus { background: var(--vhl-line) !important; color: #FFFFFF !important; border-color: var(--vhl-muted) !important; }
html.vhl-ready .vhl-pano a.vhl-open:focus-visible { outline: 3px solid var(--vhl-ring); outline-offset: 2px; }
html.vhl-ready .vhl-pano a.vhl-open svg { stroke: currentColor; }

/* ------------------------------------------------------------------ dialogs (2FA, passkeys, terms, install app) */
html.vhl-ready .modal-content { background: var(--vhl-surface); color: var(--vhl-text); border: 1px solid var(--vhl-line); border-radius: 14px; }
html.vhl-ready .modal-header, html.vhl-ready .modal-footer { border-color: var(--vhl-line); }
html.vhl-ready .modal-title { color: var(--vhl-text); font-weight: 700; }
html.vhl-ready .modal .close { color: var(--vhl-text); text-shadow: none; opacity: .7; }
html.vhl-ready .modal .form-control { background: var(--vhl-bg); color: var(--vhl-text); border: 1px solid var(--vhl-line2); border-radius: var(--vhl-radius); height: 46px; }
html.vhl-ready .modal .btn { border-radius: var(--vhl-radius); font-weight: 600; }
html.vhl-ready .modal .btn-success, html.vhl-ready .modal .btn-primary { background: var(--vhl-accent); border-color: var(--vhl-accent); color: var(--vhl-on-accent); }
html.vhl-ready .modal .btn-secondary { background: var(--vhl-surface2); border-color: var(--vhl-line2); color: var(--vhl-text); }
html.vhl-ready .modal .btn-outline-primary { background: transparent; border-color: var(--vhl-line2); color: var(--vhl-text); }
html.vhl-ready .modal a { color: var(--vhl-link); }
html.vhl-ready .modal-backdrop.show { opacity: .7; }

/* ------------------------------------------------------------------ smaller screens: form only */
@media (max-width: 991.98px) {
    .vhl-pano { display: none; }
    .vhl-side { flex-basis: 100%; padding: 18px 22px 20px; }
    .vhl-main { align-items: flex-start; padding: 32px 0 28px; }
    .vhl-box { max-width: 440px; margin: 0 auto; }
    /* language button: flag + short code; full names stay in the menu */
    .vhl-lang .vhl-lang-name { display: none; }
    .vhl-lang .vhl-lang-code { display: inline; }
}
@media (max-width: 575.98px) {
    .vhl-box > .text-center:first-child, .vhl-box #title_register { text-align: left !important; }
    .vhl-box h1, .vhl-box h4, .vhl-box #title_login, .vhl-box #title_register { font-size: 24px !important; }
    .vhl-foot { justify-content: center; text-align: center; }
    .vhl-logo img { max-width: 170px; }
    .vhl-lang .nav-link { height: 44px; }
}
