/* JML Control styles. Bootstrap 5 does most of the work; these are the app's own touches.
   Nov 10, 2026: layout and colors copied from SwordChat's owner dashboard (owner's request). Everything uses
   Bootstrap's own color variables, so text stays readable and the Light/Dark theme switch works everywhere. */

/* ===== Signed-in layout (from SwordChat's owner-* styles) ===== */
.app-sidebar { width: 16rem; flex-shrink: 0; position: sticky; top: 0; height: 100vh; }
.app-logo { width: 2.25rem; height: 2.25rem; border-radius: .6rem; display: inline-flex; align-items: center; justify-content: center; background: var(--bs-primary); color: #fff; font-size: 1.1rem; }
.app-eyebrow { text-transform: uppercase; font-size: .72rem; font-weight: 600; letter-spacing: .05em; color: var(--bs-secondary-color); padding: .9rem .75rem .3rem; }
.app-link { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .45rem .75rem; border: 0; border-radius: .5rem; background: none; color: var(--bs-body-color); text-decoration: none; font-size: .95rem; text-align: left; }
.app-link > .bi:first-child { width: 1.1rem; text-align: center; color: var(--bs-secondary-color); }
.app-link:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.app-link.active { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); font-weight: 600; }
.app-link.active > .bi:first-child { color: var(--bs-primary-text-emphasis); }
.app-link:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 1px; }
.app-avatar { width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); font-weight: 600; font-size: .85rem; }
.status-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--bs-secondary-color); display: inline-block; flex-shrink: 0; }
.status-dot.ok { background: var(--bs-success); }
.status-dot.bad { background: var(--bs-danger); }
.app-shell .card { border-color: var(--bs-border-color-translucent); }
.app-shell .table > :not(caption) > * > * { padding: .6rem .75rem; }
/* Let wide tables scroll inside their own box instead of pushing the whole page sideways. */
.app-main { min-width: 0; }
.app-topbar { position: sticky; top: 0; z-index: 1020; min-height: 3.25rem; }
.signed-out-bar { position: sticky; top: 0; z-index: 1040; }
@media (max-width: 991.98px) {
  .app-sidebar { position: fixed; z-index: 1045; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; }
  .app-sidebar.open { transform: none; box-shadow: var(--bs-box-shadow-lg); }
  .app-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 1040; }
}

/* ===== Expandable sidebar groups (a button + a Bootstrap collapse) ===== */
.app-group-toggle .app-chevron { margin-left: auto; font-size: .8rem; color: var(--bs-secondary-color); transition: transform .2s ease; }
.app-group-toggle:not(.collapsed) .app-chevron { transform: rotate(180deg); }
.app-group-toggle.has-active { color: var(--bs-primary-text-emphasis); font-weight: 600; }
.app-group-toggle.has-active > .bi:first-child { color: var(--bs-primary-text-emphasis); }
.app-submenu { margin: .1rem 0 .25rem 1.15rem; padding-left: .5rem; border-left: 1px solid var(--bs-border-color); }
.app-submenu .app-link { font-size: .9rem; padding: .35rem .65rem; }

