/*
 * Admin login (/admin/login). Layout and decorative graphics are fixed; every colour comes
 * from the --vl-* variables set by the page (Hotel Setup > Login page), derived shades use color-mix.
 * The background photo is a separate layer (.vl-photo-img) so it can be replaced on its own.
 */
.vl-login {
    --vl-panel: #0b1a3a;
    --vl-card: #13264d;
    --vl-accent: #d4a849;
    --vl-accent-light: #f3d58a;
    --vl-text: #ffffff;
    --vl-muted: #b9c3d8;
    --vl-button-text: #1b1405;

    --vl-panel-deep: color-mix(in srgb, var(--vl-panel) 78%, #000);
    --vl-panel-lift: color-mix(in srgb, var(--vl-panel) 90%, #fff);
    --vl-line: color-mix(in srgb, var(--vl-muted) 32%, transparent);
    --vl-error: #ff9c8f;
    --vl-photo-w: 52%;
    --vl-panel-left: 40%;
    --vl-main-left: 42%;

    position: relative;
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    isolation: isolate;
    background: var(--vl-panel);
    color: var(--vl-text);
    font-family: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    letter-spacing: 0;
}
body.authentication-bg { background: #0b1a3a; }

/*
 * User theme (gear panel): signed out, the theme last used on this device is in #userThemeCss.
 * When it is not the default it takes over the login colours (top bar -> panel, sidebar -> card,
 * accent -> gold); text turns black or white for contrast. The default theme keeps the
 * Hotel Setup > Login page colours.
 */
@supports (color: oklch(from red l c h)) {
    html:has(#userThemeCss:not(:empty)) .vl-login {
        --vl-panel: var(--md-ink);
        --vl-card: var(--md-ink-2);
        --vl-accent: var(--md-accent);
        --vl-accent-light: color-mix(in srgb, var(--md-accent) 55%, #fff);
        --vl-text: oklch(from var(--md-ink) clamp(0, (.62 - l) * 1000, 1) 0 0);
        --vl-muted: oklch(from var(--md-ink) clamp(0, (.62 - l) * 1000, 1) 0 0 / .72);
        --vl-button-text: oklch(from var(--md-accent) clamp(0, (.7 - l) * 1000, 1) 0 0);
    }
    html:has(#userThemeCss:not(:empty)) body.authentication-bg { background: var(--md-ink); }
}

/* ---------- background photo + Grand Velora sign ---------- */
.vl-photo {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--vl-photo-w);
    overflow: hidden;
    container-type: size;
    z-index: 0;
}
/* 20.6% / 30% is the sign panel of the default photo; the same point of the box, at any size */
.vl-photo-img {
    position: absolute;
    inset: 0;
    background-color: var(--vl-panel-deep);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 20.6% 30%;
}
.vl-photo-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 55%, color-mix(in srgb, var(--vl-panel) 35%, transparent) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, .12), transparent 25%, transparent 75%, rgba(0, 0, 0, .25));
}
.vl-sign {
    /* width tracks the cover-scaled photo: max(width-bound, height-bound) */
    --vl-sign-w: max(22cqw, 15.9cqh);
    position: absolute;
    left: 20.6%;
    top: 30%;
    transform: translate(-50%, -50%);
    width: var(--vl-sign-w);
    font-size: calc(var(--vl-sign-w) / 7.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "Cinzel", "Trajan Pro", Georgia, serif;
    line-height: 1;
    text-transform: uppercase;
    color: var(--vl-accent-light);
    filter: drop-shadow(0 0 .35em color-mix(in srgb, var(--vl-accent) 45%, transparent)) drop-shadow(0 .08em .1em rgba(0, 0, 0, .55));
    pointer-events: none;
}
.vl-sign-crown { width: 2.9em; height: auto; margin-bottom: .45em; }
/* service name (config i.service_name); the page sets font-size from the name's length */
.vl-sign-name {
    max-width: 100%;
    font-size: 1.62em;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: .01em;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: anywhere;
    background: linear-gradient(180deg, var(--vl-accent-light) 15%, var(--vl-accent) 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.vl-sign-stars {
    display: flex;
    align-items: center;
    gap: .45em;
    font-family: Arial, sans-serif;
    font-size: .8em;
    letter-spacing: .14em;
    margin-top: .55em;
    color: var(--vl-accent-light);
}
.vl-sign-stars::before,
.vl-sign-stars::after {
    content: "";
    width: 1.6em;
    height: .09em;
    background: var(--vl-accent);
}

/* ---------- navy panel, curve and decorations ---------- */
.vl-panel {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.vl-curve { position: absolute; display: block; }
.vl-curve-desktop { top: 0; bottom: 0; left: var(--vl-panel-left); right: 0; width: calc(100% - var(--vl-panel-left)); height: 100%; }
.vl-curve-mobile { display: none; }
.vl-curve-fill { fill: var(--vl-panel); }
.vl-curve-depth { fill: var(--vl-panel-lift); opacity: .45; }
.vl-curve-line {
    fill: none;
    stroke: var(--vl-accent);
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 3px color-mix(in srgb, var(--vl-accent) 55%, transparent));
}
.vl-deco { position: absolute; display: block; }
.vl-blob {
    top: -170px;
    right: -210px;
    width: 640px;
    height: 640px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 45%, var(--vl-panel-lift) 0%, color-mix(in srgb, var(--vl-panel-lift) 40%, transparent) 55%, transparent 72%);
    opacity: .75;
}
.vl-frame {
    border: 2px solid var(--vl-accent);
    border-radius: 18%;
    transform: rotate(45deg);
}
.vl-frame-top { width: 230px; height: 230px; top: -200px; right: -3px; }
.vl-frame-bottom { width: 200px; height: 200px; bottom: 10px; right: -59px; opacity: .85; }
.vl-frame-mid { width: 70px; height: 70px; top: calc(58.7% - 35px); right: 115px; border-width: 1.5px; opacity: .45; }
.vl-tile { border-radius: 22%; transform: rotate(45deg); background: var(--vl-panel-lift); }
.vl-tile-edge { width: 62px; height: 62px; top: calc(37% - 31px); right: -14px; opacity: .55; }
.vl-tile-low { width: 56px; height: 56px; top: 70%; left: 49%; opacity: .3; }
.vl-dots {
    background-image: radial-gradient(circle, var(--vl-accent) 0 2.6px, transparent 3.3px);
    background-size: 33px 33px;
    opacity: .9;
}
.vl-dots-top { top: 102px; right: 16px; width: 132px; height: 132px; }
.vl-dots-bottom { left: 42.4%; bottom: 14px; width: 99px; height: 132px; opacity: .55; }

/* ---------- content ---------- */
.vl-main {
    position: relative;
    z-index: 2;
    margin-left: var(--vl-main-left);
    width: calc(100% - var(--vl-main-left));
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 3% 28px;
}
.vl-card {
    position: relative;
    width: min(100%, 590px);
    padding: 44px 50px 46px;
    border-radius: 30px;
    background:
        linear-gradient(155deg, color-mix(in srgb, var(--vl-card) 82%, #fff 6%) 0%, color-mix(in srgb, var(--vl-card) 78%, transparent) 55%, color-mix(in srgb, var(--vl-panel) 70%, transparent) 100%);
    border: 1px solid color-mix(in srgb, var(--vl-text) 16%, transparent);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .38), inset 0 1px 0 color-mix(in srgb, var(--vl-text) 10%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.vl-logo { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 30px; }
.vl-logo-mark { width: 86px; height: auto; color: var(--vl-accent); flex: none; }
.vl-logo-text { display: flex; flex-direction: column; }
.vl-logo-title {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.05;
    color: var(--vl-text);
    text-transform: uppercase;
}
.vl-logo-sub { font-size: 16.5px; font-weight: 600; letter-spacing: .1em; color: var(--vl-accent-light); text-transform: uppercase; }

.vl-login .vl-title {
    margin: 0 0 10px;
    text-align: center;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 44px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
    color: var(--vl-text);
}
.vl-title span { color: var(--vl-accent); }
.vl-subtitle { margin: 0 0 34px; text-align: center; font-size: 17px; color: var(--vl-muted); }

.vl-card .mt-3:empty { display: none; }
.vl-card .alert { border-radius: 12px; font-size: 14px; border: 1px solid; }
.vl-card .alert-success { background: rgba(52, 199, 89, .14); border-color: rgba(52, 199, 89, .35); color: #b9f3c8; }
.vl-card .alert-danger { background: rgba(255, 92, 92, .14); border-color: rgba(255, 92, 92, .35); color: #ffc9c9; }
.vl-card .alert-warning { background: rgba(255, 196, 0, .14); border-color: rgba(255, 196, 0, .35); color: #ffe7a3; }
.vl-card .alert .btn-close { filter: invert(1); }

/* demo workspace (parameterx): the shared sign-in, filled into the form */
.vl-demo { display: flex; gap: 10px; align-items: flex-start; margin: -12px 0 22px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5;
    color: var(--vl-text); background: color-mix(in srgb, var(--vl-accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--vl-accent) 40%, transparent); }
.vl-demo i { font-size: 20px; color: var(--vl-accent); margin-top: 1px; }
.vl-demo span { font-weight: 700; color: var(--vl-accent-light); }
.vl-powered { margin-top: 6px; }
.vl-login .vl-powered a { color: var(--vl-accent); font-weight: 600; }

.vl-group { margin-bottom: 18px; }
.vl-field { position: relative; }
.vl-field-icon {
    position: absolute;
    left: 22px;
    top: 0;
    height: 64px;
    display: flex;
    align-items: center;
    font-size: 26px;
    color: var(--vl-muted);
    pointer-events: none;
    z-index: 3;
}
.vl-login .vl-input,
.vl-login .vl-input.is-valid,
.vl-login .vl-input.is-invalid {
    height: 64px;
    padding: 0 22px 0 74px;
    border-radius: 12px;
    border: 1px solid var(--vl-line);
    background: color-mix(in srgb, var(--vl-panel) 45%, transparent);
    background-image: none;
    color: var(--vl-text);
    font-size: 18px;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.vl-login .vl-input-password { padding-right: 64px !important; }
.vl-login .vl-input::placeholder { color: var(--vl-muted); opacity: .9; }
.vl-login .vl-input:focus {
    border-color: var(--vl-accent);
    background-color: color-mix(in srgb, var(--vl-panel) 60%, transparent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--vl-accent) 22%, transparent);
    color: var(--vl-text);
}
.vl-login .vl-input.is-invalid { border-color: var(--vl-error); }
.vl-login .vl-input:-webkit-autofill,
.vl-login .vl-input:-webkit-autofill:hover,
.vl-login .vl-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--vl-text);
    caret-color: var(--vl-text);
    box-shadow: 0 0 0 1000px var(--vl-panel) inset;
    transition: background-color 9999s;
}
.vl-field:focus-within .vl-field-icon { color: var(--vl-accent); }
.vl-eye {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--vl-muted);
    font-size: 24px;
    z-index: 3;
}
.vl-eye:hover { color: var(--vl-text); }
.vl-eye:focus-visible { outline: 2px solid var(--vl-accent); outline-offset: 1px; }
/* px.js: client errors are inserted after the input, server errors go into #{field}_error */
.vl-login .vl-field .invalid-feedback,
.vl-server-error { display: block; margin-top: 6px; padding-left: 4px; font-size: 13.5px; font-style: normal; color: var(--vl-error); }
.vl-login .vl-field .invalid-feedback:empty,
.vl-server-error:empty { display: none; }
.vl-server-error * { color: inherit !important; }

.vl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 22px; }
.vl-check { display: flex; align-items: center; gap: 12px; margin: 0; padding-left: 0; min-height: 0; }
.vl-login .vl-check .form-check-input {
    float: none;
    margin: 0;
    width: 23px;
    height: 23px;
    border-radius: 5px;
    border: 1.5px solid var(--vl-muted);
    background-color: transparent;
    cursor: pointer;
}
.vl-login .vl-check .form-check-input:checked {
    background-color: var(--vl-accent);
    border-color: var(--vl-accent);
}
.vl-login .vl-check .form-check-input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--vl-accent) 22%, transparent); }
.vl-check .form-check-label { font-size: 16.5px; color: var(--vl-text); cursor: pointer; }
.vl-login .vl-link { color: var(--vl-accent); font-size: 16.5px; font-weight: 600; }
.vl-login .vl-link:hover { color: var(--vl-accent-light); text-decoration: underline; }

.vl-login .vl-btn {
    width: 100%;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(100deg, var(--vl-accent) 0%, var(--vl-accent-light) 62%, var(--vl-accent) 100%);
    color: var(--vl-button-text);
    font-size: 23px;
    font-weight: 700;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--vl-accent) 28%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.vl-btn i { font-size: 28px; }
.vl-login .vl-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); color: var(--vl-button-text); }
.vl-login .vl-btn:active:not(:disabled) { transform: translateY(0); }
.vl-login .vl-btn:focus-visible { outline: 3px solid var(--vl-accent-light); outline-offset: 3px; }
.vl-login .vl-btn:disabled { opacity: .75; color: var(--vl-button-text); }

