/* NET — app styles. Mobile first; two panes from 900px. */
:root {
	--bg: #090C11;
	--bg-deep: #07090C;
	--bar: #0B0F14;
	--surface: #0E131A;
	--raised: #151B24;
	--hover: #1A2230;
	--line: #151B24;
	--line-2: #222C3A;
	--line-3: #3A4658;
	--text: #E6EBF2;
	--text-2: #C9D1DC;
	--muted: #A3AEBD;
	--faint: #808B9C;
	--steel: #9DB7D5;
	--accent: #5FBF8A;
	--mine: #1B2A3D;
	--mine-quote: #15233A;
	--sel: #14243A;
	--open: #5FBF8A;
	--rest: #E3A63A;
	--seal: #E2584C;
	--ink-on-light: #07090C;
	--sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--cond: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
	--r: 4px;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow-x: clip; }
body.net {
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: var(--steel); }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- mark ---------- */
.mark { display: inline-grid; grid-template-columns: repeat(3, 1fr); gap: 2px; width: 30px; height: 30px; padding: 4px; border: 1px solid var(--line-3); flex: none; }
.mark i { display: block; }
.mark i:nth-child(odd) { background: var(--text); }
.mark-lg { width: 46px; height: 46px; gap: 3px; padding: 6px; }

/* ---------- classification banner ---------- */
.ban { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--mono); font-weight: 600; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: calc(4px + var(--safe-t)) 8px 4px; white-space: nowrap; overflow: hidden; flex: none; }
.ban-o { background: var(--open); color: var(--ink-on-light); }
.ban-r { background: var(--rest); color: var(--ink-on-light); }
.ban-s { background: var(--seal); color: #FFF6F4; }
.g { display: inline-block; width: 8px; height: 8px; background: currentColor; flex: none; }
.g-o { border-radius: 50%; }
.g-r { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.g-s { transform: rotate(45deg) scale(.85); }
.lvl-o { color: var(--open); } .lvl-r { color: var(--rest); } .lvl-s { color: var(--seal); }

/* ---------- buttons & fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--r); font-weight: 700; font-size: 16px; text-decoration: none; }
.btn-primary { background: var(--text); color: var(--ink-on-light); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border: 1px solid var(--line-3); color: var(--text); }
.btn-danger { border: 1px solid var(--seal); color: var(--seal); }
.btn-block { width: 100%; min-height: 56px; font-size: 17px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.field label { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--steel); margin-bottom: 6px; }
.field input, .field textarea, .input { width: 100%; min-height: 52px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 0 14px; font-size: 16px; color: var(--text); }
.field input:focus, .input:focus { outline: none; border-color: var(--steel); }
.hint { font-size: 13px; color: var(--faint); margin: 6px 0 0; }
.hint.ok { color: var(--accent); } .hint.bad { color: var(--seal); }
.alert { background: #2A1416; border: 1px solid #5A2A2A; color: #F5C3BE; padding: 10px 12px; border-radius: var(--r); font-size: 14px; margin: 0 0 14px; }
.fine { font-size: 13px; color: var(--faint); text-align: center; margin: 14px 0 0; }

/* ---------- sign-in ---------- */
.signin { min-height: 100%; display: flex; flex-direction: column; }
.signin-main { flex: 1; width: 100%; max-width: 420px; margin: 0 auto; padding: 48px 24px calc(24px + var(--safe-b)); display: flex; flex-direction: column; }
.signin h1, .page-title { font-family: var(--cond); font-weight: 700; font-size: 38px; line-height: 1.05; margin: 26px 0 8px; }
.signin .muted { margin: 0 0 26px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.link-right { align-self: flex-end; min-height: 44px; display: flex; align-items: center; font-size: 14px; font-weight: 600; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); }
.noscript { padding: 24px; text-align: center; }

/* ---------- shell ---------- */
.shell { height: 100vh; height: 100dvh; height: var(--app-h, 100dvh); display: flex; }
html:has(.shell), body:has(.shell) { overflow: hidden; overscroll-behavior: none; }
.pane-list, .pane-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; background: var(--bg); }
.pane-list { flex: 1; }
.pane-main { flex: 1; display: none; }
.shell[data-view="main"] .pane-list { display: none; }
.shell[data-view="main"] .pane-main { display: flex; }
@media (min-width: 720px) {
	.pane-list { flex: 0 0 clamp(320px, 34vw, 400px); display: flex !important; border-right: 1px solid var(--line); }
	.pane-main { display: flex !important; }
	/* desktop: the bottom menu becomes a slim rail down the left edge */
	.shell { padding-left: 76px; }
	.pane-list > .tabs { position: fixed; left: 0; top: 0; bottom: 0; width: 76px; z-index: 20; display: flex !important; flex-direction: column; justify-content: flex-start; gap: 6px; padding: 18px 6px; border-top: 0; border-right: 1px solid var(--line); background: #040507; }
	.pane-list > .tabs .tab { min-height: 64px; font-size: 11px; }
	.pane-list > .tabs .tab:hover { color: var(--text); }
	.pane-list > .tabs .tab:hover .ic { background: rgba(255,255,255,.05); }
	.pane-list > .tabs .tab:last-child { margin-top: auto; }
	.pane-list > .tabs::before { content: ""; flex: none; width: 38px; height: 38px; margin: 0 auto 16px; background: url(favicon.svg) center / contain no-repeat; }
	.scroll, .msgs, .pane-list, .pane-main { scrollbar-width: thin; scrollbar-color: #232A35 transparent; }
	.scroll::-webkit-scrollbar, .msgs::-webkit-scrollbar { width: 8px; }
	.scroll::-webkit-scrollbar-thumb, .msgs::-webkit-scrollbar-thumb { background: #232A35; border-radius: 8px; }
	.scroll::-webkit-scrollbar-track, .msgs::-webkit-scrollbar-track { background: transparent; }
	.only-mobile { display: none !important; }
}
.empty-main { flex: 1; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; color: var(--faint); padding: 24px; }

/* ---------- top bars ---------- */
.topbar { display: flex; align-items: center; gap: 4px; padding: 10px 8px 6px 16px; flex: none; }
.topbar .title { flex: 1; font-family: var(--cond); font-weight: 700; font-size: 28px; letter-spacing: .02em; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; flex: none; }
.icon-btn:hover { background: var(--raised); }
.icon-btn svg { width: 22px; height: 22px; }
.chathead { display: flex; align-items: center; gap: 8px; padding: 8px 6px 8px 4px; background: var(--bar); border-bottom: 1px solid var(--line); flex: none; }
.chathead .who { flex: 1; min-width: 0; text-decoration: none; color: var(--text); }
.chathead .who b { display: block; font-size: 16.5px; }
.chathead .who small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- search + chips ---------- */
.search { margin: 4px 16px 10px; display: flex; align-items: center; gap: 10px; background: var(--raised); border-radius: 22px; padding: 0 14px; min-height: 44px; flex: none; }
.search svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font-size: 15px; }
.chips { display: flex; gap: 8px; padding: 0 16px 8px; overflow-x: auto; scrollbar-width: none; flex: none; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 18px; background: var(--raised); color: var(--text-2); font-size: 14px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--sel); color: var(--steel); font-weight: 600; }

/* ---------- lists ---------- */
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.row { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 74px; text-decoration: none; color: var(--text); width: 100%; text-align: left; }
.row:hover { background: #0D121A; }
.row.active { background: var(--raised); }
.row .meta { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line); }
.row .top { display: flex; align-items: baseline; gap: 8px; }
.row .top b { font-weight: 600; font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .tm { margin-left: auto; font-size: 12px; color: var(--faint); flex: none; }
.row .tm.new { color: var(--accent); }
.row .sub { display: flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--muted); }
.row .sub .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { flex: none; min-width: 22px; height: 22px; border-radius: 11px; background: var(--accent); color: var(--ink-on-light); font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.av { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600; font-size: 17px; color: var(--text); }
.av-sm { width: 40px; height: 40px; font-size: 14px; }
.av-xs { width: 32px; height: 32px; font-size: 12px; }
.av-grp { background: var(--hover); border: 1px solid var(--line-2); color: var(--steel); }
.av-grp svg { width: 24px; height: 24px; }
.section-lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 16px 16px 6px; }
.empty { padding: 40px 24px; text-align: center; color: var(--faint); }
.empty b { display: block; color: var(--text-2); font-size: 17px; margin-bottom: 6px; }

/* ---------- FAB + tabs ---------- */
.fab { position: absolute; right: 16px; bottom: calc(84px + var(--safe-b)); width: 58px; height: 58px; border-radius: 16px; background: var(--accent); display: grid; place-items: center; box-shadow: 0 12px 24px -10px #000; }
.fab svg { width: 24px; height: 24px; color: var(--ink-on-light); }
@media (min-width: 720px) { .fab { bottom: 20px; } }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bar); border-top: 1px solid var(--line); padding: 4px 4px calc(8px + var(--safe-b)); flex: none; }
@media (max-width: 719px) {
	.pane-list:has(> .tabs) { padding-bottom: calc(68px + var(--safe-b)); }
	.pane-list > .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; }
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 56px; color: var(--muted); font-size: 12px; text-decoration: none; }
.tab .ic { position: relative; padding: 4px 18px; border-radius: 16px; display: grid; place-items: center; }
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--text); font-weight: 600; }
.tab[aria-current="page"] .ic { background: var(--sel); color: var(--steel); }
.tab .dot { position: absolute; top: -3px; right: 6px; background: var(--accent); color: var(--ink-on-light); font-size: 10px; font-weight: 700; border-radius: 8px; padding: 0 5px; }

