/* ============================================================================
   3D Asset Database — demo design system (no external fonts/frameworks)
   @HOSTING: production switches to Inter + design tokens from §10; all
   classes here map 1:1 onto the planned component tree (§9.1).
   ========================================================================== */
:root {
  color-scheme: light;                  /* native controls stay light, matching the design */
  --bg: #f4f6f9; --panel: #ffffff; --ink: #182230; --ink-2: #5d6b7e; --ink-3: #5b6b80;   /* AA (4.5:1) on white, page grey + family tints */

  --line: #e4e9f0; --line-2: #d5dce6;
  --acc: #2f6fed; --acc-2: #1d4fd7; --acc-soft: #e8effd;
  --ok: #0c7846; --ok-soft: #e4f6ee;
  --warn: #9a6003; --warn-soft: #fdf3df;
  --err: #bf3327; --err-soft: #fdeceb;
  --violet: #7c5ce0; --violet-soft: #efeafc;
  --ctl-h: 36px; --ctl-h-sm: 30px;      /* one height for every control */
  --radius: 10px; --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px -6px rgba(16,24,40,.12);
  --shadow-lg: 0 12px 44px -12px rgba(16,24,40,.28);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.5 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acc); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
.icon { vertical-align: -3px; flex: none; }
code, .mono { font-family: var(--mono); font-size: .92em; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  border-radius: 8px; padding: 0 13px; height: var(--ctl-h); font: inherit; font-size: 13px; font-weight: 550;
  transition: all .14s ease; white-space: nowrap; user-select: none;
}
.btn:hover { border-color: #b9c4d4; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; box-shadow: none; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.primary:hover { background: var(--acc-2); }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn.warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { background: #eef1f6; color: var(--ink); box-shadow: none; transform: none; }
.btn.sm { padding: 0 10px; height: var(--ctl-h-sm); font-size: 12px; border-radius: 7px; }
.btn.block { width: 100%; justify-content: center; }
.linkbtn { background: none; border: 0; color: var(--acc); font: inherit; cursor: pointer; padding: 0; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=button]),
select, textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 11px;
  font: inherit; font-size: 13px; color: var(--ink); background: #fff; outline: none;
  transition: border .12s, box-shadow .12s;
}
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=button]),
select { height: var(--ctl-h); padding-top: 0; padding-bottom: 0; }   /* textarea keeps its own height */
input[type=checkbox], input[type=radio] { flex: none; accent-color: var(--acc); }
input:focus, select:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(47,111,237,.14); }
/* keyboard focus is always visible (mouse users never see it) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }
.ptile:focus-visible, .tnode:focus-visible, .lrow:focus-visible, tr.clickable:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
textarea { resize: vertical; min-height: 70px; }
.fld { display: block; margin-bottom: 13px; }
.fld > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.fld small { color: var(--ink-3); font-size: 11.5px; display: block; margin-top: 3px; }
/* a control row inside a label must stay a flex row — the caption rule above
   would otherwise turn it into a block and stack the controls */
.fld > .i-row { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; color: var(--ink); margin: 0; }
.fld > .i-row > input { min-width: 0; }          /* flex:1 shrinks instead of overflowing */
.fld > .i-row > select { width: auto; }
.fld > .i-row.grow { display: flex; width: 100%; }   /* stretch the row to the field width */
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 3px 0; }
.chk input { width: 15px; height: 15px; accent-color: var(--acc); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#37a0f0,#6c3ee8);
  color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none;
}
.page { max-width: 1280px; margin: 0 auto; padding: 26px 30px 60px; }

