:root {
	--bg: #f4f5f7; --panel: #ffffff; --panel-2: #f8f9fb; --text: #1d2129; --muted: #626b7a; --border: #e2e5ea;
	--accent: #5865f2; --accent-ink: #ffffff; --accent-soft: #eef0ff;
	--ok: #1f9d55; --ok-soft: #e5f6ec; --warn: #b7791f; --warn-soft: #fdf3e1; --bad: #d64545; --bad-soft: #fde8e8;
	--shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
	--radius: 10px; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color-scheme: light;
}
/* theme: follows the computer unless the person picked Light / Dark (My Account → Profile) */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #15171c; --panel: #1d2027; --panel-2: #23272f; --text: #e7e9ee; --muted: #9aa3b2; --border: #2e333d;
		--accent: #7b85ff; --accent-ink: #0f1115; --accent-soft: #262b45;
		--ok: #3fc07a; --ok-soft: #1b3326; --warn: #e0a84a; --warn-soft: #3a2f1a; --bad: #f06b6b; --bad-soft: #3d2222;
		--shadow: 0 1px 2px rgba(0, 0, 0, .4);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
		--bg: #15171c; --panel: #1d2027; --panel-2: #23272f; --text: #e7e9ee; --muted: #9aa3b2; --border: #2e333d;
		--accent: #7b85ff; --accent-ink: #0f1115; --accent-soft: #262b45;
		--ok: #3fc07a; --ok-soft: #1b3326; --warn: #e0a84a; --warn-soft: #3a2f1a; --bad: #f06b6b; --bad-soft: #3d2222;
		--shadow: 0 1px 2px rgba(0, 0, 0, .4);
		color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.boot { padding: 40px; color: var(--muted); }

/* ---------- layout */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--border); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; padding: 4px 8px 16px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: #fff; font-size: 16px; }
.nav button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left; color: var(--muted); }
.nav button:hover { background: var(--panel-2); color: var(--text); }
.nav button.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav .ico { width: 20px; text-align: center; }
.side-foot { margin-top: 18px; padding: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar h1 { font-size: 18px; margin: 0 auto 0 0; }
.content { padding: 20px 24px 60px; max-width: 1200px; }

/* ---------- pieces */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; }
.card h2 { font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.banner { border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; border: 1px solid; }
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.banner.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.banner.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--panel-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { padding: 4px 8px; font-size: 12px; }
.btn.icon { padding: 4px 7px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--border); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.online { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .pill.online .dot { background: var(--ok); }
.pill.starting, .pill.stopping, .pill.external { background: var(--warn-soft); color: var(--warn); border-color: transparent; } .pill.starting .dot, .pill.stopping .dot, .pill.external .dot { background: var(--warn); }
.pill.crashed, .pill.stopped { background: var(--bad-soft); color: var(--bad); border-color: transparent; } .pill.crashed .dot, .pill.stopped .dot { background: var(--bad); }

label.field, div.field { display: block; margin-bottom: 12px; }
label.field > span, div.field > span { display: block; font-weight: 600; font-size: 12px; margin-bottom: 4px; }
input[type=text], input[type=password], input[type=number], input[type=time], input[type=email], input[type=tel], input[type=date], input[type=search], input[type=url], select, textarea {
	width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 90px; resize: vertical; }
input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 6px 0; }
.inline-num { width: 90px !important; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12px; }
.chip .sw { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.list-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: middle; }
.emoji { font-size: 18px; width: 26px; text-align: center; }
.preview { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; }

.logs { background: #0f1115; color: #d7dbe3; border-radius: 8px; padding: 10px 12px; font-family: var(--mono); font-size: 12px; height: 520px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.logs.short { height: 220px; }
.logs .err { color: #ff8b8b; } .logs .dash { color: #8fb3ff; } .logs .t { color: #6b7280; }

/* dialog */
dialog { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10, 12, 18, .45); }
.dlg-head { padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 700; }
.dlg-body { padding: 16px 18px; max-height: 65vh; overflow-y: auto; }
.dlg-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.picker { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; margin-top: 8px; }
.picker label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; border-bottom: 1px solid var(--border); }
.picker label:last-child { border-bottom: 0; }
.picker label:hover { background: var(--panel-2); }

/* toasts */
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; }
.toast { background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--ok); border-radius: 8px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-width: 420px; }
.toast.bad { border-left-color: var(--bad); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(380px, 100%); }

/* phone: the side menu becomes a drawer behind the ☰ button */
.menu-btn, .drawer-backdrop { display: none; }
@media (max-width: 820px) {
	.shell { grid-template-columns: 1fr; }
	.side { position: fixed; z-index: 30; top: 0; left: 0; bottom: 0; width: min(290px, 84vw); height: 100%; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.25); padding-top: calc(16px + env(safe-area-inset-top)); }
	body.drawer-open .side { transform: none; }
	body.drawer-open .drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(10, 12, 18, .4); }
	body.drawer-open { overflow: hidden; }
	.nav button { padding: 11px 10px; font-size: 15px; }
	.menu-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: -6px; border: 0; border-radius: 10px; background: none; font-size: 22px; cursor: pointer; color: var(--text); }
	.topbar { padding: calc(8px + env(safe-area-inset-top)) 12px 8px; gap: 8px; }
	.topbar h1 { font-size: 17px; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55vw; }
	.topbar .row .btn { padding: 6px 9px; }
	.content { padding: 14px 12px calc(90px + env(safe-area-inset-bottom)); }
	.card { padding: 14px 14px; border-radius: 12px; }
	dialog, dialog.wide-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; border: 0; }
	dialog .dlg-body { max-height: none; flex: 1; }
	dialog[open] { display: flex; flex-direction: column; }
	.dlg-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important; flex-wrap: wrap; }
	input, select, textarea { font-size: 16px; } /* no zoom-in on iPhone */
	.grid.two { grid-template-columns: 1fr; }
}

/* ---------- reconciliations & users */
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 1000px) { .grid.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid.four { grid-template-columns: 1fr; } }
.recon-row { border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin: 10px 0; background: var(--panel-2); }
.grow-input { flex: 1; min-width: 160px; font-weight: 600; }
.inline-text { width: 160px !important; }
.section-title { font-size: 16px; margin: 24px 0 10px; }
.savebar { position: sticky; top: 62px; z-index: 4; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; box-shadow: var(--shadow); }
table.mapping td:first-child { width: 40%; }
.req { color: var(--bad); }
table.recon td { padding: 5px 10px; }
table.recon tr.recon-head td { padding-top: 16px; border-bottom: 0; }
table.recon tr.recon-opera td { border-bottom: 2px solid var(--border); }
td.diff { background: var(--warn-soft); color: var(--warn); font-weight: 600; border-radius: 4px; }
.indent { padding-left: 26px; }
/* inline controls inside rows keep their natural size */
.row > select { width: auto; min-width: 150px; max-width: 100%; flex: 0 1 auto; }
.row > input[type=text], .row > input[type=password] { width: auto; flex: 0 1 220px; min-width: 120px; }
.row > .grow-input { flex: 1 1 260px; }
.savebar { top: 0; position: relative; }
.content .savebar { position: sticky; top: 70px; }
@media (max-width: 820px) { .content .savebar { top: 0; position: relative; } }
.grid.recon-grid { grid-template-columns: minmax(140px, 1fr) minmax(220px, 2.2fr) minmax(180px, 1.4fr); gap: 0 12px; }
.recon-grid select { width: 100%; }
@media (max-width: 900px) { .grid.recon-grid { grid-template-columns: 1fr; } }
.inline-picker { border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-top: 8px; background: var(--panel-2); }
.list-item > input[type=text] { flex: 1; }