/* ---------- conversation ---------- */
.wall { background-color: var(--bg); background-image: radial-gradient(#131A24 1.2px, transparent 1.3px); background-size: 18px 18px; }
.msgs { flex: 1; overflow-y: auto; padding: 12px 10px 6px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.sys { align-self: center; max-width: 320px; background: #111720; border: 1px solid #1E2836; border-radius: 6px; padding: 7px 12px; font-size: 12.5px; color: var(--text-2); text-align: center; margin: 4px 0 8px; }
.day { align-self: center; margin: 8px 0; }
.day span { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; background: #111720; color: var(--muted); border-radius: 6px; padding: 4px 10px; }
.bub { position: relative; max-width: min(80%, 560px); padding: 6px 10px 5px; border-radius: 4px 14px 14px 14px; background: var(--raised); align-self: flex-start; word-wrap: break-word; overflow-wrap: anywhere; }
.bub.cont { border-radius: 14px; margin-top: -1px; }
.bub.me { align-self: flex-end; background: var(--mine); border-radius: 14px 4px 14px 14px; }
.bub.me.cont { border-radius: 14px; }
.bub .nm { font-size: 13px; font-weight: 600; margin-bottom: 1px; }
.bub .tx { font-size: 15.5px; white-space: pre-wrap; }
.bub .ts { float: right; font-size: 11px; color: var(--faint); margin: 6px 0 -4px 10px; display: inline-flex; align-items: center; gap: 4px; }
.bub.me .ts { color: #8FA3BC; }
.bub .quote { background: rgba(0,0,0,.2); border-left: 3px solid var(--steel); border-radius: 6px; padding: 5px 9px; font-size: 12.5px; color: var(--text-2); margin: 2px 0 4px; cursor: pointer; }
.bub .quote b { display: block; color: var(--steel); }
.bub.pending { opacity: .6; }
.bub.failed { outline: 1px solid var(--seal); }
.bub.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--steel); } 100% { box-shadow: 0 0 0 0 transparent; } }
.bub-actions { display: flex; gap: 6px; margin-top: 6px; }
.bub-actions button { font-size: 12.5px; font-weight: 600; color: var(--steel); min-height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 14px; }
.older { align-self: center; font-size: 13px; color: var(--steel); min-height: 36px; padding: 0 12px; }

/* ---------- composer ---------- */
.composer { flex: none; padding: 6px 8px calc(10px + var(--safe-b)); background: var(--bg); }
.replybar { display: flex; align-items: center; gap: 10px; background: var(--surface); border-left: 3px solid var(--steel); border-radius: 8px; padding: 6px 6px 6px 10px; margin: 0 4px 6px; font-size: 13px; color: var(--text-2); }
.replybar .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replybar b { color: var(--steel); }
.compose-row { display: flex; align-items: flex-end; gap: 8px; }
.compose-box { flex: 1; display: flex; align-items: flex-end; background: var(--raised); border-radius: 24px; padding: 4px 6px 4px 16px; min-height: 48px; }
.compose-box textarea { flex: 1; min-width: 0; resize: none; background: transparent; border: 0; outline: 0; font-size: 16px; line-height: 1.4; max-height: 140px; padding: 9px 0; }
.send { width: 50px; height: 50px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; flex: none; }
.send svg { width: 22px; height: 22px; color: var(--ink-on-light); }
.send[disabled] { opacity: .5; }
.readonly { padding: 14px 16px calc(14px + var(--safe-b)); text-align: center; color: var(--faint); font-size: 14px; border-top: 1px solid var(--line); }

/* ---------- forms in-app ---------- */
.page { flex: 1; overflow-y: auto; padding: 8px 16px calc(24px + var(--safe-b)); }
.page .page-title { font-size: 30px; margin: 10px 0 6px; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; min-height: 48px; border: 1px solid var(--line-2); border-radius: var(--r); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.seg button[aria-pressed="true"] { background: var(--sel); border-color: #2C4466; color: var(--text); }
.pick { display: flex; align-items: center; gap: 12px; min-height: 62px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.pick .t { flex: 1; min-width: 0; }
.pick .t small { display: block; color: var(--muted); font-size: 13px; }
.ck { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-3); flex: none; display: grid; place-items: center; }
.ck.on { background: var(--accent); border-color: var(--accent); }
.ck svg { width: 14px; height: 14px; color: var(--ink-on-light); }
.sticky-foot { flex: none; padding: 12px 16px calc(16px + var(--safe-b)); background: var(--bar); border-top: 1px solid var(--line); }
.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 14px; margin: 14px 0; }
.card h3 { margin: 0 0 10px; font-size: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 0 8px; }
.profile .av { width: 104px; height: 104px; font-family: var(--cond); font-size: 38px; }
.profile h2 { margin: 12px 0 2px; font-size: 22px; }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); background: var(--text); color: var(--ink-on-light); padding: 12px 16px; border-radius: var(--r); font-size: 14px; font-weight: 600; z-index: 50; max-width: calc(100% - 32px); }
.offline { background: #2A2210; color: #E9D9B5; text-align: center; font-size: 13px; padding: 6px; flex: none; }

/* ---------- KNOX v1.1 · brand ---------- */
[hidden] { display: none !important; }
.logo { width: 34px; height: 34px; flex: none; display: block; }
.logo-lg { width: 72px; height: 72px; }
.wordmark { font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: .42em; color: var(--steel); margin-top: 14px; }
b.wordmark { display: block; font-size: 15px; }
.signin h1 { margin-top: 10px; }
.title-brand { display: flex; align-items: center; gap: 10px; letter-spacing: .14em !important; }
.title-brand .logo { width: 30px; height: 30px; }
.boot .logo { width: 56px; height: 56px; }

/* ---------- sealed messages: press and hold to read ---------- */
.pane-main { position: relative; }
.bub.locked { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.bub.locked .tx.sealed, .bub.locked .quote, .bub.locked .doc-t b { transition: color .12s ease; }
.bub.locked:not(.open) .tx.sealed { font-family: var(--mono); font-size: 14px; letter-spacing: .04em; color: #7F93AC; }
.bub.locked:not(.open) .quote { font-family: var(--mono); color: #6F8299; }
.bub.locked:not(.open) .doc-t b { font-family: var(--mono); color: #7F93AC; }
.bub.locked.open { box-shadow: 0 0 0 1px var(--steel); }
.ciph { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: #6F8299; }
.hold-hint { align-self: center; font-size: 12px; color: var(--faint); padding: 0 4px; }
.tx-only { min-height: 14px; }
.tx-only .ts { margin-top: 2px; }

/* watermark while reading */
.wm { position: absolute; inset: 0; pointer-events: none; z-index: 5; opacity: 0; background-repeat: repeat; transition: opacity .12s ease; }
.wm.on { opacity: .13; }

/* blur everything when KNOX is not in front */
.shielded .msgs, .shielded .row .sub, .shielded .viewer, .shielded .sheet { filter: blur(18px); }
@media print { body { display: none !important; } }

/* ---------- media ---------- */
.bub.has-image, .bub.has-video { padding: 3px 3px 5px; }
.bub.has-image .nm, .bub.has-video .nm, .bub.has-image .quote, .bub.has-video .quote { margin-left: 7px; margin-right: 7px; }
.bub.has-image .tx, .bub.has-video .tx { padding: 0 7px; }
.media { position: relative; display: block; width: min(68vw, 300px); max-height: 380px; min-height: 120px; border-radius: 11px; overflow: hidden; background: #0A0E14; }
.media img, .media video { display: block; width: 100%; height: 100%; max-height: 380px; object-fit: cover; -webkit-user-drag: none; }
.media img, .media video, .viewer-stage img { filter: blur(22px) brightness(.55); transform: scale(1.08); transition: filter .15s ease, transform .15s ease; }
.bub.open .media img, .bub.open .media video, .viewer-stage.open img { filter: none; transform: none; }
.veil { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--text); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; pointer-events: none; transition: opacity .12s ease; }
.veil svg { width: 26px; height: 26px; }
.bub.open .veil, .viewer-stage.open .veil { opacity: 0; }
.media-open { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border-radius: 50%; background: rgba(9,12,17,.7); display: grid; place-items: center; color: var(--text); }
.media-open svg { width: 18px; height: 18px; }
.vid-dur { position: absolute; left: 8px; bottom: 8px; font-family: var(--mono); font-size: 11px; background: rgba(9,12,17,.75); padding: 2px 6px; border-radius: 4px; }
.doc { display: flex; align-items: center; gap: 10px; min-width: min(64vw, 260px); padding: 8px 10px; margin: 2px 0 4px; background: rgba(0,0,0,.22); border-radius: 10px; color: var(--text); text-decoration: none; }
.doc > svg { width: 20px; height: 20px; color: var(--steel); flex: none; }
.doc-ic { width: 40px; height: 40px; border-radius: 8px; background: var(--hover); display: grid; place-items: center; color: var(--steel); flex: none; }
.doc-ic svg { width: 22px; height: 22px; }
.doc-t { flex: 1; min-width: 0; }
.doc-t b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-t small { display: block; font-size: 12px; color: var(--muted); }

/* voice note player */
.vp { display: flex; align-items: center; gap: 10px; min-width: min(64vw, 250px); padding: 4px 2px 2px; }
.vp-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--steel); color: var(--ink-on-light); display: grid; place-items: center; flex: none; }
.vp-btn svg { width: 20px; height: 20px; }
.vp-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.vp-lbl { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.vp-lbl svg { width: 13px; height: 13px; }
.vp-bar { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--line-3); cursor: pointer; }
.vp-bar::before { content: ""; position: absolute; inset: -12px 0; }
.vp-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--accent); }
.vp-time { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: none; min-width: 34px; text-align: right; }

/* upload progress */
.upl { display: flex; align-items: center; gap: 8px; padding: 4px 6px 0; }
.upl-bar { position: relative; flex: 1; height: 4px; border-radius: 2px; background: var(--line-3); overflow: hidden; }
.upl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); transition: width .15s linear; }
.upl-t { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }

/* ---------- composer: attach + voice ---------- */
.compose-box { padding-left: 4px; padding-right: 4px; }
.compose-box textarea { padding-left: 4px; padding-right: 4px; }
.cb-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); flex: none; align-self: flex-end; }
.cb-btn:hover { color: var(--text); background: var(--hover); }
.cb-btn svg { width: 22px; height: 22px; }
.attach-menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 8px; margin: 0 4px 8px; }
.attach-menu button { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 84px; font-size: 13px; color: var(--text-2); border-radius: 10px; }
.attach-menu button:hover { background: var(--raised); }
.am-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-on-light); }
.am-ic svg { width: 24px; height: 24px; }
.am-1 { background: var(--steel); } .am-2 { background: var(--accent); } .am-3 { background: var(--rest); }
.rec-bar { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 0 0 4px; }
.rec-del { color: var(--seal); }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--seal); animation: recpulse 1.2s ease-in-out infinite; flex: none; }
@keyframes recpulse { 50% { opacity: .25; } }
.rec-time { font-family: var(--mono); font-size: 16px; color: var(--text); min-width: 44px; }
.rec-hint { flex: 1; font-size: 13px; color: var(--muted); }

/* ---------- send sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; background: var(--bg-deep); display: flex; flex-direction: column; padding-top: var(--safe-t); }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 4px; border-bottom: 1px solid var(--line); }
.sheet-head .who { flex: 1; min-width: 0; }
.sheet-head .who b { display: block; font-size: 16px; }
.sheet-head .who small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-items { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 12px; align-content: start; }
.sheet-items .doc { grid-column: 1 / -1; }
.sheet-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface); }
.sheet-thumb img, .sheet-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-badge { position: absolute; left: 6px; bottom: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; background: rgba(9,12,17,.8); padding: 2px 6px; border-radius: 4px; }
.sheet-foot { display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px calc(10px + var(--safe-b)); }
.sheet-cap { flex: 1; min-width: 0; resize: none; background: transparent; border: 0; outline: 0; font-size: 16px; line-height: 1.4; max-height: 120px; padding: 9px 10px; }

/* ---------- photo viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 45; background: rgba(4,6,9,.96); display: flex; flex-direction: column; }
.viewer-bar { display: flex; justify-content: flex-end; padding: calc(8px + var(--safe-t)) 8px 8px; }
.viewer-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; }

/* pull to refresh */
.ptr { flex: none; height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.ptr-spin { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-3); border-top-color: var(--steel); flex: none; }
.ptr.ready { color: var(--text-2); }
.ptr.ready .ptr-spin { border-top-color: var(--accent); }
.ptr.busy .ptr-spin { animation: ptrspin .7s linear infinite; }
@keyframes ptrspin { to { transform: rotate(360deg); } }