.role { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 20px; }
.role-admin { background: #3a2a6b; color: #cbb8ff; }
.role-regular { background: #1c3a5e; color: #a5d4ff; }
.role-visitor { background: #4a3a10; color: #ffd98a; }

/* ---------- page header / cards ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .crumbs { color: var(--ink-3); font-size: 12.5px; margin-bottom: 4px; }
.page-head .crumbs a { color: var(--ink-3); } .page-head .crumbs a:hover { color: var(--acc); }
.page-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card .card-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.card .card-body { padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2,1fr); }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 3px 9px; border-radius: 20px; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-run { background: var(--warn-soft); color: var(--warn); }
.chip-run i { animation: pulse 1s infinite alternate; }
.chip-wait { background: #eef1f6; color: var(--ink-2); }
.chip-err { background: var(--err-soft); color: var(--err); }
.chip-done { background: var(--violet-soft); color: var(--violet); }
.chip-mute { background: #eef1f6; color: var(--ink-3); }
@keyframes pulse { from { opacity: .3 } to { opacity: 1 } }
.pill2 { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: #eef1f6; color: var(--ink-2); font-weight: 600; }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: #f7f9fc; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .empty { text-align: center; color: var(--ink-3); padding: 26px; }
.tbl b.code { font-family: var(--mono); font-weight: 600; }
.tbl .linkbtn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.tbl .linkbtn:hover b, .tbl .linkbtn:hover { text-decoration: underline; }
.tbl .cont { color: var(--ink-3); }        /* continuation rows of the same visitor */
.mut { color: var(--ink-3); font-size: 12px; }

/* ---------- product grid ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px,1fr)); gap: 14px; }
.ptile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; transition: all .15s; position: relative; }
.ptile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c8d3e2; }
.ptile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #eef1f6; }
.ptile .pt-body { padding: 10px 12px 12px; }
.ptile .pt-code { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.ptile .pt-name { font-weight: 600; font-size: 13.5px; margin: 1px 0 4px; }
.ptile .pt-meta { display: flex; justify-content: space-between; align-items: center; }
.ptile .pt-brand { font-size: 11.5px; color: var(--ink-2); }
.ptile .pt-flag { position: absolute; top: 8px; right: 8px; }

/* ---------- product page (3 panels) ---------- */
.panels { display: grid; grid-template-columns: 1.45fr .95fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .panels { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--ink-3); font-size: 12px; padding-top: 1px; }
.kv dd { margin: 0; font-weight: 520; }
.loggrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.logrow { display: flex; gap: 8px; font-size: 12px; align-items: flex-start; padding: 5px 8px; border-radius: 7px; background: #f7f9fc; }
.logrow .icon { margin-top: 1px; color: var(--ink-2); }
.logrow b { font-size: 12px; display: block; font-weight: 600; }
.logrow span { color: var(--ink-3); font-size: 11px; display: block; }
.dielist { display: grid; grid-template-columns: repeat(auto-fill,minmax(190px,1fr)); gap: 10px; }
.diecard { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; position: relative; }
.diecard b { font-family: var(--mono); font-size: 13px; }
.diecard dl { margin: 6px 0 0; display: grid; grid-template-columns: 56px 1fr; gap: 1px 8px; color: var(--ink-2); }
.diecard dt { color: var(--ink-3); } .diecard dd { margin: 0; }

/* ---------- forms/dropzone ---------- */
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--radius-lg); padding: 34px; text-align: center; color: var(--ink-2); transition: all .15s; cursor: pointer; }
.dropzone:hover, .dropzone.over { border-color: var(--acc); background: var(--acc-soft); color: var(--acc); }
.progress { height: 6px; background: #e8ecf2; border-radius: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg,#3777f0,#6c3ee8); border-radius: 6px; transition: width .4s ease; }
.pipe-steps { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.pipe-steps span { font-size: 10.5px; font-weight: 650; padding: 3px 8px; border-radius: 14px; background: #eef1f6; color: var(--ink-3); }
.pipe-steps span.on { background: var(--acc-soft); color: var(--acc); }
.pipe-steps span.done { background: var(--ok-soft); color: var(--ok); }
.pipe-steps span.fail { background: var(--err-soft); color: var(--err); }

/* ---------- auth ---------- */
.auth-err { background: var(--err-soft); color: var(--err); font-size: 12.5px; padding: 9px 12px; border-radius: 8px; margin-bottom: 14px; }
.demo-hint { margin-top: 18px; border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--ink-2); background: #fbfcfe; }
.demo-hint b { color: var(--ink); }
.demo-hint table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.demo-hint td { padding: 2px 4px; font-family: var(--mono); font-size: 11px; }
.demo-hint td:first-child { width: 46%; color: var(--ink-2); font-family: inherit; }
.auth-tabs { display: flex; gap: 4px; background: #eef1f6; border-radius: 9px; padding: 4px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; padding: 7px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.auth-tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.countdown { display: inline-flex; gap: 6px; align-items: center; font-weight: 650; color: var(--warn); }

/* ---------- expiry / lock screens ---------- */
.lock-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(900px 600px at 50% 0%, #17202e, #0b1119); color: #dfe7f3; padding: 24px; }
.lock-card { background: #141c29; border: 1px solid #253248; border-radius: 18px; padding: 44px 50px; text-align: center; max-width: 560px; box-shadow: var(--shadow-lg); }
.lock-card h1 { color: #fff; margin: 14px 0 8px; }
.lock-card p { color: #93a4bd; }
.lock-icon { width: 64px; height: 64px; border-radius: 18px; background: rgba(214,71,60,.14); color: var(--err); display: grid; place-items: center; margin: 0 auto; }

/* ---------- toasts / modal ---------- */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 99; }
.toast { background: #101823; color: #fff; font-size: 13px; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); animation: slidein .25s ease; max-width: 380px; }
.toast-ok { border-left: 3px solid var(--ok); } .toast-err { border-left: 3px solid var(--err); }
.toast-info { border-left: 3px solid var(--acc); } .toast-warn { border-left: 3px solid var(--warn); }
.toast.out { opacity: 0; transform: translateX(20px); transition: all .3s; }
@keyframes slidein { from { opacity: 0; transform: translateY(10px) } }
.modal-veil { position: fixed; inset: 0; background: rgba(12,18,28,.55); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 90; animation: fadein .15s; padding: 20px; }
.modal-veil.closing { opacity: 0; transition: opacity .15s; }
.modal { background: #fff; border-radius: 16px; width: 460px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
.modal-wide { width: 860px; }
.modal-head h3.lg { font-size: 19px; }   /* edit-record window: bigger than the 15px modal default */
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 16px 16px; }
@keyframes fadein { from { opacity: 0 } } @keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px) } }

/* ---------- filters ---------- */
.filters { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { width: auto; }
.filters .grow { flex: 1; min-width: 150px; }
.i-row { display: inline-flex; align-items: center; gap: 6px; }
.time-chip { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; padding: 2px 10px; border-radius: 14px; font-weight: 650; }
.time-ok { background: var(--ok-soft); color: var(--ok); }
.time-warn { background: var(--warn-soft); color: var(--warn); }
.time-err { background: var(--err-soft); color: var(--err); }
.banner { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.banner.warn { background: var(--warn-soft); color: #8a5c04; border: 1px solid #f3ddb0; }
.banner.err { background: var(--err-soft); color: #a3362d; border: 1px solid #f2c4c0; }
.banner.info { background: var(--acc-soft); color: #1e4ba8; border: 1px solid #c9d9f8; }
.collection-hero { display: flex; gap: 16px; align-items: flex-start; }
.avatar.cat { border-radius: 10px; width: 44px; height: 44px; font-size: 17px; }
.rights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.fmt-row { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.fmt-row:last-child { border: 0; }
.fmt-row .f { font-weight: 700; width: 78px; font-family: var(--mono); font-size: 12.5px; }
.fmt-row .n { color: var(--ink-3); font-size: 12px; flex: 1; }
.tag { display:inline-block; font-size:11px; font-weight:600; background:#eef1f6; color:var(--ink-2); border-radius:6px; padding:1px 7px; margin:1px 3px 1px 0; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty-state .icon { width: 46px; height: 46px; margin-bottom: 10px; opacity: .5; }

/* ============================================================================
   NEW CHROME — top bar / menu bar / left tree column (replaces .app sidebar)
   ========================================================================== */
.chrome-wrap { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.demo-badge { position: fixed; left: 12px; bottom: 12px; z-index: 80; font-size: 11px; font-weight: 700;
  background: #101823; color: #ffd98a; padding: 6px 12px; border-radius: 20px; letter-spacing: .06em;
  box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.chrome-top {
  display: flex; align-items: center; gap: 16px; height: 52px; padding: 0 18px;
  background: #101823; color: #fff; flex: none; box-shadow: 0 1px 3px rgba(0,0,0,.25); z-index: 10;
}
.chrome-brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg,#3777f0,#6c3ee8); display: grid; place-items: center; color: #fff; }
.chrome-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.chrome-ver { font-size: 11px; color: #8b98a9; padding-left: 2px; }
.chrome-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chrome-lang {
  background: #1c2837; color: #dfe7f3; border: 1px solid #2c3b4f; border-radius: 8px;
  padding: 5px 8px; font: inherit; font-size: 12.5px; cursor: pointer; width: auto;
}
.chrome-user { display: flex; align-items: center; gap: 8px; margin-right: 2px; }
.chrome-user-meta { line-height: 1.15; }
.chrome-user-meta b { font-size: 12.5px; color: #fff; display: block; }
.chrome-user-meta i { font-style: normal; font-size: 10.5px; color: #8b98a9; display: block; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.top-btn { background: rgba(255,255,255,.08); border-color: #2c3b4f; color: #dfe7f3; }
.top-btn:hover { background: rgba(255,255,255,.16); border-color: #40506a; }
.top-btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }

.chrome-menu {
  display: flex; align-items: center; gap: 2px; height: 42px; padding: 0 14px;
  background: #1c2837; border-bottom: 1px solid #0c1119; flex: none; overflow-x: auto; z-index: 9;
}
.menu-item {
  display: inline-flex; align-items: center; gap: 7px; color: #b8c3d4; font-size: 13px; font-weight: 550;
  padding: 7px 13px; border-radius: 8px; white-space: nowrap; transition: all .12s;
}
.menu-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.menu-item.active { background: var(--acc); color: #fff; }
.menu-item .pill { background: rgba(0,0,0,.25); border-radius: 20px; font-size: 11px; padding: 1px 8px; }
.menu-sep { width: 1px; height: 22px; background: rgba(255,255,255,.14); margin: 0 8px; flex: none; }
.menu-chip { margin-left: auto; }
.chrome-menu .spacer { margin-left: auto; }

.chrome-body { display: grid; grid-template-columns: 276px 1fr; flex: 1; min-height: 0; }
.chrome-body.noleft { grid-template-columns: 1fr; }
.chrome-body.noleft .col-left { display: none; padding: 0; border: 0; }
.col-left {
  background: #fdfefe; border-right: 1px solid var(--line); overflow-y: auto; padding: 12px 8px 24px;
}
.col-main { overflow-y: auto; }
@media (max-width: 1000px) { .chrome-body { grid-template-columns: 200px 1fr; } }

/* ---------- product tree ---------- */
.tree-head {
  display: flex; align-items: center; gap: 8px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-3); padding: 4px 10px 10px; border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.tree { display: flex; flex-direction: column; }
.tnode {
  display: flex; align-items: center; gap: 6px; border-radius: 7px; padding: 4px 8px 4px 4px;
  padding-left: calc(6px + var(--d) * 16px); cursor: pointer; font-size: 13px; color: var(--ink);
  text-decoration: none; transition: background .1s;
}
.tnode:hover { background: #eef3fb; }
.tnode.sel { background: var(--acc-soft); box-shadow: inset 2px 0 0 var(--acc); }
.tnode.sel .t-label { color: var(--acc-2); font-weight: 650; }
.t-arrow { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; color: var(--ink-3); border-radius: 4px; flex: none; }
.t-arrow:hover { background: rgba(47,111,237,.12); color: var(--acc); }
.t-arrow .icon { transition: transform .13s; }
.t-arrow.open .icon { transform: rotate(90deg); }
.t-arrow.nop { visibility: hidden; }
.t-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.t-count { font-size: 11px; color: var(--ink-3); background: #eef1f6; border-radius: 10px; padding: 0 7px; flex: none; }
.tnode.sel .t-count { background: #dbe7fb; color: var(--acc-2); }
.tnode.leaf { font-size: 12.5px; }
.tnode .mono-sm { font-family: var(--mono); font-size: 11.5px; }
.t-prodname { color: var(--ink-3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- listing bar (3D product files) ---------- */
.list-bar {
  display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.list-title { font-size: 17px; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.list-bar .spacer { flex: 1; }
/* the generic input rule is more specific than a bare class, so the search
   field is sized through the bar; the record count may never wrap */
.list-bar .list-search { width: 290px; flex: 0 1 290px; min-width: 170px; }
.list-bar > .mut { white-space: nowrap; }
.seg.viewseg { display: flex; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; padding: 2px; gap: 2px; }
.seg.viewseg button { border: 0; background: #eef1f6; padding: 5px 10px; cursor: pointer; color: var(--ink-2); display: inline-flex; align-items: center; border-radius: 6px; }
.seg.viewseg button.on { background: var(--ink); color: #fff; }

/* ---------- brand-bar ---------- */
.brand-bar {
  display: flex; align-items: center; gap: 10px; border-radius: 10px; margin: 6px 0 10px;
  padding: 7px 14px;
  background: linear-gradient(90deg, #182230 0%, #232f42 78%, rgba(35,47,66,0) 100%);
  color: #fff; min-height: 40px;
}
.brand-bar .brand-logo { border-radius: 7px; flex: none; }
.bb-name { font-weight: 700; font-size: 14px; letter-spacing: .01em; }
.bb-count { margin-left: auto; font-size: 11px; color: #c2cddb; background: #182230; border-radius: 12px; padding: 2px 10px; }
.pgrid + .brand-bar, .llist + .brand-bar { margin-top: 20px; }
/* family colour code — title bars carry the family swatch, cards the frame */
.bb-sep { color: #a9b6c8; }
.bb-family { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 14px; color: var(--fam, inherit); }
.bb-family svg { flex: none; }
/* ---------- product page: brand › family subtitle ---------- */
.product-sub { display: flex; align-items: center; gap: 8px; margin: 7px 0 0; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.product-sub .ps-brand { }
.product-sub .ps-sep { color: var(--ink-3); font-weight: 500; }
.product-sub .ps-fam { display: inline-flex; align-items: center; gap: 5px; }
.product-sub .chip { margin-left: 4px; }

/* ---------- tree: client rows under an asset ---------- */
.tnode.leaf.cl { color: var(--ink-2); }
.tnode.leaf.cl .t-label { font-size: 12px; font-weight: 500; }
.tnode.leaf.cl .icon { color: var(--ink-3); }
.tnode.leaf[data-node^="P|"] .t-arrow { cursor: pointer; }

/* ---------- record window: one field style & height ---------- */
.edit-grid { gap: 13px 14px; }
.edit-grid .fld { margin-bottom: 0; }
.edit-grid .fld > input[type=text],
.edit-grid .fld > input[type=number],
.edit-grid .fld > select,
.edit-grid .fld > .fieldbtn { height: var(--ctl-h); min-height: var(--ctl-h); }
.edit-grid .fld > textarea { min-height: 96px; }   /* Notes — the only multi-line field */
.fieldbtn {
  display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink);
  padding: 0 11px; font: inherit; font-size: 13px; text-align: left;
  transition: border .12s, box-shadow .12s;
}
.fieldbtn:hover { border-color: var(--acc); }
.fieldbtn .icon { flex: none; color: var(--ink-2); }
.fieldbtn .fb-chev { margin-left: auto; color: var(--ink-3); }
/* the assigned clients — visually different from the input fields */
.client-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.client-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; letter-spacing: .01em;
  background: var(--acc-soft); color: #1e4ba8; border: 1px solid #c9d9f8;
}
.client-chip.nd { background: #f4f6fa; color: var(--ink-3); border: 1px dashed var(--line-2); font-weight: 600; }
.pt-cli { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.pt-cli .pt-view, .lrow .pt-view { padding: 2px 8px; font-size: 11px; }
.tnode .t-label { flex: 0 1 auto; }
.tnode svg[style*="color"] { flex: none; }

/* ---------- list view ---------- */
.llist { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lrow {
  display: grid; grid-template-columns: 58px 110px 1fr 130px 70px 90px 110px 70px; align-items: center;
  gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer;
}
.lrow.head { cursor: default; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); background: #f7f9fc; }
.lrow:not(.head):hover { background: #f3f7fc; }
.lrow:last-child { border-bottom: 0; }
.l-thumb img { width: 52px; height: 39px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); display: block; background: #eef1f6; }
.b-code { font-weight: 650; font-size: 12px; }

/* ---------- product detail frame ---------- */
.pframe { overflow: visible; }
.pframe-top { display: grid; grid-template-columns: 360px 1fr; }
@media (max-width: 1000px) { .pframe-top { grid-template-columns: 1fr; } .thumb-bar { width: 100% !important; } }
.prev-col { position: relative; border-right: 1px solid var(--line); padding: 14px; }
.pv-box { width: 100%; height: 300px; border-radius: 10px; overflow: hidden; position: relative; background: #f2f5f8; }
.pv-box canvas { width: 100% !important; height: 100% !important; display: block; border-radius: 10px; cursor: grab; }
.pv-box canvas:active { cursor: grabbing; }
.pv-box .view-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-empty { height: 100%; display: grid; place-items: center; gap: 6px; background: repeating-linear-gradient(45deg,#f2f5f8,#f2f5f8 14px,#eef1f6 14px,#eef1f6 28px); border-radius: 10px; padding: 24px; text-align: center; }
.pv-spin {
  position: absolute; top: 24px; right: 24px; z-index: 5; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.92); color: #9aa7b7; cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow); transition: all .15s;
}
.pv-spin:hover { transform: scale(1.06); }
.pv-spin.on { color: #15a55c; border-color: #bfe6d2; background: rgba(230,246,238,.95); box-shadow: 0 2px 10px rgba(21,165,92,.28); }
.pframe-info { padding: 18px 22px; }
.pf-cap { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin-bottom: 10px; }
.kv.pf { grid-template-columns: 150px 1fr; font-size: 13.5px; row-gap: 5px; }

.pframe-bottom {
  display: flex; align-items: stretch; gap: 16px; border-top: 1px solid var(--line);
  background: #f8fafc; padding: 12px 14px; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.thumb-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 360px; flex: none; }
.view-th {
  border: 2px solid transparent; background: #fff; border-radius: 10px; padding: 4px; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px; box-shadow: inset 0 0 0 1px var(--line); transition: all .12s;
}
.view-th:hover { box-shadow: inset 0 0 0 1px var(--acc); }
.view-th.on { border-color: var(--acc); box-shadow: 0 2px 10px rgba(47,111,237,.18); }
.view-th img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 7px; background: #eef1f6; display: block; }
.view-th span { font-size: 10.5px; font-weight: 650; color: var(--ink-2); text-align: center; padding-bottom: 2px; }
.pa-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; padding-left: 16px; border-left: 1px dashed var(--line-2); }

/* ---------- info bar (popup buttons for the removed frames) ---------- */
.info-bar {
  display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap;
}
.info-bar .spacer { margin-left: auto; }
.info-bar-cap { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-right: 6px; }

/* ---------- auth under chrome ---------- */
.auth-center { min-height: calc(100vh - 52px); display: grid; place-items: center; padding: 30px 20px; }
.auth-card2 { width: 430px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 26px 28px 28px; }
.auth-hero-mini { text-align: center; margin-bottom: 18px; }
.auth-hero-mini .brand-mark { margin: 0 auto 10px; }
.auth-hero-mini h2 { font-size: 20px; margin-bottom: 2px; }
.auth-hero-mini p { color: var(--ink-2); margin: 0; font-size: 13px; }

/* ---------- auth: action rows with cancel ---------- */
.auth-actions { display: flex; gap: 8px; margin-top: 14px; }
.auth-actions .primary { flex: 1; justify-content: center; }

/* ---------- tree: "+ Nieuw" button + 5-level indents ---------- */
.tree-head { display: flex; align-items: center; gap: 7px; }
.tree-new { margin-left: auto; padding: 3px 9px; font-size: 11.5px; gap: 4px; }
.tnode { padding-left: calc(8px + var(--d) * 12px); }

/* ---------- new-node page ---------- */
.new-kind { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.new-kind-opt { display: flex; gap: 9px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 11px 12px; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.new-kind-opt small { font-size: 11px; line-height: 1.35; display: inline-block; margin-top: 1px; }
.new-kind-opt input[type=radio] { margin: 3px 0 0; accent-color: var(--acc); }
.new-kind-opt.on { border-color: var(--acc); background: var(--acc-soft, #eef4ff); }

/* ---------- accessibility: motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .ptile:hover { transform: none; }
}