/* ---------- Backup Emails */
.content.wide { max-width: none; padding: 0; }
.mail-shell { display: grid; grid-template-columns: 230px minmax(300px, 380px) 1fr; height: calc(100vh - 57px); background: var(--panel); }
.mail-shell.empty { display: block; padding: 20px 24px; background: none; height: auto; }
.mail-col { min-height: 0; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.mail-col:last-child { border-right: 0; }
.mail-left { background: var(--panel-2); overflow-y: auto; }
.mail-left-head { padding: 12px; border-bottom: 1px solid var(--border); }
.mail-left-head select { width: 100%; }
.mail-box-name { font-weight: 700; }
.pad { padding: 10px 12px; }
.center { text-align: center; }
.nowrap { flex-wrap: nowrap; white-space: nowrap; }
.row.nowrap > .field, .row.nowrap > input { flex: 1; min-width: 0; }
.bad-text { color: var(--bad); }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.mfolders { padding: 6px 0; }
.mfolder { display: flex; width: 100%; gap: 6px; align-items: center; border: 0; background: none; padding: 6px 12px; cursor: pointer; text-align: left; color: var(--text); }
.mfolder:hover { background: var(--panel); }
.mfolder.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.mfolder-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mfolder-n { color: var(--muted); font-size: 12px; font-weight: 400; }
.mlist-head { padding: 10px; border-bottom: 1px solid var(--border); }
.mlist-head input[type=search] { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.mlist-count { margin-top: 6px; }
.mfilters { margin-top: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.mfilters-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mfilters .field input { width: 100%; }
.mlist { overflow-y: auto; flex: 1; }
.mitem { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border); background: none; padding: 9px 12px; cursor: pointer; color: var(--text); border-left: 3px solid transparent; }
.mitem:hover { background: var(--panel-2); }
.mitem.active { background: var(--accent-soft); border-left-color: var(--accent); }
.mitem-top { display: flex; gap: 6px; align-items: baseline; }
.mitem-from { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mitem-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.mitem-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mitem-prev { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mitem-where { color: var(--accent); font-size: 11px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-read { background: var(--panel); }
.mread-head { padding: 14px 18px 10px; border-bottom: 1px solid var(--border); }
.mread-subj { margin: 0 0 8px; font-size: 18px; line-height: 1.3; word-break: break-word; }
.mread-meta { word-break: break-word; }
.matts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.matt { display: inline-flex; align-items: center; max-width: 280px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); color: var(--text); text-decoration: none; font-size: 13px; }
.matt:hover { border-color: var(--accent); }
.matt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mremote { margin-top: 10px; padding: 6px 10px; border-radius: 8px; background: var(--warn-soft); }
.mframe { flex: 1; width: 100%; border: 0; background: #fff; min-height: 200px; }
.mread-empty { margin: auto; text-align: center; }
.mread-empty-ico { font-size: 44px; opacity: .5; }
.mprogress { position: relative; height: 18px; min-width: 140px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--border); overflow: hidden; }
.mprogress-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); border-right: 2px solid var(--accent); transition: width .5s; }
.mprogress span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 16px; }
.audit { max-height: 480px; overflow-y: auto; }
@media (max-width: 1000px) {
	.mail-shell { grid-template-columns: 1fr; height: auto; }
	.mail-col { border-right: 0; border-bottom: 1px solid var(--border); }
	.mlist { max-height: 50vh; }
	.mframe { min-height: 70vh; }
}
.mitem:focus { outline: none; } .mitem:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---------- Remote Access */
.btn.ghost { border-color: transparent; background: none; }
.ok-text { color: var(--ok); }
.logs .log-dash { color: #8fb3ff; }
.remote-log { max-height: 240px; }
.remote-search { flex: 1; max-width: 320px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.remote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.remote-dev { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--panel-2); display: flex; flex-direction: column; gap: 8px; }
.remote-dev.off { opacity: .65; }
.remote-dev-top { display: flex; gap: 10px; align-items: flex-start; }
.remote-ico { font-size: 22px; line-height: 1; }
.remote-dev-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.remote-os { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-viewer { display: flex; flex-direction: column; height: calc(100vh - 57px); }
.remote-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--panel); }
.remote-frame { flex: 1; width: 100%; border: 0; background: #fff; }

/* ---------- v9: two-step verification */
[hidden] { display: none !important; }
.login .card.login-wide { width: min(460px, 100%); }
.login h2 { font-size: 17px; margin: 4px 0 8px; }
.code-input { font-family: var(--mono); font-size: 22px !important; letter-spacing: .2em; text-align: center; }
.qr-wrap { display: flex; justify-content: center; margin: 8px 0; }
.qr { background: #fff; padding: 8px; border-radius: 10px; width: 220px; height: 220px; image-rendering: pixelated; }
.secret { word-break: break-all; padding: 8px; background: var(--panel-2); border-radius: 8px; margin-top: 6px; user-select: all; }
.enroll-steps { padding-left: 18px; margin: 6px 0; }
.recovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; padding: 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; margin: 10px 0; font-size: 15px; user-select: all; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* ---------- v9: side menu categories */
.nav-group + .nav-group { margin-top: 10px; }
.nav .nav-head { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 4px 10px; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: none; border: 0; cursor: pointer; }
.nav .nav-head:hover { color: var(--text); background: none; }
.nav-caret { font-size: 10px; opacity: .7; }
@media (max-width: 820px) {
	.nav .nav-head { padding: 10px 10px 6px; font-size: 12px; } /* phone: the categories stay, and fold like on the computer */
}

/* ---------- v9: Dashboard Layout */
.lay-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 12px; background: var(--panel-2); }
.lay-group-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.lay-group-name { font-weight: 700; flex: 1 1 240px; max-width: 360px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.lay-items { display: flex; flex-direction: column; gap: 4px; }
.lay-item { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.lay-item.dragging { opacity: .4; }
.lay-item.drop-before { box-shadow: 0 -3px 0 var(--accent); }
.lay-handle { cursor: grab; color: var(--muted); padding: 0 4px; user-select: none; }
.lay-icon { width: 52px !important; flex: 0 0 52px !important; min-width: 0 !important; text-align: center; padding: 5px !important; }
.lay-label { flex: 1 1 200px !important; min-width: 120px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); }
.lay-who { flex: 0 1 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lay-move { width: auto; max-width: 160px; padding: 4px 6px; }
.lay-drop-end { padding: 8px; text-align: center; border: 1px dashed var(--border); border-radius: 8px; }
.lay-drop-end.over { border-color: var(--accent); color: var(--accent); }
@media (max-width: 820px) { .lay-who { display: none; } .lay-item { flex-wrap: wrap; } }

/* ---------- v9: Remote Desktop */
.remote-access-line { overflow: hidden; text-overflow: ellipsis; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg .btn { border: 0; border-radius: 0; }
.seg .btn.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.picker-group { padding: 6px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--panel-2); border-bottom: 1px solid var(--border); }
.dash-server { padding: 10px 16px; }

/* ---------- v10: tags, Vendor Directory, Knowledge Base */
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 18px; border: 1px solid transparent; white-space: nowrap; background: var(--tag-bg); color: var(--tag-fg); }
.tag-blue { --tag-bg: rgba(66, 133, 244, .16); --tag-fg: #5b9bff; }
.tag-green { --tag-bg: rgba(52, 168, 83, .16); --tag-fg: #45c46e; }
.tag-orange { --tag-bg: rgba(245, 140, 40, .18); --tag-fg: #f59a3c; }
.tag-purple { --tag-bg: rgba(150, 100, 240, .18); --tag-fg: #a98bff; }
.tag-red { --tag-bg: rgba(230, 70, 70, .16); --tag-fg: #f06b6b; }
.tag-teal { --tag-bg: rgba(30, 170, 170, .16); --tag-fg: #2ec4c4; }
.tag-pink { --tag-bg: rgba(230, 80, 160, .16); --tag-fg: #f070b4; }
.tag-gray { --tag-bg: rgba(140, 140, 150, .18); --tag-fg: var(--muted); }
.tag-yellow { --tag-bg: rgba(230, 190, 40, .2); --tag-fg: #c99a06; }
.tag.pick { cursor: pointer; opacity: .55; border-color: var(--border); }
.tag.pick:hover { opacity: .85; }
.tag.pick.on { opacity: 1; border-color: var(--tag-fg); box-shadow: 0 0 0 1px var(--tag-fg) inset; }
.tag-picker, .tag-filter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.tag-rows { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.tag-row { display: flex; gap: 8px; align-items: center; }
.tag-row .tag { min-width: 90px; justify-content: center; }
.tag-row input { flex: 1; }
.tag-row select { width: auto; }
.lib-search { flex: 1; max-width: 420px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
dialog.wide-dialog { width: min(720px, calc(100vw - 32px)); }
.dir-name { font-weight: 600; }
.dir-table td { vertical-align: top; }
.ct-info { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.ct-line { display: flex; gap: 10px; align-items: flex-start; overflow-wrap: anywhere; }
.ct-ico { width: 22px; flex: 0 0 22px; text-align: center; }
.ct-notes { width: 100%; min-height: 140px; font: inherit; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); color: var(--text); resize: vertical; }
.ct-notes.read { min-height: 0; }
.multi-rows { display: flex; flex-direction: column; gap: 6px; }
.multi-row { display: flex; gap: 6px; }
.multi-row input { flex: 2; min-width: 0; }
.multi-row .multi-label { flex: 1; }
.kb-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.kb-item { display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-2); color: var(--text); text-decoration: none; }
.kb-item:hover { border-color: var(--accent); }
.kb-title { font-weight: 700; font-size: 15px; }
.kb-excerpt { margin: 4px 0 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kb-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.kb-h1 { font-size: 24px; margin: 14px 0 6px; overflow-wrap: anywhere; }
.kb-body { margin-top: 16px; line-height: 1.6; font-size: 15px; overflow-wrap: anywhere; }
.kb-body img { display: block; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); margin: 6px 0; cursor: zoom-in; }
.kb-body h2 { font-size: 19px; margin: 18px 0 6px; } .kb-body h3 { font-size: 16px; margin: 14px 0 4px; }
.kb-body blockquote { margin: 10px 0; padding: 8px 14px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.kb-body pre { background: #0d1117; color: #e6edf3; padding: 10px 12px; border-radius: 8px; overflow-x: auto; font-family: var(--mono); font-size: 13px; white-space: pre-wrap; }
.kb-body code { font-family: var(--mono); background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.kb-body table { border-collapse: collapse; } .kb-body td, .kb-body th { border: 1px solid var(--border); padding: 4px 8px; }
.kb-body a { color: var(--accent); }
.kb-title-input { width: 100%; font-size: 20px; font-weight: 700; padding: 10px 12px; margin: 12px 0 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); }
.kb-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; border: 1px solid var(--border); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--panel-2); position: sticky; top: 0; z-index: 2; margin-top: 10px; }
.tb-btn { border: 1px solid transparent; background: none; color: var(--text); padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.tb-btn:hover { border-color: var(--border); background: var(--panel); }
.tb-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.kb-editor { margin-top: 0; min-height: 360px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 0 0 8px 8px; background: var(--panel); outline: none; }
.kb-editor:focus { border-color: var(--accent); }
@media (max-width: 820px) { .dir-table th:nth-child(3), .dir-table td:nth-child(3) { display: none; } }

/* ---------- v10.1: article sidebar, picture sizes, picture pop-up */
.kb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.kb-layout > .card { margin: 0; }
.kb-aside { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 16px; }
.kb-aside .card { margin: 0; padding: 14px 16px; }
.kb-aside h3 { margin: 0 0 10px; }
.kb-contact { padding: 10px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.kb-contact:first-of-type { border-top: 0; padding-top: 0; }
.kb-contact-name { font-weight: 700; }
.kb-contact-mail { overflow-wrap: anywhere; }
.kb-rel-list { display: flex; flex-direction: column; gap: 8px; }
.kb-rel-list a { color: var(--accent); }
@media (max-width: 1100px) { .kb-layout { grid-template-columns: 1fr; } .kb-aside { position: static; } }
.kb-body img.img-s { max-width: min(240px, 100%); }
.kb-body img.img-m { max-width: min(420px, 100%); }
.kb-body img.img-l { max-width: min(680px, 100%); }
.kb-editor img { cursor: pointer; }
.kb-editor img.picked { outline: 3px solid var(--accent); outline-offset: 2px; }
.kb-editor-wrap { position: relative; }
.img-size-bar { position: absolute; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.tb-btn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.danger-text { color: var(--bad) !important; }
.kb-rel-details { margin-top: 14px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.kb-rel-details summary { cursor: pointer; font-weight: 600; }
.link-picker { display: flex; flex-direction: column; gap: 6px; }
.link-search { flex: 1; min-width: 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); }
.link-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 4px 0; background: var(--panel); }
.link-list label { display: flex; gap: 8px; align-items: center; padding: 4px 10px; cursor: pointer; }
.link-list label:hover { background: var(--panel-2); }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(5, 7, 12, .88); display: flex; align-items: center; justify-content: center; padding: 48px 56px; }
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.5); cursor: zoom-out; }
.lightbox-close { position: absolute; top: 12px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; cursor: pointer; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 34px; cursor: pointer; }
.lightbox-nav.prev { left: 8px; } .lightbox-nav.next { right: 8px; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-count { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; opacity: .8; }
@media (max-width: 820px) { .lightbox { padding: 56px 8px; } }

/* ---------- v11: Health Board */
.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-bottom: 16px; }
.hb-site { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 4px solid var(--ok); }
.hb-site.hb-warn { border-top-color: var(--warn); }
.hb-site.hb-down { border-top-color: var(--bad); background: linear-gradient(var(--bad-soft), var(--panel) 120px); }
.hb-head { display: flex; align-items: center; gap: 8px; }
.hb-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: 0 0 10px; }
.hb-warn .hb-dot { background: var(--warn); } .hb-down .hb-dot { background: var(--bad); }
.hb-name { font-size: 16px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hb-label { color: var(--muted); } .hb-down .hb-label { color: var(--bad); font-weight: 700; } .hb-warn .hb-label { color: var(--warn); }
.hb-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0; }
.hb-metric { background: var(--panel-2); border-radius: 8px; padding: 8px 6px; text-align: center; }
.hb-num { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hb-unit { font-size: 12px; color: var(--muted); font-weight: 400; }
.hb-cap { font-size: 11px; color: var(--muted); }
.hb-spark .spark { width: 100%; height: 40px; display: block; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark-area { fill: var(--accent-soft); stroke: none; }
.stat.stat-bad .n { color: var(--bad); } .stat.stat-warn .n { color: var(--warn); }
.num-input { width: 90px !important; }
.raw-json { max-height: 420px; overflow: auto; background: #0d1117; color: #e6edf3; padding: 10px; border-radius: 8px; font-size: 12px; white-space: pre; }
.picker.short { max-height: 160px; overflow-y: auto; }
@media (max-width: 820px) { .hb-grid { grid-template-columns: 1fr; } .hb-metrics { grid-template-columns: repeat(2, 1fr); } }
.hb-note { background: var(--panel-2); border: 1px dashed var(--border); border-radius: 8px; padding: 8px 10px; margin: 4px 0; line-height: 1.4; }
.hb-metrics.hb-two { grid-template-columns: repeat(2, 1fr); }

/* ---------- inventory */
.inv-filters { margin: 10px 0 4px; }
.inv-filters select { max-width: 190px; }
.inv-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.inv-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); cursor: pointer; color: var(--text); }
.inv-row:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--panel-2); }
.inv-ico { font-size: 22px; width: 30px; text-align: center; flex: none; }
.inv-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.inv-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-side { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; align-items: center; max-width: 50%; }
.inv-pick { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 60vh; overflow-y: auto; }
.inv-sticker { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 12px 0; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--panel-2); }
.inv-sticker strong { font-size: 16px; letter-spacing: .03em; }
.inv-kvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin: 10px 0; }
.inv-kv { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.inv-notes { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.inv-key { background: var(--panel-2); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.inv-contact { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.inv-contact .row { margin-top: 6px; }
.inv-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-photo { width: 96px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.inv-photo img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; }
.inv-photo.add { height: 96px; border: 1px dashed var(--border); border-radius: 8px; background: var(--panel-2); cursor: pointer; color: var(--muted); justify-content: center; }
.inv-history { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 260px; overflow-y: auto; }
.inv-hist { border-left: 3px solid var(--border); padding: 2px 0 2px 10px; }
.inv-hist.note { border-left-color: var(--accent); }
.sw-table tr.clickable { cursor: pointer; }
.sw-table tr.clickable:hover td { background: var(--panel-2); }
.chip.clickable { cursor: pointer; }
.btn.block { width: 100%; justify-content: center; }
.fab { display: none; }
@media (max-width: 820px) {
	.fab { display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 20; width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 26px; box-shadow: 0 8px 24px rgba(88, 101, 242, .45); cursor: pointer; }
	.inv-row { padding: 12px; }
	.inv-side { max-width: 42%; }
	.inv-side .chips { display: none; }
	.inv-filters select { flex: 1 1 45%; max-width: none; }
	.sw-table th:nth-child(2), .sw-table td:nth-child(2), .sw-table th:nth-child(5), .sw-table td:nth-child(5), .sw-table th:nth-child(6), .sw-table td:nth-child(6) { display: none; }
}

/* ---------- scanner */
dialog.scanner { width: min(520px, 100vw); padding: 0; overflow: hidden; }
dialog.scanner[open] { display: flex; flex-direction: column; }
.scan-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.scan-view { position: relative; background: #000; aspect-ratio: 4 / 3; overflow: hidden; }
.scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18% 22%; border: 3px solid rgba(255,255,255,.9); border-radius: 16px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); pointer-events: none; }
.scan-msg { padding: 8px 12px; font-size: 13px; color: var(--muted); min-height: 1.5em; }
.scan-tools { padding: 0 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.scan-tools .row.nowrap input { flex: 1; min-width: 0; }
.scan-manual { font-family: var(--mono); }
@media (max-width: 820px) {
	dialog.scanner { width: 100vw; height: 100dvh; max-height: 100dvh; }
	.scan-view { flex: 1; aspect-ratio: auto; }
	.scan-tools { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* ---------- sticker sheets */
.lbl-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.lbl-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 12px; }
.lbl-preview { display: flex; justify-content: center; padding: 10px; background: var(--panel-2); border-radius: 10px; }
.lbl-page { position: relative; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.lbl-cell { position: absolute; border: 1px solid #8a93a6; background: #eef0ff; }
.lbl-cell.round { border-radius: 50%; }
@media (max-width: 900px) { .lbl-layout { grid-template-columns: 1fr; } }
.print-area { display: none; }
@page { margin: 0; }
@media print {
	body.printing > *:not(.print-area) { display: none !important; }
	body.printing { background: #fff; margin: 0; }
	body.printing .print-area { display: block; }
	.print-page { position: relative; overflow: hidden; break-after: page; page-break-after: always; }
	.print-page:last-child { break-after: auto; page-break-after: auto; }
	.print-cell { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1%; overflow: hidden; color: #000; }
	.print-cell.outline { border: 0.3mm solid #000; }
	.print-cell.round { border-radius: 50%; }
	.print-num { font: 9pt system-ui, sans-serif; color: #000; }
	.print-qr, .print-bar { display: block; image-rendering: pixelated; }
	.print-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .02em; line-height: 1.05; white-space: nowrap; }
	.print-cap { font-family: system-ui, sans-serif; font-weight: 700; line-height: 1.05; white-space: nowrap; }
}

/* ---------- break glass */
.bg-hero { display: flex; gap: 14px; align-items: flex-start; background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.bg-hero h2 { margin: 0 0 4px; font-size: 18px; }
.bg-hero p { margin: 0; white-space: pre-wrap; }
.bg-hero-ico { font-size: 30px; }
.bg-contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 8px 0; }
.bg-contact { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--panel); }
.bg-contact-name { font-weight: 700; font-size: 15px; }
.bg-actions { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; }
.bg-call { justify-content: center; font-size: 16px; font-weight: 600; padding: 10px 12px; background: var(--ok-soft); color: var(--ok); border-color: transparent; text-decoration: none; }
.bg-lbl { font-weight: 400; font-size: 12px; margin-left: 6px; opacity: .8; }
.bg-key { background: var(--warn-soft); border-radius: 8px; padding: 10px 12px; }
.bg-list { display: flex; flex-direction: column; gap: 8px; }
.bg-sc { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.bg-sc-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 0; background: var(--panel); cursor: pointer; text-align: left; color: var(--text); font-size: 15px; font-weight: 600; }
.bg-sc-ico { font-size: 22px; }
.bg-sc-title { flex: 1; }
.bg-sc-body { display: none; padding: 0 14px 14px; }
.bg-sc.open .bg-sc-body { display: block; }
.bg-sc.open .bg-sc-head { background: var(--panel-2); }
.bg-steps { margin: 10px 0; padding-left: 22px; }
.bg-steps li { margin: 6px 0; }
.bg-edit-list { display: flex; flex-direction: column; gap: 12px; }
.bg-edit { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); }
.bg-edit .row.nowrap input:not(.bg-icon-in) { flex: 1; min-width: 0; }
.bg-icon-in { width: 52px; text-align: center; }
@media print {
	body.print-bg .side, body.print-bg .topbar, body.print-bg .no-print, body.print-bg .fab, body.print-bg .menu-btn { display: none !important; }
	body.print-bg .shell { display: block; }
	body.print-bg .bg-sc-body { display: block !important; }
	body.print-bg .card, body.print-bg .bg-sc, body.print-bg .bg-contact { break-inside: avoid; box-shadow: none; }
}

/* ---------- phone app card + offline page */
.phone-steps li { margin: 6px 0; }
.phone-steps li.here { background: var(--accent-soft); border-radius: 8px; padding: 6px 8px; list-style-position: inside; }
.offline-card { width: min(440px, 100%) !important; }
.row.nowrap { flex-wrap: nowrap; }
@media (max-width: 820px) { dialog#dialog, dialog#dialog.wide-dialog { width: 100vw; max-width: 100vw; } }
@media (max-width: 820px) { .topbar > .muted.small { display: none; } }

/* ---------- quick fixes + computer health */
.pc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.pc-dot.ok { background: var(--ok); } .pc-dot.warn { background: var(--warn); } .pc-dot.bad { background: var(--bad); } .pc-dot.off { background: #9aa3b2; opacity: .6; }
.qf-pc { font-size: 17px; }
.qf-issues { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.qf-issue { font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--warn-soft); }
.qf-issue.bad { background: var(--bad-soft); }
.qf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 16px; }
.qf-btn { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; gap: 2px 10px; text-align: left; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); color: var(--text); cursor: pointer; box-shadow: var(--shadow); }
.qf-btn:hover:not(:disabled) { border-color: var(--accent); }
.qf-btn:disabled { opacity: .5; cursor: not-allowed; }
.qf-btn.suggested { border-color: var(--warn); background: color-mix(in srgb, var(--warn-soft) 60%, var(--panel)); }
.qf-btn.danger .qf-name { color: var(--bad); }
.qf-ico { grid-row: span 2; font-size: 28px; line-height: 1; align-self: center; }
.qf-name { font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qf-desc { font-size: 12px; color: var(--muted); }
.fix-out { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 50vh; overflow: auto; margin: 8px 0 0; }
.fix-status { display: flex; align-items: center; gap: 6px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ok-text { color: var(--ok); }
.inv-row.static { cursor: default; }
.inv-row.static:hover { background: var(--panel); }
.inv-history.tall { max-height: 520px; }
.ch-table td { vertical-align: top; }
.ch-table tr.clickable { cursor: pointer; }
.ch-table tr.clickable:hover td { background: var(--panel-2); }
.ch-cell { min-width: 120px; }
.ch-bar { height: 6px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--border); overflow: hidden; margin: 2px 0 3px; }
.ch-fill { display: block; height: 100%; background: var(--ok); }
.ch-fill.warn { background: var(--warn); } .ch-fill.bad { background: var(--bad); }
.ch-disk { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; margin: 4px 0; }
.code-area { font-size: 12px; tab-size: 4; line-height: 1.45; }
@media (max-width: 820px) {
	.qf-grid { grid-template-columns: 1fr; }
	.qf-btn { padding: 16px 14px; }
	.ch-table th:nth-child(3), .ch-table td:nth-child(3), .ch-table th:nth-child(4), .ch-table td:nth-child(4), .ch-table th:nth-child(8), .ch-table td:nth-child(8) { display: none; }
}
dialog.svc-dialog { width: min(860px, 100vw); }
dialog.svc-dialog .dlg-body { max-height: 70vh; }
dialog.svc-result, dialog.svc-make { width: min(600px, 100vw); }
.svc-row .inv-side { max-width: 60%; }
@media (max-width: 820px) { dialog.svc-dialog, dialog.svc-result, dialog.svc-make { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; } dialog.svc-dialog[open], dialog.svc-result[open], dialog.svc-make[open] { display: flex; flex-direction: column; } .svc-row { flex-wrap: wrap; } .svc-row .inv-side { max-width: none; justify-content: flex-start; } }
.row.nowrap > input.bg-icon-in { flex: 0 0 56px; min-width: 0; }
/* ---------- device panels */
.panel-bar { margin-bottom: 8px; }
.panel-holder { background: #000; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; height: calc(100vh - 150px); min-height: 420px; }
.panel-holder:fullscreen { border-radius: 0; height: 100vh; }
.panel-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
@media (max-width: 820px) { .panel-holder { height: calc(100dvh - 140px); border-radius: 0; } }

/* ---- v14 security */
.idle-note { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000; background: var(--warn-soft); color: var(--text); border: 1px solid var(--warn); border-radius: 10px; padding: 10px 16px; box-shadow: 0 6px 24px rgb(0 0 0 / .18); font-weight: 600; max-width: calc(100vw - 32px); }
.away-banner { background: var(--warn-soft); border-bottom: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); padding: 8px 20px; font-size: 14px; }
.or-line { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0 6px; }
.btn.block { width: 100%; justify-content: center; }
.tag.role-pick { --tag-fg: var(--accent); background: transparent; color: var(--text); }
.tag.role-pick.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.chip.role { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: transparent; }
label.check.via-role { opacity: .65; }
label.check.via-role::after { content: 'role'; font-size: 11px; color: var(--muted); margin-left: 6px; }
details.extras { margin: 6px 0; }
details.extras > summary { cursor: pointer; margin-bottom: 6px; }
.choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 10px; }
.choice { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.choice.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.choice input { margin-right: 6px; }
.sec-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; font-size: 14px; }
.sec-line input.num, input.num { width: 72px; }
.sec-log tr.bad-row td { background: var(--bad-soft); }
.nowrap { white-space: nowrap; }
.hb-viewas { gap: 8px; padding: 6px 10px; border: 1px dashed var(--border); border-radius: 10px; }
.hb-viewas.on { border-color: var(--warn); background: var(--warn-soft); }
.hb-viewas select { max-width: 260px; }

/* ---- v14.1 TV Screens editor */
.dsp-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.dsp-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.dsp-tab:hover { border-color: var(--accent); }
.dsp-tab.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.dsp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .6; flex: none; }
.dsp-dot.on { background: var(--ok); opacity: 1; box-shadow: 0 0 0 3px var(--ok-soft); }
.dsp-toolbar { gap: 10px; }
.dsp-addrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.dsp-add { display: flex; flex-wrap: wrap; gap: 6px; }
.dsp-addbtn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 8px; border: 1px dashed var(--border); background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.dsp-addbtn:hover { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.dsp-addic { font-size: 15px; }
.dsp-editor { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.dsp-strip { display: flex; flex-direction: column; gap: 10px; max-height: 78vh; overflow-y: auto; padding: 2px 6px 2px 2px; }
.dsp-thumb { position: relative; border-radius: 10px; padding: 6px; border: 2px solid transparent; cursor: pointer; background: color-mix(in srgb, var(--text) 4%, transparent); }
.dsp-thumb:hover { border-color: var(--border); }
.dsp-thumb.on { border-color: var(--accent); background: var(--accent-soft); }
.dsp-thumb.off .tv-stage { opacity: .4; }
.dsp-thumb.drag { opacity: .4; }
.dsp-thumb.over { box-shadow: 0 -3px 0 var(--accent); }
.dsp-thumb .tv-stage { width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; pointer-events: none; }
.dsp-num { position: absolute; z-index: 2; top: 10px; left: 10px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dsp-thumbinfo { display: flex; gap: 6px; align-items: center; margin-top: 5px; font-size: 12px; }
.dsp-thumbinfo span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsp-dur { font-variant-numeric: tabular-nums; color: var(--muted); }
.dsp-main { min-width: 0; }
.dsp-preview .tv-stage { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; box-shadow: 0 10px 30px rgb(0 0 0 / .25); }
.dsp-off { position: absolute; z-index: 9; top: 8px; right: 8px; padding: 2px 8px; border-radius: 99px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 11px; font-weight: 700; }
.dsp-form { margin-top: 14px; }
.dsp-formgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 18px; margin-top: 10px; }
.dsp-timing { border-left: 1px solid var(--border); padding-left: 16px; display: flex; flex-direction: column; gap: 6px; }
.dsp-form textarea { width: 100%; }
.dsp-form input[type=color] { width: 44px; height: 32px; padding: 0 2px; border-radius: 6px; }
.dsp-screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.dsp-screen { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.dsp-linkrow { display: flex; gap: 14px; align-items: center; margin: 8px 0; }
.dsp-linkrow .grow { flex: 1; min-width: 0; }
.dsp-qr { width: 104px; height: 104px; background: #fff; border-radius: 8px; padding: 4px; flex: none; }
.dsp-code { font-size: 13px; margin: 2px 0 4px; }
.dsp-code b { font-size: 18px; letter-spacing: .12em; }
.dsp-drop { border: 2px dashed var(--border); border-radius: 12px; padding: 18px; text-align: center; margin-bottom: 14px; }
.dsp-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.dsp-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.dsp-mitem { border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.dsp-mprev { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #111; }
.dsp-mprev img, .dsp-mprev video { width: 100%; height: 100%; object-fit: cover; display: block; }
.dsp-mbadge { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .65); color: #fff; border-radius: 6px; padding: 1px 6px; font-size: 12px; }
.dsp-mname { margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dsp-empty { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; }
@media (max-width: 900px) {
	.dsp-editor { grid-template-columns: 1fr; }
	.dsp-strip { flex-direction: row; max-height: none; overflow-x: auto; }
	.dsp-thumb { flex: 0 0 160px; }
	.dsp-formgrid { grid-template-columns: 1fr; }
	.dsp-timing { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 12px; }
	.dsp-screens { grid-template-columns: 1fr; }
}
.dsp-toolbar a.btn, .dsp-screen a.btn { text-decoration: none; color: var(--text); }

/* ---- v14.1 phone: bottom tab bar + bigger touch targets */
.tabbar { display: none; }
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item { padding: 10px 12px; border-radius: 10px; border-left: 4px solid var(--border); background: color-mix(in srgb, var(--text) 3%, transparent); }
.alert-item.lvl-bad { border-left-color: var(--bad); background: var(--bad-soft); }
.alert-item.lvl-warn { border-left-color: var(--warn); }
.alert-item.lvl-ok { border-left-color: var(--ok); }
.alert-item.lvl-info { border-left-color: var(--accent); }
@media (max-width: 820px) {
	.tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
	.tabbar .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; border: 0; background: none; color: var(--muted); font: inherit; border-radius: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
	.tabbar .tab-ic { font-size: 22px; line-height: 1; filter: grayscale(.6); opacity: .8; }
	.tabbar .tab-l { font-size: 11px; font-weight: 600; letter-spacing: .01em; }
	.tabbar .tab.on { color: var(--accent); }
	.tabbar .tab.on .tab-ic { filter: none; opacity: 1; transform: scale(1.08); }
	.tabbar .tab:active { background: var(--accent-soft); }
	.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
	.menu-btn { display: none; } /* "More" in the tab bar opens the menu */
	.content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
	/* bigger touch targets */
	.btn { min-height: 42px; padding: 9px 14px; }
	.btn.sm { min-height: 38px; padding: 7px 12px; }
	.topbar .row .btn { min-height: 36px; }
	input[type=text], input[type=password], input[type=search], input[type=number], input[type=email], input[type=date], select { min-height: 44px; }
	label.check { min-height: 40px; align-items: center; }
	label.check input[type=checkbox], label.check input[type=radio] { width: 20px; height: 20px; }
	.nav button { min-height: 46px; }
	.row.end { flex-wrap: wrap; }
	.qf-btn { min-height: 64px; }
	.dsp-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
	.dsp-tab { flex: none; }
}
@media (max-width: 820px) and (display-mode: standalone) { .topbar { padding-top: calc(10px + env(safe-area-inset-top)); } }

/* ---- v14.2 mentions, inbox, home, employee directory, automations */
.mention { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 600; white-space: nowrap; }
.mention.role { background: color-mix(in srgb, var(--warn) 18%, transparent); color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.mention-pop { position: fixed; z-index: 2000; width: 260px; max-height: 300px; overflow-y: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgb(0 0 0 / .2); padding: 4px; }
.mention-opt { display: flex; justify-content: space-between; gap: 8px; padding: 7px 9px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.mention-opt.on, .mention-opt:hover { background: var(--accent-soft); }
.tp-label { width: 100%; margin-top: 4px; }
.bell { position: relative; border: 0; background: none; font-size: 20px; cursor: pointer; padding: 4px 6px; border-radius: 8px; margin-left: 4px; }
.bell:hover { background: var(--accent-soft); }
.bell-count { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.bell-count[hidden] { display: none; }
.home-hello { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.home-hello h2 { margin: 0; font-size: 22px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.home-grid > .home-col.main:only-child { grid-column: 1 / -1; }
.home-col { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.home-h2 { margin: 0; font-size: 17px; }
.inbox-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.inbox-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); }
.inbox-item.link { cursor: pointer; }
.inbox-item.link:hover { border-color: var(--accent); }
.inbox-item.unread { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.inbox-item.k-request.unread { background: color-mix(in srgb, var(--warn) 12%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.inbox-ic { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--text) 6%, transparent); font-weight: 700; }
.inbox-body { flex: 1; min-width: 0; }
.inbox-text { margin: 3px 0; white-space: pre-line; overflow-wrap: anywhere; }
.inbox-x { border: 0; background: none; color: var(--accent); cursor: pointer; font-size: 14px; padding: 2px 4px; }
.home-bg { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 16px; margin-bottom: 16px; border-radius: 14px; border: 0; cursor: pointer; background: linear-gradient(135deg, #c62828, #8e1b1b); color: #fff; font: inherit; box-shadow: 0 6px 18px rgb(198 40 40 / .3); }
.home-bg-ic { font-size: 32px; }
.home-bd { display: flex; flex-direction: column; gap: 6px; }
.home-bdrow { display: flex; gap: 10px; align-items: center; }
.home-bdrow.today { font-weight: 700; }
.home-bddate { width: 56px; color: var(--muted); font-size: 13px; }
.home-short { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.home-sc { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; text-align: center; }
.home-sc:hover { border-color: var(--accent); background: var(--accent-soft); }
.home-sc-ic { font-size: 20px; }
.home-onb { display: flex; flex-direction: column; gap: 8px; }
.home-onbrow { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 1.4fr) 120px 80px; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.home-onbrow:hover { border-color: var(--accent); }
.home-wrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 8px; }
.home-wrow.on { background: var(--accent-soft); }
.ppl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 12px; }
.ppl-card { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.ppl-card:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgb(0 0 0 / .06); }
.ppl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ppl-avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; text-transform: uppercase; }
.ppl-avatar.big { width: 64px; height: 64px; font-size: 22px; }
.ppl-head { display: flex; gap: 16px; align-items: flex-start; margin-top: 10px; }
.ppl-head .grow { flex: 1; min-width: 0; }
.ppl-prog { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ppl-bar { flex: 1; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; min-width: 60px; }
.ppl-bar-in { height: 100%; width: 0; background: var(--warn); border-radius: 4px; transition: width .3s; }
.ppl-bar.done .ppl-bar-in { background: var(--ok); }
.ppl-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ppl-field { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; }
.ppl-field.in-path { border-color: var(--border); background: color-mix(in srgb, var(--text) 2%, transparent); }
.ppl-field.missing { border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); }
.ppl-field > label { font-size: 13px; font-weight: 600; }
.ppl-field .req { color: var(--bad); }
.ppl-field input[type=checkbox] { width: 20px; height: 20px; }
.ppl-created { font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ppl-created.ok { color: var(--ok); font-weight: 600; }
.btn.link { background: none; border: 0; color: var(--accent); padding: 2px 6px; min-height: 0; }
.ppl-noteform textarea { width: 100%; }
.ppl-notes { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ppl-note { padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.ppl-notetext { white-space: pre-line; margin-top: 3px; overflow-wrap: anywhere; }
.ppl-tagrows { display: flex; flex-direction: column; gap: 6px; }
.ppl-tagrows .tag { min-width: 120px; justify-content: center; }
.ppl-pathtable td.center { text-align: center; }
.ppl-pathtable th.ppl-group { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 12px; }
.auto-list { display: flex; flex-direction: column; gap: 10px; }
.auto-rule { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.auto-rule.off { opacity: .6; }
.auto-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.auto-step { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--accent-soft); }
.auto-when, .auto-then { border-left: 4px solid var(--accent); padding: 6px 0 6px 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.auto-then { border-left-color: var(--ok); }
.auto-stepcard { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.auto-stepedit { display: flex; flex-direction: column; gap: 8px; }
.auto-addstep { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 900px) {
	.home-grid { grid-template-columns: 1fr; }
	.home-onbrow { grid-template-columns: 1fr; }
	.ppl-head { flex-direction: column; }
}
.row > input[type=search], .row > input[type=date], .row > input[type=email] { width: auto; flex: 0 1 240px; min-width: 140px; }

/* ---- v14.3 Users & Access */
.usr-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.usr-row { display: grid; grid-template-columns: 42px minmax(160px, 1.1fr) minmax(140px, 1fr) minmax(260px, 1.6fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.usr-row:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.usr-row.off { opacity: .55; }
.usr-main { min-width: 0; }
.usr-main strong { margin-right: 6px; }
.usr-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.usr-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.warn-text { color: var(--warn); }
.usr-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 14px; }
.usr-tabs button { border: 0; background: none; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.usr-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.usr-sec { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.usr-sechead { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.acc-grid { display: flex; flex-direction: column; gap: 10px; }
.acc-group { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.acc-ghead { display: flex; justify-content: space-between; padding: 7px 12px; background: color-mix(in srgb, var(--text) 4%, transparent); font-weight: 700; font-size: 13px; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.acc-row.has { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.acc-name { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 180px; }
.acc-ic { width: 22px; text-align: center; }
.acc-via { font-size: 10px; padding: 0 6px; }
.acc-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; flex-wrap: wrap; }
.acc-seg button { border: 0; border-left: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; font-size: 12.5px; padding: 6px 10px; cursor: pointer; }
.acc-seg button:first-child { border-left: 0; }
.acc-seg button.on { background: var(--accent); color: var(--accent-ink); }
.acc-seg button.none.on { background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); }
.acc-seg button:disabled { cursor: not-allowed; opacity: .45; }
.acc-seg button.on:disabled { opacity: 1; }
.acc-seg.locked { opacity: .6; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 10px; }
.role-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.role-groups { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 900px) {
	.usr-row { grid-template-columns: 42px 1fr auto; }
	.usr-roles, .usr-meta { grid-column: 2 / -1; }
	.usr-actions { grid-row: 1; grid-column: 3; }
	.acc-name { min-width: 0; }
}

/* ---- v14.4 page tabs + punchlist */
.page-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); margin: -4px 0 16px; }
.page-tab { border: 0; background: none; padding: 9px 14px; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 8px 8px 0 0; }
.page-tab:hover { color: var(--text); background: color-mix(in srgb, var(--text) 4%, transparent); }
.page-tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.punch-bar { margin-bottom: 12px; }
.punch-table td { vertical-align: middle; }
.punch-row { cursor: pointer; }
.punch-row:hover td { background: var(--accent-soft); }
.punch-pri { min-width: 64px; justify-content: center; }
.punch-closed > summary { cursor: pointer; list-style: none; }
.punch-closed > summary h2 { display: inline; }
.punch-closed > summary::before { content: '▸ '; color: var(--muted); }
.punch-closed[open] > summary::before { content: '▾ '; }
.punch-detail { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 18px; }
.punch-side { display: flex; flex-direction: column; gap: 8px; border-left: 1px solid var(--border); padding-left: 16px; }
.punch-title { font-size: 17px; font-weight: 600; }
.punch-compose { border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.punch-compose textarea { width: 100%; }
.punch-thread { display: flex; flex-direction: column; gap: 8px; }
.punch-comment { padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.punch-ev { padding: 0 4px; }
.punch-pics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.punch-pic { position: relative; width: 120px; height: 90px; border-radius: 8px; overflow: hidden; display: block; background: #111; }
.punch-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.punch-pic button { position: absolute; top: 4px; right: 4px; border: 0; border-radius: 50%; width: 22px; height: 22px; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; }
.punch-setlist { display: flex; flex-direction: column; gap: 8px; }
.punch-setrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; }
.punch-setrow > input[type=text] { width: auto; flex: 1 1 180px; }
.punch-setrow .tag { min-width: 90px; justify-content: center; }
.punch-members { flex-basis: 100%; }
.home-punch { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.home-punch:hover { border-color: var(--accent); }
@media (max-width: 900px) {
	.punch-detail { grid-template-columns: 1fr; }
	.punch-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 12px; order: -1; }
	.punch-table th:nth-child(5), .punch-table td:nth-child(5) { display: none; }
}
.acct-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.acct-line .chips { flex-basis: 100%; }
.usr-file { text-decoration: none; margin-left: 6px; }

.punch-who > summary { cursor: pointer; color: var(--accent); margin: 2px 0 6px; }

/* ---- v14.5 quality of life */
html.compact, html.compact body { font-size: 13px; }
html.compact .card { padding: 12px 14px; margin-bottom: 12px; }
html.compact td, html.compact th { padding-top: 5px; padding-bottom: 5px; }
html.compact .btn { padding: 5px 10px; }
html.compact .nav button { padding-top: 5px; padding-bottom: 5px; }
html.compact .content { padding-top: 14px; }
/* side menu: search, favourites, small mode */
.brand-row { display: flex; align-items: center; gap: 6px; }
.brand-row .brand { flex: 1; min-width: 0; }
.mini-btn { border: 1px solid var(--border); background: var(--panel); color: var(--muted); border-radius: 8px; width: 28px; height: 28px; cursor: pointer; flex: none; }
.mini-btn:hover { color: var(--text); border-color: var(--accent); }
.nav-search { width: 100%; margin: 8px 0 6px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); font-size: 13px; }
.nav-item { position: relative; }
.nav-item .nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.fav-star { opacity: 0; color: var(--muted); padding: 0 2px; font-size: 13px; line-height: 1; transition: opacity .15s; }
.nav-item:hover .fav-star, .fav-star.on { opacity: 1; }
.fav-star.on { color: #e3a008; }
.nav-head.static { cursor: default; }
.nav-none { padding: 6px 10px; }
body.nav-mini .shell { grid-template-columns: 68px 1fr; }
body.nav-mini .side { padding: 12px 8px; }
body.nav-mini .brand-row { flex-direction: column; }
body.nav-mini .brand { font-size: 0; justify-content: center; gap: 0; }
body.nav-mini .nav-search, body.nav-mini .nav-head, body.nav-mini .nav-label, body.nav-mini .fav-star, body.nav-mini .side-foot { display: none; }
body.nav-mini .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }
body.nav-mini .nav-item .ico { margin: 0; font-size: 18px; }
body.nav-mini .nav-group { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
@media (max-width: 820px) { body.nav-mini .shell { grid-template-columns: 1fr; } body.nav-mini .nav-label, body.nav-mini .nav-head, body.nav-mini .nav-search { display: initial; } .mini-btn { display: none; } }
/* top bar */
.restart-btn { font-size: 18px; color: var(--muted); }
.restart-btn:hover { color: var(--text); }
/* bell dropdown */
.bell-pop { position: fixed; z-index: 1500; width: min(380px, calc(100vw - 16px)); max-height: 70vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 40px rgb(0 0 0 / .22); padding: 10px; }
.bell-head { margin-bottom: 6px; }
.bell-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.bell-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: start; text-align: left; padding: 8px; border-radius: 9px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.bell-item:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.bell-item.unread { background: var(--accent-soft); }
.bell-ic { font-weight: 700; text-align: center; }
.bell-body { display: flex; flex-direction: column; min-width: 0; }
.bell-text { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bell-item .ago { font-size: 11px; color: var(--muted); white-space: nowrap; }
/* picture viewer */
dialog.lightbox { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: rgba(8, 10, 14, .92); color: #fff; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lb-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 10px 14px; z-index: 2; }
.lb-btn { border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 16px; cursor: pointer; display: inline-grid; place-items: center; text-decoration: none; }
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-stage { position: absolute; inset: 58px 60px 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lb-stage.zoomed { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.lb-stage.zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 46px; height: 64px; border-radius: 12px; font-size: 34px; cursor: pointer; z-index: 2; }
.lb-nav.prev { left: 8px; } .lb-nav.next { right: 8px; }
.lb-group img { cursor: zoom-in; }
/* undo */
.undo-toast { display: flex; align-items: center; gap: 12px; }
/* relative time, copy */
time.ago { white-space: nowrap; }
.copy-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 4px; border-radius: 5px; }
.copy-btn:hover { color: var(--accent); background: var(--accent-soft); }
.with-copy { display: inline-flex; align-items: center; gap: 2px; }
textarea.has-draft { border-color: color-mix(in srgb, var(--warn) 60%, var(--border)); }
/* loading placeholders */
.skel { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.skel-line { height: 14px; border-radius: 7px; background: linear-gradient(90deg, color-mix(in srgb, var(--text) 6%, transparent) 25%, color-mix(in srgb, var(--text) 12%, transparent) 50%, color-mix(in srgb, var(--text) 6%, transparent) 75%); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
.skel-line.w1 { width: 92%; } .skel-line.w2 { width: 74%; } .skel-line.w3 { width: 55%; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.net-banner { position: fixed; z-index: 3000; left: 50%; top: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bad); color: #fff; box-shadow: 0 8px 30px rgb(0 0 0 / .25); max-width: calc(100vw - 20px); }
.net-banner .btn { background: rgba(255, 255, 255, .2); color: #fff; border-color: transparent; }
/* punchlist list editing */
.punch-row select.inline { width: auto; padding: 3px 6px; font-size: 12px; border-radius: 99px; min-height: 0; }
.punch-row.overdue td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.punch-row.due-soon td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
.due-chip { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; margin-left: 6px; }
.due-chip.bad { background: var(--bad-soft); color: var(--bad); }
.due-chip.warn { background: var(--warn-soft); color: var(--warn); }
.punch-check { width: 18px; height: 18px; }
.bulk-bar { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 10px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgb(0 0 0 / .18); }
.bulk-bar select { width: auto; }
.bulk-bar .btn { background: rgba(255, 255, 255, .18); color: inherit; border-color: transparent; }
.punch-who-cell { display: flex; align-items: center; gap: 4px; }
.punch-who-cell .edit-who { opacity: 0; }
.punch-row:hover .edit-who { opacity: 1; }
dialog.lightbox:not([open]) { display: none; }
.toasts-in-dialog { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; }

/* 📹 Cameras (beta) */
.cam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 8px; }
.cam-tile { position: relative; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; aspect-ratio: 16 / 9; display: block; width: 100%; color: #fff; }
.cam-tile:hover { outline: 2px solid var(--accent); }
.cam-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cam-img.cam-err, .cam-big.cam-err { visibility: hidden; }
.cam-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px; font-size: 13px; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.cam-msg { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 12px; font-size: 12px; color: #ffb4b4; text-align: center; }
.cam-tile.bad .cam-msg, .cam-holder.bad .cam-msg { display: flex; }
.cam-holder { position: relative; background: #000; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; height: calc(100vh - 330px); min-height: 300px; margin-bottom: 12px; }
.cam-holder:fullscreen { border-radius: 0; height: 100vh; }
.cam-big { width: 100%; height: 100%; object-fit: contain; display: block; }
.cam-tl-box { margin-top: 6px; }
.cam-tl { position: relative; height: 26px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); overflow: hidden; }
.cam-seg { position: absolute; top: 0; bottom: 0; background: var(--accent); opacity: .8; }
.cam-ticks { position: relative; height: 18px; font-size: 11px; color: var(--muted); }
.cam-ticks span { position: absolute; transform: translateX(-50%); top: 2px; }
.cam-ticks span:first-child { transform: none; }
.cam-ticks span:last-child { transform: translateX(-100%); }
.cam-error { color: var(--bad); }
.cam-ok { color: var(--ok); font-weight: 600; }
.cam-result:empty { display: none; }
.cam-result { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 8px; }
@media (max-width: 820px) { .cam-grid { grid-template-columns: 1fr 1fr; gap: 6px; } .cam-holder { height: 56vw; min-height: 200px; border-radius: 0; } }
.cam-video { display: block; width: 100%; height: 100%; }
.cam-video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.cam-live-badge { position: absolute; top: 10px; left: 10px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .55); pointer-events: none; }
.cam-live-badge:empty { display: none; }
.cam-live-badge.on { color: #ff6b6b; }
.cam-live-badge.pb { color: #9fd0ff; }
.cam-tl.clickable { cursor: pointer; }
.cam-head { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--bad); }
.cam-hover { position: absolute; top: 2px; transform: translateX(-50%); font-size: 11px; padding: 1px 5px; border-radius: 4px; background: var(--text); color: var(--panel); pointer-events: none; white-space: nowrap; }
.cam-pb-bar:empty { display: none; }
.cam-pb-bar { margin-top: 8px; gap: 6px; }
.cam-holder .cam-msg { z-index: 2; background: rgba(0, 0, 0, .6); }
.cam-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 64px; border: 0; border-radius: 10px; background: rgba(0, 0, 0, .35); color: #fff; font-size: 38px; line-height: 1; cursor: pointer; opacity: .55; transition: opacity .15s, background .15s; }
.cam-arrow.left { left: 10px; }
.cam-arrow.right { right: 10px; }
.cam-holder:hover .cam-arrow, .cam-arrow:focus-visible { opacity: 1; }
.cam-arrow:hover { background: rgba(0, 0, 0, .6); }
.cam-speeds { display: inline-flex; align-items: center; gap: 4px; margin: 0 8px; }
@media (max-width: 820px) { .cam-arrow { width: 36px; height: 52px; font-size: 30px; opacity: .8; } }

/* 📹 Cameras v2 – Hik-style player */
.cam-nvr-head { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.cam-nvr-head h2 { margin: 0; }
.cam-chev { width: 14px; color: var(--muted); }
.cam-nvr-body:empty { display: none; }
.cam-single { height: calc(100vh - 150px); min-height: 360px; margin-bottom: 0; touch-action: pan-y; user-select: none; }
.cam-single .cam-video, .cam-freeze { position: absolute; inset: 0; width: 100%; height: 100%; }
.cam-freeze { object-fit: contain; z-index: 1; }
.cam-single .cam-video { z-index: 0; }
.cam-ctrl { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 40px 14px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .78) 45%); color: #fff; opacity: 0; transition: opacity .25s; pointer-events: none; }
.cam-single.ctrl-on .cam-ctrl, .cam-single.is-pb .cam-ctrl, .cam-ctrl:focus-within { opacity: 1; pointer-events: auto; }
.cam-single:not(.ctrl-on) .cam-arrow { opacity: 0; }
.cam-ctrl-top { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 8px; }
.cam-ic { background: rgba(255, 255, 255, .08); border: 0; color: #fff; font: inherit; font-size: 15px; min-width: 36px; height: 34px; padding: 0 10px; border-radius: 17px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cam-ic:hover:not(:disabled) { background: rgba(255, 255, 255, .2); }
.cam-ic:disabled { opacity: .35; cursor: default; }
.cam-ic.big { font-size: 20px; min-width: 44px; background: none; }
.cam-ic.pill { background: rgba(40, 40, 40, .75); font-size: 13px; }
.cam-ic.speed { font-weight: 700; font-size: 13px; background: rgba(40, 40, 40, .75); }
.cam-ic.sm { min-width: 26px; height: 26px; padding: 0; font-size: 16px; border-radius: 6px; }
.cam-date-pill { position: relative; display: inline-flex; align-items: center; background: rgba(40, 40, 40, .75); border-radius: 17px; height: 34px; }
.cam-date-pill .cam-ic { background: none; }
.cam-date-label { background: none; border: 0; border-left: 1px solid rgba(255, 255, 255, .25); border-right: 1px solid rgba(255, 255, 255, .25); color: #fff; font: inherit; font-size: 14px; padding: 0 12px; cursor: pointer; height: 20px; }
.cam-date-in { position: absolute; left: 50%; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cam-tl-row { display: flex; align-items: center; gap: 8px; }
.cam-zoom { display: flex; gap: 4px; }
.cam-tl2 { position: relative; flex: 1; height: 44px; border-top: 1px solid rgba(255, 255, 255, .35); cursor: grab; overflow: hidden; touch-action: none; }
.cam-tl2:active { cursor: grabbing; }
.cam-track { position: absolute; inset: 0; }
.cam-seg2 { position: absolute; bottom: 4px; height: 14px; background: #3d8bfd; }
.cam-future { position: absolute; top: 0; bottom: 0; background: rgba(255, 255, 255, .06); }
.cam-tick { position: absolute; top: 0; height: 7px; border-left: 1px solid rgba(255, 255, 255, .6); }
.cam-tick span { position: absolute; top: 8px; left: 3px; font-size: 12px; color: rgba(255, 255, 255, .85); white-space: nowrap; }
.cam-center { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #ff3b30; pointer-events: none; }
.cam-center::before { content: ''; position: absolute; top: -1px; left: -4px; border: 5px solid transparent; border-top-color: #ff3b30; }
.cam-ctrl-bottom { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cam-ctrl-name { font-size: 13px; opacity: .8; margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-live-btn { background: none; border: 1.5px solid #fff; color: #fff; border-radius: 18px; padding: 5px 16px; font: inherit; font-size: 14px; cursor: pointer; }
.cam-live-btn:hover { background: rgba(255, 255, 255, .15); }
.cam-single .cam-live-badge { z-index: 3; }
.cam-single .cam-msg { z-index: 3; }
.cam-single .cam-arrow { z-index: 5; top: 42%; }
.cam-single:fullscreen { height: 100vh; }
/* all-cameras grid */
.cam-grid-holder { height: auto; min-height: 0; background: #000; padding: 2px; }
.cam-grid-holder:fullscreen { height: 100vh; overflow: auto; }
.cam-live-grid { display: grid; gap: 2px; }
.cam-live-tile { position: relative; aspect-ratio: 16 / 9; background: #111; cursor: pointer; overflow: hidden; }
.cam-live-tile:hover, .cam-live-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; z-index: 1; }
.cam-live-tile .cam-video { position: absolute; inset: 0; }
.cam-live-tile .cam-name { z-index: 2; color: #fff; }
.cam-live-tile.bad .cam-msg { display: flex; z-index: 2; }
@media (max-width: 820px) {
	.cam-single { height: auto; min-height: 0; overflow: visible; border-radius: 0; display: flex; flex-direction: column; }
	.cam-single .cam-video, .cam-single .cam-freeze { position: relative; inset: auto; aspect-ratio: 16 / 9; height: auto; }
	.cam-single .cam-freeze { position: absolute; top: 0; left: 0; }
	.cam-single .cam-video { order: 0; }
	.cam-single .cam-ctrl { position: static; opacity: 1; pointer-events: auto; padding: 8px 8px 10px; background: #111; order: 2; }
	.cam-single .cam-arrow { top: 28%; opacity: .8; }
	.cam-single .cam-msg { bottom: auto; aspect-ratio: 16 / 9; }
	.cam-ctrl-name { display: none; }
	.cam-live-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 820px) { .cam-single:not(.ctrl-on) .cam-arrow { opacity: .8; } }
.cam-tile .cam-video { position: absolute; inset: 0; }
.cam-tile .cam-name, .cam-tile .cam-msg { z-index: 2; }
.cam-ctrl.live-only { padding-top: 24px; }
/* grid + list tiles: fill the tile whatever the camera's shape */
.cam-tile .cam-video video, .cam-live-tile .cam-video video { object-fit: cover; }
/* phones: wide pages (cameras, device panels) keep room for the bottom tab bar */
@media (max-width: 820px) { .content.wide { padding-bottom: calc(96px + env(safe-area-inset-bottom)); } }
cam-video { position: relative; display: block; }
canvas.cam-hold { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.cam-tile canvas.cam-hold, .cam-live-tile canvas.cam-hold { object-fit: cover; }
.cam-still { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .55); }
.cam-still-box { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 22px 26px; text-align: center; max-width: 340px; }
.cam-still-box h3 { margin: 0 0 6px; }
.cam-view-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.cam-view-order { margin: 6px 0 10px; }
.cam-view-nvr { margin: 8px 0; }
.cam-pager { justify-content: center; gap: 10px; margin: 8px 0; }
.push-steps { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 8px 0 12px; display: grid; gap: 8px; }
.push-step { display: flex; gap: 10px; align-items: flex-start; }
.push-step-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--panel-2); border: 1px solid var(--border); }
.push-step.done .push-step-n { background: var(--ok); color: #fff; border-color: transparent; }
.push-test-out:empty { display: none; }
.push-test-out { margin-top: 6px; }
.push-nudge { position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); font-size: 14px; }
.push-nudge span { flex: 1; }

/* 🎨 Branding */
.brand-pic { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.brand-pic-row { display: flex; align-items: center; gap: 8px; }
.brand-pic input[type=file] { display: none; }
.brand-prev { max-height: 48px; max-width: 180px; border-radius: 6px; border: 1px solid var(--border); background: repeating-conic-gradient(#8882 0 25%, transparent 0 50%) 0 / 12px 12px; }
.brand-prev-icon { width: 48px; height: 48px; border-radius: 12px; }
.brand-prev-loginBg { max-height: 70px; max-width: 140px; object-fit: cover; }
.brand-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-end; padding-bottom: 6px; }
.brand-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.brand-banner { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 14px; border-bottom: 1px solid var(--border); background: var(--accent-soft); }
.brand-banner span { flex: 1; }
.brand-banner.lvl-warn { background: color-mix(in srgb, var(--warn, #f5a524) 18%, var(--panel)); }
.brand-banner.lvl-bad { background: color-mix(in srgb, var(--bad) 18%, var(--panel)); font-weight: 600; }
.brand-banner.lvl-ok { background: color-mix(in srgb, var(--ok) 16%, var(--panel)); }
.brand-banner-x { background: none; border: 0; color: inherit; cursor: pointer; font-size: 15px; opacity: .7; }
.login-title { text-align: center; margin: 0 0 12px; }
.login-text { text-align: center; white-space: pre-line; margin: 14px 0 0; }
.brand-login-preview { position: fixed; inset: 0; z-index: 70; background-color: rgba(0, 0, 0, .6); }

/* 🛎️ Service Watcher */
.svc-rows { display: grid; gap: 6px; margin-top: 8px; }
.svc-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.svc-row.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); background: color-mix(in srgb, var(--bad) 7%, transparent); }
.svc-log { display: grid; gap: 4px; }
.svc-log-row { display: grid; grid-template-columns: 150px 1fr; gap: 2px 10px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.svc-log-row > :nth-child(3) { grid-column: 2; white-space: pre-line; }
.svc-chosen { display: grid; gap: 6px; margin: 6px 0; }
.svc-chosen-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(140px, 1.3fr) auto auto; gap: 8px; align-items: center; }
.svc-pick { max-height: 300px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-top: 6px; }
.svc-pick-row { display: flex; width: 100%; align-items: center; gap: 8px; padding: 6px 8px; border: 0; background: none; color: inherit; font: inherit; text-align: left; border-radius: 8px; cursor: pointer; }
.svc-pick-row:hover { background: var(--panel-2); }
.svc-pick-row.on { background: var(--accent-soft); }
@media (max-width: 820px) { .svc-chosen-row { grid-template-columns: 1fr auto; } .svc-log-row { grid-template-columns: 1fr; } .svc-log-row > :nth-child(3) { grid-column: 1; } }

/* 🧭 Admin hub / 🖥️ System / 🧾 Activity / 🏨 wizard / 👁️ view as */
.hub-att { display: grid; gap: 4px; }
.hub-att-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; border: 1px solid var(--border); }
.hub-att-row:hover { background: var(--panel-2); }
.hub-att-row.lvl-bad { border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.hub-area { margin: 14px 0; }
.hub-area h3 { margin: 0 0 8px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.hub-card { display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: inherit; text-decoration: none; }
.hub-card:hover { border-color: var(--accent); }
.hub-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.hub-ic { font-size: 18px; }
.hub-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; margin: 8px 0; }
.sys-kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; align-items: center; }
.sys-bar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; margin: 4px 0 2px; }
.sys-bar-in { height: 100%; background: var(--ok); }
.sys-bar-in.warn { background: #f5a524; }
.sys-bar-in.bad { background: var(--bad); }
.sys-svcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.sys-svc { display: grid; grid-template-columns: 22px auto 1fr; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.sys-errs { display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.sys-err pre { margin: 2px 0 0; white-space: pre-wrap; font-size: 12px; }
.sys-err.error pre { color: var(--bad); }
.act-filters .field { min-width: 140px; }
.act-table td { vertical-align: top; }
.np-step { border-top: 1px solid var(--border); padding: 12px 0; }
.np-step h3 { margin: 0 0 8px; }
.np-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.np-out { margin-top: 12px; display: grid; gap: 4px; }
.np-next { display: flex; flex-wrap: wrap; gap: 6px; }
.viewas-banner { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: #6d28d9; color: #fff; font-weight: 600; font-size: 14px; }
.viewas-banner span { flex: 1; }
.usr-viewas { margin-left: auto; }
@media (max-width: 820px) { .sys-kv { grid-template-columns: 110px 1fr; } }
input[placeholder^="🔎 Find a setting"] { flex: 1; min-width: 220px; max-width: 520px; }

/* ============================================================ 📝 Forms */
.fm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 16px; }
.fm-tile { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.fm-tile.off { opacity: .7; }
.fm-tile-main { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: none; border: 0; padding: 14px 14px 8px; cursor: pointer; width: 100%; }
.fm-tile-main:hover strong { color: var(--accent); }
.fm-tile-icon { font-size: 28px; line-height: 1; }
.fm-tile-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fm-tile-body strong { font-size: 15px; }
.fm-tile-actions { padding: 0 14px 12px; }
.fm-tags { gap: 6px; }
.fm-archived { margin: 8px 0 16px; } .fm-archived summary { cursor: pointer; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.fm-head { margin-bottom: 4px; } .fm-head-icon { font-size: 22px; } .fm-head-title { margin: 0; font-size: 18px; }
.fm-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; } .fm-tabs .page-tab { white-space: nowrap; }
.fm-savebar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-weight: 600; }
.fm-savebar[hidden] { display: none; }
.fm-fields { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.fm-field { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.fm-field.section { border-left: 4px solid var(--accent); }
.fm-field.open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fm-field-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; flex-wrap: wrap; }
.fm-field-icon { width: 22px; text-align: center; } .fm-field-label { font-weight: 500; } .fm-field-label.sec { font-weight: 700; }
.fm-badges { gap: 4px; }
.fm-field-edit { padding: 4px 14px 12px; border-top: 1px solid var(--border); }
.fm-field-edit .row > .field { flex: 1; min-width: 200px; }
.fm-flags { gap: 18px; margin-bottom: 8px; }
.fm-opts { display: flex; flex-direction: column; gap: 6px; } .fm-opt { flex-wrap: nowrap; } .fm-opt input { flex: 1; }
.fm-typegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.fm-type { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); cursor: pointer; text-align: left; }
.fm-type:hover { border-color: var(--accent); } .fm-type-icon { font-size: 18px; }
.fm-tr { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.fm-tr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 8px; border-radius: 8px; border: 1px solid var(--border); }
.fm-tr-row.missing { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); background: var(--warn-soft); }
.fm-tr-dst { display: flex; gap: 6px; align-items: flex-start; } .fm-tr-dst textarea, .fm-tr-dst input { flex: 1; }
@media (max-width: 700px) { .fm-tr-row { grid-template-columns: 1fr; } }
.fm-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 14px; }
.fm-rule { border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 10px; background: var(--panel-2); }
.fm-map { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 10px; } .fm-map .row { flex-wrap: nowrap; } .fm-map-l { min-width: 160px; font-size: 13px; } .fm-map select { max-width: 280px; }
.fm-inserts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; } .fm-ins { cursor: pointer; font-family: var(--mono); font-size: 11px; }
.fm-howto { margin: 6px 0 12px; } .fm-howto summary { cursor: pointer; font-weight: 600; font-size: 13px; } .fm-howto ol { padding-left: 20px; } .fm-howto li { margin: 4px 0; }
.fm-code { font-family: var(--mono); font-size: 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; cursor: copy; word-break: break-all; }
.fm-meter { height: 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); overflow: hidden; margin: 4px 0 10px; max-width: 360px; } .fm-meter-bar { height: 100%; width: 0; background: var(--accent); }
.fm-icon-in { width: 70px !important; text-align: center; font-size: 18px; }
.fm-fill { max-width: 860px; }
.fm-fill-foot { margin-top: 16px; }
.fm-how { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.fm-linkbox { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-top: 8px; } .fm-linkbox .row > .field { flex: 1; min-width: 200px; margin-bottom: 4px; }
.fm-linkbox[hidden], .fm-emp-toggle[hidden] { display: none; }
.fm-emp-toggle { margin-top: 10px; }
.fr-form.fm-link-mode:not(.fm-show-emp) [data-emp="fill"] { display: none; }
.fm-copy { flex-wrap: nowrap; } .fm-link-input { flex: 1; font-size: 12px !important; }
.fm-search { max-width: 240px; }
.fm-filters { flex-wrap: wrap; }
table.fm-subs tr.clickable { cursor: pointer; } table.fm-subs tr.clickable:hover td { background: var(--panel-2); }
.fm-sub-title { margin: 0; }
.fm-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.fm-ans { grid-column: span 2; } .fm-ans.half { grid-column: span 1; }
@media (max-width: 640px) { .fm-ans.half { grid-column: span 2; } }
.fm-ans-a { overflow-wrap: anywhere; }
.fm-masked { color: var(--muted); letter-spacing: 1px; }
.fm-filelist { display: flex; flex-wrap: wrap; gap: 6px; } .fm-filelist a.chip { text-decoration: none; color: var(--text); }
.fm-steps { display: flex; flex-direction: column; gap: 6px; } .fm-step { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border-radius: 8px; background: var(--panel-2); } .fm-step.bad { background: var(--bad-soft); }
.fm-log summary { cursor: pointer; font-weight: 600; } .fm-log > div { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow: auto; }
/* PDF boxes */
.fm-doc { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .fm-doc { grid-template-columns: 1fr; } }
.fm-doc-pages { min-width: 0; overflow-x: auto; }
.fm-doc-pnum { margin: 6px 0 2px; }
.fm-doc-page { position: relative; box-shadow: var(--shadow); border: 1px solid var(--border); background: #fff; margin-bottom: 14px; }
.fm-doc-canvas { display: block; }
.fm-doc-overlay { position: absolute; inset: 0; cursor: crosshair; touch-action: none; user-select: none; }
.fm-box { position: absolute; border: 1.5px solid #4f5bd5; background: rgba(88, 101, 242, .14); border-radius: 3px; cursor: move; overflow: hidden; }
.fm-box.k-check { border-color: #1f9d55; background: rgba(31, 157, 85, .16); }
.fm-box.k-sign, .fm-box.k-signdate { border-color: #b7791f; background: rgba(183, 121, 31, .16); }
.fm-box.sel { border-color: #d64545; box-shadow: 0 0 0 2px rgba(214, 69, 69, .35); z-index: 2; }
.fm-box.ghost { border-style: dashed; pointer-events: none; }
.fm-box-label { position: absolute; left: 2px; top: 0; font: 600 9px/1.2 system-ui, sans-serif; color: #2b3270; white-space: nowrap; pointer-events: none; text-shadow: 0 0 2px #fff; }
.fm-box-handle { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; background: #4f5bd5; cursor: nwse-resize; border-radius: 2px 0 2px 0; }
.fm-box.sel .fm-box-handle { background: #d64545; }
.fm-doc.armed .fm-doc-overlay { outline: 3px dashed var(--accent); outline-offset: -3px; }
.fm-doc-side { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 30px); overflow: auto; }
.fm-doc-prop, .fm-doc-list { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.fm-doc-prop .field { margin-bottom: 8px; }
.fm-doc-field { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 6px; align-items: center; padding: 3px 0; font-size: 13px; }
.fm-doc-field.none .fm-doc-fname { color: var(--muted); } .fm-doc-field.armed { background: var(--accent-soft); border-radius: 6px; }
.fm-doc-fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the form itself (dashboard + employee link) */
.fr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.fr-row, .fr-section, .fr-info { grid-column: span 2; margin-bottom: 10px; }
.fr-row.half { grid-column: span 1; }
@media (max-width: 640px) { .fr-row.half { grid-column: span 2; } }
.fr-row[hidden], .fr-section[hidden], .fr-info[hidden] { display: none; }
.fr-section { margin-top: 14px; padding-bottom: 4px; border-bottom: 1px solid var(--border); } .fr-section h3 { margin: 0 0 2px; font-size: 16px; } .fr-section p { margin: 0 0 4px; }
.fr-info { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.fr-intro { margin-bottom: 12px; color: var(--muted); }
.fr-pre { white-space: pre-wrap; }
.fr-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.fr-help { margin: -2px 0 4px; }
.fr-req { color: var(--bad); }
.fr-ro .fr-value { padding: 8px 10px; border-radius: 8px; background: var(--panel-2); border: 1px dashed var(--border); min-height: 38px; }
.fr-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.fr-choice { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel-2); cursor: pointer; font-weight: 500; }
.fr-choice:hover { border-color: var(--accent); } .fr-choice.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.fr-multi { display: flex; flex-direction: column; gap: 2px; }
.fr-check { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 4px 0; }
.fr-check input { width: 18px; height: 18px; flex: none; }
.fr-missing .fr-label, .fr-missing .fr-check { color: var(--bad); }
.fr-missing input, .fr-missing select, .fr-missing textarea, .fr-missing .fr-choice { border-color: var(--bad); }
.fr-sign { display: flex; flex-direction: column; gap: 6px; }
.fr-sign-preview { font: italic 600 26px/1.2 "Segoe Script", "Brush Script MT", "Apple Chancery", cursive; color: #1d2a6b; min-height: 34px; border-bottom: 1px solid var(--border); padding: 2px 6px; }
:root[data-theme="dark"] .fr-sign-preview { color: #b9c2ff; }
.fr-sign-preview.inline { display: inline-block; font-size: 20px; border: 0; min-height: 0; padding: 0; }
.fr-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.fr-file { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); font-size: 13px; max-width: 100%; }
.fr-file a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-x { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 999px; } .fr-x:hover { background: var(--bad-soft); color: var(--bad); }
.fr-addfile[hidden] { display: none; }
/* the employee's link page */
body.fill-page { min-height: 100vh; }
.fill-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; max-width: 860px; margin: 0 auto; }
.fill-brand img { height: 40px; width: auto; max-width: 220px; object-fit: contain; display: block; }
.fill-lang { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--panel); }
.fill-lang-btn { border: 0; background: none; padding: 7px 16px; font-weight: 700; cursor: pointer; color: var(--muted); }
.fill-lang-btn.on { background: var(--accent); color: var(--accent-ink); }
.fill-main { max-width: 860px; margin: 0 auto; padding: 0 16px 40px; }
.fill-card { padding: 22px; }
.fill-title { margin: 0 0 10px; font-size: 22px; }
.fill-foot { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.fill-send { padding: 12px 18px; font-size: 16px; }
.fill-msg { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 10px 12px; font-weight: 600; } .fill-msg[hidden] { display: none; }
.fill-done { text-align: center; padding: 40px 20px; } .fill-done-icon { font-size: 48px; }
@media (max-width: 640px) { .fill-card { padding: 16px; } .fill-title { font-size: 19px; } }
.oauth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; } .oauth-card { max-width: 480px; text-align: center; }

/* phone bottom bar: chosen by each person (Account → 📱 Phone app) */
.phone-only { display: none; margin-top: 8px; }
@media (max-width: 820px) { .phone-only { display: block; } .tabbar .tab-l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; } }
.tabbar-preview { display: flex; gap: 4px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); margin-bottom: 12px; overflow-x: auto; }
.tabbar-prev-item { flex: 1; min-width: 56px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.tabbar-prev-item .tab-ic { font-size: 20px; }
.tabbar-edit { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.tabbar-edit-row { flex-wrap: nowrap; } .tabbar-edit-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