/* privacy rules list */
.rules { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.rules li { margin: 0 0 8px; }

/* =========================================================
   KNOX · high-end dark pass
   Near-black OLED surfaces, white hairlines instead of grey
   borders, machined double-bezel panels, one signal green.
   ========================================================= */
:root {
	--bg: #050608;
	--bg-deep: #030405;
	--bar: #07080B;
	--surface: #0B0D11;
	--raised: #111419;
	--hover: #171B22;
	--line: rgba(255,255,255,.055);
	--line-2: rgba(255,255,255,.09);
	--line-3: rgba(255,255,255,.16);
	--text: #EEF1F5;
	--text-2: #C8CED7;
	--muted: #98A1AE;
	--faint: #6E7785;
	--steel: #B9C6D6;
	--accent: #43D38A;
	--mine: #15202C;
	--sel: #121A25;
	--ease: cubic-bezier(.32,.72,0,1);
	--hi: inset 0 1px 0 rgba(255,255,255,.06);
}
body.net { background: var(--bg); }
.logo { color: #FFFFFF; }
.logo-xl { width: 88px; height: 88px; }
::selection { background: rgba(255,255,255,.18); }

/* motion */
.btn, .chip, .row, .tab .ic, .icon-btn, .cb-btn, .send, .bub, .attach-menu button, .pick, .seg button { transition: transform .45s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), opacity .35s var(--ease); }
.btn:active, .send:active, .icon-btn:active, .cb-btn:active, .vp-btn:active { transform: scale(.97); }

/* sign-in: machined panel on a faint engineering grid */
.signin { position: relative; background:
	radial-gradient(120% 60% at 50% -10%, rgba(255,255,255,.06), transparent 60%),
	var(--bg); }
.signin::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .5;
	background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
	background-size: 32px 32px;
	-webkit-mask-image: radial-gradient(80% 60% at 50% 30%, #000, transparent);
	mask-image: radial-gradient(80% 60% at 50% 30%, #000, transparent); }
.signin-main { position: relative; padding-top: 56px; }
.brand-lock { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.brand-lock .wordmark { margin: 0; font-size: 15px; letter-spacing: .6em; padding-left: .6em; color: #FFFFFF; }
.status-line { list-style: none; margin: 22px auto 6px; padding: 6px 14px; display: flex; gap: 14px; justify-content: center; border: 1px solid var(--line-2); border-radius: 999px; width: max-content; max-width: 100%; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); background: rgba(255,255,255,.02); }
.status-line li { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.status-line li + li::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--line-3); margin-right: 7px; }
.led { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(67,211,138,.15); animation: led 2.4s var(--ease) infinite; }
@keyframes led { 50% { opacity: .45; } }
.signin h1 { text-align: center; font-size: 30px; margin: 26px 0 6px; letter-spacing: -.01em; }
.signin .muted { text-align: center; margin: 0 0 22px; font-size: 15px; }
.signin .alert { border-radius: 14px; }

.bezel { padding: 6px; border-radius: 26px; background: rgba(255,255,255,.025); border: 1px solid var(--line-2); }
.bezel-core { padding: 18px 16px 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--hi); }
.field input, .field textarea, .input { background: var(--bg); border: 1px solid var(--line-2); border-radius: 14px; transition: border-color .35s var(--ease), box-shadow .35s var(--ease); }
.field input:focus, .input:focus { border-color: var(--line-3); box-shadow: 0 0 0 4px rgba(255,255,255,.04); }
.field label { color: var(--muted); }

/* buttons: pills, white primary, nested trailing icon */
.btn { border-radius: 999px; font-weight: 600; letter-spacing: .01em; }
.btn-primary { background: #FFFFFF; color: #050608; }
.btn-primary:hover { background: #E9EDF2; }
.btn-ghost { border: 1px solid var(--line-3); background: rgba(255,255,255,.02); }
.btn-ghost:hover { background: rgba(255,255,255,.05); }
.btn-danger { border-color: rgba(226,88,76,.5); }
.btn-island { justify-content: space-between; padding: 0 8px 0 24px; }
.btn-island .btn-ic { width: 40px; height: 40px; border-radius: 50%; background: rgba(5,6,8,.08); display: grid; place-items: center; transition: transform .5s var(--ease); }
.btn-island .btn-ic svg { width: 18px; height: 18px; }
.btn-island:hover .btn-ic { transform: translateX(3px) scale(1.05); }

/* app chrome */
.topbar { padding-top: 14px; }
.topbar .title { font-size: 26px; }
.title-brand { font-family: var(--mono) !important; font-size: 17px !important; font-weight: 600 !important; letter-spacing: .5em !important; color: #FFFFFF; }
.title-brand .logo { width: 28px; height: 28px; }
.search { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.chip { background: transparent; border: 1px solid var(--line-2); }
.chip[aria-pressed="true"] { background: #FFFFFF; color: #050608; border-color: #FFFFFF; }
.row:hover { background: rgba(255,255,255,.025); }
.row.active { background: rgba(255,255,255,.04); }
.av { box-shadow: var(--hi); }
.av-grp { background: var(--raised); border: 1px solid var(--line-2); color: var(--text-2); }
.badge { background: #FFFFFF; color: #050608; }
.row .tm.new { color: #FFFFFF; font-weight: 600; }
.tabs { background: rgba(7,8,11,.92); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.tab[aria-current="page"] .ic { background: rgba(255,255,255,.08); color: #FFFFFF; }
.tab .dot { background: #FFFFFF; color: #050608; }
.fab { background: #FFFFFF; border-radius: 20px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.9), var(--hi); }
.fab svg { color: #050608; }
.chathead { background: rgba(7,8,11,.9); border-bottom: 1px solid var(--line); }
.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--hi); padding: 16px; }
.section-lbl { color: var(--faint); }
.toast { background: #FFFFFF; color: #050608; border-radius: 999px; padding: 12px 20px; box-shadow: 0 20px 40px -20px #000; }

/* conversation */
.wall { background-color: var(--bg); background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.2px); background-size: 22px 22px; }
.sys { background: rgba(255,255,255,.025); border: 1px solid var(--line-2); border-radius: 14px; color: var(--muted); font-size: 12.5px; }
.day span { background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; }
.bub { background: var(--raised); box-shadow: var(--hi), 0 0 0 1px var(--line); border-radius: 6px 18px 18px 18px; }
.bub.me { background: var(--mine); border-radius: 18px 6px 18px 18px; }
.bub.cont, .bub.me.cont { border-radius: 18px; }
.bub.locked:not(.open) .tx.sealed { color: #7E8A9A; }
.bub.locked.open { box-shadow: var(--hi), 0 0 0 1px rgba(255,255,255,.35); }
.bub .quote { border-left-color: var(--line-3); background: rgba(255,255,255,.03); }
.bub .quote b { color: var(--text-2); }

/* composer: bezel pill + white send */
.composer { background: linear-gradient(to top, var(--bg) 70%, transparent); }
.compose-box { background: var(--surface); border: 1px solid var(--line-2); border-radius: 26px; box-shadow: var(--hi); }
.send { background: #FFFFFF; box-shadow: 0 10px 24px -14px rgba(255,255,255,.4); }
.send svg { color: #050608; }
.attach-menu { background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--hi); }
.am-ic { background: var(--raised) !important; border: 1px solid var(--line-2); color: #FFFFFF; }
.vp-btn { background: #FFFFFF; color: #050608; }
.vp-fill, .upl-fill { background: #FFFFFF; }
.ptr.ready .ptr-spin { border-top-color: #FFFFFF; }
.sheet, .viewer { background: rgba(3,4,5,.97); }

/* reading panel shown while a message is held (sits under the name watermark) */
.reader { position: absolute; left: 12px; right: 12px; z-index: 4; max-height: 46%; overflow: hidden; padding: 16px 18px 18px; border-radius: 22px; background: rgba(11,13,17,.97); border: 1px solid var(--line-3); box-shadow: var(--hi), 0 30px 60px -20px rgba(0,0,0,.9); pointer-events: none; animation: readerIn .32s var(--ease) both; }
.reader.at-top { top: 112px; }
.reader.at-bottom { bottom: calc(86px + var(--safe-b)); }
.reader-meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.reader-meta b { color: var(--text-2); font-weight: 600; }
.reader-tx { font-size: 19px; line-height: 1.5; color: #FFFFFF; white-space: pre-wrap; overflow-wrap: anywhere; }
.reader-tx.sm { font-size: 16.5px; }
.reader-tx.xs { font-size: 15px; line-height: 1.55; }
.reader { display: flex; flex-direction: column; }
.reader-scroll { overflow: hidden; min-height: 0; flex: 1; -webkit-mask-image: linear-gradient(#000 calc(100% - 28px), transparent); mask-image: linear-gradient(#000 calc(100% - 28px), transparent); }
.reader:not(.long) .reader-scroll { -webkit-mask-image: none; mask-image: none; }
.reader.full { max-height: none; }
.reader-bar { display: none; height: 2px; margin-top: 10px; border-radius: 2px; background: var(--line-2); overflow: hidden; flex: none; }
.reader-bar span { display: block; height: 100%; width: 0; background: #fff; }
.reader-hint { display: none; margin-top: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); text-align: center; flex: none; }
.reader.long .reader-bar, .reader.long .reader-hint { display: block; }
@keyframes readerIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* PIN lock */
.lockscreen { min-height: 100vh; min-height: 100dvh; width: 100%; display: flex; flex-direction: column; background: radial-gradient(120% 60% at 50% -10%, rgba(255,255,255,.06), transparent 60%), var(--bg); }
.lock-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 24px calc(24px + var(--safe-b)); }
.lock-main .brand-lock { margin-bottom: 18px; }
.lock-main .brand-lock .wordmark { margin: 0; font-size: 13px; letter-spacing: .6em; padding-left: .6em; color: #fff; }
.pin { width: 100%; max-width: 320px; display: flex; flex-direction: column; align-items: center; }
.pin-title { font-family: var(--cond); font-size: 26px; font-weight: 700; margin: 0 0 18px; }
.pin-dots { display: flex; gap: 14px; min-height: 16px; }
.pin-dots span { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--line-3); transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .3s var(--ease); }
.pin-dots span.on { background: #fff; border-color: #fff; transform: scale(1.05); }
.pin-dots.shake { animation: pinshake .42s var(--ease); }
@keyframes pinshake { 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(3px); } }
.pin-msg { min-height: 40px; margin: 14px 0 10px; text-align: center; font-size: 14px; color: var(--muted); }
.pin-msg.bad { color: #F08A80; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 22px; justify-content: center; }
.pin-key { width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.045); border: 1px solid var(--line-2); box-shadow: var(--hi); color: #fff; font-family: var(--sans); font-size: 28px; font-weight: 400; display: grid; place-items: center; transition: background-color .2s var(--ease), transform .3s var(--ease); }
.pin-key:active { background: rgba(255,255,255,.16); transform: scale(.94); }
.pin-ok { font-size: 15px; font-weight: 600; letter-spacing: .08em; }
.pin-back { background: transparent; border-color: transparent; box-shadow: none; }
.pin-back svg { width: 26px; height: 26px; }
.lock-foot { display: flex; align-items: center; gap: 28px; margin-top: 26px; }
.lock-foot button, .lock-foot a { display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; min-height: 44px; }
.lock-foot button:hover, .lock-foot a:hover { color: #fff; }

/* Face ID / fingerprint unlock */
.lock-foot-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 18px; }
.lock-foot-wrap .lock-foot { margin-top: 10px; }
.bio-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 16px; border-radius: 999px; border: 1px solid var(--line-3); background: rgba(255,255,255,.04); color: #fff; font-weight: 600; font-size: 15px; transition: background-color .3s var(--ease), transform .4s var(--ease); }
.bio-btn:active { transform: scale(.97); }
.bio-btn svg, .btn svg { width: 22px; height: 22px; }
.bio-btn[disabled] { opacity: .5; }
.bio-ring { width: 96px; height: 96px; border-radius: 28px; border: 1px solid var(--line-3); background: rgba(255,255,255,.03); box-shadow: var(--hi); display: grid; place-items: center; color: #fff; margin: 6px 0 18px; }
.bio-ring svg { width: 52px; height: 52px; }

/* Face ID first lock */
.bio-big { width: 132px; height: 132px; border-radius: 38px; margin: 26px 0 6px; cursor: pointer; position: relative; transition: transform .4s var(--ease), border-color .3s var(--ease); }
.bio-big svg { width: 68px; height: 68px; }
.bio-big:active { transform: scale(.96); }
.bio-big.scanning { border-color: rgba(255,255,255,.4); }
.bio-big.scanning::after { content: ""; position: absolute; inset: -6px; border-radius: 44px; border: 1.5px solid rgba(255,255,255,.55); animation: bioscan 1.4s var(--ease) infinite; }
@keyframes bioscan { 0% { opacity: .9; transform: scale(.94); } 100% { opacity: 0; transform: scale(1.12); } }
.bio-big.ok { border-color: var(--accent); color: var(--accent); }

/* message sound picker */
.tones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tone { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255,255,255,.02); text-align: left; transition: border-color .25s var(--ease), background-color .25s var(--ease); }
.tone .t { flex: 1; font-size: 14.5px; font-weight: 600; }
.tone-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--muted); flex: none; }
.tone-ic svg { width: 16px; height: 16px; }
.tone .ck { width: 22px; height: 22px; opacity: 0; }
.tone .ck svg { width: 12px; height: 12px; }
.tone.on { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.05); }
.tone.on .ck { opacity: 1; background: #fff; border-color: #fff; }
.tone.on .ck svg { color: #050608; }
.tone.on .tone-ic { color: #fff; }

/* seen, typing, delete, danger zone */
.bub.me .ts svg { color: #6E7785; }
.bub.me.seen .ts svg { color: var(--accent); }
.seen-by { align-self: flex-end; font-size: 11.5px; color: var(--faint); margin: -1px 6px 4px; }
.chathead small.typing { color: var(--accent); }
.bub-actions .danger { color: #F08A80; border-color: rgba(226,88,76,.4); }
.card-danger { border-color: rgba(226,88,76,.28); }
.card-danger h3 { color: #F08A80; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 14px; }

/* ---------- KNOX 1.2 ---------- */
/* companies */
.co-chips { padding-top: 2px; }
.chip-add { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); border-style: dashed !important; }
.chip-add svg { width: 14px; height: 14px; }
.co-card { margin-top: 4px; }
.co-head { display: flex; align-items: center; gap: 12px; }
.co-head small { display: block; font-size: 12px; }

/* private chats */
.tag-dm { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 7px; flex: none; }

/* reactions */
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0; }
.rx { display: inline-flex; align-items: center; gap: 3px; min-height: 26px; padding: 0 8px; border-radius: 999px; background: rgba(0,0,0,.28); border: 1px solid var(--line-2); font-size: 14px; line-height: 1; }
.rx span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.rx.mine { border-color: rgba(255,255,255,.35); }
.bub-actions { flex-direction: column; align-items: stretch; gap: 8px; }
.react-pick { display: flex; gap: 2px; background: rgba(0,0,0,.3); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 6px; width: max-content; max-width: 100%; }
.react-pick button { width: 38px; height: 38px; min-height: 0 !important; border: 0 !important; border-radius: 50% !important; padding: 0 !important; font-size: 21px !important; display: grid; place-items: center; transition: transform .3s var(--ease), background-color .2s var(--ease); }
.react-pick button:active { transform: scale(1.25); background: rgba(255,255,255,.08); }
.bub-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.bub-btns a.bub-save { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--steel); min-height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 14px; text-decoration: none; }
.wipe-seg { margin-top: 12px; }

/* forwarded + edited */
.fwd { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); margin: 0 0 2px; }
.fwd svg { width: 13px; height: 13px; }
.bub .ts .edited { font-style: normal; color: var(--faint); margin-right: 2px; }
.replybar.editing { border-left-color: var(--accent); }

/* swipe to reply */
.bub::before { content: ""; position: absolute; left: -38px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; opacity: 0; transform: scale(.6); transition: opacity .2s var(--ease), transform .3s var(--ease);
	background: rgba(255,255,255,.1) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M10 9 5 13l5 4M5 13h9a5 5 0 0 1 5 5'/%3E%3C/svg%3E") center / 16px no-repeat; pointer-events: none; }
.bub.swipe-ready::before { opacity: 1; transform: scale(1); }

/* @mentions */
.mention-box { margin: 0 4px 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--hi); overflow: hidden; }
.mention-box button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 12px; text-align: left; font-size: 14px; color: var(--muted); }
.mention-box button b { color: var(--text); font-weight: 600; margin-right: 4px; }
.mention-box button + button { border-top: 1px solid var(--line); }
.mention-box button:hover { background: rgba(255,255,255,.04); }
.reader .mention { color: var(--steel); font-weight: 600; }
.reader .mention.me { color: var(--accent); }

/* search in chat */
.chat-search { display: flex; align-items: center; gap: 2px; padding: 6px 6px 6px 0; background: var(--bar); border-bottom: 1px solid var(--line); flex: none; }
.chat-search .search { flex: 1; margin: 0 4px 0 10px; }
.cs-count { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }

/* lists inside sheets (forward, info) */
.sheet-list { flex: 1; overflow-y: auto; padding: 4px 16px; }
.sheet-list .pick { padding: 0; }

/* profile photos */
.av { position: relative; overflow: hidden; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; -webkit-user-drag: none; }
.av-edit { position: relative; border-radius: 50%; }
.av-edit .av-cam { position: absolute; right: 2px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #050608; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg); }
.av-edit .av-cam svg { width: 17px; height: 17px; }
/* group + company photos */
.av-xl { width: 96px; height: 96px; font-size: 30px; }
.av-xl svg { width: 40px; height: 40px; }
.av.has-photo { border-color: transparent; }
.pic-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.co-card .pic-wrap { flex-direction: row; justify-content: flex-start; margin-top: 12px; }
.co-card .pic-wrap .av-xl { width: 72px; height: 72px; }
.pic-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pic-btn { border-radius: 50%; padding: 0; }
.pic-edit { position: relative; border-radius: 50%; transition: opacity .2s ease; }
.pic-edit.busy { opacity: .45; }
.pic-cam { position: absolute; right: 0; bottom: 0; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #050608; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg); }
.pic-cam svg { width: 15px; height: 15px; }
.link-btn { font-size: 14px; font-weight: 600; color: var(--steel); min-height: 36px; }
.link-btn:hover { color: #fff; }

/* privacy guide */
.guide-link { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.guide-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line-2); color: #fff; flex: none; }
.guide-ic svg { width: 20px; height: 20px; }
.guide-ic.warn { color: var(--rest); }
.guide-ic.ok { color: var(--accent); }
.guide-t { flex: 1; min-width: 0; }
.guide-t b { display: block; font-size: 15.5px; }
.guide-t small { display: block; color: var(--muted); font-size: 13px; }
.guide-go { color: var(--muted); transform: rotate(180deg); display: grid; }
.guide-go svg { width: 18px; height: 18px; }
.guide-lead { font-size: 15.5px; line-height: 1.55; color: var(--text-2); margin: 14px 2px 4px; }
.guide-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.guide-head h3 { margin: 0 !important; font-size: 17px !important; }
.guide-item { padding: 10px 0; border-top: 1px solid var(--line); }
.guide-item:first-of-type { border-top: 0; }
.guide-item b { display: block; font-size: 14.5px; color: #fff; margin-bottom: 2px; }
.guide-item p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.guide-level { display: flex; flex-direction: column; gap: 6px; padding: 10px; margin: 0 -10px; border-radius: 14px; transition: background-color .4s var(--ease); }
.guide-level p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.guide-level.focus { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line-3); }
.guide-chip { align-self: flex-start; padding: 4px 10px !important; border-radius: 999px; }
.guide-intro { display: flex; align-items: center; gap: 12px; margin-top: 2px; padding: 12px; }
.guide-btns { display: flex; align-items: center; gap: 2px; }
.ban-link { cursor: pointer; position: relative; }
.ban-q { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; border: 1px solid currentColor; font-size: 9px; margin-left: 6px; opacity: .8; }

/* status glow: online green, busy orange, offline red */
.av.st-online, .av.st-busy, .av.st-offline { overflow: visible; }
.av.st-online img, .av.st-busy img, .av.st-offline img { overflow: hidden; }
.av.st-online { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #43D38A, 0 0 14px 3px rgba(67,211,138,.55); }
.av.st-busy { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #F0A23A, 0 0 14px 3px rgba(240,162,58,.5); }
.av.st-offline { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #E2584C, 0 0 12px 2px rgba(226,88,76,.4); }
.av-xs.st-online { box-shadow: 0 0 0 1.5px var(--bg), 0 0 0 3px #43D38A; }
.av-xs.st-busy { box-shadow: 0 0 0 1.5px var(--bg), 0 0 0 3px #F0A23A; }
.av-xs.st-offline { box-shadow: 0 0 0 1.5px var(--bg), 0 0 0 3px #E2584C; }
.status-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sp { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; color: var(--text-2); transition: border-color .25s var(--ease), background-color .25s var(--ease); }
.sp-dot { width: 10px; height: 10px; border-radius: 50%; }
.sp-online .sp-dot { background: #43D38A; box-shadow: 0 0 8px #43D38A; }
.sp-busy .sp-dot { background: #F0A23A; box-shadow: 0 0 8px #F0A23A; }
.sp-offline .sp-dot { background: #E2584C; box-shadow: 0 0 8px #E2584C; }
.sp[aria-checked="true"] { color: #fff; background: rgba(255,255,255,.06); }
.sp-online[aria-checked="true"] { border-color: rgba(67,211,138,.6); }
.sp-busy[aria-checked="true"] { border-color: rgba(240,162,58,.6); }
.sp-offline[aria-checked="true"] { border-color: rgba(226,88,76,.6); }

/* message support */
.support-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line-3); background: rgba(255,255,255,.03); color: var(--text); font-size: 14px; font-weight: 600; transition: background-color .35s var(--ease), transform .45s var(--ease); }
.support-pill:hover { background: rgba(255,255,255,.07); }
.support-pill:active { transform: scale(.97); }
.support-pill svg, .btn svg { width: 18px; height: 18px; }

/* =====================================================================
   KNOX 2 — "light in a dark room"
   Monochrome like the padlock mark: smoked-glass surfaces lit from above,
   white as the only light, colour kept for group levels and danger.
   Geist for reading, Geist Mono only for cipher and times.
   This layer restyles; it changes nothing about how KNOX works.
   ===================================================================== */
:root {
	--bg: #0B0B0D; --bg-deep: #08080A; --bar: rgba(22,22,25,.72); --surface: #151518; --raised: #1C1C20; --hover: #222227;
	--line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.1); --line-3: rgba(255,255,255,.18);
	--edge: inset 0 1px 0 rgba(255,255,255,.1);
	--text: #F2F2F4; --text-2: #CFD0D5; --muted: #A2A3AB; --faint: #8C8D95; --steel: #DADBE0; --accent: #F2F2F4;
	--mine: #F2F2F4; --mine-quote: rgba(0,0,0,.08); --sel: #F2F2F4;
	--open: #4FC98A; --rest: #E9A93C; --seal: #EE5A4F; --ink-on-light: #0B0B0D;
	--sans: "Geist", -apple-system, system-ui, sans-serif; --cond: var(--sans); --mono: "Geist Mono", ui-monospace, Menlo, monospace;
	--r: 14px; --spring: cubic-bezier(.2,.9,.25,1.08); --out: cubic-bezier(.16,1,.3,1);
}
body.net { background: var(--bg) radial-gradient(70% 38% at 50% -8%, rgba(255,255,255,.075), transparent 70%) no-repeat fixed; letter-spacing: -.005em; }
.pane-list, .pane-main, .wall, .composer { background: transparent; background-image: none; }
:focus-visible { outline-color: #fff; }
a { color: var(--text); }

/* type: no tracked capitals, no condensed */
.lbl, .section-lbl, .field label, .day span, .veil, .upl-t, .tag-dm { font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.section-lbl { font-size: 13px; font-weight: 500; color: var(--faint); padding: 18px 20px 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.topbar { padding: calc(14px + var(--safe-t)) 12px 8px 20px; }
.topbar .title { font-family: var(--sans); font-weight: 600; font-size: 36px; letter-spacing: -.035em; line-height: 1.05; }
.signin h1, .page-title, .page .page-title { font-family: var(--sans); font-weight: 600; letter-spacing: -.03em; }
.title-brand { letter-spacing: -.02em !important; }
.wordmark { font-family: var(--sans); letter-spacing: .3em; color: var(--muted); }

/* level strip: a quiet line of colour, not a banner */
.ban { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .01em; text-transform: none; background: transparent !important; padding: calc(6px + var(--safe-t)) 8px 4px; }
.ban-o { color: var(--open); } .ban-r { color: var(--rest); } .ban-s { color: var(--seal); }
.ban .g { width: 6px; height: 6px; }

/* controls */
.btn { border-radius: 999px; font-weight: 600; letter-spacing: -.01em; transition: transform .25s var(--out), background-color .2s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-ghost { border: 0; background: var(--surface); box-shadow: var(--edge); }
.btn-danger { border: 0; background: rgba(238,90,79,.12); color: #FF8F86; }
.field input, .field textarea, .input { background: var(--surface); border: 0; box-shadow: var(--edge), 0 0 0 1px var(--line); border-radius: 14px; }
.field input:focus, .input:focus { box-shadow: var(--edge), 0 0 0 1.5px rgba(255,255,255,.5); }
.icon-btn { border-radius: 50%; transition: background-color .2s, transform .25s var(--out); }
.icon-btn:active { transform: scale(.92); }
.search { background: var(--surface); box-shadow: var(--edge); border-radius: 23px; margin: 4px 16px 12px; }
.chip { background: var(--surface); box-shadow: var(--edge); color: var(--text-2); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.seg button { border: 0; background: var(--surface); box-shadow: var(--edge); border-radius: 14px; color: var(--text-2); transition: background-color .25s, color .25s; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.card { background: var(--surface); border: 0; box-shadow: var(--edge), 0 0 0 1px var(--line); border-radius: 22px; padding: 16px; }
.ck { border-color: var(--line-3); } .ck.on { background: var(--text); border-color: var(--text); }
.toast { background: rgba(242,242,244,.96); color: var(--bg); border-radius: 999px; padding: 12px 18px; box-shadow: 0 18px 40px -16px #000; animation: k2rise .45s var(--spring) both; }
.badge { background: var(--text); color: var(--bg); animation: k2pop .45s var(--spring) both .2s; }
.row .tm.new { color: var(--text); }

/* lists: soft rows that settle in one after another */
.row { min-height: 72px; margin: 0 8px; width: calc(100% - 16px); padding: 0 10px; border-radius: 20px; transition: background-color .2s, transform .2s var(--out); animation: k2rise .55s var(--spring) both; }
.row:nth-child(2) { animation-delay: 40ms; } .row:nth-child(3) { animation-delay: 80ms; } .row:nth-child(4) { animation-delay: 120ms; } .row:nth-child(5) { animation-delay: 160ms; } .row:nth-child(n+6) { animation-delay: 200ms; }
.row:hover { background: var(--surface); }
.row:active { transform: scale(.985); background: var(--surface); }
.row.active { background: var(--raised); }
.row .meta { border-bottom: 0; }
.row .top b { font-weight: 600; letter-spacing: -.01em; }
.row .sub b { color: var(--text-2) !important; }
.ciph, .bub.locked:not(.open) .tx.sealed, .bub.locked:not(.open) .quote, .bub.locked:not(.open) .doc-t b { color: #7E7F87; }
.av { background: var(--raised); box-shadow: var(--edge); color: var(--text); }
.av-grp { background: var(--raised); border: 0; color: var(--text-2); }
/* each chat's clock: a hairline ring that closes as its newest message nears its wipe */
.k2-life { position: relative; flex: none; display: grid; place-items: center; width: 58px; height: 58px; margin: 0 -3px; }
.k2-life > svg.k2-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.k2-ring .lf { animation: k2tick 1.1s var(--out) both .15s; }
.empty { color: var(--faint); }

/* floating glass tab bar (phones); slim rail stays on desktop */
.glassy { background: rgba(26,26,30,.66); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); box-shadow: var(--edge), 0 0 0 1px var(--line), 0 20px 40px -18px #000; }
@media (max-width: 719px) {
	.pane-list:has(> .tabs) { padding-bottom: calc(92px + var(--safe-b)); }
	.pane-list > .tabs { left: 50%; right: auto; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); display: flex; gap: 2px; padding: 5px; border: 0; border-radius: 32px;
		background: rgba(26,26,30,.66); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); box-shadow: var(--edge), 0 0 0 1px var(--line), 0 20px 40px -18px #000; }
	.tabs .tab { flex-direction: row; gap: 0; min-height: 48px; min-width: 52px; padding: 0 14px; border-radius: 24px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background-color .35s var(--out), color .25s, padding .45s var(--spring), gap .45s var(--spring); }
	.tabs .tab .ic { padding: 0; background: none !important; color: inherit !important; }
	.tabs .tab .lab { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .45s var(--spring), opacity .25s; }
	.tabs .tab[aria-current="page"] { background: var(--text); color: var(--bg); gap: 8px; padding: 0 18px 0 15px; }
	.tabs .tab[aria-current="page"] .lab { max-width: 80px; opacity: 1; }
	.tabs .tab .dot { top: -6px; right: -8px; background: var(--text); color: var(--bg); box-shadow: 0 0 0 2px var(--bg); }
	.tabs .tab[aria-current="page"] .dot { background: var(--bg); color: var(--text); box-shadow: 0 0 0 2px var(--text); }
	.fab { bottom: calc(92px + var(--safe-b)); }
}
@media (min-width: 720px) {
	.pane-list > .tabs { background: #08080A; }
	.tabs .tab .lab { display: block; }
	.tabs .tab[aria-current="page"] .ic { background: var(--text) !important; color: var(--bg) !important; }
}
.tab svg, .tabs .tab .ic svg { width: 22px; height: 22px; }
.fab { width: 56px; height: 56px; border-radius: 28px; background: var(--text); box-shadow: 0 14px 30px -12px #000; transition: transform .3s var(--spring); animation: k2pop .5s var(--spring) both .25s; }
.fab:active { transform: scale(.92); }
.fab svg { color: var(--bg); }

/* conversation */
.chathead { background: rgba(22,22,25,.72); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.chathead .who b { font-weight: 600; letter-spacing: -.01em; }
.msgs { gap: 5px; padding: 14px 12px 8px; }
.bub { background: var(--surface); box-shadow: var(--edge); border-radius: 22px; padding: 8px 14px 6px; animation: k2rise .45s var(--spring) both; transition: transform .25s var(--out), box-shadow .25s; }
.bub.cont { border-radius: 22px; }
.bub.me { background: var(--mine); color: #0B0B0D; border-radius: 22px; box-shadow: none; }
.bub.me .ts, .bub.me .ts svg { color: #5B5C63; }
.bub.me.seen .ts svg { color: #0B0B0D; }
.bub.me .quote { background: rgba(0,0,0,.07); color: #2A2B30; border-left-color: #0B0B0D; }
.bub.me .quote b { color: #0B0B0D; }
.bub .nm { color: var(--muted) !important; font-weight: 500; }
.bub .quote { border-radius: 12px; border-left-color: var(--text-2); }
.bub .quote b { color: var(--text-2); }
.bub.locked.open { box-shadow: var(--edge), 0 0 0 1px rgba(255,255,255,.4), 0 18px 40px -16px #000; transform: scale(1.015); }
.bub.me.locked.open { box-shadow: 0 0 0 2px rgba(255,255,255,.35), 0 18px 40px -16px #000; }
.bub.me.locked:not(.open) .tx.sealed { color: #6A6B72; }
.bub-actions button { border: 0; background: rgba(255,255,255,.06); color: var(--text); border-radius: 999px; }
.bub.me .bub-actions button, .bub.me .bub-btns a.bub-save { background: rgba(0,0,0,.07); color: #0B0B0D; }
.bub-btns a.bub-save { border: 0; background: rgba(255,255,255,.06); color: var(--text); border-radius: 999px; }
.rx { background: var(--raised); border: 0; box-shadow: var(--edge); }
.day span { background: rgba(22,22,25,.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-family: var(--mono); font-size: 11px; border-radius: 999px; padding: 5px 12px; color: var(--muted); }
.sys { background: var(--surface); border: 0; box-shadow: var(--edge); border-radius: 16px; color: var(--muted); animation: k2rise .45s var(--spring) both; }
.compose-box { background: rgba(26,26,30,.7); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); box-shadow: var(--edge), 0 0 0 1px var(--line); border-radius: 26px; }
.send { background: var(--text); transition: transform .3s var(--spring), opacity .2s; }
.send svg { color: var(--bg); }
.send:active { transform: scale(.9); }
.replybar { background: var(--surface); border-left-color: var(--text); border-radius: 14px; box-shadow: var(--edge); }
.replybar b { color: var(--text); }
.attach-menu { background: rgba(26,26,30,.8); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); border: 0; box-shadow: var(--edge), 0 0 0 1px var(--line); border-radius: 22px; }
.am-1, .am-2, .am-3 { background: var(--text); }
.media { border-radius: 16px; }
.doc { background: rgba(0,0,0,.25); border-radius: 14px; }
.bub.me .doc { background: rgba(0,0,0,.07); color: #0B0B0D; }
.vp-btn { background: var(--text); }
.vp-fill, .upl-fill { background: var(--text); }
.bub.me .vp-btn { background: #0B0B0D; color: #fff; } .bub.me .vp-fill { background: #0B0B0D; } .bub.me .vp-bar { background: rgba(0,0,0,.15); }
.hold-hint { color: var(--faint); }
/* while a chat is loading: soft bubbles that shimmer, "Decrypting channel" */
.k2-skel { display: flex; flex-direction: column; gap: 10px; padding: 18px 14px; flex: 1; }
.k2-skel i { display: block; height: 44px; border-radius: 22px; background: linear-gradient(90deg, var(--surface) 0 40%, var(--raised) 50%, var(--surface) 60% 100%); background-size: 300% 100%; animation: k2shim 1.1s linear infinite; }
.k2-skel i:nth-child(1) { width: 74%; } .k2-skel i:nth-child(2) { width: 58%; } .k2-skel i:nth-child(3) { width: 50%; align-self: flex-end; } .k2-skel i:nth-child(4) { width: 66%; }
.k2-skel p { align-self: center; font-family: var(--mono); font-size: 12px; color: var(--faint); margin: 8px 0 0; }
/* opening a chat on a phone: the conversation slides in over the list */
@media (max-width: 719px) { .shell[data-view="main"] .pane-main { animation: k2push .5s var(--out) both; } .shell[data-view="list"] .pane-list { animation: k2back .45s var(--out) both; } }

/* opening KNOX: the padlock surfaces, a hairline fills as it verifies */
.boot { gap: 18px; }
.boot .logo { color: var(--text); animation: k2unlock 1.2s var(--out) both; }
.boot p { font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.boot::after { content: ""; width: 140px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, var(--text) 0 50%, var(--raised) 50% 100%); background-size: 200% 100%; background-position: 100% 0; animation: k2load 1.4s var(--out) forwards .1s; }
.signin-main { animation: k2rise .6s var(--out) both; }
/* set-up checklist on the Groups screen */
.k2-setup { padding: 14px 14px 8px; animation: k2rise .5s var(--spring) both; }
.k2-setup-head { display: flex; align-items: center; gap: 10px; }
.k2-setup-head b { flex: 1; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.k2-count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.k2-setup-head .icon-btn { width: 36px; height: 36px; margin: -6px -6px -6px 0; }
.k2-bar { height: 3px; border-radius: 2px; background: var(--raised); margin: 10px 0 6px; overflow: hidden; }
.k2-bar span { display: block; height: 100%; background: var(--text); border-radius: 2px; transition: width .6s var(--out); }
.k2-step { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 10px 2px; border-radius: 12px; min-height: 48px; }
.k2-step:not([disabled]):active { background: var(--raised); }
.k2-step .ck { margin-top: 1px; }
.k2-step .t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.k2-step .t b { font-size: 14.5px; font-weight: 600; }
.k2-step .t small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.k2-step.done .t b { color: var(--faint); font-weight: 500; text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }
.k2-step[disabled] { cursor: default; opacity: 1; }
.k2-rest { border-top: 1px solid var(--line); margin-top: 2px; }
.k2-more { font-size: 13px; font-weight: 600; color: var(--text-2); min-height: 36px; padding: 0 2px; }
/* muted chats + admin phone status */
.k2-muted { display: inline-grid; color: var(--faint); } .k2-muted svg { width: 15px; height: 15px; }
.k2-dev { display: inline-flex; gap: 4px; margin-left: auto; flex: none; }
.k2-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--faint); padding: 2px 8px 2px 6px; border-radius: 999px; background: var(--raised); white-space: nowrap; }
.k2-pill i { width: 6px; height: 6px; border-radius: 50%; background: #6E6F77; }
.k2-pill.on { color: var(--text-2); } .k2-pill.on i { background: #43D38A; }

/* payments groups */
.pay-tag { font-size: 11px; font-weight: 600; color: var(--bg); background: var(--text-2); border-radius: 999px; padding: 1px 7px; flex: none; }
.pop-bar { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 8px; margin: 0; box-shadow: 0 1px 0 var(--line); overflow: visible; }
.pop-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 12px; }
.pop-chips::-webkit-scrollbar { display: none; }
.pop-chips .chip { flex: none; min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.pop-owed { padding: 0 16px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pop-send { padding: 6px 12px 0; flex: none; }
.sheet { background: var(--bg) !important; z-index: 60; animation: k2push .4s var(--out) both; }
.sheet > .page { padding-top: 16px; }
.pop-send .btn { min-height: 46px; }
.bub.has-pop { min-width: min(78vw, 300px); }
.pop { margin: 8px 0 2px; padding: 12px; border-radius: 16px; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 1px var(--line); }
.bub.me .pop { background: rgba(0,0,0,.06); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.pop-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pop-amt { font-family: var(--mono); font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.pop-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 999px; background: rgba(233,169,60,.16); color: #F3BE62; }
.pop-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pop-paid .pop-chip { background: rgba(79,201,138,.16); color: #5FD59A; }
.pop-processed .pop-chip { background: rgba(255,255,255,.1); color: var(--text-2); }
.bub.me .pop-waiting .pop-chip { color: #8A5A00; background: rgba(233,169,60,.22); }
.bub.me .pop-paid .pop-chip { color: #0E6B3B; background: rgba(79,201,138,.22); }
.bub.me .pop-processed .pop-chip { color: #333; background: rgba(0,0,0,.08); }
.pop-order { margin-top: 8px; font-size: 14px; color: var(--muted); } .pop-order b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.bub.me .pop-order { color: #55565C; } .bub.me .pop-order b { color: #0B0B0D; }
.pop-who { margin-top: 3px; font-size: 12.5px; color: var(--faint); }
.bub.me .pop-who { color: #6A6B72; }
.pop-acts { display: flex; gap: 6px; margin-top: 10px; }
.pop-btn { flex: 1; min-height: 40px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; }
.bub.me .pop-btn { background: #0B0B0D; color: #fff; }
.pop-undo { min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--text-2); font-size: 13px; font-weight: 600; }
.bub.me .pop-undo { background: rgba(0,0,0,.07); color: #333; }

/* step 2: Me, Admin, privacy guide, lock screens */
.lockscreen { background: transparent; }
.pin-title { font-family: var(--sans) !important; font-weight: 600 !important; letter-spacing: -.03em; }
.pin-key { background: var(--surface) !important; border: 0 !important; box-shadow: var(--edge) !important; transition: transform .2s var(--out), background-color .15s; }
.pin-key:active { transform: scale(.94); background: var(--hover) !important; }
.pin-dots span { border-color: var(--line-3) !important; transition: background-color .15s, transform .25s var(--spring); }
.pin-dots span.on { background: var(--text) !important; border-color: var(--text) !important; transform: scale(1.1); }
.bio-ring { background: var(--surface) !important; border: 0 !important; box-shadow: var(--edge), 0 0 0 1px var(--line) !important; color: var(--text) !important; }
.lock-foot button, .lock-foot a { color: var(--muted); }
.guide-ic { background: var(--raised); border: 0; box-shadow: var(--edge); border-radius: 14px; }
.guide-ic.warn { color: var(--rest); } .guide-ic.ok { color: #43D38A; }
.guide-item { border-top-color: var(--line); }
.guide-item b { color: var(--text); font-weight: 600; }
.guide-lead { color: var(--text-2); }
.guide-level.focus { background: var(--raised); box-shadow: none; }
.guide-chip { background: var(--raised) !important; }
.tone { border-radius: 14px; transition: background-color .2s; }
.tone.on { background: var(--raised); }
.tone-ic { background: var(--raised) !important; border: 0 !important; box-shadow: var(--edge); }
.sp { border: 0; background: var(--surface); box-shadow: var(--edge); }
.sp[aria-checked="true"] { background: var(--raised); box-shadow: var(--edge), 0 0 0 1px var(--line-3); }
.support-pill { border: 0; background: var(--surface); box-shadow: var(--edge); }
.page { padding-top: 4px; }
.profile .av { box-shadow: var(--edge), 0 0 0 1px var(--line); }
.card h3 { font-weight: 600; letter-spacing: -.01em; }
.card-danger { box-shadow: var(--edge), 0 0 0 1px rgba(238,90,79,.3); }

/* fixes from the walkthrough */
.reader { background: rgba(20,20,23,.96); border: 0; box-shadow: var(--edge), 0 0 0 1px var(--line-2), 0 24px 60px -20px #000; border-radius: 24px; }
.reader-meta, .reader-hint { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0; text-transform: none; }
.reader-meta b { color: var(--text); }
.reader-tx { color: var(--text); letter-spacing: -.01em; }
.av:not(.av-grp) { background-color: var(--raised) !important; color: var(--text) !important; }
/* online / busy / offline: a small dot on the picture instead of a glowing ring (so the clock ring stays readable) */
.av.st-online, .av.st-busy, .av.st-offline, .av-xs.st-online, .av-xs.st-busy, .av-xs.st-offline { box-shadow: var(--edge) !important; overflow: visible; }
.av.st-online::after, .av.st-busy::after, .av.st-offline::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 22%; height: 22%; min-width: 8px; min-height: 8px; border-radius: 50%; box-shadow: 0 0 0 2.5px var(--bg); z-index: 2; }
.av.st-online::after { background: #43D38A; } .av.st-busy::after { background: #F0A23A; } .av.st-offline::after { background: #8C8D95; }
.seg { flex-wrap: wrap; }
.seg:has(> :nth-child(4)) > button { flex: 1 1 calc(50% - 4px); }
.seg button { white-space: nowrap; }
.status-line, .status-line li { font-family: var(--sans) !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 12.5px !important; color: var(--muted); }
.signin h1 { font-size: 40px; }
.link-right { color: var(--text-2); }

@keyframes k2rise { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes k2pop { from { transform: scale(0); } }
@keyframes k2tick { from { stroke-dashoffset: var(--c); } }
@keyframes k2shim { from { background-position: 100% 0; } to { background-position: -50% 0; } }
@keyframes k2push { from { transform: translateX(28%); opacity: 0; } }
@keyframes k2back { from { transform: scale(.97); opacity: .4; } }
@keyframes k2unlock { 0% { opacity: 0; transform: scale(.86); filter: blur(8px); } 60% { opacity: 1; filter: none; } 100% { transform: none; } }
@keyframes k2load { to { background-position: 0 0; } }

/* ---------- polish pass (Nov 28) ---------- */
/* message menu: reactions in one even row that always fits the bubble */
.bub-actions { gap: 10px; margin-top: 10px; width: 100%; box-sizing: border-box; }
.react-pick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; width: 100%; max-width: 300px; padding: 4px; border: 0; border-radius: 999px;
	background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); }
.bub.me .react-pick { background: rgba(0,0,0,.06); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.react-pick button, .bub.me .bub-actions .react-pick button { width: 100%; aspect-ratio: 1; height: auto; max-height: 42px; background: transparent !important; font-size: 22px !important; line-height: 1; }
.react-pick button:active { background: rgba(255,255,255,.1) !important; }
.bub.me .react-pick button:active { background: rgba(0,0,0,.08) !important; }
/* actions: an even three-across grid instead of a ragged wrap */
.bub-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.bub-btns button, .bub-btns a.bub-save { justify-content: center; min-height: 38px; padding: 0 6px; font-size: 13.5px; white-space: nowrap; border-radius: 12px !important; display: inline-flex; align-items: center; }
.bub-actions .danger, .bub.me .bub-actions .danger { color: #D93A2E; }
.bub:not(.me) .bub-actions .danger { color: #F08A80; }
.bub-actions .hold-hint { text-align: center; margin: 0; }
.bub:has(> .bub-actions) { min-width: min(300px, 82vw); }
.bub:not(.me) .bub-btns button, .bub:not(.me) .bub-btns a.bub-save { background: rgba(255,255,255,.07); }

/* iPhone home-screen app: keep the level strip clear of the blurred status-bar edge */
@media (display-mode: standalone) { .ban { padding-top: calc(var(--safe-t) + 14px); } }

/* chat list: names get the room; company tags only where there is space */
.row .top b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .top .pay-tag, .row .top .tag-dm { flex: none; }
@media (max-width: 520px) { .row .top .tag-dm { display: none; } .row .top .pay-tag { font-size: 10px; padding: 1px 6px; } }
/* sideways-scrolling chip rows fade at the edge so it is clear there is more */
/* (no mask here: on iPhone a masked, sideways-scrolling row swallows taps, which stopped every filter working) */
.chips { padding-right: 28px; -webkit-overflow-scrolling: touch; }
.chips > .chip { flex: none; touch-action: manipulation; }

/* ---------- new features (Nov 28) ---------- */
/* pinned message bar under the chat header */
.pin-bar { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 16px; background: rgba(22,22,25,.72); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); box-shadow: 0 1px 0 var(--line); text-align: left; color: var(--text); flex: none; animation: k2rise .4s var(--spring) both; }
.pin-bar[hidden] { display: none; }
.pin-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--raised); flex: none; }
.pin-ic svg { width: 15px; height: 15px; }
.pin-t { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.3; }
.pin-t b { font-weight: 600; font-size: 12px; color: var(--muted); }
.pin-t .ciph { font-family: var(--mono); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-pin { display: inline-flex; color: var(--faint); flex: none; } .row-pin svg { width: 13px; height: 13px; }
/* "new messages" line */
.new-line { display: flex; align-items: center; gap: 10px; margin: 10px 4px; color: var(--text); font-size: 11.5px; font-weight: 600; transition: opacity 1.2s; }
.new-line::before, .new-line::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35)); }
.new-line::after { transform: scaleX(-1); }
.new-line span { padding: 4px 12px; border-radius: 999px; background: var(--text); color: var(--bg); }
.new-line.fade { opacity: .35; }
/* view once */
.once-btn[aria-pressed="true"] { color: var(--bg); background: var(--text); border-radius: 50%; }
.compose-box.once-on { box-shadow: var(--edge), 0 0 0 1.5px rgba(255,255,255,.55); }
.once-tag { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; margin: 0 0 4px; opacity: .75; }
.once-tag svg, .once-row svg { width: 14px; height: 14px; }
.bub.once-gone { opacity: .6; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); animation: none; }
.once-row { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-style: italic; }
.once-row .ts { margin-left: 10px; font-style: normal; }
/* announcements: read count */
.read-count { display: block; margin: 6px 0 0 auto; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 2px 0; }
.bub.me .read-count { color: #5B5C63; }
.read-count.all { color: var(--text); } .bub.me .read-count.all { color: #0B0B0D; }
.news-tag { background: rgba(255,255,255,.1) !important; color: var(--text) !important; }
.readonly { display: flex; align-items: center; justify-content: center; gap: 8px; }
.readonly svg { width: 17px; height: 17px; }
/* screenshot note */
.sys-shot { display: flex; align-items: center; justify-content: center; gap: 6px; color: #F08A80 !important; }
.sys-shot svg { width: 14px; height: 14px; }
/* visitors */
.guest-tag { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600; color: #E3A63A; background: rgba(227,166,58,.12); border-radius: 999px; padding: 2px 8px; }
.seg.seg-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 420px) { .seg.seg-4 { grid-template-columns: repeat(4, 1fr); } }
/* lost phone */
.panic-card { margin-top: 12px; }
/* tasks */
.tasks-page { padding-bottom: 40px; }
.task-sum { display: flex; align-items: center; gap: 16px; padding: 18px 4px 14px; }
.task-sum b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.task-sum small { color: var(--muted); font-size: 13px; }
.task-ring { --p: 0; width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center;
	background: radial-gradient(closest-side, var(--bg) 78%, transparent 80% 100%), conic-gradient(var(--text) calc(var(--p) * 1%), var(--raised) 0); transition: background .6s var(--out); }
.task-ring b { font-family: var(--mono); font-size: 13px !important; }
.task-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.task { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--edge); transition: opacity .3s; }
.task.done .task-main > b { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.4); color: var(--muted); }
.task-ck { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-3); color: transparent; transition: background-color .25s var(--out), transform .3s var(--spring); }
.task-ck svg { width: 16px; height: 16px; }
.task-ck[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: none; animation: k2pop .4s var(--spring); }
.task-ck:disabled { opacity: .35; }
.task-ck:active { transform: scale(.88); }
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.task-main > b { font-weight: 600; font-size: 15px; }
.task-main small { color: var(--faint); font-size: 12px; }
.task-who { display: flex; align-items: center; margin-top: 6px; }
.task-av { margin-right: -6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); display: inline-flex; }
.task-more { margin-left: 12px; font-size: 12px; color: var(--muted); }
.task-x { opacity: .55; }
.task-add { margin-top: 6px; }

/* ---------- notes ---------- */
.nc-amber { --nc: 227,166,58; } .nc-rose { --nc: 236,112,140; } .nc-mint { --nc: 95,191,138; } .nc-sky { --nc: 110,168,236; } .nc-lilac { --nc: 170,140,230; }
.notes-scroll { padding: 4px 12px 120px; }
.notes-grid { columns: 2; column-gap: 8px; }

.note-card { break-inside: avoid; display: flex; flex-direction: column; gap: 8px; margin: 0 0 8px; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--edge); color: var(--text); text-decoration: none; animation: m-rise .45s var(--spring) both; animation-delay: calc(var(--i, 0) * 30ms); transition: transform .25s var(--out); }
.note-card:active { transform: scale(.97); }
.note-card[class*="nc-"] { background: linear-gradient(180deg, rgba(var(--nc), .16), rgba(var(--nc), .07)); box-shadow: inset 0 0 0 1px rgba(var(--nc), .25); }
.note-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; word-break: break-word; }
.note-prev { font-size: 13px; line-height: 1.45; color: var(--muted); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.note-locked { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.note-locked svg { width: 15px; height: 15px; }
.note-prog { position: relative; height: 18px; display: flex; align-items: center; gap: 8px; }
.note-prog::before { content: ""; position: absolute; left: 0; right: 38px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); }
.note-prog i { position: relative; height: 4px; border-radius: 2px; background: var(--text); max-width: calc(100% - 38px); }
.note-prog span { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.note-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--faint); }
.nf-ic { display: inline-flex; align-items: center; gap: 3px; } .nf-ic svg { width: 12px; height: 12px; }
.nf-ic.due { color: #F08A80; }
.nf-time { margin-left: auto; }
.note-due { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 12px 14px; border-radius: 18px; background: var(--text); color: var(--bg); text-decoration: none; animation: m-rise .45s var(--spring) both; }
.note-due b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.note-due-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.08); animation: m-ring-bell 1.6s ease-in-out infinite; }
@keyframes m-ring-bell { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } }
/* editor */
.note-head[class*="nc-"], .note-page[class*="nc-"] { background-image: linear-gradient(180deg, rgba(var(--nc), .10), rgba(var(--nc), 0) 240px); }
.note-page { padding: 14px 18px calc(120px + var(--safe-b)); }
.note-title-in { width: 100%; background: transparent; border: 0; outline: 0; color: var(--text); font-family: var(--sans); font-size: 26px; font-weight: 600; letter-spacing: -.02em; padding: 4px 0 8px; }
.note-title-in::placeholder { color: var(--faint); }
.note-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.note-meta:empty { display: none; }
.note-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text-2); background: rgba(255,255,255,.07); }
.note-chip svg { width: 13px; height: 13px; }
.note-blocks { display: flex; flex-direction: column; gap: 2px; }
.nb-ta { width: 100%; resize: none; overflow: hidden; background: transparent; border: 0; outline: 0; color: var(--text); font: 16px/1.55 var(--sans); padding: 4px 0; min-height: 30px; }
.nb-c { display: flex; align-items: center; gap: 10px; min-height: 40px; animation: m-rise .3s var(--spring) both; }
.nb-ck { width: 24px; height: 24px; flex: none; border-radius: 8px; display: grid; place-items: center; color: transparent; box-shadow: inset 0 0 0 1.5px var(--line-3); transition: background-color .2s var(--out), transform .3s var(--spring); }
.nb-ck svg { width: 15px; height: 15px; }
.nb-ck[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: none; animation: k2pop .35s var(--spring); }
.nb-ck:active { transform: scale(.85); }
.nb-in { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: 16px/1.4 var(--sans); padding: 6px 0; }
.nb-c.done .nb-in { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.35); }
/* stock count lines */
.nb-s { display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 4px 4px 4px 14px; margin: 3px 0; border-radius: 16px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); animation: m-rise .3s var(--spring) both; }
.nb-s.zero .nb-qty { color: var(--faint); }
.nb-step { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 22px; line-height: 1; color: var(--text); background: rgba(255,255,255,.07); transition: transform .2s var(--spring), background-color .2s; }
.nb-step:active { transform: scale(.86); background: rgba(255,255,255,.16); }
.nb-qty { width: 64px; flex: none; text-align: center; background: transparent; border: 0; outline: 0; color: var(--text); font: 500 19px/1 var(--mono); padding: 8px 0; }
.nb-qty.bump { animation: k2pop .3s var(--spring); }
.nb-add-s { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 8px; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: rgba(255,255,255,.05); }
.nb-add-s svg { width: 15px; height: 15px; }
.stock-total { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 14px 14px 14px 16px; border-radius: 18px; background: var(--text); color: var(--bg); }
.stock-total[hidden] { display: none; }
.stock-total span { flex: 1; display: flex; flex-direction: column; font-size: 12px; color: #5B5C63; }
.stock-total span b { font-size: 14px; color: var(--bg); }
.stock-total strong { font: 500 26px/1 var(--mono); letter-spacing: -.02em; }
.stock-total .btn { min-height: 36px; padding: 0 12px; font-size: 12.5px; background: rgba(0,0,0,.08); color: var(--bg); box-shadow: none; }
.note-stock { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.06); font-size: 12px; color: var(--muted); }
.note-stock svg { width: 14px; height: 14px; }
.note-stock b { margin-left: auto; font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--text); }
/* ---------- company features (Notes on/off) ---------- */
.co-feature { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); }
.co-feature > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.co-feature b { font-size: 14.5px; font-weight: 600; color: var(--text); }
.co-feature small { font-size: 12px; line-height: 1.4; color: var(--muted); }
.co-feature-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.07); color: var(--text); }
.co-feature-ic svg { width: 19px; height: 19px; }
.tgl { position: relative; width: 52px; height: 32px; flex: none; border-radius: 999px; background: rgba(255,255,255,.12); transition: background-color .25s var(--out); }
.tgl i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .35s var(--spring); }
.tgl[aria-checked="true"] { background: #3DA35D; }
.tgl[aria-checked="true"] i { transform: translateX(20px); }
.tgl:disabled { opacity: .6; }
/* ---------- stock books ---------- */
.note-book { position: relative; }
.book-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--text); color: var(--bg); margin-bottom: 2px; }
.book-ic svg, .book-av svg { width: 18px; height: 18px; }
.book-av { display: grid; place-items: center; background: var(--text); color: var(--bg); }
.new-kind { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--edge), 0 0 0 1px var(--line); color: var(--text); transition: transform .25s var(--spring), background-color .2s; animation: m-rise .35s var(--spring) both; }
.new-kind:active { transform: scale(.98); background: var(--raised); }
.new-kind > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.new-kind b { font-size: 15px; font-weight: 600; } .new-kind small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.new-kind-ic { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.new-kind-ic svg { width: 20px; height: 20px; }
.book-views { margin: 4px 16px 6px; }
.book-body, .stock-grid, .prod-list, .stock-dates { color: var(--text); }
.reg.book-body { padding: 6px 16px calc(96px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; }
.reg.book-body > .chips { margin: 0 -16px; padding: 0 16px; }
.reg-list { display: flex; flex-direction: column; gap: 8px; }
.book-new { position: absolute; left: 16px; right: 16px; bottom: calc(12px + var(--safe-b)); z-index: 5; animation: m-rise .45s var(--spring) both .1s; }
.book-new .btn { gap: 8px; box-shadow: 0 18px 36px -16px #000; } .book-new svg { width: 18px; height: 18px; }
.entry-card { color: var(--text); border-radius: 18px; background: var(--surface); box-shadow: var(--edge), 0 0 0 1px var(--line); overflow: hidden; animation: m-rise .35s var(--spring) both; animation-delay: calc(var(--i, 0) * 30ms); border-left: 3px solid rgba(255,255,255,.18); }
.entry-card.t-take { border-left-color: var(--text); } .entry-card.t-in { border-left-color: #7FB48A; } .entry-card.t-built { border-left-color: #8FA8D8; } .entry-card.t-assemble { border-left-color: #D8B56F; }
.entry-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; width: 100%; text-align: left; padding: 13px 14px; color: var(--text); }
.entry-type { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.entry-type em { font-style: normal; font: 600 11px/1 var(--mono); padding: 4px 7px; border-radius: 7px; background: rgba(255,255,255,.08); color: var(--text-2); }
.entry-sub { grid-column: 1; font-size: 12px; color: var(--faint); }
.entry-sum { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.entry-sum b { font-size: 11px; font-weight: 600; color: #E5484D; }
.entry-lines { padding: 0 14px 14px; } .entry-lines[hidden] { display: none; }
.entry-card.open .entry-head { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.stock-table { display: flex; flex-direction: column; }
.st-row { display: flex; align-items: center; gap: 12px; min-height: 38px; border-bottom: 1px solid var(--line); }
.st-row:last-child { border-bottom: 0; }
.st-q { width: 64px; flex: none; text-align: right; font: 500 15px/1 var(--mono); font-variant-numeric: tabular-nums; }
.st-code { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; display: flex; flex-direction: column; }
.st-code small, .form-code small { font-size: 11.5px; font-weight: 400; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-row em { font-style: normal; font: 600 11px/1 var(--mono); color: var(--muted); }
.st-row.zero .st-q, .st-row.zero .st-code { color: #E5484D; }
.st-ok { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: #3DA35D; color: #fff; } .st-ok svg { width: 13px; height: 13px; }
.entry-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; } .entry-acts .btn { flex: 1; min-height: 40px; font-size: 13px; }
.stock-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.stock-dates span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--edge); font-size: 12px; color: var(--muted); min-width: 0; }
.stock-dates b { font: 600 13px/1 var(--mono); color: var(--text); }
.stock-grid { border-radius: 18px; background: var(--surface); box-shadow: var(--edge), 0 0 0 1px var(--line); padding: 4px 14px; }
.sg-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(var(--cols, 3), minmax(0, 1fr)); align-items: center; gap: 8px; min-height: 38px; border-bottom: 1px solid var(--line); font: 500 14px/1 var(--mono); font-variant-numeric: tabular-nums; }
.sg-row > :not(:first-child) { text-align: right; }
.sg-row:last-child { border-bottom: 0; }
.sg-head { min-height: 34px; font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.sg-code { font-family: var(--sans); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-row b { font-weight: 600; }
.sg-row.zero b, .sg-row.zero .sg-code { color: #E5484D; }
.stock-grid .section-lbl { margin: 14px 0 4px; }
.stock-since { display: flex; flex-wrap: wrap; gap: 6px; }
.stock-since span { padding: 7px 10px; border-radius: 10px; background: rgba(127,180,138,.14); color: #9FD0A9; font: 500 12.5px/1 var(--mono); }
.prod-list { display: flex; flex-direction: column; gap: 6px; }
.prod-row { display: flex; align-items: center; gap: 6px; }
.prod-row .input { min-height: 42px; }
.prod-code { width: 84px; flex: none; font-family: var(--mono); text-transform: uppercase; }
.prod-name { flex: 1; min-width: 0; }
.prod-row .chip { flex: none; min-height: 34px; } .prod-row .chip.on { background: var(--text); color: var(--bg); }
.prod-row .icon-btn { width: 34px; height: 34px; flex: none; }
.form-page { padding-bottom: calc(24px + var(--safe-b)); }
.form-tools { display: flex; gap: 8px; } .form-tools .input { flex: 1; min-width: 0; } .form-tools .btn { flex: none; min-height: 44px; font-size: 13px; padding: 0 12px; }
.form-lines { display: flex; flex-direction: column; }
.form-row .form-code { display: flex; flex-direction: column; justify-content: center; font: 600 14.5px/1.2 var(--sans); padding: 0; }
.form-row.set { box-shadow: inset 0 0 0 1px var(--line-3); background: rgba(255,255,255,.08); }
.form-row.zero .form-code, .form-row.zero .nb-qty { color: #E5484D; }
.form-row .nb-qty::placeholder { color: var(--faint); opacity: .6; }
.form-row .nb-ck { width: 36px; height: 36px; border-radius: 11px; }
.form-count { font-size: 12px; color: var(--muted); }
.note-files { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.note-files[hidden] { display: none; }
.nfile { position: relative; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--edge); color: var(--text); text-decoration: none; }
.nfile-img { aspect-ratio: 1; } .nfile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nfile-doc { grid-column: span 3; display: flex; align-items: center; gap: 10px; padding: 12px; }
.nfile-doc svg { width: 22px; height: 22px; flex: none; }
.nfile-doc span { display: flex; flex-direction: column; min-width: 0; } .nfile-doc b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .nfile-doc small { font-size: 11.5px; color: var(--faint); }
.nfile-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.nfile-doc .nfile-x { position: static; margin-left: auto; background: rgba(255,255,255,.08); }
.nfile-x svg { width: 14px; height: 14px; }
.note-tools { position: absolute; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 6; display: flex; align-items: center; gap: 2px; padding: 5px; overflow-x: auto; scrollbar-width: none; border-radius: 22px; background: rgba(26,26,30,.78); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); box-shadow: var(--edge), 0 0 0 1px var(--line), 0 20px 40px -18px #000; animation: m-rise .5s var(--spring) both .1s; }
.note-tools::-webkit-scrollbar { display: none; }
.nt { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 54px; height: 50px; border-radius: 16px; color: var(--muted); font-size: 10px; font-weight: 600; transition: background-color .2s, color .2s, transform .25s var(--spring); }
.nt svg { width: 20px; height: 20px; }
.nt:active { transform: scale(.9); }
.nt.on { color: var(--text); background: rgba(255,255,255,.08); }
.nt-colors { display: flex; align-items: center; gap: 6px; padding: 0 10px; flex: none; }
.nt-c { width: 22px; height: 22px; border-radius: 50%; background: rgba(var(--nc, 255,255,255), .55); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.2); transition: transform .25s var(--spring); }
.nt-c.nc-none { background: var(--raised); }
.nt-c.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--text); transform: scale(1.1); }
.note-lock { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; }
.note-lock-ic { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--surface); box-shadow: var(--edge); animation: k2pop .5s var(--spring) both; }
.note-lock-ic svg { width: 26px; height: 26px; }
/* the Notes PIN screen sits above the bottom menu, so every key (0 and delete too) stays reachable */
.notes-gate { min-height: 0; overflow-y: auto; justify-content: safe center; gap: 6px; padding: 4px 20px calc(110px + var(--safe-b)); }
.notes-gate .note-lock-ic { width: 46px; height: 46px; flex: none; } .notes-gate .note-lock-ic svg { width: 21px; height: 21px; }
.notes-gate .pin-keys { gap: 10px 18px; grid-template-columns: repeat(3, clamp(58px, 9.5vh, 74px)); }
.notes-gate .pin-title { font-size: 24px; margin: 0; }
.notes-gate .pin-msg { margin: 0; min-height: 20px; }
.notes-gate .pin-key { width: clamp(58px, 9.5vh, 74px); height: clamp(58px, 9.5vh, 74px); font-size: clamp(24px, 3.6vh, 30px); }

/* ---------- payment register ---------- */
.pay-views { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 8px 12px 4px; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--edge); flex: none; }
.pay-views button { min-height: 36px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background-color .3s var(--out), color .2s; }
.pay-views button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.reg { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 0 calc(24px + var(--safe-b)); }
.reg[hidden] { display: none; }
.reg-totals { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 6px; padding: 6px 12px 10px; }
.reg-tot { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--edge); text-align: left; min-width: 0; }
.reg-tot small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.reg-tot b { font-family: var(--mono); font-size: 13.5px; font-weight: 500; white-space: nowrap; letter-spacing: -.02em; }
.reg-tot.w { background: var(--text); color: var(--bg); box-shadow: none; }
.reg-tot.w small { color: #5B5C63; }
.reg-tot em { font-style: normal; font-size: 10.5px; font-weight: 600; color: #B3261E; }
.reg-search { margin: 0 12px 8px; }
.reg-chips { padding-bottom: 10px; }
.chip-sel { margin-left: auto; }
.reg-list { display: flex; flex-direction: column; gap: 6px; padding: 0 12px; }
.reg-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--edge); cursor: pointer; transition: transform .35s var(--spring), background-color .2s; animation: m-rise .45s var(--spring) both; animation-delay: calc(var(--i, 0) * 25ms); touch-action: pan-y; overflow: hidden; }
.reg-row:active { background: var(--raised); }
.reg-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--line-3); }
.reg-row.st-waiting .reg-dot { background: #E3A63A; box-shadow: 0 0 0 4px rgba(227,166,58,.14); }
.reg-row.st-paid .reg-dot { background: #F2F2F4; }
.reg-row.st-processed .reg-dot { background: #5FBF8A; }
.reg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.reg-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.reg-order { font-family: var(--mono); font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reg-amt { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.reg-sub { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--faint); }
.reg-st { font-weight: 600; color: var(--muted); white-space: nowrap; }
.reg-row.st-processed .reg-st { color: #5FBF8A; }
.reg-row.late1 { box-shadow: var(--edge), inset 3px 0 0 #E3A63A; } .reg-row.late1 .reg-st { color: #E3A63A; }
.reg-row.late2 { box-shadow: var(--edge), inset 3px 0 0 #E2584C; } .reg-row.late2 .reg-st { color: #F08A80; }
.reg-swipe { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 700; color: #5FBF8A; opacity: 0; transition: opacity .2s; pointer-events: none; }
.reg-row[style*="translateX"] .reg-swipe { opacity: .5; }
.reg-row.swipe-ready { background: rgba(95,191,138,.16); }
.reg-row.swipe-ready .reg-swipe { opacity: 1; }
.reg-row .ck { flex: none; }
.reg-bulk { position: sticky; bottom: calc(10px + var(--safe-b)); display: flex; align-items: center; gap: 8px; margin: 12px; padding: 8px 8px 8px 16px; border-radius: 999px; background: rgba(26,26,30,.85); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); box-shadow: var(--edge), 0 0 0 1px var(--line), 0 18px 40px -16px #000; animation: m-rise .4s var(--spring) both; }
.reg-bulk[hidden] { display: none; }
.reg-bulk span { flex: 1; font-size: 13px; font-weight: 600; }
.reg-bulk .btn { min-height: 38px; padding: 0 14px; font-size: 13px; }
.pop-big { margin: 4px 0; }
.pop-steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.pop-steps li { position: relative; padding: 0 0 16px 26px; display: flex; flex-direction: column; gap: 2px; color: var(--faint); }
.pop-steps li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-3); }
.pop-steps li::after { content: ""; position: absolute; left: 8.5px; top: 18px; bottom: 2px; width: 1px; background: var(--line-2); }
.pop-steps li:last-child::after { display: none; }
.pop-steps li.done { color: var(--text); }
.pop-steps li.done::before { background: var(--text); box-shadow: none; }
.pop-steps b { font-weight: 600; font-size: 14px; }
.pop-steps small { font-size: 12px; color: var(--muted); }
.order-hits { margin-bottom: 6px; }
.order-ic svg { width: 20px; height: 20px; }

/* wipe countdown: a live timer in the level strip, and time left on every bubble */
.k2-wipe { font-family: var(--mono); font-size: 10.5px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--text); background: rgba(255,255,255,.07); border-radius: 999px; padding: 2px 8px; }
.k2-wipe.k2-soon { color: #F08A80; background: rgba(226,88,76,.14); }
.k2-ttl { font-family: var(--mono); font-size: 10px; font-variant-numeric: tabular-nums; opacity: .7; margin-right: 6px; }
.k2-ttl:empty { display: none; }
.k2-ttl::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 3px; vertical-align: -1px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 1.5h6M3 10.5h6M3.5 1.5c0 2.5 5 2.5 5 4.5S3.5 8 3.5 10.5M8.5 1.5c0 2.5-5 2.5-5 4.5s5 2 5 4.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 1.5h6M3 10.5h6M3.5 1.5c0 2.5 5 2.5 5 4.5S3.5 8 3.5 10.5M8.5 1.5c0 2.5-5 2.5-5 4.5s5 2 5 4.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.bub.k2-soon .k2-ttl { opacity: 1; color: #F08A80; }
.bub.me.k2-soon .k2-ttl { color: #B3261E; }
.bub.k2-last { animation: k2last 1s ease-in-out infinite !important; }
@keyframes k2last { 50% { box-shadow: 0 0 0 1px rgba(226,88,76,.55); } }
.bub.k2-gone { animation: k2gone .85s var(--out) forwards !important; pointer-events: none; }
@keyframes k2gone { 0% { opacity: 1; filter: none; } 40% { filter: blur(2px); } 100% { opacity: 0; filter: blur(8px); transform: scale(.92) translateY(-6px); } }

/* ---------- notes: select and delete ---------- */
.sel-start { min-height: 36px; padding: 0 14px; font-size: 13.5px; font-weight: 600; border-radius: 18px; border-color: var(--line-2); }
.sel-bar { display: flex; align-items: center; gap: 6px; padding: 10px 8px 6px; flex: none; animation: m-rise .3s var(--spring) both; }
.sel-bar[hidden] { display: none; }
.sel-bar b { flex: 1; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.sel-del { background: rgba(226,88,76,.14); color: #F08A80; }
.sel-del:hover { background: rgba(226,88,76,.24); }
.sel-del[disabled] { opacity: .35; }
.note-card { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform .3s var(--spring), box-shadow .2s; }
.sel-tick { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-3); background: rgba(0,0,0,.35); color: transparent; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .3s var(--spring), background-color .2s; }
.sel-tick svg { width: 13px; height: 13px; }
.selecting .sel-tick { opacity: 1; transform: scale(1); }
.selecting .note-card { transform: scale(.97); }
.selecting .note-card.is-sel { transform: scale(1); box-shadow: 0 0 0 2px var(--text), var(--edge); }
.note-card.is-sel .sel-tick { background: var(--text); color: var(--bg); box-shadow: none; }
.selecting .fab { transform: scale(0); pointer-events: none; }
/* ---------- Notes, Apple style: grouped list, swipe actions, Recently Deleted ---------- */
.topbar-acts { display: flex; align-items: center; gap: 2px; }
.view-btn svg { width: 20px; height: 20px; }
.nlist-lbl { margin: 18px 4px 7px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.nlist-lbl:first-child { margin-top: 6px; }
.nlist { border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--edge), 0 0 0 1px var(--line); }
.nrow { position: relative; overflow: hidden; animation: m-rise .35s var(--spring) both; animation-delay: calc(var(--i, 0) * 22ms); }
.nrow + .nrow .nrow-face::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
.nrow-face { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 66px; padding: 11px 16px; text-align: left; text-decoration: none; color: var(--text); background: var(--surface); touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform .32s var(--spring), background-color .15s; }
.nrow.dragging .nrow-face { transition: none; }
.nrow-face:active { background: var(--raised); }
.nrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nrow-main b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nrow-sub { display: flex; gap: 8px; min-width: 0; font-size: 14px; color: var(--muted); }
.nrow-sub em { flex: none; font-style: normal; color: var(--text-2); }
.nrow-sub span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nrow-ics { display: flex; gap: 6px; flex: none; color: var(--faint); }
.nrow-ics svg { width: 14px; height: 14px; }
.nrow-book { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--text); color: var(--bg); }
.nrow-book svg { width: 17px; height: 17px; }
.nrow-act { position: absolute; top: 0; bottom: 0; z-index: 1; width: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 600; color: #fff; opacity: 0; transition: opacity .15s; }
.nrow-act svg { width: 20px; height: 20px; }
.nrow-act.act-l { left: 0; } .nrow-act.act-r { right: 0; }
.nrow.open-l .act-l, .nrow.open-r .act-r { opacity: 1; }
.nrow-act.del { background: #E5484D; } .nrow-act.pin { background: #D99A2B; } .nrow-act.rec { background: #3B82F6; }
.nrow.far .act-r { width: 100%; }
.nrow.going { animation: nrow-out .25s var(--out) forwards; }
@keyframes nrow-out { to { opacity: 0; transform: translateX(-30%); } }
.nrow-face .sel-tick { position: static; flex: none; order: -1; width: 0; margin-right: -12px; opacity: 0; overflow: hidden; transition: width .25s var(--spring), margin .25s var(--spring), opacity .2s; }
.selecting .nrow-face .sel-tick { width: 24px; margin-right: 0; opacity: 1; }
.nrow-face.is-sel { background: var(--raised); }
.nrow-face.is-sel .sel-tick { background: var(--text); color: var(--bg); box-shadow: none; }
.nfolder { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; margin-top: 22px; padding: 0 14px 0 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--edge), 0 0 0 1px var(--line); color: var(--text); text-align: left; }
.nfolder:active { background: var(--raised); }
.nfolder-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(229,72,77,.16); color: #F08A80; }
.nfolder-ic svg { width: 16px; height: 16px; }
.nfolder-t { flex: 1; font-size: 15.5px; font-weight: 600; }
.nfolder em { font-style: normal; font-size: 14px; color: var(--muted); }
.nfolder > svg { width: 16px; height: 16px; color: var(--faint); }
.nlist-count { padding: 18px 0 calc(120px + var(--safe-b)); text-align: center; font-size: 12.5px; color: var(--faint); }
.trash-hint { margin: 0 20px 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.trash-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 2px calc(120px + var(--safe-b)); font-size: 13px; color: var(--faint); }
.trash-foot .btn { min-height: 40px; padding: 0 16px; font-size: 13.5px; }
.toast-act { display: flex; align-items: center; gap: 14px; pointer-events: auto; white-space: nowrap; }
.toast-act button { font-weight: 700; color: #2F6FEB; padding: 4px 2px; }
.choice-box { gap: 10px; } .choice-acts { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 8px; } .choice-acts .btn { width: 100%; min-height: 46px; }
.note-back { display: inline-flex !important; flex-direction: row !important; align-items: center; width: auto !important; padding: 0 10px 0 4px; gap: 2px; font-size: 16px; font-weight: 500; color: var(--text); text-decoration: none; }
.note-back span { white-space: nowrap; }
.note-done { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--bg); background: var(--text); transition: transform .2s var(--spring); }
.note-done:active { transform: scale(.94); }
.note-head .who { text-align: center; }
.note-date { margin: 2px 0 6px; text-align: center; font-size: 12.5px; color: var(--faint); }
/* confirm sheet */
.confirm-ov { position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center; padding: 16px 12px calc(16px + var(--safe-b)); background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: k2fade .2s both; }
.confirm-ov.out { opacity: 0; transition: opacity .18s; }
@media (min-width: 720px) { .confirm-ov { place-items: center; } }
.confirm-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 22px 20px 16px; border-radius: 26px; background: var(--raised); box-shadow: var(--edge), 0 0 0 1px var(--line-2), 0 30px 60px -20px #000; color: var(--text); animation: m-rise .35s var(--spring) both; }
.confirm-box > b { font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin-top: 6px; }
.confirm-box p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.confirm-box .confirm-warn { font-size: 12.5px; color: #F08A80; margin-top: 4px; }
.confirm-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(226,88,76,.14); color: #F08A80; }
.confirm-ic svg { width: 22px; height: 22px; }
.confirm-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 14px; }
.confirm-acts .btn { min-height: 50px; border-radius: 16px; font-size: 15px; }
.confirm-acts .btn-danger { background: #E2584C; border-color: #E2584C; color: #fff; }
@keyframes k2fade { from { opacity: 0; } }
.btn-del { color: #F08A80; border-color: rgba(226,88,76,.4); }
.btn-del svg { width: 16px; height: 16px; }

/* ---------- stock book: by date ---------- */
.day-nav { display: flex; align-items: center; gap: 4px; }
.day-nav > .icon-btn { font-size: 26px; line-height: 1; color: var(--text); }
.day-nav > .icon-btn[disabled] { opacity: .25; }
.day-title { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-left: 4px; }
.day-title b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.day-title small { font-size: 12.5px; color: var(--muted); }
.day-cal { position: relative; overflow: hidden; cursor: pointer; }
.day-cal svg { width: 20px; height: 20px; }
.day-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.day-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.day-nav .chip { min-height: 32px; padding: 0 12px; font-size: 13px; }
.day-strip { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 0 -16px 6px; padding: 4px 16px 6px; scroll-behavior: smooth; }
.day-strip::-webkit-scrollbar { display: none; }
.day-cell { flex: none; width: 48px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 16px; background: var(--surface); box-shadow: var(--edge); color: var(--muted); scroll-snap-align: center; transition: background-color .25s var(--out), color .2s, transform .3s var(--spring); }
.day-cell:active { transform: scale(.92); }
.day-cell small { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.day-cell b { font: 600 17px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--text-2); }
.day-cell.has b { color: var(--text); }
.day-cell.today small { color: var(--text); }
.day-cell.on { background: var(--text); color: var(--bg); box-shadow: 0 10px 22px -12px #000; }
.day-cell.on b, .day-cell.on small { color: var(--bg); }
.day-dots { display: flex; gap: 3px; height: 5px; }
.day-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-2); }
.day-dots .t-take { background: var(--text); } .day-dots .t-in { background: #7FB48A; } .day-dots .t-built { background: #8FA8D8; } .day-dots .t-assemble { background: #D8B56F; } .day-dots .t-aside { background: #B08FD8; }
.day-cell.on .day-dots i { box-shadow: 0 0 0 1px var(--bg); }
.day-cell.on .day-dots .t-take { background: var(--bg); }
.entry-card.t-aside { border-left-color: #B08FD8; }
.stock-dates span.fresh { box-shadow: var(--edge), inset 0 0 0 1px rgba(127,180,138,.45); }
.sg-code { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.sg-code small { font: 400 11px/1.2 var(--sans); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-ch { font-size: 12.5px; color: var(--faint); }
.sg-ch.up { color: #7FD196; } .sg-ch.down { color: #F08A80; }
b.sg-ch.down, b.sg-ch.up { font-size: 14px; }
.sg-row.zero b.sg-ch { color: var(--faint); }
/* compare */
.cmp-pick { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; }
.cmp-pick .field span { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--steel); margin-bottom: 6px; }
.cmp-pick .input { min-height: 46px; border-radius: 14px; padding: 0 10px; font-size: 15px; color-scheme: dark; }
.cmp-arrow { padding-bottom: 12px; color: var(--faint); font-size: 18px; }
.cmp-note { margin: 0; }
.reg.book-body > .chips + .cmp-note, .cmp-pick + .chips { margin-top: 2px; }
.cmp-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cmp-sum span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--edge); font-size: 12px; color: var(--muted); }
.cmp-sum b { font: 600 22px/1 var(--mono); color: var(--text); }
.cmp-sum .down b { color: #F08A80; } .cmp-sum .up b { color: #7FD196; }
.cmp-grid .sg-row { min-height: 44px; }

.seg.book-views { display: flex !important; overflow-x: auto; scrollbar-width: none; }
.seg.book-views::-webkit-scrollbar { display: none; }
.seg.book-views button { flex: 1 0 auto; white-space: nowrap; padding: 0 14px; }

/* products / boxes editor */
.prod-row { flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.prod-row:last-of-type { border-bottom: 0; }
.prod-lowf { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.prod-low { width: 84px !important; min-height: 38px !important; font-family: var(--mono); text-align: right; padding: 0 10px !important; }
@media (max-width: 519px) { .prod-row .prod-name { flex-basis: calc(100% - 96px); } .prod-lowf { margin-left: 0; flex: 1; } }
.std-fill { min-height: 44px; font-size: 14px; border-style: dashed; }
/* stock status, like the team's spreadsheet */
.part-seg { grid-template-columns: 1fr 1fr; }
.st-sum { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.st-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--surface); box-shadow: var(--edge); }
.st-pill b { font: 600 14px/1 var(--mono); }
.st-pill.st-out b { color: #F08A80; } .st-pill.st-low b { color: #F2B45A; } .st-pill.st-ok b { color: #7FD196; }
.st-pill.on { box-shadow: inset 0 0 0 1.5px var(--text); }
/* the filter chips never shrink or overlap; the active one is filled white so it is obvious */
.st-sum > * { flex: none; white-space: nowrap; }
/* undo the small green tick style (.st-ok) that was squeezing the OK / In storage chip to 24px */
.st-pill.st-ok { display: inline-flex; align-items: center; justify-content: center; width: auto; height: auto; min-height: 34px; border-radius: 999px; background: var(--surface); color: var(--text-2); }
.st-pill.st-ok.on { background: var(--text); color: var(--bg); }
.st-pill { touch-action: manipulation; cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
.st-pill.on { background: var(--text); color: var(--bg); box-shadow: none; }
.st-pill.on b { color: var(--bg) !important; }
.st-all { min-height: 34px; padding: 0 6px; margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); touch-action: manipulation; }
.sg-tot { justify-self: end; padding: 4px 7px; border-radius: 8px; }
.sg-tot.st-out { background: rgba(226,88,76,.22); color: #FF9A90 !important; }
.sg-tot.st-low { background: rgba(242,180,90,.18); color: #F7C77E; }
.sg-tot.st-ok { background: rgba(95,191,138,.16); color: #8FE0AA; }
/* paste from WhatsApp */
.wa-kind { box-shadow: var(--edge), inset 0 0 0 1px rgba(95,191,138,.45); }
.wa-in { min-height: 180px !important; padding: 12px 14px !important; font: 13.5px/1.45 var(--mono) !important; resize: vertical; }
.wa-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; }
.wa-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wa-row b { font-size: 14.5px; font-weight: 600; }
.wa-row small { font-size: 12px; color: var(--muted); }
.wa-row .wa-warn { color: #F2B45A; }
.wa-row .nb-ck { flex: none; width: 30px; height: 30px; border-radius: 9px; }
.form-sec { padding-left: 0; }

/* moves and deliveries */
.route-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.route { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; border-radius: 16px; background: var(--surface); box-shadow: var(--edge), 0 0 0 1px var(--line); color: var(--muted); font: 600 17px/1 var(--mono); transition: background-color .2s, color .2s, transform .25s var(--spring); }
.route:active { transform: scale(.96); }
.route[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.route-arrow { font-family: var(--sans); opacity: .6; }
.entry-card.t-move { border-left-color: #E07A6A; }
.new-kind-ic.t-in { background: rgba(127,180,138,.16); color: #9FD0A9; }
.new-kind-ic.t-move { background: rgba(224,122,106,.16); color: #F0A090; }
.day-dots .t-move { background: #E07A6A; }
/* numbers that include deliveries or moves since the last count */
.sg-mv { position: relative; }
.sg-mv::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 4px; border-radius: 50%; background: #E3A63A; vertical-align: 2px; }
.sg-tap { cursor: pointer; }
.sg-tap:hover { background: rgba(255,255,255,.03); }
/* counted vs should have had */
.diff-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 18px; background: rgba(226,88,76,.08); box-shadow: inset 0 0 0 1px rgba(226,88,76,.3); color: var(--text); }
.diff-card.ok { background: rgba(95,191,138,.08); box-shadow: inset 0 0 0 1px rgba(95,191,138,.3); }
.diff-card > b { font-size: 15px; font-weight: 600; }
.diff-card > small { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.diff-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 8px; align-items: center; min-height: 32px; border-top: 1px solid rgba(255,255,255,.06); font-size: 13px; }
.diff-row span:first-child { font: 600 13px/1 var(--mono); }
.diff-row span:nth-child(2) { color: var(--muted); font-size: 12px; }
.diff-row b { font: 600 14px/1 var(--mono); } .diff-row b.down { color: #F08A80; } .diff-row b.up { color: #7FD196; }
/* product history */
.h-list { display: flex; flex-direction: column; gap: 6px; }
.h-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--edge); border-left: 3px solid var(--line-3); }
.h-row.h-in { border-left-color: #5FBF8A; background: rgba(95,191,138,.07); } .h-row.h-in .h-q { color: #8FE0AA; }
.h-row.h-move { border-left-color: #E07A6A; background: rgba(224,122,106,.07); } .h-row.h-move .h-q { color: #F0A090; }
.h-row.h-take { border-left-color: var(--text); }
.h-q { width: 76px; flex: none; text-align: right; font: 600 16px/1 var(--mono); font-variant-numeric: tabular-nums; }
.h-what { display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 600; min-width: 0; }
.h-what small { font-size: 12px; font-weight: 400; color: var(--faint); }
/* overview table, like the storage sheet */
.ov-wrap { overflow-x: auto; border-radius: 18px; background: var(--surface); box-shadow: var(--edge), 0 0 0 1px var(--line); -webkit-overflow-scrolling: touch; }
.ov-table { width: 100%; border-collapse: separate; border-spacing: 0; font: 500 13.5px/1.2 var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.ov-table th { position: sticky; top: 0; padding: 12px 10px; text-align: right; font: 600 10.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); white-space: nowrap; background: var(--surface); border-bottom: 1px solid var(--line); }
.ov-table td { padding: 9px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.ov-table tr:last-child td { border-bottom: 0; }
.ov-table .ov-p { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--surface); min-width: 118px; max-width: 160px; box-shadow: 1px 0 0 var(--line); }
.ov-table td.ov-p { font-family: var(--sans); }
.ov-table td.ov-p b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-table td.ov-p small { font: 500 10.5px/1.2 var(--mono); color: var(--faint); }
.ov-table th.ov-store { color: var(--text-2); }
.ov-row { cursor: pointer; }
.ov-row:hover td { background: rgba(255,255,255,.025); }
.ov-table td.st-out { background: rgba(226,88,76,.2); color: #FF9A90; font-weight: 600; }
.ov-table td.st-low { background: rgba(242,180,90,.15); color: #F7C77E; font-weight: 600; }
.ov-table td.st-ok { background: rgba(95,191,138,.13); color: #8FE0AA; font-weight: 600; }
.ov-table td.ov-tot { font-weight: 700; }
.ov-table td.ov-cost { color: var(--muted); }
.ov-value { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 18px; background: var(--text); color: var(--bg); }
.ov-value b { font: 600 24px/1 var(--mono); letter-spacing: -.02em; }
.ov-value small { font-size: 12px; opacity: .65; }

/* ---------- tablet and desktop ---------- */
@media (min-width: 720px) and (max-width: 1099px) {
	.shell { padding-left: 68px; }
	.pane-list > .tabs { width: 68px; padding: 14px 4px; }
	.pane-list > .tabs .tab { min-width: 0; padding: 0 4px; font-size: 10.5px; }
	.notes-grid { column-gap: 6px; }
}
@media (min-width: 720px) {
	/* the open chat, note or stock book sits in a comfortable reading column on big screens */
	.pane-main .note-page, .pane-main .reg.book-body, .pane-main .book-views { width: 100%; max-width: 880px; margin-left: auto; margin-right: auto; }
	.pane-main .book-views { width: calc(100% - 32px); }
	.pane-main .book-new { left: 16px; right: 16px; max-width: 560px; margin: 0 auto; }
	.pane-main .note-tools { left: 10px; right: 10px; max-width: 720px; margin: 0 auto; }
	.day-cell { width: 52px; }
	.note-card:hover { box-shadow: var(--edge), 0 0 0 1px var(--line-3); }
	.day-cell:hover:not(.on) { background: var(--raised); }
}
@media (min-width: 1100px) {
	.pane-main .reg.book-body { padding-left: 24px; padding-right: 24px; }
	.sg-row { min-height: 42px; font-size: 15px; }
}

/* =========================================================
   UX pass (Nov 2026): same look, clearer screens on phone, tablet and desktop
   ========================================================= */
/* calm strip on screens that are not a chat */
.ban.ban-plain { color: var(--muted); gap: 6px; }
.ban.ban-plain svg { width: 12px; height: 12px; opacity: .8; }
/* groups without a photo show their initials */
.av.av-ini { background: linear-gradient(160deg, #2A2A30, #161619); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.av.av-ini .av-t { font-weight: 600; font-size: .9em; letter-spacing: .02em; color: var(--text); line-height: 1; }
.av.av-ini.has-photo .av-t { display: none; }
.av-sm.av-ini .av-t { font-size: 12px; }
.row .av.av-ini .av-t { font-size: 16px; }
/* company on its own small line in the chat list */
.row-co { font-size: 11.5px; font-weight: 500; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -2px; }
/* the name always wins: tags shrink (and hide) before a group's name is cut */
.row .top b { flex: 0 0 auto; max-width: calc(100% - 70px); }
.row .top .pay-tag { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { padding-top: 9px; padding-bottom: 9px; }
/* the level strip in a chat never pushes its buttons off the edge */
.ban { flex-wrap: nowrap; overflow: hidden; padding-left: 12px; padding-right: 12px; }
.ban > * { flex-shrink: 0; }
@media (min-width: 720px) and (max-width: 1099px) { .pane-list { flex-basis: clamp(330px, 40vw, 400px) !important; } }
.row .top .tag-dm { display: none; }
/* chat header: the name stays on one line, however long */
.chathead .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chathead .icon-btn { flex: none; }
/* chat rules: one quiet line that opens on tap */
.sys.sys-pill { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: min(100%, 420px); padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; text-align: center; }
.sys.sys-pill[aria-expanded="true"] { border-radius: 18px; padding: 12px 16px; }
.sys-line { display: inline-flex; align-items: center; gap: 7px; }
.sys-line svg { width: 13px; height: 13px; flex: none; opacity: .75; }
.sys-more { line-height: 1.5; color: var(--text-2); }
.sys-more[hidden] { display: none; }
/* Me: the camera sits on the left so it never covers the status light */
.pic-edit .pic-cam, .av-edit .av-cam { right: auto !important; left: 0 !important; }
/* touch targets: every icon button at least 44px */
.icon-btn { min-width: 44px; min-height: 44px; }
/* a visible keyboard focus everywhere (desktop) */
.row:focus-visible, .nrow-face:focus-visible, .chip:focus-visible, .tab:focus-visible, .btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: hover) {
	.row:hover { background: rgba(255,255,255,.035); }
	.row.active, .row.active:hover { background: rgba(255,255,255,.07); }
	.nrow-face:hover { background: var(--raised); }
}
/* round 2: composer, attach menu, admin sections */
.compose-box .once-btn { display: none; }
.compose-box.once-on .once-btn { display: grid; color: var(--bg); background: var(--text); border-radius: 50%; }
.compose-box.typing .cb-cam { display: none; }
.attach-menu .am-once { grid-column: 1 / -1; display: flex !important; flex-direction: row !important; align-items: center; justify-content: flex-start !important; gap: 12px; width: 100%; padding: 12px 6px 4px !important; margin-top: 2px; border-top: 1px solid var(--line); border-radius: 0; text-align: left; }
.attach-menu .am-once .am-ic { width: 40px !important; height: 40px !important; flex: none; }
.attach-menu .am-t { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; }
.attach-menu .am-t small { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.admin-seg { margin: 0 16px 10px; }
/* payments register on a phone: the waiting total gets the full width, the other two share a row */
@media (max-width: 560px) {
	.reg-totals { grid-template-columns: 1fr 1fr; }
	.reg-tot.w { grid-column: 1 / -1; flex-direction: row; align-items: baseline; flex-wrap: wrap; column-gap: 10px; }
	.reg-tot.w em { margin-left: auto; }
}
.reg-hint { margin: -2px 16px 8px; font-size: 12px; line-height: 1.4; color: var(--faint); }
.admin-settings { padding: 4px 16px calc(110px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; }
.admin-settings > * { margin: 0 !important; }
/* tablet and desktop: the conversation reads in a centred column, like a page, not a banner across the screen */
@media (min-width: 720px) {
	.pane-main .msgs { padding-left: max(16px, calc((100% - 860px) / 2)); padding-right: max(16px, calc((100% - 860px) / 2)); }
	.pane-main .composer { padding-left: max(10px, calc((100% - 860px) / 2)); padding-right: max(10px, calc((100% - 860px) / 2)); }
	.pane-main .chathead { padding-left: 12px; padding-right: 12px; }
	.pane-main > .scroll, .pane-main > .page { width: 100%; max-width: 860px; margin-left: auto; margin-right: auto; }
	.row { border-radius: 14px; margin: 0 8px; }
}
@media (min-width: 1100px) {
	.pane-list { flex-basis: clamp(360px, 28vw, 420px); }
	.row .top b { font-size: 15.5px; }
}

/* PDF reader inside KNOX: pages stacked like paper, scroll to read */
.pdfv { z-index: 60; }
.pdfv-bar { align-items: center; gap: 4px; padding-left: 16px; box-shadow: 0 1px 0 var(--line); }
.pdfv-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdfv-pages { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 8px calc(24px + var(--safe-b)); touch-action: pan-x pan-y pinch-zoom; }
.pdfv-page { display: block; max-width: 100%; height: auto; background: #fff; border-radius: 4px; box-shadow: 0 8px 24px -12px #000; }
.pdfv-status { margin: auto 0; padding: 24px; font-size: 14px; color: var(--muted); text-align: center; }
.pdfv-pages > .btn { flex: none; }
.file-ready { z-index: 70; }

/* Arrange: each person drags their own groups and 1-to-1 chats into order */
.arr-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.arr-hint { margin: 2px 16px 10px; font-size: 13px; color: var(--muted); }
.arr-list { position: relative; }
.arr-row { cursor: default; user-select: none; -webkit-user-select: none; transition: transform .18s var(--spring, ease), box-shadow .18s, background .18s; }
.arr-row .meta { border: 0; }
.arr-grip { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-right: -6px; color: var(--muted); cursor: grab; touch-action: none; border-radius: 14px; }
.arr-grip svg { width: 22px; height: 22px; }
.arr-grip:focus-visible { outline: 2px solid var(--text); outline-offset: -4px; }
.arr-row.dragging { position: relative; z-index: 3; transition: none; background: rgba(255,255,255,.08); box-shadow: 0 16px 34px -12px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.14); border-radius: 16px; }
.arr-row.dragging .arr-grip { color: var(--text); cursor: grabbing; }
.is-dragging .arr-row:not(.dragging) { opacity: .72; }
.arr-reset { display: block; margin: 16px auto 24px; }
/* "All notes" back button only shows inside a Notes filter such as Stock counts */
.notes-fback[hidden] { display: none !important; }
.topbar .notes-fback { margin-left: -6px; }
.topbar .notes-fback:not([hidden]) + .title { display: none; }

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