/* =============================================================================
   dp-look.css — what makes the Drawing Portal look like itself and not the ERP
   (owner 2026-10-16): the "Blueprint" surface, slim scrollbars everywhere, and
   the drafting-slip notes (dp-toast.js). Loaded last, on every page and the
   sign-in page. The Theme Studio still offers every ERP look on top of this.
   ============================================================================= */

/* ---------------------------------------------------------------- Blueprint surface: drafting paper, a faint grid */
html[data-aira-surface="drafting"] { --aira-page: #e9f0f8; --aira-card: #fcfdff; --aira-line: #d6e1ee; --aira-rail: #f1f5fb; --aira-cap: #f2f6fc; }
html:not([data-bs-theme="dark"])[data-aira-surface="drafting"] body {
    background:
        linear-gradient(rgba(11, 105, 183, .045) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(90deg, rgba(11, 105, 183, .045) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(rgba(11, 105, 183, .07) 1px, transparent 1px) 0 0 / 120px 120px,
        linear-gradient(90deg, rgba(11, 105, 183, .07) 1px, transparent 1px) 0 0 / 120px 120px,
        radial-gradient(1200px 600px at 100% -10%, rgba(11, 105, 183, .08), transparent 60%),
        var(--aira-page);
    background-attachment: fixed;
}
/* cards sit on the paper like sheets: a hair line and a soft drop */
html:not([data-bs-theme="dark"])[data-aira-surface="drafting"] .card { box-shadow: 0 1px 0 rgba(11, 105, 183, .06), 0 14px 30px -26px rgba(11, 60, 110, .55); }

/* ---------------------------------------------------------------- slim scrollbars, the whole application */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--phoenix-primary, #0b69b7) 38%, transparent) transparent; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--phoenix-primary, #0b69b7) 34%, transparent); border-radius: 99px; border: 1px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--phoenix-primary, #0b69b7) 62%, transparent); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
/* the template's own scroll areas (menu, panels) */
.simplebar-scrollbar::before { width: 5px; left: 50%; transform: translateX(-50%); background: color-mix(in srgb, var(--phoenix-primary, #0b69b7) 45%, transparent); border-radius: 99px; }
.simplebar-track.simplebar-vertical { width: 9px; }
.simplebar-track.simplebar-horizontal { height: 9px; }

/* ---------------------------------------------------------------- drafting-slip notes (dp-toast.js) */
.dpt-tray { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 2100; display: flex; flex-direction: column; gap: .6rem;
    width: min(390px, calc(100vw - 2rem)); pointer-events: none; }
.dpt {
    --k: #0b69b7; --k-ink: #0b4f8a; --dpt-bg: #ffffff; --dpt-line: rgba(15, 40, 70, .1); --dpt-text: #1b2433; --dpt-muted: #6b7a90;
    position: relative; pointer-events: auto; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; min-height: 64px;
    background: var(--dpt-bg); border: 1px solid var(--dpt-line); border-radius: 14px; overflow: hidden; color: var(--dpt-text);
    box-shadow: 0 22px 44px -22px rgba(8, 30, 60, .55), 0 2px 6px rgba(8, 30, 60, .07);
    font-family: inherit; opacity: 0; transform: translateX(28px);
    transition: opacity .22s ease, transform .32s cubic-bezier(.2, .9, .25, 1.15);
}
.dpt.is-in { opacity: 1; transform: none; }
.dpt.is-out { opacity: 0; transform: translateX(28px) scale(.97); transition-duration: .2s; }
.dpt.is-success { --k: #0f9d6b; --k-ink: #087150; }
.dpt.is-danger { --k: #d6404a; --k-ink: #b42a34; }
.dpt.is-warning { --k: #d98e04; --k-ink: #9a6400; }
.dpt.is-info { --k: var(--phoenix-primary, #0b69b7); --k-ink: var(--phoenix-primary, #0b4f8a); }

/* the colour strip: blueprint grid, drafting corner marks, the symbol */
.dpt-edge { position: relative; display: grid; place-items: center; color: #fff;
    background:
        linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px) 0 0 / 8px 8px,
        linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px) 0 0 / 8px 8px,
        linear-gradient(160deg, color-mix(in srgb, var(--k) 82%, #fff), var(--k) 55%, color-mix(in srgb, var(--k) 80%, #000)); }
.dpt-edge::before, .dpt-edge::after { content: ""; position: absolute; width: 9px; height: 9px; border: 1.5px solid rgba(255, 255, 255, .75); }
.dpt-edge::before { top: 7px; left: 7px; border-right: 0; border-bottom: 0; }
.dpt-edge::after { bottom: 7px; right: 7px; border-left: 0; border-top: 0; }
.dpt-edge svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2)); }
.dpt.is-in .dpt-edge svg { animation: dpt-draw .5s ease .08s both; }
@keyframes dpt-draw { from { transform: scale(.4) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* the text: a title-block heading, then the message */
.dpt-body { padding: .65rem .3rem .6rem .85rem; min-width: 0; display: grid; align-content: center; }
.dpt-head { display: flex; align-items: baseline; gap: .45rem; }
.dpt-head b { font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--k-ink); }
.dpt-count { display: none; font-size: .68rem; font-weight: 800; color: #fff; background: var(--k); border-radius: 99px; padding: 0 .4rem; }
.dpt.has-count .dpt-count { display: inline-block; }
.dpt-head time { margin-left: auto; font-size: .68rem; color: var(--dpt-muted); font-variant-numeric: tabular-nums; }
.dpt-msg { margin: .18rem 0 0; font-size: .92rem; line-height: 1.38; word-break: break-word; }
.dpt-acts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.dpt-acts button { border: 1.5px solid var(--k); color: var(--k-ink); background: transparent; border-radius: 99px; padding: .15rem .75rem; font-size: .8rem; font-weight: 700; }
.dpt-acts button:hover { background: var(--k); color: #fff; }

/* the time left, drawn as a dimension line: end ticks, the line shrinking between them */
.dpt-dim { position: relative; height: 9px; margin: .5rem .2rem 0 0; }
.dpt-dim::before, .dpt-dim::after { content: ""; position: absolute; top: 0; width: 1.5px; height: 9px; background: var(--dpt-muted); opacity: .55; }
.dpt-dim::before { left: 0; }
.dpt-dim::after { right: 0; }
.dpt-dim i { position: absolute; left: 2px; right: 2px; top: 4px; height: 1.5px; background: var(--k); transform-origin: left center; animation: dpt-left linear forwards; }
.dpt-dim i::after { content: ""; position: absolute; right: -1px; top: -3px; border: 3.5px solid transparent; border-left: 5px solid var(--k); border-right: 0; }
.dpt.is-paused .dpt-dim i { animation-play-state: paused; }
@keyframes dpt-left { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.dpt-x { align-self: start; margin: .45rem .45rem 0 0; width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--dpt-muted); display: grid; place-items: center; }
.dpt-x:hover { background: color-mix(in srgb, var(--k) 12%, transparent); color: var(--k-ink); }
.dpt-x svg { width: 15px; height: 15px; }

html[data-bs-theme="dark"] .dpt { --dpt-bg: #141b27; --dpt-line: rgba(255, 255, 255, .09); --dpt-text: #e6ecf5; --dpt-muted: #8e9bb0;
    box-shadow: 0 22px 44px -18px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .03); }
html[data-bs-theme="dark"] .dpt.is-success { --k-ink: #46d39f; }
html[data-bs-theme="dark"] .dpt.is-danger { --k-ink: #ff7b83; }
html[data-bs-theme="dark"] .dpt.is-warning { --k-ink: #f6bf4f; }
html[data-bs-theme="dark"] .dpt.is-info { --k-ink: #6fb6f0; }

@media (max-width: 575.98px) {
    .dpt-tray { right: .75rem; left: .75rem; bottom: .75rem; width: auto; }
    .dpt { transform: translateY(24px); }
    .dpt.is-out { transform: translateY(24px); }
}
@media (prefers-reduced-motion: reduce) {
    .dpt, .dpt.is-out { transition: opacity .15s; transform: none; }
    .dpt.is-in .dpt-edge svg { animation: none; }
}
@media print { .dpt-tray { display: none; } }

/* ---------------------------------------------------------------- menu: a page that is still being built keeps its place */
.navbar-vertical .nav-link.is-soon { cursor: default; opacity: .55; }
.navbar-vertical .nav-link.is-soon:hover { background: none; }
.dp-soon { font-size: .6rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .2em .55em;
    background: color-mix(in srgb, var(--phoenix-primary) 14%, transparent); color: var(--phoenix-primary); }
/* the "Soon" tag never pushes the menu sideways */
.navbar-vertical .nav-link.is-soon .d-flex { flex-wrap: wrap; row-gap: .15rem; }
.navbar-vertical .navbar-vertical-content { overflow-x: hidden; }

/* notes sit at the top centre, under the top bar (owner 2026-10-17: "position keep center"); they drop in from above */
.dpt-tray { top: .75rem; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); align-items: center; }
.dpt-tray .dpt { width: 100%; transform: translateY(-18px); }
.dpt-tray .dpt.is-in { transform: none; }
.dpt-tray .dpt.is-out { transform: translateY(-14px) scale(.97); }
@media (max-width: 575.98px) {
    .dpt-tray { left: .75rem; right: .75rem; transform: none; width: auto; top: .5rem; }
}

/* ---------------------------------------------------------------- protected drawing viewer (dp-viewer.js) */
.dpv .modal-content { background: #2b3036; border: 0; border-radius: 0; }
.dpv-head { display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; background: var(--phoenix-body-bg); border-bottom: 1px solid var(--phoenix-border-color); flex-wrap: wrap; }
.dpv-title { display: grid; min-width: 0; margin-right: auto; }
.dpv-title b { font-size: 1.05rem; color: var(--phoenix-emphasis-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dpv-title small { color: var(--phoenix-tertiary-color); }
.dpv-tools { display: flex; gap: .35rem; }
.dpv-tools .btn { display: inline-flex; align-items: center; gap: .35rem; }
.dpv-tools svg { width: 1rem; height: 1rem; }
.dpv-time { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 99px; font-weight: 600; font-variant-numeric: tabular-nums;
    background: var(--phoenix-primary-bg-subtle); color: var(--phoenix-primary); }
.dpv-time svg { width: 1rem; height: 1rem; }
.dpv-time.is-low { background: var(--phoenix-danger-bg-subtle); color: var(--phoenix-danger); }
.dpv-body { position: relative; flex: 1; overflow: auto; padding: 1rem; }
.dpv-pages { display: grid; justify-items: center; gap: 1rem; }
.dpv-page { position: relative; box-shadow: 0 4px 18px rgba(0,0,0,.45); background: #fff; line-height: 0; }
.dpv-wait { color: #cfd6de; padding: 3rem; line-height: 1.5; }
.dpv.is-guarded .dpv-body { user-select: none; -webkit-user-select: none; }
.dpv.is-guarded canvas { pointer-events: none; }
.dpv-veil { position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: .3rem; text-align: center; color: #fff; cursor: pointer;
    background: rgba(20,24,28,.55); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); }
.dpv-veil svg { width: 2.4rem; height: 2.4rem; }
.dpv.is-veiled .dpv-veil { display: grid; position: fixed; top: 3.4rem; }
@media print { body.dpv-open * { display: none !important; } body.dpv-open::after { content: "Printing drawings is not allowed."; display: block; padding: 2rem; font: 16px sans-serif; } }

/* ---------------------------------------------------------------- buttons: icon + words always spaced, one standard size (owner 2026-10-17) */
.btn:has(> svg), .btn:has(> i[data-lucide]) { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn > svg.lucide { width: 1rem; height: 1rem; flex: none; }
.btn-sm > svg.lucide { width: .9rem; height: .9rem; }

/* ---------------------------------------------------------------- searchable dropdowns (dp-select.js) */
select.dps-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden; }
button.dps { display: block; width: 100%; text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
button.dps.is-empty .dps-text { color: var(--phoenix-quaternary-color, #9aa4b5); }
button.dps.is-open { border-color: var(--phoenix-primary); box-shadow: 0 0 0 3px var(--phoenix-primary-bg-subtle); }
button.dps:disabled { opacity: .6; cursor: default; }
.dps-pop { position: fixed; z-index: 2100; max-width: min(36rem, calc(100vw - 16px)); border-radius: 12px; overflow: hidden;
    background: var(--phoenix-body-bg, #fff); border: 1px solid var(--phoenix-border-color); box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .35); }
.dps-find { display: block; margin: 0; padding: .45rem; border-bottom: 1px solid var(--phoenix-border-color); }
.dps-find input { width: 100%; height: 2.1rem; padding: 0 .65rem; border-radius: 8px; border: 1px solid var(--phoenix-border-color); outline: 0;
    background: var(--phoenix-body-bg); color: var(--phoenix-emphasis-color); font-size: .88rem; }
.dps-find input:focus { border-color: var(--phoenix-primary); }
.dps-list { max-height: 17rem; overflow: auto; padding: .3rem; }
.dps-opt { padding: .42rem .65rem; border-radius: 7px; font-size: .88rem; cursor: pointer; color: var(--phoenix-emphasis-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dps-opt.is-blank { color: var(--phoenix-tertiary-color); }
.dps-opt.is-active { background: var(--phoenix-primary-bg-subtle); color: var(--phoenix-primary); }
.dps-opt.is-chosen { font-weight: 700; }
.dps-opt.is-chosen::after { content: "✓"; float: right; margin-left: .75rem; color: var(--phoenix-primary); }
.dps-opt.is-off { opacity: .45; cursor: default; }
.dps-none { padding: .6rem .65rem; font-size: .85rem; color: var(--phoenix-tertiary-color); }
button.dps.dw-chip-select, button.dps.aira-filter { display: inline-block; width: auto; min-width: 12rem; max-width: 18rem; }

/* ---------------------------------------------------------------- table header: its own band, apart from the rows (owner 2026-10-17) */
.aira-table > thead > tr > th {
    background: color-mix(in srgb, var(--phoenix-primary) 9%, var(--phoenix-body-bg, #fff)) !important;
    color: var(--phoenix-primary) !important; font-weight: 700 !important; letter-spacing: .05em;
    border-top: 0 !important; border-bottom: 2px solid color-mix(in srgb, var(--phoenix-primary) 35%, transparent) !important;
    padding-top: .7rem !important; padding-bottom: .7rem !important; white-space: nowrap;
}
.aira-table > thead > tr > th:first-child { border-top-left-radius: 10px; }
.aira-table > thead > tr > th:last-child { border-top-right-radius: 10px; }
.aira-table > tbody > tr:nth-child(even) > td { background: color-mix(in srgb, var(--phoenix-primary) 2.5%, transparent); }
html[data-bs-theme="dark"] .aira-table > thead > tr > th { background: color-mix(in srgb, var(--phoenix-primary) 18%, var(--phoenix-body-bg, #111)) !important; color: #dbeafe !important; }

/* wide tables scroll sideways again: select2.css set every .table-responsive to overflow: visible (for Select2 lists inside
   tables); our dropdowns (dp-select) and the ⋯ action sheet open on the page itself, so the scroll can come back (2026-10-17) */
.table-responsive { overflow-x: auto !important; }

/* ---------------------------------------------------------------- page header, compact (owner 2026-10-19): one slim line, whatever header style the theme picks */
html body .lnx-hero.lnx-hero { padding: .55rem .9rem !important; margin-top: 0 !important; margin-bottom: .85rem !important; border-radius: 14px !important; row-gap: .4rem; min-height: 0; }
/* one top gap on every page (2026-10-20): the title row is a .row g-3, whose -1rem top margin pulled it up to the top bar */
html body .lnx-hero.lnx-hero .lnx-title { gap: .65rem; }
html body .lnx-hero.lnx-hero .lnx-title-ico { width: 2.15rem !important; height: 2.15rem !important; border-radius: 11px !important; box-shadow: 0 6px 14px -8px rgba(var(--mod-rgb), .8) !important; }
html body .lnx-hero.lnx-hero .lnx-title-ico svg { width: 17px; height: 17px; }
html body .lnx-hero.lnx-hero .lnx-title h2 { font-size: 1.2rem !important; margin-bottom: 0 !important; line-height: 1.25; }
html body .lnx-hero.lnx-hero .lnx-title h2 + p { font-size: .8rem; margin-top: 0 !important; }
html body .lnx-hero.lnx-hero .lnx-hero-mark, html body .lnx-hero.lnx-hero .lnx-hero-art::after { display: none !important; }
html body .lnx-hero.lnx-hero .lnx-head-right-col, html body .lnx-hero.lnx-hero .lnx-head-right { gap: .45rem; }
html body .lnx-hero.lnx-hero .lnx-hero-btn { width: 1.9rem; height: 1.9rem; }
html body .lnx-hero.lnx-hero .btn { padding-top: .4rem; padding-bottom: .4rem; }
html body .lnx-hero.lnx-hero .lnx-head-right-col { flex-direction: row-reverse !important; align-items: center !important; }
html body .lnx-hero.lnx-hero .lnx-title > div > :not(h2):not(p) { margin-bottom: 0 !important; }
html body .lnx-hero.lnx-hero .lnx-crumbs { display: none !important; } /* the page name is the title right below it */
html body .lnx-hero.lnx-hero .lnx-chips { margin-top: 0; }
html body .lnx-hero.lnx-hero .lnx-title-row { gap: .5rem; }
/* each header style keeps its own shape, only slimmer */
html[data-aira-header="ribbon"] body .lnx-hero.lnx-hero { padding: .35rem .35rem .75rem !important; border-radius: 0 !important; }
html[data-aira-header="minimal"] body .lnx-hero.lnx-hero { padding: 0 0 .6rem !important; border-radius: 0 !important; }
html[data-aira-header="ledger"] body .lnx-hero.lnx-hero { padding: .5rem .2rem .6rem !important; border-radius: 0 !important; }
html[data-aira-header="executive"] body .lnx-hero.lnx-hero { padding-left: 1.2rem !important; }
html[data-aira-header="split"] body .lnx-hero.lnx-hero {
    background: linear-gradient(90deg, var(--mod) 0, color-mix(in srgb, var(--mod) 78%, #000) 4rem, var(--phoenix-emphasis-bg, #fff) 4rem) !important; }
html[data-aira-header="split"] body .lnx-hero.lnx-hero .lnx-hero-art { width: 4rem; }
html[data-aira-header="split"] body .lnx-hero.lnx-hero .lnx-title-ico { margin-right: 1.1rem; }
html body .lnx-hero.lnx-hero > * { margin-top: 0 !important; } /* the page's .row g-3 pushed everything 1rem down: keep it in the middle */

/* ---------------------------------------------------------------- the reason box (AppJs/Common/dp-reason.js), 2026-10-19 */
.dpr { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: start center; padding: 9vh 16px 16px;
    background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .16s ease; }
.dpr.is-in { opacity: 1; } .dpr.is-out { opacity: 0; }
.dpr-card { width: min(520px, 100%); border-radius: 18px; overflow: hidden; background: var(--phoenix-emphasis-bg, #fff);
    border: 1px solid var(--phoenix-border-color); box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .45);
    transform: translateY(-10px) scale(.98); transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.dpr.is-in .dpr-card { transform: none; }
.dpr-head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem .85rem; border-bottom: 1px solid var(--phoenix-border-color);
    background: linear-gradient(180deg, color-mix(in srgb, var(--phoenix-primary) 7%, transparent), transparent); }
.dpr-ico { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; color: #fff;
    background: linear-gradient(145deg, color-mix(in srgb, var(--phoenix-primary) 75%, #fff), var(--phoenix-primary)); box-shadow: 0 8px 16px -8px var(--phoenix-primary); }
.dpr-ico.is-dl { background: linear-gradient(145deg, #34d399, #059669); box-shadow: 0 8px 16px -8px #059669; }
.dpr-title { min-width: 0; flex: 1; display: grid; gap: .1rem; }
.dpr-title b { font-size: 1.05rem; color: var(--phoenix-emphasis-color); }
.dpr-title span { font-size: .8rem; color: var(--phoenix-tertiary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dpr-x { flex: none; border: 0; background: none; color: var(--phoenix-tertiary-color); width: 2rem; height: 2rem; border-radius: 8px; display: grid; place-items: center; }
.dpr-x:hover { background: var(--phoenix-secondary-bg); color: var(--phoenix-emphasis-color); }
.dpr-body { padding: .9rem 1.1rem .4rem; }
.dpr-label { display: block; margin: .35rem 0 .4rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--phoenix-tertiary-color); }
.dpr-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .55rem; }
.dpr-chip { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; padding: .38rem .75rem; border-radius: 99px; font-size: .82rem;
    border: 1px solid var(--phoenix-border-color); background: var(--phoenix-body-bg); color: var(--phoenix-emphasis-color); cursor: pointer; }
.dpr-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dpr-chip:hover { border-color: var(--phoenix-primary); color: var(--phoenix-primary); }
.dpr-chip.is-on { background: var(--phoenix-primary); border-color: var(--phoenix-primary); color: #fff; }
.dpr-chip.is-last { border-style: dashed; }
.dpr-text { width: 100%; resize: none; padding: .65rem .8rem; border-radius: 12px; font-size: .95rem; outline: 0;
    border: 1.5px solid var(--phoenix-border-color); background: var(--phoenix-body-bg); color: var(--phoenix-emphasis-color); }
.dpr-text:focus { border-color: var(--phoenix-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--phoenix-primary) 15%, transparent); }
.dpr-err { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; padding: .45rem .65rem; border-radius: 10px; font-size: .82rem;
    color: #b42318; background: rgba(240, 68, 56, .09); }
.dpr-note { display: flex; align-items: center; gap: .35rem; margin: .6rem 0 .3rem; font-size: .76rem; color: var(--phoenix-tertiary-color); }
.dpr-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .8rem 1.1rem; border-top: 1px solid var(--phoenix-border-color); background: var(--phoenix-body-highlight-bg, transparent); }
.dpr-foot .btn { display: inline-flex; align-items: center; gap: .4rem; }
html[data-bs-theme="dark"] .dpr-err { color: #fda29b; }
@media (max-width: 575.98px) { .dpr { place-items: end center; padding: 0; } .dpr-card { border-radius: 18px 18px 0 0; } }

/* ---------------------------------------------------------------- notes, dark slate (owner 2026-10-19 "better ui, in dark layout")
   One look in both themes: dark card, a round coloured sign, white text, the action as a filled pill, time left as a thin line along the bottom. */
.dpt {
    --dpt-bg: rgba(17, 24, 39, .97); --dpt-line: rgba(255, 255, 255, .08); --dpt-text: #f3f6fb; --dpt-muted: #9aa8bd;
    grid-template-columns: 58px minmax(0, 1fr) auto; min-height: 58px; border-radius: 16px; backdrop-filter: blur(10px);
    box-shadow: 0 24px 48px -20px rgba(2, 8, 23, .65), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}
html[data-bs-theme="dark"] .dpt { --dpt-bg: rgba(30, 38, 54, .97); --dpt-line: rgba(255, 255, 255, .1); --dpt-text: #f3f6fb; --dpt-muted: #a3b0c4; }
.dpt.is-success { --k: #22c55e; --k-ink: #4ade80; }
.dpt.is-danger { --k: #ef4444; --k-ink: #f87171; }
.dpt.is-warning { --k: #f59e0b; --k-ink: #fbbf24; }
.dpt.is-info { --k: #3b82f6; --k-ink: #7cb3ff; }
html[data-bs-theme="dark"] .dpt.is-success { --k-ink: #4ade80; }
html[data-bs-theme="dark"] .dpt.is-danger { --k-ink: #f87171; }
html[data-bs-theme="dark"] .dpt.is-warning { --k-ink: #fbbf24; }
html[data-bs-theme="dark"] .dpt.is-info { --k-ink: #7cb3ff; }
.dpt-edge { align-self: center; justify-self: end; width: 38px; height: 38px; border-radius: 50%; color: var(--k-ink);
    background: color-mix(in srgb, var(--k) 20%, transparent) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--k) 9%, transparent); }
.dpt-edge::before, .dpt-edge::after { display: none; }
.dpt-edge svg { width: 19px; height: 19px; filter: none; }
.dpt-body { padding: .7rem .4rem .8rem .8rem; }
.dpt-head b { font-size: .66rem; letter-spacing: .12em; color: var(--k-ink); }
.dpt-head time { color: var(--dpt-muted); }
.dpt-msg { color: var(--dpt-text); font-size: .9rem; }
.dpt-acts { margin-top: .55rem; }
.dpt-acts button { border: 0; background: var(--k); color: #fff; padding: .28rem .9rem; border-radius: 99px; font-size: .78rem; }
.dpt-acts button:hover { background: color-mix(in srgb, var(--k) 85%, #fff); color: #fff; }
.dpt-x { color: var(--dpt-muted); margin: .5rem .5rem 0 0; }
.dpt-x:hover { background: rgba(255, 255, 255, .08); color: #fff; }
/* time left: a thin line along the whole bottom edge */
.dpt-dim { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; margin: 0; }
.dpt-dim::before, .dpt-dim::after { display: none; }
.dpt-dim i { left: 0; right: 0; top: 0; height: 3px; opacity: .85; }
.dpt-dim i::after { display: none; }

/* ---------------------------------------------------------------- notes, one compact line (owner 2026-10-19 "still not proper")
   Sign · message · action · ×, just under the top bar (never over the tabs). The sign says done / not done, so no heading or time. */
.dpt-tray { top: calc(var(--phoenix-navbar-top-height, 4rem) + .5rem); width: min(520px, calc(100vw - 2rem)); }
.dpt { grid-template-columns: 52px minmax(0, 1fr) auto; min-height: 54px; border-radius: 14px; align-items: center; }
.dpt-edge { justify-self: center; width: 32px; height: 32px; box-shadow: none; }
.dpt-edge svg { width: 17px; height: 17px; }
.dpt-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dpt.has-count .dpt-head { position: static; width: auto; height: auto; clip: auto; overflow: visible; order: 3; }
.dpt-head time, .dpt.has-count .dpt-head b { display: none; }
.dpt-body { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .7rem .2rem .75rem 0; }
.dpt-msg { margin: 0; flex: 1 1 12rem; font-size: .92rem; font-weight: 600; line-height: 1.35; }
.dpt-acts { margin: 0; flex: none; }
.dpt-acts button { padding: .32rem .95rem; font-size: .8rem; }
.dpt-x { align-self: center; margin: 0 .55rem 0 .1rem; }
@media (max-width: 575.98px) { .dpt-tray { top: calc(var(--phoenix-navbar-top-height, 4rem) + .4rem); } }
.dpt-tray { padding: 0 !important; margin: 0 !important; }   /* the theme pads every <section> by 3.5rem: that pushed the notes down the page */

/* ---------------------------------------------------------------- viewer, harder to copy (2026-10-19, Sql/Phase4/10_viewer_guard.sql) */
.dpv .modal-content { position: relative; }
.dpv-wm { position: absolute; left: 0; right: 0; bottom: 0; top: 3.4rem; z-index: 3; pointer-events: none; background-repeat: repeat;
    animation: dpv-drift 40s linear infinite; }
@keyframes dpv-drift { from { background-position: 0 0; } to { background-position: 460px 230px; } }
@media (prefers-reduced-motion: reduce) { .dpv-wm { animation: none; } }
.dpv.is-veiled .dpv-wm { display: none; }
.dpv-veil { z-index: 4; }
.dpv-code { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 99px; font-weight: 700; font-size: .8rem; letter-spacing: .06em;
    font-variant-numeric: tabular-nums; background: rgba(200, 30, 40, .08); color: #b42318; border: 1px dashed rgba(200, 30, 40, .35); }
.dpv-code svg { width: .95rem; height: .95rem; }
html[data-bs-theme="dark"] .dpv-code { color: #fda29b; background: rgba(240, 68, 56, .12); }
/* the veiled drawing is gone, not just blurred: nothing to capture behind the veil */
.dpv.is-veiled .dpv-pages { visibility: hidden; }
.dpv.is-guarded .dpv-page { -webkit-user-drag: none; -webkit-touch-callout: none; }
@media (max-width: 575.98px) { .dpv-code span { font-size: .72rem; } }

/* ---------------------------------------------------------------- notes, light and tinted (owner 2026-10-19 "bg looks too dark")
   Light theme: a pale card in the note's colour, a solid colour bar on the left, dark text, a solid round sign.
   Dark theme: a dark card with the same bar. Sits a little higher, on the edge of the top bar. */
.dpt-tray { top: calc(var(--phoenix-navbar-top-height, 4rem) - .35rem); }
.dpt {
    --dpt-bg: color-mix(in srgb, var(--k) 7%, #ffffff); --dpt-line: color-mix(in srgb, var(--k) 28%, transparent);
    --dpt-text: #1f2937; --dpt-muted: #64748b;
    border: 1px solid var(--dpt-line); border-left: 5px solid var(--k); border-radius: 12px; backdrop-filter: none;
    box-shadow: 0 16px 34px -18px rgba(15, 23, 42, .35), 0 2px 6px rgba(15, 23, 42, .06);
}
.dpt.is-success { --k: #16a34a; --k-ink: #15803d; }
.dpt.is-danger { --k: #dc2626; --k-ink: #b91c1c; }
.dpt.is-warning { --k: #d97706; --k-ink: #b45309; }
.dpt.is-info { --k: #2563eb; --k-ink: #1d4ed8; }
.dpt-edge { width: 30px; height: 30px; color: #fff; background: var(--k) !important; box-shadow: 0 4px 10px -4px var(--k); }
.dpt-msg { color: var(--dpt-text); font-weight: 600; }
.dpt-x { color: var(--dpt-muted); }
.dpt-x:hover { background: color-mix(in srgb, var(--k) 12%, transparent); color: var(--k-ink); }
.dpt-acts button { background: var(--k); color: #fff; }
.dpt-dim i { opacity: .6; }
html[data-bs-theme="dark"] .dpt { --dpt-bg: #1e2636; --dpt-line: rgba(255, 255, 255, .1); --dpt-text: #f1f5f9; --dpt-muted: #94a3b8;
    box-shadow: 0 18px 36px -16px rgba(0, 0, 0, .7); }
html[data-bs-theme="dark"] .dpt.is-success { --k-ink: #4ade80; }
html[data-bs-theme="dark"] .dpt.is-danger { --k-ink: #f87171; }
html[data-bs-theme="dark"] .dpt.is-warning { --k-ink: #fbbf24; }
html[data-bs-theme="dark"] .dpt.is-info { --k-ink: #93c5fd; }
@media (max-width: 575.98px) { .dpt-tray { top: calc(var(--phoenix-navbar-top-height, 4rem) - .25rem); } }
/* the hidden screen says why, and has one clear button */
.dpv-veil small { max-width: 26rem; font-size: .88rem; color: rgba(255, 255, 255, .78); }
.dpv-veil small:empty { display: none; }
.dpv-veil .dpv-veil-btn { margin-top: .7rem; padding: .55rem 1.3rem; border-radius: 99px; font-weight: 700; background: #fff; color: #1f2937; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .6); }
.dpv-veil:hover .dpv-veil-btn { background: #e0ecff; }
/* the one-time code box (DpReason.otp) */
.dpr-ico.is-otp { background: linear-gradient(145deg, #4ade80, #16a34a); box-shadow: 0 8px 16px -8px #16a34a; }
.dpr-sent { margin: 0 0 .8rem; font-size: .88rem; color: var(--phoenix-body-color); }
.dpr-dev { display: inline-block; margin-top: .3rem; padding: .1rem .5rem; border-radius: 6px; background: rgba(245, 158, 11, .14); color: #92400e; }
.dpr-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; max-width: 22rem; }
.dpr-otp input { width: 100%; min-width: 0; padding: 0; height: 3.2rem; text-align: center; font-size: 1.4rem; font-weight: 700; border-radius: 12px; outline: 0;
    border: 1.5px solid var(--phoenix-border-color); background: var(--phoenix-body-bg); color: var(--phoenix-emphasis-color); }
.dpr-otp input:focus { border-color: var(--phoenix-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--phoenix-primary) 15%, transparent); }
.dpr-link { border: 0; background: none; padding: 0; color: var(--phoenix-primary); font-weight: 600; text-decoration: underline; }
.dpr-link:disabled { color: var(--phoenix-tertiary-color); text-decoration: none; }

/* profile menu: Sign out across the whole menu, never squeezed into a corner; no empty list above it (a viewer has no other items) */
.aira-pm-signout { width: calc(100% - .8rem) !important; margin: .45rem .4rem .45rem !important; justify-content: center; font-weight: 600; }
.aira-pm-list:not(:has(> :not(.d-none))) { display: none; }

/* DpCopy: the small copy button next to a drawing no — faint until the row is pointed at (always shown on touch) */
.dp-copy { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; margin-left: .3rem; padding: 0; vertical-align: -.3em;
    border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--phoenix-tertiary-color); opacity: .35; transition: opacity .15s, background .15s; }
.dp-copy svg { width: .85rem; height: .85rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
tr:hover .dp-copy, .lk-card:hover .dp-copy, .bm-row:hover .dp-copy, .be-ln:hover .dp-copy, .dp-copy:focus-visible, h5:hover .dp-copy { opacity: 1; }
.dp-copy:hover { background: rgba(var(--phoenix-primary-rgb), .1); border-color: rgba(var(--phoenix-primary-rgb), .25); color: var(--phoenix-primary); }
.dp-copy.is-done { opacity: 1; color: var(--phoenix-success); }
@media (hover: none) { .dp-copy { opacity: .8; } }

/* =============================================================================
   Smooth motion for the whole portal (owner 2026-10-19: "smooth animation missing from whole project").
   lnx-motion.js already lets the page rise in and buttons ripple; this adds the rest: every state change eases
   (hover, focus, chips, switches), windows and menus glide in, lists fade in after a search / page change,
   BOM rows open smoothly, tabs cross-fade, buttons give a little when pressed.
   Everyone gets it. Under the computer's "reduce motion" (Windows: Animation effects off) the same, but as fades only — no sliding,
   lifting or scaling. Motion switched off in the customizer (html.lnx-still) stops all of it.
   ============================================================================= */
:root { --dp-ease: cubic-bezier(.22, 1, .36, 1); --dp-ease-in: cubic-bezier(.4, 0, 1, 1); }

html:not(.lnx-still) { scroll-behavior: smooth; }
@media all {

    /* every small state change eases instead of jumping */
    html:not(.lnx-still) :is(.btn, .form-control, .form-select, .form-check-input, .page-link, .nav-link, .aira-badge, .dw-chip, .bm-chip, .bm-exp,
        .be-way, .be-seg button, .be-typ, .be-x, .bm-pick, .lk-icon, .lk-open, .dp-copy, .aira-name, .bm-no, .pp-rolecard, .pp-tick, .ss-switch span,
        .dw-ib, .dpt-acts button, .bs-opt, .fe-zoom button, .fe-mode-pane, .lk-flag, .dw-win-pill) {
        transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .22s ease, opacity .18s ease, transform .18s var(--dp-ease);
    }
    html:not(.lnx-still) :is(.btn, .be-way, .bm-chip, .dw-chip, .bs-opt, .pp-rolecard, .lk-open, .bm-exp, .dp-copy):active:not(:disabled) { transform: scale(.97); }
    html:not(.lnx-still) :is(tbody tr, .bm-row, .be-ln, .be-maprow, .pp-um, .rl-item, .lk-card) { transition: background-color .16s ease, box-shadow .2s ease, transform .2s var(--dp-ease), border-color .2s ease; }
    html:not(.lnx-still) .card:not(.lk-card) { transition: box-shadow .25s ease, border-color .25s ease; }

    /* windows glide up and settle; the dark backdrop fades */
    html:not(.lnx-still) .modal.fade .modal-dialog { transform: translateY(16px) scale(.985); opacity: 0; transition: transform .34s var(--dp-ease), opacity .24s ease; }
    html:not(.lnx-still) .modal.show .modal-dialog { transform: none; opacity: 1; }
    html:not(.lnx-still) .modal-backdrop.fade { transition: opacity .28s ease; }

    /* menus, pick lists and pop-ups drop in */
    html:not(.lnx-still) :is(.dropdown-menu.show, .bm-picklist:not([hidden]), .dps-menu, .select2-dropdown) { animation: dp-pop .2s var(--dp-ease) both; transform-origin: top center; }

    /* a list fills in softly after loading, searching or turning a page */
    html:not(.lnx-still) :is(.aira-table tbody tr, .lk-card, .bm-rows .bm-row, .pp-um, .rl-item) { animation: dp-in .32s var(--dp-ease) both; }

    /* a BOM opening under its row, a folded group opening, a bulk bar appearing */
    /* a BOM drawer opening / closing: bom-list.js animates its height (no CSS animation here, so the two do not fight) */
    html:not(.lnx-still) .bm-exp svg { transition: transform .26s var(--dp-ease); }
    html:not(.lnx-still) .be-grp.is-opening .be-grp-b { animation: dp-open .3s var(--dp-ease) both; }      /* only the group just opened (bom-entry.js) */
    html:not(.lnx-still) .be-grp-h button svg { transition: transform .26s var(--dp-ease); }
    html:not(.lnx-still) :is(.be-bulk:not([hidden]), .bm-selbar:not([hidden]), .be-draft:not([hidden]), .pp-bar.is-dirty) { animation: dp-slide .26s var(--dp-ease) both; }

    /* tabs and switch panes cross-fade */
    html:not(.lnx-still) :is(.be-pane:not([hidden]), .dw-tab:not([hidden]), .tab-pane.active, .pp-pane:not([hidden]), [data-pane]:not([hidden])) { animation: dp-fade .26s ease both; }

    /* cards you can pick lift a little */
    html:not(.lnx-still) .be-way:hover, html:not(.lnx-still) .pp-rolecard:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -14px rgba(15, 23, 42, .45); }

    /* numbers that change (counts, totals) settle in */
    html:not(.lnx-still) :is(.be-stat b, .dw-chip b, .bm-chip b) { transition: color .2s ease; }
}

@keyframes dp-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes dp-in { from { opacity: 0; transform: translateY(5px); } }
@keyframes dp-open { from { opacity: 0; transform: translateY(-8px); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes dp-slide { from { opacity: 0; transform: translateY(-6px); } }
@keyframes dp-fade { from { opacity: 0; } }

/* the computer asks for less motion: keep the smooth fades, drop every movement */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    @keyframes dp-pop { from { opacity: 0; } }
    @keyframes dp-in { from { opacity: 0; } }
    @keyframes dp-open { from { opacity: 0; } }
    @keyframes dp-slide { from { opacity: 0; } }
    @keyframes lnx-rise { from { opacity: 0; } }
    @keyframes lnx-pop-in { from { opacity: 0; } }
    @keyframes lnx-swal-in { from { opacity: 0; } }
    @keyframes lnx-swal-out { to { opacity: 0; } }
    html:not(.lnx-still) .modal.fade .modal-dialog { transform: none; }
    html:not(.lnx-still) :is(.btn, .be-way, .bm-chip, .dw-chip, .bs-opt, .pp-rolecard, .lk-open, .bm-exp, .dp-copy):active:not(:disabled),
    html:not(.lnx-still) .be-way:hover, html:not(.lnx-still) .pp-rolecard:hover, html:not(.lnx-still) .lk-card:hover { transform: none; }
}

/* the BOM drawer while its drawings load: a few soft bars (the drawer grows from this shape to the full list) */
.bm-skel { display: grid; gap: .55rem; padding: .7rem .35rem .4rem; }
.bm-skel i { display: block; height: .85rem; border-radius: 6px; background: linear-gradient(90deg, var(--phoenix-secondary-bg) 20%, color-mix(in srgb, var(--phoenix-primary) 10%, var(--phoenix-secondary-bg)) 50%, var(--phoenix-secondary-bg) 80%);
    background-size: 220% 100%; animation: dp-shimmer 1.1s linear infinite; }
.bm-skel i:nth-child(2) { width: 86%; } .bm-skel i:nth-child(3) { width: 92%; } .bm-skel i:nth-child(4) { width: 70%; }
@keyframes dp-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
html.lnx-still .bm-skel i { animation: none; }
@media (prefers-reduced-motion: reduce) { .bm-skel i { animation: none; } }
