@charset "UTF-8";
/* MediNEXT secure handover: brand layer for the SFTPGo WebClient (public binding only).
   Loaded through branding.web_client.extra_css AFTER SFTPGo's own stylesheet. It only re-points the theme's
   colour variables to the MediNEXT palette (medinext-web brand/tokens.css), squares controls to the brand
   radius and swaps the logo variant per surface. No layout changes, no template changes.
   Logo files sit next to this file: url() below resolves to /static/handover/<file>. */

:root,
[data-bs-theme="light"] {
  --bs-font-sans-serif: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ── light theme: brand light tokens ─────────────────────────────────────────────── */
[data-bs-theme="light"] {
  --bs-primary: #2757F1;
  --bs-primary-rgb: 39, 87, 241;
  --bs-primary-active: #3A58D6;
  --bs-primary-light: #EEF2FE;
  --bs-primary-inverse: #FFFFFF;
  --bs-primary-clarity: rgba(39, 87, 241, 0.2);
  --bs-text-primary: #3A58D6;
  --bs-link-color: #3A58D6;
  --bs-link-color-rgb: 58, 88, 214;
  --bs-link-hover-color: #22346E;
  --bs-link-hover-color-rgb: 34, 52, 110;
  --bs-body-color: #132338;
  --bs-gray-900: #132338;
  --bs-text-gray-900: #132338;
  --bs-border-color: #DDE2EC;
  --bs-root-card-border-color: #DDE2EC;
  --bs-menu-link-color-hover: #3A58D6;
  --bs-menu-link-color-show: #3A58D6;
  --bs-menu-link-color-here: #3A58D6;
  --bs-menu-link-color-active: #3A58D6;
  --bs-app-blank-bg-color: #F5F6FB;
  --bs-app-sidebar-base-bg-color: #0B1220;
  --bs-component-active-bg: #2757F1;
  --bs-component-checked-bg: #2757F1;
  --bs-component-hover-color: #3A58D6;
}

/* ── dark theme: brand dark tokens (navy, not the theme's neutral greys) ─────────── */
[data-bs-theme="dark"] {
  --bs-primary: #2757F1;
  --bs-primary-rgb: 39, 87, 241;
  --bs-primary-active: #3A58D6;
  --bs-primary-light: #162A52;
  --bs-primary-inverse: #F7F7FB;
  --bs-primary-clarity: rgba(39, 87, 241, 0.25);
  --bs-text-primary: #6E8AFF;
  --bs-link-color: #6E8AFF;
  --bs-link-color-rgb: 110, 138, 255;
  --bs-link-hover-color: #F7F7FB;
  --bs-link-hover-color-rgb: 247, 247, 251;
  --bs-body-color: #F7F7FB;
  --bs-body-bg: #0B1220;
  --bs-body-bg-rgb: 11, 18, 32;
  --bs-gray-100: #101B2D;
  --bs-gray-200: #182840;
  --bs-gray-300: #24344E;
  --bs-gray-500: #8A94A6;
  --bs-gray-700: #A9B1C0;
  --bs-gray-900: #F7F7FB;
  --bs-text-gray-100: #101B2D;
  --bs-text-gray-200: #182840;
  --bs-text-gray-300: #24344E;
  --bs-text-gray-500: #8A94A6;
  --bs-text-gray-700: #A9B1C0;
  --bs-text-gray-900: #F7F7FB;
  --bs-light: #101B2D;
  --bs-light-rgb: 16, 27, 45;
  --bs-border-color: #24344E;
  --bs-root-card-border-color: #24344E;
  --bs-menu-link-color-hover: #6E8AFF;
  --bs-menu-link-color-show: #6E8AFF;
  --bs-menu-link-color-here: #6E8AFF;
  --bs-menu-link-color-active: #6E8AFF;
  --bs-menu-link-bg-color-hover: #132338;
  --bs-menu-link-bg-color-show: #132338;
  --bs-menu-link-bg-color-here: #132338;
  --bs-menu-link-bg-color-active: #132338;
  --bs-app-bg-color: #0B1220;
  --bs-app-blank-bg-color: #0B1220;
  --bs-app-header-base-bg-color: #0B1220;
  --bs-app-sidebar-base-bg-color: #0B1220;
  --bs-app-sidebar-base-border-end: 1px solid #24344E;
  --bs-component-active-bg: #2757F1;
  --bs-component-checked-bg: #2757F1;
  --bs-component-hover-color: #6E8AFF;
  --bs-component-hover-bg: #132338;
}

/* ── sidebar (dark in both themes): navy tonal step + the brand's one accent mark on the current item ─── */
.app-sidebar-navs .menu .menu-item .menu-link.active,
.app-sidebar-navs .menu .menu-item .menu-link:hover {
  background-color: #132338;
}
.app-sidebar-navs .menu .menu-item .menu-link.active {
  box-shadow: inset 2px 0 0 #2757F1;
  border-radius: 0 4px 4px 0;
}

/* ── controls: brand radius (2px controls, 4px surfaces), Inter 600 on buttons ───── */
.btn { border-radius: 2px !important; font-weight: 600; }
.form-control, .form-select, .select2-container .select2-selection { border-radius: 2px !important; }
.app-blank .bg-body.rounded { border-radius: 4px !important; }
[data-bs-theme="dark"] .app-blank .bg-body { background-color: #132338 !important; }
a:focus-visible, .btn:focus-visible { outline: 2px solid #6E8AFF; outline-offset: 2px; }

/* ── logo ─────────────────────────────────────────────────────────────────────────────────────────────────
   The MediNEXT lockup as the website ships it (medinext-web public/brand, byte-identical): two 891 x 160 PNGs,
   lockup-on-light.png for light surfaces (logo_path) and lockup-on-dark.png for dark ones. Sized by height
   like the website (26px base, 32px phone bar, 40px desktop bar), width always height x 891/160, never
   stretched or cropped. Where the surface is dark (the sidebar in both themes; the sign-in card and the
   phone header in the dark theme) the same <img> shows lockup-on-dark.png as its background: the padding
   pushes the light-surface file out of the content box. One rule set covers every place the WebClient
   draws img[alt="Logo"]; --logo-h is the only per-surface value. */
img[alt="Logo"] {                                 /* default 40px: sidebar, logged-out message page */
  --logo-h: 40px;
  box-sizing: border-box;
  height: var(--logo-h) !important;
  width: calc(var(--logo-h) * 891 / 160);
  max-width: none;
}
.app-blank .col-5 img[alt="Logo"] { --logo-h: 26px; }  /* sign-in, passcode cards: the website's base lockup */
#kt_app_header img[alt="Logo"] { --logo-h: 32px; margin-left: 8px; }  /* phone header: the website's 64px-bar
                                                                          lockup, clear of the menu button */
[data-bs-theme="dark"] img[alt="Logo"],
.app-sidebar-logo img[alt="Logo"] {
  padding-left: calc(var(--logo-h) * 891 / 160);
  background: url("lockup-on-dark.png") no-repeat left center / contain;
}
/* the card's logo column takes the lockup's width and the name the rest; on a phone they stack, the name
   under the logo, so the two never collide */
.app-blank .row > .col-5:has(img[alt="Logo"]) { flex: 0 0 auto; width: auto; }
.app-blank .row > .col-5:has(img[alt="Logo"]) + .col-7 { flex: 1 1 0; min-width: 0; }
@media (max-width: 575.98px) {
  .app-blank .row > .col-5:has(img[alt="Logo"]) + .col-7 { flex: 0 0 100%; margin-top: 12px; }
  .app-blank .row > .col-5:has(img[alt="Logo"]) + .col-7 h1 { margin-left: 0 !important; margin-bottom: 0 !important; }
}

/* the short name under the sidebar logo as the brand's eyebrow (caption, uppercase, accent-soft) */
.app-sidebar-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.app-sidebar-logo .text-sidebar {
  padding-left: 0 !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6E8AFF;
}

/* ── two-factor page (webclient/mfa.html, SFTPGo 2.7.6): one line of guidance under the two fields a
   participant must fill. Keyed on the field ids #id_config / #id_protocols; tests/portal_proof.py asserts
   both ids exist, so an SFTPGo upgrade that renames them fails the proof instead of silently losing this.
   Text in Czech, Slovak and English because the portal's own interface is English only. */
#id_config ~ .select2-container::after,
#id_protocols ~ .select2-container::after {
  display: block;
  margin-top: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--bs-text-primary);
  white-space: pre-line;
}
#id_config ~ .select2-container::after {
  content: "Vyberte MediNEXT · Choose MediNEXT";
}
#id_protocols ~ .select2-container::after {
  content: "CS: jen HTTP, pak klikněte mimo seznam · SK: len HTTP, potom kliknite mimo zoznamu\A EN: HTTP only, then click outside the list";
}

