:root {
  /* colours, fonts and the top bar live in themes.css (SimpleLogistics, Dark, Classic blue) */
  --radius: 6px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0 0 4px; font-weight: 700; font-family: var(--head); color: var(--heading); }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 700; font-family: var(--head); color: var(--heading); }
h3 { font-size: 13px; margin: 14px 0 8px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
pre { background: var(--code-bg); color: var(--code-text); padding: 12px 14px; border-radius: var(--radius); overflow: auto; margin: 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; } .grow { flex: 1; } .spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }

/* ---- top bar */
.topbar { height: 52px; display: flex; align-items: center; gap: 4px; padding: 0 16px; background: var(--top-bg); color: var(--top-text); position: sticky; top: 0; z-index: 20; box-shadow: var(--top-shadow); }
.brand { font-weight: 700; letter-spacing: .01em; margin-right: 14px; white-space: nowrap; display: flex; align-items: center; gap: 8px; color: var(--top-strong); font-family: var(--head); font-weight: 800; }
.brand .logo { width: 22px; height: 22px; border-radius: 5px; background: var(--logo-bg); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.nav a { color: var(--top-muted); padding: 6px 9px; border-radius: 5px; font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.nav a:hover { background: var(--top-hover); text-decoration: none; color: var(--top-strong); }
.nav a.active { background: var(--top-active); color: var(--top-active-text); }
.usermenu { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--top-muted); font-size: 13px; }
.usermenu .roles { font-size: 11px; color: var(--top-faint); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--avatar-bg); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }

/* ---- page */
.page { max-width: 1240px; margin: 0 auto; padding: 22px 20px 60px; }
.pagehead { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.card .body { padding: 16px; }
.card .head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.filterbar input, .filterbar select { width: auto; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

/* ---- tables */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--panel-2); white-space: nowrap; }
table.list td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click { cursor: pointer; } table.list tr.click:hover td { background: var(--row-hover); }
.table-wrap { overflow-x: auto; }
.empty { padding: 32px; text-align: center; color: var(--muted); }

/* ---- controls */
button, .btn { font: inherit; font-weight: 550; border: 1px solid var(--border-strong); background: var(--control-bg); color: var(--text); padding: 6px 12px; border-radius: var(--btn-radius); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; line-height: 1.3; }
button:hover:not(:disabled) { background: var(--hover); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button.danger { color: var(--err); border-color: var(--err-border); }
button.danger:hover:not(:disabled) { background: var(--err-weak); }
button.ghost { border-color: transparent; background: transparent; }
button.ghost:hover:not(:disabled) { background: var(--ghost-hover); }
button.sm { padding: 3px 8px; font-size: 12.5px; }
button.icon { padding: 5px 7px; }
button.on { background: var(--accent-weak); border-color: var(--accent-ring); color: var(--accent); }
input, select, textarea { font: inherit; color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 6px 9px; background: var(--control-bg); width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-ring); outline-offset: 0; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: auto; margin: 0; accent-color: var(--accent); }
input[type=color] { padding: 1px 2px; height: 30px; }
textarea { resize: vertical; }
textarea.code { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; tab-size: 2; }
label.field { display: block; margin-bottom: 10px; }
label.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.fields2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.fields4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 8px; }
.hint { font-size: 12px; color: var(--muted); margin-top: -6px; margin-bottom: 10px; }

/* ---- badges */
.badge { display: inline-block; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 999px; letter-spacing: .02em; background: var(--badge-bg); color: var(--badge-text); white-space: nowrap; }
.badge.DRAFT { background: var(--draft-weak); color: var(--draft); }
.badge.PUBLISHED, .badge.SUCCESS, .badge.ok { background: var(--ok-weak); color: var(--ok); }
.badge.ARCHIVED { background: var(--badge-bg); color: var(--muted); }
.badge.FAILED, .badge.err { background: var(--err-weak); color: var(--err); }
.badge.warn { background: var(--warn-weak); color: var(--warn); }
.badge.fmt { background: var(--fmt-bg); color: var(--fmt-text); font-family: var(--mono); }
.badge.ws { background: var(--draft-weak); color: var(--draft); font-family: var(--mono); }
.ws-picker { width: auto; max-width: 220px; padding: 4px 8px; font-size: 12px; background: var(--top-input-bg); color: var(--top-input-text); border: 1px solid var(--top-input-border); border-radius: 6px; }

