/* My Radius VPS: the host layer's own pages (sign-in, password) and the slim bar over the panel. Light and dark. */
/* Light or dark is a class on <html> (dark-mode / light-mode): a line in the page's head puts it there before the
   first paint - the choice made with the bar's button, else the device's own setting. Only a page whose script did
   not run falls back on the device's setting by itself. */
:root { color-scheme: light; --hst-bg: #f4f6fb; --hst-card: #fff; --hst-text: #1b1c1f; --hst-soft: #5b6270; --hst-line: #dfe3ec; --hst-primary: #005eff; --hst-on-primary: #fff; --hst-bad: #b3261e; --hst-bad-bg: #fde8e6; --hst-ok: #0b6b3a; --hst-ok-bg: #e2f5ea; --hst-warn-bg: #fff3d6; --hst-warn: #6b4a00; }
@media (prefers-color-scheme: dark) { :root:not(.light-mode) { color-scheme: dark; --hst-bg: #0e1422; --hst-card: #182033; --hst-text: #e8eef7; --hst-soft: #a9b4c7; --hst-line: #2a3550; --hst-primary: #3b82ff; --hst-on-primary: #fff; --hst-bad: #ffb4ab; --hst-bad-bg: #4a1512; --hst-ok: #8fe0b0; --hst-ok-bg: #123524; --hst-warn-bg: #3d2f08; --hst-warn: #ffdf9a; } }
html.dark-mode, body.dark-mode { color-scheme: dark; --hst-bg: #0e1422; --hst-card: #182033; --hst-text: #e8eef7; --hst-soft: #a9b4c7; --hst-line: #2a3550; --hst-primary: #3b82ff; --hst-on-primary: #fff; --hst-bad: #ffb4ab; --hst-bad-bg: #4a1512; --hst-ok: #8fe0b0; --hst-ok-bg: #123524; --hst-warn-bg: #3d2f08; --hst-warn: #ffdf9a; }
/* The panel takes its colours from the site theme's tokens where it lives on our own site, light and dark. Here there
   is no site theme: in the light the panel falls back on its own light colours; in the dark its own dark colours are
   given here by the same names, so every part of the panel follows the page - not only the parts that have a dark
   rule of their own. */
html.dark-mode {
    --md-sys-color-surface: #0A1020; --md-sys-color-surface-container-low: #131C32; --md-sys-color-surface-container: #1A2540;
    --md-sys-color-surface-container-high: #222D4A; --md-sys-color-surface-container-highest: #2A3654;
    --md-sys-color-on-surface: #E8EEF7; --md-sys-color-outline: #4A587A; --md-sys-color-outline-variant: #2A3654;
    --md-sys-color-primary: #3B82FF; --md-sys-color-on-primary: #FFFFFF; --md-sys-color-primary-container: rgba(59, 130, 255, .18); --md-sys-color-on-primary-container: #CFE0FF;
    --md-sys-color-secondary-container: rgba(59, 130, 255, .22); --md-sys-color-on-secondary-container: #E8EEF7;
    --md-sys-color-error: #F87171; --md-sys-color-error-container: rgba(239, 68, 68, .16); --md-sys-color-on-error-container: #FCA5A5;
    --md-sys-color-inverse-surface: #E8EEF7; --md-sys-color-inverse-on-surface: #131C32;
}
/* (four of the panel's colours share one of those names with another colour: they keep their own dark value) */
html.dark-mode .hst-panel .ng-vpn { --ng-info: #60A5FA; --ng-info-bg: rgba(59, 130, 246, .16); --ng-on-info-bg: #BFDBFE; --ng-dialog: #1A2540; }

.hst-body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px 16px; box-sizing: border-box; background: var(--hst-bg); color: var(--hst-text); font-family: "Cairo", "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; }
.hst-card { width: 100%; max-width: 420px; box-sizing: border-box; background: var(--hst-card); border-radius: 28px; padding: 30px 26px 24px; box-shadow: 0 8px 30px rgba(10, 30, 80, .08); text-align: center; }
.hst-logo { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 22px; display: flex; align-items: center; justify-content: center; background: var(--hst-fill, var(--hst-primary)); color: var(--hst-on-fill, var(--hst-on-primary)); font-weight: 800; font-size: 22px; letter-spacing: .5px; }
.hst-card h1 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.hst-sub { margin: 0 0 18px; color: var(--hst-soft); font-size: 14.5px; line-height: 1.7; }
.hst-form { display: grid; gap: 14px; text-align: start; margin-top: 8px; }
.hst-field { display: grid; gap: 6px; }
.hst-field > span { font-size: 13.5px; font-weight: 600; color: var(--hst-soft); }
.hst-field > input { box-sizing: border-box; width: 100%; height: 52px; padding: 0 16px; border-radius: 16px; border: 1.5px solid var(--hst-line); background: transparent; color: var(--hst-text); font: inherit; font-size: 16px; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.hst-field > input:focus-visible { border-color: var(--hst-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hst-primary) 22%, transparent); }
.hst-btn { height: 52px; border: 0; border-radius: 26px; background: var(--hst-fill, var(--hst-primary)); color: var(--hst-on-fill, var(--hst-on-primary)); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; transition: transform .12s ease, filter .15s ease; }
.hst-btn:hover { filter: brightness(1.07); }
.hst-btn:active { transform: scale(.98); }
.hst-btn:focus-visible, .hst-link:focus-visible { outline: 2px solid var(--hst-primary); outline-offset: 3px; }
.hst-link { display: inline-block; margin-top: 16px; color: var(--hst-primary); font-size: 14px; font-weight: 600; text-decoration: none; }
.hst-note { margin: 0 0 6px; padding: 12px 14px; border-radius: 16px; font-size: 14px; line-height: 1.7; text-align: start; }
.hst-note.is-bad { background: var(--hst-bad-bg); color: var(--hst-bad); }
.hst-note.is-ok { background: var(--hst-ok-bg); color: var(--hst-ok); }

/* around the panel */
.hst-panel { margin: 0; background: var(--hst-bg); overflow-x: hidden; }
/* the panel's own styles were written for pages where every box counts its padding inside its width (as on every site
   the panel has lived in); without this its full-width shell is wider than the screen and its edge is cut */
.hst-panel, .hst-panel *, .hst-panel *::before, .hst-panel *::after { box-sizing: border-box; }
.hst-wrap { padding: 12px 16px 16px; }
.hst-bar { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; padding: 8px 16px; background: var(--hst-card); border-bottom: 1px solid var(--hst-line); color: var(--hst-text); font-family: "Cairo", "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; font-size: 13.5px; }
.hst-bar b { font-size: 15px; color: var(--hst-primary); }
/* whose side the page is: our mark and "Admin" on the server's own, the owner's name and logo on his clients' */
.hst-sub2 { margin: 18px 0 0; line-height: 1.8; }
.hst-bar-mark { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.hst-bar-mark b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.hst-bar-logo { width: 24px; height: 24px; object-fit: contain; border-radius: 7px; flex: none; }
.hst-bar-mark i { font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 10px; background: color-mix(in srgb, var(--hst-primary) 14%, transparent); color: var(--hst-primary); }
.hst-bar-sp { flex: 1; }
.hst-bar a, .hst-bar button { color: var(--hst-soft); text-decoration: none; background: none; border: 0; padding: 6px 4px; margin: 0; font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; }
.hst-bar a:hover, .hst-bar button:hover { color: var(--hst-primary); }
.hst-bar a:focus-visible, .hst-bar button:focus-visible { outline: 2px solid var(--hst-primary); outline-offset: 1px; }
.hst-bar form { margin: 0; }
/* light / dark: the moon and "dark mode" while the page is light, the sun and "light mode" while it is dark */
.hst-theme { display: inline-flex; align-items: center; gap: 6px; }
.hst-theme svg { width: 18px; height: 18px; flex: none; }
.hst-theme .hst-sun, .hst-theme .hst-to-light, html.dark-mode .hst-theme .hst-moon, html.dark-mode .hst-theme .hst-to-dark { display: none; }
html.dark-mode .hst-theme .hst-sun { display: block; } html.dark-mode .hst-theme .hst-to-light { display: inline; }
.hst-links { margin: 16px 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 22px; }
.hst-links .hst-link { margin-top: 0; }
button.hst-link { background: none; border: 0; padding: 4px 2px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 8px; }
@media (max-width: 480px) { .hst-bar .hst-theme span { display: none !important; } .hst-bar .hst-theme svg { width: 22px; height: 22px; } }
.hst-banner { padding: 10px 16px; background: var(--hst-warn-bg); color: var(--hst-warn); font-family: "Cairo", "Tajawal", system-ui, sans-serif; font-size: 14px; font-weight: 600; line-height: 1.7; text-align: center; }
@media (max-width: 480px) { .hst-wrap { padding: 8px 8px 12px; } .hst-bar { padding: 6px 10px; } }
@media (prefers-reduced-motion: reduce) { .hst-btn, .hst-field > input { transition: none; } }
/* the server's own logo (the owner sets it for his clients), and the line of a client's panel opened for support */
.hst-logo.is-img { object-fit: contain; background: transparent; display: block; }
.hst-bar .hst-as { padding: 3px 12px; border-radius: 12px; background: var(--hst-warn-bg); color: var(--hst-warn); font-weight: 700; }
.hst-bar .hst-back { padding: 5px 14px; border-radius: 16px; background: var(--hst-fill, var(--hst-primary)); color: var(--hst-on-fill, var(--hst-on-primary)); }
.hst-bar .hst-back:hover { color: var(--hst-on-fill, var(--hst-on-primary)); filter: brightness(1.08); }
