.printer-card .card-header { font-weight: 600; }
.swatch { display:inline-block; width:.9rem; height:.9rem; border-radius:50%; border:1px solid #999; vertical-align:middle; }
.th-table td, .th-table th { padding: .15rem .35rem; font-size: .85rem; }
.th-active { background: #fff3cd; }
.brand-logo{height:22px;width:auto;max-width:90px;object-fit:contain}
/* Layersake watermark: SVG preferred, PNG fallback for old browsers. */
body::before{content:"";position:fixed;inset:0;background:url("../img/layersake.svg") no-repeat center center;background-size:55vmin;opacity:.16;pointer-events:none;z-index:-1}
body{position:relative;z-index:0}
/* ---- Dark theme (Bootstrap 5.3 data-bs-theme) ---- */
[data-bs-theme=dark] body::before{filter:grayscale(1) brightness(.35);opacity:.12}
[data-bs-theme=dark] .brand-bambulab{filter:invert(1) brightness(1.6)}
[data-bs-theme=dark] .th-active{background:rgba(255,193,7,.18)}
[data-bs-theme=dark] .swatch{border-color:#ccc}
/* Slightly translucent surfaces so the watermark shows through but text stays readable. */
.card{--bs-card-bg:rgba(var(--bs-body-bg-rgb),.92)}
.card-header,.card-footer{--bs-card-cap-bg:rgba(var(--bs-emphasis-color-rgb),.04)}
/* Tabbed panel in page body; tabs scroll horizontally on small screens. */
.pf-panel{--bs-card-bg:rgba(var(--bs-body-bg-rgb),.80)}
.pf-panel > .card-header{--bs-card-cap-bg:rgba(var(--bs-tertiary-bg-rgb),.85)}
.pf-tabs{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.pf-tabs .nav-link{white-space:nowrap;color:var(--bs-secondary-color)}
.pf-tabs .nav-link:hover{color:var(--bs-emphasis-color)}
.pf-tabs .nav-link.active{color:var(--bs-emphasis-color);font-weight:600;background:var(--bs-body-bg)}
@media (max-width:575.98px){.pf-panel > .card-body{padding:.75rem}}

/* Graffiti brand text (font bundled locally, SIL OFL) */
/* Header wordmark: identical to the public /share page title (same font stack, size, weight, colors) in both themes */
.pf-topbar{background:#111827;border-bottom:1px solid #1f2937;min-height:52px}
.pf-wordmark{font-family:"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-weight:700;letter-spacing:.5px;font-size:18px;color:#e7eaf0;text-decoration:none;line-height:1;padding:14px 0}
.pf-wordmark:hover,.pf-wordmark:focus{color:#fff}.pf-wordmark b{color:#a3e635;font-weight:700}
header.pf-topbar{padding:0 20px;display:flex;align-items:center}
/* Sign-in pages */
.pf-auth-wrap{max-width:26rem;margin:6vh auto 2rem;padding:0 1rem}
.pf-auth-card{border-radius:14px}

/* Settings side menu (one view at a time) */
#alertCfg .pf-sec { max-width: 56rem; }
@media (min-width: 992px) { .pf-setnav { position: sticky; top: 1rem; } }
@media (max-width: 991.98px) { .pf-setnav { position: sticky; top: 0; z-index: 5; background: var(--bs-modal-bg, var(--bs-body-bg)); } }

/* Dashboard card refresh spinner */
.pf-spin { display: inline-block; animation: pf-spin .8s linear infinite; }
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* Error log: newly appeared rows flash briefly */
@keyframes pf-new-row { from { background-color: rgba(255, 193, 7, .55); } to { background-color: transparent; } }
tr.pf-new > td { animation: pf-new-row 2.5s ease-out; }

/* ===== H2C-style dashboard cards (preview branch h2c-preview). Cards are dark in both light and dark themes. ===== */
.h2c-card { --h2c-bg:#121212; --h2c-panel:#232323; --h2c-panel2:#2c2c2c; --h2c-label:#9a9a9a; --h2c-text:#f2f2f2; --h2c-lime:#a3e635;
  background:var(--h2c-bg); color:var(--h2c-text); border:0; border-radius:16px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,.25); }
.h2c-card .card-header, .h2c-card .card-footer { background:transparent; border:0; color:var(--h2c-text); }
.h2c-card .card-header { padding:.7rem .9rem .3rem; }
.h2c-card .card-body { padding:.4rem .9rem .5rem; display:flex; flex-direction:column; gap:.5rem; }
.h2c-card .card-footer { color:#777; padding:.35rem .9rem .6rem; }
.h2c-card .brand-bambulab { filter: invert(1) hue-rotate(180deg) brightness(1.3); }
.h2c-name { font-weight:600; }
.h2c-btn { color:#8d8d8d !important; } .h2c-btn:hover { color:#fff !important; }
.h2c-panel { background:var(--h2c-panel); border-radius:12px; padding:.55rem .7rem; }
.h2c-label { color:var(--h2c-label); font-size:.75rem; line-height:1.2; }
.h2c-value { color:var(--h2c-text); font-size:.95rem; font-weight:500; }
.h2c-big { color:var(--h2c-text); font-size:1.6rem; font-weight:600; line-height:1.1; }
.h2c-ico { width:14px; height:14px; vertical-align:-2px; margin-right:2px; }
.h2c-temps { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; }
.h2c-temp b { font-size:1.45rem; font-weight:700; color:var(--h2c-text); }
.h2c-temp span { color:#c9c9c9; font-size:.95rem; margin-left:2px; }
.h2c-pill { font-size:.68rem; font-weight:700; letter-spacing:.04em; padding:.2rem .6rem; border-radius:999px; background:#3a3a3a; color:#d6d6d6; }
.h2c-st-printing { background:var(--h2c-lime); color:#10210a; }
.h2c-st-paused { background:#4a3d12; color:#ffd666; }
.h2c-st-error, .h2c-st-shutdown, .h2c-st-cancelled { background:#4d1a1a; color:#ff8a8a; }
.h2c-st-complete { background:#3a3a3a; color:#fff; }
.h2c-st-offline { background:#000; color:#8a8a8a; border:1px solid #444; }
.h2c-progress { height:8px; background:#3a3a3a; border-radius:99px; overflow:hidden; }
.h2c-bar { height:100%; background:var(--h2c-lime); border-radius:99px; }
.h2c-bar-paused { background:#8a8a8a; }
.h2c-msg { background:var(--h2c-panel2); color:#cfcfcf; border-radius:10px; padding:.35rem .6rem; font-size:.8rem; }
.h2c-msg-bad { background:#3b1616; color:#ffb3b3; }
.h2c-offline .card-body, .h2c-offline .card-header .h2c-name { opacity:.6; }
.h2c-filament { cursor:pointer; transition:background .15s; } .h2c-filament:hover, .h2c-filament:focus { background:var(--h2c-panel2); outline:none; }
.h2c-busy { opacity:.6; }
.h2c-blocks { display:flex; gap:6px; margin-top:.35rem; }
.h2c-block { flex:1 1 0; min-width:0; height:46px; border-radius:9px; display:flex; flex-direction:column; justify-content:center; align-items:center;
  font-size:.72rem; line-height:1.15; text-align:center; overflow:hidden; padding:0 2px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.h2c-block .h2c-slot { font-weight:700; opacity:.85; } .h2c-block .h2c-mat { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.h2c-block .h2c-vendor { font-size:.68rem; opacity:.8; }
.h2c-block.h2c-cur { box-shadow: inset 0 0 0 2px var(--h2c-lime); }
.h2c-unknown { background:#333; color:#ddd; }
.h2c-empty { background: repeating-linear-gradient(45deg,#262626 0 6px,#1b1b1b 6px 12px); color:#8a8a8a; box-shadow: inset 0 0 0 1px #555; }
.h2c-na { background:#1d1d1d; color:#8a8a8a; box-shadow: inset 0 0 0 1px #3a3a3a; font-size:.8rem; }
.h2c-blocks-big .h2c-block { height:150px; border-radius:22px; font-size:.95rem; }
.h2c-table { --bs-table-bg:transparent; --bs-table-color:var(--h2c-text); color:var(--h2c-text); }
.h2c-table td, .h2c-table th { border-color:#333; color:var(--h2c-text); background:transparent; }
.h2c-table tr.th-active, [data-bs-theme=dark] .h2c-table tr.th-active { background:rgba(163,230,53,.10) !important; }
.h2c-table > :not(caption) > * > * { box-shadow:none !important; background:transparent !important; color:var(--h2c-text) !important; }
.h2c-card .swatch, .h2c-modal .swatch { border-color:#555; }
.h2c-chip-ok { background:rgba(163,230,53,.15); color:var(--h2c-lime); font-weight:500; }
.h2c-chip { background:#3a3a3a; color:#bbb; font-weight:500; }
.h2c-modal .modal-content { background:#121212; color:#f2f2f2; border:0; border-radius:18px; }
.h2c-modal .modal-header, .h2c-modal .modal-footer { border-color:#2a2a2a; }
.h2c-loading { color:#9a9a9a; padding:2rem 0; text-align:center; }

/* Filament tiles: full "material + variant" label (wraps to 2 lines instead of truncating); table header row. */
.h2c-block { height:50px; }
.h2c-block .h2c-mat { white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; font-size:.7rem; line-height:1.1; }
.h2c-table .h2c-thead th { font-weight:500; padding-top:0; }
.h2c-table th .h2c-label { font-weight:400; font-size:.68rem; }
.swatch-empty { background: repeating-linear-gradient(45deg,#2a2a2a 0 3px,#151515 3px 6px); }

/* Per-card icon rail + views (preview) */
.h2c-cbody { flex-direction:row !important; gap:.5rem; }
.h2c-crail { flex:0 0 34px; display:flex; flex-direction:column; gap:6px; background:#1b1b1b; border-radius:12px; padding:6px 3px; align-self:flex-start; }
.h2c-cbtn { width:28px; height:28px; border:0; border-radius:8px; background:transparent; color:#8a8a8a; display:flex; align-items:center; justify-content:center; padding:0; }
.h2c-cbtn svg { width:18px; height:18px; } .h2c-cbtn:hover { color:#ddd; background:#2a2a2a; } .h2c-cbtn.active { color:#a3e635; background:#262626; }
.h2c-views { flex:1 1 auto; min-width:0; }
.h2c-view { display:flex; flex-direction:column; gap:.5rem; } .h2c-view.d-none { display:none !important; }
.h2c-bar-idle { background:#5a5a5a; }
.h2c-alerts { display:flex; flex-direction:column; gap:6px; }
.h2c-alert { background:var(--h2c-panel); border-radius:10px; padding:.4rem .55rem; }
.h2c-akind { font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:#d6d6d6; }
.h2c-ak-failed, .h2c-ak-error, .h2c-ak-error_log, .h2c-ak-cancelled, .h2c-ak-offline { color:#ff8a8a; } .h2c-ak-paused { color:#ffd666; } .h2c-ak-finished, .h2c-ak-online { color:#a3e635; }
.h2c-amsg { font-size:.78rem; color:#e6e6e6; word-break:break-word; }

/* ===== H2C cards: LIGHT variant (app dark-mode setting off). Dark mode keeps the look above. ===== */
[data-bs-theme=light] .h2c-card, [data-bs-theme=light] .h2c-modal .modal-content {
  --h2c-bg:#ffffff; --h2c-panel:#f2f3f5; --h2c-panel2:#e7e9ec; --h2c-label:#6b7078; --h2c-text:#1c1f23; --h2c-lime:#a3e635; --h2c-lime-dark:#4d7c0f;
  background:var(--h2c-bg); color:var(--h2c-text); box-shadow:0 1px 4px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04); }
[data-bs-theme=light] .h2c-card .card-header, [data-bs-theme=light] .h2c-card .card-footer { color:var(--h2c-text); }
[data-bs-theme=light] .h2c-card .card-footer { color:#8a8f96; }
[data-bs-theme=light] .h2c-card .brand-bambulab { filter:none; }
[data-bs-theme=light] .h2c-btn { color:#8a8f96 !important; } [data-bs-theme=light] .h2c-btn:hover { color:#1c1f23 !important; }
[data-bs-theme=light] .h2c-temp span { color:#5c6168; }
[data-bs-theme=light] .h2c-pill { background:#e7e9ec; color:#4a4f56; }
[data-bs-theme=light] .h2c-st-printing { background:var(--h2c-lime); color:#1a2e05; }
[data-bs-theme=light] .h2c-st-paused { background:#fff1c2; color:#7a5b00; }
[data-bs-theme=light] .h2c-st-error, [data-bs-theme=light] .h2c-st-shutdown, [data-bs-theme=light] .h2c-st-cancelled { background:#fde2e2; color:#b42318; }
[data-bs-theme=light] .h2c-st-complete { background:#e7e9ec; color:#1c1f23; }
[data-bs-theme=light] .h2c-st-offline { background:#fff; color:#6b7078; border:1px solid #c9cdd2; }
[data-bs-theme=light] .h2c-progress { background:#dfe2e6; }
[data-bs-theme=light] .h2c-bar-paused, [data-bs-theme=light] .h2c-bar-idle { background:#a9aeb5; }
[data-bs-theme=light] .h2c-msg { background:var(--h2c-panel2); color:#3b4047; }
[data-bs-theme=light] .h2c-msg-bad { background:#fde2e2; color:#b42318; }
[data-bs-theme=light] .h2c-crail { background:#e9ebee; }
[data-bs-theme=light] .h2c-cbtn { color:#8a8f96; } [data-bs-theme=light] .h2c-cbtn:hover { color:#1c1f23; background:#dcdfe3; }
[data-bs-theme=light] .h2c-cbtn.active { color:var(--h2c-lime-dark); background:#fff; box-shadow:0 0 0 1px #d3d7dc; }
[data-bs-theme=light] .h2c-block { box-shadow: inset 0 0 0 1px rgba(0,0,0,.10); }
[data-bs-theme=light] .h2c-block.h2c-cur { box-shadow: inset 0 0 0 2px var(--h2c-lime-dark); }
[data-bs-theme=light] .h2c-unknown { background:#dfe2e6; color:#3b4047; }
[data-bs-theme=light] .h2c-empty { background: repeating-linear-gradient(45deg,#f2f3f5 0 6px,#e3e6e9 6px 12px); color:#6b7078; box-shadow: inset 0 0 0 1px #c9cdd2; }
[data-bs-theme=light] .h2c-na { background:#f7f8f9; color:#8a8f96; box-shadow: inset 0 0 0 1px #dfe2e6; }
[data-bs-theme=light] .h2c-table td, [data-bs-theme=light] .h2c-table th { border-color:#e1e4e8; }
[data-bs-theme=light] .h2c-table tr.th-active { background:rgba(163,230,53,.18) !important; }
[data-bs-theme=light] .h2c-card .swatch, [data-bs-theme=light] .h2c-modal .swatch { border-color:#b5bac1; }
[data-bs-theme=light] .swatch-empty { background: repeating-linear-gradient(45deg,#e7e9ec 0 3px,#cfd3d8 3px 6px); }
[data-bs-theme=light] .h2c-chip-ok { background:rgba(163,230,53,.25); color:var(--h2c-lime-dark); }
[data-bs-theme=light] .h2c-chip { background:#e7e9ec; color:#5c6168; }
[data-bs-theme=light] .h2c-alert { background:var(--h2c-panel); }
[data-bs-theme=light] .h2c-akind { color:#4a4f56; } [data-bs-theme=light] .h2c-amsg { color:#2b2f34; }
[data-bs-theme=light] .h2c-ak-failed, [data-bs-theme=light] .h2c-ak-error, [data-bs-theme=light] .h2c-ak-error_log, [data-bs-theme=light] .h2c-ak-cancelled, [data-bs-theme=light] .h2c-ak-offline { color:#b42318; }
[data-bs-theme=light] .h2c-ak-paused { color:#8a6400; } [data-bs-theme=light] .h2c-ak-finished, [data-bs-theme=light] .h2c-ak-online { color:var(--h2c-lime-dark); }
[data-bs-theme=light] .h2c-modal .modal-header, [data-bs-theme=light] .h2c-modal .modal-footer { border-color:#e1e4e8; }
[data-bs-theme=light] .h2c-modal .btn-close { filter:none; }
[data-bs-theme=light] .h2c-loading { color:#6b7078; }

/* ===== H2C LIGHT mode: higher contrast (dashboard only; dark mode untouched) ===== */
[data-bs-theme=light] body:has(#grid), [data-bs-theme=light] body:has(#grid) .pf-panel, [data-bs-theme=light] body:has(#grid) .pf-panel > .card-header { background:#e9ecef; }
[data-bs-theme=light] .h2c-card { --h2c-bg:#fff; --h2c-panel:#f1f3f5; --h2c-label:#5f6b7a; --h2c-text:#111; --h2c-lime-dark:#3f6212;
  border:1px solid #d0d5dc; box-shadow:0 1px 3px rgba(0,0,0,.12); }
[data-bs-theme=light] .h2c-card .h2c-panel { border:1px solid #e1e5ea; }
[data-bs-theme=light] .h2c-value, [data-bs-theme=light] .h2c-big, [data-bs-theme=light] .h2c-temp b, [data-bs-theme=light] .h2c-name { color:#111; }
[data-bs-theme=light] .h2c-temp span { color:#4a5562; }
[data-bs-theme=light] .h2c-card .card-footer { color:#5f6b7a; }
[data-bs-theme=light] .h2c-cbtn, [data-bs-theme=light] .h2c-btn { color:#6c757d !important; }
[data-bs-theme=light] .h2c-cbtn.active { color:#3f6212 !important; background:#ecfccb; box-shadow:0 0 0 1px #a3c76a; }
[data-bs-theme=light] .h2c-crail { background:#f1f3f5; border:1px solid #e1e5ea; }
[data-bs-theme=light] .h2c-progress { background:#dfe3e8; }
[data-bs-theme=light] .h2c-st-printing { background:#a3e635; color:#1a2e05; }
[data-bs-theme=light] .h2c-chip-ok { background:#ecfccb; color:#3f6212; }
/* Camera view (card) + camera modal + share popover (preview) */
.h2c-card { position:relative; }
.h2c-cam { background:#000; border-radius:10px; overflow:hidden; aspect-ratio:16/9; display:flex; align-items:center; justify-content:center; cursor:zoom-in; }
.h2c-cam img { width:100%; height:100%; object-fit:contain; display:block; }
.h2c-cam-lg { cursor:default; border-radius:8px; }
.h2c-cam { position:relative; }
.h2c-camov { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; padding:10px 14px; text-align:center; font-size:.8rem; line-height:1.3; }
.h2c-camov-wait { color:#aab2c0; background:rgba(0,0,0,.35); }
.h2c-camov-err { color:#ffc9c9; background:rgba(40,10,10,.86); overflow:auto; }
.h2c-camov-err svg { width:28px; height:28px; opacity:.6; flex:none; }
.h2c-camov-t { font-weight:600; color:#ff9b9b; }
.h2c-camov-m { word-break:break-word; max-width:100%; }
.h2c-camov-d { word-break:break-word; max-width:100%; font-size:.85em; opacity:.7; display:none; }
.h2c-cam-lg .h2c-camov { font-size:1rem; }
.h2c-cam-lg .h2c-camov-d { display:block; }
.h2c-nocam { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-height:150px; text-align:center; background:var(--h2c-panel); border-radius:10px; padding:12px; }
.h2c-nocam svg { width:34px; height:34px; opacity:.35; }
.h2c-live { color:#ef4444; font-weight:700; letter-spacing:1px; } .h2c-live::before { content:"● "; }
.h2c-sharepop { position:absolute; z-index:20; left:52px; right:10px; top:44px; background:#1e1e1e; color:var(--h2c-text); border:1px solid #3a3a3a; border-radius:12px; padding:10px 12px; box-shadow:0 10px 30px rgba(0,0,0,.45); font-size:.875rem; }
.h2c-slink { display:flex; align-items:center; gap:4px; padding:4px 0; border-top:1px solid #333; } .h2c-slink > div { flex:1; min-width:0; }
.h2c-slink .btn { padding:.1rem .35rem; font-size:.75rem; }
[data-bs-theme=light] .h2c-sharepop { background:#fff; border-color:#c9cdd2; box-shadow:0 10px 30px rgba(0,0,0,.15); }
[data-bs-theme=light] .h2c-sharepop .btn-close-white { filter:none; }
[data-bs-theme=light] .h2c-slink { border-top-color:#e3e5e8; }
/* Print log filter bar + totals (both themes) */
.pf-stat { background:var(--bs-body-bg); border:1px solid var(--bs-border-color); border-radius:.6rem; padding:.45rem .9rem; min-width:9.5rem; }
.pf-stat-l { font-size:.75rem; color:var(--bs-secondary-color); text-transform:uppercase; letter-spacing:.04em; }
.pf-stat-v { font-size:1.35rem; font-weight:700; line-height:1.2; }
.pf-stat-s { font-size:.75rem; color:var(--bs-secondary-color); }
.pf-filterbar .dropdown-menu .form-check { white-space:nowrap; }
/* Header user menu: float above cards/modals' backdrop-free content, never clipped */
.pf-topbar { position: relative; z-index: 1030; }
.pf-topbar .dropdown-menu { position: absolute; z-index: 1031; min-width: 13rem; }
/* ---- Print Jobs tab (reuses the H2C card look) ---- */
.pj-printer { padding:.45rem .6rem; }
.pj-printer .h2c-progress { height:6px; }
.pj-slot .card-footer .h2c-btn { line-height:1; padding:.15rem .3rem; }
.pj-slot .h2c-st-standby { background:#3a3a3a; }
[data-bs-theme=light] .pj-slot .h2c-st-standby { background:#e7e9ec; }

/* Card flip-in (js/card-flip.js). Transform + opacity only: no layout shift; theme-neutral (works in light and dark). */
.pf-flip-pending > * { opacity: 0; }
.pf-flip-pre { opacity: 0; transform: perspective(1200px) rotateY(-90deg); }
.pf-flip-run { transition: transform .5s cubic-bezier(.2,.75,.3,1), opacity .3s ease-out; transform-origin: center center; backface-visibility: hidden; will-change: transform, opacity; }
@media (prefers-reduced-motion: reduce) {
  .pf-flip-pending > *, .pf-flip-pre { opacity: 1 !important; transform: none !important; }
  .pf-flip-run { transition: none !important; }
}

/* Print Jobs: objects counter progress bar (Bootstrap .progress, themed like the card bars) */
.pj-obj-progress{height:8px;background:#3a3a3a;border-radius:99px}
[data-bs-theme=light] .pj-obj-progress{background:#e5e7eb}
.pj-obj-progress .progress-bar{background:var(--h2c-lime,#a3e635);border-radius:99px;transition:width .4s ease}
.pj-obj-progress .progress-bar.pj-obj-full{background:#22c55e}
.pj-objects .btn-group .btn{padding:0 .5rem;line-height:1.4}
@media (prefers-reduced-motion: reduce){.pj-obj-progress .progress-bar{transition:none}}

/* Filament tab */
.fi-swatch { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid var(--bs-border-color); box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); }
.fi-use { width: 5rem; }
.fi-meta dt, .fi-meta dd { line-height: 1.5; }
/* Tutorials tab */
.tu-body { line-height: 1.55; }
.tu-body ol, .tu-body ul { padding-left: 1.4rem; }
.tu-body li { margin-bottom: .25rem; }
.tu-body code { font-size: .85em; }
.fi-scan-card #fiScan { letter-spacing: .05em; }
.fi-dot { display: inline-block; width: .85em; height: .85em; border-radius: 50%; border: 1px solid var(--bs-border-color); vertical-align: -.08em; margin-right: .35em; }
.fi-dot-lg { width: 1.3em; height: 1.3em; margin-right: 0; }
.fi-swatch-lg { width: 3.4rem; height: 3.4rem; }
.fi-swatch-xl { width: 7rem; height: 7rem; }
.fi-pcard { padding: 0; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); color: inherit; transition: transform .12s, box-shadow .12s; }
.fi-pcard:hover, .fi-pcard:focus-visible { transform: translateY(-2px); box-shadow: 0 .25rem .75rem rgba(0,0,0,.15); }
.fi-thumb { height: 7rem; display: flex; align-items: center; justify-content: center; background: var(--bs-tertiary-bg); border-bottom: 1px solid var(--bs-border-color); overflow: hidden; border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0; }
.fi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fi-pimg { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: .5rem; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); }
.fi-pimg-swatch { display: flex; align-items: center; justify-content: center; }
.fi-swatch-grid { display: flex; flex-wrap: wrap; gap: .35rem; }
.fi-cchips { max-height: 11rem; overflow-y: auto; }
.fi-cchip { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .45rem; border: 1px solid var(--bs-border-color); border-radius: 1rem; background: none; color: inherit; font-size: .75rem; line-height: 1.4; }
.fi-cchip:hover { border-color: var(--bs-primary); }
.fi-cchip.active { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .12); font-weight: 600; }
.fi-sw-btn { display: flex; flex-direction: column; align-items: center; width: 4.6rem; padding: .3rem .15rem; border: 2px solid transparent; border-radius: .5rem; background: none; color: inherit; font-size: .7rem; line-height: 1.1; }
.fi-sw-btn .fi-swatch { width: 2rem; height: 2rem; margin-bottom: .2rem; }
.fi-sw-btn.active { border-color: var(--bs-primary); background: var(--bs-primary-bg-subtle); }
.fi-sw-btn:hover { background: var(--bs-tertiary-bg); }
.fi-sw-name { text-align: center; }
.fi-label-preview { display: inline-block; padding: .5rem; background: #ddd; border-radius: .4rem; max-width: 100%; overflow: auto; }
.fi-label-preview .pf-label { box-shadow: 0 1px 4px rgba(0,0,0,.35); border-radius: .08in; }
.fi-dymo-img { max-width: 100%; background: #fff; }
.fi-cam { width: 100%; }
.pf-scan-view { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #000; border-radius: .5rem; overflow: hidden; touch-action: none; cursor: crosshair; }
.pf-scan-view video { width: 100%; height: 100%; object-fit: cover; transform-origin: center; display: block; }
/* v1.0.68HF4 target box: wide for barcodes, square for QR (same sizes as BOX in pf-scanner.js); outside dimmed, corner brackets, scan line */
.pf-scan-box { position: absolute; left: 50%; top: 50%; width: 86%; height: 36%; transform: translate(-50%, -50%); border: 1px solid rgba(255,255,255,.35); border-radius: .35rem; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); pointer-events: none; transition: width .15s, height .15s, border-color .1s; }
.pf-scan-view[data-mode="qr"] .pf-scan-box { width: auto; height: 62%; aspect-ratio: 1 / 1; }
.pf-scan-c { position: absolute; width: 1.4rem; height: 1.4rem; border: 0 solid #fff; }
.pf-scan-c.tl { left: -3px; top: -3px; border-left-width: 4px; border-top-width: 4px; border-top-left-radius: .45rem; }
.pf-scan-c.tr { right: -3px; top: -3px; border-right-width: 4px; border-top-width: 4px; border-top-right-radius: .45rem; }
.pf-scan-c.bl { left: -3px; bottom: -3px; border-left-width: 4px; border-bottom-width: 4px; border-bottom-left-radius: .45rem; }
.pf-scan-c.br { right: -3px; bottom: -3px; border-right-width: 4px; border-bottom-width: 4px; border-bottom-right-radius: .45rem; }
.pf-scan-box.ok { border-color: var(--bs-success); }
.pf-scan-box.ok .pf-scan-c { border-color: var(--bs-success); }
.pf-scan-line { position: absolute; left: 4%; right: 4%; top: 50%; height: 2px; background: #ff3b3b; box-shadow: 0 0 6px #ff3b3b; opacity: .85; animation: pf-scan-sweep 1.8s ease-in-out infinite alternate; }
@keyframes pf-scan-sweep { from { top: 12%; } to { top: 88%; } }
@media (prefers-reduced-motion: reduce) { .pf-scan-line { animation: none; } }
.pf-scan-focus { position: absolute; width: 3.2rem; height: 3.2rem; margin: -1.6rem 0 0 -1.6rem; border: 2px solid #ffd43b; border-radius: .3rem; pointer-events: none; }
.pf-scan-focus.pf-pulse { animation: pf-scan-focus .6s ease-out; }
@keyframes pf-scan-focus { from { transform: scale(1.5); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.pf-scan-tools { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.pf-scan-cam { width: auto; max-width: 100%; }
.pf-scan-zoomwrap { display: flex; align-items: center; gap: .35rem; flex: 1 1 8rem; }
.pf-scan-zoomwrap.d-none { display: none !important; }
.pf-scan-torch.active { background: #ffd43b; color: #000; border-color: #ffd43b; }
.pf-scan-res { margin-top: .25rem; }
.fi-manage-list { max-height: 28rem; overflow: auto; }

/* Create/edit filament: compact single column; color picker = dropdown with swatch dots */
.fi-create-dialog { max-width: 26rem; }
.fi-color-btn { display: flex; align-items: center; }
.fi-color-menu { max-height: 18rem; overflow-y: auto; }
.fi-color-menu .dropdown-item { display: flex; align-items: center; font-size: .9rem; padding-top: .2rem; padding-bottom: .2rem; }
.fi-color-menu .dropdown-item.active .fi-dot { outline: 2px solid #fff; }
/* v1.0.68HF4 type-aheads (color, + Add in-use roll filament) */
.fi-color-dd .fi-color-menu, #fiInUseModal .fi-color-menu { top: 100%; left: 0; margin-top: .15rem; }
.fi-color-menu .dropdown-item.pf-hl { background: var(--bs-tertiary-bg); }
.fi-pqty .btn { min-width: 2.6rem; }

/* Filament tables: compact, striped, sticky header, scroll inside the card */
.fi-table-wrap { max-height: 65vh; overflow: auto; }
.fi-table-wrap-sm { max-height: 22rem; }
.fi-table thead th { position: sticky; top: 0; z-index: 2; background: var(--bs-tertiary-bg); white-space: nowrap; font-weight: 600; font-size: .8rem; }
.fi-table th[data-sort] { cursor: pointer; user-select: none; }
.fi-table th[data-sort]::after { content: ""; display: inline-block; width: .9em; opacity: .4; }
.fi-table th[data-sort].sort-asc::after { content: "\25B2"; opacity: .9; font-size: .65em; padding-left: .3em; }
.fi-table th[data-sort].sort-desc::after { content: "\25BC"; opacity: .9; font-size: .65em; padding-left: .3em; }
.fi-table td { font-size: .85rem; }
.fi-table tbody tr.ft-row { cursor: pointer; }
.fi-c-dot { width: 1.8rem; }
.fi-tthumb { width: 1.4rem; height: 1.4rem; object-fit: cover; border-radius: .25rem; vertical-align: middle; }

/* App-wide toasts (toast.js): above modals (1055) and their backdrops */
.pf-toasts{z-index:2000;max-width:min(26rem,calc(100vw - 1rem))}
.pf-toast{width:100%}
.pf-toast .toast-body{font-size:.9rem}
.pf-toast-ico{display:inline-block;width:1.1rem;font-weight:700}
@media (prefers-reduced-motion: reduce){ .pf-toast{transition:none!important} }
/* "Go to printer" highlight on the dashboard */
.pf-slot.pf-target .printer-card{outline:3px solid var(--bs-warning);outline-offset:2px}

/* Scrollable modals whose content is wrapped in a <form>: let the form be the flex column so .modal-body scrolls (header/footer stay put) */
.modal-dialog-scrollable .modal-content > form { display:flex; flex-direction:column; min-height:0; max-height:100%; overflow:hidden; }
.modal-dialog-scrollable .modal-content > form > .modal-body { overflow-y:auto; -webkit-overflow-scrolling:touch; }
/* Print Jobs: edit modal tabs (sticky at top of the scrolling body), card Items / Printers views */
.pj-tabs { position:sticky; top:-1rem; z-index:3; background:var(--bs-modal-bg, var(--bs-body-bg)); margin-top:-1rem; padding-top:1rem; flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; }
.pj-tabs .nav-link { white-space:nowrap; padding:.35rem .7rem; font-size:.9rem; }
.pj-slot .h2c-cbody { min-height:12rem; }
.pj-irow { display:flex; align-items:center; gap:.4rem; padding:.3rem 0; border-top:1px solid rgba(127,127,127,.18); }
.pj-irow:first-child { border-top:0; }
.pj-irow .pj-iname { min-width:0; flex:1 1 auto; }
.pj-irow .pj-icount { font-variant-numeric:tabular-nums; white-space:nowrap; }
.pj-irow .pj-icount.pj-idone { color:#22c55e; }
.pj-irow .btn { padding:0 .45rem; line-height:1.5; min-width:1.9rem; }
.pj-items-list { max-height:15rem; overflow-y:auto; }
.pj-sum { display:flex; flex-wrap:wrap; gap:.25rem .75rem; }

/* Print Jobs: compact status icon buttons (Start / Pause / Complete) on cards and the edit footer */
.pj-edit-actions { display:flex; }
.pj-sbtn { --pj-acc:#a3e635; width:34px; height:30px; display:inline-flex; align-items:center; justify-content:center; padding:0; border-radius:9px;
  border:1px solid #3a3a3a; background:transparent; color:#a1a1aa; transition:color .15s, background-color .15s, border-color .15s, box-shadow .15s; }
.pj-sbtn svg { width:15px; height:15px; }
.pj-sbtn-start { --pj-acc:#22c55e; } .pj-sbtn-pause { --pj-acc:#f59e0b; } .pj-sbtn-done { --pj-acc:#3b82f6; }
.pj-sbtn:not(:disabled):hover { color:var(--pj-acc); border-color:var(--pj-acc); background:color-mix(in srgb, var(--pj-acc) 12%, transparent); }
.pj-sbtn:focus-visible { outline:0; box-shadow:0 0 0 .2rem color-mix(in srgb, var(--pj-acc) 40%, transparent); }
.pj-sbtn:disabled { opacity:.35; cursor:not-allowed; }
.pj-sbtn.active, .pj-sbtn.active:disabled { opacity:1; color:#fff; background:var(--pj-acc); border-color:var(--pj-acc); }
.pj-sbtn-pause.active { color:#1c1917; }
[data-bs-theme=light] .pj-sbtn { border-color:#d3d7dc; color:#6c757d; }
[data-bs-theme=light] .pj-sbtn.active { color:#fff; } [data-bs-theme=light] .pj-sbtn-pause.active { color:#1c1917; }
@media (prefers-reduced-motion: reduce) { .pj-sbtn { transition:none; } }
/* Bigger status buttons (touch targets): full-width row on cards, 46px tall, 22px icons */
.pj-sbtn { height:46px; width:auto; min-width:56px; border-radius:11px; }
.pj-sbtn svg { width:22px; height:22px; }
.pj-actions .pj-sbtn { flex:1 1 0; }
.pj-edit-actions .pj-sbtn { width:60px; }
@media (max-width:575.98px) { .pj-edit-actions .pj-sbtn { width:48px; min-width:48px; } }
.pj-slot.pf-target .h2c-card{outline:3px solid var(--bs-info);outline-offset:2px}
/* Job Started badge (replaces the play button once started): plain text, never looks clickable */
.pj-started { flex:1 1 0; min-width:0; height:46px; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:0 .4rem;
  border-radius:11px; background:color-mix(in srgb, #22c55e 14%, transparent); color:#86efac; cursor:default; user-select:text; line-height:1.15; text-align:center; }
.pj-started-k { font-size:.66rem; text-transform:uppercase; letter-spacing:.06em; font-weight:700; opacity:.9; }
.pj-started-v { font-size:.78rem; font-weight:600; white-space:nowrap; font-variant-numeric:tabular-nums; }
.pj-actions .pj-started { flex:2 1 0; }
.pj-edit-actions .pj-started { flex:0 0 auto; width:auto; padding:0 .8rem; }
[data-bs-theme=light] .pj-started { background:#dcfce7; color:#166534; }
.pj-extras { min-height:1.6rem; }
.pj-resend { display:inline-flex; align-items:center; gap:.3rem; padding:.1rem .5rem; font-size:.75rem; line-height:1.3; border-radius:7px; }
/* Paused job card: red (manual or auto-paused because a printer paused) */
.h2c-card.pj-paused { background:#2a0d0f; border:2px solid #dc2626; box-shadow:0 0 0 0 rgba(220,38,38,.55); animation:pj-pulse 2s ease-out infinite; }
.h2c-card.pj-paused .h2c-panel { background:rgba(0,0,0,.28); }
.h2c-card.pj-paused .h2c-crail { background:rgba(0,0,0,.35); }
.h2c-card.pj-paused .h2c-pill { background:#dc2626 !important; color:#fff !important; }
.pj-paused-line { background:#dc2626; color:#fff; border-radius:8px; padding:.3rem .55rem; font-size:.8rem; margin-bottom:.5rem; }
[data-bs-theme=light] .h2c-card.pj-paused { background:#fee2e2; border-color:#dc2626; }
[data-bs-theme=light] .h2c-card.pj-paused .h2c-panel { background:rgba(255,255,255,.6); }
@keyframes pj-pulse { 0% { box-shadow:0 0 0 0 rgba(220,38,38,.55); } 70% { box-shadow:0 0 0 10px rgba(220,38,38,0); } 100% { box-shadow:0 0 0 0 rgba(220,38,38,0); } }
@media (prefers-reduced-motion: reduce) { .h2c-card.pj-paused { animation:none; } }

/* Print Jobs: customer type-ahead (Customer tab). Bootstrap dropdown colors = right in light and dark mode. */
.pj-ta { position: relative; }
.pj-ta-menu { position: fixed; z-index: 1070; max-height: 18rem; overflow-y: auto; margin: 0; padding: .25rem 0; font-size: .875rem; }
.pj-ta-item { display: flex; flex-direction: column; white-space: normal; line-height: 1.25; padding: .35rem .75rem; }
.pj-ta-sub { font-size: .78em; opacity: .7; word-break: break-all; }
.pj-ta-item.active .pj-ta-sub, .pj-ta-item:active .pj-ta-sub { opacity: .9; }

/* Print Jobs: table view (one row per job; scrolls sideways on a phone). Paused rows red like the paused cards (internal page only). */
.pj-viewsel .btn { display: inline-flex; align-items: center; padding: .25rem .45rem; }
.pj-table { min-width: 68rem; font-size: .875rem; --h2c-lime:#a3e635; --h2c-label:var(--bs-secondary-color); --h2c-panel:var(--bs-tertiary-bg); --h2c-panel2:var(--bs-secondary-bg); --h2c-text:var(--bs-body-color); }
.pj-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); white-space: nowrap; }
.pj-table tr.pj-trow { cursor: pointer; }
.pj-table tr.pj-trow:hover > td { background: var(--bs-tertiary-bg); }
.pj-ttitle { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-tcust { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-tprinters { max-width: 14rem; }
.pj-tprinter { display: inline-block; padding: 0 .4rem; margin: 1px 0; border-radius: 999px; background: var(--bs-secondary-bg); font-size: .78rem; white-space: nowrap; }
.pj-tprinter-paused { background: #dc2626; color: #fff; }
.pj-tcaret { display: inline-block; width: .8rem; color: var(--bs-secondary-color); }
.pj-tacts .pj-sbtn { width: 2.1rem; height: 2.1rem; min-width: 0; padding: 0; }
.pj-tacts .pj-sbtn svg { width: 14px; height: 14px; }
.pj-tacts .pj-started { height: 2.1rem; flex: 0 0 auto; padding: 0 .5rem; }
.pj-tacts .pj-started .pj-started-k { font-size: .6rem; }
.pj-tbtn { width: 1.9rem; height: 1.9rem; }
.pj-table tr.pj-trow-paused > td { background: #2a0d0f; box-shadow: inset 0 1px 0 #dc2626, inset 0 -1px 0 #dc2626; }
.pj-table tr.pj-trow-paused > td:first-child { box-shadow: inset 3px 0 0 #dc2626, inset 0 1px 0 #dc2626, inset 0 -1px 0 #dc2626; }
.pj-table tr.pj-trow-paused .h2c-pill { background: #dc2626 !important; color: #fff !important; }
[data-bs-theme=light] .pj-table tr.pj-trow-paused > td { background: #fee2e2; }
.pj-table tr.pj-tdetail > td { padding: .5rem; background: var(--bs-body-bg); }
.pj-tcard { max-width: 34rem; }

/* House jobs (internal stock prints): neutral badge, no customer color cues */
.pj-house { display:inline-block; font-size:.6rem; font-weight:700; letter-spacing:.07em; line-height:1; padding:.2rem .45rem; border-radius:999px;
  border:1px solid currentColor; color:var(--bs-secondary-color); vertical-align:middle; text-transform:uppercase; }
.h2c-card .pj-house { color:var(--h2c-label); }
.pj-tbtn-gap { display:inline-block; width:1.9rem; }
.pj-jobtype .btn { min-width:5.5rem; }

/* Bambu AMS slots on the printer card + filament panel (same tiles as the U1 toolheads, compact rows per unit). Read-only. */
.pf-ams { display:flex; flex-direction:column; gap:5px; margin-top:.35rem; --pf-sw-ring:rgba(255,255,255,.38); }
[data-bs-theme=light] .pf-ams { --pf-sw-ring:rgba(0,0,0,.38); }
.pf-ams-row { display:flex; align-items:center; gap:6px; }
.pf-ams-name { flex:0 0 3.4rem; font-size:.66rem; line-height:1.1; color:var(--h2c-label, var(--bs-secondary-color)); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pf-ams-slots { flex:1 1 auto; margin-top:0; min-width:0; }
.pf-ams-one .pf-ams-slots { flex:0 0 calc((100% - 3.4rem - 24px) / 4); }
.pf-ams .h2c-block.pf-ams-slot { height:42px; position:relative; box-shadow: inset 0 0 0 1px var(--pf-sw-ring); }
.pf-ams .h2c-block.pf-ams-slot.h2c-empty { background:transparent; color:var(--h2c-label, #8a8a8a); box-shadow:none; border:1.5px dashed var(--pf-sw-ring); }
.pf-ams .h2c-block.pf-ams-slot.h2c-cur { box-shadow: inset 0 0 0 1px var(--pf-sw-ring), 0 0 0 2px var(--h2c-lime, #a3e635); }
[data-bs-theme=light] .pf-ams .h2c-block.pf-ams-slot.h2c-cur { box-shadow: inset 0 0 0 1px var(--pf-sw-ring), 0 0 0 2px var(--h2c-lime-dark, #4d7c0f); }
.pf-ams .h2c-block.pf-ams-slot.pf-ams-tar { box-shadow: inset 0 0 0 1px var(--pf-sw-ring), 0 0 0 2px rgba(163,230,53,.45); outline:1px dashed var(--h2c-lime, #a3e635); outline-offset:2px; }
.pf-ams .h2c-block .h2c-slot { font-size:.6rem; }
.pf-ams .h2c-block .h2c-mat { font-size:.68rem; -webkit-line-clamp:1; }
.pf-ams-rem { font-size:.6rem; font-weight:600; opacity:.9; }
.pf-ams-big .h2c-block.pf-ams-slot { height:84px; border-radius:16px; font-size:.85rem; }
.pf-ams-big .h2c-block .h2c-mat { font-size:.95rem; } .pf-ams-big .pf-ams-rem { font-size:.8rem; } .pf-ams-big .h2c-block .h2c-slot { font-size:.75rem; } .pf-ams-big .h2c-vendor { font-size:.72rem; }
.h2c-modal .pf-ams-name, .pf-ams-big ~ .pf-ams-name { font-size:.75rem; }
.swatch.pf-ams-sw { box-shadow: 0 0 0 1px rgba(255,255,255,.38); border-color:rgba(0,0,0,.45); }
[data-bs-theme=light] .swatch.pf-ams-sw { box-shadow: 0 0 0 1px rgba(0,0,0,.38); border-color:rgba(255,255,255,.6); }
.pf-ams .h2c-block.pf-ams-slot.h2c-cur, .pf-ams .h2c-block.pf-ams-slot.pf-ams-tar { z-index:1; }
.pf-ams-big .h2c-block.pf-ams-slot.h2c-cur { box-shadow: inset 0 0 0 1px var(--pf-sw-ring), 0 0 0 3px var(--h2c-lime, #a3e635); }

/* "Link on" opens the customer page in a new tab */
.pj-linkon { text-decoration:none; cursor:pointer; }
.pj-linkon:hover, .pj-linkon:focus-visible { text-decoration:underline; }
.pj-linkon .pj-ext { vertical-align:-1px; opacity:.85; }

/* Alerts: View email (stored copy of a customer email) */
.al-mail-frame { width: 100%; height: 60vh; border: 1px solid var(--bs-border-color); border-radius: .375rem; background: #fff; }
.al-mail-text { white-space: pre-wrap; max-height: 60vh; overflow: auto; margin: 0; padding: .75rem; border: 1px solid var(--bs-border-color); border-radius: .375rem; background: var(--bs-tertiary-bg); }
.al-mail-head dd { margin-bottom: .2rem; word-break: break-word; }
.al-mail-head dt { color: var(--bs-secondary-color); font-weight: 500; }

/* Info icons (<pf-info>, js/pf-info.js): small round ⓘ next to a label; the help text opens in a popover. */
.pf-info { display:inline-flex; align-items:center; justify-content:center; padding:0 .15rem; margin-left:.2rem; border:0; background:none;
  color:var(--bs-secondary-color); font-size:.95em; line-height:1; vertical-align:-.1em; border-radius:50%; cursor:pointer; }
.pf-info:hover, .pf-info[aria-expanded="true"] { color:var(--bs-primary); }
.pf-info:focus-visible { outline:2px solid var(--bs-primary); outline-offset:1px; }
.pf-info::after { content:""; position:absolute; inset:-.45rem; }   /* bigger touch target */
.pf-info { position:relative; }
.pf-info-pop { --bs-popover-max-width: 22rem; --bs-popover-font-size: .85rem; }
.pf-info-pop .popover-body code { white-space:normal; word-break:break-all; }
.pf-about-notes { max-height:18rem; overflow:auto; background:var(--bs-body-bg); }
.pf-about-notes h1, .pf-about-notes h2, .pf-about-notes h3 { font-size:1rem; margin-top:.6rem; }
/* Printer over the plan's limit (license server set): lock overlay, neutral colors */
.pf-locked .pf-lock-body { min-height:12rem; color:var(--bs-secondary-color); }
/* Top bar: Unlock Pro (plan below Commercial) / plan badge (Commercial). Neutral + brand green, never red. */
.pf-unlock{color:#a3e635;border:1px solid #a3e635;background:transparent;font-weight:600;padding:.15rem .6rem}
.pf-unlock:hover,.pf-unlock:focus{color:#111827;background:#a3e635;border-color:#a3e635}
.pf-plan-badge{background:#1f2937;color:#a3e635;border:1px solid #374151;font-weight:600}
.pf-plan-card{border-width:1px}.pf-plan-card.pf-current{border-color:#a3e635;box-shadow:0 0 0 1px #a3e635}
.pf-plan-card ul{padding-left:1.1rem;margin-bottom:0}
/* "Unlock Premium with Patreon" (v1.0.67): Patreon brand rules - unaltered symbol, black button, white mark, no added outline. */
.pf-patreon{background:#000;color:#fff;border:1px solid #000;font-weight:600;display:inline-flex;align-items:center;gap:.45rem}
.pf-patreon:hover,.pf-patreon:focus{background:#000;color:#fff;border-color:#000;filter:brightness(1.25)}
.pf-patreon:disabled,.pf-patreon.disabled{background:#000;color:#fff;border-color:#000;opacity:.55}
.pf-patreon img{height:1em;width:1em;display:block}
/* Files library (v1.0.68): cover, gallery thumbs, locked actions (neutral, never red) */
.pf-file-cover-wrap{aspect-ratio:4/3;overflow:hidden;border-top-left-radius:inherit;border-top-right-radius:inherit;background:var(--bs-tertiary-bg)}
.pf-file-cover{width:100%;height:100%;object-fit:cover;display:block}
.pf-file-nocover{display:flex;align-items:center;justify-content:center;color:var(--bs-secondary-color);font-weight:600;letter-spacing:.1em}
.pf-file-desc{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.pf-media-thumb{position:relative;width:52px;height:52px;padding:0;border:1px solid var(--bs-border-color);border-radius:.35rem;overflow:hidden;background:var(--bs-tertiary-bg)}
.pf-media-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.pf-media-ph{display:flex;align-items:center;justify-content:center;height:100%;font-size:1.1rem;color:var(--bs-secondary-color)}
.pf-media-play{position:absolute;right:3px;bottom:2px;font-size:.7rem;color:#fff;text-shadow:0 0 3px #000}
.pf-media-full{max-width:100%;max-height:75vh}
.pf-locked-action{display:inline-flex;align-items:center;gap:.3rem}
.pf-lock{flex:none}
.pf-file-gone{opacity:.6}

/* ---- v1.0.69 Library: smaller cards, MakerWorld-style green split button, Vaulted, rich-text descriptions, search ---- */
.pf-file .card-body{font-size:.85rem}
.pf-file .pf-file-name{font-size:.9rem;line-height:1.25}
.pf-file .pf-media-thumb{width:34px;height:34px}
.pf-lib-search,.pf-pr-search{max-width:22rem}
.pf-mw-split .pf-mw-main{flex:1 1 auto;background:#00ae42;border-color:#00ae42;color:#fff;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pf-mw-split .pf-mw-caret{flex:0 0 auto;background:#00ae42;border-color:#00ae42;border-left:1px solid rgba(255,255,255,.45);color:#fff}
.pf-mw-split .pf-mw-main:hover,.pf-mw-split .pf-mw-caret:hover,.pf-mw-split .pf-mw-caret.show{background:#00953a;border-color:#00953a;color:#fff}
.pf-mw-split .pf-mw-main:focus-visible,.pf-mw-split .pf-mw-caret:focus-visible{box-shadow:0 0 0 .2rem rgba(0,174,66,.35)}
.pf-mw-split.pf-mw-locked .pf-mw-main,.pf-mw-split.pf-mw-locked .pf-mw-caret{background:var(--bs-secondary-bg);border-color:var(--bs-border-color);color:var(--bs-body-color)}
.pf-mw-split.pf-mw-locked .pf-mw-caret{border-left-color:var(--bs-border-color)}
.pf-mw-split .dropdown-item svg,.pf-mw-split .pf-mw-main svg{vertical-align:-2px;margin-right:.25rem}
.pf-file-cover-wrap{position:relative}
.pf-vault-tag{position:absolute;top:.4rem;left:.4rem;background:rgba(33,37,41,.85);color:#fff;font-size:.72rem;font-weight:700;letter-spacing:.03em;padding:.15rem .5rem;border-radius:999px}
.pf-file-vaulted .pf-file-cover{filter:grayscale(1);opacity:.6}
.pf-vault-note{font-weight:600}
.pf-rich p,.pf-rich ul,.pf-rich ol,.pf-rich blockquote{margin:0 0 .25rem}
.pf-rich ul,.pf-rich ol{padding-left:1.1rem}
.pf-rich h3,.pf-rich h4,.pf-rich h5,.pf-rich h6{font-size:inherit;font-weight:600;margin:0 0 .15rem}
.pf-featured .pf-file .pf-file-desc{-webkit-line-clamp:3}
.pf-dash-feat .pf-file .pf-file-title{font-size:.9rem}

/* ---- v1.0.69 printer cards: model next to the name ---- */
.h2c-model{font-size:.7rem;font-weight:600;padding:.05rem .4rem;border-radius:.35rem;background:var(--bs-secondary-bg);color:var(--bs-secondary-color);white-space:nowrap}


/* ---- v1.0.70 Alerts tab (mockup alerts-v1069). Never red: failed uses a muted rose. ---- */
.al-st-finished{--st:#2dd4bf}.al-st-failed{--st:#b48a8a}.al-st-paused{--st:#f59e0b}.al-st-offline{--st:#6b7280}.al-st-error{--st:#a78bfa}.al-st-other{--st:#94a3b8}
.al-dot{width:.6rem;height:.6rem;border-radius:50%;display:inline-block;flex:none;background:var(--st)}
.al-sec{font-size:.8rem;text-transform:uppercase;letter-spacing:.5px;font-weight:600;color:var(--bs-secondary-color)}
.al-sum{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:.6rem;margin-bottom:.8rem}
@media (max-width:767.98px){.al-sum{grid-template-columns:repeat(2,minmax(0,1fr))}.al-sum .side{grid-column:1/-1;flex-direction:row!important}}
.al-sum a.pf-stat{display:block;text-decoration:none;color:inherit;background:var(--bs-body-bg);border:1px solid var(--bs-border-color);border-left:4px solid var(--st);border-radius:.5rem;padding:.55rem .8rem}
.al-sum a.pf-stat.on{box-shadow:inset 0 0 0 1px var(--st)}
.al-sum .lbl{display:flex;align-items:center;gap:.35rem;font-size:.72rem;text-transform:uppercase;letter-spacing:.4px;color:var(--bs-secondary-color)}
.al-sum .val{font-size:1.45rem;font-weight:700;line-height:1.15}
.al-sum .sub{font-size:.75rem;color:var(--bs-secondary-color)}
.al-sum .side{display:flex;flex-direction:column;justify-content:center;gap:.4rem}
.al-filters{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;background:var(--bs-body-bg);border:1px solid var(--bs-border-color);border-radius:.5rem;padding:.5rem .6rem;margin-bottom:.8rem}
.al-filters .al-srch{flex:1 1 240px;width:auto}
.al-seg{display:inline-flex;border:1px solid var(--bs-border-color);border-radius:.4rem;overflow:hidden;flex-wrap:wrap}
.al-seg button{background:transparent;border:0;color:var(--bs-secondary-color);font-size:.8rem;padding:.3rem .6rem;border-right:1px solid var(--bs-border-color)}
.al-seg button:last-child{border-right:0}
.al-seg button.on{background:rgba(163,230,53,.15);color:var(--bs-emphasis-color);font-weight:600}
.al-day{display:flex;align-items:center;gap:.6rem;margin:.9rem 0 .35rem}
.al-day:first-child{margin-top:0}
.al-day::after{content:"";flex:1;border-top:1px solid var(--bs-border-color-translucent)}
.al-day .n{font-size:.75rem;color:var(--bs-secondary-color)}
.al-row{display:grid;grid-template-columns:96px minmax(0,1fr) auto 70px;gap:.75rem;align-items:start;background:var(--bs-body-bg);border:1px solid var(--bs-border-color);border-left:4px solid var(--st);border-radius:.45rem;padding:.5rem .7rem;margin-bottom:.4rem}
@media (max-width:575.98px){.al-row{grid-template-columns:minmax(0,1fr) auto}.al-row>div:first-child{grid-column:1/-1}}
.al-pill{display:inline-flex;align-items:center;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:var(--st);background:color-mix(in srgb,var(--st) 14%,transparent);border:1px solid color-mix(in srgb,var(--st) 40%,transparent);border-radius:999px;padding:.12rem .5rem;white-space:nowrap}
.al-row .hd{font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-row .hd b{font-weight:600}.al-row .hd .f{color:var(--bs-secondary-color)}
.al-row .msg{font-size:.8rem;margin-top:.1rem;word-break:break-word}
.al-row .dl{font-size:.72rem;color:var(--bs-secondary-color);margin-top:.25rem;display:flex;gap:.7rem;flex-wrap:wrap;align-items:center}
.al-row .when{text-align:right;font-size:.8rem;white-space:nowrap}
.al-row .when small{display:block;font-size:.7rem;color:var(--bs-secondary-color)}
.al-code{margin-top:.35rem;border:1px solid var(--bs-border-color);background:rgba(167,139,250,.06);border-radius:.35rem;padding:.35rem .55rem;font-size:.78rem}
.al-code .k{font-family:ui-monospace,Consolas,monospace;font-size:.75rem;background:var(--bs-secondary-bg);border-radius:.25rem;padding:.05rem .35rem;margin-right:.4rem}
.al-code .mk{color:var(--bs-secondary-color);font-size:.72rem}
.al-code .d{margin-top:.15rem}
.al-code.unk{background:rgba(148,163,184,.06)}
.al-thumb{width:64px;height:48px;border-radius:.3rem;border:1px solid var(--bs-border-color);overflow:hidden;cursor:zoom-in;display:block;padding:0;background:#0f172a;position:relative}
.al-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.al-thumb .cnt{position:absolute;right:2px;bottom:2px;font-size:.6rem;background:rgba(0,0,0,.65);color:#fff;border-radius:.2rem;padding:0 .25rem}
.al-nothumb{width:64px}
.al-side .card-body{font-size:.82rem}
.al-ch{display:flex;align-items:center;gap:.5rem;padding:.3rem 0;border-bottom:1px solid var(--bs-border-color-translucent)}
.al-ch:last-child{border-bottom:0}
.al-ch .s{margin-left:auto;font-size:.72rem;font-weight:600}
.al-ch .on{color:#65a30d}[data-bs-theme=dark] .al-ch .on{color:#a3e635}.al-ch .off{color:var(--bs-secondary-color)}
.al-top li{display:flex;gap:.55rem;align-items:flex-start;padding:.42rem 0;border-bottom:1px solid var(--bs-border-color-translucent)}
.al-top li:last-child{border-bottom:0}.al-top .al-dot{margin-top:.38rem}
.al-top .t{font-size:.86rem}.al-top .s{font-size:.75rem;color:var(--bs-secondary-color)}.al-top .n{font-size:.8rem;color:var(--bs-secondary-color)}
.al-more{text-align:center;margin-top:.6rem}

/* ---- v1.0.73 calm Dashboard (approved mockup): summary strip, Needs attention, simple printer cards, Today line ---- */
.pf-dot{width:10px;height:10px;border-radius:50%;display:inline-block;flex:0 0 10px}
.pf-d-printing{background:#0d6efd}.pf-d-idle{background:#6c757d}.pf-d-attn{background:#ffc107}.pf-d-err{background:#dc3545}.pf-d-off{background:transparent;box-shadow:inset 0 0 0 2px #6c757d}
.pf-sum{display:flex;align-items:center;gap:.25rem;flex-wrap:wrap;font-size:1.05rem}
.pf-sum-it{display:flex;align-items:center;gap:.45rem;padding:.35rem .85rem;border-radius:999px;background:rgba(var(--bs-emphasis-color-rgb),.05)}
.pf-sum-n{font-weight:700;font-size:1.15rem}
.pf-sum-sep{color:var(--bs-secondary-color);padding:0 .1rem}
.pf-sum-attn.pf-sum-hot{background:rgba(255,193,7,.12)}
.pf-dash-main{display:flex;gap:1.5rem;align-items:flex-start}
.pf-dash-left{flex:1 1 auto;min-width:0}
/* Featured Library: 1.25x the v1.0.70 panel (213 px -> 266 px wide at 1440) */
.pf-dash-feat{flex:0 0 266px;width:266px}
@media (max-width:1199.98px){.pf-dash-main{flex-direction:column}.pf-dash-feat{flex:none;width:100%;max-width:325px}}
.pf-attn{border:1px solid rgba(255,193,7,.45);background:rgba(255,193,7,.07);border-radius:.6rem}
.pf-attn-row{display:flex;align-items:center;gap:.75rem;padding:.6rem .9rem}
.pf-attn-row+.pf-attn-row{border-top:1px solid rgba(255,193,7,.2)}
.pf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:1rem}
.pf-pcard{display:block;position:relative;border:1px solid var(--bs-border-color);border-radius:.75rem;padding:1rem 1.05rem .95rem;background:rgba(var(--bs-body-bg-rgb),.92);color:inherit;text-decoration:none;transition:border-color .15s}
.pf-pcard:hover,.pf-pcard:focus-visible{border-color:rgba(var(--bs-emphasis-color-rgb),.35);color:inherit}
.pf-pcard[data-group=attention]{border-color:rgba(255,193,7,.6)}
.pf-pcard[data-group=attention][data-state=error],.pf-pcard[data-group=attention][data-state=shutdown],.pf-pcard[data-group=attention][data-state=cancelled]{border-color:rgba(220,53,69,.6)}
.pf-pcard[data-group=offline],.pf-pcard[data-group=locked]{opacity:.7}
.pf-pc-top{display:flex;align-items:center;gap:.5rem;min-width:0}
.pf-pc-name{font-weight:600;font-size:1.05rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pf-pc-st{margin-left:auto;font-size:.8rem;color:var(--bs-secondary-color);white-space:nowrap}
.pf-pc-file{display:block;font-size:.88rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:.55rem 0 .6rem;min-height:1.3em}
.pf-pcard[data-group=idle] .pf-pc-file,.pf-pcard[data-group=offline] .pf-pc-file{color:var(--bs-secondary-color)}
.pf-pc-bar{display:block;height:4px;border-radius:99px;background:rgba(var(--bs-emphasis-color-rgb),.12);overflow:hidden}
.pf-pc-bar>i{display:block;height:100%;background:#0d6efd;border-radius:99px}
.pf-pcard[data-group=attention] .pf-pc-bar>i{background:#ffc107}
.pf-pcard[data-state=complete] .pf-pc-bar>i{background:#198754}
.pf-pc-meta{display:flex;justify-content:space-between;align-items:center;font-size:.8rem;color:var(--bs-secondary-color);margin-top:.45rem}
.pf-pc-meta b{color:var(--bs-emphasis-color);font-weight:600}
.pf-fil{display:flex;gap:5px}
.pf-fil span{width:11px;height:11px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(127,127,127,.55)}
.pf-fil span.pf-empty{background:repeating-linear-gradient(45deg,#777 0 2px,transparent 2px 4px)}
.pf-pc-hov{display:none;position:absolute;left:.75rem;right:.75rem;top:calc(100% - .4rem);z-index:5;background:var(--bs-tertiary-bg);border:1px solid var(--bs-border-color);border-radius:.5rem;padding:.5rem .7rem;font-size:.78rem;color:var(--bs-secondary-color);box-shadow:0 .5rem 1rem rgba(0,0,0,.3)}
.pf-pcard:hover .pf-pc-hov,.pf-pcard:focus-visible .pf-pc-hov{display:block}
.pf-pcard.pf-loading .pf-pc-hov{display:none}
.pf-today{font-size:.92rem;color:var(--bs-secondary-color)}
.pf-today b{color:var(--bs-emphasis-color)}

/* ---- v1.0.73 Settings: grouped menu + Notifications channel list (one channel open at a time) ---- */
.pf-hide{display:none!important}
.pf-group-desc{margin-bottom:.75rem}
.pf-channels{border:1px solid var(--bs-border-color);border-radius:.6rem;overflow:hidden;background:rgba(var(--bs-body-bg-rgb),.92)}
.pf-ch+.pf-ch{border-top:1px solid var(--bs-border-color)}
.pf-ch-row{display:flex;align-items:center;gap:.75rem;width:100%;padding:.65rem .9rem;background:transparent;border:0;color:inherit;text-align:left}
.pf-ch-row:hover,.pf-ch-row:focus-visible{background:rgba(var(--bs-emphasis-color-rgb),.04)}
.pf-ch-name{font-weight:600;min-width:12rem}
.pf-ch-sum{color:var(--bs-secondary-color);font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;min-width:0}
.pf-ch-chev{color:var(--bs-secondary-color);transition:transform .15s;font-size:1.1rem}
.pf-ch-row:not(.collapsed) .pf-ch-chev{transform:rotate(90deg)}
.pf-ch-pill{font-size:.7rem;font-weight:700;letter-spacing:.03em;padding:.12rem .55rem;border-radius:999px;white-space:nowrap;min-width:3.2rem;text-align:center}
.pf-ch-pill.pf-on{background:rgba(25,135,84,.18);color:#75b798}
.pf-ch-pill.pf-off,.pf-ch-pill.pf-prem,.pf-ch-pill-n{background:var(--bs-secondary-bg);color:var(--bs-secondary-color)}
[data-bs-theme=light] .pf-ch-pill.pf-on{background:#d1e7dd;color:#0f5132}
.pf-ch-basic .pf-ch-name,.pf-ch-basic .pf-ch-sum{opacity:.6}
.pf-ch-body{padding:.25rem .9rem 1rem}
.pf-ch-body > .card{box-shadow:none!important}
.pf-ch-subh{font-size:.8rem;font-weight:600;color:var(--bs-secondary-color);text-transform:uppercase;letter-spacing:.04em;margin:.5rem 0 .4rem}

/* ---- v1.0.74 Printers list view (one row per printer; click a row to open its card under it) ---- */
.pf-prlist-wrap{border:1px solid var(--bs-border-color);border-radius:.6rem;background:var(--bs-body-bg)}
.pf-prtable{--bs-table-bg:transparent}
.pf-prtable thead th{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--bs-secondary-color);white-space:nowrap;border-bottom-width:1px}
.pf-prtable td,.pf-prtable th{padding:.5rem .6rem}
.pf-prow{cursor:pointer}
.pf-prow:focus-visible{outline:2px solid var(--bs-primary);outline-offset:-2px}
.pf-prow.pf-open>td{background:rgba(var(--bs-primary-rgb),.08)}
.pf-prow-off{opacity:.65}
.pf-prow-locked{cursor:default;opacity:.7}
.pf-prow.pf-loading td{color:var(--bs-secondary-color)}
.pf-pl-dot{width:1.6rem}
.pf-pl-file{max-width:16rem}
.pf-pl-sub{max-width:12rem}
.pf-pl-prog{min-width:7.5rem;width:9rem}
.pf-pl-prog .pf-pc-bar{margin-bottom:.2rem}
.pf-pl-act .btn{color:var(--bs-secondary-color);line-height:1}
.pf-pl-act .btn:hover{color:var(--bs-emphasis-color)}
.pf-pl-act .btn.text-danger{color:var(--bs-danger)!important;opacity:.75}
.pf-pl-act .btn.text-danger:hover{opacity:1}
.pf-fil span.pf-fil-on{box-shadow:0 0 0 2px var(--bs-body-bg),0 0 0 3px var(--bs-primary)}
.pf-pdet>td{background:rgba(var(--bs-emphasis-color-rgb),.025);padding:.75rem}
.pf-pdet-card{max-width:26rem}
.pf-pdet-card>.pf-slot{width:100%;max-width:100%;padding:0}
.pf-pl-pt{white-space:nowrap}
@media (max-width:575.98px){.pf-pl-pt{white-space:normal}.pf-pl-prog{min-width:5rem;width:5rem}.pf-pl-sub{max-width:7rem}.pf-prtable td,.pf-prtable th{padding:.45rem .35rem}.pf-pl-act .btn{padding:.2rem!important}}
/* R1: free Premium trial banner (calm, never red) + browse-only Library buttons during the trial (greyed, no lock) */
.pf-trial-banner{background:var(--bs-info-bg-subtle);color:var(--bs-info-text-emphasis);border-bottom:1px solid var(--bs-info-border-subtle)}
.pf-trial-banner .btn-link{color:inherit;font-weight:600;text-decoration:underline}
.pf-mw-trial .btn:disabled{opacity:.45;cursor:not-allowed;pointer-events:auto}
/* Demo mode (demo.layersake.com): small calm-blue badge and notes, never red. */
.pf-demo-badge{background:#1e3a8a;color:#dbeafe;border:1px solid #3b82f6;font-weight:600}
.pf-demo-note{background:rgba(59,130,246,.12);border:1px solid rgba(59,130,246,.35);color:inherit;border-radius:.5rem}