.vl-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 30px 0 0;
    font-size: 17px;
    color: var(--vl-muted);
    text-align: center;
}
.vl-secure-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--vl-accent); }
.vl-secure-badge i { font-size: 22px; }
.vl-secure-sep { color: var(--vl-line); }
.vl-copy { margin: 26px 0 0; font-size: 16px; color: color-mix(in srgb, var(--vl-muted) 80%, transparent); text-align: center; }

@media (prefers-reduced-motion: no-preference) {
    .vl-card { animation: vl-rise .5s ease-out both; }
    @keyframes vl-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---------- smaller desktops / short screens ---------- */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .vl-card { padding: 38px 40px 40px; }
    .vl-logo-mark { width: 72px; }
    .vl-logo-title { font-size: 32px; }
    .vl-logo-sub { font-size: 14px; }
    .vl-login .vl-title { font-size: 38px; }
    .vl-subtitle { font-size: 16px; margin-bottom: 28px; }
}
@media (min-width: 992px) and (max-height: 860px) {
    .vl-main { padding-top: 32px; padding-bottom: 18px; }
    .vl-card { padding-top: 30px; padding-bottom: 32px; }
    .vl-logo { margin-bottom: 20px; }
    .vl-subtitle { margin-bottom: 22px; }
    .vl-group { margin-bottom: 14px; }
    .vl-field-icon, .vl-login .vl-input, .vl-login .vl-btn { height: 56px; }
    .vl-eye { top: 6px; }
    .vl-row { margin-bottom: 16px; }
    .vl-secure { margin-top: 20px; }
    .vl-copy { margin-top: 14px; }
}

