/* Powerline identity (Brand Book v2): Archivo, Power Orange, Carbon, Charcoal, Panel Grey */
@font-face { font-family: "Archivo"; src: url("/fonts/Archivo-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/Archivo-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/Archivo-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/Archivo-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/Archivo-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/Archivo-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

/* Theme tokens. Light: white cards on a light grey ground. Dark ("Carbon"): Carbon ground, Charcoal lines.
   Brand Book v2: Power Orange, Carbon, Charcoal, Panel Grey - flat colour, no gradients. The drawings stay paper. */
:root {
  --brand: #E85C1A;
  --brand-dark: #B8460F;          /* accent text and the primary button's hover */
  --brand-soft: #FCEBE2;
  --brand-soft-2: #F9DCCB;
  --brand-tint: #FFF8F4;
  --brand-line: #F4C3A8;
  --carbon: #111111;
  --charcoal: #3A3A3A;
  --panel-grey: #CCCCCC;
  --ink: #111111;
  --ink-2: #3A3A3A;
  --muted: #6B6B6B;
  --muted-2: #8C8C8C;
  --line: #E6E6E6;
  --line-strong: #CCCCCC;
  --bg: #F3F3F1;
  --card: #FFFFFF;
  --surface-2: #F7F7F6;
  --surface-3: #EFEFEE;
  --input: #FFFFFF;
  --canvas: #E9E9E7;
  --warn: #9A3412;
  --warn-bg: #FFF7ED;
  --warn-line: #FED7AA;
  --danger: #B91C1C;
  --danger-bg: #FEF2F2;
  --danger-line: #FECACA;
  --ok: #047857;
  --ok-bg: #ECFDF5;
  --info: #1E40AF;
  --info-bg: #EFF6FF;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .05), 0 2px 8px rgba(17, 17, 17, .04);
  --shadow-lift: 0 14px 34px rgba(17, 17, 17, .10);
  --pop-shadow: 0 16px 40px rgba(17, 17, 17, .18);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand-dark: #F27A42;
  --brand-soft: rgba(232, 92, 26, .16);
  --brand-soft-2: rgba(232, 92, 26, .26);
  --brand-tint: rgba(232, 92, 26, .07);
  --brand-line: rgba(232, 92, 26, .5);
  --ink: #F4F4F4;
  --ink-2: #D2D2D2;
  --muted: #A6A6A6;
  --muted-2: #7D7D7D;
  --line: #2A2A2A;
  --line-strong: #3A3A3A;
  --bg: #111111;
  --card: #1A1A1A;
  --surface-2: #202020;
  --surface-3: #262626;
  --input: #141414;
  --canvas: #0C0C0C;
  --warn: #FDBA74;
  --warn-bg: rgba(234, 88, 12, .14);
  --warn-line: rgba(253, 186, 116, .32);
  --danger: #F87171;
  --danger-bg: rgba(185, 28, 28, .18);
  --danger-line: rgba(248, 113, 113, .35);
  --ok: #34D399;
  --ok-bg: rgba(52, 211, 153, .14);
  --info: #93C5FD;
  --info-bg: rgba(59, 130, 246, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-lift: 0 14px 34px rgba(0, 0, 0, .55);
  --pop-shadow: 0 16px 40px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.45 "Archivo", "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
[hidden] { display: none !important; }
.muted { color: var(--muted); font-weight: 400; }

/* ---- top bar ---------------------------------------------------------- */
.topbar {
  height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 0 16px;
  background: var(--card);
  position: relative;
}
/* the track: 85 % Power Orange, 15 % Panel Grey */
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand) 0 85%, #CCCCCC 85% 100%);
}
.brand { display: flex; align-items: center; gap: 14px; flex: none; cursor: pointer; border-radius: 8px; }
.brand:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.logo { height: 26px; width: auto; display: block; }
.brand-text { border-left: 1px solid var(--line); padding-left: 14px; }
.app-name { font-weight: 700; font-size: 17px; letter-spacing: .2px; }

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* ---- start page: the bento dashboard of the person signed in (dashboard.js) -------------------- */
.home { max-width: 1320px; margin: 0 auto; padding: 28px 28px 64px; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; grid-auto-flow: row dense; }
.tile {
  position: relative; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card);
  box-shadow: var(--shadow); color: var(--ink); font: inherit; text-align: left;
}
button.tile, label.tile { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
button.tile:hover, label.tile:hover, .tile.over { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
button.tile:focus-visible, label.tile:focus-within { outline: 3px solid var(--brand-soft-2); outline-offset: 2px; }
/* Label: SemiBold caps, tracked wide (Brand Book v2) */
.label, .eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0; }
.tile-sub { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.tile-icon {
  display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 16px;
  margin-bottom: auto; background: var(--brand-soft); color: var(--brand);
}
.tile em { margin-top: 6px; font-style: normal; font-weight: 700; font-size: 13.5px; color: var(--brand-dark); }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-bottom: 6px; flex-wrap: wrap; }
.tile-head h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.tile-head .count { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.tile-foot { margin: auto 0 0; padding-top: 8px; font-size: 12.5px; color: var(--muted); }
.tile.flash { animation: tileflash 1.4s ease-out; }
@keyframes tileflash { 0%, 35% { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); } }

/* the hero: ask (Light), then answer (ExtraBold), the 85/15 track under the answer */
.hero { grid-column: span 6; grid-row: span 2; justify-content: flex-end; gap: 10px; padding: 30px 32px 28px; min-height: 300px; }
.hero .eyebrow { margin-bottom: auto; }
.hero .ask { margin: 0; font-size: clamp(20px, 2vw, 26px); font-weight: 300; line-height: 1.25; color: var(--ink-2); max-width: 30ch; }
.hero .answer { margin: 0; font-size: clamp(34px, 3.6vw, 52px); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; max-width: 16ch; }
.track { display: block; position: relative; width: min(420px, 100%); height: 8px; margin-top: 8px; background: var(--panel-grey); overflow: hidden; }
.track i { position: absolute; left: 0; top: 0; bottom: 0; width: 85%; background: var(--brand); transform-origin: left; }
.track.run i { animation: trackfill 1.6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes trackfill { from { transform: scaleX(0); } }

/* the two ways in: New project (Power Orange), technical offer (Carbon) */
.tile-new, .tile-offer { grid-column: span 3; grid-row: span 2; min-height: 300px; gap: 8px; }
.tile-new b, .tile-offer b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.tile-new { background: var(--brand); border-color: var(--brand); color: #fff; }
.tile-new .label, .tile-new .tile-sub, .tile-new em { color: rgba(255, 255, 255, .9); }
.tile-new .tile-icon { background: rgba(255, 255, 255, .18); color: #fff; }
button.tile-new:hover { border-color: var(--brand); }
.tile-offer { background: var(--carbon); border-color: var(--carbon); color: #fff; }
:root[data-theme="dark"] .tile-offer { background: #1F1F1F; border-color: #3A3A3A; border-style: dashed; border-width: 2px; }
.tile-offer .label, .tile-offer .tile-sub { color: #BDBDBD; }
.tile-offer em { color: var(--brand); }
.tile-offer .tile-icon { background: #262626; color: var(--brand); }
label.tile-offer:hover, .tile-offer.over { border-color: var(--brand); }

/* numbers */
.stat { grid-column: span 2; gap: 2px; min-height: 140px; }
.stat b { font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-top: auto; font-variant-numeric: tabular-nums; }
.stat .tile-sub { font-size: 12.5px; }
.stat-check.hot b { color: var(--brand); }

/* continue where you left off */
.tile-continue { grid-column: span 6; min-height: 140px; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 18px; row-gap: 4px; align-content: center; }
.tile-continue[hidden] { display: none; }
.tile-continue > * { grid-column: 1; min-width: 0; }
.tile-continue b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tile-continue .tile-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-continue .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.tile-continue .btn { grid-column: 2; grid-row: 1 / span 4; align-self: center; height: 44px; padding: 0 20px; font-size: 14px; border-radius: 12px; }

/* lists */
.tile-list { padding: 20px 20px 16px; }
.tile-mine { grid-column: span 7; }
.tile-team { grid-column: span 5; }        /* 2026-11-12: in the place of Things to check */
.tile-rfd { grid-column: 1 / -1; }          /* 2026-11-12: Live RFD, the whole row */
.dash-list { list-style: none; margin: 0 -8px; padding: 0; width: calc(100% + 16px); display: flex; flex-direction: column; gap: 2px; max-height: 392px; overflow-y: auto; }
.dash-row {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px; border: 0; border-radius: 12px; background: transparent;
  font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: background .12s;
}
.dash-row:hover { background: var(--surface-2); }
.dr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dr-main b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-main b .muted { font-weight: 500; }
.dr-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-side { flex: none; display: flex; align-items: center; gap: 8px; }
.dr-when { font-size: 12px; color: var(--muted); white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.dr-link { border: 0; background: transparent; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.dr-link:hover b { color: var(--brand-dark); }
.dash-empty { padding: 18px 10px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.dash-empty .btn { margin-left: 8px; }
.dash-empty b { color: var(--ink); }
.dash-empty.ok { color: var(--ok); font-weight: 600; }
.pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.pill-project { background: var(--brand-soft); color: var(--brand-dark); }
.pill-offer { background: var(--surface-3); color: var(--ink-2); }
.pill-warn { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.pill-ok { background: var(--surface-3); color: var(--ok); box-shadow: inset 0 0 0 1px currentColor; }
.pill-off { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.pill[data-check] { cursor: pointer; }
.pill[data-check]:hover { box-shadow: inset 0 0 0 1px var(--warn); }
/* segmented choice */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-3); }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on, .seg button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--brand-dark); cursor: pointer; }
.link:hover { text-decoration: underline; }

/* (2026-11-18, Mohamed: "keep the same design, with minimized, optimal windows"): one short top row - the greeting,
   Continue where you left off, To check; the test tiles live in the top bar's Menu, the Panels / My projects numbers
   go (My projects is the list below) */
.bento .tile-new, .bento .tile-offer, .bento .stat:not(.stat-check) { display: none; }
.hero { grid-column: span 5; grid-row: auto; min-height: 150px; padding: 20px 24px; gap: 6px; }
.hero .eyebrow { margin-bottom: 4px; }
.hero .ask { font-size: clamp(15px, 1.3vw, 18px); max-width: none; }
.hero .answer { font-size: clamp(24px, 2.3vw, 32px); max-width: none; }
.tile-continue { grid-column: span 5; min-height: 150px; }
.stat-check { grid-column: span 2; min-height: 150px; }
.bento:has(.tile-continue[hidden]) .hero { grid-column: span 10; }
@media (max-width: 1180px) {
  .hero, .tile-continue { grid-column: span 6; min-height: 130px; }
  .stat-check { grid-column: span 6; min-height: 110px; }
}
@media (max-width: 640px) { .hero, .tile-continue, .stat-check { grid-column: span 2; } }

/* View & Export in one row (2026-11-18, Mohamed: "minimize this tab"): Undo / Redo by their icons, the sheets with the
   review, one Export menu */
.rb-hist .tb-btn > span { display: none; }
.rb-hist > .tb-label, .rb-sheets > .tb-label, .rb-export > .tb-label { display: none; }
.rb-bar .rb-ctx[data-ctx="view"] { flex-wrap: wrap; }
.rb-bar .rb-ctx[data-ctx="view"] > .tb-group { padding: 0 10px; flex: none; }   /* never shrunk under its text */
.rb-sheets .tb-row { gap: 4px; }
.rb-sheets .rv { margin-left: 6px; }
.exp-wrap { position: relative; }
.exp-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 80; min-width: 240px; padding: 6px; display: flex;
  flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--pop-shadow); }
.exp-pop[hidden] { display: none; }
.exp-pop .exp-h { padding: 8px 10px 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.exp-pop .tb-btn { width: 100%; justify-content: flex-start; height: 34px; border-radius: 8px; }
.exp-pop .tb-btn[hidden] { display: none; }
.exp-pop .exp-check { margin: 6px 0 2px; padding: 8px 10px 4px; border-top: 1px solid var(--line); height: auto; }

.upload-status { margin: 0 0 16px; padding: 14px 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.upload-status.error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }

@media (max-width: 1180px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hero { grid-column: span 6; grid-row: auto; min-height: 240px; }
  .tile-new, .tile-offer { grid-column: span 3; grid-row: auto; min-height: 220px; }
  .stat { grid-column: span 2; }
  .tile-continue, .tile-mine, .tile-rfd, .tile-team { grid-column: span 6; }
}
@media (max-width: 640px) {
  .home { padding: 16px 16px 48px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hero, .tile-new, .tile-offer, .tile-continue, .tile-mine, .tile-rfd, .tile-team { grid-column: span 2; }
  .stat { grid-column: span 1; min-height: 120px; }
  .stat-check { grid-column: span 2; }
  .tile { padding: 18px; border-radius: 18px; }
  .hero { padding: 22px 20px; }
  .tile-continue { grid-template-columns: 1fr; }
  .tile-continue .btn { grid-column: 1; grid-row: auto; margin-top: 8px; }
  .dr-when { display: none; }
  .tile-continue b, .tile-continue .tile-sub { white-space: normal; }
}
.spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- project ------------------------------------------------------------- */
.project-view { height: calc(100vh - 56px); display: flex; flex-direction: column; }
/* the open project sits in the top bar: the drawings get the height */
.project-bar { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.project-info { min-width: 0; border-left: 1px solid var(--line); padding-left: 16px; }
.project-title, .project-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-title { font-size: 15px; font-weight: 700; }
.project-sub { color: var(--muted); font-size: 12px; }
.sep { margin: 0 8px; }
.downloads { display: flex; align-items: center; gap: 6px; flex: none; }

.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: 240px 1fr; }
body.list-hidden .workspace { grid-template-columns: 1fr; }
body.list-hidden .workspace > .sidebar { display: none; }

/* sidebar */
.sidebar { border-right: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; min-height: 0; }
.sidebar input[type=search] {
  margin: 10px 10px 8px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit;
}
.filters { display: flex; gap: 4px; padding: 0 10px 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 2px 8px;
  font: inherit; font-size: 11.5px; cursor: pointer; color: var(--ink-2);
}
.chip.active { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-dark); font-weight: 600; }
.panel-list { list-style: none; margin: 0; padding: 0 6px 12px; overflow-y: auto; flex: 1; }
.panel-list li {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 2px 6px; align-items: center;
  padding: 5px 6px; border-radius: 7px; cursor: pointer;
}
.panel-list li:hover { background: var(--surface-2); }
.panel-list li.active { background: var(--brand-soft); }
.panel-list .no { color: var(--muted); font-size: 11.5px; text-align: right; }
.panel-list .nm { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-list .sub {
  grid-column: 2 / 4; color: var(--muted); font-size: 11.5px; margin-top: -3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.panel-list .warn-dot {
  min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px;
  background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--warn-line);
}
.panel-list li.project-item .nm { color: var(--brand-dark); }

/* detail */
.detail { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 8px 12px 10px; gap: 8px; }
.detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-id { flex: 1 1 240px; min-width: 0; }
.detail-title, .detail-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-title { font-size: 16px; font-weight: 700; }
.detail-meta { color: var(--muted); font-size: 12.5px; }
.detail-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.btn.icon { width: 32px; padding: 0; color: var(--ink-2); }

/* points to check: one button, the list opens under it */
.checks { position: relative; }
.btn.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.btn.warn:hover { border-color: var(--warn); }
.checks-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 12; width: min(460px, 86vw); max-height: 62vh;
  overflow-y: auto; padding: 12px 14px; background: var(--card); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .18), 0 0 0 1px var(--line);
}
.checks-pop h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); }
.checks-pop .msg-list { margin-bottom: 10px; }
#checks-warn h3 { color: var(--warn); }
.efi-pop { width: min(380px, 86vw); }
.efi-list label { display: flex; gap: 8px; align-items: flex-start; padding: 7px 4px; border-radius: 6px; cursor: pointer;
  font-size: 13px; }
.efi-list label:hover { background: var(--bg, var(--surface-3)); }
.efi-list input { margin-top: 2px; }
.pm-form { display: flex; gap: 8px; }
/* PLGEAR: the CT / VT editor (app.js itxForm) */
.itx-pop { width: min(760px, 94vw); }
.itx-table { width: 100%; border-collapse: collapse; }
.itx-table th { padding: 3px 4px; font-size: 11px; font-weight: 600; color: var(--ink-2); text-align: left; white-space: nowrap; }
.itx-table td { padding: 2px 3px; }
.itx-table input { width: 100%; min-width: 64px; height: 28px; border: 1px solid var(--line); border-radius: 8px; padding: 0 6px;
  font: inherit; font-size: 12px; background: var(--input); color: var(--ink); }
.itx-table input.wide { min-width: 170px; }
.itx-appr { display: flex; gap: 6px; align-items: center; margin: 8px 2px; font-size: 12px; }
.itx-btns { display: flex; gap: 8px; margin-top: 10px; }
.itx-pop h3 + #pgsld-rows, .itx-pop .itx-appr + h3 { margin-top: 10px; }
.sld-kind { border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px 8px; margin: 6px 0 0; }
.sld-kind legend { padding: 0 4px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.sld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.sld-grid label { display: flex; flex-direction: column; gap: 2px; font-size: 10.5px; color: var(--ink-2); }
.sld-grid input { height: 28px; border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; font: inherit;
  font-size: 12px; background: var(--input); color: var(--ink); min-width: 0; }
.itx-pop { max-height: min(78vh, 720px); overflow-y: auto; }
.pgcode-msg { margin: 8px 0 0; font-size: 12px; line-height: 1.35; }
#pgcode-in { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; text-transform: uppercase; letter-spacing: .03em; }
/* control designer: cross-references are links (contact -> coil, coil -> contacts, point -> partner) */
.dz-xref { cursor: pointer; }
.dz-xref:hover text { fill: var(--brand); text-decoration: underline; }
.dz-jump { animation: dzjump 1.4s ease-out; }
@keyframes dzjump { 0%, 40% { filter: drop-shadow(0 0 1.2px #E85C1A) drop-shadow(0 0 1.2px #E85C1A); } 100% { filter: none; } }
/* ring main unit editors (rmu_edit.js): the cards on the left, the redrawn sheet on the right */
.rx-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(380px, 1fr) minmax(0, 1.15fr); gap: 16px;
  padding: 16px; overflow: hidden; }
.rx-body { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }
.rx-preview { min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #FFFFFF; }
.rx-preview img { display: block; width: 100%; height: auto; }
.rx-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px; }
.rx-card h3 { margin: 0; }
.rx-cubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rx-cubhead { display: flex; align-items: center; gap: 8px; }
.rx-cubhead .hint { color: var(--muted); font-size: 12.5px; }
.rx-move { margin-left: auto; display: flex; gap: 4px; }
.rx-cub textarea { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
  background: var(--input); color: var(--ink); resize: vertical; }
.rx-boxbar, .rx-devbar { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; align-items: end; }
.rx-devbar .btn { height: 32px; }
.rx-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.rx-door { width: 100%; height: auto; max-height: 360px; background: #FFFFFF; border-radius: 10px; touch-action: none; }
.rx-door .rx-frame { fill: #FFFFFF; stroke: #111111; stroke-width: 2; vector-effect: non-scaling-stroke; }
.rx-dev { cursor: grab; }
.rx-dev text { text-anchor: middle; dominant-baseline: central; pointer-events: none; font-family: Archivo, Arial, sans-serif; }
.rx-dev .rx-hit { fill: transparent; stroke: none; }
.rx-dev:hover .rx-hit { stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.rx-dev.on .rx-hit { stroke: var(--brand); stroke-width: 2; stroke-dasharray: none; fill: rgba(232, 92, 26, .07); vector-effect: non-scaling-stroke; }
@media (max-width: 900px) { .rx-main { grid-template-columns: 1fr; overflow: auto; } .rx-body { overflow: visible; } }
.pm-form input { flex: 1; min-width: 0; height: 32px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px;
  font: inherit; font-size: 13px; background: var(--input); color: var(--ink); }
.efi-list .muted { display: block; font-size: 11px; }
.dl-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; margin: 0 2px 0 8px; }
.downloads .dl-label { margin-left: 0; align-self: center; }
.btn.accent { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn.accent:hover { background: var(--brand-dark); }
.btn.dashed { border-style: dashed; color: var(--brand-dark); font-weight: 600; background: var(--brand-tint); }

/* sheet strip: every sheet of the set, the one in view highlighted */
.pagebar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.pagebar button {
  flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 4px 10px;
  font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink-2); white-space: nowrap;
}
.pagebar button .n { color: var(--muted); font-size: 11px; margin-right: 6px; }
.pagebar button.active { border-color: var(--brand); color: var(--brand-dark); font-weight: 600; background: var(--brand-tint); }

/* the set as one scrolling document, starting at the cover */
.pages-wrap { position: relative; flex: 1; min-height: 0; }
.pages {
  position: absolute; inset: 0; overflow: auto; border-radius: var(--radius); outline: none;
  background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line); padding: 14px 14px 64px; --z: 1;
}
.page { width: calc((100% - 0px) * var(--z)); max-width: none; margin: 0 auto 22px; }
.page-label { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--muted); margin: 0 2px 5px; }
.page-label .n { font-weight: 700; color: var(--brand-dark); }
.page-sheet {
  position: relative; aspect-ratio: 420 / 297; background: #fff; box-shadow: 0 3px 14px rgba(0,0,0,.13);
  border-radius: 2px; overflow: hidden;
}
.page-sheet svg { display: block; width: 100%; height: 100%; }
.page-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #9CA3AF; font-size: 13px; background: repeating-linear-gradient(45deg, #fff, #fff 12px, #FAFAFB 12px, #FAFAFB 24px);
}
.pages-loading { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 60px 0; color: var(--muted); }
.zoom-ctrl { position: absolute; right: 22px; bottom: 14px; display: flex; gap: 6px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
.msg-list { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--ink-2); }
.msg-list li { margin-bottom: 5px; }
.msg-list.warn li { color: var(--warn); }
.badge { background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 1px 8px; font-size: 11px; text-transform: none; letter-spacing: 0; }
.ovr-form { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.ovr-form label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
.ovr-form select, .ovr-form input {
  width: 100%; min-width: 0;
  height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font: inherit; color: var(--ink); background: var(--card);
}
.ovr-form label { min-width: 0; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.row2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.form-actions { display: flex; gap: 8px; margin-top: 4px; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--carbon); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; box-shadow: var(--shadow); z-index: 20;
}

@media (max-width: 1100px) {
  .downloads .dl-label, body.has-project .brand-text { display: none; }
}
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 56px; flex-wrap: wrap; padding: 8px 16px; }
  .project-bar { flex-basis: 100%; order: 3; flex-wrap: wrap; }
  .project-info { border-left: 0; padding-left: 0; }
  .project-view { height: auto; min-height: calc(100vh - 56px); }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { max-height: 220px; }
  .pages-wrap { min-height: 70vh; }
}

/* ---- control circuit designer ---------------------------------------------------------------- */
.tab-control { border-style: dashed; color: var(--brand-dark); font-weight: 600; background: var(--brand-tint); }
.tab-control:hover { border-color: var(--brand); }
.tab-design { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.tab-design:hover { background: var(--brand-dark); }
body.designing .project-bar, body.designing .workspace { display: none !important; }
.designer { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--canvas); position: relative; }
.dz-top { display: flex; align-items: center; gap: 14px; padding: 6px 12px 0; background: var(--card); }
.dz-tabs { display: flex; gap: 2px; }
.dz-tab {
  border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2);
  padding: 7px 14px 8px; border-radius: 8px 8px 0 0; cursor: pointer;
}
.dz-tab.active { background: var(--surface-2); color: var(--brand-dark); box-shadow: inset 0 3px 0 var(--brand); }
.dz-title { flex: 1; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-title b { color: var(--ink); margin-right: 6px; }
.dz-actions { display: flex; align-items: center; gap: 8px; }
.dz-save { font-size: 12px; color: var(--muted); }
.dz-ribbon {
  display: flex; padding: 6px 8px 0; background: var(--surface-2); border-bottom: 1px solid var(--line);
  overflow-x: auto; overflow-y: hidden; min-height: 84px; flex: none;
}
.dz-group { display: flex; flex-direction: column; padding: 0 8px; border-right: 1px solid var(--line); }
.dz-group:last-child { border-right: 0; }
.dz-btns { display: flex; flex-wrap: nowrap; gap: 2px; align-items: flex-start; min-height: 58px; }
.dz-scol { display: flex; flex-direction: column; gap: 1px; padding-top: 1px; }
.dz-sbtn {
  display: flex; align-items: center; gap: 5px; height: 19px; padding: 0 7px 0 4px; border: 1px solid transparent; border-radius: 5px;
  background: transparent; font: inherit; font-size: 11.5px; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.dz-sbtn .ic { width: 15px; height: 15px; color: var(--ink-2); flex: none; }
.dz-sbtn:hover { background: var(--card); border-color: var(--line); }
.dz-sbtn.active { background: var(--brand-soft); border-color: var(--brand-line); }
.dz-sbtn.on .ic { color: var(--brand); }
.dz-sbtn:disabled { opacity: .35; pointer-events: none; }
.dz-gname { font-size: 10.5px; color: var(--muted-2); text-align: center; padding: 3px 0 5px; letter-spacing: .3px; text-transform: uppercase; }
.dz-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 56px; height: 54px; padding: 3px 6px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; font: inherit; font-size: 11px; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.dz-btn .ic { width: 22px; height: 22px; color: var(--ink-2); }
.dz-btn:hover { background: var(--card); border-color: var(--line); }
.dz-btn.active { background: var(--brand-soft); border-color: var(--brand-line); }
.dz-btn.on .ic { color: var(--brand); }
.dz-btn.on { box-shadow: inset 0 -2px 0 var(--brand); }
.dz-btn:disabled { opacity: .35; pointer-events: none; }
/* one panel on the left (ready circuits, devices, symbols); the drawing gets the rest */
.dz-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 264px 1fr; }
.designer.no-lib .dz-body { grid-template-columns: 0 1fr; }
.designer.no-lib .dz-lib { display: none; }
.dz-lib { grid-column: 1; } .dz-main { grid-column: 2; }
.dz-lib { background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.dz-libhead { padding: 10px; border-bottom: 1px solid var(--line); }
.dz-libhead input { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; }
.dz-libbody { overflow-y: auto; padding: 4px 8px 16px; }
.dz-cat summary { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); padding: 9px 2px 6px; cursor: pointer; }
.dz-cat summary:hover { color: var(--brand-dark); }
.dz-count {
  display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--surface-3);
  color: var(--ink-2); font-size: 10.5px; letter-spacing: 0; text-align: center;
}
.dz-warnc {
  display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--warn-bg); border: 1px solid var(--warn-line);
  color: var(--warn); font-size: 10.5px; letter-spacing: 0;
}
#dz-devbody { display: flex; flex-direction: column; gap: 6px; padding: 0 2px 8px; }
.dz-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.dz-tile {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 3px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--card); cursor: grab; font: inherit; font-size: 10px; color: var(--ink-2); line-height: 1.15;
}
.dz-tile:hover { border-color: var(--brand); background: var(--brand-tint); }
.dz-thumb { width: 54px; height: 38px; }
.dz-tile span { text-align: center; }
.dz-macro {
  display: flex; flex-direction: column; width: 100%; text-align: left; gap: 2px; margin-bottom: 5px; padding: 7px 9px;
  border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 7px; background: var(--card); cursor: pointer; font: inherit;
}
.dz-macro b { font-size: 12.5px; }
.dz-macro span { font-size: 11px; color: var(--muted); }
.dz-macro:hover { background: var(--brand-tint); }
.dz-empty { color: var(--muted); font-size: 12px; padding: 12px 4px; }
.dz-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.dz-canvas { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #E6E8EC; cursor: default; }
.dz-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; }
.dz-canvas:not([data-tool="select"]):not([data-tool="sim"]) { cursor: crosshair; }
.dz-canvas[data-tool="select"] .sym, .dz-canvas[data-tool="select"] .wire, .dz-canvas[data-tool="select"] .txt,
.dz-canvas[data-tool="select"] .gfx { cursor: move; }
.dz-canvas[data-tool="sim"] .sym.interactive { cursor: pointer; }
.dz-canvas[data-tool="sim"] .sym.interactive:hover .hit { fill: rgba(232, 92, 26, 0.10); }
.dz-pages { display: flex; gap: 4px; padding: 6px 10px; background: var(--card); border-top: 1px solid var(--line); overflow-x: auto; }
.dz-page { border: 1px solid var(--line); background: var(--card); border-radius: 7px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.dz-page.active { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-tint); }
.dz-page.add { font-weight: 700; color: var(--brand-dark); }
/* properties window over the drawing (EPLAN "Properties"): double-click, Enter or Start > Properties */
.dz-props {
  position: absolute; top: 10px; right: 12px; z-index: 6; width: 300px; max-height: calc(100% - 60px); overflow-y: auto;
  padding: 6px; background: var(--bg); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .2), 0 0 0 1px var(--line);
}
.dz-props .dz-card { box-shadow: none; }
.dz-props .dz-card h4 { padding-right: 24px; }
.dz-x {
  position: absolute; top: 9px; right: 10px; z-index: 1; border: 0; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--muted);
}
.dz-x:hover { color: var(--ink); }
.dz-helppop {
  position: absolute; top: 10px; right: 12px; z-index: 7; width: 380px; max-width: calc(100% - 24px); padding: 14px 18px;
  background: var(--card); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .2), 0 0 0 1px var(--line);
}
.dz-helppop .dz-help { font-size: 12.5px; }
.dz-emptyhint {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 440px; padding: 14px 20px; text-align: center;
  background: rgba(255, 255, 255, .94); border: 1px dashed #D3D7DE; border-radius: 12px; color: #3A3A3A; font-size: 12.5px;
}
.dz-emptyhint b { color: #111111; font-size: 14px; }
.dz-emptyhint kbd { border: 1px solid #D5D9E0; border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; font-size: 10.5px; background: #fff; }
.dz-card { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: 11px 12px; display: flex; flex-direction: column; gap: 8px; }
.dz-card h4 { margin: 0; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.dz-f { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.dz-f input, .dz-f select, .dz-f textarea {
  width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 13px; color: var(--ink); background: var(--card);
}
.dz-f input, .dz-f select { height: 30px; }
.dz-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dz-pins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.dz-pins input { height: 28px; padding: 2px 6px; text-align: center; }
.dz-row { display: flex; flex-wrap: wrap; gap: 6px; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger-line); background: var(--danger-bg); }
.dz-xy { font-size: 11.5px; color: var(--muted); }
.dz-switch { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.dz-switch input { width: 16px; height: 16px; accent-color: var(--brand); }
.dz-refs { display: flex; flex-wrap: wrap; gap: 4px; }
.dz-ref, .dz-dev {
  border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 3px 7px; font: inherit; font-size: 12px; cursor: pointer; color: var(--ink);
}
.dz-ref span { color: var(--muted); }
.dz-ref:hover, .dz-dev:hover { border-color: var(--brand); }
.dz-devs { display: flex; flex-direction: column; gap: 3px; }
.dz-dev { display: flex; gap: 8px; align-items: baseline; text-align: left; }
.dz-dev b { min-width: 46px; color: var(--brand-dark); }
.dz-dev span { color: var(--muted); font-size: 11.5px; }
.dz-issues { margin: 0; padding-left: 16px; font-size: 12px; color: var(--warn); }
.dz-issues li { margin-bottom: 3px; }
.dz-ok { font-size: 12px; color: var(--ok); }
.dz-help { font-size: 11.5px; color: var(--ink-2); line-height: 1.5; }
.dz-help ol { margin: 4px 0 6px; padding-left: 18px; }
.dz-help kbd { border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; font-size: 10.5px; background: var(--card); }
.dz-help i { display: inline-block; width: 10px; height: 4px; border-radius: 2px; margin: 0 3px 0 6px; vertical-align: middle; }
.dz-simrow { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
b.on { color: var(--ok); }
b.bad { color: var(--danger); }
.dz-status {
  display: flex; gap: 16px; align-items: center; height: 28px; padding: 0 12px; background: var(--card); border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden;
}
.dz-status .dz-pos { font-variant-numeric: tabular-nums; min-width: 190px; }
.dz-status .dz-hint { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.designer.simulating .dz-canvas { background: #E3E7EE; }
.dz-flow { animation: dzflow .5s linear infinite; }
@keyframes dzflow { to { stroke-dashoffset: -2.4; } }
.dz-rotor { animation: dzspin 1.1s linear infinite; }
.dz-rotor.ccw { animation-direction: reverse; }
@keyframes dzspin { to { transform: rotate(360deg); } }
.dz-blink { animation: dzblink 1s steps(2, start) infinite; }
@keyframes dzblink { to { visibility: hidden; } }
.dz-glow { filter: blur(1.2px); }
.sym.tripped .hit { fill: rgba(185, 28, 28, 0.08); }
@media (max-width: 1200px) {
  .dz-body { grid-template-columns: 224px 1fr; }
}

/* ---- layout editor --------------------------------------------------------------------------- */
body.laying .project-bar, body.laying .workspace { display: none !important; }
.lx { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--canvas); }
.lx-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 14px; background: var(--card);
  border-bottom: 1px solid var(--line);
}
.lx-title { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.lx-scale { color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lx-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.lx-gridsel { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.lx-gridsel select { height: 28px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 12.5px; }
.lx-save { font-size: 12px; color: var(--muted); min-width: 110px; text-align: right; }
.lx-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 252px 1fr; }
/* (2026-11-23) the editing toolbar, EPLAN-like: one compact icon row */
.lx-edit { display: flex; align-items: center; gap: 1px; padding: 3px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.lx-edit button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); cursor: pointer; }
.lx-edit button svg { width: 18px; height: 18px; }
.lx-edit button:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.lx-edit button:disabled { opacity: .32; cursor: default; }
.lx-edit button[aria-pressed="true"] { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.lx-tsep { width: 1px; height: 18px; margin: 0 6px; background: var(--line); }
/* (2026-11-23, "maximize the central drawing canvas") the panel folds away; the toolbar's captions give way to tooltips */
body.lx-side-folded .lx-body { grid-template-columns: 1fr; }
body.lx-side-folded .lx-side { display: none; }
.lx-fold { float: right; margin: 4px -4px 0 0; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.lx-fold:hover, .lx-unfold:hover { background: var(--surface-2); color: var(--ink); }
.lx-unfold { position: absolute; left: 40px; top: 8px; z-index: 3; width: 26px; height: 26px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--card); color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.lx-unfold[hidden] { display: none; }
.lx-bar .tb-label { display: none; }
.lx-sec[hidden] { display: none; }
.lx-canvas { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
#lx-svg { position: absolute; inset: 0 0 28px 0; width: 100%; height: calc(100% - 28px); background: #fff; touch-action: none; cursor: default; }
.lx-status {
  position: absolute; left: 0; right: 0; bottom: 0; height: 28px; display: flex; gap: 16px; align-items: center;
  padding: 0 12px; font-size: 11.5px; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--line);
  white-space: nowrap; overflow: hidden;
}
#lx-pos { color: var(--ink); font-weight: 600; min-width: 190px; }
.lx-item { cursor: grab; }
.lx-item .lx-hit { fill: rgba(0, 0, 0, 0); stroke: none; }
.lx-item:hover .lx-hit { fill: rgba(232, 92, 26, .07); stroke: rgba(232, 92, 26, .45); stroke-width: .25; }
.lx-item.moved .lx-hit { fill: rgba(232, 92, 26, .05); }
.lx-item.sel .lx-hit { fill: rgba(232, 92, 26, .12); }
.lx-item.bad .lx-hit { fill: rgba(185, 28, 28, .16); stroke: #B91C1C; stroke-width: .35; }
#lx-sel rect { fill: none; stroke: var(--brand); stroke-width: .35; stroke-dasharray: 1.2 .8; pointer-events: none; }
#lx-sel rect.lx-band { fill: rgba(232, 92, 26, .06); stroke-dasharray: none; stroke-width: .25; }
.lx-side { border-right: 1px solid var(--line); background: var(--card); overflow-y: auto; padding: 2px 10px 16px; }
.lx-side h4 { margin: 0 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.lx-unit, .lx-kind { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; font-size: 11.5px; }
.lx-side label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.lx-side input { height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font: inherit; color: var(--ink); width: 100%; }
.lx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lx-widths { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.lx-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lx-hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.lx-man { color: var(--brand-dark); }
.lx-desc { font-size: 12px; color: var(--ink-2); margin: -4px 0 8px; }
.lx-issue { font-size: 12px; color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger-line); border-radius: 6px; padding: 5px 8px; margin-top: 8px; }
.lx-align { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.lx-list { display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow-y: auto; }
.lx-list button {
  display: flex; justify-content: space-between; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 6px;
  padding: 4px 8px; font: inherit; font-size: 12px; cursor: pointer; text-align: left;
}
.lx-list button span { color: var(--muted); }
.lx-list button.bad { border-color: var(--danger-line); background: var(--danger-bg); }
/* (2026-11-23) the layout editor's guide warnings, its hidden items and the lock */
.lx-list button.warn { border-color: color-mix(in srgb, #F59E0B 55%, var(--line)); background: color-mix(in srgb, #F59E0B 8%, var(--card)); }
.lx-list button.warn span { color: var(--ink-2); }
.lx-hrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 12px; }
.lx-hrow > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.lx-hrow b { color: var(--ink); font-weight: 600; }
.lx-lock { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; }
/* adjust design: the guide rules run again for this panel */
/* working bar sections (library, this panel, size, adjust design, re-arranged) */
.lx-sec { border-bottom: 1px solid var(--line); }
.lx-sec > summary {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); padding: 10px 2px 8px;
  cursor: pointer; display: list-item;
}
.lx-sec > summary:hover { color: var(--brand-dark); }
.lx-sec > summary .lx-unit { margin-left: 4px; }
.lx-sec[open] { padding-bottom: 10px; }
.lx-design > .lx-hint { margin: 0 0 8px; }
.lx-libnav { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.lx-libnav .btn.icon { width: 26px; height: 26px; font-size: 16px; }
.lx-crumb { display: flex; flex-wrap: wrap; gap: 2px; font-size: 12px; min-width: 0; }
.lx-crumb button { border: 0; background: transparent; padding: 2px 3px; font: inherit; color: var(--brand-dark); cursor: pointer; border-radius: 4px; }
.lx-crumb button:hover { background: var(--brand-soft); }
.lx-crumb button:last-child { color: var(--ink); font-weight: 700; cursor: default; background: transparent; }
.lx-crumb span { color: var(--muted-2); }
.lx-libq { width: 100%; height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; font: inherit; font-size: 12.5px; margin-bottom: 8px; }
.lx-lib { display: flex; flex-direction: column; gap: 4px; }
.lx-folder {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--card); font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left;
}
.lx-folder:hover { border-color: var(--brand); background: var(--brand-tint); }
.lx-folder span { color: var(--muted); font-weight: 400; font-size: 11.5px; white-space: nowrap; }
.lx-folder::after { content: "\203A"; color: var(--muted); font-size: 16px; margin-left: 2px; }
.lx-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.lx-tile {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 6px 7px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); cursor: grab; text-align: center; font-size: 11px; color: var(--muted); line-height: 1.25; user-select: none;
}
.lx-tile:hover { border-color: var(--brand); background: var(--brand-tint); }
.lx-tile b { font-size: 12px; color: var(--ink); }
.lx-tile .lx-thumb { width: 100%; height: 64px; display: flex; align-items: center; justify-content: center; }
.lx-tile .lx-thumb svg { max-width: 100%; max-height: 100%; }
.lx-tile.enc { cursor: pointer; }
.lx-devs { display: flex; flex-direction: column; gap: 3px; }
.lx-devs .sx-group { padding-top: 4px; }
.lx-devs button {
  display: flex; justify-content: space-between; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 7px; padding: 4px 8px;
  font: inherit; font-size: 12px; cursor: pointer; text-align: left;
}
.lx-devs button:hover { border-color: var(--brand); }
.lx-devs button.sel { border-color: var(--brand); background: var(--brand-tint); }
.lx-devs button span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-props { top: 10px; right: 12px; width: 290px; max-height: calc(100% - 50px); }
#lx-conn.dim { opacity: .2; }
#lx-live .lx-magnet { fill: rgba(232, 92, 26, .10); stroke: var(--brand); stroke-width: .5; }
#lx-live .lx-ghost { fill: rgba(232, 92, 26, .08); stroke: var(--brand); stroke-width: .35; stroke-dasharray: 1.2 .8; }
#lx-live .lx-rail { stroke: var(--brand); stroke-width: .6; stroke-dasharray: 1.5 1; }
.ovr-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); margin: 4px 0 -4px; }
.ovr-guide { margin: 8px 0 2px; display: grid; gap: 5px; }
.ovr-guide .ovr-cov { font-size: 11.5px; color: var(--ok, #2e7d32); }
.ovr-guide .ovr-nocov { font-size: 11.5px; color: var(--bad, #b23b3b); line-height: 1.4; }
.ovr-guide .ovr-rec { font-size: 11.5px; color: var(--ink-2); line-height: 1.4; border-left: 2px solid var(--brand);
  padding-left: 7px; }
@media (max-width: 1100px) { .lx-body { grid-template-columns: 250px 1fr; } }

/* ---- design views of the selected panel (top bar) ----------------------------------------------------- */
.modes { display: flex; align-items: center; gap: 10px; flex: none; }
.modes-name { font-weight: 700; font-size: 13.5px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modes-name:empty { display: none; }
.modes-tabs { display: flex; gap: 2px; background: var(--surface-3); border-radius: 10px; padding: 3px; }
.modes-tabs button {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; border-radius: 8px; padding: 6px 14px;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; position: relative;
}
.modes-tabs button svg { width: 17px; height: 17px; flex: none; }
.modes-tabs button:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.modes-tabs button.active { background: var(--card); color: var(--brand-dark); box-shadow: var(--shadow); }
.modes-tabs button.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--brand);
}
.modes-tabs button:disabled { opacity: .4; cursor: default; }
.modes-name b { color: var(--muted); font-weight: 600; margin-right: 4px; }
/* the panel name is in the top bar: the design views do not repeat it */
#lx-name, #sx-name { display: none; }
body.laying .project-bar, body.designing .project-bar, body.sld-ing .project-bar { display: none !important; }
body.laying .top-actions, body.designing .top-actions, body.sld-ing .top-actions { display: none; }
body.laying .modes, body.designing .modes, body.sld-ing .modes { flex: 1; }
body.sld-ing .workspace { display: none !important; }
.add-panel { margin: 4px 12px 12px; }

/* panel list as a drawer while a design view is open */
.panel-drawer {
  position: fixed; left: 0; top: 56px; bottom: 0; width: 290px; z-index: 30; display: flex; flex-direction: column;
  background: var(--card); box-shadow: 8px 0 28px rgba(0, 0, 0, .16);
}
.panel-drawer .sidebar { border-right: 0; flex: 1; min-height: 0; }

/* ---- wizard (new project / new panel) ----------------------------------------------------------------- */
.wiz-back { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px; background: rgba(17, 17, 17, .38); overflow-y: auto; }
.wiz { width: min(820px, 100%); background: var(--bg); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); display: flex; flex-direction: column; }
.wiz-head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--card); border-radius: 16px 16px 0 0; border-bottom: 1px solid var(--line); }
.wiz-head > b { font-size: 17px; }
.wiz-steps { display: flex; gap: 6px; margin: 0 auto 0 8px; padding: 0; list-style: none; counter-reset: st; }
.wiz-steps li { counter-increment: st; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.wiz-steps li::before {
  content: counter(st); width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--ink-2); font-size: 11px; font-weight: 700;
}
.wiz-steps li.on { color: var(--ink); font-weight: 700; }
.wiz-steps li.on::before, .wiz-steps li.done::before { background: var(--brand); color: #fff; }
.wiz-steps li + li::after { content: none; }
.wiz-x { border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.wiz-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; max-height: 66vh; overflow-y: auto; }
.wiz-foot { display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: var(--card); border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }
.wiz-msg { margin-right: auto; color: var(--danger); font-size: 12.5px; }
.wiz-card { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.wiz-card h3 { margin: 0; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.wiz-card h3 .hint { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.wf { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.wf.req span::after { content: " *"; color: var(--brand); }
/* the Project step: the sales order with Fill from ERPNext, the notes (2026-11-12) */
.wso { display: flex; gap: 6px; align-items: stretch; }
.wso input { flex: 1; min-width: 0; }
.wso .btn { white-space: nowrap; }
.wf.wso-f { grid-column: span 2; }
.wso-msg { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); min-height: 1em; }
.wso-msg:empty { display: none; }
.wf.wnotes { margin-top: 10px; }
.wf.wnotes textarea { min-height: 64px; resize: vertical; font-family: inherit; font-size: 13px; line-height: 1.45; }
.wf .hint { font-weight: 400; color: var(--muted); }
.wf input, .wf select, .wrow input, .wrow select {
  height: 32px; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; font: inherit; font-size: 13px; color: var(--ink); background: var(--card); min-width: 0; width: 100%;
}
.wf input:focus, .wf select:focus, .wrow input:focus, .wrow select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.wchecks { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.wcode { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px;
  background: var(--brand-tint); border: 1px solid var(--brand-line); }
.wcode b { font-size: 17px; font-weight: 800; letter-spacing: .02em; color: var(--ink); }
.wcode .hint { color: var(--muted); font-size: 12.5px; }
.wf .hint { color: var(--muted); font-weight: 400; }
/* the first answers of a new item as cards: LV / MV, then the MV equipment (RMU, dry-type transformer, PCSS) */
.wchoice { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.wchoice button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px;
  text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink);
  font: inherit; cursor: pointer; }
.wchoice button b { font-size: 15px; font-weight: 800; }
.wchoice button span { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.wchoice button:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-tint); }
.wchoice button:focus-visible { outline: 2px solid var(--brand-soft-2); outline-offset: 1px; }
.wchoice button:disabled { opacity: .55; cursor: not-allowed; }
/* the kind of item at the top of every step, as buttons: system voltage, MV equipment */
.wkinds { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 10px 16px; align-items: end; }
@media (max-width: 760px) { .wkinds { grid-template-columns: 1fr; } }
.wkinds .wtr-lab { margin-bottom: 5px; }
.wkind button { padding: 7px 10px; font-size: 12.5px; }
.wkind button small { font-size: 10.5px; }
.wkind-crumb { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted, #6b6b6b); margin: -2px 0 12px; }
.wkind-crumb b { color: var(--ink, #1a1a1a); font-weight: 600; }
.wkind button:disabled { opacity: .55; cursor: not-allowed; }
/* a dry-type transformer: the PDTR selector's choices beside its item code and data sheet values */
.wtr { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 760px) { .wtr { grid-template-columns: 1fr; } }
.wtr-lab { display: block; margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); }
.wtr-pick { display: flex; flex-direction: column; }
.wtr-pick .wseg, .wtr-pick .wchips { margin-bottom: 12px; }
.wseg { display: flex; gap: 6px; }
.wseg button, .wchips button { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 10px;
  font: inherit; font-weight: 700; cursor: pointer; }
.wseg button { flex: 1 1 0; padding: 8px 10px; font-size: 13px; text-align: center; }
.wchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.wchips button { position: relative; padding: 7px 4px; font-size: 13px; }
.wseg button small, .wchips button small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.wchips button.nodraw::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--warn); }
.wseg button:hover, .wchips button:hover { border-color: var(--brand-line); }
.wseg button.on, .wchips button.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.wseg button.on small, .wchips button.on small { color: rgba(255, 255, 255, .86); }
.wchips button.on.nodraw::after { background: #fff; }
.wseg button:focus-visible, .wchips button:focus-visible { outline: 2px solid var(--brand-soft-2); outline-offset: 1px; }
.wtr-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px 14px; border-radius: 12px;
  background: var(--brand-tint); border: 1px solid var(--brand-line); }
.wtr-code { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; }
.wtr-code > div { display: flex; flex-direction: column; min-width: 0; }
.wtr-code b { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -.01em; color: var(--ink); }
.wtr-code .acc b { color: var(--brand); }
.wtr-code i { height: 3px; margin-top: 5px; border-radius: 2px; background: var(--ink); }
.wtr-code .acc i { background: var(--brand); }
.wtr-code .dim i { background: var(--line-strong); }
.wtr-code span { margin-top: 5px; font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.wtr-key { display: flex; align-items: center; gap: 6px; margin: -6px 0 12px; font-size: 11.5px; color: var(--muted); }
.wtr-key i { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.wtr-code em { font-size: 12px; font-style: normal; font-weight: 600; color: var(--ink-2); }
.wtr-title b { display: block; font-size: 16px; font-weight: 800; color: var(--ink); }
.wtr-title span { font-size: 12.5px; font-weight: 600; color: var(--brand-dark); }
.wtr-spec { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.wtr-spec td { padding: 4px 6px; border-top: 1px solid var(--line); }
.wtr-spec td:first-child { width: 50%; color: var(--muted); }
.wtr-spec td:last-child { text-align: right; font-weight: 600; color: var(--ink); }
.wtr-sheets { font-size: 12.5px; color: var(--ink-2); }
.wtr-sheets .wtr-lab { display: inline; margin: 0 6px 0 0; }
.wtr-warn { margin: 0; padding: 8px 10px; border-radius: 9px; background: var(--warn-bg); border: 1px solid var(--warn-line);
  color: var(--warn); font-size: 12.5px; font-weight: 600; }
.wtr-help { font-size: 12.5px; color: var(--ink-2); }
.wtr-help summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.wtr-help ol { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 0; padding-left: 20px; }
/* PLGEAR switchgear (wizard.js pgStep): the selector's choices, the code in its coloured segments, a line-up strip */
.wpg .wtr-lab .hint { margin-left: 4px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.wpg-code { display: flex; gap: 6px; margin-bottom: 6px; }
.wpg-code input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px; letter-spacing: .03em; text-transform: uppercase; }
.wpg-msg { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.wpg-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.wpg-togs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
@media (max-width: 760px) { .wpg-togs, .wpg-nums { grid-template-columns: 1fr; } }
.wpg-tog { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.wpg-tog:hover { border-color: var(--brand-line); }
.wpg-tog.on { border-color: var(--brand); background: var(--brand-tint); }
.wpg-tog.off { opacity: .55; cursor: not-allowed; }
.wpg-tog input { accent-color: var(--brand); width: 15px; height: 15px; margin: 2px 0 0; flex: none; }
.wpg-tog b { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.wpg-tog small { display: block; font-size: 11px; color: var(--muted); }
.wpg-dc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 10px;
  border-radius: 9px; background: var(--warn-bg); border: 1px solid var(--warn-line); font-size: 12.5px; font-weight: 600; }
.wpg-dc span { flex: 1 1 200px; }
.wpg-segs { display: flex; flex-wrap: wrap; gap: 4px; }
.wpg-segs > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wpg-segs b { padding: 3px 7px; border-radius: 6px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 19px; font-weight: 800; line-height: 1.1; }
.wpg-segs span { font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.wpg-strip { display: flex; align-items: flex-end; gap: 1px; height: 74px; padding: 4px; border-radius: 8px;
  background: #fff; border: 1px solid var(--line); overflow: hidden; }
.wpg-strip i { display: flex; align-items: flex-end; justify-content: center; min-width: 0; border: 1px solid; border-radius: 2px;
  font-style: normal; font-size: 9px; font-weight: 800; overflow: hidden; white-space: nowrap; }
.wpg-strip i span { padding-bottom: 2px; overflow: hidden; text-overflow: clip; }
.wpg-help td:first-child { width: 22%; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.wpg-help td:last-child { text-align: left; font-weight: 400; }
.wchecks label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.wchecks input { accent-color: var(--brand); width: 15px; height: 15px; }
.wrows { display: flex; flex-direction: column; gap: 6px; }
.wrow { display: grid; grid-template-columns: 64px 1.3fr 1fr 74px 1.4fr 30px; gap: 6px; align-items: center; }
.wrow.head { font-size: 11.5px; color: var(--muted); }
.wrow button.x { border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.wrow button.x:hover { color: var(--danger); }
.wpanels { display: flex; flex-wrap: wrap; gap: 6px; }
.wpanels button { border: 1px solid var(--line); border-radius: 999px; background: var(--card); padding: 3px 12px; font: inherit; font-size: 12.5px; cursor: pointer; }
.wpanels button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.wsum { font-size: 13px; color: var(--ink-2); }
.wsum table { width: 100%; border-collapse: collapse; }
.wsum td { padding: 5px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.wsum td:first-child { font-weight: 700; width: 26%; }

/* ---- SLD editor ------------------------------------------------------------------------------------------ */
.sx { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--canvas); }
.sx-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px 1fr; }
.sx-side { background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; padding: 4px 10px 16px; }
.sx-main { position: relative; min-width: 0; min-height: 0; }
.sx-pages { position: absolute; inset: 0; overflow: auto; padding: 14px 16px 40px; --z: 1; }
.sx-page { width: calc(100% * var(--z)); margin: 0 auto 18px; position: relative; aspect-ratio: 420 / 297; background: #fff; box-shadow: 0 3px 14px rgba(0, 0, 0, .13); border-radius: 2px; }
.sx-page > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sx-page .sx-hit rect { fill: transparent; cursor: pointer; }
.sx-page .sx-hit rect:hover { fill: rgba(232, 92, 26, .06); }
.sx-page .sx-hit rect.sel { fill: rgba(232, 92, 26, .12); stroke: var(--brand); stroke-width: .35; stroke-dasharray: 1.2 .8; }
.sx-empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.sx-sec { border-bottom: 1px solid var(--line); }
.sx-sec > summary { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); padding: 10px 2px 8px; cursor: pointer; }
.sx-sec > summary:hover { color: var(--brand-dark); }
.sx-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 2px 12px; }
.sx-form .wf.wide { grid-column: 1 / 3; }
.sx-list { display: flex; flex-direction: column; gap: 3px; padding: 0 0 10px; }
.sx-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted-2); padding: 6px 2px 2px; }
.sx-row {
  display: grid; grid-template-columns: 1fr auto; gap: 1px 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); cursor: pointer; text-align: left; font: inherit; color: var(--ink);
}
.sx-row:hover { border-color: var(--brand-line); }
.sx-row.sel { border-color: var(--brand); background: var(--brand-tint); }
.sx-row.bad { border-color: var(--danger-line); background: var(--danger-bg); }
.sx-row b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-row .q { font-size: 11.5px; color: var(--brand-dark); font-weight: 700; }
.sx-row span { grid-column: 1 / 3; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-lib { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 0 0 12px; }
.sx-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--card); font: inherit; font-size: 11px; color: var(--ink-2); cursor: pointer; text-align: center; line-height: 1.2;
}
.sx-tile:hover { border-color: var(--brand); background: var(--brand-tint); }
.sx-tile svg { width: 34px; height: 34px; color: var(--ink); }
.sx-tile b { font-size: 12px; color: var(--ink); }
.sx-note { font-size: 11.5px; color: var(--muted); padding: 2px 2px 10px; line-height: 1.45; }
.sx-warn { font-size: 12px; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 6px 9px; margin: 0 0 10px; }
@media (max-width: 1100px) { .sx-body { grid-template-columns: 250px 1fr; } }
.lx-props label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.lx-props input { height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font: inherit; color: var(--ink); width: 100%; min-width: 0; }
.lx-props .dz-card { gap: 8px; }
.lx-status #lx-pos { flex: none; min-width: 0; }
.lx-status > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---- right-click menus ------------------------------------------------------------------------------------ */
.ctx {
  position: fixed; z-index: 80; min-width: 210px; max-width: 320px; padding: 5px; background: var(--card); border-radius: 10px;
  box-shadow: 0 14px 36px rgba(16, 24, 40, .22), 0 0 0 1px var(--line); animation: ctxin .08s ease-out;
}
@keyframes ctxin { from { opacity: 0; transform: translateY(-2px); } }
.ctx-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: 0; border-radius: 7px; background: transparent;
  font: inherit; font-size: 13px; color: var(--ink); text-align: left; cursor: pointer;
}
.ctx-item span { flex: 1; }
.ctx-item:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand-dark); }
.ctx-item:disabled { color: var(--muted-2); cursor: default; }
.ctx-item.danger { color: var(--danger); }
.ctx-item.danger:hover { background: var(--danger-bg); color: var(--danger); }
.ctx-item kbd { font: inherit; font-size: 11px; color: var(--muted); }
.ctx-more { color: var(--muted); font-weight: 400; }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 6px; }

/* ---- design mode ---------------------------------------------------------------------------------------- */
#btn-design { font-weight: 700; }
.busy { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 90; overflow: hidden; background: rgba(232, 92, 26, .15); }
.busy::after { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; background: var(--brand); animation: busy 1s ease-in-out infinite; }
@keyframes busy { from { left: -35%; } to { left: 100%; } }
.sx:not([hidden]), .lx:not([hidden]), .designer:not([hidden]) { animation: viewin .14s ease-out; }
@keyframes viewin { from { opacity: .35; } }
.sx-row.sub { margin-left: 16px; padding: 4px 8px; background: var(--surface-2); }
.sx-row.sub b { font-weight: 600; font-size: 12px; }
.sx-row.sub::before { content: "\2514"; position: absolute; margin-left: -14px; color: var(--muted); }
.sx-row { position: relative; }
.sx-page .sx-hit rect.drop { fill: rgba(232, 92, 26, .2); stroke: var(--brand); stroke-width: .5; }
.sx-tile[draggable=true] { cursor: grab; }

/* ---------------------------------------------------------------- sign in with ERPNext (auth.js) */
.user-chip { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; }
.user-name { font-size: 12.5px; font-weight: 600; color: var(--ink); max-width: 200px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.signin { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: var(--bg); }
.signin[hidden] { display: none; }
body:has(.signin:not([hidden])) { overflow: hidden; }
.signin-card { width: 100%; max-width: 400px; padding: 32px 30px 28px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--card); box-shadow: var(--shadow); text-align: center; }
.signin-card .logo { width: 190px; height: auto; }
.signin-card h1 { margin: 12px 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.2px; }
.signin-card p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.signin-card .signin-error { padding: 9px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn);
  text-align: left; }
/* a full-width button: the general .btn height (34 px) would push the text off centre */
.signin-go { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 44px;
  padding: 0 16px; font-size: 15px; font-weight: 700; line-height: 1; text-decoration: none; }

/* ---------------------------------------------------------------- the sign-in page: the email form, then any other way in */
.signin { overflow: auto; }
.signin-card { max-width: 440px; }
.signin-ways { display: grid; gap: 10px; }
.signin-go span { font-weight: 500; opacity: .85; font-size: 13px; }
.signin-email { display: grid; gap: 10px; }
.signin-email input { height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: inherit;
  font-size: 15px; text-align: center; }
.signin-email input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232, 92, 26, .15); }

/* ---------------------------------------------------------------- the whole app: modern skin on the theme tokens */
body { transition: background-color .2s ease, color .2s ease; }
.logo .logo-ink { fill: var(--ink); }
.topbar { border-bottom: 1px solid var(--line); z-index: 5; }
.btn { border-radius: 10px; }
.btn.small { border-radius: 9px; }
.btn:focus-visible, .chip:focus-visible, .seg button:focus-visible { outline: 3px solid var(--brand-soft-2); outline-offset: 1px; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; }   /* (2026-11-21) never wider than the screen */
.theme-btn { width: 34px; padding: 0; color: var(--ink-2); }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: inline; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
.user-chip { gap: 8px; padding: 3px 4px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.avatar {
  display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; flex: none; border-radius: 50%;
  background: var(--carbon); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
}
:root[data-theme="dark"] .avatar { background: var(--brand); }
.user-chip .btn { height: 28px; border-radius: 999px; }
.sidebar input[type=search], .lx-libq, .dz-libhead input, .lx-gridsel select { background: var(--input); color: var(--ink); }
.card, .dz-card, .wiz-card { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: none; }
.checks-pop, .ctx, .dz-props, .dz-helppop { border-radius: var(--radius); box-shadow: var(--pop-shadow), 0 0 0 1px var(--line); }
.wiz { border-radius: var(--radius-lg); }
.wiz-head { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.wiz-foot { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.wiz-head, .wiz-foot, .dz-top { background: var(--card); }
.panel-drawer { background: var(--card); }
.panel-list li { border-radius: 10px; }
.pages { border-radius: var(--radius); }
.home-recent { margin: 0; }
/* the Carbon theme: what the tokens do not reach */
:root[data-theme="dark"] .toast { background: #262626; box-shadow: var(--pop-shadow), 0 0 0 1px var(--line-strong); }
:root[data-theme="dark"] .wiz-back { background: rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .modes-tabs button:hover { background: rgba(255, 255, 255, .06); }
:root[data-theme="dark"] .dz-canvas { background: #2A2A2A; }
:root[data-theme="dark"] #lx-svg { background: #FFFFFF; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* no team projects: my projects take the row */
.bento:has(.tile-team[hidden]) .tile-mine { grid-column: 1 / -1; }
/* (2026-11-21: "I need to minimize the section") My projects minimized: its title on one slim row, the team's
   workflow the whole row under it */
.tile-min { flex: none; width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card); color: var(--muted); cursor: pointer; padding: 0; }
.tile-min:hover { color: var(--ink); border-color: var(--line-strong, var(--line)); }
.tile-min:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.tile-min svg { transition: transform .15s ease; }
.tile-mine.min { grid-column: 1 / -1; padding-top: 12px; padding-bottom: 12px; }
.tile-mine.min .tile-head { margin-bottom: 0; }
.tile-mine.min .tile-min svg { transform: rotate(180deg); }
.tile-mine.min .mine-body, .tile-mine.min .mine-view, .tile-mine.min .mine-search, .tile-mine.min #mine-filter { display: none; }
.bento:has(.tile-mine.min) .tile-team { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .top-actions { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
  .user-name { display: none; }
  .brand-text { display: none; }
}
/* symbol thumbnails are drawings (black on paper): a paper ground in the Carbon theme */
:root[data-theme="dark"] .dz-thumb, :root[data-theme="dark"] .lx-tile .lx-thumb { background: #F4F4F4; border-radius: 6px; }

/* ---------------------------------------------------------------- one request for design: its drawing register (view only) */
.rfd-dialog {
  width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); color: var(--ink);
  box-shadow: var(--pop-shadow);
}
.rfd-dialog::backdrop { background: rgba(17, 17, 17, .45); }
.rfd-head { display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px 8px; }
.rfd-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rfd-heading h2 { margin: 2px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.rfd-sub { color: var(--muted); font-size: 14px; }
.rfd-head .btn.icon { font-size: 20px; line-height: 1; width: 34px; padding: 0; }
.rfd-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 20px; margin: 8px 24px 18px; }
.rfd-facts div { min-width: 0; }
.rfd-facts dt { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rfd-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.rfd-register { margin: 0 24px; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--radius); overflow: hidden; }
.rfd-register-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--brand-tint); border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 600;
}
.rfd-register-head .label { color: var(--brand-dark); letter-spacing: .12em; }
.rfd-items { list-style: none; margin: 0; padding: 0; }
.rfd-items li {
  display: grid; grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px;
  padding: 12px 16px; border-top: 1px dashed var(--line); font-size: 13.5px;
}
.rfd-items li:first-child { border-top: 0; }
.ri-no { color: var(--brand-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.ri-name { font-weight: 700; overflow-wrap: anywhere; }
.ri-code { color: var(--ink-2); overflow-wrap: anywhere; }
.ri-qty { color: var(--muted); white-space: nowrap; }
.ri-status { color: var(--muted); white-space: nowrap; text-align: right; }
.ri-status.set { color: var(--ink); font-weight: 600; }
/* Draw the item (2026-11-12): one row drawn in the Designer from ERPNext's data */
.ri-act .ri-draw { white-space: nowrap; }
.ri-act .ri-draw:not(.done):not(:disabled) { background: var(--brand); border-color: var(--brand); color: #fff; }
.ri-act .ri-draw:not(.done):not(:disabled):hover { background: var(--brand-dark); }
.ri-msg { grid-column: 2 / -1; font-size: 12.5px; color: var(--muted); }
.ri-msg:empty { display: none; }
.ri-msg.bad { color: var(--danger, #B91C1C); font-weight: 600; }
.ri-empty { color: var(--muted); }
.rfd-note { margin: 12px 24px 20px; color: var(--muted); font-size: 12.5px; }
/* (2026-11-17) Submit, then Close RFD, in its window: two stages, each item by the RFD type's rule, one button (check, then write) */
.rfd-closebox { margin: 14px 24px 0; }
.rfd-close-steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 10px 0; padding: 0; }
.rfd-close-steps li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rfd-close-steps li b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface-3); color: var(--ink-2); font-size: 11px; }
.rfd-close-steps li small { font-weight: 500; color: var(--muted); }
.rfd-close-steps li.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-bg); }
.rfd-close-steps li.done b { background: var(--ok); color: #fff; }
.rfd-close-steps li.now { color: var(--ink); border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 16%, transparent); }
.rfd-close-steps li.now b { background: var(--brand); color: #fff; }
.rfd-close-rows { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rfd-close-rows:empty { display: none; }
.rfd-close-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 6px 10px; border-radius: 8px;
  font-size: 12.5px; }
.rfd-close-rows li.bad { background: color-mix(in srgb, var(--danger, #B91C1C) 6%, transparent); }
.rc-no { color: var(--muted); font-variant-numeric: tabular-nums; }
.rc-code { font-weight: 700; min-width: 190px; }
.rc-c { white-space: nowrap; }
.rc-c.ok { color: var(--ok); font-weight: 600; }
.rc-c.bad { color: var(--danger, #B91C1C); font-weight: 700; }
.rc-c small { color: var(--muted); font-weight: 500; }
.rfd-close-why { margin: 4px 0 8px; font-size: 12.5px; color: var(--muted); }
.rfd-close-why.act { color: var(--ink-2); font-weight: 600; }
.rfd-close-why.bad { color: var(--danger, #B91C1C); font-weight: 600; }
.rfd-close-why.warn { color: var(--warn); font-weight: 600; }
.rfd-close-why.ok { color: var(--ok); font-weight: 600; }
.rfd-close-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.rfd-close-msg { flex: 1; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rfd-close-msg .ok { color: var(--ok); }
.rfd-close-msg .bad { color: var(--danger, #B91C1C); }
@media (max-width: 640px) {
  .rfd-items li { grid-template-columns: 28px minmax(0, 1fr); row-gap: 2px; }
  .ri-code, .ri-qty, .ri-status, .ri-act { grid-column: 2; text-align: left; }
}
/* ---------------------------------------------------------------- every other page: the dashboard's simple style */
/* section labels: SemiBold caps, tracked wide (the .label of the dashboard) */
.checks-pop h3, .dz-card h4, .wiz-card h3, .lx-side h4, .lx-sec > summary, .sx-sec > summary, .dz-cat summary, .ovr-sub,
.sx-group, .dz-gname {
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.checks-pop h3 { margin: 0 0 8px; }
#checks-warn h3 { color: var(--warn); }
.dz-card h4, .wiz-card h3 { color: var(--muted); }
.wiz-card h3 .hint, .dz-card h4 .lx-kind { letter-spacing: 0; text-transform: none; font-size: 12px; }
.lx-sec > summary:hover, .sx-sec > summary:hover, .dz-cat summary:hover { color: var(--ink); }
.dz-gname { font-size: 10px; letter-spacing: .14em; }

/* project: panel list, the panel header, the sheets */
.sidebar input[type=search] { height: 34px; border-radius: 10px; margin: 12px 12px 8px; }
.filters { padding: 0 12px 10px; gap: 6px; }
.chip { height: 24px; padding: 0 10px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.panel-list { padding: 0 8px 12px; }
.panel-list li { padding: 7px 8px; }
.detail { padding: 12px 16px 14px; gap: 10px; }
.detail-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.pagebar button { border-radius: 999px; padding: 4px 12px; font-weight: 600; color: var(--muted); }
.pagebar button.active { background: var(--brand-soft); border-color: var(--brand-line); }
.pages { border-radius: var(--radius-lg); box-shadow: none; border: 1px solid var(--line); padding: 18px 18px 64px; }
.page-sheet, .sx-page { box-shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(0, 0, 0, .06); }
.zoom-ctrl { gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.zoom-ctrl .btn { border-color: transparent; background: transparent; min-width: 30px; }
.zoom-ctrl .btn:hover { background: var(--surface-2); }
.panel-drawer { border-right: 1px solid var(--line); box-shadow: var(--pop-shadow); }

/* design views: a clean bar, segmented tabs, one-card property windows */
.dz-top { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.dz-tabs { gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-3); }
.dz-tab { padding: 5px 12px; border-radius: 9px; font-size: 12.5px; color: var(--muted); }
.dz-tab:hover { color: var(--ink); }
.dz-tab.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.dz-ribbon { background: var(--card); }
.dz-btn:hover, .dz-sbtn:hover { background: var(--surface-2); }
.lx-bar { padding: 8px 14px; gap: 12px; }
.lx-sec > summary, .sx-sec > summary { padding: 12px 2px 10px; }
.dz-props { background: var(--card); padding: 0; }
.dz-props .dz-card { border: 0; background: transparent; }
.sx-note { font-size: 12px; color: var(--muted); padding: 4px 2px 10px; }
.lx-hint { font-size: 12px; }
.sx-row, .lx-devs button, .lx-list button, .lx-folder, .lx-tile, .sx-tile, .dz-tile, .dz-macro { border-radius: 10px; }
.dz-macro { border-left-width: 1px; }
.dz-macro:hover, .lx-folder:hover, .lx-tile:hover, .sx-tile:hover, .dz-tile:hover { border-color: var(--brand-line); background: var(--surface-2); }

/* the wizard: one card per step part, no heavy frames */
.wiz { box-shadow: var(--pop-shadow); }
.wiz-card { padding: 16px 18px; gap: 12px; }
.wiz-x { border-radius: 9px; width: 32px; height: 32px; }
.wiz-x:hover { background: var(--surface-2); color: var(--ink); }

/* sign in: one card, the dashboard's radius */
.signin-card { border-radius: var(--radius-lg); box-shadow: none; padding: 36px 32px 30px; }
.signin-card h1 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 18px 0 4px; }

@media (max-width: 640px) {
  .lx-bar { padding: 8px 12px; }
}

/* ================================================================ design mode: one bento system for SLD, Layout,
   Control and the RMU editors (2026-11-08: "more organized, bento style, clickable and easy to use; the tabs and
   bars more organized and relatable") - a header with the item and the views, labelled tool groups as cards, the
   side panels as stacked cards, the drawing in a card, pill page tabs, a slim status line */
/* header: the item, the views, one Done */
body.designing .modes, body.laying .modes, body.sld-ing .modes { gap: 12px; }
.modes-name { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.modes-name b { color: var(--brand-dark); font-weight: 700; margin-right: 0; }
.modes-tabs { padding: 4px; border-radius: 14px; gap: 4px; }
.modes-tabs button { padding: 6px 14px; border-radius: 10px; font-weight: 600; }
.modes-tabs button.active::after { display: none; }
.modes-tabs button.active { color: var(--ink); box-shadow: var(--shadow), inset 0 -2px 0 var(--brand); }
.dm-done { display: inline-flex; align-items: center; gap: 6px; }
.dm-done .tb-ic { width: 16px; height: 16px; }
#btn-panels { border-radius: 999px; }
.tb-done, #dz-done { display: none !important; }          /* the header's Done closes every design view */

/* the tool bar: groups as small cards, a caption over their buttons */
.lx-bar.tb { align-items: stretch; gap: 10px; padding: 10px 14px; background: var(--canvas); border-bottom: 1px solid var(--line); }
.tb .lx-title { align-self: center; }
.tb-groups { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; align-items: stretch; }
.tb-group, .dz-group {
  display: flex; flex-direction: column; gap: 4px; padding: 6px 8px 7px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; min-width: 0;
}
.tb-label, .dz-gname {
  order: -1; font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding: 0 2px; text-align: left;
}
.tb-row { display: flex; gap: 2px; align-items: center; flex: 1; }
/* View & Export: the PDFs without the part list sheets (2026-11-16) */
.tb-check { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; height: 32px; font-size: 13px;
  cursor: pointer; white-space: nowrap; color: var(--ink, inherit); }
.tb-check input { width: 15px; height: 15px; accent-color: var(--brand); margin: 0; }
.tb-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .12s, color .12s;
}
.tb-btn:hover { background: var(--surface-2); color: var(--brand-dark); }
.tb-btn:focus-visible { outline: 3px solid var(--brand-soft-2); outline-offset: 1px; }
.tb-btn:disabled { opacity: .4; cursor: default; }
.tb-btn span:empty { display: none; }
.tb-zoom .tb-btn { padding: 0 8px; }
.tb-ic { width: 17px; height: 17px; flex: none; }
.tb-group:has(.tb-row > [hidden]:only-child) { display: none; }
.tb-group .seg { align-self: flex-start; }
.tb-group .lx-gridsel select { height: 30px; border-radius: 8px; padding: 0 8px; }
.tb-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tb-status, .tb-chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted);
}
.tb-chip:empty { display: none; }

/* control designer: the tabs as a segmented pill, the ribbon groups as cards */
.dz-top { background: var(--canvas); border-bottom: 0; padding: 10px 14px 0; }
.dz-tabs { padding: 4px; gap: 4px; border-radius: 14px; }
.dz-tab { padding: 6px 14px; border-radius: 10px; font-weight: 600; font-size: 13px; }
.dz-title { font-size: 12.5px; color: var(--muted); }
.dz-ribbon { gap: 8px; padding: 8px 14px 10px; background: var(--canvas); min-height: 0; align-items: stretch; }
.dz-group:last-child { border-right: 1px solid var(--line); }
.dz-btns { min-height: 52px; gap: 2px; }
.dz-btn, .dz-sbtn { border-radius: 9px; }

/* the body: side panel and drawing as cards on the canvas */
.dz-body, .lx-body, .sx-body { gap: 12px; padding: 0 14px 12px; background: var(--canvas); }
.dz-body { padding-top: 0; }
.lx-body, .sx-body { padding-top: 12px; }
.dz-lib, .lx-side, .sx-side { background: transparent; border-right: 0; }
.lx-side, .sx-side { padding: 0 2px 12px 0; }
.dz-libhead { padding: 0 0 8px; border-bottom: 0; }
.dz-libhead input { height: 36px; border-radius: 10px; background: var(--card); }
.dz-libbody { padding: 0 2px 12px 0; }
.dz-cat, .lx-sec, .sx-sec {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; margin: 0 0 8px;
}
.dz-cat[open], .lx-sec[open], .sx-sec[open] { padding-bottom: 10px; }
.dz-cat summary, .lx-sec > summary, .sx-sec > summary {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  padding: 11px 0 9px; list-style-position: inside;
}
.dz-main, .lx-canvas, .sx-main {
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--card);
}
.dz-canvas { background: #E6E8EC; }
:root[data-theme="dark"] .dz-canvas { background: #2A2A2A; }
/* the pages and the status line */
.dz-pages { gap: 6px; padding: 8px 10px; background: var(--card); border-top: 1px solid var(--line); }
.dz-page { border-radius: 999px; padding: 5px 12px; font-weight: 600; }
.dz-page.active { box-shadow: inset 0 0 0 1px var(--brand); }
.dz-page.add { min-width: 32px; padding: 5px 0; }
.dz-status { background: var(--canvas); border-top: 0; padding: 0 16px; color: var(--muted); }
.lx-status { background: var(--surface-2); }

@media (max-width: 900px) {
  .tb-end { margin-left: 0; }
  .dz-body, .lx-body, .sx-body { padding: 0 8px 8px; gap: 8px; }
}

/* ================================================================ project view in the bento style (2026-11-08: "simpler,
   neat, clean, bento style, usable by the design engineer, more organized"): the project downloads as one group, the
   left column as two cards (items, sheets grouped), the item header as a card with its options together */
/* top bar: project downloads */
.dl-group { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface-2); }
.dl-group .dl-label { display: inline-flex; align-items: center; gap: 5px; margin: 0 4px 0 6px; font-size: 10.5px;
  font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dl-group .dl-label .tb-ic { width: 14px; height: 14px; }
.dl-item { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 9px; font-size: 12.5px;
  font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer; }
.dl-item:hover { background: var(--card); color: var(--brand-dark); box-shadow: var(--shadow); }
.dl-item[aria-busy="true"] { opacity: .55; }
#btn-new { border-radius: 999px; }

/* the workspace: cards on the canvas */
.workspace { background: var(--canvas); gap: 12px; padding: 12px; grid-template-columns: 260px 1fr; }
.sidebar { background: transparent; border-right: 0; gap: 12px; min-height: 0; }
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex;
  flex-direction: column; min-height: 0; overflow: hidden; }
.side-items { flex: 0 1 auto; max-height: 46%; }
.side-sheets { flex: 1 1 0; min-height: 160px; }
.side-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.side-head .label { font-size: 10.5px; letter-spacing: .16em; }
.side-count { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--surface-3);
  color: var(--ink-2); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.side-count:empty { display: none; }
.side-add { margin-left: auto; height: 26px; border-radius: 999px; padding: 0 10px; color: var(--brand-dark); }
.side-card input[type=search] { margin: 0 12px 8px !important; height: 34px; width: auto; }
.side-card .filters { padding: 0 12px 8px; }
.side-card .filters[hidden] { display: none; }
.filters .chip[data-n]:not([data-n=""])::after { content: attr(data-n); margin-left: 5px; font-weight: 700; color: var(--brand-dark); }
.side-card .panel-list { overflow-y: auto; padding: 0 8px 10px; }
.panel-list li { border-radius: 10px; }
.panel-list li.active { background: var(--brand-tint); box-shadow: inset 3px 0 0 var(--brand); }
.panel-drawer .side-sheets { display: none; }
.panel-drawer .side-items { max-height: none; flex: 1; }

/* the sheets card: grouped, numbered rows */
.side-sheets .pagebar { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; overflow-x: hidden; padding: 0 8px 10px; }
.pb-group { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding: 10px 8px 4px; }
.pb-group:first-child { padding-top: 2px; }
.pb-sep { height: 1px; margin: 6px 8px; background: var(--line); flex: none; }
.side-sheets .pagebar button { display: flex; align-items: center; gap: 8px; width: 100%; height: auto; padding: 6px 8px;
  border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; font-size: 12.5px;
  font-weight: 500; text-align: left; white-space: nowrap; cursor: pointer; flex: none; }
.side-sheets .pagebar button .n { flex: none; min-width: 24px; height: 20px; border-radius: 6px; background: var(--surface-2);
  color: var(--muted); font-size: 11px; font-weight: 700; margin: 0; display: inline-flex; align-items: center;
  justify-content: center; font-variant-numeric: tabular-nums; }
.side-sheets .pagebar button .t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.side-sheets .pagebar button:hover { background: var(--surface-2); color: var(--ink); }
.side-sheets .pagebar button.active { background: var(--brand-tint); color: var(--ink); font-weight: 700; }
.side-sheets .pagebar button.active .n { background: var(--brand); color: #FFFFFF; }

/* the item: a header card, the sheets in a card */
.detail { padding: 0; gap: 12px; }
.detail-head { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px 14px; }
.detail-title { font-size: 17px; }
.item-opts { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.item-opts:not(:has(> .checks:not([hidden]))) { display: none; }
.item-opts .btn.small { border: 0; background: transparent; height: 28px; border-radius: 9px; font-weight: 600; }
.item-opts .btn.small:hover { background: var(--card); box-shadow: var(--shadow); }
.dl-panel { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; }
.dl-panel .tb-ic { width: 15px; height: 15px; }
#btn-checks { border-radius: 10px; }
.pages { border-radius: var(--radius-lg); }

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; padding: 8px; gap: 8px; }
  .sidebar { max-height: none; }
  .side-items { max-height: 260px; }
  .side-sheets { max-height: 220px; }
  .dl-group .dl-label { display: none; }
}
@media (max-width: 1180px) { .dl-group .dl-label { display: none; } .dl-item { padding: 0 9px; } }

/* ================================================================ the workspace column (workspace.js): tabs, panes */
.sidebar { display: flex; flex-direction: column; }
.ws-tabs { display: flex; gap: 3px; padding: 4px; border-radius: 14px; background: var(--surface-3); flex: none; }
.ws-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px;
  font-weight: 600; cursor: pointer; padding: 0 6px; }
.ws-tabs button:hover { color: var(--ink); }
.ws-tabs button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow), inset 0 -2px 0 var(--brand); }
.ws-tabs i { font-style: normal; font-size: 10.5px; font-weight: 700; min-width: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); }
.ws-tabs i:empty { display: none; }
.ws-tabs i.hot { background: var(--warn-bg); color: var(--warn); }
.ws-pane[hidden] { display: none !important; }
.ws-browse { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.ws-pane.side-card { flex: 1; min-height: 0; }
.side-hint { margin-left: auto; font-size: 11px; color: var(--muted); }
.ws-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 12px; }
.ws-tools { display: flex; gap: 6px; align-items: center; padding: 0 2px 8px; position: sticky; top: 0; background: var(--card); z-index: 1; }
.ws-tools input[type=search], .ws-tools select { flex: 1; min-width: 0; height: 32px; border: 1px solid var(--line);
  border-radius: 9px; padding: 0 9px; font: inherit; font-size: 12.5px; background: var(--input); color: var(--ink); margin: 0 !important; }
.ws-tools .chip, .ws-tools .side-add { flex: none; }
.ws-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ws-row { width: 100%; display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.ws-row:hover { background: var(--surface-2); }
.ws-part.open > .ws-row, .ws-text.open > .ws-row { background: var(--brand-tint); }
.ws-tag { flex: none; min-width: 34px; font-size: 11px; font-weight: 700; color: var(--brand-dark); padding-top: 1px; }
.ws-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ws-main b { font-weight: 600; overflow-wrap: anywhere; }
.ws-sub { font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.ws-qty { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.ws-part.edited > .ws-row, .ws-text.edited > .ws-row { box-shadow: inset 3px 0 0 var(--brand); }
.ws-form { display: flex; flex-direction: column; gap: 7px; padding: 8px 8px 10px; margin: 2px 0 6px;
  border: 1px solid var(--brand-line); border-radius: 10px; background: var(--card); }
.ws-form label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 600; }
.ws-form input, .ws-form textarea { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 8px; background: var(--input); color: var(--ink); resize: vertical; }
.ws-form .ws-check { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; }
.ws-grid { display: grid; grid-template-columns: 80px 1fr; gap: 6px; }
.ws-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-foot { padding: 10px 6px 0; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.ws-empty, .ws-ok { padding: 18px 8px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.ws-ok { color: var(--ok); font-weight: 600; }
.ws-msg .ws-go, .ws-msg > div { width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 8px 9px; border: 0;
  border-radius: 9px; background: transparent; font: inherit; font-size: 12.5px; color: var(--ink); text-align: left;
  line-height: 1.45; }
.ws-msg .ws-go { cursor: pointer; }
.ws-msg .ws-go:hover { background: var(--surface-2); }
.ws-msg.warn .ws-go, .ws-msg.warn > div { box-shadow: inset 3px 0 0 var(--warn); }
.ws-sheet { align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--brand-dark); padding: 1px 8px;
  border-radius: 999px; background: var(--brand-tint); }
.panel-drawer .ws-tabs, .panel-drawer .ws-pane:not(.ws-browse) { display: none !important; }
.panel-drawer .ws-browse { display: flex !important; }

/* ================================================================ the ribbon (2026-11-09: "control through the toolbar, with
   tabs ... minimize the tools, remove any fillers"): four tabs over one row of tool groups; a status bar under the drawings */
.rb { flex: none; background: var(--card); border-bottom: 1px solid var(--line); position: relative; z-index: 4; }
.rb [hidden] { display: none !important; }
.rb-tabs { display: flex; align-items: flex-end; gap: 2px; padding: 6px 14px 0; border-bottom: 1px solid var(--line); }
.rb-tabs > button { height: 32px; padding: 0 16px; border: 0; border-radius: 10px 10px 0 0; background: transparent;
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: inset 0 -2px 0 transparent; }
.rb-tabs > button:hover { color: var(--ink); background: var(--surface-2); }
.rb-tabs > button.on { color: var(--ink); background: var(--canvas); box-shadow: inset 0 -2px 0 var(--brand); }
.rb-id { margin-left: auto; min-width: 0; display: flex; align-items: baseline; gap: 10px; padding: 0 2px 8px; }
.rb-id .detail-title { font-size: 14px; font-weight: 700; flex: none; max-width: 46vw; }
.rb-id .detail-meta { font-size: 12px; min-width: 0; }
.rb-panel { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 14px; background: var(--canvas); }
.rb .tb-btn { text-decoration: none; }
.rb .tb-btn.on, .rb .tb-btn[aria-pressed="true"] { background: var(--brand-tint); color: var(--brand-dark); box-shadow: inset 0 -2px 0 var(--brand); }
.rb .tb-btn i { font-style: normal; font-size: 10.5px; font-weight: 700; min-width: 16px; padding: 0 5px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); }
.rb .tb-btn i:empty { display: none; }
.rb .tb-btn i.hot { background: var(--warn-bg); color: var(--warn); }
.rb .tb-btn[aria-busy="true"] { opacity: .55; }
.rb .item-opts { display: flex !important; padding: 0; background: none; gap: 2px; }
.rb .item-opts .btn.small { height: 30px; font-size: 12.5px; }
.rb .item-opts .btn.small.warn { background: var(--warn-bg); color: var(--warn); }
.rb-none { font-size: 12px; color: var(--muted); padding: 0 8px; }
.rb .item-opts:has(> .checks:not([hidden])) .rb-none { display: none; }
.detail { gap: 0; }
.sb { flex: none; display: flex; align-items: center; gap: 18px; height: 30px; padding: 0 16px; background: var(--card);
  border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb[hidden] { display: none; }
#sb-sheet { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-checks { margin-left: auto; height: 22px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ok); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.sb-checks.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
@media (max-width: 900px) {
  .rb-id { display: none; }
  .rb-tabs > button { padding: 0 10px; }
  .rb-panel { padding: 6px 8px; }
}

/* the RMU boxes editor, simpler (2026-11-09: "too distracting, make it simpler, cleaner"): a slim bar, per box one head
   row (name, x / W / H, Add device), the door, and the selected device's fields in one row */
.rx .lx-bar.tb { padding: 6px 14px; align-items: center; }
.rx .tb-group { flex-direction: row; padding: 0; border: 0; background: none; }
.rx .tb-label { display: none; }
.rx-boxcard { gap: 10px; }
.rx-boxhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rx-boxhead > b { font-size: 14px; }
.rx-boxhead .hint, .rx-geo .hint { font-size: 12px; color: var(--muted); }
.rx-geo { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.rx-geo label, .rx-xywh label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.rx-geo input, .rx-xywh input, .rx-devbar input, .rx-devbar select, .rx-add {
  height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: inherit; font-size: 12.5px;
  background: var(--input); color: var(--ink); min-width: 0; }
.rx-geo input { width: 70px; }
.rx-xywh input { width: 58px; }
.rx-add { font-weight: 600; color: var(--brand-dark); cursor: pointer; }
.rx-door { max-height: 420px; border: 1px solid var(--line); }
.rx-door .rx-cap { fill: #6B6B6B; font-weight: 500; }
.rx-devbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.rx-devbar select { flex: 1 1 150px; }
.rx-devbar > input { flex: 1 1 110px; }
.rx-xywh { display: inline-flex; gap: 6px; }
.rx-devbar .btn { height: 30px; }
.rx-note { margin: 0; font-size: 12px; color: var(--muted); }
.rx-edited { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--warn-bg);
  color: var(--warn); border: 1px solid var(--warn-line); }
.rx-fuse { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.rx-fuse button { flex: 1; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.rx-fuse button.on { background: var(--card); color: var(--brand-dark); box-shadow: var(--shadow), inset 0 -2px 0 var(--brand); }
.rx-fuse button:disabled { opacity: .45; cursor: not-allowed; }

/* ================================================================ one workspace (2026-11-09: "the toolbar: Home and Export,
   in the centre, in a different colour; one workspace column - each item with its sheets, shown when clicked; no save,
   undo / redo; simple, no fillers"): the toolbar on top, the column on the left of every view, the status bar */
.pv-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 272px minmax(0, 1fr); position: relative; }
body.list-hidden .pv-body { grid-template-columns: minmax(0, 1fr); }
body.list-hidden .pv-body > .sidebar { display: none; }
.pv-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pv-main > .workspace { grid-template-columns: minmax(0, 1fr); padding: 12px 12px 0; }
.pv-main > section[hidden] { display: none !important; }
.pv-body > .sidebar { padding: 12px 0 12px 12px; gap: 10px; background: var(--canvas); min-height: 0; overflow: hidden; }
.ws-show { display: none; position: absolute; left: 0; top: 14px; z-index: 5; width: 22px; height: 44px; border: 1px solid var(--line);
  border-left: 0; border-radius: 0 10px 10px 0; background: var(--card); color: var(--muted); font-size: 15px; cursor: pointer;
  box-shadow: var(--shadow); }
.ws-show:hover { color: var(--brand-dark); }
body.list-hidden .ws-show { display: block; }
.ws-tabs .ws-hide { flex: none; width: 28px; padding: 0; font-size: 15px; }
.ws-browse.side-card { gap: 0; }
.ws-browse input[type=search] { margin: 10px 10px 6px !important; height: 32px; flex: none; }

/* the tree: items, their groups of sheets, the sheets */
.tree { list-style: none; margin: 0; padding: 2px 6px 12px; overflow-y: auto; flex: 1; min-height: 0; }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree .t-row { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 32px; padding: 4px 8px 4px 4px;
  border: 0; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; text-align: left;
  cursor: pointer; }
.tree .t-row:hover { background: var(--surface-2); }
.t-caret { width: 14px; height: 14px; flex: none; color: var(--muted-2); transition: transform .15s; }
.open > .t-row > .t-caret { transform: rotate(90deg); }
.t-row .no { flex: none; min-width: 20px; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.t-row .nm { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-row .t-n { flex: none; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.t-row .warn-dot { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--warn-bg);
  color: var(--warn); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.t-item.active > .t-row { background: var(--brand-tint); box-shadow: inset 3px 0 0 var(--brand); }
.t-item.project > .t-row .no { color: var(--brand); }
.t-item.project > .t-row .nm { color: var(--brand-dark); }
.tree .t-groups { padding: 2px 0 6px 14px; }
.tree .t-cats { padding: 0 0 2px 12px; }
.tree .t-cats > .t-group > .t-row { min-height: 26px; font-size: 12px; }
.tree .t-cats .t-sheets { padding-left: 14px; }
.t-group > .t-row { min-height: 28px; font-size: 12.5px; }
.t-group > .t-row .nm { font-weight: 500; color: var(--ink-2); }
.t-group.cur > .t-row .nm { color: var(--brand-dark); font-weight: 700; }
.tree .t-sheets { padding: 0 0 4px 20px; }
.tree .t-item.project > .t-sheets { padding-left: 18px; }
.t-sheet { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-2); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.t-sheet .n { flex: none; min-width: 24px; height: 19px; border-radius: 6px; background: var(--surface-2); color: var(--muted);
  font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.t-sheet .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-sheet:hover { background: var(--surface-2); color: var(--ink); }
.t-sheet.active { background: var(--brand-tint); color: var(--ink); font-weight: 700; }
.t-sheet.active .n { background: var(--brand); color: #FFFFFF; }
.t-wait { padding: 6px 30px; color: var(--muted); }
.t-none { padding: 10px 12px; font-size: 12.5px; color: var(--muted); }

/* the toolbar: the item on the left, Home / Export in the centre in the brand colour, the save line on the right */
.rb-tabs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px;
  padding: 7px 14px; border-bottom: 1px solid var(--line); }
.rb-tabs .rb-id { margin: 0; padding: 0; justify-self: start; max-width: 100%; }
.rb-id .detail-title { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.rb-id .detail-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-switch { display: flex; gap: 3px; padding: 3px; border-radius: 999px; background: var(--brand-soft); border: 1px solid var(--brand-line); }
.rb-switch > button { height: 30px; min-width: 96px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent;
  color: var(--brand-dark); font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .02em; cursor: pointer; }
.rb-switch > button:hover { background: var(--brand-soft-2); }
.rb-switch > button.on { background: var(--brand); color: #FFFFFF; box-shadow: 0 2px 6px rgba(232, 92, 26, .35); }
.rb-end { justify-self: end; display: flex; align-items: center; min-width: 0; }
.rb-saved { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.rb-saved::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.rb-saved.busy::before { background: var(--brand); }
.rb-saved.bad { color: var(--danger); }
.rb-saved.bad::before { background: var(--danger); }
/* the sub bar: the groups in one centred row, a thin rule between them */
.rb-panel { justify-content: center; align-items: stretch; gap: 0; padding: 6px 14px; background: var(--brand-tint);
  border-bottom: 1px solid var(--line); }
.rb-panel .tb-group { flex-direction: row; align-items: center; gap: 8px; padding: 0 14px; border: 0; border-radius: 0;
  background: transparent; }
.rb-panel .tb-group + .tb-group { border-left: 1px solid var(--line); }
.rb-panel .tb-label { order: 0; font-size: 9.5px; }
.rb-panel .tb-btn { height: 32px; }
.rb-panel .tb-btn.on { background: var(--card); color: var(--brand-dark); box-shadow: var(--shadow), inset 0 -2px 0 var(--brand); }
.rb-panel .tb-btn:disabled { opacity: .35; }
.rb-panel .item-opts { align-items: center; }
/* the editors' own save lines: the toolbar says it for all of them */
#dz-save, #sx-save, #lx-save, #rx-save { display: none !important; }
/* the status bar: the sheet, the checks, the zoom */
.sb .sb-checks { margin-left: auto; }
.sb-zoom { display: inline-flex; align-items: center; gap: 2px; }
.sb-zoom button { height: 22px; min-width: 24px; padding: 0 7px; border: 0; border-radius: 6px; background: transparent;
  color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.sb-zoom button:hover { background: var(--surface-2); color: var(--brand-dark); }
#sb-zoom { min-width: 42px; text-align: center; }
/* the control circuit designer: the other pages under a pointer that says they can be picked */
.dz-other { cursor: pointer; }
@media (max-width: 900px) {
  .pv-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .pv-body > .sidebar { max-height: 260px; padding: 8px; }
  .rb-tabs { grid-template-columns: minmax(0, 1fr) auto; }
  .rb-end { display: none; }
  .rb-panel { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .rb-switch > button { min-width: 0; padding: 0 14px; }
}
/* control sheets: the contact links (a click goes to the coil) and the ring on the coil */
#pages text.xref { cursor: pointer; }
#pages text.xref:hover { fill: var(--brand) !important; text-decoration: underline; }
#pages .xref-ring { fill: none; stroke: #E85C1A; stroke-width: 0.8; animation: xref-ring 2.6s ease-out forwards; }
@keyframes xref-ring { 0% { opacity: 1; stroke-width: 1.4; } 70% { opacity: 1; } 100% { opacity: 0; stroke-width: 0.4; } }
/* one line of tools on an ordinary screen: the group captions only when there is room; the control designer does not repeat the item */
@media (max-width: 1400px) { .rb-panel .tb-label { display: none; } .rb-panel .tb-group { padding: 0 10px; } }
#dz-title { visibility: hidden; }
.rb-tabs .rb-id { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.rb-tabs .rb-id .detail-title { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.rb-tabs .rb-id .detail-meta { flex: 1 1 0; min-width: 0; }

/* ================================================================ Edit / View & Export (2026-11-09: "the default mode is
   editing: the whole sheet with an editing button, smooth animations that minimize the sheet and show the editing mode;
   View & Export a separate mode - review the whole panel then export; the editing tools in a pinned bar like AutoCAD,
   Revit; the workspace: just the project, the panels visually separated") */
.rb-switch > button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.rb-switch > button .tb-ic { width: 16px; height: 16px; }

/* the pinned bar: one row of tool groups under the toolbar, its tools following what is open */
.rb-bar { display: flex; align-items: center; gap: 0; min-height: 50px; padding: 5px 12px; background: var(--brand-tint);
  border-bottom: 1px solid var(--line); flex-wrap: wrap; row-gap: 4px; position: relative; z-index: 3; }
.rb-bar [hidden] { display: none !important; }
.rb-bar .tb-group { flex-direction: row; align-items: center; gap: 8px; padding: 0 12px; border: 0; border-radius: 0;
  background: transparent; min-height: 36px; }
.rb-bar .tb-group + .tb-group, .rb-bar .rb-ctx > .tb-group:first-child, .rb-tools > .rb-ed:first-child { border-left: 1px solid var(--line); }
.rb-bar .tb-label { order: 0; font-size: 9.5px; }
.rb-bar .tb-btn { height: 32px; }
.rb-bar .tb-btn:disabled { opacity: .35; }
.rb-bar .tb-btn.on, .rb-bar .tb-btn[aria-pressed="true"] { background: var(--card); color: var(--brand-dark);
  box-shadow: var(--shadow), inset 0 -2px 0 var(--brand); }
.rb-ctx { display: flex; align-items: center; flex-wrap: wrap; row-gap: 4px; }
.rb-sheetname { min-width: 0; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px;
  font-weight: 600; color: var(--ink-2); padding: 0 4px; font-variant-numeric: tabular-nums; }
.rb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; padding-left: 12px; }
@media (max-width: 1400px) { .rb-bar .tb-label { display: none; } .rb-bar .tb-group { padding: 0 8px; } }

/* an editor's own tool bar, moved into the pinned bar */
.rb-tools { flex: 1 1 auto; min-width: 0; }
.rb-tools .rb-ed { display: flex; align-items: center; flex-wrap: wrap; row-gap: 4px; }
.rb-tools .lx-bar.tb { padding: 0 0 0 12px; margin: 0; gap: 8px; background: none; border: 0; box-shadow: none; flex-wrap: wrap;
  align-items: center; min-height: 36px; }
.rb-tools .lx-bar .lx-title { font-size: 12.5px; font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
.rb-tools .lx-bar .lx-title::before { content: "Modify | "; color: var(--muted); font-weight: 600; }
.rb-tools .tb-groups { flex: 0 1 auto; gap: 0; align-items: center; }
.rb-tools .tb-end { margin-left: 8px; }
.rb-tools .tb-end:not(:has(> :not(.tb-status):not(.tb-done))) { display: none; }
.rb-tools .lx-scale.tb-chip { height: 24px; font-size: 11px; }
/* the control designer: its tabs as a small segmented switch, its groups in the same row */
.rb-tools .dz-top { padding: 0 8px 0 12px; background: none; border: 0; gap: 8px; }
.rb-tools .dz-tabs { gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-3); }
.rb-tools .dz-tab { padding: 5px 10px; border-radius: 8px; font-size: 12px; box-shadow: none; }
.rb-tools .dz-tab.active { background: var(--card); color: var(--brand-dark); box-shadow: var(--shadow), inset 0 -2px 0 var(--brand); }
.rb-tools .dz-title { display: none; }
.rb-tools .dz-ribbon { display: flex; flex-wrap: wrap; gap: 0; padding: 0; background: none; border: 0; min-height: 0; }
.rb-tools .dz-group { flex-direction: row; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 0;
  background: none; border-left: 1px solid var(--line); }
.rb-tools .dz-gname { order: 0; }
.rb-tools .dz-btns { align-items: center; }
.rb-tools .dz-btn { padding: 2px 6px; min-width: 0; }
@media (max-width: 1400px) { .rb-tools .dz-gname { display: none; } }

/* the sheet minimised while an editor is open: live, a click goes back to it */
.rb-mini { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 3px 10px 3px 3px; border: 1px solid var(--brand-line);
  border-radius: 10px; background: var(--card); color: var(--brand-dark); font: inherit; font-size: 11px; font-weight: 700;
  line-height: 1.15; text-align: left; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s; }
.rb-mini:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.rb-mini img { width: 54px; height: 38px; object-fit: contain; background: #FFFFFF; border-radius: 6px; border: 1px solid var(--line); }

/* the points to check: a chip, its list under it */
.rb-checks { position: relative; }
.rb-checks .sb-checks { margin: 0; height: 28px; padding: 0 12px; }
.rb-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(420px, 90vw); max-height: 60vh; overflow: auto;
  padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--pop-shadow); }
.rb-pop .ws-body { padding: 0; }

/* view & export: the review and the downloads it opens */
.rv { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.rv i { display: block; width: 96px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.rv i b { display: block; height: 100%; width: 0; background: var(--brand); border-radius: inherit; transition: width .3s ease; }
.rv.done { color: var(--ok); }
.rv.done i b { background: var(--ok); }
/* a test project (2026-11-14): never kept, deleted when left - said beside its name */
.p-test { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: 6px; border-radius: 999px; vertical-align: 2px;
  background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.p-test[hidden] { display: none; }
.tb-btn .lock { display: none; }
.tb-btn.locked { opacity: .5; cursor: not-allowed; }
/* ERPNext BOM / Work Order of a kind of item the rules do not make yet (transformers only for now): Soon */
.tb-btn.soon { cursor: not-allowed; }
.tb-btn.soon:hover { background: transparent; color: var(--ink); }
.tb-btn.soon > svg, .tb-btn.soon > span { opacity: .45; }
.tb-btn.soon::after { content: "Soon"; background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px;
  padding: 1px 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.tb-btn.locked .lock { display: inline-block; width: 11px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 12'%3E%3Crect x='0.5' y='5' width='10' height='7' rx='1.5'/%3E%3Cpath d='M2.5 5V3.5a3 3 0 0 1 6 0V5' fill='none' stroke='black' stroke-width='1.4'/%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 11 12'%3E%3Crect x='0.5' y='5' width='10' height='7' rx='1.5'/%3E%3Cpath d='M2.5 5V3.5a3 3 0 0 1 6 0V5' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat; }

/* edit mode: the whole sheet, its Edit button floating over it */
.stage { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; background: var(--canvas); }
.stage[hidden] { display: none; }
.stage-frame { flex: 1; min-height: 0; padding: 18px 22px 84px; container-type: size; display: grid; place-items: center; }
.stage-sheet { width: min(100cqw, calc(100cqh * 420 / 297)); aspect-ratio: 420 / 297; background: #FFFFFF; border-radius: 8px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, .08), 0 18px 48px rgba(17, 17, 17, .16); overflow: hidden;
  display: grid; place-items: center; }
.stage-sheet > svg { display: block; }
.stage-sheet text.xref { cursor: pointer; }
.stage-sheet text.xref:hover { fill: var(--brand) !important; text-decoration: underline; }
.stage-sheet .xref-ring { fill: none; stroke: #E85C1A; stroke-width: 0.8; animation: xref-ring 2.6s ease-out forwards; }
.stage-empty { display: flex; flex-direction: column; gap: 6px; align-items: center; color: #6B6B6B; font-size: 13px; padding: 30px; text-align: center; }
.stage-empty b { color: #111111; font-size: 16px; }
.stage-actions { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; pointer-events: none; }
.stage-actions > * { pointer-events: auto; }
.stage-edit { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 26px 0 20px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #F07A3C, var(--brand) 55%, #D04E12); color: #FFFFFF; font: inherit; font-size: 14.5px;
  font-weight: 700; letter-spacing: .01em; cursor: pointer; box-shadow: 0 10px 28px rgba(232, 92, 26, .38), 0 2px 6px rgba(17, 17, 17, .12);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s; animation: stage-edit-in .5s cubic-bezier(.2, .8, .2, 1) both; }
.stage-edit svg { width: 18px; height: 18px; }
.stage-edit:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 36px rgba(232, 92, 26, .45), 0 2px 6px rgba(17, 17, 17, .12); }
.stage-edit:active { transform: translateY(0) scale(.99); }
.stage-note { padding: 9px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 12.5px;
  color: var(--muted); box-shadow: var(--shadow); }
@keyframes stage-edit-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* the animation: a copy of the sheet glides between the stage and the pinned bar (app.js enterEdit / leaveEdit) */
.sheet-ghost { position: fixed; z-index: 60; pointer-events: none; background: #FFFFFF; border-radius: 6px; overflow: hidden;
  transform-origin: 50% 50%; will-change: transform, opacity; box-shadow: 0 10px 30px rgba(17, 17, 17, .14); }
.sheet-ghost > svg, .sheet-ghost > img { display: block; width: 100%; height: 100%; object-fit: contain; }
body.ed-switch #stage { visibility: hidden; }
.ed-nav { display: inline-flex; gap: 2px; }
.ed-nav .tb-btn { height: 30px; padding: 0 6px; }
@media (prefers-reduced-motion: reduce) { .stage-edit { animation: none; } }

/* the texts / part list of a sheet, the sheet redrawn beside them */
.shx { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--canvas); }
.shx[hidden] { display: none; }
.shx-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(340px, 1fr) minmax(0, 1.25fr); gap: 16px; padding: 12px 14px; }
.shx-card { min-height: 0; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; }
.shx-card .ws-body { padding: 0; overflow: visible; }
.shx-preview { min-height: 0; overflow: auto; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.shx-preview img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) { .shx-main { grid-template-columns: 1fr; overflow: auto; } }

/* the workspace: the project only, each item a card of its own */
.pv-body > .sidebar { display: flex; flex-direction: column; gap: 8px; padding: 12px 6px 12px 12px; }
.ws-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 0 6px; }
.ws-head .label { font-size: 10.5px; letter-spacing: .16em; }
.ws-head .ws-hide { margin-left: auto; width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font-size: 15px; cursor: pointer; }
.ws-head .ws-hide:hover { background: var(--surface-3); color: var(--ink); }
.pv-body > .sidebar > input[type=search] { margin: 0 !important; height: 34px; border-radius: 10px; flex: none; }
.pv-body > .sidebar > .tree { padding: 2px 6px 12px 0; display: flex; flex-direction: column; gap: 8px; }
.tree > .t-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s; }
.tree > .t-item:hover { border-color: var(--line-strong); }
.tree > .t-item.active { border-color: var(--brand-line); box-shadow: var(--shadow), 0 0 0 3px var(--brand-soft); }
.tree > .t-item.active > .t-row { background: transparent; box-shadow: none; }
.tree > .t-item > .t-row { min-height: 38px; }
.tree > .t-item > .t-row .nm { font-size: 13.5px; }
.tree > .t-item.open > .t-row { border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; margin-bottom: 4px; }
.tree > .t-item.project { background: var(--brand-tint); border-style: dashed; box-shadow: none; }
.t-ok { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 11px;
  font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.tree .t-groups { padding: 0 2px 4px 4px; }
.tree .t-sheets { padding: 0 0 4px 18px; }
/* the pinned bar keeps one line of sections: undo / redo at the left, the tools in the middle (wrapping inside), the sheet at the right */
.rb-bar { flex-wrap: nowrap; }
.rb-bar > .rb-hist { flex: none; }
.rb-bar > .rb-ctx { flex: 0 1 auto; min-width: 0; }
.rb-bar > .rb-tools { flex: 1 1 0; }
.rb-bar > .rb-right { flex: none; }
/* the pinned bar names the editor open (as Revit's "Modify | ..." tab) */
.rb-tools [data-for="#layout-editor"] .lx-title::before { content: "Modify | Layout "; }
.rb-tools [data-for="#sld-editor"] .lx-title::before { content: "Modify | Panel and feeders"; }
.rb-tools .dz-top::before { content: "Modify | Control circuit"; font-size: 12.5px; font-weight: 700; color: var(--brand-dark); white-space: nowrap; }

/* the sheet takes the whole stage; Edit and Done are small buttons of the pinned bar (2026-11-09: "the drawing page
   bigger, the edit button small and in another place; split the screen, zoom to what I do") */
.stage-frame { padding: 10px 12px; }
.stage-sheet { border-radius: 6px; box-shadow: 0 1px 2px rgba(17, 17, 17, .08), 0 10px 30px rgba(17, 17, 17, .12); }
.rb-bar .rb-edit, .rb-bar .rb-done { height: 30px; padding: 0 12px 0 10px; margin-left: 6px; border-radius: 999px; background: var(--brand);
  color: #FFFFFF; font-weight: 700; box-shadow: 0 2px 8px rgba(232, 92, 26, .3); }
.rb-bar .rb-edit:hover, .rb-bar .rb-done:hover { background: var(--brand-dark); color: #FFFFFF; }
.rb-bar .rb-edit:disabled { background: var(--surface-3); color: var(--muted); box-shadow: none; opacity: 1; }
.rb-bar .rb-edit .tb-ic, .rb-bar .rb-done .tb-ic { width: 15px; height: 15px; }
/* the live preview: the sheet inline, zoomable; "Whole sheet" when zoomed */
.rx-preview, .shx-preview { position: relative; overflow: hidden; }
.pvz { position: absolute; inset: 0; }
.pvz > svg { display: block; width: 100%; height: 100%; }
.pvz-fit { position: absolute; top: 10px; right: 10px; height: 28px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .92); color: #3A3A3A; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 8px rgba(17, 17, 17, .12); backdrop-filter: blur(4px); }
.pvz-fit:hover { color: #B8460F; }
.pvz-fit[hidden] { display: none; }

/* View & Export: a sheet out of view is not painted (fast scrolling); its box keeps its size (aspect ratio) */
.page-sheet { content-visibility: auto; }

/* readable sizes (2026-11-09: "make the font size more readable") */
.tree .t-row { font-size: 14px; }
.tree > .t-item > .t-row .nm { font-size: 14.5px; }
.t-group > .t-row { font-size: 13.5px; }
.t-sheet { font-size: 13.5px; padding: 5px 8px; }
.t-sheet .n { font-size: 12px; min-width: 26px; height: 21px; }
.ws-head .label { font-size: 11.5px; }
.rb-bar .tb-btn { font-size: 13.5px; }
.rb-bar .tb-label { font-size: 10.5px; }
.rb-sheetname { font-size: 13.5px; }
.rb-tabs .rb-id .detail-title { font-size: 15px; }
.rb-tabs .rb-id .detail-meta { font-size: 13px; }
.rb-saved { font-size: 13px; }
.wf > span, .rx-cubhead .hint, .rx-note, .sx-note, .dz-f > span { font-size: 13px; }
.wf input, .wf select, .wf textarea, .rx-body input, .rx-body textarea, .rx-body select, .sx-form input, .sx-form select,
.dz-props input, .dz-props select, .dz-props textarea { font-size: 14px; }
.rx-cubhead b, .rx-boxhead > b { font-size: 15px; }
.sx-row { font-size: 13.5px; }
.sx-sec > summary, .dz-sec > summary, .lx-sec > summary { font-size: 13.5px; }
.ws-list, .ws-row, .ws-msg { font-size: 13.5px; }
.ws-sub { font-size: 12.5px; }
.sb { font-size: 13px; }
.page-label { font-size: 13px; }

/* the main points of a sheet, in their sections */
.fx-sec { margin: 0 0 16px; }
.fx-sec h4 { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.fx-row { display: grid; grid-template-columns: minmax(130px, 40%) 1fr auto; align-items: center; gap: 10px; padding: 5px 6px;
  border-radius: 10px; }
.fx-row:hover { background: var(--surface-2); }
.fx-lab { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.fx-in { height: 36px; min-width: 0; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--input);
  color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 600; }
.fx-in:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fx-back { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.fx-back:hover { background: var(--surface-3); color: var(--brand-dark); }

/* the engineer's edits, marked in the editors only (never on the drawings that are exported) */
.fx-row.mod .fx-in, .wf.mod input, .wf.mod textarea, .wf.mod select, .rx-geo label.mod input {
  border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--input)); box-shadow: inset 3px 0 0 var(--brand); }
.fx-row.mod .fx-lab, .wf.mod > span, .rx-geo label.mod { color: var(--brand-dark); }
.wf.mod > span::after, .fx-row.mod .fx-lab::after { content: " · edited"; font-weight: 700; }
.rx-cub.mod { box-shadow: inset 4px 0 0 var(--brand), var(--shadow); }
.wcode.mod b { color: var(--brand-dark); }
.wcode.mod::after { content: "edited"; margin-left: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); }
.rx-door .rx-mod { fill: rgba(232, 92, 26, .10); stroke: #E85C1A; stroke-width: 1.6; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.pv-mark rect { fill: rgba(232, 92, 26, .09); stroke: #E85C1A; stroke-width: .5; stroke-dasharray: 2 1.4; pointer-events: none; }
.sx-row.mod { box-shadow: inset 3px 0 0 var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent); }
.sx-row.mod b::after { content: " · edited"; color: var(--brand-dark); }
.sx-hit rect.mod { fill: rgba(232, 92, 26, .12); stroke: #E85C1A; stroke-dasharray: 2 1.4; }
.lx-item.moved .lx-hit { fill: rgba(232, 92, 26, .12); stroke: #E85C1A; stroke-width: 1.2px; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.dz-mod { fill: rgba(232, 92, 26, .10); stroke: rgba(232, 92, 26, .9); stroke-width: .35; stroke-dasharray: 1.2 .8; pointer-events: none; }
polyline.dz-mod { fill: none; stroke: rgba(232, 92, 26, .35); stroke-dasharray: none; }
/* the texts / characteristics editor: a wider column for its main points */
.shx-main { grid-template-columns: minmax(460px, 1.1fr) minmax(0, 1fr); }
.fx-row { grid-template-columns: minmax(120px, 38%) minmax(0, 1fr) 30px; }

/* View & Export: every sheet fitted to the window (app.js fitPages), scrolled without animation */
.pages { scroll-behavior: auto; overscroll-behavior: contain; }
.page { width: calc(var(--fitw, 100%) * var(--z)); margin-bottom: 18px; }
.pages .page-sheet { contain: layout paint; }

/* the engineer's edits on the drawings of the editors: a highlighter over the very text or item changed */
.pv-mark rect.txt { fill: rgba(255, 196, 0, .55); stroke: #E85C1A; stroke-width: .35; mix-blend-mode: multiply; pointer-events: none; }
.pv-mark rect.col { fill: rgba(232, 92, 26, .05); stroke: #E85C1A; stroke-width: .45; stroke-dasharray: 2 1.4; pointer-events: none; }
.dz-mod { fill: rgba(255, 196, 0, .45); stroke: #E85C1A; stroke-width: .4; stroke-dasharray: none; mix-blend-mode: multiply; }
polyline.dz-mod { fill: none; stroke: rgba(255, 180, 0, .7); stroke-width: 1.8; mix-blend-mode: multiply; }
.rx-door .rx-mod { fill: rgba(255, 196, 0, .35); stroke: #E85C1A; stroke-width: 2; stroke-dasharray: none; }
.sx-hit rect.mod { fill: rgba(255, 196, 0, .4); stroke: #E85C1A; stroke-width: .5; stroke-dasharray: none; mix-blend-mode: multiply; }
.lx-item.moved .lx-hit { fill: rgba(255, 196, 0, .35); stroke: #E85C1A; stroke-width: 1.6px; stroke-dasharray: none; }

/* zoom (2026-11-09: "fix zoom in and out, more flexible; the page view more zoomed in"): the stage is a scroll box
   like the set; a sheet is --fitw (the whole sheet) x --z wide, centred while it is smaller than the window */
.stage-frame { display: flex; overflow: auto; padding: 12px; container-type: normal; overscroll-behavior: contain;
  scrollbar-gutter: stable; }
.pages { scrollbar-gutter: stable; }
.stage-sheet { flex: none; margin: auto; width: calc(var(--fitw, 800px) * var(--z, 1)); height: auto; aspect-ratio: 420 / 297; }
.stage-sheet > svg { width: 100%; height: 100%; }
.stage-frame, .pages { cursor: default; }
.stage-frame.panning, .pages.panning { cursor: grabbing; user-select: none; }
.stage-sheet, .page-sheet { user-select: none; -webkit-user-select: none; }
.pages { padding-left: 12px; padding-right: 12px; }
.sb-hint { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-zoom #sb-zoom { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.sb-zoom button.on { background: var(--brand-tint); color: var(--brand-dark); font-weight: 700; }
@media (max-width: 900px) { .sb-hint { display: none; } }
/* the live previews zoom and move too (Ctrl + wheel at the pointer, drag when zoomed) */
.pvz { user-select: none; -webkit-user-select: none; }
.rx-preview.panning, .shx-preview.panning { cursor: grabbing; }

/* right-click menus: a heading line and ticks */
.ctx-head { padding: 7px 12px 5px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; color: var(--brand-dark);
  border-bottom: 1px solid var(--line); margin-bottom: 3px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.ctx-item.checked > span::before { content: "\2713"; display: inline-block; width: 16px; margin-left: -4px; color: var(--brand); font-weight: 800; }

/* the live simulation dashboard (2026-11-09: "live, changeable, noticeable and distinguished"): a dark panel over the
   drawing, one coloured tile per device; green on, grey off, amber timing, red tripped / fault */
.dz-dash { position: absolute; top: 12px; right: 12px; z-index: 30; width: 318px; max-height: calc(100% - 24px); display: flex;
  flex-direction: column; background: #14171C; color: #E8EAED; border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 18px 48px rgba(0, 0, 0, .38), 0 0 0 3px rgba(34, 197, 94, .18);
  font: 12px/1.3 Archivo, system-ui, sans-serif; user-select: none; animation: dd-in .28s cubic-bezier(.22, .61, .36, 1); }
.dz-dash.has-fault { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 18px 48px rgba(0, 0, 0, .38), 0 0 0 3px rgba(239, 68, 68, .45); }
.dz-dash.paused { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 18px 48px rgba(0, 0, 0, .38), 0 0 0 3px rgba(245, 158, 11, .4); }
.dz-dash[hidden] { display: none; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.dd-head { display: flex; align-items: center; gap: 5px; padding: 8px 8px 8px 10px; white-space: nowrap; background: #1C2027; cursor: grab;
  border-bottom: 1px solid rgba(255, 255, 255, .07); }
.dd-head:active { cursor: grabbing; }
.dd-head b { font-size: 13px; font-weight: 800; color: #FFFFFF; }
.dd-live { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 999px; background: rgba(239, 68, 68, .16);
  color: #FF6B6B; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; }
.dd-live i { width: 7px; height: 7px; border-radius: 50%; background: #EF4444; animation: dd-pulse 1.1s ease-in-out infinite; }
.dz-dash.paused .dd-live { background: rgba(245, 158, 11, .16); color: #FBBF24; }
.dz-dash.paused .dd-live i { background: #F59E0B; animation: none; }
@keyframes dd-pulse { 50% { opacity: .25; transform: scale(.7); } }
.dd-time { font-variant-numeric: tabular-nums; color: #9AA3AF; font-weight: 600; }
.dd-gap { flex: 1; }
.dd-head button { height: 24px; min-width: 26px; padding: 0 6px; border: 0; border-radius: 7px; background: rgba(255, 255, 255, .08);
  color: #E8EAED; font: 700 11.5px/1 Archivo, system-ui, sans-serif; cursor: pointer; }
.dd-head button:hover { background: rgba(255, 255, 255, .18); }
.dd-head .dd-stop { background: rgba(239, 68, 68, .22); color: #FF8A8A; }
.dd-head .dd-stop:hover { background: #EF4444; color: #FFFFFF; }
.dd-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 9px 10px 4px; }
.dd-sum span { padding: 6px 4px; border-radius: 8px; text-align: center; font-weight: 800; font-size: 11.5px; background: rgba(255, 255, 255, .05); color: #9AA3AF; }
.dd-sum .c-on { background: rgba(34, 197, 94, .15); color: #4ADE80; }
.dd-sum .c-trip.lit, .dd-sum .c-fault.lit { background: #DC2626; color: #FFFFFF; animation: dd-alarm 1s ease-in-out infinite; }
@keyframes dd-alarm { 50% { background: #7F1D1D; } }
.dd-faults:empty { display: none; }
.dd-faults { margin: 6px 10px 0; padding: 7px 9px; border-radius: 8px; background: rgba(220, 38, 38, .18); color: #FCA5A5; font-weight: 600; }
.dd-body { overflow: auto; padding: 4px 10px 10px; scrollbar-width: thin; scrollbar-color: #3A404A transparent; }
.dd-sec h5 { display: flex; align-items: center; gap: 6px; margin: 10px 0 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #8A93A0; }
.dd-sec h5 small { padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: #AEB5BF; letter-spacing: 0; }
.dd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dd-tile { position: relative; display: grid; grid-template-columns: 12px 1fr; grid-template-areas: "led tag" "led val" "led sub";
  column-gap: 7px; padding: 7px 24px 7px 8px; border-radius: 9px; background: #1F242C; border: 1px solid rgba(255, 255, 255, .06);
  transition: background .18s, border-color .18s, box-shadow .18s; }
.dd-tile.op { cursor: pointer; }
.dd-tile.op:hover { border-color: rgba(255, 255, 255, .28); }
.dd-tile.op:active { transform: scale(.97); }
.dd-led { grid-area: led; align-self: center; width: 10px; height: 10px; border-radius: 50%; background: #4B5260; }
.dd-tag { grid-area: tag; font-size: 12.5px; font-weight: 800; color: #FFFFFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-val { grid-area: val; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #9AA3AF; }
.dd-sub { grid-area: sub; font-size: 10.5px; color: #7C8592; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-bar { grid-column: 1 / -1; height: 4px; margin-top: 5px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.dd-bar[hidden] { display: none; }
.dd-bar > i { display: block; height: 100%; width: 0; background: #F59E0B; border-radius: 4px; transition: width .1s linear; }
.dd-loc { position: absolute; top: 5px; right: 4px; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 5px; background: transparent;
  color: #7C8592; font-size: 13px; line-height: 18px; cursor: pointer; }
.dd-loc:hover { background: rgba(255, 255, 255, .12); color: #FFFFFF; }
.dd-tile.st-on { background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .45); }
.dd-tile.st-on .dd-led { background: var(--led, #22C55E); box-shadow: 0 0 10px var(--led, #22C55E); }
.dd-tile.st-on .dd-val { color: #4ADE80; }
.dd-tile.st-wait { background: rgba(245, 158, 11, .13); border-color: rgba(245, 158, 11, .45); }
.dd-tile.st-wait .dd-led { background: #F59E0B; animation: dd-pulse .8s ease-in-out infinite; }
.dd-tile.st-wait .dd-val { color: #FBBF24; }
.dd-tile.st-trip { background: rgba(220, 38, 38, .22); border-color: #EF4444; }
.dd-tile.st-trip .dd-led { background: #EF4444; box-shadow: 0 0 10px #EF4444; animation: dd-pulse .7s ease-in-out infinite; }
.dd-tile.st-trip .dd-val { color: #FF8A8A; }
.dd-tile.st-meter .dd-led { background: #3B82F6; box-shadow: 0 0 8px rgba(59, 130, 246, .7); }
.dd-tile.st-meter .dd-val { color: #93C5FD; font-size: 13px; font-variant-numeric: tabular-nums; }
.dd-tile.spin-cw .dd-led, .dd-tile.spin-ccw .dd-led { border-radius: 50%; background: conic-gradient(#22C55E 0 70%, transparent 70%);
  box-shadow: none; animation: dd-spin .8s linear infinite; }
.dd-tile.spin-ccw .dd-led { animation-direction: reverse; }
@keyframes dd-spin { to { transform: rotate(360deg); } }
.dd-tile.flash { animation: dd-flash 1.1s ease-out; }
@keyframes dd-flash { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .85); } 100% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); } }
.dd-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.dd-log li { display: flex; gap: 8px; padding: 4px 7px; border-radius: 6px; background: rgba(255, 255, 255, .04); color: #C9CED6; font-size: 11.5px; }
.dd-log li:first-child { background: rgba(255, 255, 255, .1); color: #FFFFFF; }
.dd-log time { flex: none; width: 44px; color: #7C8592; font-variant-numeric: tabular-nums; }
.dd-log .ev-on { border-left: 3px solid #22C55E; }
.dd-log .ev-off { border-left: 3px solid #6B7280; }
.dd-log .ev-wait { border-left: 3px solid #F59E0B; }
.dd-log .ev-trip, .dd-log .ev-fault { border-left: 3px solid #EF4444; color: #FCA5A5; }
.dd-log .ev-info { border-left: 3px solid #3B82F6; }
.dd-log .ev-none { color: #7C8592; font-style: italic; }
@media (prefers-reduced-motion: reduce) { .dz-dash, .dd-live i, .dd-tile, .dd-led, .dd-sum span { animation: none !important; } }

/* RMU SLD editor: the CT / VT of the measuring cubicle */
.rx-meas { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.rx-meas h4 { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 6px; font-size: 13px; font-weight: 800; color: var(--ink, #111111); }
.rx-meas h4 .hint { font-weight: 600; }
.rx-mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; }
.rx-mfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }

/* the CT / VT of the measuring: a card of its own, highlighted (2026-11-09: "the CT, VT selection section to be
   separated, highlighted") */
.rx-ctvt { position: relative; border: 1.5px solid var(--brand); background: linear-gradient(180deg, var(--brand-tint), var(--card) 70%);
  box-shadow: 0 0 0 4px rgba(232, 92, 26, .08); }
.rx-ctvt::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.rx-ctvt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rx-ctvt-head h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--ink, #111111); }
.rx-ctvt-head h3 span { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--brand); color: #FFFFFF; font-size: 11px; letter-spacing: .04em; }
.rx-ctvt-head .hint { flex: 1; min-width: 160px; }
.rx-ctvt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.rx-ctvt-sec { padding: 10px 12px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.rx-ctvt-sec h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.rx-ctvt-sec h4 b { padding: 1px 7px; border-radius: 6px; background: var(--ink, #111111); color: #FFFFFF; font-size: 11px; letter-spacing: .05em; }
.rx-ctvt-sec h4 .hint { font-weight: 600; }
.rx-vticon { width: 22px; height: 26px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 1.6; color: var(--brand-dark); }
.rx-ctvt-note { margin: 8px 0 0; }
.rx-ctvt .rx-mgrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

/* simulating: no side card - the left panel hidden, the live dashboard over the drawing (2026-11-10) */
.designer.simulating .dz-body { grid-template-columns: 0 1fr; }
.designer.simulating .dz-lib { display: none; }
.dd-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; color: #8A93A0; font-size: 11px; }
.dd-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-left: 4px; }

/* requests for design: LV / MV (2026-11-10) */
.volt-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px;
  font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.volt-tag.lv { background: #E3EEFB; color: #1F5FA8; }
.volt-tag.mv { background: var(--brand-soft); color: var(--brand-dark); }
.volt-tag.both { background: linear-gradient(90deg, #E3EEFB 50%, var(--brand-soft) 50%); color: var(--ink); }
:root[data-theme="dark"] .volt-tag.lv { background: rgba(80, 140, 230, .2); color: #8AB8F0; }
:root[data-theme="dark"] .volt-tag.both { background: linear-gradient(90deg, rgba(80, 140, 230, .25) 50%, var(--brand-soft) 50%); }

/* RMU SLD editor: a VPI / an EFI per cubicle (P-RAL), 2026-11-11 */
.rx-ind { display: flex; gap: 6px; flex-wrap: wrap; }
.rx-ind button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 8px; border-radius: 999px;
  border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); font: inherit; font-size: 12.5px;
  font-weight: 700; cursor: pointer; }
.rx-ind button i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal;
  font-size: 11px; background: var(--surface-2); }
.rx-ind button.on { border: 1px solid var(--brand); color: var(--brand-dark); background: var(--brand-tint); }
.rx-ind button.on i { background: var(--brand); color: #FFFFFF; }
.rx-ind button.mod { box-shadow: 0 0 0 2px rgba(250, 204, 21, .55); }

/* requests for design, a section of its own (2026-11-11): the LV / MV / All bar in the format of the other tiles'
   filters (a segmented control), the tile framed in the colour of the choice (LV blue, MV orange) */
.tile-rfd { --rfd: #1F2937; --rfd-soft: #F1F3F5; --rfd-ink: #111111;
  border: 1.5px solid color-mix(in srgb, var(--rfd) 45%, var(--line)); box-shadow: var(--shadow), 0 0 0 4px var(--rfd-soft); }
.tile-rfd[data-volt="LV"] { --rfd: #1F6FD1; --rfd-soft: #E3EEFB; --rfd-ink: #164E96; }
.tile-rfd[data-volt="MV"] { --rfd: #E85C1A; --rfd-soft: #FCEBE2; --rfd-ink: #B8440F; }
:root[data-theme="dark"] .tile-rfd { --rfd: #9CA3AF; --rfd-soft: rgba(255, 255, 255, .06); --rfd-ink: #F3F4F6; }
:root[data-theme="dark"] .tile-rfd[data-volt="LV"] { --rfd: #5B9BEA; --rfd-soft: rgba(91, 155, 234, .16); --rfd-ink: #A9CBF5; }
:root[data-theme="dark"] .tile-rfd[data-volt="MV"] { --rfd: #F07A43; --rfd-soft: rgba(240, 122, 67, .16); --rfd-ink: #F7B08E; }
.tile-rfd .tile-head h2 { color: var(--rfd-ink); }
.rfd-filters .seg button .n { margin-left: 2px; font-weight: 700; color: var(--muted); }
#rfd-volt button.on { color: var(--rfd-ink); }
#rfd-volt button.on .n { color: var(--rfd); }
/* ================================================================ the BOM in the left column of the Edit page (bom.js,
   2026-11-11: "see the BOM in the app on the edit page, in the left side; when I click on an item it will change page and
   zoom in the part - make all transitions smooth") */
.ws-head .side-tabs { flex: 1; min-width: 0; padding: 3px; border-radius: 12px; }
.ws-head .side-tabs button { height: 26px; font-size: 12px; }
.ws-head:has(.side-tabs:not([hidden])) .label { display: none; }
.sidebar.bom-on #search, .sidebar.bom-on #panel-list { display: none; }
.bom-side { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding-right: 12px; }
.bom-side[hidden] { display: none; }
.bom-head { display: flex; flex-direction: column; gap: 2px; padding: 2px 6px 0; }
.bom-head b { font-size: 14px; font-weight: 800; letter-spacing: .01em; color: var(--ink); }
.bom-head span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.bom-side input[type=search] { margin: 4px 0 0 !important; flex: none; width: 100%; }
.bom-filters { display: flex; flex-wrap: wrap; gap: 3px; flex: none; }
.bom-filters .chip { height: 22px; padding: 0 7px; font-size: 11px; }
.bom-filters:empty { display: none; }
.bom-filters .chip[data-n]::after { content: attr(data-n); margin-left: 5px; font-weight: 700; color: var(--muted); }
.bom-filters .chip.active[data-n]::after { color: var(--brand-dark); }
.bom-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 0 14px; overscroll-behavior: contain; }
/* the categories of the BOM (rules/rmu_bom_erp.json): a header that stays in sight while its lines scroll, and opens
   or closes them (2026-11-11: "make option to close the category") */
.bom-group { list-style: none; }
.bom-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.bom-lines[hidden] { display: none; }
.bom-cat { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px; width: 100%; margin: 0;
  padding: 8px 8px 6px 4px; border: 0; border-radius: 8px; background: var(--canvas); font-family: inherit;
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
  text-align: left; cursor: pointer; transition: color .15s, background .15s; }
.bom-cat > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bom-cat:hover { color: var(--ink); background: var(--surface-2); }
.bom-cat:focus-visible { outline: 2px solid var(--brand-soft-2); outline-offset: -2px; }
.bom-caret { flex: none; width: 13px; height: 13px; color: var(--muted); transition: transform .22s cubic-bezier(.22, .61, .36, 1); }
.bom-group.closed .bom-caret { transform: rotate(-90deg); }
.bom-cat i { font-style: normal; letter-spacing: 0; min-width: 18px; height: 17px; padding: 0 5px; border-radius: 999px;
  background: var(--surface-3); color: var(--muted); font-size: 10.5px; display: inline-flex; align-items: center;
  justify-content: center; }
.bom-cat em { flex: none; margin-left: auto; font-style: normal; letter-spacing: 0; text-transform: none; font-weight: 600;
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bom-group.closed + .bom-group .bom-cat { margin-top: 2px; }
.bom-erp { display: block; margin-top: 3px; font-weight: 600; color: var(--muted); }
.bom-erp.ok { color: var(--ok); }
.bom-erp.warn { color: var(--warn); }
.bom-noerp { font-style: normal; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 999px;
  background: var(--warn-bg); color: var(--warn); }
.bom-line > .ws-row { align-items: flex-start; transition: background .18s, box-shadow .18s; }
.bom-line > .ws-row:focus-visible { outline: 2px solid var(--brand-soft-2); outline-offset: -2px; }
.bom-line.open > .ws-row { background: var(--brand-tint); box-shadow: inset 3px 0 0 var(--brand); }
.bom-line.nowhere .ws-main b { color: var(--ink-2); font-weight: 500; }
.bom-line .ws-main b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  overflow-wrap: anywhere; line-height: 1.3; }
.bom-line .ws-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bom-line.open .ws-main b { -webkit-line-clamp: unset; }
.bom-line.open .ws-sub { white-space: normal; overflow-wrap: anywhere; }
.bom-q { flex: none; white-space: nowrap; line-height: 1.3; }
.bom-unit { font-size: 10.5px; color: var(--muted); }
.bom-dot { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--muted-2); }
.bom-dot.ok { background: var(--ok); }
.bom-dot.brand { background: var(--brand); }
.bom-dot.warn { background: #D97706; }
.bom-dot.info { background: var(--info); }
.bom-dot.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.bom-detail { display: flex; flex-direction: column; gap: 7px; padding: 6px 8px 10px 50px; font-size: 12px; color: var(--ink-2);
  line-height: 1.45; animation: bom-open .26s cubic-bezier(.22, .61, .36, 1); }
@keyframes bom-open { from { opacity: 0; transform: translateY(-5px); } }
.bom-places { display: flex; flex-wrap: wrap; gap: 4px; }
.bom-place { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 24px; padding: 0 9px 0 3px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); font: inherit;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s; }
.bom-place .n { flex: none; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--surface-2);
  color: var(--muted); font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums; transition: background .18s, color .18s; }
.bom-place:hover { border-color: var(--brand-line); color: var(--ink); }
.bom-place.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-dark); }
.bom-place.on .n { background: var(--brand); color: #FFFFFF; }
.bom-none { color: var(--muted); }
.bom-st { font-weight: 700; }
.bom-st.ok { color: var(--ok); }
.bom-st.brand { color: var(--brand-dark); }
.bom-st.warn { color: var(--warn); }
.bom-st.info { color: var(--info); }
.bom-st.hollow, .bom-st.grey { color: var(--muted); }
.bom-rule summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 11.5px; }
.bom-rule summary:hover { color: var(--ink); }
.bom-rule p { margin: 4px 0 0; }
/* the PLGEAR guide in the same column (bom.js renderGuide): what an element does, its data, rules and sources */
.guide-about { display: block; margin-top: 3px; color: var(--muted); }
.guide-line .ws-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.guide-detail { padding-left: 46px; }
.guide-text { margin: 0; line-height: 1.45; color: var(--ink); }
.guide-data { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.guide-data td { padding: 3px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.guide-data td:first-child { width: 44%; color: var(--muted); }
.guide-data td:last-child { font-weight: 600; color: var(--ink); }
.guide-rules { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 3px; line-height: 1.4; }
.guide-rules li::marker { color: var(--brand); }
.guide-src { font-size: 11px; color: var(--muted); }
.bom-calc { color: var(--muted); font-variant-numeric: tabular-nums; }
/* the part on its sheet: marked until the next line (app.js markParts) */
.stage-sheet .bom-mark rect { fill: rgba(232, 92, 26, .13); stroke: #E85C1A; stroke-width: 2px; vector-effect: non-scaling-stroke;
  animation: bom-hit 1.5s cubic-bezier(.22, .61, .36, 1) .55s both; pointer-events: none; }
@keyframes bom-hit { 0% { stroke-width: 14px; stroke-opacity: 0; fill-opacity: 0; } 45% { stroke-opacity: .9; } 100% { stroke-width: 2px; stroke-opacity: 1; fill-opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bom-detail, .stage-sheet .bom-mark rect { animation: none; } .bom-caret { transition: none; } }

/* ================================================================ Check - the points to check, confirmed one by one
   (2026-11-11: "a new step, customized, easy to check and easy to confirm, in the main bar between design and review") */
.rb-switch > button .ck-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 2px;
  border-radius: 999px; font-size: 11.5px; font-weight: 800; line-height: 1; }
.rb-switch > button#tb-check.open .ck-n { background: #DC2626; color: #FFFFFF; }
.rb-switch > button#tb-check.done .ck-n { background: #16A34A; color: #FFFFFF; }
.rb-switch > button#tb-check.open:not(.on) { color: #B91C1C; }
.rb-switch > button.locked { opacity: .55; }
.rb-switch > button.locked::after { content: "\1F512"; font-size: 11px; margin-left: 2px; }
.check-view { flex: 1; min-height: 0; overflow: auto; background: var(--canvas); }
.check-view[hidden] { display: none; }
.ck-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; max-width: 1200px; margin: 0 auto; padding: 22px; }
.ck-items { display: flex; flex-direction: column; gap: 6px; }
.ck-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ck-item:hover { border-color: var(--line-strong); }
.ck-item.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ck-item .no { font-size: 12px; font-weight: 800; color: var(--muted); }
.ck-item .nm { min-width: 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-item .ct { min-width: 24px; height: 22px; display: inline-grid; place-items: center; padding: 0 7px; border-radius: 999px;
  font-size: 12px; font-weight: 800; background: #FEE2E2; color: #B91C1C; }
.ck-item.done .ct { background: #DCFCE7; color: #15803D; }
.ck-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ck-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: 16px; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow); }
.ck-head > div:first-child { flex: 1; min-width: 200px; }
.ck-head h2 { margin: 2px 0 0; font-size: 20px; font-weight: 800; }
.ck-prog { display: flex; align-items: center; gap: 10px; }
.ck-prog .bar { width: 160px; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ck-prog .bar i { display: block; height: 100%; background: #F59E0B; border-radius: 999px; transition: width .25s ease; }
.ck-prog.done .bar i { background: #16A34A; }
.ck-prog b { font-size: 13px; white-space: nowrap; }
.ck-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
/* the points in sections (2026-11-15) */
.ck-sec { display: flex; flex-direction: column; gap: 8px; }
.ck-sec + .ck-sec { margin-top: 10px; }
.ck-sec-head { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.ck-sec-head h3 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.ck-sec-ct { font-size: 12px; color: var(--muted); }
.ck-sec-head .btn { margin-left: auto; }
.ck-sec.done .ck-sec-head h3 { color: #16A34A; }
.ck-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: 14px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid #F59E0B;
  transition: border-color .2s, background .2s, opacity .2s; }
.ck-card.ok { border-left-color: #16A34A; background: color-mix(in srgb, #16A34A 6%, var(--card)); }
.ck-no { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 800;
  background: #FEF3C7; color: #92400E; }
.ck-card.ok .ck-no { background: #16A34A; color: #FFFFFF; }
.ck-text { font-size: 14px; line-height: 1.45; color: var(--ink); }
.ck-card.ok .ck-text { color: var(--ink-2); }
.ck-by { font-size: 12px; color: #15803D; white-space: nowrap; }
.ck-ok { white-space: nowrap; }
.ck-foot { margin: 2px 4px; }
.ck-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 26px; border-radius: 16px; background: var(--card);
  border: 1px solid var(--line); }
.ck-empty b { font-size: 17px; }
.ck-empty.ok b { color: #15803D; }
.ck-empty .btn { margin-top: 8px; }
.ck-none-all { margin: 0; color: var(--muted); font-size: 13px; }
:root[data-theme="dark"] .ck-item .ct { background: rgba(220, 38, 38, .2); color: #FCA5A5; }
:root[data-theme="dark"] .ck-item.done .ct { background: rgba(22, 163, 74, .2); color: #86EFAC; }
:root[data-theme="dark"] .ck-no { background: rgba(245, 158, 11, .2); color: #FCD34D; }
@media (max-width: 860px) { .ck-wrap { grid-template-columns: 1fr; padding: 14px; } .ck-items { flex-direction: row; flex-wrap: wrap; }
  .ck-card { grid-template-columns: 30px 1fr; } .ck-card .ck-by, .ck-card .btn { grid-column: 2; justify-self: start; } }

/* Live RFD, live from ERPNext (2026-11-11 / 11-12): the Update now button and the live mark */
.rfd-refresh { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-family: inherit; font-size: 13px;
  font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; }
.rfd-refresh:hover { color: var(--brand-dark); border-color: var(--brand); }
.rfd-refresh:disabled { cursor: progress; opacity: .75; }
.rfd-refresh[hidden] { display: none; }
.rfd-refresh .rfd-spin { display: inline-block; font-size: 15px; }
.rfd-refresh.spin .rfd-spin { animation: rfd-spin .8s linear infinite; }
@keyframes rfd-spin { to { transform: rotate(360deg); } }
#rfd-foot .live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #16A34A;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .2); vertical-align: 1px; }
#rfd-foot .bad { color: var(--danger, #B91C1C); font-weight: 600; }

/* a P-CSS's layouts: the attachments dialog (app.js pcl*) */
.pcl-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); color: var(--ink); box-shadow: var(--pop-shadow); }
.pcl-dialog::backdrop { background: rgba(17, 17, 17, .45); }
.pcl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 12px; }
.pcl-head h2 { margin: 2px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.pcl-head .btn.icon { font-size: 20px; line-height: 1; width: 34px; padding: 0; }
.pcl-drop { margin: 0 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); cursor: pointer;
  text-align: center; transition: border-color .15s, background .15s; }
.pcl-drop svg { width: 30px; height: 30px; color: var(--brand); margin-bottom: 4px; }
.pcl-drop b { font-size: 15px; }
.pcl-drop span { font-size: 12.5px; color: var(--muted); }
.pcl-drop u { color: var(--brand-dark); text-decoration: none; font-weight: 600; }
.pcl-drop.over, .pcl-drop:hover { border-color: var(--brand); background: var(--brand-tint); }
.pcl-drop:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.pcl-queue, .pcl-have { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pcl-queue { margin: 12px 22px 0; }
.pcl-queue:empty { display: none; }
.pcl-file { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.pcl-file .ic { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; color: #fff; background: var(--brand); }
.pcl-file .ic.dwg { background: #3A3A3A; }
.pcl-file .ic.pdf { background: #B3261E; }
.pcl-file.ok { border-color: #43A047; }
.pcl-file.ok small { color: #2E7D32; }
.pcl-bar-row { display: block; height: 3px; margin: 2px 0 0 7px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.pcl-bar-row > i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.pcl-file .x:disabled { opacity: .35; cursor: default; }
.pcl-file .meta { min-width: 0; display: grid; gap: 3px; }
.pcl-file .meta input { width: 100%; font: inherit; font-size: 13px; font-weight: 600; padding: 3px 6px; border: 1px solid transparent;
  border-radius: 4px; background: transparent; color: var(--ink); }
.pcl-file .meta input:hover, .pcl-file .meta input:focus { border-color: var(--line-strong); background: var(--surface-2); }
.pcl-file .meta small { font-size: 11.5px; color: var(--muted); padding-left: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcl-file.bad { border-color: #E53935; }
.pcl-file.bad small { color: #C62828; white-space: normal; }
.pcl-file .x { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.pcl-file .x:hover { background: var(--surface-3); color: var(--ink); }
.pcl-section { margin: 16px 22px 0; display: grid; gap: 8px; }
.pcl-have .pcl-file .meta b { font-size: 13px; padding-left: 7px; }
.pcl-file.warn { border-color: #F2B35A; }
.pcl-erp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pcl-erp-head .label { flex: 1 1 auto; }
.pcl-tag { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; font-size: 10px; font-weight: 700;
  letter-spacing: .03em; vertical-align: 1px; background: var(--brand-tint); color: var(--brand-dark); }
.pcl-erp-none { font-size: 12.5px; color: var(--muted); }
.pcl-file.warn small { color: #A05A00; white-space: normal; }
.pcl-progress { margin: 14px 22px 0; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.pcl-progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.pcl-foot { display: flex; align-items: center; gap: 8px; padding: 18px 22px 20px; }
.pcl-msg { flex: 1; font-size: 12.5px; color: var(--muted); }
.pcl-msg.bad { color: #C62828; }

/* a P-CSS's General Characteristics: tick boxes (workspace.js) */
.pcx-row { display: grid; grid-template-columns: 1fr; gap: 4px; align-items: start; }
.pcx-opts { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.pcx-opt { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 2px 0; font: inherit;
  font-size: 12.5px; color: var(--muted, #6b6b6b); cursor: pointer; }
.pcx-opt i { width: 12px; height: 12px; border: 1.2px solid currentColor; border-radius: 2px; position: relative; flex: none; }
.pcx-opt.on { color: var(--ink, #1a1a1a); font-weight: 600; }
.pcx-opt.on i { border-color: var(--brand, #e8571c); background: var(--brand, #e8571c); }
.pcx-opt.on i::after { content: ""; position: absolute; left: 3px; top: 0; width: 3px; height: 7px; border: solid #fff;
  border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.pcx-opt:focus-visible { outline: 2px solid var(--brand, #e8571c); outline-offset: 2px; }
.pcl-foot .btn:disabled { opacity: .45; cursor: not-allowed; }
#rmutr-list { max-height: 340px; overflow: auto; }

/* the team's workflow (dashboard.js team / wfPanel, 2026-11-12) */
.team-title { display: flex; align-items: baseline; gap: 10px; }
.tile-team .tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.team-tabs .tt-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--surface-2);
  font-size: 11px; line-height: 18px; text-align: center; color: var(--ink-2); }
.team-tabs button.on .tt-n { background: var(--brand-soft); color: var(--brand-dark); }
#team-count.hot { color: var(--brand-dark); font-weight: 700; }
.team-flow { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 12px; padding: 0; font-size: 12px; color: var(--muted); }
.team-flow li { display: flex; align-items: center; gap: 6px; }
.team-flow li span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3);
  color: var(--ink-2); font-size: 10.5px; font-weight: 700; }
.team-flow li:not(:last-child):not(.tf-back)::after { content: "→"; margin-left: 12px; color: var(--line-strong); }
.team-flow .tf-back span { background: var(--warn-bg); color: var(--warn); }
.team-list { max-height: 520px; }
/* (2026-11-22, "Fix the texts overlapping") the team's list keeps to its tile: its wrapper shrinks with it, a long
   title and the name beside it are cut with "..." instead of running past the tile */
.tile-team .team-body, .tile-list > .dash-list { min-width: 0; max-width: 100%; }
.tile-team .team-body { width: 100%; }
.tile-team .dr-side { flex: 0 1 auto; min-width: 0; }
.tile-team .dr-when { min-width: 0; }
.dash-row-wrap { display: flex; align-items: stretch; gap: 2px; }
/* My projects: In design / Designed (2026-11-15), each item's revisions */
.mine-sec { list-style: none; border-radius: 10px; }
.mine-sec + .mine-sec { margin-top: 12px; }
.mine-sec-head { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 4px 4px 6px; border: 0;
  border-bottom: 1px solid var(--line); margin-bottom: 4px; background: none; color: inherit; font: inherit; text-align: left;
  cursor: pointer; }
.mine-sec-head:hover h3 { color: var(--brand); }
.ms-caret { font-size: 11px; color: var(--muted); transition: transform .15s ease; }
.mine-sec.closed .ms-caret { transform: rotate(-90deg); }
.mine-sec.closed .mine-sec-head { margin-bottom: 0; }
.mine-sec-changes .mine-sec-head h3 { color: #C62828; }
.mine-sec-pending .mine-sec-head h3 { color: #B26A00; }
.mine-sec-review .mine-sec-head h3, .mine-sec-approved .mine-sec-head h3 { color: #1565C0; }
/* My projects as cards (2026-11-16): equipment, a stage tracker, the last event; opened: items and the history */
.mine-view { margin-left: auto; }
.mine-view + .mine-search { margin-left: 8px; }
.mp-list { gap: 8px; }
#mine-list { max-height: 640px; }
.mp-card { list-style: none; border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.mp-card.open { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.mp-head { display: flex; align-items: stretch; gap: 10px; }
.mp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 0;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mp-main:hover .mp-title b { color: var(--brand); }
.mp-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mp-title b { font-size: 15px; font-weight: 800; }
.mp-sub { font-size: 12.5px; color: var(--muted); }
.mp-last { font-size: 12px; color: var(--muted); }
.mp-last b { color: inherit; font-weight: 700; }
.mp-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 6px; padding: 10px 12px; flex: none; }
.mp-more { border: 1px solid var(--line); background: none; color: inherit; font: inherit; font-size: 12px; font-weight: 600;
  border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.mp-more:hover { border-color: var(--brand); color: var(--brand); }
/* the person's own notes on a project (2026-11-18) */
.mp-notebtn.has { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-tint); }
.mp-note { display: block; margin-top: 4px; padding: 4px 8px; border-left: 3px solid var(--brand); border-radius: 4px;
  background: var(--brand-tint); color: var(--ink-2); font-size: 12px; white-space: pre-line; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: start; }
.mp-noteform { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px 12px; border-top: 1px dashed var(--line); }
.mp-noteform textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 64px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; }
.mp-noteform textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; }
.mp-noteact { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.mp-noteact .muted { margin-right: auto; font-size: 12px; }
.pill-ok { background: color-mix(in srgb, #16A34A 14%, transparent); color: #16A34A; }
.eq-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px;
  border-radius: 6px; background: var(--surface-2, #EEE); color: var(--muted); }
.eq-pcss { background: color-mix(in srgb, #E85C1A 16%, transparent); color: #C2410C; }
.eq-rmu { background: color-mix(in srgb, #1565C0 14%, transparent); color: #1565C0; }
.eq-pdtr { background: color-mix(in srgb, #7C3AED 14%, transparent); color: #7C3AED; }
.eq-plgear { background: color-mix(in srgb, #0F766E 14%, transparent); color: #0F766E; }
.eq-lv { background: color-mix(in srgb, #64748B 16%, transparent); color: #475569; }
/* the stage tracker */
.mp-track { list-style: none; display: flex; margin: 4px 0 2px; padding: 0; gap: 0; max-width: 340px; }
.mp-track li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px;
  color: var(--muted); position: relative; }
.mp-track li::before { content: ""; position: absolute; top: 4px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.mp-track li:first-child::before { display: none; }
.mp-track li i { width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); z-index: 1; }
.mp-track li.done i { background: #16A34A; border-color: #16A34A; }
.mp-track li.done::before, .mp-track li.now::before { background: #16A34A; }
.mp-track li.now i { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.mp-track li.now span { color: inherit; font-weight: 700; }
.mp-track.back li.now i { background: #C62828; border-color: #C62828; }
/* opened: items and the history side by side, the workflow under them */
.mp-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 4px 12px 10px; border-top: 1px solid var(--line); }
.mp-body h4 { margin: 8px 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.mp-body h4 .count { color: var(--muted); font-weight: 600; margin-left: 4px; }
.mp-items, .mp-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.mp-items li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mp-hist { max-height: 220px; overflow-y: auto; }
.mp-hist li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: baseline; }
.mp-hist li i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transform: translateY(1px); }
.mp-hist .ev-rev i { background: #16A34A; } .mp-hist .ev-wf i { background: #1565C0; } .mp-hist .ev-new i { background: var(--brand); }
.mp-hist .when { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.mp-hist q { display: block; margin-top: 2px; color: var(--muted); font-style: italic; }
.mp-card .wf-panel.compact { margin: 0 12px 10px; }
.ms-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ms-eq { margin-top: 6px; }
.ms-eq .label { font-size: 10.5px; margin-right: 2px; }
.eq-filter { border: 1px solid transparent; font: inherit; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.eq-filter.on { border-color: currentColor; }
.mine-strip { flex-direction: column; }
@media (max-width: 720px) { .mp-body { grid-template-columns: 1fr; } .mp-head { flex-direction: column; } .mp-side { align-items: flex-start; flex-direction: row; flex-wrap: wrap; } }
/* the summary strip and the search (2026-11-16) */
.mine-search { margin-left: auto; height: 30px; min-width: 0; width: 200px; max-width: 45%; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2, transparent); color: inherit; font: inherit; font-size: 13px; }
.mine-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.mine-strip:empty { display: none; }
.ms-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px; border-radius: 999px; font: inherit;
  font-size: 12px; border: 1px solid var(--line); background: var(--card); color: inherit; cursor: pointer; }
.ms-chip b { font-size: 14px; font-weight: 800; }
.ms-chip:hover { border-color: var(--brand); }
.ms-changes b { color: #C62828; } .ms-pending b { color: #B26A00; } .ms-review b, .ms-approved b { color: #1565C0; }
.ms-designed b { color: #2E7D32; } .ms-check { cursor: default; } .ms-check b { color: #F59E0B; }
.mine-sec-head h3 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.mine-sec-designed .mine-sec-head h3 { color: #2E7D32; }
.mine-sec-head .count { font-size: 12px; font-weight: 700; color: var(--muted); }
.mine-sec-hint { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.mine-sec .dash-list { margin: 0; padding: 0; width: 100%; max-height: none; overflow: visible; }
.rev-pill.done { background: #E3F4E5; color: #1B5E20; border-color: #A5D6A7; }
.rev-pill.part { background: var(--surface-2); color: var(--ink); }
.rev-pill.pend { background: #FFF3E0; color: #9A4A00; border-color: #FFCC80; }
.rev-chip { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 800; letter-spacing: .02em;
  background: var(--brand-tint); color: var(--brand-dark); vertical-align: 1px; white-space: nowrap; }
.rev-chip.done { background: #E3F4E5; color: #1B5E20; }
.rev-items { display: grid; gap: 8px; margin-bottom: 10px; }
.rev-item b { font-size: 13px; }
.rev-list { list-style: none; margin: 4px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--line); display: grid; gap: 3px; }
.rev-list li { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.rev-list li.cur { color: var(--ink); }
.rev-list a { color: var(--brand-dark); font-weight: 600; }
.rev-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--card); color: var(--ink); box-shadow: var(--pop-shadow); }
.rev-dialog::backdrop { background: rgba(17, 17, 17, .45); }
.rev-dialog > * { margin-left: 20px; margin-right: 20px; }
.rev-dlg-head { padding-top: 18px; }
.rev-dlg-head h2 { margin: 2px 0 0; font-size: 20px; font-weight: 800; }
.rev-dialog p { font-size: 13px; color: var(--muted); line-height: 1.45; }
.rev-dlg-items { list-style: none; padding: 0; display: grid; gap: 6px; }
.rev-dlg-items li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 8px;
  background: var(--surface-2); border-radius: 8px; }
.rev-dlg-msg { color: #C62828 !important; min-height: 1em; }
.rev-dlg-rfd { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }   /* (2026-11-22) */
.rev-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding-bottom: 16px; }
/* (2026-11-22) a revision finishing: its modification saved, its drawing not on the Work Order yet */
.rev-pill.fin, .rev-chip.fin { background: #FFF3E0; color: #9A4A00; border-color: #FFCC80; }
.rev-dlg-steps { list-style: none; padding: 0; margin: 4px 20px; display: grid; gap: 4px; font-size: 13px; }
.rev-dlg-steps li { display: flex; align-items: center; gap: 8px; }
.rev-dlg-steps li i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #EF8A17; }
.rev-dlg-steps li.ok i { background: #2E7D32; }
.rev-dlg-steps a { color: var(--brand-dark); font-weight: 600; }
.dash-row-wrap .dash-row { flex: 1; min-width: 0; }
.wf-more { position: relative; flex: none; width: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font-size: 18px; cursor: pointer; }
.wf-more:hover, .wf-open .wf-more { background: var(--surface-2); color: var(--ink); }
.wf-dot { position: absolute; top: 9px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.wf-pill { white-space: nowrap; }
.wf-design { background: var(--surface-3); color: var(--ink-2); }
.wf-review { background: #E3EEFB; color: #164E96; }
.wf-changes { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.wf-approved { background: #E6F4EA; color: #1E7B3A; }
.wf-released { background: #1E7B3A; color: #fff; }
:root[data-theme="dark"] .wf-review { background: rgba(31, 111, 209, .22); color: #9CC3F5; }
:root[data-theme="dark"] .wf-approved { background: rgba(30, 123, 58, .25); color: #8FD3A5; }
.wf-face { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand-dark); font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.wf-face + .wf-face { margin-left: -8px; box-shadow: 0 0 0 2px var(--card); background: #E3EEFB; color: #164E96; }
.wf-panel { margin: 4px 8px 10px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius);
  background: var(--surface-2); display: grid; gap: 10px; }
.wf-who { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; font-weight: 600; }
.wf-who .label { display: block; margin-bottom: 2px; }
.wf-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; }
.wf-hist q { display: block; margin: 2px 0 0; padding-left: 8px; border-left: 2px solid var(--line-strong); color: var(--ink-2); quotes: none; }
.wf-none { margin: 0; font-size: 12.5px; }
.wf-act { display: grid; gap: 8px; }
.wf-act textarea { width: 100%; font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--card); color: var(--ink); resize: vertical; }
.wf-rev { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.wf-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-msg { margin: 0; font-size: 12px; color: var(--warn); min-height: 1em; }
/* ---------------------------------------------------------------- Live RFD as ERPNext's RFD list (2026-11-12: "the same
   filtering system in ERP and data shown"): its filters, its columns, its pill colours (the list script of ERPNext:
   Status = document status, Approval Stage = workflow state) */
.tile-rfd .tile-head { justify-content: flex-start; }
.tile-rfd .tile-head h2 { font-size: 19px; }
.rfd-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 6px 0 12px; padding: 12px 14px;
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.rfd-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rfd-fl { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rfd-f select, .rfd-f input { height: 32px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink);
  font: inherit; font-size: 13px; padding: 0 10px; min-width: 0; }
.rfd-f select { padding-right: 6px; max-width: 200px; }
.rfd-f input { width: 130px; }
/* (2026-11-21) RFD Number: this year's prefix fixed in the box, only the number typed */
.rfd-pre { display: inline-flex; align-items: center; height: 32px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--card); overflow: hidden; }
.rfd-pre:focus-within { outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 1px; border-color: var(--brand); }
.rfd-pre-t { padding: 0 1px 0 10px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rfd-f .rfd-pre input { width: 84px; height: 30px; border: 0; border-radius: 0; padding: 0 8px 0 0; background: transparent; }
.rfd-f .rfd-pre input:focus { outline: none; }
.rfd-f select:focus, .rfd-f input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 1px; border-color: var(--brand); }
.rfd-clear { height: 32px; border: 0; background: transparent; color: var(--brand-dark); font: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer; padding: 0 4px; }
.rfd-clear:hover { text-decoration: underline; }
.rfd-clear[hidden] { display: none; }

/* the table: ID, Type, Status, Approval Stage, Assigned Design Engineer, Assigned Project Manager, Sales Order, then
   ours (items, LV / MV), the assignees, the last change, the comments - as ERPNext's list */
/* (2026-11-21) the list is its tile's width, whatever a row holds */
.tile-rfd > .rfd-table { align-self: stretch; min-width: 0; }
/* (2026-11-19) the SLA in the last-change column ("replace the time with it"): the list fits its tile (1221 px) */
/* (2026-11-21) no Assigned Design Engineer column: the engineer is the ringed picture in Assigned To */
/* (2026-11-21) nor Status (the Approval Stage says it) nor Sales Order (under the RFD number) */
.rfd-table { --rfd-cols: minmax(170px, 1.6fr) minmax(104px, 1fr) 108px minmax(120px, 1fr) 96px 104px 104px 36px;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.rfd-th, .rfd-row { display: grid; grid-template-columns: var(--rfd-cols); column-gap: 12px; align-items: center; }
.rfd-th { padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 600;
  color: var(--muted); }
.rfd-th > span { line-height: 1.25; overflow-wrap: anywhere; }          /* ERPNext's long titles on two lines */
.rfd-rows { list-style: none; margin: 0; padding: 0; max-height: min(70vh, 760px); min-height: 220px; overflow-y: auto; }
.rfd-rows > li + li { border-top: 1px solid var(--line); }
.rfd-row { width: 100%; padding: 9px 14px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px;
  text-align: left; cursor: pointer; }
.rfd-row:hover { background: var(--surface-2); }
.rfd-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.rfd-row > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rfd-row .c-id { display: flex; flex-direction: column; gap: 1px; }
.rfd-row .c-id b { font-size: 13.5px; font-weight: 700; }
/* (2026-11-17: "add option next to RFD to open it next to RFD number") the RFD in ERPNext, beside its number */
.rfd-row .c-idl { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.rfd-row .c-id .sub .rfd-tag { height: 16px; padding: 0 5px; margin-right: 5px; font-size: 9px; font-weight: 800; letter-spacing: .04em; vertical-align: 1px; }   /* (2026-11-21) URGENT / FAST TRACK, first on the line */
.rfd-ext { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 6px; color: var(--muted);
  border: 1px solid transparent; cursor: pointer; }
.rfd-ext:hover { color: var(--brand-dark); border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  background: color-mix(in srgb, var(--brand) 8%, transparent); }
.rfd-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.rfd-erp-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--brand-dark);
  text-decoration: none; }
.rfd-erp-link:hover { text-decoration: underline; }
.rfd-row .c-id .sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rfd-row .c-id .c-idso { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }   /* its SO (2026-11-19) */
.rfd-row .c-eng, .rfd-row .c-pm, .rfd-row .c-so { color: var(--ink-2); }
.rfd-row .c-items { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.rfd-row .c-mod, .rfd-th .c-mod { text-align: right; color: var(--muted); font-size: 12px; }
/* (2026-11-19) the SLA: Late +N WD / Due today / On track, its due day and working days open under it */
.rfd-row .c-sla { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rfd-row .c-sla .rpill { height: 20px; padding: 0 7px; font-size: 10.5px; letter-spacing: .02em; }
.rfd-row .c-sla .sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rfd-row .c-com { display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; color: var(--muted); font-size: 12px; }
.rfd-th .c-com { text-align: right; }
.rfd-rows .dash-empty { padding: 18px 14px; }
/* the panels of each RFD under its row (2026-11-14): code, name, quantity, the five steps, the furthest one, ERPNext's */
.rfd-panels { list-style: none; margin: -2px 0 0; padding: 0 14px 8px 30px; display: flex; flex-direction: column; gap: 1px; }
.rp { width: 100%; display: grid; grid-template-columns: 22px minmax(195px, 1.2fr) minmax(0, 1.4fr) 50px 64px 140px 112px 236px minmax(0, 120px);
  align-items: center; column-gap: 10px; padding: 3px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.rp:hover { background: var(--surface-2); }
.rp:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.rp > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-no { color: var(--muted); font-variant-numeric: tabular-nums; }
.rp-code { font-weight: 650; color: var(--ink); }
.rp-name, .rp-qty, .rp-erp { color: var(--muted); }
.rp-qty { text-align: right; font-variant-numeric: tabular-nums; }
.rp-track { display: inline-flex; gap: 3px; }
/* (2026-11-17) what the RFD waits for now: the Cost Accountant's release, then the team leader's approval */
.rfd-next { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 10px 6px 36px; font-size: 12px; color: var(--muted); }
.rfd-next-l { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.rfd-next .rpill { flex: none; height: 20px; font-size: 11px; }
/* (2026-11-21) the line wraps in its row: a long one ("submit ... once it has: ...") never widens the list */
.rfd-next-w { flex: 1 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; color: var(--ink-2); font-weight: 600; }
.rfd-next.you { background: color-mix(in srgb, var(--brand) 7%, transparent); border-radius: 8px; }
.rfd-next-go { flex: none; margin-left: auto; height: 24px; padding: 0 10px; border: 1px solid var(--brand); border-radius: 999px;
  background: var(--brand); color: #fff; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.rfd-next-go:hover { filter: brightness(1.08); }
.rfd-you { height: 26px; padding: 0 11px; border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent); border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 9%, transparent); color: var(--brand-dark); font: inherit; font-size: 12px;
  font-weight: 700; cursor: pointer; white-space: nowrap; }
.rfd-you.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.rp-track i { width: 10px; height: 4px; border-radius: 2px; background: var(--surface-3); }
.rp-track i.on { background: var(--ok); }
.rp-state .rpill, .rp-bom .rpill, .rp-wo .rpill { height: 20px; font-size: 11px; }
@media (max-width: 1200px) {
  .rp { grid-template-columns: 22px minmax(190px, 1fr) 50px 64px 140px 112px 236px; }
  .rp-name, .rp-erp { display: none; }
}
@media (max-width: 900px) {
  .rfd-panels { padding-left: 14px; }
  .rp { grid-template-columns: 22px minmax(0, 1fr); row-gap: 2px; }
  .rp-qty, .rp-track { display: none; }
  .rp-state, .rp-bom, .rp-wo { grid-column: 2; }
  .rp-bom:empty, .rp-wo:empty { display: none; }
}
/* the pills of ERPNext's list (frappe indicator colours) */
.rpill { display: inline-flex; align-items: center; max-width: 100%; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px;
  font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #F3F3F3; color: #525252; }
.rpill.red { background: #FFF0F0; color: #CC2929; }
.rpill.blue { background: #EDF6FD; color: #0070CC; }
.rpill.orange { background: #FFF1E7; color: #C2410C; }
.rpill.yellow { background: #FFF7D3; color: #8A5A00; }
.rpill.green { background: #E4F5E9; color: #16794C; }
.rpill.dark { background: #E5E7EB; color: #1F2937; }
:root[data-theme="dark"] .rpill { background: rgba(255, 255, 255, .08); color: #D2D2D2; }
:root[data-theme="dark"] .rpill.red { background: rgba(229, 72, 77, .18); color: #FF8A8A; }
:root[data-theme="dark"] .rpill.blue { background: rgba(56, 132, 255, .18); color: #8AB8F0; }
:root[data-theme="dark"] .rpill.orange { background: rgba(240, 122, 67, .18); color: #F7B08E; }
:root[data-theme="dark"] .rpill.yellow { background: rgba(234, 179, 8, .18); color: #F5D46B; }
:root[data-theme="dark"] .rpill.green { background: rgba(34, 197, 94, .16); color: #86E0A8; }
:root[data-theme="dark"] .rpill.dark { background: rgba(255, 255, 255, .14); color: #F3F4F6; }
/* the assignees: ERPNext's avatars as initials (its pictures are private to ERPNext) */
.rfd-row .c-asg { display: flex; align-items: center; }
.rfd-av { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; font-size: 10px; font-weight: 700;
  color: hsl(var(--h, 20) 45% 28%); background: hsl(var(--h, 20) 60% 88%); box-shadow: 0 0 0 2px var(--card); }
.rfd-av + .rfd-av { margin-left: -6px; }          /* overlapped as ERPNext's */
/* (2026-11-21) the Assigned Design Engineer: a light ring, on top of the pictures beside it */
.rfd-av.eng { position: relative; z-index: 1; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px color-mix(in srgb, var(--brand) 55%, transparent); }
.rfd-row .c-asg { padding-left: 4px; }
img.rfd-av { object-fit: cover; padding: 0; background: var(--surface-3); }   /* the person's ERPNext picture */
.rfd-person { display: inline-flex; align-items: center; gap: 7px; margin: 2px 14px 2px 0; font-weight: 600; }
.rfd-person .rfd-av { width: 26px; height: 26px; box-shadow: none; }
.rfd-facts div.wide { grid-column: span 2; }
.rfd-av.more { color: var(--ink-2); background: var(--surface-3); }
:root[data-theme="dark"] .rfd-av { color: hsl(var(--h, 20) 60% 82%); background: hsl(var(--h, 20) 30% 26%); }
/* narrower screens: ERPNext drops columns as the list narrows (2026-11-19: the SLA's room - from 1320 px) */
@media (max-width: 1100px) {   /* (2026-11-21) the Project Manager stays down to 1100 px */
  .rfd-table { --rfd-cols: minmax(170px, 1.6fr) minmax(104px, 1fr) 108px 96px 104px 104px 36px; }
  .rfd-table .c-pm { display: none; }
}
@media (max-width: 1100px) {
  .rfd-table { --rfd-cols: minmax(150px, 1.5fr) minmax(104px, 1fr) 108px 96px 104px 104px 36px; }
  .rfd-table .c-pm, .rfd-table .c-eng, .rfd-table .c-so { display: none; }
}
@media (max-width: 1000px) {
  .rfd-table { --rfd-cols: minmax(140px, 1.5fr) minmax(104px, 1fr) 108px 96px 104px 36px; }
  .rfd-table .c-pm, .rfd-table .c-eng, .rfd-table .c-so, .rfd-table .c-asg { display: none; }
}
@media (max-width: 720px) {          /* a phone: the ID, its status and its stage */
  .rfd-table { --rfd-cols: minmax(0, 1fr) 96px; }
  .rfd-th, .rfd-row { column-gap: 8px; }
  .rfd-th, .rfd-row { padding-left: 10px; padding-right: 10px; }
  .rfd-table .c-pm, .rfd-table .c-eng, .rfd-table .c-so, .rfd-table .c-type, .rfd-table .c-items, .rfd-table .c-asg,
  .rfd-table .c-mod, .rfd-table .c-com, .rfd-table .c-sla { display: none; }
  .rfd-f input { width: 110px; }
}

/* the P-CSS characteristics' own data: a typed value (+), the weight, the rows added (workspace.js) */
.pcx-plus { width: 20px; height: 20px; border-radius: 50%; border: 1px dashed var(--line-strong); background: transparent;
  color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.pcx-plus:hover, .pcx-plus.on { border-style: solid; border-color: var(--brand); color: var(--brand-dark); }
.pcx-custom { display: flex; align-items: center; gap: 8px; }
.pcx-custom input { flex: 1; min-width: 0; font: inherit; font-size: 12.5px; padding: 4px 7px; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--card); color: var(--ink); }
.pcx-custom input[type=number] { flex: 0 0 110px; }
.pcx-extra { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; }
.pcx-addrow { display: flex; gap: 6px; margin: 6px 0 2px; }
.pcx-addrow input { flex: 1; min-width: 0; font: inherit; font-size: 12.5px; padding: 4px 7px; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--card); color: var(--ink); }
.pcx-addbtn { margin: 6px 0 2px; font-size: 12.5px; }
/* ---------------------------------------------------------------- Upload to ERPNext (2026-11-12): a dry run, then the
   click - each item's Item PDF into its RFD row's Design Attachment */
.erp-dialog { width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); color: var(--ink); box-shadow: var(--pop-shadow); }
.erp-dialog::backdrop { background: rgba(17, 17, 17, .45); }
.erp-head { display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px 6px; }
.erp-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.erp-heading h2 { margin: 2px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.erp-rfd { color: var(--muted); font-size: 13.5px; }
.erp-rfd a { color: var(--brand-dark); font-weight: 700; }
.erp-head .btn.icon { font-size: 20px; line-height: 1; width: 34px; padding: 0; }
.erp-note { margin: 4px 24px 12px; color: var(--muted); font-size: 12.5px; }
.erp-list { list-style: none; margin: 0 24px; padding: 0; border: 1px solid var(--line); border-top: 3px solid var(--brand);
  border-radius: var(--radius); overflow: hidden; }
.erp-list > li + li { border-top: 1px dashed var(--line); }
.erp-list label { display: grid; grid-template-columns: 20px minmax(0, 1.1fr) minmax(0, 1.3fr); gap: 4px 12px; align-items: center;
  padding: 12px 16px; cursor: pointer; }
.erp-list li.off label { cursor: default; color: var(--muted); }
.erp-list input { width: 16px; height: 16px; accent-color: var(--brand); }
.erp-item { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.erp-item b { font-size: 13.5px; }
.erp-item span, .erp-file span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.erp-file { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 13px; }
.erp-file > span:first-child { color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.erp-rep { color: var(--warn, #B45309) !important; }
.erp-state { grid-column: 2 / -1; font-size: 12.5px; color: var(--muted); }
.erp-state:empty { display: none; }
.erp-state.ok { color: var(--ok, #15803D); font-weight: 700; }
.erp-state.bad { color: var(--danger, #B91C1C); font-weight: 700; }
/* (2026-11-21) what is missing before an upload, said plainly, with its way */
.erp-state.warn { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; border-radius: 8px;
  background: #FFF7ED; color: #9A3412; font-weight: 600; }
:root[data-theme="dark"] .erp-state.warn { background: rgba(240, 122, 67, .14); color: #F7B08E; }
.erp-review { flex: none; }
.erp-wait, .erp-bad { padding: 16px; font-size: 13px; }
.erp-bad { color: var(--danger, #B91C1C); font-weight: 600; }
.erp-foot { display: flex; align-items: center; gap: 10px; padding: 16px 24px 20px; }
.erp-msg { flex: 1; font-size: 13px; color: var(--muted); font-weight: 600; }
.erp-foot .btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
@media (max-width: 640px) {
  .erp-list label { grid-template-columns: 20px minmax(0, 1fr); }
  .erp-file, .erp-state { grid-column: 2; }
}

/* ERPNext BOM and Work Order of the item (2026-11-12): the plan, its questions, the editable components */
.erp-dialog.wide { width: min(1020px, calc(100vw - 32px)); }
.erp-close-rows { margin: 4px 24px 0; overflow-x: auto; }
.erp-close-tbl { width: 100%; border-collapse: collapse; font-size: 13px; border-top: 3px solid var(--brand); }
.erp-close-tbl th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 8px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.erp-close-tbl td { padding: 8px 10px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.erp-close-tbl td small { display: block; color: var(--muted); font-size: 11.5px; }
.erp-close-tbl td .ok, .erp-close-tbl td .bad { font-weight: 800; font-size: 15px; }
.erp-close-tbl td .ok { color: var(--ok, #15803D); }
.erp-close-tbl td .bad { color: var(--danger, #B91C1C); }
.erp-close-tbl tr.bad td:first-child { box-shadow: inset 3px 0 0 var(--danger, #B91C1C); }
.erp-close-tbl .empty { color: var(--muted); text-align: center; }
.erp-facts { margin: 4px 24px 6px; }
.erp-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 18px; margin: 0 0 10px; }
.erp-dl div { min-width: 0; }
.erp-dl dt { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.erp-dl dd { margin: 2px 0 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.erp-ask { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; margin: 6px 24px 10px; }
.erp-facts .erp-ask { margin: 6px 0 0; }
/* (2026-11-22) a designed project opened View only: its bar under the top bar */
.vo-bar { display: flex; align-items: center; gap: 10px; padding: 8px 20px; background: var(--brand-tint); color: var(--ink-2);
  border-bottom: 1px solid var(--brand); font-size: 13px; }
.vo-bar[hidden] { display: none; }
.vo-bar b { color: var(--brand-dark); }
.vo-bar .btn { margin-left: auto; }
.vo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
/* (2026-11-22) Upload to Work Order: its window */
.woup-dialog { width: min(600px, calc(100vw - 32px)); }
.wu-body { padding: 4px 24px 6px; display: flex; flex-direction: column; gap: 10px; }
.wu-file { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 13px; }
.wu-file b { overflow-wrap: anywhere; }
.wu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wu-list label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 13px; cursor: pointer; }
.wu-list a { color: var(--brand-dark); font-weight: 700; text-decoration: none; }
.wu-list .warn { flex-basis: 100%; font-size: 12px; color: var(--warn); }
/* (2026-11-22) the team leaders' Reassign: a button on the card, its window */
.rc-reassign { flex: none; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--brand-dark);
  font: inherit; font-size: 12px; font-weight: 700; padding: 3px 10px; cursor: pointer; }
.rc-reassign:hover { border-color: var(--brand); background: var(--brand-tint); }
.reassign-dialog { width: min(520px, calc(100vw - 32px)); }
.ra-body { padding: 4px 24px 6px; display: flex; flex-direction: column; gap: 10px; }
.ra-body select { width: 100%; }
.ra-plan { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
/* (2026-11-19) Live RFD: one row per sales order, its requests' history */
#rfd-list .c-type { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.rfd-hist.many { border-color: var(--brand); color: var(--brand-dark); }
.rfd-hist { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.rfd-hist:hover, .rfd-hist:focus-visible { border-color: var(--brand); color: var(--brand-dark); }
.rfdhist-dialog { width: min(640px, calc(100vw - 32px)); }
.rh-list { list-style: none; margin: 4px 24px 22px; padding: 0; }
.rh-step { position: relative; display: flex; gap: 12px; padding: 0 0 16px; }
.rh-step::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.rh-step:last-child::before { display: none; }
.rh-dot { flex: none; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--brand); background: var(--card); }
.rh-step.last .rh-dot { background: var(--brand); }
.rh-open .rh-dot { border-style: dashed; border-color: var(--muted); }
.rh-done .rh-dot { border-color: var(--ok); background: var(--ok); }
.rh-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rh-top, .rh-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.rh-sub .muted { font-size: 12px; color: var(--muted); }
/* (2026-11-19) a P-CSS's RMU Work Order: its own block, across the dialog */
.erp-ask .wo-rmu { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 6px; }
.erp-ask .wo-rmu .mod-h { margin: 6px 0 2px; }
.erp-ask .wo-rmu .erp-note { margin: 0 0 6px; padding: 0; }
.erp-ask .wo-rmu .erp-ask { margin: 6px 0 0; }
.erp-ask select, .erp-ask input { height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink);
  font: inherit; font-size: 13px; padding: 0 10px; }
.erp-note .bad, .erp-msg .bad, .erp-lines .bad { color: var(--danger, #B91C1C); }
.erp-note .erp-act { color: var(--ink-2); font-weight: 600; }
.erp-dl .span2 { grid-column: span 2; }                 /* the item's BOMs / Work Orders: whole names on a line */
@media (max-width: 640px) { .erp-dl .span2 { grid-column: auto; } }
.erp-msg .ok { color: var(--ok); }
.erp-msg .warn { color: var(--warn); }
/* Send to Release (2026-11-17): a plan's words by its state - someone else's turn, done - and ERPNext's Work Order cycle as
   its own banner: the steps done, where it is (coloured, whom it waits for on hover), the ones to come */
.erp-note .warn { color: var(--warn); font-weight: 600; }
.erp-note .ok { color: var(--ok); font-weight: 600; }
.wo-cycle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; list-style: none; margin: 2px 24px 12px; padding: 0;
  font-size: 12px; }
.wo-cycle li { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.wo-cycle li + li::before { content: "\2192"; margin: 0 7px; color: var(--muted); opacity: .6; font-weight: 400; }
.wo-cycle li.done { color: var(--ok); }
.wo-cycle li.on .rpill { height: 24px; font-weight: 800; }
.erp-close-tbl td .rpill { height: 20px; font-size: 11px; }
.erp-msg a { color: var(--brand-dark); font-weight: 700; white-space: nowrap; }
.erp-lines { width: calc(100% - 48px); margin: 0 24px; border-collapse: collapse; font-size: 13px; }
.erp-lines th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); padding: 6px 8px;
  border-bottom: 1px solid var(--line); }
.erp-lines td { padding: 6px 8px; border-bottom: 1px dashed var(--line); vertical-align: middle; }
.erp-lines td input { width: 100%; min-width: 0; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  color: var(--ink); font: inherit; font-size: 13px; padding: 0 8px; }
.erp-lines td:nth-child(1) { width: 190px; }
.erp-lines td:nth-child(3) { width: 80px; }
.erp-lines td.nm { color: var(--ink-2); }
.erp-lines td.why { color: var(--muted); font-size: 12px; }
.erp-lines tr.bad td.nm { color: var(--danger, #B91C1C); font-weight: 600; }
.erp-lines td.empty { color: var(--muted); padding: 14px 8px; }
.erp-add { margin: 10px 24px 0; }
/* Standards (2026-11-18, Mohamed: "make a button in the app, name it standards"): the PLGEAR standard BOMs - the list by
   kV, kind of switchgear and control voltage on the left, one standard's items on the right (standards.js) */
.std-dialog { width: min(1180px, calc(100vw - 32px)); height: min(860px, calc(100vh - 48px)); max-height: none;
  display: flex; flex-direction: column; overflow: hidden; }
.std-dialog:not([open]) { display: none; }
.std-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); margin-top: 10px;
  border-top: 1px solid var(--line); }
.std-nav { overflow-y: auto; padding: 14px 12px 16px 16px; border-right: 1px solid var(--line); background: var(--surface-2); }
.std-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; margin-bottom: 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); }
.std-kv button { display: flex; flex-direction: column; align-items: center; border: 0; border-radius: 7px; padding: 6px 4px;
  background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.std-kv button small { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.std-kv button.on { background: var(--brand); color: #fff; }
.std-kv button.on small { color: rgba(255, 255, 255, .85); }
.std-grp + .std-grp { margin-top: 14px; }
.std-grp-h { display: flex; flex-direction: column; padding: 0 6px 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-2); }
.std-grp-h span { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--muted); }
.std-item { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px;
  border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.std-item + .std-item { margin-top: 2px; }
.std-item b { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.std-item span { font-size: 12px; color: var(--muted); }
.std-item:hover { border-color: var(--line); background: var(--card); }
.std-item.on { border-color: var(--brand); background: var(--card); box-shadow: inset 3px 0 0 var(--brand); }
.std-item.empty span { font-style: italic; }
.std-dirty { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.std-main { min-width: 0; overflow-y: auto; padding: 14px 0 16px; }
.std-case { padding: 0 24px 10px; }
.std-case-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.std-case-h h3 { margin: 0 6px 0 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.std-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.std-chip.std-per { border-color: var(--brand); background: transparent; color: var(--brand-dark); }
.std-why { margin: 8px 0 2px; font-size: 12.5px; color: var(--ink-2); }
.std-saved { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.std-ro { margin: 8px 0 0; font-size: 12.5px; font-weight: 600; color: var(--warn); }
.std-table { overflow-x: auto; }
.std-lines td:nth-child(2) { min-width: 220px; }
.std-lines td:nth-child(4) { width: 64px; color: var(--muted); }
.std-lines td:nth-child(5) { width: 40px; text-align: right; }
.std-lines td small.bad { display: block; font-size: 11px; font-weight: 700; }
.std-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.std-add[hidden] { display: none; }
.std-pick { flex: 1 1 260px; min-width: 0; text-align: right; font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .std-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .std-nav { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .std-pick { text-align: left; }
}
/* ERPNext's items offered while a code is typed (2026-11-21, Mohamed: "when I enter the code it will appear to me and
   I can select, and the item name will get from ERP"): erp_pick.js on any input[data-erp-pick] */
.pick-box { position: fixed; z-index: 60; overflow-y: auto; padding: 4px; border: 1px solid var(--line-strong);
  border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: var(--pop-shadow); font-size: 13px; }
.pick-box[hidden] { display: none; }
.pick-opt { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr) auto; align-items: baseline;
  column-gap: 12px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.pick-opt[aria-selected="true"] { background: var(--brand-soft); }
.pick-opt:hover:not([aria-selected="true"]) { background: var(--surface-2); }
.pick-code { font-weight: 700; white-space: pre; font-variant-numeric: tabular-nums; }
.pick-name { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pick-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
/* its description under it (2026-11-21, "I need the item description to appear here too"): two lines at most */
.pick-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  font-size: 12px; line-height: 1.35; color: var(--muted); white-space: normal; }
.pick-uom { font-size: 12px; color: var(--muted); }
.pick-opt mark { padding: 0; border-radius: 2px; background: var(--brand-soft-2); color: inherit; }
.pick-opt.off .pick-code, .pick-opt.off .pick-nm, .pick-opt.off .pick-desc { color: var(--muted-2); }
.pick-flag { grid-column: 2 / -1; justify-self: start; margin-top: 2px; padding: 0 6px; border-radius: 999px;
  font-size: 10.5px; font-style: normal; font-weight: 700; color: var(--warn); background: var(--warn-bg); }
.pick-wait, .pick-none, .pick-more { padding: 8px 10px; font-size: 12.5px; color: var(--muted); }
.pick-foot { margin-top: 2px; padding: 6px 10px 4px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted-2); }
/* ERPNext in one row (2026-11-17, Mohamed: "this section handling is so bad and big - rehandle it"): the item's steps -
   each its ERPNext number and state, a click opens its window - then one next step (rules/erp_track.json) */
#erp-group .tb-row.et { gap: 0; flex-wrap: wrap; row-gap: 4px; align-items: stretch; }
.et-step { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0;
  padding: 3px 10px 3px 20px; border-radius: 9px; cursor: pointer; transition: background .12s, box-shadow .12s; }
.et-step:first-child { padding-left: 8px; }
.et-step[hidden] { display: none; }
.et-step:hover { background: var(--surface-2); }
.et-step:not(:first-child)::before { content: ""; position: absolute; left: 4px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  border-top: 1.5px solid var(--line-strong); border-right: 1.5px solid var(--line-strong); transform: rotate(45deg); }
.et-cap { all: unset; display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap; cursor: pointer; }
.et-cap:focus-visible { outline: 3px solid var(--brand-soft-2); outline-offset: 2px; border-radius: 4px; }
.et-step .et-cap::before { content: ""; flex: none; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%;
  border: 1.5px solid var(--line-strong); font-size: 7.5px; line-height: 10px; text-align: center; letter-spacing: 0; }
.et-step.done .et-cap::before { content: "\2713"; border: 0; background: var(--ok); color: #fff; font-weight: 900; }
.et-step.now { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--brand-line); }
.et-step.now .et-cap { color: var(--brand-dark); }
.et-step.now:not(.done) .et-cap::before { border-color: var(--brand); background: var(--brand); }
.et-line { display: inline-flex; align-items: center; gap: 6px; min-height: 20px; font-size: 12px; white-space: nowrap; }
.et-no { max-width: 240px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 700; text-decoration: none;
  font-variant-numeric: tabular-nums; }
.et-no:hover { color: var(--brand-dark); text-decoration: underline; }
.et-pill { padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; line-height: 1.5; }
.et-pill.ok { background: var(--ok-bg); color: var(--ok); }
.et-pill.warn { background: var(--warn-bg); color: var(--warn); }
.et-pill.bad { background: var(--danger-bg); color: var(--danger); }
.et-pill.info { background: var(--info-bg); color: var(--info); }
.et-pill.muted { background: var(--surface-3); color: var(--muted); }
.et-none { color: var(--muted-2); }
/* a modification made here: its revision's drawing on the Work Order (green) or still to go (dashed) */
.et-rev { padding: 0 5px; border-radius: 5px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 10.5px; font-weight: 700;
  line-height: 1.5; }
.et-rev.on { border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); background: var(--ok-bg); color: var(--ok); }
.et-rev.on::before { content: "\2713\00a0"; }
.et-more { color: var(--muted); font-size: 11px; font-weight: 700; }
/* the one next step: the design engineer's button, or whom it waits for */
.et-next { display: flex; flex-direction: column; justify-content: center; gap: 1px; margin-left: 8px; padding: 3px 4px 3px 14px;
  border-left: 1px solid var(--line); }
.et-next .et-cap { cursor: default; }
.et-next.go .et-cap { color: var(--brand-dark); }
.et-go.btn.small { height: 24px; padding: 0 11px; border-radius: 7px; font-size: 12px; }
.et-say { display: inline-flex; align-items: center; gap: 6px; max-width: 340px; overflow: hidden; text-overflow: ellipsis;
  font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.et-next.wait .et-say { color: var(--warn); }
.et-next.bad .et-say { color: var(--danger); white-space: normal; }
/* a kind of item whose BOM and Work Order the app does not make yet: its steps faded */
.et-cap.soon, .et-cap.locked { opacity: .5; cursor: not-allowed; }
/* the Modification (2026-11-17): its two tables, and the side popup once made */
.mod-h { margin: 18px 24px 6px; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.mod-side { position: fixed; right: 16px; top: 84px; z-index: 60; width: min(340px, calc(100vw - 32px)); padding: 16px 18px;
  border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-lg); background: var(--card);
  color: var(--ink); box-shadow: var(--pop-shadow); }
.mod-side[hidden] { display: none; }
.mod-side #mod-side-x { position: absolute; top: 8px; right: 8px; }
.mod-side h3 { margin: 6px 0 2px; font-size: 18px; font-weight: 800; }
.mod-side .mod-state { margin: 0 0 8px; font-weight: 700; color: var(--brand); }
.mod-side p { margin: 4px 0; font-size: 13px; }
.mod-side .mod-msg { color: var(--muted); }
.erp-req { margin: 4px 24px 0; font-size: 12.5px; color: var(--ink-2); }
.erp-req summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.erp-req ul { margin: 8px 0; padding-left: 18px; max-height: 180px; overflow: auto; }
@media (max-width: 720px) {
  .erp-lines td:nth-child(5), .erp-lines th:nth-child(5) { display: none; }
  .erp-lines td:nth-child(1) { width: auto; }
}
/* PLGEAR: what changes in the control circuits before the engineer picks (Control / Breaker) */
.pg-changes { margin-top: 8px; border-top: 1px solid var(--border, #ddd); padding-top: 6px; max-height: 46vh; overflow: auto; font-size: 12px; }
.pg-changes h4 { margin: 8px 0 4px; font-size: 12px; }
.pg-changes ul { margin: 0; padding-left: 16px; }
.pg-changes li { margin: 3px 0; line-height: 1.35; }
.pg-changes .add { color: #1d7a3a; }
.pg-changes .rem { color: #b3261e; margin-left: 4px; }
.pg-changes .muted { display: block; font-size: 11px; }
.pg-changes .warn { color: #b3261e; }
/* My projects filters (2026-11-16): stage (in design / designed), client, drawn by - one row that wraps */
.mine-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 8px; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2, transparent); }
.mine-filters:empty { display: none; }
.mf { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mf select { height: 28px; max-width: 180px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--card); color: inherit; font: inherit; font-size: 12.5px; }
.mf select.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); font-weight: 700; }
.mf-clear { margin-left: auto; align-self: center; font-size: 12.5px; }
.mf-clear b { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 999px;
  background: var(--brand); color: var(--on-brand, #fff); font-size: 11px; text-align: center; }
.ms-shown { align-self: center; margin-left: 4px; font-size: 12px; color: var(--muted); }
@media (max-width: 720px) { .mf { flex: 1 1 140px; } .mf select { max-width: none; width: 100%; } }
/* the SLD editor's breaker list (2026-11-16) */
.br-pick select { font-weight: 700; }
.br-lug { margin: -4px 0 8px; font-size: 11.5px; color: var(--muted); }
/* My projects stages as tabs; designing together (2026-11-16) */
.mine-strip { gap: 8px; }
.mine-tabs { align-self: flex-start; flex-wrap: wrap; }
.mine-tabs .ms-tab { display: inline-flex; align-items: center; gap: 4px; }
.mine-tabs .ms-tab .tt-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--surface-2);
  font-size: 11px; font-weight: 700; text-align: center; }
.mine-tabs .ms-tab.on .tt-n { background: var(--brand-soft); color: var(--brand-dark); }
.mine-strip .ms-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mine-strip .ms-eq { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.mine-pane { list-style: none; }
.mine-pane .mine-sec-hint { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.mine-pane .dash-list { margin: 0; padding: 0; width: 100%; max-height: none; overflow: visible; }
.wf-cods { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wf-cod { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 2px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 12px; }
.wf-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.wf-x:hover { color: var(--brand-dark); }
.wf-add { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.wf-add select { height: 30px; min-width: 0; flex: 1; max-width: 260px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--card); color: inherit; font: inherit; font-size: 12.5px; padding: 0 6px; }
.team-flow .tf-co span { background: var(--brand-soft); color: var(--brand-dark); }
/* the P-CSS layout library (2026-11-17) */
.lib-list { max-height: 60vh; overflow-y: auto; overflow-x: hidden; margin: 0 24px; padding: 0; width: auto;
  box-sizing: border-box; }
.lib-dialog { overflow-x: hidden; }
/* the RFD's documents in Check (2026-11-18): consultant approvals and specs first */
.rfddocs-list { padding: 4px 24px 20px; }
.rd-group { margin-top: 12px; }
.rd-group h3 { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.rd-group h3 .count { color: var(--muted); font-weight: 600; }
.rd-approvals h3, .rd-specs h3 { color: var(--brand-dark); }
.rd-group ul { list-style: none; margin: 0; padding: 0; }
.rd-group li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.rd-group li a { color: var(--brand-dark); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.rd-group li a:hover { text-decoration: underline; }
.rd-group li .muted, .rd-group p.muted { color: var(--muted); font-size: 12px; margin: 0; }
/* the top bar's Menu (2026-11-18): the P-CSS library lives there, not on the start page */
.top-menu { position: relative; }
.top-menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; min-width: 190px; padding: 6px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: var(--pop-shadow); }
.top-menu-pop[hidden] { display: none; }
.top-menu-pop button { display: block; width: 100%; text-align: start; padding: 8px 10px; border: 0; border-radius: 6px;
  background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.top-menu-pop button:hover, .top-menu-pop button:focus-visible { background: var(--brand-tint); color: var(--brand-dark); }
.lib-entry { display: block; padding: 8px 10px; border-bottom: 1px solid var(--line); list-style: none; }
.lib-entry .lib-key { display: block; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.lib-entry ul { list-style: none; margin: 0; padding: 0; }
.lib-entry li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; padding: 2px 0; }
.lib-entry .muted { color: var(--muted); }
.bento .tile-lib { grid-column: 1 / -1; }          /* the P-CSS library: the whole row, under My projects / Team */
/* a P-CSS whose layout is not attached yet (2026-11-17) */
.t-pend { flex: none; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  background: var(--warn-bg); color: var(--warn); border: 1px solid currentColor; white-space: nowrap; }
/* Check: Edit beside Confirm (2026-11-17) */
.ck-acts { display: inline-flex; gap: 6px; align-items: center; flex: none; }
/* the loading popup: the POWERLINE logo, its line the loading bar (2026-11-17) */
.pl-loader { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg, #ffffff) 55%, transparent); backdrop-filter: blur(2px); }
.pl-loader[hidden] { display: none; }
.pl-loader-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 34px 22px;
  border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
  animation: pl-pop .18s ease-out; }
.pl-loader-logo { width: 220px; height: auto; display: block; overflow: hidden; }
.pl-loader-logo .logo-ink { fill: var(--ink); }
.pl-loader-logo .pl-track { fill: var(--line-strong, #CCCCCC); }
.pl-loader-logo .pl-run { fill: var(--brand); transform-box: view-box; animation: pl-run 1.15s cubic-bezier(.55, .1, .45, .9) infinite; }
.pl-loader-text { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
@keyframes pl-run { from { transform: translateX(-420px); } to { transform: translateX(1200px); } }
@keyframes pl-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .pl-loader-logo .pl-run { animation-duration: 2.4s; }
  .pl-loader-card { animation: none; }
}

/* ---------------------------------------------------------------- Live RFD as cards (2026-11-21: "make it as card -
   the fonts, the items too much data - see what other professional UI/UX do"): a board of cards, one type scale
   (15 / 13 / 12 / 11 px), one state per item, the details in tooltips; the card's left edge the colour of its SLA */
.tile-rfd > .rfd-table { border: 0; border-radius: 0; background: transparent; overflow: visible; }
/* (2026-11-21: "why not all the cards the same size") every card of a row as tall as the tallest, its footer at the bottom */
/* (2026-11-21: "make two cards in the row only") */
.rfd-rows.rfd-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 20px; align-items: stretch;   /* (2026-11-22) a little more apart */
  max-height: min(78vh, 900px); padding: 2px 4px 4px 2px; }
.rfd-rows.rfd-cards > li + li { border-top: 0; }
.rfd-cards .dash-empty { grid-column: 1 / -1; }
.rfd-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: 12px; background: var(--card); box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  contain: layout paint style; }                /* (2026-11-21) "laggy scroll": a card repaints alone */
.rfd-card:hover { box-shadow: 0 4px 14px rgba(16, 24, 40, .08); }
.rfd-card.sla-late { border-left-color: #E5484D; }
.rfd-card.sla-today { border-left-color: #F07A43; }
.rfd-card.sla-on { border-left-color: #30A46C; }
.rc-head { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 12px 14px 10px; border: 0; background: transparent;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: 12px 12px 0 0; }
.rc-head:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.rc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.rc-idl { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.rc-id { font-size: 15px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.rc-idl .rfd-tag { height: 18px; padding: 0 6px; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; }
.rc-sla { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.rc-sla .rpill { height: 20px; padding: 0 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.rc-due { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.rc-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-sub .c-idso { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.rc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rc-meta .rpill, .rc-meta .rfd-hist { height: 22px; font-size: 11.5px; }
.rc-count { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.rc-items { list-style: none; margin: 0; padding: 2px 8px 6px; display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.rfd-card > .rc-items { flex: 1 1 auto; }
.rc-items > li:first-child { margin-top: 4px; }
.rp.rc-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: 10px;
  padding: 5px 6px; border-radius: 8px; font-size: 12.5px; }
.rp.rc-item .rp-code { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp.rc-item .rpill { height: 20px; padding: 0 8px; font-size: 11px; max-width: 150px; }
.rc-more button { width: 100%; padding: 4px 6px; border: 0; background: transparent; color: var(--brand-dark); font: inherit;
  font-size: 12px; font-weight: 600; text-align: left; cursor: pointer; border-radius: 8px; }
.rc-more button:hover { background: var(--surface-2); }
.rc-items .rfd-next { margin: 6px 0 2px; padding: 8px 10px; border-radius: 10px; flex-wrap: wrap; row-gap: 6px; }
.rc-items .rfd-next-go { margin-left: auto; }
.rc-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 8px 14px 10px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); }
.rc-pm { min-width: 0; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.rc-k { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--muted); margin-right: 2px; }
.rc-asg { display: flex; align-items: center; flex: none; padding-left: 4px; }
.rc-com { display: inline-flex; align-items: center; gap: 3px; flex: none; }
:root[data-theme="dark"] .rfd-card { box-shadow: none; }
@media (max-width: 720px) { .rfd-rows.rfd-cards { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- (2026-11-21) the person's performance in place of
   the greeting, To check and Continue tiles; My projects minimal; Team workflow a drop section, closed by default */
.tile-perf { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; padding: 18px 22px; }
.tile-perf[hidden] { display: none; }
.bento:has(.tile-perf:not([hidden])) .hero, .bento:has(.tile-perf:not([hidden])) .stat-check,
.bento:has(.tile-perf:not([hidden])) .tile-continue { display: none; }
/* (2026-11-21: "why when I reload the page the old layout appears for seconds, then the new one loads") the layout of
   last time from the first paint (index.html's head: html.pl-perf): the performance frame, never the greeting tiles,
   while ERPNext is read - its numbers fill it (dashboard.js perf) */
:root.pl-perf .tile-perf[hidden] { display: flex !important; }          /* over the page's [hidden] rule */
:root.pl-perf .bento .hero, :root.pl-perf .bento .stat-check, :root.pl-perf .bento .tile-continue { display: none; }
.pf-skel .pf-kpi b, .pf-skel .pf-l, .pf-skel .pf-s { align-self: flex-start; border-radius: 6px; background: var(--surface-3); color: transparent; }
.pf-skel .pf-kpi b { width: 46px; }
.pf-skel .pf-l { width: 64%; }
.pf-skel .pf-s { width: 82%; }
.pf-skel .pf-bars { border-radius: 6px; background: var(--surface-3); }
.pf-skel > * { animation: pf-wait 1.1s ease-in-out infinite alternate; }
@keyframes pf-wait { from { opacity: .5; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pf-skel > * { animation: none; } }
.pf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pf-date { font-size: 13px; color: var(--muted); }
.pf-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(150px, 1.1fr); gap: 12px; }
.pf-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface-2); }
.pf-kpi b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pf-kpi.main b { color: var(--brand); }
.pf-kpi.warn b { color: #CC2929; }
.pf-kpi.act b { color: var(--brand-dark); }
.pf-l { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.pf-s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-s em { font-style: normal; font-weight: 700; }
.pf-s em.up { color: #16794C; }
.pf-s em.down { color: #CC2929; }
.pf-weeks { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface-2); }
.pf-bars { display: flex; align-items: flex-end; gap: 5px; height: 48px; }
.pf-bars i { flex: 1 1 0; min-height: 3px; height: var(--h); border-radius: 3px 3px 1px 1px; background: color-mix(in srgb, var(--brand) 35%, transparent); }
.pf-bars i.now { background: var(--brand); }
.pf-good { margin: 0; font-size: 13.5px; font-weight: 600; color: #16794C; }
:root[data-theme="dark"] .pf-good, :root[data-theme="dark"] .pf-s em.up { color: #6FD39B; }
@media (max-width: 1180px) { .pf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-weeks { grid-column: 1 / -1; } }
.mine-sum { margin-left: 8px; }
.tile-team .tile-min { margin-left: auto; }
.tile-team.shut { padding-top: 12px; padding-bottom: 12px; }
.tile-team.shut .tile-head { margin-bottom: 0; }
.tile-team.shut .team-body, .tile-team.shut .team-tabs { display: none; }
.tile-team:not(.shut) .tile-min svg { transform: rotate(180deg); }
.tile-team .tile-min svg { transition: transform .15s ease; }
.tile-team.shut .tile-min svg { transform: rotate(180deg); }
.tile-team:not(.shut) .tile-min svg { transform: none; }
.bento:has(.tile-team.shut) .tile-mine:not(.min) { grid-column: 1 / -1; }
.bento:has(.tile-team.shut) .tile-team { grid-column: 1 / -1; }
.tile-perf > .pf-head, .tile-perf > .pf-row, .tile-perf > .pf-good { align-self: stretch; width: 100%; }
.tile-mine.min .tile-head { justify-content: flex-start; }
.tile-mine.min .tile-min { margin-left: auto; }
.tile-team .tile-head { justify-content: flex-start; }

/* (2026-11-21) the Modifications waiting for a team leader's approval, above the RFD cards */
.rfd-mods { list-style: none; margin: 0 0 12px; padding: 10px 12px; display: grid; gap: 6px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--card); }
.rfd-mods .rm-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.rfd-mods .rm-head .n { font-weight: 600; color: var(--muted); }
.rfd-mods .rm { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px; border-radius: 8px; }
.rfd-mods .rm.you { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.rfd-mods .rm-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; flex: 1; min-width: 0; }
.rfd-mods .rm-id { font-weight: 700; text-decoration: none; color: inherit; }
.rfd-mods .rm-where { color: var(--muted); font-size: 12px; }
.rfd-mods .rm-why { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rfd-mods .rfd-next-go { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
@media (max-width: 720px) { .rfd-mods .rm { flex-wrap: wrap; } }
.rfd-mods .rm-acts { display: inline-flex; gap: 6px; flex: none; }
.rfd-mods .rm-acts .rfd-next-go { margin-left: 0; }
.rfd-mods .rm-reject { background: transparent; color: var(--danger, #B91C1C); border-color: currentColor; }

/* (2026-11-21) Needs your approval: its own section, the whole row, above the projects */
.tile-approve { grid-column: 1 / -1; }
.tile-approve .approve-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; align-self: stretch; }
.tile-approve .rm { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 6%, transparent); }
.tile-approve .rm-head { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 700; font-size: 12.5px;
  color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.tile-approve .rm-head .n { color: var(--muted); font-weight: 600; }
.tile-approve .rm-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; flex: 1; min-width: 0; }
.tile-approve .rm-id { font-weight: 700; text-decoration: none; color: inherit; background: none; border: 0; padding: 0;
  font: inherit; font-weight: 700; cursor: pointer; }
.tile-approve .rm-id:hover { color: var(--brand-dark, var(--brand)); }
.tile-approve .rm-where { color: var(--muted); font-size: 12px; }
.tile-approve .rm-why { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tile-approve .rfd-next-go { margin-left: 0; display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.tile-approve .rm-acts { display: inline-flex; gap: 6px; flex: none; }
.tile-approve .rm-reject { background: transparent; color: var(--danger, #B91C1C); border-color: currentColor; }
.tile-approve .dash-empty { padding: 10px 2px; }
@media (max-width: 720px) { .tile-approve .rm { flex-wrap: wrap; } }
/* (2026-11-21) ERPNext's state in the top bar, for the whole app */
.erp-status { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 10px;
  font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.erp-status .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.erp-status.copy .live-dot { background: var(--muted-2, #8C8C8C); box-shadow: none; }
.erp-status.bad .live-dot { background: var(--danger, #B91C1C); box-shadow: 0 0 0 3px rgba(185, 28, 28, .18); }
.erp-status.bad { color: var(--danger, #B91C1C); }
.top-actions .rfd-refresh { height: 30px; }
.tile-approve .rm-by { flex: none; font-size: 12px; color: var(--muted); }
.tile-approve .rm-why .bad { color: var(--danger, #B91C1C); }

/* (2026-11-21, Mohamed: "why I need to scroll left and right to see Sign out - handle the layout") the top bar fits the
   screen: the ERPNext state is the Update now button; the user's name, the next read, then Design Guide / Standards
   (into Menu) step back as the screen narrows */
.erp-status.rfd-refresh { height: 32px; gap: 7px; padding: 0 10px; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.erp-status.rfd-refresh:hover:not(:disabled) { color: var(--brand-dark, var(--brand)); }
.erp-status.rfd-refresh:disabled { cursor: default; opacity: 1; }
.erp-status.rfd-refresh .rfd-spin { font-size: 14px; color: var(--ink-2); }
.erp-status.rfd-refresh:disabled .rfd-spin { display: none; }
.top-menu-pop .menu-narrow { display: none; }
@media (max-width: 1700px) { .user-name { display: none; } }
@media (max-width: 1500px) { .erp-status .erp-next { display: none; } }
@media (max-width: 1360px) {
  #btn-guide, #btn-standards { display: none; }
  .top-menu-pop .menu-narrow { display: block; }
}
@media (max-width: 1180px) { .brand-text { display: none; } .erp-status-t { display: none; } }

/* the Check window in short (2026-11-22, recommendation 1): a point's title, its details folded (each RFD change its own
   point - 2026-11-22: "revert back to each item, comment separated") */
.ck-title { display: inline; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.45;
  color: var(--ink); text-align: left; cursor: pointer; }
.ck-title:hover { color: var(--brand-dark); }
.ck-more { margin-left: 6px; font-size: 11px; color: var(--muted); }
.ck-detail { display: block; margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.ck-card.ok .ck-title { color: var(--ink-2); font-weight: 500; }
#tb-view.locked #tb-view-t { color: var(--warn); }

/* ---- two bars instead of three (2026-11-22, Mohamed: "Yes, build it" - mockup
   https://claude.ai/artifact/PBJVeK3tH5sqwz8MuJ438P#artboard-ProjectBars): the item, its revision, Edit / Check / View &
   Export, the sheet's tools and Saved in ONE row under the top bar; an editor's many tools wrap to a second line only
   when they must. The item's options in Item settings; "N to check" once (on Check); the description in the tooltip */
#ribbon { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; padding: 0 14px; background: var(--brand-tint);
  border-bottom: 1px solid var(--line); }
#ribbon > .rb-tabs { display: contents; }
#ribbon .rb-id { order: 1; flex: 0 1 auto; min-width: 0; max-width: 300px; padding: 0; margin: 0; }
#ribbon .rb-id .detail-meta { display: none; }
#ribbon .rb-id .detail-title { font-size: 14px; cursor: default; }
#ribbon .rb-switch { order: 2; flex: none; }
#ribbon .rb-switch > button { height: 28px; min-width: 0; padding: 0 14px; font-size: 12.5px; }
#ribbon > .rb-bar { order: 3; flex: 1 1 520px; min-width: 0; min-height: 46px; padding: 3px 0; background: transparent; border: 0; }
#ribbon .rb-end { order: 4; flex: none; margin-left: auto; }
#ribbon .rb-bar .tb-label { display: none; }                       /* no ITEM / BOM / SHEET captions */
#ribbon .rb-bar .rb-hist { border-left: 1px solid var(--line); }
#ribbon .rb-checks { display: none; }                              /* "N to check" once: on Check */
/* Item settings */
.item-set { position: relative; }
.item-set:not(:has(.checks:not([hidden]))) { display: none; }
.rb .item-opts .item-set-btn { font-weight: 700; }
.item-set-btn[aria-expanded="true"] { background: var(--card); box-shadow: var(--shadow), inset 0 -2px 0 var(--brand); color: var(--brand-dark); }
.item-set-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 250px; padding: 8px; display: flex; flex-direction: column;
  gap: 2px; background: var(--card); border-radius: var(--radius); box-shadow: var(--pop-shadow), 0 0 0 1px var(--line); }
.item-set-pop[hidden] { display: none !important; }
.item-set-pop > .checks > .btn.small { width: 100%; justify-content: flex-start; text-align: left; height: 32px; padding: 0 10px; }
.item-set-pop > .checks > .btn.small:hover { background: var(--surface-2); box-shadow: none; }
.item-set-pop .checks-pop { top: 0; left: calc(100% + 8px) !important; right: auto !important; }
@media (max-width: 900px) { #ribbon .rb-end { display: none; } #ribbon > .rb-bar { flex-basis: 100%; } }
/* one row on a 1366 px+ screen: tighter groups, the sheet's name shortened with "…" rather than a second line */
#ribbon .rb-bar .tb-group { padding: 0 7px; }
#ribbon .rb-ctx[data-ctx="stage"] { flex-wrap: nowrap; min-width: 0; }
#ribbon .rb-ctx[data-ctx="stage"] > .tb-group { flex: none; }
#ribbon .rb-ctx[data-ctx="stage"] > .tb-group:last-child { flex: 0 1 auto; min-width: 0; }
#ribbon .rb-ctx[data-ctx="stage"] > .tb-group:last-child .tb-row { min-width: 0; }
#ribbon .rb-sheetname { min-width: 0; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ribbon .rb-switch > button { padding: 0 11px; }
#ribbon .rb-switch .tb-ic { margin-right: 4px; }
#ribbon .rb-id { max-width: 240px; }
#ribbon .rb-switch .tb-ic { display: none; }
#ribbon .rb-id { max-width: 210px; }
#ribbon .rb-sheetname { min-width: 90px; }
@media (max-width: 1560px) {                       /* the save line as its dot: green saved, orange saving, red failed */
  #ribbon .rb-saved { font-size: 0; gap: 0; padding: 6px; }
  #ribbon .rb-saved::before { width: 9px; height: 9px; }
}

/* (2026-11-22) the RFD's Assigned To in the Assignment window, each with ERPNext's x */
.ra-asg { margin: 0 0 14px; }
.ra-asg-l { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ra-asg ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ra-asg li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.ra-asg li:hover { background: var(--surface-2); }
.ra-asg .rfd-av + .rfd-av { margin-left: 0; }
.ra-asg-n { flex: 1; min-width: 0; font-weight: 600; }
.ra-x { flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--muted);
  font-size: 18px; line-height: 1; cursor: pointer; }
.ra-x:hover { background: color-mix(in srgb, var(--danger, #B91C1C) 12%, transparent); color: var(--danger, #B91C1C); }
.ra-x:disabled { opacity: .5; cursor: progress; }
.ra-asg .ra-by { flex: none; font-size: 12px; color: var(--muted); }
.ra-asg .ra-lock { flex: none; width: 26px; text-align: center; font-size: 12px; opacity: .55; cursor: help; }
.ra-asg .ra-note { margin: 6px 2px 0; font-size: 12px; color: var(--muted); }
.ra-asg .ra-add { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.ra-asg .ra-add select { flex: 1; min-width: 0; height: 32px; }

/* (2026-11-22) a modification's Approve / Reject in its own window - Reject with its reason */
.modact-dialog { width: min(560px, calc(100vw - 32px)); }
.ma-body { padding: 4px 22px 8px; }
.ma-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: 13px; }
.ma-facts dt { color: var(--muted); }
.ma-facts dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.ma-reason textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink); font: inherit; resize: vertical; }
.ma-reason .req { color: var(--danger, #B91C1C); }
.erp-dialog .erp-foot .btn.primary.danger, .erp-dialog .erp-foot .btn.primary.danger:hover { background: #B91C1C; border-color: #B91C1C; color: #FFFFFF; }
.btn.primary.danger:disabled { opacity: .45; }
/* (2026-11-22) hide a row of Needs your approval - only for the person */
.tile-approve .rm-hide { margin-left: 2px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; flex: none; }
.tile-approve .rm-hide:hover { background: var(--surface-2); color: var(--ink); }
.tile-approve .rm-foot { padding: 4px 2px 0; font-size: 12px; color: var(--muted); }
.tile-approve .rm-foot .link { background: none; border: 0; padding: 0; color: var(--brand-dark, var(--brand)); font: inherit; cursor: pointer; text-decoration: underline; }
/* (2026-11-23) Coordinator follow-up: a side panel from the top bar, any page */
.coord-side { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(600px, 100vw); background: var(--card);
  border-left: 1px solid var(--line); box-shadow: var(--pop-shadow); display: flex; flex-direction: column; }
.coord-side[hidden] { display: none; }
.coord-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.coord-head { flex-wrap: wrap; row-gap: 2px; }
.coord-head b { font-size: 15px; white-space: nowrap; }
.coord-head .muted { font-size: 12px; order: 3; width: 100%; }
.coord-head .btn { margin-left: auto; }
.coord-list { overflow-y: auto; flex: 1; }
.coord-row { padding: 10px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.coord-row:hover, .coord-row.open { background: var(--surface-2); }
.coord-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.coord-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coord-st { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.coord-st.wait { background: #FFF3E0; color: #9A4A00; }
.coord-st.new { background: var(--brand-tint); color: var(--brand-dark); }
.coord-st.done { background: #E3F4E5; color: #1B5E20; }
.coord-st.bad { background: #FDECEC; color: #B91C1C; }
.coord-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.coord-hist { list-style: none; margin: 8px 0 2px; padding: 0 0 0 10px; border-left: 2px solid var(--line); font-size: 12px;
  color: var(--muted); display: grid; gap: 4px; }
.coord-hist b { color: var(--ink); font-weight: 600; }
.coord-empty { padding: 24px 16px; font-size: 13px; color: var(--muted); }
.coord-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #FFF3E0; color: #9A4A00;
  font-size: 11px; font-weight: 700; text-align: center; }
.coord-n[hidden] { display: none; }

/* (2026-11-23) a test project's cover data */
.p-cover { margin-left: 8px; height: 24px; padding: 0 10px; font-size: 12px; vertical-align: middle; }
.cover-dialog { width: min(640px, calc(100vw - 32px)); }
.cover-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; padding: 6px 22px 8px; }
.cover-form .wide { grid-column: 1 / -1; }
.cover-form .erp-msg { grid-column: 1 / -1; margin: 0; }
.cover-form label.wf { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.cover-form input { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; }
@media (max-width: 640px) { .cover-form { grid-template-columns: 1fr; } }

/* (2026-11-23: "make the SO hyperlink to ERP, and I need more details, make the slider bigger, so any one comment to SO
   I can see it") the follow-up panel wider; links to ERPNext; the order's details; every comment in full */
.coord-row { padding: 12px 18px; }
.coord-top { font-size: 14px; }
.coord-top a, .coord-hist a { color: var(--brand-dark, var(--brand)); text-decoration: underline; text-underline-offset: 2px; }
.coord-sub { font-size: 12px; }
.coord-said { margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: 12px;
  color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.coord-row.open .coord-said { display: none; }
.coord-said b { font-weight: 600; color: var(--muted); }
.coord-info { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 4px; font-size: 12px; color: var(--ink); }
.coord-info i { font-style: normal; color: var(--muted); }
.coord-hist { font-size: 12.5px; gap: 6px; }
.coord-note { margin: 3px 0 2px; padding: 6px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.coord-hist .w-comment > b, .coord-hist .w-update > b { color: var(--brand-dark, var(--brand)); }
