/*!
 * Client login page, Jupiter theme. Original CSS. Colour tokens come from /panel/jupiter-res/css/jupiter.css
 * (dark default, light via data-theme). Reseller branding arrives as --jl-* custom properties
 * (emitted inline by index.php from the reseller_branding row) and overrides the theme defaults.
 */
html, body { height: 100%; }
body.jp-login {
    margin: 0; min-height: 100%;
    font-family: var(--jp-font); font-size: 14px; line-height: 1.5; color: var(--jp-text);
    background: var(--jp-bg);
    background-image: radial-gradient(1200px 600px at 50% -10%, var(--jp-primary-soft), transparent 70%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}
/* reseller page background gradient (login_bg_gradient_from/to) */
body.jp-login.jl-brand-bg { background: linear-gradient(var(--jl-bg-from), var(--jl-bg-to) 900px) var(--jl-bg-to); background-attachment: scroll; }

.jl-wrap {
    position: relative; min-height: 100vh; box-sizing: border-box;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    padding: 9vh 16px 48px;
}
/* reseller background image (login_bg_image), centred behind the card like before */
.jl-brand-img .jl-wrap { background: var(--jl-bg-image) no-repeat center; } /* same placement as the old .login-whisp rule */

.jl-theme-toggle {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px; border-radius: 50%; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--jp-control-border); background: var(--jp-surface); color: var(--jp-text); cursor: pointer; font-size: 16px;
}
.jl-theme-toggle:hover { background: var(--jp-surface-2); }
.jl-when-dark { display: none; }
:root[data-theme="dark"] .jl-when-dark { display: inline; }
:root[data-theme="dark"] .jl-when-light { display: none; }

.jl-notify { width: 100%; max-width: 400px; }
.jl-notify .jl-alert { margin: 0 0 16px; }
.jl-notify #login-status[style*="hidden"] { display: none; }

.jl-card {
    width: 100%; max-width: 400px; box-sizing: border-box;
    background: var(--jp-surface); border: 1px solid var(--jp-border); border-radius: 8px;
    box-shadow: var(--jp-shadow-lg); overflow: hidden;
}
.jl-card-brand {
    display: flex; align-items: center; justify-content: center;
    min-height: 92px; padding: 16px 24px; box-sizing: border-box;
    background: var(--jp-side-bg);
}
.jl-brand-top .jl-card-brand { background: var(--jl-box-top); }
.jl-card-brand img { width: 225px; height: 60px; max-width: 100%; object-fit: contain; display: block; }
.jl-card-body { padding: 24px 28px 22px; }
/* reseller box colours are semi-transparent over the page background, as on the old login box */
.jl-brand-box .jl-card, .jl-brand-top .jl-card { background: transparent; border-color: rgba(255, 255, 255, .15); }
.jl-brand-box .jl-card-body { background: var(--jl-box-bot); color: #fff; }
.jl-brand-box .jl-card-body .jl-title, .jl-brand-box .jl-card-body label { color: #fff; }
.jl-brand-box .jl-card-body .jl-links a { color: #fff; }

.jl-title { margin: 0 0 18px; font: 400 20px/1.3 var(--jp-font); color: var(--jp-heading); text-align: center; }
.jl-field { margin: 0 0 16px; }
.jl-field label { display: block; margin: 0 0 6px; font-weight: 600; font-size: 14px; color: var(--jp-heading); }
.jl-input-icon { position: relative; }
.jl-input-icon > .bi { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--jp-text-subtle); font-size: 16px; pointer-events: none; }
.jp-login input[type="text"], .jp-login input[type="password"], .jp-login select {
    width: 100%; height: 42px; box-sizing: border-box; padding: 0 12px;
    font: 400 15px/1.4 var(--jp-font); color: var(--jp-text);
    background: var(--jp-surface); border: 1px solid var(--jp-control-border); border-radius: 4px; box-shadow: none; margin: 0;
}
.jl-input-icon input { padding-left: 38px !important; }
.jp-login ::placeholder { color: var(--jp-text-subtle); font-style: normal; opacity: 1; }
.jp-login select {
    -webkit-appearance: none; appearance: none; padding-right: 34px;
    background-image: var(--jp-select-caret); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
}
.jp-login input:focus, .jp-login select:focus, .jp-login button:focus-visible, .jp-login a:focus-visible {
    outline: 0; border-color: var(--jp-primary); box-shadow: var(--jp-focus-ring);
}
.jl-token { min-height: 0; color: var(--jp-danger-text); font-size: 13px; }
.jl-submit {
    width: 100%; height: 44px; margin: 4px 0 20px; border: 1px solid var(--jp-primary); border-radius: 4px;
    background: var(--jp-primary); color: var(--jp-on-primary); font: 600 15px/1 var(--jp-font); cursor: pointer;
}
.jl-submit:hover { background: var(--jp-primary-hover); border-color: var(--jp-primary-hover); }
.jl-lang { padding-top: 16px; border-top: 1px solid var(--jp-border); }
.jl-brand-box .jl-lang { border-top-color: rgba(255, 255, 255, .2); }
.jl-links { margin: 0; text-align: center; font-size: 14px; }
.jl-links a { color: var(--jp-link); text-decoration: none; }
.jl-links a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .jl-wrap { padding-top: 64px; }
    .jl-card-body { padding: 20px 18px 18px; }
}
/* DB-IP attribution (licence: CC BY 4.0) - only page that uses DB-IP data */
.jl-attrib { margin: 14px 0 0; text-align: center; font-size: 12px; }
.jl-attrib a { color: var(--jp-text-muted, #8a93a6); text-decoration: none; }
.jl-attrib a:hover { text-decoration: underline; }
