/*
 * Imaginatrix ERP
 *
 * Bootstrap 5.3 does the heavy lifting; this file sets the brand tokens for
 * both themes and adds the handful of components Bootstrap lacks.
 *
 * The Content-Security-Policy forbids inline styles, so everything visual
 * lives here: templates use classes only.
 */

/* ---------- tokens ---------- */
:root,
[data-bs-theme="light"] {
    --ix-teal: #147d6c;
    --ix-cyan: #1effff;
    --ix-grad: linear-gradient(135deg, #147d6c 0%, #1bbfb0 55%, #1effff 100%);

    --ix-bg: #f3f6f6;
    --ix-surface: #ffffff;
    --ix-surface-2: #f7f9f9;
    --ix-border: #dbe4e4;
    --ix-text: #10201f;
    --ix-muted: #566869;

    --ix-accent: #147d6c;
    --ix-accent-hover: #0f6557;
    --ix-accent-contrast: #ffffff;
    --ix-accent-soft: rgba(20, 125, 108, .10);
    --ix-shadow: 0 1px 2px rgba(16, 32, 31, .05), 0 4px 14px rgba(16, 32, 31, .05);

    --ix-sidebar-bg: #0a1a1a;
    --ix-sidebar-border: #142b2b;
    --ix-sidebar-text: #a9bfbe;
    --ix-sidebar-heading: #6c8584;
    --ix-sidebar-hover: rgba(255, 255, 255, .06);
    --ix-sidebar-active-bg: rgba(30, 255, 255, .10);
    --ix-sidebar-active-text: #ffffff;

    --bs-body-bg: var(--ix-bg);
    --bs-body-color: var(--ix-text);
    --bs-emphasis-color: #071312;
    --bs-secondary-color: var(--ix-muted);
    --bs-tertiary-bg: var(--ix-surface-2);
    --bs-border-color: var(--ix-border);
    --bs-primary: #147d6c;
    --bs-primary-rgb: 20, 125, 108;
    --bs-link-color: #147d6c;
    --bs-link-color-rgb: 20, 125, 108;
    --bs-link-hover-color: #0f6557;
    --bs-link-hover-color-rgb: 15, 101, 87;
    --bs-focus-ring-color: rgba(20, 125, 108, .30);
    --bs-font-sans-serif: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
    --bs-font-monospace: "Cascadia Mono", "JetBrains Mono", Consolas, "SFMono-Regular", Menlo, monospace;
    --bs-body-font-size: .9375rem;
    --bs-border-radius: .5rem;
}

[data-bs-theme="dark"] {
    --ix-bg: #061011;
    --ix-surface: #0c1a1b;
    --ix-surface-2: #102223;
    --ix-border: #1d3435;
    --ix-text: #e2eeed;
    --ix-muted: #8ba3a2;

    --ix-accent: #2ac3ab;
    --ix-accent-hover: #4dd6c0;
    --ix-accent-contrast: #03110f;
    --ix-accent-soft: rgba(42, 195, 171, .14);
    --ix-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 20px rgba(0, 0, 0, .25);

    --ix-sidebar-bg: #030a0b;
    --ix-sidebar-border: #112223;

    --bs-body-bg: var(--ix-bg);
    --bs-body-color: var(--ix-text);
    --bs-emphasis-color: #ffffff;
    --bs-secondary-color: var(--ix-muted);
    --bs-tertiary-bg: var(--ix-surface-2);
    --bs-border-color: var(--ix-border);
    --bs-primary: #2ac3ab;
    --bs-primary-rgb: 42, 195, 171;
    --bs-link-color: #5fdcc8;
    --bs-link-color-rgb: 95, 220, 200;
    --bs-link-hover-color: #93ecdd;
    --bs-link-hover-color-rgb: 147, 236, 221;
    --bs-focus-ring-color: rgba(42, 195, 171, .35);
}

/* ---------- base ---------- */
html { height: 100%; }
body { min-height: 100%; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: -.01em; }
a { text-underline-offset: .15em; }
code, .font-monospace { font-size: .875em; }
:focus-visible { outline: 2px solid var(--ix-accent); outline-offset: 2px; }

.skip-link { position: absolute; left: .75rem; top: .75rem; z-index: 2000; padding: .5rem .875rem; border-radius: .5rem; background: var(--ix-surface); color: var(--ix-text); box-shadow: var(--ix-shadow); }

/* ---------- Bootstrap, re-tinted ---------- */
.btn { --bs-btn-font-weight: 500; --bs-btn-border-radius: .5rem; }
.btn-primary {
    --bs-btn-color: var(--ix-accent-contrast);
    --bs-btn-bg: var(--ix-accent);
    --bs-btn-border-color: var(--ix-accent);
    --bs-btn-hover-color: var(--ix-accent-contrast);
    --bs-btn-hover-bg: var(--ix-accent-hover);
    --bs-btn-hover-border-color: var(--ix-accent-hover);
    --bs-btn-active-color: var(--ix-accent-contrast);
    --bs-btn-active-bg: var(--ix-accent-hover);
    --bs-btn-active-border-color: var(--ix-accent-hover);
    --bs-btn-disabled-color: var(--ix-accent-contrast);
    --bs-btn-disabled-bg: var(--ix-accent);
    --bs-btn-disabled-border-color: var(--ix-accent);
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
.btn-outline-primary {
    --bs-btn-color: var(--ix-accent);
    --bs-btn-border-color: var(--ix-accent);
    --bs-btn-hover-color: var(--ix-accent-contrast);
    --bs-btn-hover-bg: var(--ix-accent);
    --bs-btn-hover-border-color: var(--ix-accent);
    --bs-btn-active-color: var(--ix-accent-contrast);
    --bs-btn-active-bg: var(--ix-accent);
    --bs-btn-active-border-color: var(--ix-accent);
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
.btn-outline-secondary {
    --bs-btn-color: var(--ix-text);
    --bs-btn-border-color: var(--ix-border);
    --bs-btn-hover-color: var(--ix-text);
    --bs-btn-hover-bg: var(--ix-surface-2);
    --bs-btn-hover-border-color: var(--ix-muted);
    --bs-btn-active-color: var(--ix-text);
    --bs-btn-active-bg: var(--ix-surface-2);
    --bs-btn-active-border-color: var(--ix-muted);
}
.btn-icon { display: inline-grid; place-items: center; width: 2.375rem; height: 2.375rem; padding: 0; border: 1px solid transparent; border-radius: .5rem; color: var(--ix-muted); background: transparent; font-size: 1.125rem; }
.btn-icon:hover { color: var(--ix-text); background: var(--ix-surface-2); border-color: var(--ix-border); }

.card { --bs-card-bg: var(--ix-surface); --bs-card-border-color: var(--ix-border); --bs-card-border-radius: .75rem; --bs-card-inner-border-radius: calc(.75rem - 1px); --bs-card-cap-bg: transparent; --bs-card-cap-padding-y: .875rem; --bs-card-spacer-y: 1.125rem; --bs-card-spacer-x: 1.125rem; box-shadow: var(--ix-shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-weight: 600; }
.card-header .card-title { margin: 0; font-size: 1rem; }

.form-label { font-weight: 500; margin-bottom: .375rem; }
.form-control, .form-select { background-color: var(--ix-surface); border-color: var(--ix-border); color: var(--ix-text); }
.form-control:focus, .form-select:focus { background-color: var(--ix-surface); border-color: var(--ix-accent); box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); color: var(--ix-text); }
.form-control:disabled, .form-control[readonly] { background-color: var(--ix-surface-2); }
.form-check-input { border-color: var(--ix-muted); background-color: var(--ix-surface); }
.form-check-input:checked { background-color: var(--ix-accent); border-color: var(--ix-accent); }
.form-check-input:focus { border-color: var(--ix-accent); box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.form-text { color: var(--ix-muted); }
.input-group-text { background-color: var(--ix-surface-2); border-color: var(--ix-border); color: var(--ix-muted); }

.table { --bs-table-bg: transparent; --bs-table-color: var(--ix-text); --bs-table-border-color: var(--ix-border); --bs-table-hover-bg: var(--ix-surface-2); --bs-table-hover-color: var(--ix-text); margin-bottom: 0; }
.table > thead th { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ix-muted); white-space: nowrap; border-bottom-width: 1px; }
.table > tbody td { vertical-align: middle; }
.table > :not(caption) > * > * { padding: .7rem 1.125rem; }
/* position:relative matters: without it, absolutely positioned content inside a
   wide table (Bootstrap's .visually-hidden labels, dropdown menus) is not
   clipped by this scroll box and makes the whole page scroll sideways. */
.table-responsive { position: relative; border-radius: inherit; }
.th-sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .25rem; }
.th-sort:hover { color: var(--ix-text); }

.dropdown-menu { --bs-dropdown-bg: var(--ix-surface); --bs-dropdown-border-color: var(--ix-border); --bs-dropdown-link-color: var(--ix-text); --bs-dropdown-link-hover-color: var(--ix-text); --bs-dropdown-link-hover-bg: var(--ix-surface-2); --bs-dropdown-link-active-bg: var(--ix-accent); --bs-dropdown-link-active-color: var(--ix-accent-contrast); --bs-dropdown-border-radius: .625rem; box-shadow: var(--ix-shadow); }
.dropdown-item { display: flex; align-items: center; gap: .625rem; }
button.dropdown-item { width: 100%; border: 0; background: transparent; text-align: left; }

.pagination { --bs-pagination-color: var(--ix-text); --bs-pagination-bg: var(--ix-surface); --bs-pagination-border-color: var(--ix-border); --bs-pagination-hover-color: var(--ix-text); --bs-pagination-hover-bg: var(--ix-surface-2); --bs-pagination-hover-border-color: var(--ix-border); --bs-pagination-focus-color: var(--ix-text); --bs-pagination-focus-bg: var(--ix-surface-2); --bs-pagination-active-color: var(--ix-accent-contrast); --bs-pagination-active-bg: var(--ix-accent); --bs-pagination-active-border-color: var(--ix-accent); --bs-pagination-disabled-color: var(--ix-muted); --bs-pagination-disabled-bg: var(--ix-surface); --bs-pagination-disabled-border-color: var(--ix-border); }

.modal-content { --bs-modal-bg: var(--ix-surface); --bs-modal-border-color: var(--ix-border); --bs-modal-header-border-color: var(--ix-border); --bs-modal-footer-border-color: var(--ix-border); }
.alert { --bs-alert-border-radius: .625rem; }
.list-group { --bs-list-group-bg: transparent; --bs-list-group-border-color: var(--ix-border); --bs-list-group-color: var(--ix-text); }
.text-accent { color: var(--ix-accent) !important; }

/* ---------- soft badges ---------- */
.badge-soft { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.2; white-space: nowrap; background: var(--ix-surface-2); color: var(--ix-muted); border: 1px solid var(--ix-border); }
.badge-soft.is-ok { background: rgba(25, 135, 84, .12); color: #146c43; border-color: rgba(25, 135, 84, .25); }
.badge-soft.is-warn { background: rgba(255, 193, 7, .16); color: #7a5a00; border-color: rgba(255, 193, 7, .35); }
.badge-soft.is-bad { background: rgba(220, 53, 69, .11); color: #b02a37; border-color: rgba(220, 53, 69, .25); }
.badge-soft.is-accent { background: var(--ix-accent-soft); color: var(--ix-accent); border-color: transparent; }
[data-bs-theme="dark"] .badge-soft.is-ok { color: #6fdc9f; }
[data-bs-theme="dark"] .badge-soft.is-warn { color: #ffd35c; }
[data-bs-theme="dark"] .badge-soft.is-bad { color: #ff8b95; }

/* ---------- application shell ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar { flex: 0 0 0; width: 0; }
.sidebar-panel { --bs-offcanvas-width: 17rem; --bs-offcanvas-bg: var(--ix-sidebar-bg); --bs-offcanvas-color: var(--ix-sidebar-text); --bs-offcanvas-border-width: 0; display: flex; flex-direction: column; color: var(--ix-sidebar-text); }
@media (min-width: 992px) {
    .sidebar { flex: 0 0 15.5rem; width: 15.5rem; position: sticky; top: 0; height: 100vh; background: var(--ix-sidebar-bg); border-right: 1px solid var(--ix-sidebar-border); }
    .sidebar-panel { height: 100%; }
}

.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.125rem; color: #fff; text-decoration: none; border-bottom: 1px solid var(--ix-sidebar-border); }
.sidebar-brand:hover { color: #fff; }
.sidebar-brand img { width: 2rem; height: 2rem; border-radius: .5rem; }
.sidebar-brand-name { font-weight: 600; font-size: 1rem; line-height: 1.1; }
.sidebar-brand-name small { display: block; font-size: .6875rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ix-sidebar-heading); margin-top: .2rem; }
.sidebar-brand .btn-close { filter: invert(1) grayscale(1) brightness(2); }

.sidebar-scroll { flex: 1 1 auto; overflow-y: auto; padding: .75rem .625rem 1.25rem; }
.sidebar-heading { padding: 1rem .75rem .375rem; font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ix-sidebar-heading); }
.sidebar .nav-link { display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; border-radius: .5rem; color: var(--ix-sidebar-text); font-weight: 500; }
.sidebar .nav-link .bi { font-size: 1.0625rem; width: 1.25rem; text-align: center; opacity: .85; }
.sidebar .nav-link:hover { background: var(--ix-sidebar-hover); color: #fff; }
.sidebar .nav-link.active { background: var(--ix-sidebar-active-bg); color: var(--ix-sidebar-active-text); box-shadow: inset 2px 0 0 var(--ix-cyan); }
.sidebar .nav-link.active .bi { color: var(--ix-cyan); opacity: 1; }
.sidebar-note { margin: 1rem .75rem; padding: .75rem; border: 1px dashed var(--ix-sidebar-border); border-radius: .5rem; font-size: .8125rem; color: var(--ix-sidebar-text); }
.sidebar-foot { padding: .75rem 1.125rem; border-top: 1px solid var(--ix-sidebar-border); font-size: .75rem; color: var(--ix-sidebar-heading); }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem; min-height: 3.75rem; padding: .5rem 1.5rem; background: var(--ix-surface); border-bottom: 1px solid var(--ix-border); }
.topbar-title { font-weight: 600; font-size: 1.0625rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .375rem; flex: 0 0 auto; }
.user-menu { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .5rem .25rem .25rem; border: 1px solid transparent; border-radius: 999px; color: var(--ix-text); background: transparent; font-weight: 500; }
.user-menu:hover, .user-menu[aria-expanded="true"] { background: var(--ix-surface-2); border-color: var(--ix-border); color: var(--ix-text); }
.user-menu-name { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card { padding: .5rem 1rem .625rem; min-width: 14rem; max-width: 18rem; }
.user-card strong, .user-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card span { font-size: .8125rem; color: var(--ix-muted); }

.content { flex: 1 1 auto; width: 100%; max-width: 82rem; margin: 0 auto; padding: 1.5rem; }
.content:focus { outline: none; }
.app-foot { padding: 1rem 1.5rem; font-size: .75rem; color: var(--ix-muted); }

@media (max-width: 575.98px) {
    .topbar { padding: .5rem 1rem; }
    .content { padding: 1rem; }
    .app-foot { padding: 1rem; }
}

[data-bs-theme="light"] .theme-icon-light,
[data-bs-theme="dark"] .theme-icon-dark { display: none; }

/* ---------- page furniture ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.page-head > div { min-width: 0; }
.page-head h1 { font-size: 1.375rem; margin: 0; overflow-wrap: anywhere; }
.page-head p { margin: .25rem 0 0; color: var(--ix-muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.back-link { display: inline-flex; align-items: center; gap: .375rem; margin-bottom: .5rem; font-size: .875rem; text-decoration: none; }

.avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ix-grad); color: #04201c; font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.avatar-lg { width: 3.25rem; height: 3.25rem; font-size: 1.0625rem; }
.person { display: flex; align-items: center; gap: .625rem; min-width: 0; }
.person-text { min-width: 0; }
.person-text strong, .person-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-text span { font-size: .8125rem; color: var(--ix-muted); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { display: flex; align-items: flex-start; gap: .875rem; padding: 1.125rem; background: var(--ix-surface); border: 1px solid var(--ix-border); border-radius: .75rem; box-shadow: var(--ix-shadow); color: inherit; text-decoration: none; min-width: 0; }
a.stat:hover { border-color: var(--ix-accent); color: inherit; }
.stat-icon { display: grid; place-items: center; flex: 0 0 auto; width: 2.5rem; height: 2.5rem; border-radius: .625rem; background: var(--ix-accent-soft); color: var(--ix-accent); font-size: 1.125rem; }
.stat-icon.is-warn { background: rgba(255, 193, 7, .16); color: #b98900; }
.stat-body { min-width: 0; }
.stat-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ix-muted); }
.stat-value { font-size: 1.375rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.stat-sub { font-size: .8125rem; color: var(--ix-muted); }

.kv { display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); gap: .625rem 1rem; margin: 0; }
.kv dt { font-weight: 500; color: var(--ix-muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .kv { grid-template-columns: minmax(0, 1fr); gap: .125rem; }
    .kv dd { margin-bottom: .625rem; }
}

.empty { padding: 2.5rem 1rem; text-align: center; color: var(--ix-muted); }
.empty .bi { display: block; font-size: 2rem; margin-bottom: .5rem; opacity: .6; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: flex-start; gap: .625rem; padding: .625rem 0; border-bottom: 1px solid var(--ix-border); }
.checklist li:last-child { border-bottom: 0; padding-bottom: 0; }
.checklist li:first-child { padding-top: 0; }
.checklist .bi { flex: 0 0 auto; margin-top: .15rem; font-size: 1.0625rem; }
.checklist .is-done { color: #198754; }
.checklist .is-todo { color: #c98a00; }
.checklist .is-bad { color: #dc3545; }
.checklist small { display: block; color: var(--ix-muted); }

.module-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .75rem; }
.module { display: flex; gap: .75rem; padding: .875rem; border: 1px solid var(--ix-border); border-radius: .625rem; background: var(--ix-surface-2); min-width: 0; }
.module .bi { font-size: 1.25rem; color: var(--ix-muted); }
.module.is-live .bi { color: var(--ix-accent); }
.module-body { min-width: 0; }
.module-body strong { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.module-body span { display: block; font-size: .8125rem; color: var(--ix-muted); }

.secret { display: block; padding: .75rem 1rem; border: 1px dashed var(--ix-accent); border-radius: .5rem; background: var(--ix-accent-soft); color: var(--ix-text); font-family: var(--bs-font-monospace); font-size: 1.0625rem; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }
.code-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .75rem; margin: 0; padding: 1rem; list-style: none; border: 1px dashed var(--ix-accent); border-radius: .5rem; background: var(--ix-accent-soft); font-family: var(--bs-font-monospace); font-size: 1rem; letter-spacing: .05em; }
.qr { display: inline-block; padding: .75rem; border-radius: .75rem; background: #ffffff; border: 1px solid var(--ix-border); line-height: 0; }
.qr img { width: 12.5rem; height: 12.5rem; image-rendering: pixelated; }
.otp-input { max-width: 14rem; font-family: var(--bs-font-monospace); font-size: 1.25rem; letter-spacing: .3em; text-align: center; }
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps > li { position: relative; padding: 0 0 1.25rem 2.75rem; }
.steps > li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 1.875rem; height: 1.875rem; border-radius: 50%; background: var(--ix-accent-soft); color: var(--ix-accent); font-weight: 700; font-size: .875rem; }
.steps > li:last-child { padding-bottom: 0; }

.perm-group { border: 1px solid var(--ix-border); border-radius: .625rem; overflow: hidden; }
.perm-group + .perm-group { margin-top: 1rem; }
.perm-group-head { padding: .625rem 1rem; background: var(--ix-surface-2); border-bottom: 1px solid var(--ix-border); font-weight: 600; }
.perm-row { display: flex; align-items: flex-start; gap: .75rem; padding: .625rem 1rem; border-bottom: 1px solid var(--ix-border); }
.perm-row:last-child { border-bottom: 0; }
.perm-row .form-check-input { margin-top: .2rem; flex: 0 0 auto; }
.perm-row label { min-width: 0; }
.perm-row code { display: block; color: var(--ix-muted); }
.perm-row.is-locked { opacity: .6; }

.diff-old { color: #b02a37; text-decoration: line-through; overflow-wrap: anywhere; }
.diff-new { color: #146c43; overflow-wrap: anywhere; }
[data-bs-theme="dark"] .diff-old { color: #ff8b95; }
[data-bs-theme="dark"] .diff-new { color: #6fdc9f; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.filter-bar > * { min-width: 0; }
.filter-bar .filter-grow { flex: 1 1 14rem; }
.filter-bar .filter-fixed { flex: 0 1 11rem; }
.table-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: .875rem 1.125rem; border-top: 1px solid var(--ix-border); }
.cell-wrap { overflow-wrap: anywhere; min-width: 10rem; }
.nowrap { white-space: nowrap; }

/* ---------- signed-out pages ---------- */
/* no-repeat: the body's background is painted across the whole page but sized to one
   screen (html is 100% high), so on a page taller than the screen, such as the
   installer, the glow would otherwise tile and show again every screen height. */
.guest { display: grid; place-items: center; min-height: 100vh; padding: 2rem 1rem; background: radial-gradient(60rem 30rem at 50% -10%, var(--ix-accent-soft), transparent 70%) no-repeat, var(--ix-bg); }
.guest-wrap { width: 100%; max-width: 26rem; }
.guest-wrap.is-wide { max-width: 44rem; }
.guest-brand { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-bottom: 1.5rem; font-size: 1.125rem; font-weight: 600; color: var(--ix-text); }
.guest-brand img { width: 2.5rem; height: 2.5rem; border-radius: .625rem; }
.guest-card { --bs-card-spacer-x: 1.75rem; --bs-card-spacer-y: 1.75rem; }
.guest-card h1 { font-size: 1.25rem; margin-bottom: .375rem; }
.guest-lead { color: var(--ix-muted); margin-bottom: 1.25rem; }
.guest-foot { margin-top: 1.25rem; text-align: center; font-size: .8125rem; color: var(--ix-muted); }
.guest-theme { position: fixed; top: .75rem; right: .75rem; }
.error-code { font-size: 3rem; font-weight: 700; line-height: 1; background: var(--ix-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
    .sidebar, .topbar, .app-foot, .page-actions, .no-print { display: none !important; }
    .content { max-width: none; padding: 0; }
    .card { box-shadow: none; }
}