/* ── "Forbidden" page at first sign-in (common/message.html): the next step under SFTPGo's own message ─────
   SFTPGo renders the refusal as <span data-i18n="<key>">; the key tells the two states apart:
     login.two_factor_required[_generic]  2FA not set up yet   -> click 2FA in the left menu
     change_pwd.required                  password not changed -> person icon (top right) > Change password
   tests/portal_proof.py asserts these keys and the menu hooks below exist in this SFTPGo version, so an
   upgrade that renames one fails the proof instead of silently losing the note. */
.card-body span[data-i18n^="login.two_factor_required"]::after,
.card-body span[data-i18n="change_pwd.required"]::after {
  display: block;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--bs-border-color);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: inherit;                          /* SFTPGo's message colour: the note never outshouts the message */
  white-space: pre-line;
}
.card-body span[data-i18n^="login.two_factor_required"]::after {
  content: "CS: Při prvním přihlášení je to v pořádku. Klikněte v levém menu na\0000A02FA.\A SK: Pri prvom prihlásení je to v poriadku. Kliknite v ľavom menu na\0000A02FA.\A EN: This is expected at first sign-in. Click\0000A02FA in the menu on the left.";
}
.card-body span[data-i18n="change_pwd.required"]::after {
  content: "CS: Zbývá nastavit nové heslo: vpravo nahoře ikona osoby ›\0000A0Change\0000A0password.\A SK: Zostáva nastaviť nové heslo: vpravo hore ikona osoby ›\0000A0Change\0000A0password.\A EN: One step left, a new password: person icon at the top right ›\0000A0Change\0000A0password.";
}
@media (max-width: 991.98px) {             /* below lg the left menu is a drawer behind the icon at the top left */
  .card-body span[data-i18n^="login.two_factor_required"]::after {
    content: "CS: Při prvním přihlášení je to v pořádku. Otevřete menu ikonou vlevo nahoře a klikněte na\0000A02FA.\A SK: Pri prvom prihlásení je to v poriadku. Otvorte menu ikonou vľavo hore a kliknite na\0000A02FA.\A EN: This is expected at first sign-in. Open the menu with the icon at the top left and click\0000A02FA.";
  }
}

