/* Shared OpenList floating surfaces, including portals mounted outside #root. */
body {
  --q-pop-paper: #fffefd;
  --q-pop-ink: #202b44;
  --q-pop-muted: #52617a;
  --q-pop-edge: #cfd8e6;
  --q-pop-field: #f5f7fb;
  --q-pop-hover: #eaf0fc;
  --q-pop-focus: #4b61a0;
  --q-pop-shadow: 0 18px 60px #121c3940, 0 3px 12px #18243c1c;
}
body.hope-ui-dark {
  --q-pop-paper: #202b40;
  --q-pop-ink: #f2f4fb;
  --q-pop-muted: #bdc8df;
  --q-pop-edge: #495974;
  --q-pop-field: #182338;
  --q-pop-hover: #344462;
  --q-pop-focus: #b5c9ff;
  --q-pop-shadow: 0 18px 60px #070c1c80;
}
body :is(.hope-modal__overlay,.hope-drawer__overlay) {
  background: rgb(16 26 47 / 52%); backdrop-filter: blur(3px);
}
body :is(.hope-modal__content,.hope-drawer__content:not(:has(a[href="/@manage/users"]))) {
  background: var(--q-pop-paper); color: var(--q-pop-ink);
  border: 1px solid var(--q-pop-edge); box-shadow: var(--q-pop-shadow);
}
body .hope-modal__content {
  display: flex; flex-direction: column; border-radius: 17px;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow: hidden;
}
body :is(.hope-modal__content,.hope-drawer__content:not(:has(a[href="/@manage/users"]))) > .hope-modal__header {
  flex: none; padding: 16px 54px 16px 22px; min-height: 54px;
  color: #fff5e9; background: linear-gradient(105deg,#1c2946,#334562 74%,#4a5067);
  border-bottom: 2px solid #d9a77e; font-weight: 680; line-height: 1.45;
}
body :is(.hope-modal__content,.hope-drawer__content) > .hope-modal__body {
  min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain;
  scrollbar-color: var(--q-pop-edge) transparent;
}
body .hope-modal__content > .hope-modal__body { padding: 18px 22px; }
body .hope-modal__content > .hope-modal__footer {
  flex: none; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--q-pop-edge);
  background: var(--q-pop-field);
}
body .hope-modal__content > .hope-modal__footer > * { margin-inline-start: 0; }
body :is(.hope-modal__content,.hope-drawer__content) > .hope-modal__close-button {
  z-index: 1; inset-block-start: 11px; inset-inline-end: 12px; border-radius: 9px;
  color: #fff7eb; background: #ffffff12; border: 1px solid #ffffff36;
}
body :is(.hope-modal__content,.hope-drawer__content) > .hope-modal__close-button:hover { background: #ffffff2b; }
body :is(.hope-modal__content,.hope-drawer__content,.hope-popover__content) :is(.hope-input,.hope-textarea,.hope-select__trigger) {
  color: var(--q-pop-ink); background: var(--q-pop-field); border: 1px solid var(--q-pop-edge); border-radius: 8px;
}
body :is(.hope-modal__content,.hope-drawer__content,.hope-popover__content) :is(.hope-form-label,.hope-form-helper-text) { color: var(--q-pop-muted); }
body :is(.hope-modal__content,.hope-drawer__content,.hope-popover__content) :is(input,textarea)::placeholder { color: var(--q-pop-muted); opacity: 1; }
body :is(.hope-modal__content,.hope-drawer__content,.hope-popover__content) .hope-button { border-radius: 8px; }
body :is(.hope-modal__content,.hope-drawer__content,.hope-popover__content,.hope-menu__content,[role="listbox"],.solid-contextmenu) :focus-visible {
  outline: 2px solid var(--q-pop-focus); outline-offset: -2px;
}
body :is(.hope-select__content,.hope-menu__content,.hope-popover__content,.solid-contextmenu) {
  color: var(--q-pop-ink); background: var(--q-pop-paper); border: 1px solid var(--q-pop-edge);
  border-radius: 12px; box-shadow: var(--q-pop-shadow); max-width: calc(100vw - 12px);
}
body :is(.hope-select__listbox,.hope-menu__content) { max-height: min(60vh,420px); max-height: min(60dvh,420px); overflow-y: auto; }
body :is(.hope-menu__item,[role="option"],.solid-contextmenu__item) { border-radius: 6px; }
body :is(.hope-menu__item,[role="option"],.solid-contextmenu__item):is(:hover,[data-active],[data-highlighted],:focus-visible) {
  color: var(--q-pop-ink); background: var(--q-pop-hover);
}
body :is(.hope-menu__separator,.solid-contextmenu__separator) { border-color: var(--q-pop-edge); }
body .hope-popover__arrow { color: var(--q-pop-paper); }
body [role="tooltip"] {
  color: #fff5e9; background: #23334f; border: 1px solid #63738c; border-radius: 7px; box-shadow: 0 3px 12px #15233e30;
}
body .hope-notification {
  border-radius: 12px; box-shadow: var(--q-pop-shadow); max-width: calc(100vw - 20px);
}
body :is(.hope-modal__content,.hope-drawer__content,#root header + .hope-flex) .hope-button {
  --hope-colors-info3: #e7ecfa; --hope-colors-info4: #dce5f8; --hope-colors-info5: #cad7f2;
  --hope-colors-info9: #425990; --hope-colors-info10: #374c80; --hope-colors-info11: #344a80;
}
body.hope-ui-dark :is(.hope-modal__content,.hope-drawer__content,#root header + .hope-flex) .hope-button {
  --hope-colors-info3: #2a3955; --hope-colors-info4: #354766; --hope-colors-info5: #405577;
  --hope-colors-info9: #465d92; --hope-colors-info10: #576fa5; --hope-colors-info11: #ceddff;
}
@media (max-height: 440px) {
  body .solid-contextmenu { max-height: calc(100dvh - 12px); overflow-y: auto; }
}
@media (max-width: 600px), (max-height: 440px) {
  body .hope-modal__content {
    width: min(100%,calc(100vw - 16px)); max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
    margin-block: 8px; border-radius: 13px;
  }
  body .hope-modal__content > .hope-modal__body { padding: 14px; }
  body .hope-modal__content > .hope-modal__footer { padding: 9px 12px max(9px,env(safe-area-inset-bottom)); }
  body .hope-modal__content .hope-modal__footer .hope-button { min-height: 40px; }
  body :is(.hope-modal__content,.hope-drawer__content:not(:has(a[href="/@manage/users"]))) > .hope-modal__header { padding-inline-start: 15px; }
}