/* ===== Sign-in pages (from SwordChat's owner-auth layout) ===== */
.auth-card { max-width: 26rem; }
.auth-mark { width: 3rem; height: 3rem; margin: 0 auto; border-radius: .75rem; display: flex; align-items: center; justify-content: center; background: var(--bs-primary); color: #fff; font-size: 1.4rem; }

/* ===== Dashboard: number cards (SwordChat's stat-card) ===== */
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-icon { width: 2.5rem; height: 2.5rem; border-radius: .6rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }

/* ===== User Settings: each card keeps its own color ===== */
.settings-card { border-top: 4px solid transparent !important; }
.settings-account  { border-top-color: var(--bs-primary) !important; } .settings-account h2 .bi  { color: var(--bs-primary); }
.settings-email    { border-top-color: var(--bs-success) !important; } .settings-email h2 .bi    { color: var(--bs-success); }
.settings-password { border-top-color: var(--bs-warning) !important; } .settings-password h2 .bi { color: var(--bs-warning-text-emphasis); }
.settings-alerts   { border-top-color: var(--bs-danger) !important; }  .settings-alerts h2 .bi   { color: var(--bs-danger); }

/* ===== Admin Center ===== */
.admin-search { max-width: 280px; }
.admin-switch-card .switch-icon { width: 2.5rem; height: 2.5rem; border-radius: .6rem; flex: 0 0 2.5rem; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.admin-switch-card.switch-off .switch-icon { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.admin-switch-card.switch-pending .switch-icon { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.admin-tabs .nav-link { color: var(--bs-body-color); }
.admin-tabs .nav-link.active { color: var(--bs-primary-text-emphasis); font-weight: 600; }
.company-card { border-top: 4px solid #6f42c1 !important; }
.company-card h2 .bi { color: #6f42c1; }
.company-field { max-width: 420px; }
.failed-mail-card { border-left: 4px solid var(--bs-danger) !important; }

/* ===== Notification bell ===== */
.bell-menu { width: 380px; max-width: 90vw; }
.bell-list { max-height: 420px; overflow-y: auto; }
.bell-text { cursor: pointer; }
.bell-meta { font-size: .75rem; }
.bell-dismiss { font-size: .6rem; }
.admin-switch-card.switch-locked .switch-icon { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }

/* ===== Two-factor ===== */
.twofa-code { letter-spacing: .4em; }
.settings-twofa { border-top-color: #6f42c1 !important; } .settings-twofa h2 .bi { color: #6f42c1; }


/* Services tables (Hetzner, later others): compact rows, one line each, colour where it carries meaning */
.svc-summary { display: flex; flex-wrap: wrap; gap: .5rem; }
.svc-stat { display: inline-flex; align-items: baseline; gap: .4rem; padding: .35rem .75rem; border-radius: .5rem; background: var(--bs-tertiary-bg); font-size: .85rem; color: var(--bs-secondary-color); }
.svc-stat strong { font-size: 1rem; color: var(--bs-body-color); font-variant-numeric: tabular-nums; }
.svc-stat.is-primary strong { color: var(--bs-primary-text-emphasis); }
.svc-card { border: 1px solid var(--bs-border-color-translucent); border-radius: .75rem; background: var(--bs-body-bg); overflow: hidden; }
.svc-card-head { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border-bottom: 1px solid var(--bs-border-color-translucent); font-weight: 600; font-size: .95rem; }
.svc-card-head .bi { color: var(--bs-secondary-color); }
.svc-card-foot { padding: .6rem 1rem; border-top: 1px solid var(--bs-border-color-translucent); font-size: .8rem; color: var(--bs-secondary-color); }
.app-shell .svc-table > :not(caption) > * > * { padding: .55rem .75rem; }
.svc-table { margin: 0; font-size: .875rem; --bs-table-bg: transparent; --bs-table-hover-bg: var(--bs-tertiary-bg); }
.svc-table thead th { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); background: transparent; border-bottom-width: 1px; white-space: nowrap; }
.svc-table td { white-space: nowrap; vertical-align: middle; border-color: var(--bs-border-color-translucent); }
.svc-table tbody tr:last-child td { border-bottom: 0; }
.svc-table tr.is-managed td:first-child { box-shadow: inset 3px 0 0 var(--bs-primary); }
.svc-name { font-weight: 600; color: var(--bs-body-color); }
.svc-muted { color: var(--bs-secondary-color); }
.svc-mono { font-family: var(--bs-font-monospace); font-size: .8rem; }
.svc-num { font-variant-numeric: tabular-nums; text-align: right; }
.svc-tag { display: inline-flex; align-items: center; gap: .25rem; margin-left: .4rem; padding: .05rem .45rem; border-radius: 1rem; font-size: .7rem; font-weight: 600; vertical-align: .1em; }
.svc-tag.managed { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.svc-tag.readonly { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.svc-tag.protected { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.svc-status { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; }
.svc-status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.svc-status.ok { color: var(--bs-success-text-emphasis); }
.svc-status.off { color: var(--bs-secondary-color); }
.svc-status.busy { color: var(--bs-warning-text-emphasis); }
.svc-chip { display: inline-block; margin: .1rem .25rem .1rem 0; padding: .05rem .45rem; border-radius: .35rem; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color-translucent); font-family: var(--bs-font-monospace); font-size: .75rem; }
.svc-menu-btn { border: 0; background: none; padding: .15rem .45rem; border-radius: .4rem; color: var(--bs-secondary-color); }
.svc-menu-btn:hover, .svc-menu-btn[aria-expanded="true"] { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.svc-conn { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; }
.svc-status.ok::before { background: var(--bs-success); }
.svc-status.busy::before { background: var(--bs-warning); }
/* DNS: record types get their own colours; Cloudflare's proxy is shown in its orange */
.svc-type { display: inline-block; min-width: 3.4rem; padding: .1rem .4rem; border-radius: .35rem; text-align: center; font-family: var(--bs-font-monospace); font-size: .72rem; font-weight: 700; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); border: 1px solid var(--bs-border-color-translucent); }
.svc-type.t-A { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); border-color: var(--bs-primary-border-subtle); }
.svc-type.t-AAAA { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); border-color: var(--bs-info-border-subtle); }
.svc-type.t-CNAME { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); border-color: var(--bs-success-border-subtle); }
.svc-type.t-MX { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); border-color: var(--bs-warning-border-subtle); }
.svc-type.t-TXT { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.svc-trunc { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; }
.svc-proxy { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--bs-secondary-color); }
.svc-proxy.on { color: #f38020; font-weight: 600; }
.svc-stat.is-proxy strong { color: #f38020; }
.svc-trunc-name { display: inline-block; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
@media (max-width: 991.98px) { .svc-trunc { max-width: 11rem; } .svc-trunc-name { max-width: 10rem; } }

/* Company branding (Admin Center → Company, Nov 10, 2026) */
.company-section { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); margin-bottom: .9rem; }
.brand-box { border: 1px solid var(--bs-border-color); border-radius: .6rem; background: var(--bs-tertiary-bg); display: flex; align-items: center; justify-content: center; padding: .75rem; overflow: hidden; }
.brand-bg { background-size: cover; background-position: center; }
.sidebar-logo { max-height: 2.25rem; max-width: 7.5rem; object-fit: contain; }
.auth-logo { display: block; max-height: 4rem; max-width: 14rem; margin: 0 auto; object-fit: contain; }
.auth-background { position: fixed; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.auth-overlay { position: fixed; inset: 0; background: linear-gradient(135deg, rgba(5, 44, 101, .45), rgba(0, 0, 0, .35)); z-index: 0; }
.auth-main { position: relative; z-index: 1; }

/* Identity page (Services → Identity, Nov 10, 2026): directory tree on the left, the selected object on the right.
   Colour carries meaning: owner purple, billing amber, member grey; status green/blue/red/grey; sign-in results. */
.idt-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 991.98px) { .idt-layout { grid-template-columns: minmax(0, 1fr); } }
.idt-search { position: relative; min-width: 15rem; }
.idt-search .bi { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: var(--bs-secondary-color); font-size: .8rem; }
.idt-search input { padding-left: 1.8rem; }
.idt-tree-card { position: sticky; top: 1rem; }
.idt-tree-wrap, .idt-results { max-height: 70vh; overflow-y: auto; padding: .4rem 0; }
.idt-tree, .idt-children { list-style: none; margin: 0; padding: 0; }
.idt-children { padding-left: 1rem; }
.idt-row { display: flex; align-items: center; margin: 0 .35rem; border-radius: .4rem; }
.idt-row:hover { background: var(--bs-tertiary-bg); }
.idt-row.active { background: var(--bs-primary-bg-subtle); }
.idt-row.active .idt-label { color: var(--bs-primary-text-emphasis); font-weight: 600; }
.idt-caret { flex: 0 0 1.4rem; width: 1.4rem; border: 0; background: none; padding: .25rem 0; color: var(--bs-secondary-color); font-size: .7rem; text-align: center; }
.idt-node { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: .4rem; border: 0; background: none; padding: .28rem .35rem .28rem 0; text-align: left; font-size: .86rem; color: var(--bs-body-color); }
.idt-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: auto; }
.idt-count { font-size: .7rem; font-weight: 600; padding: 0 .4rem; border-radius: 1rem; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
.idt-empty { padding: .25rem .5rem .25rem 1.9rem; font-size: .78rem; color: var(--bs-secondary-color); }
.idt-ic-tenant { color: #6f42c1; } .idt-ic-ou { color: var(--bs-warning-text-emphasis); } .idt-ic-app { color: var(--bs-info-text-emphasis); } .idt-ic-person { color: var(--bs-secondary-color); }
.idt-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--bs-success); flex: 0 0 .5rem; }
.idt-dot.off { background: var(--bs-warning); }
.idt-role, .idt-st, .idt-res, .idt-kind { display: inline-block; padding: .05rem .45rem; border-radius: 1rem; font-size: .7rem; font-weight: 600; white-space: nowrap; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.idt-role.r-owner { background: rgba(111, 66, 193, .15); color: #6f42c1; }
[data-bs-theme="dark"] .idt-role.r-owner, [data-bs-theme="dark"] .idt-ic-tenant { color: #b39ddb; }
.idt-role.r-billing { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.idt-st.s-active { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.idt-st.s-invited, .idt-st.s-info { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); }
.idt-st.s-locked { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.idt-st.s-suspended, .idt-st.s-warn { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.idt-st.s-closed, .idt-st.s-disabled { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.idt-res.ok { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.idt-res.bad { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.idt-res.warn { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.idt-kind.k-store { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); }
.svc-stat.is-danger strong { color: var(--bs-danger-text-emphasis); }
.idt-group-label { padding: .5rem 1rem .2rem; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); }
.idt-hit { display: flex; align-items: center; gap: .55rem; width: 100%; border: 0; background: none; padding: .35rem 1rem; text-align: left; font-size: .86rem; color: var(--bs-body-color); }
.idt-hit:hover { background: var(--bs-tertiary-bg); } .idt-hit.active { background: var(--bs-primary-bg-subtle); }
.idt-hit-main { min-width: 0; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idt-hit-main small { display: block; color: var(--bs-secondary-color); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; }
.idt-empty-pane { padding: 3rem 1.5rem; text-align: center; }
.idt-empty-pane > .bi { font-size: 2rem; color: var(--bs-secondary-color); }
.idt-head { display: flex; align-items: center; gap: .75rem; padding: 1rem; flex-wrap: wrap; }
.idt-title { font-size: 1.1rem; font-weight: 600; }
.idt-avatar { width: 2.6rem; height: 2.6rem; flex: 0 0 2.6rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.05rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.idt-avatar.s-locked { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.idt-avatar.s-closed { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.idt-avatar.s-invited { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); }
.idt-avatar.is-org { border-radius: .6rem; background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.idt-avatar.is-ou { border-radius: .6rem; background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.idt-avatar.is-tenant { border-radius: .6rem; background: rgba(111, 66, 193, .15); color: #6f42c1; }
.idt-avatar.is-app { border-radius: .6rem; background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); }
.idt-tabs { border-bottom: 1px solid var(--bs-border-color-translucent); gap: .25rem; }
.idt-tabs .nav-link { border: 0; background: none; padding: .5rem .6rem; font-size: .85rem; color: var(--bs-secondary-color); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.idt-tabs .nav-link.active { color: var(--bs-primary-text-emphasis); border-bottom-color: var(--bs-primary); font-weight: 600; }
.idt-dl { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .45rem 1rem; margin: 0; font-size: .875rem; }
.idt-dl dt { font-weight: 500; color: var(--bs-secondary-color); }
.idt-dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .idt-dl { grid-template-columns: minmax(0, 1fr); } .idt-dl dd { margin-bottom: .4rem; } }
.idt-activity { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.idt-activity li { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr) auto; gap: .75rem; padding: .5rem 1rem; border-bottom: 1px solid var(--bs-border-color-translucent); }
.idt-activity li:last-child { border-bottom: 0; }
.idt-act-when { color: var(--bs-secondary-color); white-space: nowrap; }
.idt-act-who { color: var(--bs-secondary-color); white-space: nowrap; font-size: .8rem; }
@media (max-width: 767.98px) { .idt-activity li { grid-template-columns: minmax(0, 1fr); gap: .1rem; } }
.idt-pick { max-height: 14rem; overflow-y: auto; }
.min-w-0 { min-width: 0; }
/* Argus pages (Nov 10, 2026): health colours, usage meters, one-time secrets, charts */
.svc-stat.is-ok strong { color: var(--bs-success-text-emphasis); }
.svc-stat.is-warn strong { color: var(--bs-warning-text-emphasis); }
.svc-stat.is-bad strong { color: var(--bs-danger-text-emphasis); }
.svc-status.bad { color: var(--bs-danger-text-emphasis); }
.svc-status.bad::before { background: var(--bs-danger); }
.svc-tag.revoked { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.svc-table tr.is-bad-row td:first-child { box-shadow: inset 3px 0 0 var(--bs-danger); }
.svc-table tr.is-warn-row td:first-child { box-shadow: inset 3px 0 0 var(--bs-warning); }
.svc-meter { display: inline-block; width: 3.5rem; height: .4rem; border-radius: 1rem; background: var(--bs-secondary-bg); overflow: hidden; vertical-align: middle; margin-right: .4rem; }
.svc-meter.wide { width: 6rem; }
.svc-meter > span { display: block; height: 100%; max-width: 100%; border-radius: 1rem; background: var(--bs-success); }
.svc-meter > span.mid { background: var(--bs-warning); }
.svc-meter > span.hi { background: var(--bs-danger); }
.svc-meter-text { font-variant-numeric: tabular-nums; font-size: .8rem; color: var(--bs-secondary-color); }
.svc-secret { white-space: pre-wrap; word-break: break-all; padding: .75rem 1rem; border-radius: .5rem; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); font-size: .85rem; user-select: all; }
.svc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .75rem; }
.svc-tile { border: 1px solid var(--bs-border-color-translucent); border-radius: .75rem; background: var(--bs-body-bg); padding: .75rem 1rem; }
.svc-tile .lbl { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); }
.svc-tile .val { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.svc-tile .sub { font-size: .78rem; color: var(--bs-secondary-color); }
.svc-tile .val.ok { color: var(--bs-success-text-emphasis); } .svc-tile .val.mid { color: var(--bs-warning-text-emphasis); } .svc-tile .val.hi { color: var(--bs-danger-text-emphasis); }
.svc-facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .875rem; margin: 0; }
.svc-facts dt { font-weight: 500; color: var(--bs-secondary-color); }
.svc-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.argus-chart { position: relative; height: 9rem; }
.argus-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.argus-chart .grid line { stroke: var(--bs-border-color-translucent); }
.argus-chart .grid text, .argus-chart .axis text { fill: var(--bs-secondary-color); font-size: 10px; }
.argus-chart .line { fill: none; stroke-width: 2; }
.argus-chart .area { opacity: .12; }
.argus-chart .empty { fill: var(--bs-secondary-color); font-size: 12px; }
.argus-chart-title { font-size: .8rem; font-weight: 600; color: var(--bs-secondary-color); display: flex; justify-content: space-between; }

/* Dashboard (Nov 11, 2026): the "Needs attention" list, coloured by severity, and clickable tiles */
.dash-attention .svc-card-head .bi { color: var(--bs-warning); }
.dash-attention.all-clear { border-color: var(--bs-success-border-subtle); }
.dash-attention.all-clear .svc-card-head .bi { color: var(--bs-success); }
.dash-list .list-group-item { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; font-size: .9rem; border-color: var(--bs-border-color-translucent); background: transparent; }
.dash-list .list-group-item > .bi { font-size: 1rem; width: 1.25rem; text-align: center; color: var(--bs-secondary-color); flex-shrink: 0; }
.dash-list .list-group-item > span { min-width: 0; }
.dash-list .sev-bad { box-shadow: inset 3px 0 0 var(--bs-danger); }
.dash-list .sev-bad > .bi { color: var(--bs-danger); }
.dash-list .sev-warn { box-shadow: inset 3px 0 0 var(--bs-warning); }
.dash-list .sev-warn > .bi { color: var(--bs-warning-text-emphasis); }
.dash-list .sev-info { box-shadow: inset 3px 0 0 var(--bs-info); }
.dash-list .sev-info > .bi { color: var(--bs-info-text-emphasis); }
.dash-tile { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.dash-tile:hover { border-color: var(--bs-primary-border-subtle); transform: translateY(-1px); color: inherit; }
.dash-of { font-size: .9rem; font-weight: 500; color: var(--bs-secondary-color); }
.dash-cat { margin-left: 0; flex-shrink: 0; min-width: 4.5rem; justify-content: center; }
.d-contents { display: contents; }

/* Object storage (Services → Object storage, Nov 11, 2026): usage charts, drawn by public/js/storage-charts.js */
.st-chart { position: relative; height: 9rem; }
.st-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.st-chart .grid line { stroke: var(--bs-border-color-translucent); }
.st-chart .grid text, .st-chart .axis text { fill: var(--bs-secondary-color); font-size: 10px; }
.st-chart .line { fill: none; stroke-width: 2; }
.st-chart .area { opacity: .12; }
.st-chart .empty { fill: var(--bs-secondary-color); font-size: 12px; }

/* Argus terminals and package updates (agent.ejs, argus-ops.js). The terminal keeps its own dark colors in
   both themes, like a real console; logs follow the theme. */
.argus-term-modal { background-color: #1e1e1e; color: #e6e6e6; }
.argus-term-modal .modal-header, .argus-term-modal .modal-footer { background-color: var(--bs-body-bg); color: var(--bs-body-color); }
.argus-term { width: 100%; height: calc(100vh - 4.5rem); }
.argus-term-play { height: auto; min-height: 20rem; overflow: auto; }
.argus-term .xterm { height: 100%; padding: .25rem; }
.argus-log { max-height: 22rem; overflow: auto; padding: .75rem; font-size: .8rem; line-height: 1.35;
    background-color: var(--bs-tertiary-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius); white-space: pre-wrap; word-break: break-word; }

/* Services → Servers (server inventory) */
.inv-provider { font-weight: 600; font-size: .85rem; }
.inv-provider.is-hetzner { color: #d50c2d; }
.inv-provider.is-proxmox { color: #e57000; }
[data-bs-theme="dark"] .inv-provider.is-hetzner { color: #ff6b81; }
[data-bs-theme="dark"] .inv-provider.is-proxmox { color: #ffa94d; }
.svc-tag.inv-run { margin: 0 .3rem .15rem 0; }
.svc-tag.inv-run.is-argus { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); }
.svc-tag.inv-run.is-swordpms { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.svc-tag.inv-run.is-hetzner { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.svc-tag.inv-run.is-proxmox { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.svc-tag.inv-run.is-unmanaged { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
#invTable tr.inv-bad > td:first-child { box-shadow: inset 3px 0 0 var(--bs-danger); }
#invTable tr.inv-busy > td:first-child { box-shadow: inset 3px 0 0 var(--bs-warning); }