/* the one accent mark moves from the current page (Files) to the item to click */
body:has(.card-body span[data-i18n^="login.two_factor_required"]) .app-sidebar-navs .menu-link.active,
body:has(.card-body span[data-i18n="change_pwd.required"]) .app-sidebar-navs .menu-link.active {
  box-shadow: none;
  background-color: transparent;
}
body:has(.card-body span[data-i18n^="login.two_factor_required"]) .app-sidebar-navs .menu-link:has(> span[data-i18n="title.two_factor_auth_short"]) {
  background-color: #132338;
  box-shadow: inset 2px 0 0 #2757F1;
  border-radius: 0 4px 4px 0;
}
body:has(.card-body span[data-i18n^="login.two_factor_required"]) #kt_app_sidebar_mobile_toggle,
body:has(.card-body span[data-i18n="change_pwd.required"]) #kt_app_header_navbar [data-kt-menu-trigger]:has(> i.ki-user) {
  box-shadow: inset 0 -2px 0 #2757F1;
  border-radius: 2px;
}
body:has(.card-body span[data-i18n="change_pwd.required"]) a.menu-link:has(> span[data-i18n="title.change_password"]) {
  box-shadow: inset 2px 0 0 #2757F1;
}

/* ── sign-in page: the help link (branding disclaimer) as a full-width quiet secondary action under Sign in ── */
#sign_in_form + hr { display: none; }
#sign_in_form ~ .flex-stack:has(a[href$="/handover/help.html"]) {
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  padding-top: 0 !important;
  margin-top: 0 !important;
}
#sign_in_form ~ .flex-stack:has(a[href$="/handover/help.html"]) > div { display: block !important; margin: 0 !important; }
#sign_in_form ~ .flex-stack:has(a[href$="/handover/help.html"]) > div:has(a[href$="/handover/help.html"]) { order: -1; }
/* one interface language (httpd languages = ["en"]): SFTPGo hides the switcher itself; drop its empty row too */
#sign_in_form ~ .flex-stack:has(a[href$="/handover/help.html"]) > div:has(> #languageSwitcher.d-none) { display: none !important; }
#sign_in_form ~ .flex-stack a[href$="/handover/help.html"] {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px !important;
  border: 1px solid var(--bs-border-color);
  border-radius: 2px;
  color: var(--bs-text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}
#sign_in_form ~ .flex-stack a[href$="/handover/help.html"]:hover { border-color: var(--bs-primary); }