/* ---------- tablet + phone: photo on top, panel with a curved top edge below ---------- */
@media (max-width: 991.98px) {
    .vl-login {
        --vl-photo-h: clamp(300px, 44vh, 520px);
        flex-direction: column;
    }
    .vl-photo { position: relative; inset: auto; width: 100%; height: var(--vl-photo-h); flex: none; }
    .vl-photo-shade { background: linear-gradient(180deg, rgba(0, 0, 0, .15), transparent 30%, transparent 60%, color-mix(in srgb, var(--vl-panel) 55%, transparent)); }
    .vl-curve-desktop { display: none; }
    .vl-curve-mobile { display: block; left: 0; right: 0; width: 100%; top: calc(var(--vl-photo-h) - 72px); height: 74px; }
    .vl-blob { top: calc(var(--vl-photo-h) + 40px); right: -280px; width: 520px; height: 520px; opacity: .5; }
    .vl-frame-top { top: calc(var(--vl-photo-h) - 30px); right: -150px; width: 200px; height: 200px; opacity: .6; }
    .vl-frame-bottom { width: 160px; height: 160px; right: -70px; bottom: -40px; opacity: .6; }
    .vl-frame-mid, .vl-tile, .vl-dots-bottom { display: none; }
    .vl-dots-top { top: auto; bottom: 24px; right: auto; left: 16px; width: 99px; height: 99px; opacity: .35; }
    .vl-main {
        margin: -110px 0 0;
        width: 100%;
        min-height: 0;
        padding: 0 24px 28px;
        justify-content: flex-start;
    }
    .vl-card { width: min(100%, 560px); }
}
@media (max-width: 575.98px) {
    .vl-login { --vl-photo-h: clamp(250px, 38vh, 340px); }
    .vl-main { margin-top: -84px; padding: 0 16px 22px; }
    .vl-card { padding: 28px 20px 26px; border-radius: 22px; }
    .vl-logo { gap: 12px; margin-bottom: 20px; }
    .vl-logo-mark { width: 58px; }
    .vl-logo-title { font-size: 26px; }
    .vl-logo-sub { font-size: 11.5px; letter-spacing: .08em; }
    .vl-login .vl-title { font-size: 31px; }
    .vl-subtitle { font-size: 14.5px; margin-bottom: 22px; }
    .vl-group { margin-bottom: 14px; }
    .vl-field-icon { left: 16px; height: 54px; font-size: 22px; }
    .vl-login .vl-input,
    .vl-login .vl-input.is-valid,
    .vl-login .vl-input.is-invalid { height: 54px; padding-left: 52px; font-size: 16px; }
    .vl-login .vl-input-password { padding-right: 54px !important; }
    .vl-eye { top: 5px; right: 6px; }
    .vl-check .form-check-label, .vl-login .vl-link { font-size: 15px; }
    .vl-login .vl-check .form-check-input { width: 20px; height: 20px; }
    .vl-login .vl-btn { height: 54px; font-size: 19px; }
    .vl-btn i { font-size: 23px; }
    .vl-secure { font-size: 14px; margin-top: 22px; }
    .vl-secure-sep { display: none; }
    .vl-dots-top { display: none; }
    .vl-copy { font-size: 13px; margin-top: 12px; }
}
@media (max-width: 359.98px) {
    .vl-logo-mark { display: none; }
    .vl-login .vl-title { font-size: 27px; }
}
