/* =====================================================================================================
   RaBit Hub, varianta E: the Management look (management.css, loaded first) plus what only the Hub has.
   Colours are the Management values. The Hub CSP allows no inline style, so every colour is a class here.
   ===================================================================================================== */

@font-face { font-family: 'Roboto'; src: url('fonts/roboto-400.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('fonts/roboto-500.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('fonts/roboto-700.woff') format('woff'); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kanit'; src: url('fonts/kanit-500-italic.woff') format('woff'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Kanit'; src: url('fonts/kanit-600-italic.woff') format('woff'); font-weight: 600 700; font-style: italic; font-display: swap; }

:root {
    --hm-ink: #141429;
    --hm-text: #3b3852;
    --hm-muted: #5c5873;
    --hm-line: #e2e0ea;
    --hm-ground: #f3f3f4;
    --hm-navy: #131228;
    --hm-purple: #473b63;
    --hm-orange: #ff5416;
    --hm-orange-text: #c2410c;
    --hm-green: #047857;
    --hm-blue: #1d4ed8;
    --hm-amber: #b45309;
    --hm-red: #be123c;
    --hm-grey: #64748b;
}

html { color-scheme: light; }
body#hub { margin: 0; background: var(--hm-ground); color: var(--hm-ink); font-family: Roboto, 'Segoe UI', system-ui, sans-serif; }
#hub a { text-decoration: none; }
#hub :focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
#hub .sr, #hub .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#hub .skip { position: absolute; left: 12px; top: -60px; z-index: 2000; padding: 10px 14px; border-radius: 10px; background: #fff; color: var(--hm-ink); font-weight: 600; }
#hub .skip:focus { top: 12px; }
#hub #wrapper { min-height: 100vh; }
#hub #continut:focus { outline: 0; }
#hub .hm-sub { color: var(--hm-muted); font-size: 13px; }
#hub code { color: var(--hm-purple); font-size: 12.5px; overflow-wrap: anywhere; }

/* ---- menu: the Management accordion, or the Compact rail (html.rail) ---- */
html.rail #hub #accordionSidebar, html:not(.rail) #hub #sidebarRail { display: none !important; }
#hub .sidebar-nav-search { display: flex; gap: 8px; align-items: center; }
#hub .sidebar-nav-search__field { flex: 1; min-width: 0; }
#hub .sidebar .nav-link .fa { width: 18px; margin-right: 10px; font-size: 16px; text-align: center; }
#hub .sidebar .nav-item[hidden], #hub .sidebar .collapse-item[hidden] { display: none !important; }
#hub .hm-menu-empty { padding: 14px 18px; color: rgba(255, 255, 255, .7); font-size: 13px; }
#hub .hm-sidebar-foot { margin-top: auto; padding: 14px 16px 18px; border-top: 1px solid rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .66); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
#hub .hm-sidebar-foot b { display: block; color: #fff; font-size: 13px; font-weight: 600; }
#hub .srail-logo { display: grid; place-items: center; height: 64px; }
#hub .srail-logo img { width: 58px; max-width: 58px; height: auto; }
#hub .srail-item { position: relative; }
#hub .srail-item .fa { font-size: 20px; }
#hub .srail-item .menu-badge { position: absolute; top: 4px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--hm-orange-text); color: #fff; font-size: 10.5px; line-height: 18px; text-align: center; }

/* ---- top bar ---- */
#hub .topbar .gs { flex: 1; max-width: 520px; margin: 0; }
#hub .hm-topbtn { display: inline-grid; place-items: center; position: relative; width: 40px; height: 40px; border-radius: 12px; color: #3a3b45; font-size: 20px; }
#hub .hm-topbtn:hover { background: #f3f3f6; }
#hub .hm-topbtn .badge-count { position: absolute; top: 1px; right: -1px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--hm-orange-text); color: #fff; font: 700 11px Roboto, sans-serif; }
#hub .hm-me { position: relative; margin-left: 12px; }
#hub .hm-me > summary { display: flex; gap: 10px; align-items: center; padding: 4px 6px 4px 4px; border-radius: 14px; color: var(--hm-ink); cursor: pointer; list-style: none; }
#hub .hm-me > summary::-webkit-details-marker { display: none; }
#hub .hm-me > summary:hover { background: #f3f3f6; }
#hub .hm-me__who b { display: block; font-size: 13px; line-height: 1.2; }
#hub .hm-me__who span { display: block; color: var(--hm-muted); font-size: 12px; }
#hub .hm-avatar { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--hm-purple); color: #fff; font: 600 13px Roboto, sans-serif; }
#hub .hm-avatar--soft { background: #ece9f5; color: var(--hm-purple); }
#hub .hm-flyout { position: absolute; right: 0; top: calc(100% + 8px); z-index: 1050; width: 290px; border: 1px solid var(--hm-line); border-radius: 16px; background: #fff; box-shadow: 0 18px 40px rgba(20, 20, 41, .18); overflow: hidden; }
#hub .hm-flyout__head { padding: 16px; background: var(--hm-purple); color: #fff; }
#hub .hm-flyout__head b { display: block; font-size: 15px; }
#hub .hm-flyout__head span { color: #e4dff2; font-size: 12.5px; overflow-wrap: anywhere; }
#hub .hm-flyout a, #hub .hm-flyout button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid #eeedf3; background: #fff; color: var(--hm-ink); font: 14px Roboto, sans-serif; text-align: left; cursor: pointer; }
#hub .hm-flyout a:hover, #hub .hm-flyout button:hover { background: #f6f5f9; }
#hub .hm-flyout form { margin: 0; }

/* ---- tags: mode, connection, login state ---- */
#hub .hm-tag { --c: var(--hm-grey); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: #f1f1f5; color: #334155; font: 600 12.5px/1.35 Roboto, sans-serif; white-space: nowrap; vertical-align: middle; }
#hub .hm-tag::before { content: ''; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--c); }
#hub .hm-tag--enforce { background: var(--hm-purple); color: #fff; }
#hub .hm-tag--enforce::before { background: var(--hm-orange); }
#hub .hm-tag--observe, #hub .hm-tag--new { --c: #2563eb; background: #eef3ff; color: #1e3a8a; }
#hub .hm-tag--off, #hub .hm-tag--inactive { --c: #8a86a0; background: #f1f1f5; color: #475569; }
#hub .hm-tag--ok, #hub .hm-tag--active { --c: #059669; background: #e9f8f1; color: #065f46; }
#hub .hm-tag--silent, #hub .hm-tag--noeffect { --c: #d97706; background: #fff5e6; color: #92400e; }
#hub .hm-tag--nokey, #hub .hm-tag--blocked { --c: #e11d48; background: #fff0f3; color: #9f1239; }
#hub .dh26-hero .hm-tag { background: rgba(255, 255, 255, .12); color: #fff; }
#hub .dh26-hero .hm-tag--enforce { background: var(--hm-orange-text); }
#hub .dh26-hero .hm-tag--enforce::before { background: #fff; }

/* status pill dots (Management writes them inline) */
#hub .al-status-pill-dot.d-red { background: #e11d48; }
#hub .al-status-pill-dot.d-green { background: #059669; }
#hub .al-status-pill-dot.d-blue { background: #2563eb; }
#hub .al-status-pill-dot.d-amber { background: #d97706; }
#hub .al-status-pill-dot.d-orange { background: var(--hm-orange); }
#hub .al-status-pill-dot.d-grey { background: #94a3b8; }

/* ---- page header buttons ---- */
#hub .al-btn-add .fa { margin-right: 6px; }
#hub .al-toolbar-left { flex-wrap: wrap; gap: 10px; }
#hub .al-toolbar .hm-select { height: 44px; min-width: 210px; padding: 0 14px; border: 1px solid #e2e0ea; border-radius: 12px; background: #f7f6fa; color: var(--hm-ink); font: 14px Roboto, sans-serif; }
#hub .al-toolbar .hm-go { height: 44px; padding: 0 16px; border: 1px solid #e2e0ea; border-radius: 12px; background: #fff; color: var(--hm-ink); font: 600 14px Roboto, sans-serif; cursor: pointer; }
html.js #hub .hm-go { display: none; }
#hub .hm-count-line { margin: 0 0 10px 6px; color: var(--hm-muted); font-size: 13px; }

/* ---- lists ---- */
#hub .hm-table { width: 100%; margin: 0; }
#hub .hm-table td { vertical-align: middle; }
#hub .hm-table tbody tr[data-href] { cursor: pointer; }
#hub .hm-table .hm-strong { display: block; color: var(--hm-ink); font-weight: 600; }
#hub .hm-table a.hm-strong:hover { color: var(--hm-orange-text); }
#hub .hm-table .hm-num { font-variant-numeric: tabular-nums; }
#hub .hm-table .hm-when { color: var(--hm-muted); font-size: 13.5px; white-space: nowrap; }
#hub .hm-table .hm-acts { width: 1%; white-space: nowrap; text-align: right; }
#hub .hm-table .hm-acts form { display: inline; margin: 0; }
#hub .hm-table .hm-acts > * + * { margin-left: 6px; }
#hub .hm-table tr[hidden] { display: none; }
#hub .hm-person { display: flex; gap: 12px; align-items: center; min-width: 0; }
#hub .hm-person > span:last-child { min-width: 0; }
#hub .hm-person .hm-sub { display: block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hub .hm-code { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #f1eff7; color: var(--hm-purple); font: 600 12.5px Roboto, sans-serif; }
#hub .hm-warn-n { color: var(--hm-red); font-weight: 600; }
#hub .hm-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid #eeedf3; color: var(--hm-muted); font-size: 13px; }
#hub .hm-pager { display: flex; gap: 6px; flex-wrap: wrap; }
#hub .hm-pager a, #hub .hm-pager span { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--hm-line); border-radius: 10px; color: var(--hm-ink); font-weight: 600; font-size: 13px; }
#hub .hm-pager a:hover { border-color: #cfcbe0; background: #faf9fd; }
#hub .hm-pager span[aria-current] { border-color: var(--hm-purple); background: var(--hm-purple); color: #fff; }
#hub .hm-empty { padding: 48px 20px; color: var(--hm-muted); text-align: center; }
#hub .hm-empty b { display: block; margin-bottom: 4px; color: var(--hm-ink); font-size: 15px; }
#hub .hm-empty[hidden] { display: none; }
#hub .hm-act b { color: var(--hm-ink); font-weight: 600; }
#hub .hm-scroll { overflow-x: auto; }

/* Management row buttons, outside a contract card */
#hub .contract-card__action-btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; width: auto !important; min-width: 0 !important; height: 34px !important; padding: 0 12px !important; white-space: nowrap; font-size: 13px !important; font-weight: 600 !important; cursor: pointer; }

/* ---- detail page (dh26) ---- */
#hub .hm-detail-page { padding: 24px 28px 40px; }
#hub .dh26 { margin-bottom: 20px; }
#hub .dh26-icon .fa { font-size: 24px; }
#hub .dh26-actions form { display: inline-flex; margin: 0; }
#hub .dh26-btn .fa, #hub .dh26-tab .fa { font-size: 14px; }
#hub .dh26-tab .hm-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 6px; border-radius: 10px; background: #f1eff7; color: var(--hm-purple); font-size: 11.5px; font-weight: 700; }
#hub .dh26-tab.active .hm-count { background: var(--hm-orange-text); color: #fff; }
#hub .dh26-btn--danger { border-color: #fecdd3 !important; background: #fff1f2 !important; color: var(--hm-red) !important; }
#hub .dh26-btn--danger:hover { background: #ffe4e6 !important; }
#hub .dh26-fact dd { overflow-wrap: anywhere; }
#hub .hm-verdict { display: flex; gap: 12px; align-items: flex-start; margin: 16px 20px 0; padding: 12px 16px; border-radius: 12px; background: #ecfdf5; color: #065f46; font-size: 14px; line-height: 1.45; }
#hub .hm-verdict .fa { margin-top: 3px; font-size: 16px; }
#hub .hm-verdict b { display: block; font-size: 15px; }
#hub .hm-verdict--blocked { background: #fff1f2; color: #9f1239; }
#hub .hm-verdict--noeffect { background: #fffbeb; color: #92400e; }
#hub .hm-verdict--inactive { background: #f4f4f7; color: #3b3852; }
#hub .hm-tabbody { display: grid; gap: 20px; }

/* ---- cards and forms (Save Task chrome) ---- */
#hub .vpe-card { border: 1px solid var(--hm-line); }
#hub .vpe-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#hub .vpe-card-header h2 .fa { color: var(--hm-orange); }
#hub .vpe-card-header .hm-more { color: var(--hm-orange-text); font-size: 13px; font-weight: 600; white-space: nowrap; }
#hub .hm-cardgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
#hub .hm-cardgrid > .vpe-card, #hub .hm-stack > .vpe-card { margin: 0; }
#hub .hm-stack { display: grid; gap: 20px; align-content: start; }
#hub .hm-narrow { max-width: 720px; }
#hub .vpe-card-body > p, #hub .hm-lead { margin: 0 0 14px; color: var(--hm-muted); font-size: 14px; line-height: 1.5; }
#hub .vpe-card-body > p:last-child { margin-bottom: 0; }
#hub .hm-help { display: block; margin-top: 6px; color: var(--hm-muted); font-size: 12.5px; font-weight: 400; }
#hub .add-project label small { color: var(--hm-muted); font-weight: 400; }
#hub .hm-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
#hub .hm-modes legend { margin-bottom: 8px; color: var(--hm-ink); font-size: 13px; font-weight: 600; }
#hub .hm-mode-opt { position: relative; display: block; margin: 0; padding: 12px 14px; border: 1px solid var(--hm-line); border-radius: 12px; background: #fff; cursor: pointer; }
#hub .hm-mode-opt input { position: absolute; opacity: 0; }
#hub .hm-mode-opt b { display: block; color: var(--hm-ink); font-size: 14px; }
#hub .hm-mode-opt span { display: block; margin-top: 2px; color: var(--hm-muted); font-size: 12.5px; line-height: 1.35; font-weight: 400; }
#hub .hm-mode-opt:has(input:checked) { border-color: var(--hm-purple); background: #f7f5fc; box-shadow: inset 0 0 0 1px var(--hm-purple); }
#hub .hm-mode-opt:has(input:focus-visible) { outline: 2px solid #2563eb; outline-offset: 2px; }
#hub .hm-switch { display: flex; gap: 10px; align-items: center; margin: 0; color: var(--hm-ink); font-weight: 500; cursor: pointer; }
#hub .hm-switch input { width: 18px; height: 18px; accent-color: var(--hm-purple); }
#hub .hm-note { display: flex; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #fff7ed; color: #9a3412; font-size: 13.5px; line-height: 1.45; }
#hub .hm-note .fa { margin-top: 2px; }
#hub .hm-note a { color: #9a3412; font-weight: 600; text-decoration: underline; }
/* "they will not be able to log in": only while Aplică is chosen (and the Instance is left active) */
#hub .hm-note.enf { display: none; }
#hub form:has(input[value="Enforce"]:checked):not(:has(input[name="isActive"]:not(:checked))) .hm-note.enf { display: flex; }
#hub .hm-formfoot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #eeedf3; }
#hub .hm-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; margin: 0; font-size: 14px; }
#hub .hm-facts dt { color: var(--hm-muted); font-weight: 500; }
#hub .hm-facts dd { margin: 0; color: var(--hm-ink); overflow-wrap: anywhere; }
#hub .hm-facts dd a { color: var(--hm-purple); font-weight: 600; }
#hub .hm-lines { margin: 12px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--hm-navy); color: #e8e6f3; font: 13px/1.7 Consolas, 'Cascadia Mono', monospace; white-space: pre-wrap; word-break: break-all; }
#hub .hm-keybar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
#hub .hm-keybar form { margin: 0; }
#hub .hm-secret { margin: 0 4px 20px; padding: 16px 18px; border: 1px solid #fed7aa; border-radius: 16px; background: #fff7ed; color: #7c2d12; font-size: 14px; }
#hub .hm-secret p { margin: 0 0 10px; }
#hub .hm-secret .hm-copyline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
#hub .hm-secret code { padding: 6px 10px; border-radius: 8px; background: #fff; color: var(--hm-ink); font: 14px Consolas, monospace; }
#hub .hm-qr { display: grid; place-items: center; width: 168px; height: 168px; padding: 10px; border: 1px solid var(--hm-line); border-radius: 14px; background: #fff; }
#hub .hm-qr img, #hub .hm-qr canvas { width: 146px; height: 146px; }
#hub .hm-copyline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 0; }
#hub .hm-blockbox { padding: 14px 16px; border-radius: 12px; background: #fff1f2; color: #9f1239; }
#hub .hm-blockbox b { display: block; color: #881337; font-size: 15px; }
#hub .hm-blockbox p { margin: 6px 0 0; font-size: 13.5px; overflow-wrap: anywhere; }
#hub .kb-modal-btn .fa { margin-right: 6px; }
#hub button.kb-modal-btn, #hub a.kb-modal-btn { display: inline-flex; align-items: center; justify-content: center; }

/* ---- messages ---- */
#hub .hm-flash { display: flex; gap: 10px; align-items: center; margin: 0 4px 18px; padding: 12px 16px; border: 1px solid #a7f3d0; border-radius: 14px; background: #ecfdf5; color: #065f46; font-size: 14px; }
#hub .hm-flash--warn { border-color: #fde68a; background: #fffbeb; color: #92400e; }
#hub .hm-flash--bad { border-color: #fecdd3; background: #fff1f2; color: #9f1239; }
#hub .hm-detail-page .hm-flash { margin: 0 0 18px; }

/* ---- Panou ---- */
#hub .hm-dash { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; margin: 0 4px; }
#hub .hm-dash > .vpe-card { margin: 0; }
#hub .hm-dash .hm-wide { grid-column: 1 / -1; }
#hub .hm-todo { margin: 0; padding: 0; list-style: none; }
#hub .hm-todo li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid #eeedf3; }
#hub .hm-todo li:first-child { border-top: 0; padding-top: 0; }
#hub .hm-todo .hm-todo__text { flex: 1; min-width: 0; }
#hub .hm-todo .hm-todo__text b { display: block; color: var(--hm-ink); font-size: 14px; overflow-wrap: anywhere; }
#hub .hm-todo .hm-todo__text span { color: var(--hm-muted); font-size: 13px; }
#hub .hm-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
#hub .hm-cell { --c: #059669; display: flex; flex-direction: column; gap: 2px; padding: 9px 10px 9px 12px; border: 1px solid var(--hm-line); border-left: 4px solid var(--c); border-radius: 10px; background: #fff; color: var(--hm-ink); font-size: 13px; line-height: 1.25; }
#hub .hm-cell:hover { border-color: #cfcbe0; border-left-color: var(--c); background: #faf9fd; }
#hub .hm-cell b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
#hub .hm-cell span { color: var(--hm-muted); font-size: 12px; }
#hub .hm-cell--silent { --c: #d97706; }
#hub .hm-cell--new { --c: #2563eb; }
#hub .hm-cell--nokey { --c: #e11d48; }
#hub .hm-cell--off { --c: #cbd5e1; }
#hub .hm-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 14px; padding: 0; color: var(--hm-muted); font-size: 13px; list-style: none; }
#hub .hm-legend li { display: inline-flex; gap: 6px; align-items: center; }
#hub .hm-legend li::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
#hub .hm-legend .l-ok { --c: #059669; }
#hub .hm-legend .l-silent { --c: #d97706; }
#hub .hm-legend .l-new { --c: #2563eb; }
#hub .hm-legend .l-nokey { --c: #e11d48; }
#hub .hm-legend .l-off { --c: #cbd5e1; }

/* ---- modal (built by hub.js on the Bootstrap .modal markup, without Bootstrap's script) ---- */
#hub .modal.hm-open { display: block; overflow-y: auto; }
#hub .kb-modal-body { padding: 22px 24px; }
#hub .kb-modal-body p { margin: 0 0 12px; color: var(--hm-text); font-size: 14px; line-height: 1.5; }
#hub .kb-modal-body textarea.form-control { min-height: 96px; }
#hub .kb-modal-header-icon .fa { font-size: 18px; }
#hub .kb-modal-footer { display: flex; justify-content: flex-end; gap: 10px; }
body.hm-modal-open { overflow: hidden; }

/* ---- signed out: one card on the navy ground ---- */
#hub.anon { display: grid; min-height: 100vh; place-items: center; padding: 32px 16px; background: var(--hm-navy) radial-gradient(rgba(176, 217, 230, .18) 1.4px, transparent 1.5px) 0 0 / 18px 18px; }
#hub .hm-anon { width: 100%; max-width: 440px; }
#hub .hm-anon__logo { display: block; width: 120px; height: auto; margin: 0 auto 22px; }
#hub .hm-anon .kb-modal-content { position: relative; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .45); }
#hub .hm-anon .kb-modal-content::after { content: ''; position: absolute; top: 0; right: 48px; width: 96px; height: 7px; background: var(--hm-orange); clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%); }
#hub .hm-anon h1 { margin: 0 0 6px; color: var(--hm-ink); font: 600 italic 30px/1.15 Kanit, Montserrat, sans-serif; }
#hub .hm-anon .kb-modal-body { padding: 28px 28px 26px; }
#hub .hm-anon .kb-form-group { margin-top: 14px; }
#hub .hm-anon .kb-form-group label { display: block; margin-bottom: 6px; color: var(--hm-ink); font-size: 13px; font-weight: 600; }
#hub .hm-anon .kb-form-group label small { color: var(--hm-muted); font-weight: 400; }
#hub .hm-anon .kb-form-input { width: 100%; height: 46px; }
#hub .hm-anon .kb-form-input.hm-code-in { font: 600 22px/1 Consolas, monospace; letter-spacing: .3em; text-align: center; }
#hub .hm-anon .kb-modal-btn--primary { width: 100%; margin-top: 20px; }
#hub .hm-anon .hm-after { margin: 16px 0 0; font-size: 14px; text-align: center; }
#hub .hm-anon .hm-after a { color: var(--hm-orange-text); font-weight: 600; }
#hub .hm-anon .hm-qr { margin: 6px auto 12px; }
#hub .hm-anon .hm-flash { margin: 0 0 14px; }

/* ---- page frame ---- */
#hub .activities-list-ai-page { min-height: calc(100vh - 70px); padding-bottom: 32px; }
#hub .b4-body-footer-stack { min-width: 0; }

/* ---- narrow ---- */
@media (max-width: 1199px) {
    #hub .hm-dash, #hub .hm-cardgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
    #hub #accordionSidebar, #hub #sidebarRail { display: none !important; }
    #hub.hm-menu-open #accordionSidebar { display: flex !important; position: fixed; inset: 0 auto 0 0; z-index: 1060; width: 270px !important; overflow-y: auto; }
    #hub .topbar .gs { display: none; }
    #hub .hm-me__who { display: none; }
    #hub .al-page-header { margin: 12px 0 16px; padding: 18px; border-radius: 16px; background: var(--hm-purple); color: #fff; }
    #hub .al-page-header .al-header-content { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
    #hub .al-page-header .al-header-left { display: flex; gap: 12px; align-items: center; }
    #hub .al-page-header .al-header-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--hm-orange); color: #fff; font-size: 20px; }
    #hub .al-page-header .al-page-title { margin: 0; color: #fff; font: 600 italic 24px Kanit, Montserrat, sans-serif; }
    #hub .al-page-header .al-breadcrumb, #hub .al-page-header .al-breadcrumb a { color: #b0d9e6; font-size: 12px; }
    #hub .al-status-section { overflow-x: auto; }
    #hub .al-status-pills { flex-wrap: nowrap !important; }
    #hub .al-toolbar .hm-select { min-width: 0; width: 100%; }
    #hub .hm-table thead { display: none; }
    #hub .hm-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 14px; border-top: 1px solid #eeedf3; }
    #hub .hm-table td { display: block; padding: 0 !important; border: 0 !important; }
    #hub .hm-table td:first-child { grid-column: 1 / -1; }
    #hub .hm-table td.hm-optional { display: none; }
    #hub .hm-table .hm-acts { grid-column: 1 / -1; text-align: left; }
    #hub .hm-person .hm-sub { max-width: none; white-space: normal; }
    #hub .hm-detail-page { padding: 12px 12px 28px; }
    #hub .hm-modes { grid-template-columns: minmax(0, 1fr); }
    #hub .hm-dash { margin: 0; }
    #hub .hm-todo li { flex-wrap: wrap; }
    #hub .hm-todo .hm-todo__text { flex: 1 1 100%; }
    #hub .hm-todo li .hm-tag { margin-right: auto; }
    #hub .container-fluid { padding-left: 12px; padding-right: 12px; }
    #hub .hm-verdict { margin: 12px 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
    #hub *, #hub *::before, #hub *::after { transition: none !important; animation: none !important; }
}
#hub .hm-pager .hm-gap { min-width: 0; padding: 0 2px; border: 0; }

/* ---- Utilizare (Task 15): Module, Servere, Account-uri, Roluri; the Instance and Account tabs ---- */
#hub .hm-ubar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 0 4px 16px; }
#hub .hm-ubar form { display: contents; }
#hub .hm-ubar__label { color: var(--hm-muted); font-size: 12.5px; font-weight: 600; }
#hub .hm-ubar .hm-select { height: 38px; min-width: 0; max-width: 100%; padding: 0 12px; border: 1px solid #e2e0ea; border-radius: 10px; background: #fff; color: var(--hm-ink); font: 14px Roboto, sans-serif; }
#hub .hm-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--hm-line); border-radius: 12px; background: #fff; }
#hub .hm-seg a { padding: 6px 12px; border-radius: 9px; color: var(--hm-text); font-size: 13px; font-weight: 600; white-space: nowrap; }
#hub .hm-seg a:hover { background: #f3f1f9; }
#hub .hm-seg a[aria-current] { background: var(--hm-purple); color: #fff; }
#hub .hm-scroll, #hub .hm-matrix-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
#hub .hm-matrix { width: 100%; min-width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: 13px; }
#hub .hm-matrix th, #hub .hm-matrix td { padding: 9px 12px; border-bottom: 1px solid #eeedf3; text-align: left; vertical-align: top; white-space: nowrap; }
#hub .hm-matrix thead th { background: #faf9fd; color: var(--hm-muted); font-size: 12px; font-weight: 600; }
#hub .hm-matrix thead th b { display: block; color: var(--hm-ink); font-size: 13px; }
#hub .hm-matrix thead th span { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
#hub .hm-matrix tbody th { position: sticky; left: 0; z-index: 1; min-width: 170px; max-width: 260px; background: #fff; font-weight: 400; white-space: normal; box-shadow: 1px 0 0 #eeedf3; }
#hub .hm-matrix .hm-num, #hub .hm-matrix td.hm-right { font-variant-numeric: tabular-nums; text-align: right; }
#hub .hm-matrix .hm-col-total { background: #f7f5fc; }
#hub .hm-cellv b { display: block; color: var(--hm-ink); font-size: 14px; font-variant-numeric: tabular-nums; }
#hub .hm-cellv > span { display: block; margin-top: 2px; color: var(--hm-text); font-size: 12px; }
#hub .hm-cellv .hm-trend, #hub .hm-cellv .hm-ign { margin-top: 4px; }
/* quantile levels: one purple scale (never red / green); the bars of .hm-lvl and the words carry the level as well */
#hub .hm-q1 { background: #f7f5fc; }
#hub .hm-q2 { background: #eeeaf7; }
#hub .hm-q3 { background: #e2dbf1; }
#hub .hm-q4 { background: #d2c8ea; }
#hub .hm-q5 { background: #bfb1df; }
#hub .hm-lvl { display: inline-flex; gap: 2px; margin-right: 6px; vertical-align: 1px; }
#hub .hm-lvl i { width: 5px; height: 11px; border-radius: 1px; background: #d6d1e5; }
#hub .hm-lvl i.on { background: var(--hm-purple); }
#hub .hm-legend-q { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0; padding: 12px 20px; border-top: 1px solid #eeedf3; color: var(--hm-muted); font-size: 12.5px; list-style: none; }
#hub .hm-legend-q li { display: inline-flex; gap: 6px; align-items: center; }
#hub .hm-legend-q .hm-sw { display: inline-flex; align-items: center; padding: 2px 6px; border: 1px solid #e5e1ef; border-radius: 6px; }
#hub .hm-trend { display: inline-flex; gap: 4px; align-items: center; color: var(--hm-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
#hub .hm-trend .fa { font-size: 11px; }
#hub .hm-trend--up { color: var(--hm-green); }
#hub .hm-trend--down { color: var(--hm-red); }
#hub .hm-trend--new { color: var(--hm-blue); }
#hub .hm-ign { display: inline-flex; gap: 4px; align-items: center; padding: 1px 7px; border-radius: 6px; background: #fff5e6; color: #92400e; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
#hub .hm-cellv .hm-ign { display: flex; width: max-content; }
#hub .hm-mod { color: var(--hm-ink); font-weight: 600; overflow-wrap: anywhere; }
#hub .hm-modkind { display: block; color: var(--hm-muted); font-size: 11.5px; font-weight: 400; }
#hub .hm-modkind--other { color: var(--hm-amber); }
#hub .hm-modkind--admin { color: var(--hm-blue); }
#hub .hm-spark { display: block; width: 100%; max-width: 160px; height: 34px; overflow: visible; }
#hub .hm-spark polyline { fill: none; stroke: var(--hm-purple); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
#hub .hm-spark--err polyline { stroke: var(--hm-red); }
#hub .hm-spark--p95 polyline { stroke: var(--hm-orange-text); }
#hub .hm-spark--cpu polyline { stroke: var(--hm-blue); }
#hub .hm-spark--mem polyline { stroke: var(--hm-green); }
#hub .hm-sparks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 18px; margin: 0 0 16px; }
#hub .hm-sparks figure { min-width: 0; margin: 0; }
#hub .hm-sparks figcaption { margin-bottom: 4px; color: var(--hm-muted); font-size: 12px; }
#hub .hm-sparks figcaption b { display: block; color: var(--hm-ink); font-size: 16px; font-variant-numeric: tabular-nums; }
#hub .hm-ucards { display: grid; gap: 20px; margin: 0 4px; }
#hub .hm-ucards > .vpe-card, #hub .hm-ucards > .al-main-card { min-width: 0; margin: 0; }
#hub .hm-ucards .vpe-card-body { min-width: 0; }
#hub .hm-cardacts-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#hub details.hm-rows > summary { padding: 12px 20px; border-top: 1px solid #eeedf3; color: var(--hm-purple); font-size: 13px; font-weight: 600; cursor: pointer; }
#hub .hm-threshold { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0; }
#hub .hm-threshold label { display: block; margin: 0 0 4px; color: var(--hm-ink); font-size: 13px; font-weight: 600; }
#hub .hm-threshold .form-control { width: 120px; }
#hub .hm-ignored-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
#hub .hm-ignored-list li { padding: 3px 10px; border-radius: 999px; background: #fff5e6; color: #92400e; font-size: 12.5px; font-weight: 600; overflow-wrap: anywhere; }
#hub .hm-role { border-top: 1px solid #eeedf3; }
#hub .hm-role:first-child { border-top: 0; }
#hub .hm-role > summary { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 14px 20px; cursor: pointer; }
#hub .hm-role > summary .hm-strong { color: var(--hm-ink); font-weight: 600; overflow-wrap: anywhere; }
#hub .hm-role__body { padding: 0 20px 16px; }
#hub .hm-rights { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 20px; }
#hub .hm-rights h3 { margin: 0 0 6px; color: var(--hm-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
#hub .hm-rights ul { margin: 0; padding: 0 0 0 16px; color: var(--hm-ink); font-size: 13px; line-height: 1.55; }
#hub .hm-rights code { font-size: 11.5px; }
#hub .hm-has { color: var(--hm-green); font-weight: 700; }
#hub .hm-hasnot { color: var(--hm-muted); }
#hub .hm-pad { padding: 16px 20px; }
#hub .hm-pad > p { margin: 0 0 10px; color: var(--hm-muted); font-size: 13.5px; line-height: 1.5; }
#hub .hm-pad > p:last-child { margin-bottom: 0; }
#hub .hm-blocked-n { color: var(--hm-red); font-weight: 600; }
@media (max-width: 767px) {
    #hub .hm-ubar { margin: 0 0 14px; }
    #hub .hm-ucards { margin: 0; }
    #hub .hm-matrix tbody th { min-width: 128px; max-width: 160px; }
    #hub .hm-matrix th, #hub .hm-matrix td { padding: 8px 9px; }
    #hub .hm-role > summary, #hub .hm-role__body, #hub .hm-pad { padding-left: 14px; padding-right: 14px; }
}

/* Task 15 fix 1: a filter label stays with its control (wraps as one unit; label above on phones); a server name never breaks inside. */
#hub .hm-ugroup { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
#hub .hm-lcard-head { flex-wrap: wrap; row-gap: 4px; }
#hub .hm-lcard-head h2 { min-width: 0; }
#hub .hm-nobr { white-space: nowrap; }
#hub .hm-notice { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
@media (max-width: 767px) {
    #hub .hm-ugroup { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
    #hub .hm-lcard-head > .hm-sub { flex-basis: 100%; }
}