/* ---- alerts / toast */
.alert { padding: 10px 12px; border-radius: var(--radius); border: 1px solid; font-size: 13px; }
.alert.err { background: var(--err-weak); border-color: var(--err-border); color: var(--err-ink); }
.alert.warn { background: var(--warn-weak); border-color: var(--warn-border); color: var(--warn-ink); }
.alert.info { background: var(--accent-weak); border-color: var(--accent-ring); color: var(--accent-ink); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
#toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--toast-bg); color: #fff; padding: 10px 14px; border-radius: var(--radius); box-shadow: var(--shadow-lg); max-width: 420px; font-size: 13px; animation: slidein .18s ease-out; }
.toast.err { background: #8c1d1f; } .toast.ok { background: #135b31; }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- modal */
.modal-back { position: fixed; inset: 0; background: rgba(15,23,41,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 10px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal.wide { width: min(1100px, 100%); height: calc(100vh - 32px); }
.modal .mhead { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.modal .mhead h2 { margin: 0; }
.modal .mbody { padding: 16px 18px; overflow: auto; flex: 1; }
.modal .mfoot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.modal iframe { width: 100%; height: 100%; border: 1px solid var(--border); border-radius: 6px; background: #525659; }

/* ---- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--login-bg); padding: 16px; }
.login { width: min(380px, 100%); background: var(--panel); border-radius: 12px; padding: 28px; box-shadow: var(--shadow-lg); }
.login .brand { color: var(--text); margin-bottom: 18px; font-size: 18px; }

/* ================================================================= designer */
body.designing { overflow: hidden; }
.designer { display: grid; grid-template-rows: auto 1fr; height: calc(100vh - 52px); }
.dtoolbar { display: flex; align-items: center; gap: 6px; padding: 7px 12px; background: var(--panel); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.dtoolbar .title { font-weight: 650; margin-right: 6px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtoolbar .sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.dtoolbar .dirty { color: var(--warn); font-size: 12px; font-weight: 600; }
.presence { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.presence .avatar { border: 2px solid var(--panel); margin-left: -6px; background: #7a5af8; }
.dmain { display: grid; grid-template-columns: 240px 1fr 300px; min-height: 0; }
.dside { background: var(--panel); border-right: 1px solid var(--border); overflow: auto; min-height: 0; }
.dside.right { border-right: 0; border-left: 1px solid var(--border); }
.dside .sect { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.dside h3:first-child { margin-top: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.tabs button { flex: 1; border: 0; border-radius: 0; background: none; padding: 9px 4px; font-size: 12.5px; color: var(--muted); border-bottom: 2px solid transparent; justify-content: center; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.palette { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.palette .pitem { border: 1px solid var(--border); border-radius: 6px; padding: 8px 6px; font-size: 12px; text-align: center; cursor: grab; background: var(--panel-2); user-select: none; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.palette .pitem:hover { border-color: var(--accent); background: var(--accent-weak); }
.palette .pitem .ic { font-size: 16px; line-height: 1; color: var(--badge-text); }
.palette .pitem .fmt { font-size: 9.5px; color: var(--faint); }
.tree { font-size: 12.5px; font-family: var(--mono); }
.tree .node { padding: 2px 4px; border-radius: 4px; cursor: grab; display: flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.tree .node:hover { background: var(--accent-weak); }
.tree .node .v { color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.tree .node .k { color: var(--fmt-text); }
.tree .node.arr .k::after { content: '[]'; color: var(--draft); }
.outline .oitem { padding: 4px 6px; border-radius: 4px; cursor: pointer; display: flex; gap: 6px; font-size: 12.5px; align-items: center; }
.outline .oitem:hover { background: var(--hover); }
.outline .oitem.sel { background: var(--accent-weak); color: var(--accent); }
.outline .oitem .t { font-family: var(--mono); font-size: 11px; color: var(--faint); }

.canvas-wrap { overflow: auto; background: var(--canvas-bg); position: relative; min-height: 0; isolation: isolate; }
.canvas-wrap.bottom-open { }
.canvas-pad { padding: 40px; display: inline-block; min-width: 100%; }
.page-el { position: relative; background: #fff; box-shadow: 0 2px 10px rgba(16,24,40,.18); margin: 0 auto; }
.page-el.grid { background-image: linear-gradient(to right, rgba(36,86,214,.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(36,86,214,.07) 1px, transparent 1px); }
.guide { position: absolute; pointer-events: none; }
.guide.margin { border: 1px dashed rgba(36,86,214,.35); }
.guide.band { background: rgba(122,90,248,.06); border-bottom: 1px dashed rgba(122,90,248,.45); }
.guide.band.footer { border-bottom: 0; border-top: 1px dashed rgba(122,90,248,.45); }
.guide .blabel { position: absolute; right: 3px; font-size: 9px; color: #7a5af8; text-transform: uppercase; letter-spacing: .06em; }
.el { position: absolute; cursor: move; outline: 1px dashed transparent; }
.el:hover { outline-color: rgba(36,86,214,.5); }
.el.sel { outline: 1.5px solid var(--accent); z-index: 1000 !important; }
.el.off { opacity: .35; }
.el.cond::after { content: 'if'; position: absolute; top: -1px; right: -1px; font: 700 8px/1 var(--font); background: #f59e0b; color: #fff; padding: 2px 3px; border-radius: 0 0 0 3px; }
.el.err { outline: 1.5px solid var(--err) !important; }
.el .txt { width: 100%; height: 100%; overflow: hidden; white-space: pre-wrap; word-break: break-word; line-height: 1.15; display: flex; flex-direction: column; }
.el img { width: 100%; height: 100%; display: block; pointer-events: none; }
.el .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 11px; color: #667085; background: repeating-linear-gradient(45deg, #f6f7f9, #f6f7f9 6px, #eceef2 6px, #eceef2 12px); border: 1px solid #d8dbe1; text-align: center; overflow: hidden; padding: 2px; }
.el .ph.bad { color: var(--err); background: var(--err-weak); border-color: var(--err-border); }
.el table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.el table td, .el table th { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 3px; }
.el.repeater { background: rgba(34,193,164,.05); outline: 1px dashed rgba(34,193,164,.8); }
.el .ghost { position: absolute; top: 0; outline: 1px dashed rgba(34,193,164,.6); pointer-events: none; }
.el .rlabel { position: absolute; top: -14px; left: 0; font-size: 9.5px; color: #138a74; white-space: nowrap; }
.el.pagebreak { border-top: 2px dashed var(--err); height: 0 !important; }
.el.pagebreak::before { content: 'page break'; position: absolute; top: -14px; left: 0; font-size: 9.5px; color: var(--err); }
.handle { position: absolute; width: 8px; height: 8px; background: #fff; border: 1.5px solid var(--accent); border-radius: 2px; z-index: 2; }
.handle.nw { left: -5px; top: -5px; cursor: nwse-resize; } .handle.ne { right: -5px; top: -5px; cursor: nesw-resize; }
.handle.sw { left: -5px; bottom: -5px; cursor: nesw-resize; } .handle.se { right: -5px; bottom: -5px; cursor: nwse-resize; }
.handle.n { left: calc(50% - 4px); top: -5px; cursor: ns-resize; } .handle.s { left: calc(50% - 4px); bottom: -5px; cursor: ns-resize; }
.handle.w { top: calc(50% - 4px); left: -5px; cursor: ew-resize; } .handle.e { top: calc(50% - 4px); right: -5px; cursor: ew-resize; }
.drop-hint { outline: 2px dashed #22c1a4 !important; }
.coords { position: absolute; left: 8px; bottom: 6px; font: 11px var(--mono); color: var(--muted); background: var(--panel); opacity: .9; padding: 2px 6px; border-radius: 4px; pointer-events: none; }

.bottom { border-top: 1px solid var(--border); background: var(--panel); display: flex; flex-direction: column; }
.problems { font-size: 12.5px; max-height: 220px; overflow: auto; }
.problem { display: flex; gap: 8px; padding: 5px 8px; border-radius: 4px; cursor: pointer; align-items: baseline; }
.problem:hover { background: var(--hover); }
.problem .code { font-family: var(--mono); font-size: 10.5px; flex: none; }
.cols-editor .col { display: grid; grid-template-columns: 1fr 1fr 52px auto; gap: 4px; margin-bottom: 4px; align-items: center; }
.cols-editor .col input, .cols-editor .col select { padding: 4px 6px; font-size: 12px; }
.readonly-banner { background: var(--warn-weak); color: var(--warn-ink); font-size: 12.5px; padding: 6px 12px; border-bottom: 1px solid var(--warn-border); display: flex; align-items: center; gap: 10px; }
.conflict-banner { background: var(--err-weak); color: var(--err-ink); font-size: 12.5px; padding: 6px 12px; border-bottom: 1px solid var(--err-border); display: flex; align-items: center; gap: 10px; }
.kbd { font: 11px var(--mono); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--control-bg); }
@media (max-width: 1100px) { .dmain { grid-template-columns: 200px 1fr 260px; } }

/* ---- LEDs (heartbeat) */
.led { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; background: #9ca3af; box-shadow: inset 0 -1px 2px rgba(0,0,0,.25); vertical-align: -1px; }
.led.green { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.9), inset 0 -1px 2px rgba(0,0,0,.2); }
.led.amber { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,.8); }
.led.red { background: #ef4444; box-shadow: 0 0 7px rgba(239,68,68,.9); animation: ledblink 1s steps(2, start) infinite; }
.led.grey { background: #9ca3af; }
.led.beat { animation: ledbeat .6s ease-out; }
@keyframes ledbeat { 0% { transform: scale(1.5); filter: brightness(1.4); } 100% { transform: scale(1); } }
@keyframes ledblink { to { opacity: .35; } }
.srvled { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--top-faint); margin-right: 6px; }
.agentchip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; background: var(--panel-2); min-width: 240px; }
.agentchip .meta { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.sitecard { margin-bottom: 18px; }
.sitecard .agents { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.ev { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.ev:last-child { border-bottom: 0; }
.qcount { font-weight: 700; }
.qcount.zero { color: var(--faint); font-weight: 400; }

/* ---- print preview */
.pv { display: flex; flex-direction: column; min-height: 0; }
.pv-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.pv-page { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 92px; text-align: center; }
.pv-zoom { width: auto; padding: 4px 8px; font-size: 12.5px; }
.pv-stage { background: var(--canvas-bg); border-radius: 8px; height: min(70vh, 760px); overflow: auto; display: flex; padding: 20px; }
.pv-sheet { margin: auto; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.18), 0 8px 24px rgba(16,24,40,.12); line-height: 0; }
.pv-img { display: block; max-width: none; user-select: none; }
.pv-img.sharp { image-rendering: pixelated; }
.pv-compact .pv-stage { height: min(52vh, 560px); }
.print-dlg { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
@media (max-width: 760px) { .print-dlg { grid-template-columns: 1fr; } }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; }
.seg button.active { background: var(--accent); color: var(--accent-text); }

/* ---- signatures */
.fields3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 700px) { .fields3 { grid-template-columns: 1fr; } }
.sign-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-top: 8px; background: var(--panel-2); display: flex; flex-direction: column; gap: 10px; }
.sign-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.sign-card { margin-bottom: 10px; }
.sign-card .head { display: flex; gap: 8px; align-items: center; }
.sign-card details summary { cursor: pointer; color: var(--accent); font-size: 13px; }

/* ---- dashboard */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 650; line-height: 1.25; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--muted); }
.stat.ok { border-left: 3px solid var(--ok); } .stat.warn { border-left: 3px solid var(--warn); } .stat.err { border-left: 3px solid var(--err); }
.chart { position: relative; }
.chart-top { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; min-height: 22px; }
.chart-legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.chart-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.sw.success, .seg.success { background: var(--chart-ok); } .sw.failed, .seg.failed { background: var(--err); }
.chart-tip { margin-left: auto; font-size: 12px; background: var(--toast-bg); color: #fff; padding: 2px 8px; border-radius: 4px; }
.chart-cols { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--border-strong);
  background-image: linear-gradient(var(--border) 1px, transparent 1px); background-size: 100% 35px; background-position: 0 -1px; }
.chart-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; cursor: default; outline: none; }
.chart-col:hover, .chart-col:focus { background: rgba(36,86,214,.06); }
.chart-col .seg { width: 100%; min-height: 2px; }
.chart-col .seg:first-child { border-radius: 4px 4px 0 0; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin: 4px 0 6px; }
.sites-status { display: grid; gap: 10px; }
.site-status .head { padding: 8px 12px; } .site-status .body { padding: 6px 12px 10px; }
table.list.compact td { padding: 5px 6px; }
.hbar { background: var(--panel-2); border-radius: 3px; height: 10px; } .hbar > div { background: var(--accent); height: 10px; border-radius: 3px; }
/* many menu items (super administrators): the menu scrolls instead of pushing the user menu off screen */
.topbar .nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar .nav::-webkit-scrollbar { display: none; }
.topbar .usermenu { flex: none; }
.topbar .ws-picker { max-width: 200px; }

/* ---- send a PDF for signing */
.signreq .card { margin-bottom: 14px; }
.signer-row { display: flex; gap: 8px; align-items: center; }
.signer-row .fields4 { flex: 1; display: grid; grid-template-columns: 1.2fr 1.4fr 1fr 1fr; gap: 8px; }
@media (max-width: 900px) { .signer-row .fields4 { grid-template-columns: 1fr 1fr; } }
.signer-row .dot { width: 24px; height: 24px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.place-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; position: sticky; top: 52px; background: var(--panel); z-index: 3; padding: 6px 0; }
.place-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 18px; }
.sheet { position: relative; width: 100%; border: 1px solid var(--border-strong); background: #fff; cursor: crosshair; user-select: none; box-shadow: var(--shadow); }
.sheet img { width: 100%; height: 100%; display: block; pointer-events: auto; }
.sheet .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.ffield { position: absolute; border: 1.5px dashed; border-radius: 3px; font-size: 10px; line-height: 1.1; overflow: hidden; cursor: move; touch-action: none; display: flex; align-items: flex-start; padding: 2px 14px 2px 3px; }
.ffield span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; pointer-events: none; }
.ffield .del { position: absolute; right: 0; top: 0; padding: 0 4px; min-height: 0; border: 0; background: transparent; color: inherit; font-size: 13px; line-height: 1; cursor: pointer; }
.ffield .grip { position: absolute; right: 0; bottom: 0; width: 9px; height: 9px; background: currentColor; cursor: nwse-resize; opacity: .7; }

/* ---- licenses */
.lic-notice { padding: 7px 16px; font-size: 13px; text-align: center; }
.lic-notice.info { background: var(--accent-weak); color: var(--accent-ink); }
.lic-notice.err { background: var(--err-weak); color: var(--err-ink); }
.lic-notice a { font-weight: 600; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 800px) { .grid3 { grid-template-columns: 1fr; } }
.meter .hbar { margin-top: 6px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.plan { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.plan.current { border-color: var(--ok); box-shadow: 0 0 0 2px var(--ok-weak); }
.plan.sales { background: var(--panel-2); }
.plan-name { font-weight: 700; font-size: 15px; }
.plan-price { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-price span { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text); display: flex; flex-direction: column; gap: 3px; flex: 1; }
.tabs.ptabs { position: static; margin-bottom: 14px; background: transparent; } .tabs.ptabs button { flex: 0 0 auto; padding: 9px 16px; font-size: 14px; }
.navmenu { position: relative; }
.navmenu summary { list-style: none; cursor: pointer; color: var(--top-muted); padding: 6px 9px; border-radius: 5px; font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.navmenu summary::-webkit-details-marker { display: none; }
.navmenu summary::after { content: ' ▾'; font-size: 11px; }
.navmenu[open] summary, .navmenu summary:hover, .navmenu.active summary { background: var(--top-active); color: var(--top-active-text); }
.navmenu-list { position: fixed; margin-top: 6px; background: var(--top-menu-bg); border: 1px solid var(--top-menu-border); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; min-width: 180px; box-shadow: var(--shadow-lg); z-index: 50; }
.navmenu-list a { color: var(--top-muted); padding: 7px 10px; border-radius: 5px; font-size: 13.5px; }
.navmenu-list a:hover, .navmenu-list a.active { background: var(--top-hover); color: var(--top-strong); text-decoration: none; }

/* template gallery (2026.4.043) */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery-card { overflow: hidden; display: flex; flex-direction: column; }
.gallery-card .thumb { height: 180px; background: repeating-conic-gradient(var(--line) 0 25%, transparent 0 50%) 0 0 / 16px 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-bottom: 1px solid var(--line); }
.gallery-card .thumb img { max-width: 92%; max-height: 92%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.gallery-card .body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.badge.tag { background: var(--draft-weak); color: var(--draft); }

/* print workflows (2026.4.045) */
.wf-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; padding: 4px 2px 14px; }
.wf-flow.mini { align-items: center; flex-wrap: wrap; overflow: visible; padding: 6px 0; gap: 6px; }
.wf-step { flex: 1 1 200px; min-width: 200px; max-width: 320px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); display: flex; flex-direction: column; }
.wf-step.off { opacity: .75; }
.wf-step-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.wf-ic { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--draft-weak); color: var(--draft); font-size: 14px; }
.wf-step-body { padding: 10px 12px; }
.wf-step-body input:not([type=checkbox]):not([type=radio]), .wf-step-body select, .wf-step-body textarea { width: 100%; box-sizing: border-box; }
.wf-step-body label.check { display: flex; gap: 8px; align-items: flex-start; }
.wf-arrow { align-self: center; color: var(--muted, #888); font-size: 20px; flex: none; }
.wf-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--badge-bg); color: var(--badge-text); font-size: 12px; white-space: nowrap; }
.wf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.wf-map td { padding: 3px 4px; } .wf-map td:first-child { white-space: nowrap; }
.wf-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px; text-align: center; }
textarea.bad { outline: 2px solid var(--err, #c33); }
