/* WeftCore styles. Generated by tools/build_css.py from assets/src. Edit the source files, not this one. */
:root{--bg:#f5f6f8;--surface:#ffffff;--surface-sunk:#eef0f4;--border:#e3e6ec;--ink:#0e1230;--ink-muted:#5a6075;--indigo:#3d4be0;--on-indigo:#ffffff;--indigo-fold:#1d2575;--indigo-tint:#eceefe;--night:#0e1230;--on-night:#ffffff;--on-night-muted:#a9afd6;--gold:#f2b640;--on-gold:#0e1230;--gold-tint:#fef4dc;--success:#16794c;--success-tint:#e3f4eb;--warning:#b25e00;--warning-tint:#fff0dd;--danger:#c62a2f;--danger-tint:#fde8e8;--stage-yarn:#b07a2a;--stage-weaving:#7b5ce0;--stage-grey:#7d8296;--stage-dyeing:#3d4be0;--stage-warehouse:#0e9a7a;--brand-sf:#002b3a;--brand-ar:#d2541c;--brand-sh:#4e7a2e;--brand-sf-deep:#002b3a;--brand-ar-deep:#5a2210;--brand-sh-deep:#2c4419;--shadow-card:0 1px 2px rgba(14,18,48,0.04), 0 6px 20px rgba(14,18,48,0.05);--shadow-pop:0 12px 32px rgba(14,18,48,0.16);--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--space-8:32px;--space-12:48px;--radius-sm:6px;--radius-md:10px;--radius-lg:16px;--radius-xl:22px;--radius-pill:999px;--control-h:38px;--row-h:44px;--bar-h:64px;--page-max:1360px;--font-display:"Sora", system-ui, -apple-system, "Segoe UI", sans-serif;--font-sans:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;--font-mono:"JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;--font-urdu:"Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;color-scheme:light}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--bg:#0b0e1f;--surface:#131733;--surface-sunk:#0f1229;--border:#232847;--ink:#eef0ff;--ink-muted:#9ba2c7;--indigo:#8a94ff;--on-indigo:#0b0e1f;--indigo-fold:#4b56d9;--indigo-tint:#1e2350;--night:#1b2050;--on-night:#eef0ff;--on-night-muted:#b5bbe0;--gold:#f5c25b;--on-gold:#0e1230;--gold-tint:#3a2e10;--success:#4ade9a;--success-tint:#10301f;--warning:#f7a93b;--warning-tint:#3a2a10;--danger:#ff7a7f;--danger-tint:#3e1518;--stage-yarn:#e7b66b;--stage-weaving:#a993ff;--stage-grey:#a9aec2;--stage-dyeing:#8a94ff;--stage-warehouse:#3fd9b3;--brand-sf:#6fa6b8;--brand-ar:#ff9a63;--brand-sh:#9ccb6e;--brand-sf-deep:#0d3a4a;--brand-ar-deep:#4d200f;--brand-sh-deep:#26391a;--shadow-card:0 1px 2px rgba(0,0,0,0.3);--shadow-pop:0 12px 32px rgba(0,0,0,0.6);color-scheme:dark}}
:root[data-theme="dark"]{--bg:#0b0e1f;--surface:#131733;--surface-sunk:#0f1229;--border:#232847;--ink:#eef0ff;--ink-muted:#9ba2c7;--indigo:#8a94ff;--on-indigo:#0b0e1f;--indigo-fold:#4b56d9;--indigo-tint:#1e2350;--night:#1b2050;--on-night:#eef0ff;--on-night-muted:#b5bbe0;--gold:#f5c25b;--on-gold:#0e1230;--gold-tint:#3a2e10;--success:#4ade9a;--success-tint:#10301f;--warning:#f7a93b;--warning-tint:#3a2a10;--danger:#ff7a7f;--danger-tint:#3e1518;--stage-yarn:#e7b66b;--stage-weaving:#a993ff;--stage-grey:#a9aec2;--stage-dyeing:#8a94ff;--stage-warehouse:#3fd9b3;--brand-sf:#6fa6b8;--brand-ar:#ff9a63;--brand-sh:#9ccb6e;--brand-sf-deep:#0d3a4a;--brand-ar-deep:#4d200f;--brand-sh-deep:#26391a;--shadow-card:0 1px 2px rgba(0,0,0,0.3);--shadow-pop:0 12px 32px rgba(0,0,0,0.6);color-scheme:dark}
[data-theme="light"] .wc-dark-only{display:none!important}
@media (prefers-color-scheme: dark){:root:not([data-theme]) .wc-light-only{display:none!important}:root:not([data-theme]) .wc-dark-only{display:inline-block!important}}
/* WeftCore components. Built only from tokens.css variables. */
.wc { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
.wc *, .wc *::before, .wc *::after { box-sizing: border-box; }
.wc-num { font-variant-numeric: tabular-nums; text-align: right; }
.wc-code { font-family: var(--font-mono); font-size: 12.5px; line-height: 18px; font-weight: 500; letter-spacing: -.01em; }
.wc-muted { color: var(--ink-muted); }
.wc-label { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-muted); }
.wc-dark-only { display: none !important; }
[data-theme="dark"] .wc-light-only { display: none !important; }
[data-theme="dark"] .wc-dark-only { display: inline-block !important; }

/* Buttons */
.wc-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--control-h); padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid transparent; font: 600 14px/20px var(--font-sans); cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, transform .1s; }
.wc-btn:active { transform: translateY(1px); }
.wc-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wc-btn svg { width: 16px; height: 16px; }
.wc-btn--primary { background: var(--indigo); color: var(--on-indigo); }
.wc-btn--primary:hover { background: var(--indigo-fold); color: #fff; }
.wc-btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }
.wc-btn--secondary:hover { border-color: var(--ink-muted); }
.wc-btn--ghost { background: transparent; color: var(--indigo); }
.wc-btn--ghost:hover { background: var(--indigo-tint); }
.wc-btn--danger { background: var(--danger-tint); color: var(--danger); }
.wc-btn[disabled] { opacity: .45; cursor: not-allowed; }
.wc-btn--sm { height: 30px; padding: 0 var(--space-3); font-size: 13px; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) { .wc-btn { transition: none; } }

/* Badges, stages, brands */
.wc-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12px; line-height: 16px; font-weight: 600; background: var(--surface-sunk); color: var(--ink-muted); white-space: nowrap; }
.wc-badge--success { background: var(--success-tint); color: var(--success); }
.wc-badge--warning { background: var(--warning-tint); color: var(--warning); }
.wc-badge--danger { background: var(--danger-tint); color: var(--danger); }
.wc-badge--info { background: var(--indigo-tint); color: var(--indigo); }
.wc-stage { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.wc-stage::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--dot, var(--ink-muted)); }
.wc-stage--yarn { --dot: var(--stage-yarn); }
.wc-stage--weaving { --dot: var(--stage-weaving); }
.wc-stage--grey { --dot: var(--stage-grey); }
.wc-stage--dyeing { --dot: var(--stage-dyeing); }
.wc-stage--warehouse { --dot: var(--stage-warehouse); }
.wc-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.wc-brand::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.wc-brand--sf { --dot: var(--brand-sf); }
.wc-brand--ar { --dot: var(--brand-ar); }
.wc-brand--sh { --dot: var(--brand-sh); }

/* Card + KPI */
.wc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); min-width: 0; }
.wc-card__head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-5) var(--space-5) var(--space-3); flex-wrap: wrap; }
.wc-card__head h3 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 700; }
.wc-card__body { padding: 0 var(--space-5) var(--space-5); }
.wc-kpi { padding: var(--space-5); display: flex; flex-direction: column; gap: 6px; }
.wc-kpi__value { font: 600 28px/34px var(--font-display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.wc-kpi__value small { font: 600 15px/20px var(--font-display); color: var(--ink-muted); }
.wc-kpi__foot { font-size: 12px; line-height: 16px; color: var(--ink-muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wc-kpi--alert { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint), var(--shadow-card); }
.wc-up { color: var(--success); font-weight: 700; }
.wc-down { color: var(--danger); font-weight: 700; }

/* Night card */
.wc-night { position: relative; overflow: hidden; background: var(--night); color: var(--on-night); border-radius: var(--radius-xl); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.wc-night::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07; background-image: repeating-linear-gradient(105deg, var(--on-night) 0 1px, transparent 1px 14px); -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); mask-image: linear-gradient(90deg, transparent 30%, #000); }
.wc-night > * { position: relative; z-index: 1; }
.wc-night__eyebrow { font-size: 12px; font-weight: 600; color: var(--on-night-muted); }
.wc-night__figure { font: 600 44px/48px var(--font-display); letter-spacing: -.02em; margin: 2px 0 0; }
.wc-night__figure span { color: var(--gold); }
.wc-night__text { color: var(--on-night-muted); font-size: 14px; max-width: 44ch; margin: 0; }
.wc-night__chart { margin-top: auto; display: block; width: 100%; height: 96px; }
.wc-night__chart .line { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.wc-night__chart .area { fill: var(--gold); opacity: .14; }
.wc-night__chart .grid { stroke: var(--on-night-muted); opacity: .2; stroke-width: 1; }
.wc-night__chart .dot { fill: var(--gold); }
.wc-night__chart text { fill: var(--on-night-muted); font: 500 11px var(--font-sans); }

/* Inputs */
.wc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wc-field > span { font-size: 13px; font-weight: 600; }
.wc-input { height: var(--control-h); padding: 0 var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: 500 14px/20px var(--font-sans); width: 100%; }
.wc-input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-tint); }
.wc-input--error { border-color: var(--danger); }
.wc-help { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.wc-help--error { color: var(--danger); }
.wc-unit { position: relative; }
.wc-unit .wc-input { padding-right: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.wc-unit em { position: absolute; right: 12px; top: 9px; font-style: normal; color: var(--ink-muted); font-weight: 600; }

/* Table */
.wc-scroll { overflow-x: auto; }
.wc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.wc-table th { color: var(--ink-muted); font-size: 12px; line-height: 16px; font-weight: 600; text-align: left; padding: 10px var(--space-3); white-space: nowrap; border-bottom: 1px solid var(--border); }
.wc-table td { height: var(--row-h); padding: 0 var(--space-3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.wc-table th:first-child, .wc-table td:first-child { padding-left: var(--space-5); }
.wc-table th:last-child, .wc-table td:last-child { padding-right: var(--space-5); }
.wc-table tbody tr:last-child td { border-bottom: 0; }
.wc-table th.wc-num, .wc-table td.wc-num { text-align: right; }
.wc-table tbody tr:hover td { background: var(--indigo-tint); }
.wc-table tr.is-flag td { background: var(--gold-tint); }
.wc-table tfoot td { font-weight: 700; border-top: 1px solid var(--border); border-bottom: 0; }

/* Top bar */
.wc-bar { height: var(--bar-h); display: flex; align-items: center; gap: var(--space-4); padding: 0 var(--space-8); background: var(--surface); border-bottom: 1px solid var(--border); }
.wc-bar__logo { display: block; height: 22px; width: auto; flex: none; }
.wc-tabs { display: flex; gap: 2px; padding: 4px; background: var(--surface-sunk); border-radius: var(--radius-md); min-width: 0; overflow-x: auto; }
.wc-tabs a { padding: 6px 10px; border-radius: 7px; color: var(--ink-muted); text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.wc-tabs a:hover { color: var(--ink); }
.wc-tabs a.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(14,18,48,.12); }
.wc-bar__right { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); }
.wc-brands { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-pill); }
.wc-brands button { border: 0; background: transparent; color: var(--ink-muted); font: 600 12px/16px var(--font-sans); padding: 5px 10px; border-radius: var(--radius-pill); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.wc-brands button.is-active { background: var(--ink); color: var(--surface); }
.wc-brands i { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }
.wc-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 12px; width: 210px; border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--ink-muted); font-size: 13px; white-space: nowrap; background: var(--bg); }
.wc-search svg { width: 16px; height: 16px; flex: none; }
.wc-search kbd { margin-left: auto; font: 600 11px var(--font-sans); padding: 2px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--ink-muted); }
.wc-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--indigo); color: var(--on-indigo); display: grid; place-items: center; font: 600 13px var(--font-display); }

/* Production flow */
.wc-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.wc-flow__step { position: relative; padding: var(--space-4) var(--space-4) var(--space-4) 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wc-flow__step + .wc-flow__step { padding-left: var(--space-5); border-left: 1px dashed var(--border); }
.wc-flow__qty { font: 600 22px/28px var(--font-display); letter-spacing: -.01em; white-space: nowrap; }
.wc-flow__meta { font-size: 12px; color: var(--ink-muted); }
.wc-flow__bar { display: flex; height: 10px; border-radius: var(--radius-pill); overflow: hidden; gap: 3px; margin-top: var(--space-2); }
.wc-flow__bar span { background: var(--dot); }
.wc-flow__legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--ink-muted); }

/* Ageing bar */
.wc-age { display: flex; height: 14px; border-radius: var(--radius-pill); overflow: hidden; gap: 3px; }
.wc-age span:nth-child(1) { background: var(--success); }
.wc-age span:nth-child(2) { background: var(--indigo); }
.wc-age span:nth-child(3) { background: var(--warning); }
.wc-age span:nth-child(4) { background: var(--danger); }
.wc-age-list { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: 10px; }
.wc-age-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.wc-age-list i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.wc-age-list b { margin-left: auto; font-weight: 700; }

/* Attention list */
.wc-attn { list-style: none; margin: 0; padding: 0; }
.wc-attn li { display: grid; grid-template-columns: 36px 1fr auto; gap: var(--space-3); align-items: center; padding: 12px var(--space-5); border-top: 1px solid var(--border); }
.wc-attn__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-sunk); color: var(--ink-muted); }
.wc-attn__icon svg { width: 18px; height: 18px; }
.wc-attn__icon--danger { background: var(--danger-tint); color: var(--danger); }
.wc-attn__icon--warning { background: var(--warning-tint); color: var(--warning); }
.wc-attn__title { font-weight: 600; }
.wc-attn__sub { font-size: 12px; color: var(--ink-muted); }

/* Overview layout */
.wc-page { max-width: var(--page-max); margin: 0 auto; padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); }
.wc-greet { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-2); }
.wc-greet h1 { margin: 0; font: 600 24px/32px var(--font-display); letter-spacing: -.01em; }
.wc-bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-4); }
.wc-span-5 { grid-column: span 5; } .wc-span-6 { grid-column: span 6; } .wc-span-7 { grid-column: span 7; } .wc-span-12 { grid-column: span 12; }
.wc-kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 860px) { .wc-span-5, .wc-span-6, .wc-span-7 { grid-column: span 12; } .wc-flow { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* Workspaces: one per brand, plus the group view */
.wc-ws { position: relative; flex: none; }
.wc-ws__btn { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 10px 0 5px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.wc-ws__btn:hover { border-color: var(--ink-muted); }
.wc-ws__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wc-ws__btn svg { width: 16px; height: 16px; color: var(--ink-muted); }
.wc-ws__tile { width: 30px; height: 30px; border-radius: 8px; background: var(--tile, var(--indigo)); color: #fff; display: grid; place-items: center; font: 600 11px/1 var(--font-display); letter-spacing: .02em; flex: none; }
.wc-ws__name { display: block; font-size: 13px; line-height: 16px; font-weight: 700; white-space: nowrap; }
.wc-ws__sub { display: block; font-size: 11px; line-height: 14px; color: var(--ink-muted); white-space: nowrap; }
.wc-ws__menu { position: absolute; top: 50px; left: 0; z-index: 5; width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); padding: 6px; }
.wc-ws__group { font-size: 11px; font-weight: 600; color: var(--ink-muted); padding: 8px 10px 4px; }
.wc-ws__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-md); color: var(--ink); text-decoration: none; }
.wc-ws__item:hover { background: var(--surface-sunk); }
.wc-ws__item.is-active { background: var(--indigo-tint); }
.wc-ws__item kbd { margin-left: auto; font: 600 11px var(--font-sans); color: var(--ink-muted); }
.wc-ws__item .check { margin-left: auto; width: 16px; height: 16px; color: var(--indigo); }
.wc-ws__sep { height: 1px; background: var(--border); margin: 6px 4px; }
.wc-ws__add { color: var(--indigo); font-weight: 600; }
.wc-ws__add .wc-ws__tile { background: var(--indigo-tint); color: var(--indigo); font-size: 16px; }
.t-group { --tile: var(--indigo); } .t-sf { --tile: var(--brand-sf-deep); } .t-ar { --tile: var(--brand-ar-deep); } .t-sh { --tile: var(--brand-sh-deep); }
.wc-ws-band { height: 3px; background: var(--ws-band, var(--indigo)); }
.ws-sf { --ws-band: var(--brand-sf); } .ws-ar { --ws-band: var(--brand-ar); } .ws-sh { --ws-band: var(--brand-sh); }
.ws-sf .wc-night { background: var(--brand-sf-deep); } .ws-ar .wc-night { background: var(--brand-ar-deep); } .ws-sh .wc-night { background: var(--brand-sh-deep); }

/* Signed-in user and role accounts */
.wc-user { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border: 1px solid var(--border); border-radius: var(--radius-pill); }
.wc-role { font-size: 12px; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.wc-roles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-4); }
.wc-rolecard { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); font-size: 13px; }
.wc-rolecard__top { display: flex; align-items: center; gap: 10px; }
@media (max-width: 860px) { .wc-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- App frame (beyond the design-system components) ---------- */
html, body { margin: 0; min-height: 100%; }
body.wc { background: var(--bg); }
.wc-ic { width: 16px; height: 16px; flex: none; }
.wc-page a:not(.wc-btn) { color: var(--indigo); text-decoration: none; }
.wc-page a:not(.wc-btn):hover { text-decoration: underline; }
a.wc-btn { text-decoration: none; }
a.wc-btn--primary { color: var(--on-indigo); }
a.wc-btn--secondary { color: var(--ink); }
.wc-bar { position: sticky; top: 0; z-index: 20; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.wc-bar__home { display: flex; align-items: center; flex: none; }
.wc-bar__logo { height: 22px; width: auto; display: block; }
.wc-ws-band { position: sticky; top: var(--bar-h); z-index: 19; }
.wc-ws__btn .wc-ws__tile, .wc-ws__item .wc-ws__tile { background: var(--tile, var(--indigo)); }
.wc-ws__menu[hidden] { display: none; }
.wc-ws__menu--right { left: auto; right: 0; width: 240px; }
.wc-ws__item .wc-ic { color: var(--ink-muted); }
.wc-ws__item.is-active .wc-ic { color: var(--indigo); margin-left: auto; }
.wc-user { background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.wc-search { margin: 0; }
.wc-search input { border: 0; background: transparent; outline: none; font: 500 13px var(--font-sans); color: var(--ink); width: 100%; min-width: 0; }
.wc-search:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-tint); }
.wc-page { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-top: var(--space-6); padding-bottom: var(--space-8); }
@media (min-width: 900px) { .wc-page { padding-left: var(--space-8); padding-right: var(--space-8); } }
.wc-foot { text-align: center; font-size: 12px; color: var(--ink-muted); padding: 0 16px 24px; }
.wc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wc-greet { margin-bottom: 0; }
.wc-greet h1 { text-wrap: balance; }

/* sub navigation inside a module */
.wc-subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; margin-bottom: var(--space-2); }
.wc-subnav a { padding: 10px 12px; color: var(--ink-muted); text-decoration: none; font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.wc-subnav a:hover { color: var(--ink); }
.wc-subnav a.is-active { color: var(--ink); border-color: var(--indigo); }

/* KPI rows */
.wc-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.wc-kpi { padding: var(--space-4) var(--space-5); }
.wc-kpi__value { font-size: 24px; line-height: 30px; }

/* cards */
.wc-card__body { padding: 0 var(--space-5) var(--space-5); }
.wc-card__body--pad { padding: var(--space-5); }
.wc-card > .wc-scroll:last-child .wc-table tbody tr:last-child td { border-bottom: 0; }
.wc-empty { padding: var(--space-8) var(--space-5); text-align: center; }
.wc-empty h3 { margin: 0 0 6px; font-size: 16px; }
.wc-empty p { margin: 6px 0; }
.wc-card.wc-empty { padding: 48px 24px; }
.wc-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
.wc-cols > * { min-width: 0; }
.wc-c4 { grid-column: span 4; } .wc-c5 { grid-column: span 5; } .wc-c6 { grid-column: span 6; } .wc-c7 { grid-column: span 7; } .wc-c8 { grid-column: span 8; } .wc-c12 { grid-column: span 12; }
@media (max-width: 960px) { .wc-c4, .wc-c5, .wc-c6, .wc-c7, .wc-c8 { grid-column: span 12; } }
.wc-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-4) var(--space-5); padding: 0 var(--space-5) var(--space-5); margin: 0; }
.wc-dl div { min-width: 0; }
.wc-dl dt { font-size: 12px; font-weight: 600; color: var(--ink-muted); margin-bottom: 2px; }
.wc-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* tables */
.wc-table td.wc-wrap { white-space: normal; min-width: 200px; }
.wc-table tr[data-href] { cursor: pointer; }
.wc-table a { text-decoration: none; font-weight: 600; }
.wc-table td small { display: block; color: var(--ink-muted); font-size: 12px; font-weight: 500; }
.wc-table .wc-sub td { font-size: 13px; }
.wc-paging { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px var(--space-5); font-size: 13px; }
.wc-paging .wc-muted { margin-right: auto; }

/* filters */
.wc-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.wc-filters .wc-input { height: 34px; width: auto; min-width: 140px; font-size: 13px; }
.wc-filters .wc-input--search { min-width: 220px; flex: 1 1 220px; max-width: 360px; }
.wc-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); font-weight: 600; }
.wc-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 0 var(--space-5) var(--space-4); }

/* forms */
.wc-form { display: flex; flex-direction: column; gap: var(--space-4); }
.wc-form--narrow { max-width: 440px; }
.wc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); }
.wc-span-all { grid-column: 1 / -1; }
.wc-textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 20px; }
select.wc-input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6075' stroke-width='2'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.wc-form__actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: var(--space-2); }
.wc-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; cursor: pointer; }
.wc-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--indigo); }
.wc-check .wc-help { display: block; font-weight: 500; }
.wc-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.wc-btn--block { width: 100%; }
.wc-section-title { font-size: 13px; font-weight: 700; margin: var(--space-2) 0 0; color: var(--ink); }
.wc-note { background: var(--indigo-tint); color: var(--ink); border-radius: var(--radius-md); padding: 10px 14px; font-size: 13px; }
.wc-note--warn { background: var(--warning-tint); }
.wc-note--danger { background: var(--danger-tint); }

/* line items */
.wc-lines { width: 100%; border-collapse: collapse; }
.wc-lines th { font-size: 12px; color: var(--ink-muted); font-weight: 600; text-align: left; padding: 6px 6px; }
.wc-lines td { padding: 4px 6px; vertical-align: top; }
.wc-lines .wc-input { height: 36px; }
.wc-lines .amt { text-align: right; font-weight: 700; padding-top: 12px; white-space: nowrap; }
.wc-lines .x { width: 32px; }
.wc-lines .x button { border: 0; background: transparent; color: var(--ink-muted); font-size: 20px; cursor: pointer; padding: 6px; }
.wc-lines tfoot td { padding-top: 10px; font-weight: 700; }
.wc-totals { display: grid; grid-template-columns: auto 160px; gap: 8px 16px; justify-content: end; align-items: center; font-size: 14px; }
.wc-totals b { text-align: right; }
.wc-totals .grand { font: 600 20px var(--font-display); }

/* flash messages */
.wc-flash { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: var(--space-4); font-weight: 600; font-size: 14px; }
.wc-flash--success { background: var(--success-tint); color: var(--success); }
.wc-flash--error { background: var(--danger-tint); color: var(--danger); }
.wc-flash--info { background: var(--indigo-tint); color: var(--indigo); }
.wc-flash__x { margin-left: auto; border: 0; background: transparent; color: inherit; font-size: 20px; cursor: pointer; line-height: 1; }

/* pipeline (lot stages) */
.wc-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 0 var(--space-5) var(--space-5); }
.wc-step { border-radius: var(--radius-md); background: var(--surface-sunk); padding: 10px 12px; min-width: 0; }
.wc-step b { display: block; font: 600 18px/24px var(--font-display); white-space: nowrap; }
.wc-step span { font-size: 12px; color: var(--ink-muted); }
.wc-step.is-on { background: var(--indigo-tint); box-shadow: inset 0 0 0 1.5px var(--indigo); }
@media (max-width: 700px) { .wc-steps { grid-template-columns: repeat(2, 1fr); } }

/* horizontal bars */
.wc-hbars { display: grid; gap: 10px; padding: 0 var(--space-5) var(--space-5); }
.wc-hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
.wc-hbar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-hbar__track { height: 10px; background: var(--surface-sunk); border-radius: 999px; overflow: hidden; }
.wc-hbar__track i { display: block; height: 100%; border-radius: 999px; }
.wc-hbar b { white-space: nowrap; }

/* progress meter (credit used) */
.wc-meter { height: 6px; background: var(--surface-sunk); border-radius: 999px; overflow: hidden; margin-top: 4px; min-width: 80px; }
.wc-meter i { display: block; height: 100%; background: var(--indigo); }
.wc-meter.is-over i { background: var(--danger); }

/* attendance sheet */
.wc-att { display: inline-flex; gap: 2px; background: var(--surface-sunk); border-radius: 8px; padding: 2px; }
.wc-att input { position: absolute; opacity: 0; pointer-events: none; }
.wc-att label { display: inline-grid; place-items: center; width: 32px; height: 28px; border-radius: 6px; font-weight: 700; font-size: 12px; color: var(--ink-muted); cursor: pointer; }
.wc-att input:checked + label.s-P { background: var(--success); color: #fff; }
.wc-att input:checked + label.s-A { background: var(--danger); color: #fff; }
.wc-att input:checked + label.s-L { background: var(--warning); color: #fff; }
.wc-att input:checked + label.s-H { background: var(--indigo); color: #fff; }
.wc-att input:focus-visible + label { outline: 2px solid var(--gold); }

/* role permission grid */
.wc-perm select { min-width: 120px; }

/* login */
/* (restored in 1.3.0: styles accidentally removed in 1.1.0) */
.wc-form--stack { gap: 14px; }

/* dashboard */
.wc-dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-4); }
.wc-dash > * { min-width: 0; }
.wc-night { background: var(--ws-night, var(--night)); }
@media (max-width: 960px) { .wc-dash > * { grid-column: span 12 !important; } .wc-flow { grid-template-columns: repeat(2, minmax(0,1fr)); } .wc-flow__step + .wc-flow__step { border-left: 0; padding-left: 0; } }
@media (max-width: 760px) {
  .wc-bar { gap: 8px; height: auto; flex-wrap: wrap; padding-block: 8px; }
  .wc-tabs { order: 5; width: 100%; }
  .wc-search { display: none; }
  .wc-ws__sub, .wc-role { display: none; }
  .wc-ws-band { top: 0; position: static; }
  .wc-bar { position: static; }
  .wc-night__figure { font-size: 32px; line-height: 38px; }
}

/* misc */
.wc-mono { font-family: var(--font-mono); }
.wc-right { text-align: right; }
.wc-good { color: var(--success); font-weight: 700; }
.wc-bad { color: var(--danger); font-weight: 700; }
.wc-warn { color: var(--warning); font-weight: 700; }
.wc-chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.wc-split { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.wc-stack { display: flex; flex-direction: column; gap: var(--space-4); }
.wc-list-plain { list-style: none; margin: 0; padding: 0; }
.wc-list-plain li { display: flex; justify-content: space-between; gap: 12px; padding: 10px var(--space-5); border-top: 1px solid var(--border); font-size: 14px; }
.wc-tablink { color: inherit !important; }
details.wc-more summary { cursor: pointer; font-weight: 600; color: var(--indigo); padding: 8px 0; }

/* printing */
@media print {
  .wc-bar, .wc-ws-band, .wc-foot, .wc-subnav, .wc-actions, .wc-filters, .wc-paging, .no-print { display: none !important; }
  body.wc { background: #fff; }
  .wc-card { box-shadow: none; }
}
.wc-print { background: #fff; color: #0e1230; max-width: 820px; margin: 0 auto; padding: 32px; font-family: var(--font-sans); }
.wc-print h1 { font: 600 22px var(--font-display); margin: 0; }
.wc-print table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wc-print th { text-align: left; border-bottom: 2px solid #0e1230; padding: 6px 4px; font-size: 12px; }
.wc-print td { border-bottom: 1px solid #e3e6ec; padding: 6px 4px; }
.wc-print .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.wc-print .meta { font-size: 13px; line-height: 20px; }
.wc-print .sign { display: flex; justify-content: space-between; margin-top: 64px; font-size: 12px; }
.wc-print .sign span { border-top: 1px solid #0e1230; padding-top: 6px; min-width: 180px; text-align: center; }
.wc-print .num { text-align: right; }
.wc-print .tot td { font-weight: 700; border-bottom: 0; }
.wc-printbar { text-align: center; padding: 12px; }
@media print { .wc-printbar { display: none; } .wc-print { padding: 0; } }
.wc-inline-form{display:inline-flex;margin:0}
.wc-page .wc-subnav a { color: var(--ink-muted); text-decoration: none; }
.wc-page .wc-subnav a:hover { color: var(--ink); }
.wc-page .wc-subnav a.is-active { color: var(--ink); }
.wc-table .wc-brand, .wc-label .wc-brand, .wc-greet .wc-brand { margin-left: 8px; }

/* ---- Desktop app page ---- */
.wc-desk { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
.wc-desk__hero { flex-direction: row; align-items: flex-start; gap: 20px; }
.wc-desk__hero img { border-radius: 16px; flex: none; }
.wc-desk__hero h3 { font: 600 20px var(--font-display); margin: 0 0 6px; }
.wc-desk__hero p { color: var(--on-night-muted); margin: 0 0 16px; line-height: 1.6; max-width: 560px; }
.wc-desk__hero .wc-btn { display: inline-flex; gap: 8px; align-items: center; }
.wc-desk__hero .wc-btn[hidden] { display: none; }
.wc-desk__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.wc-desk__steps li { display: flex; gap: 14px; }
.wc-desk__steps em { font-style: normal; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--indigo-tint); color: var(--indigo); display: grid; place-items: center; font: 600 13px var(--font-display); }
.wc-desk__steps p { margin: 2px 0 0; color: var(--ink-muted); line-height: 1.55; }
.wc-desk__list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; line-height: 1.55; }
@media (max-width: 600px) { .wc-desk__hero { flex-direction: column; } }

/* ==================================================================
   WeftCore 1.1 shell: side menu, top bar, scrollbars, opening animation,
   confirm box. Loaded after components.css and extra.css.
   ================================================================== */

:root { --side-w: 248px; --side-mini: 72px; --side-bg: #0e1230; --side-ink: #eef0ff; --side-muted: #8b92c4; --side-hover: rgba(255,255,255,.06); --side-line: rgba(255,255,255,.08); --weft: #f2b640; --top-h: 60px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --side-bg: #070917; --side-line: rgba(255,255,255,.06); } }
:root[data-theme="dark"] { --side-bg: #070917; --side-line: rgba(255,255,255,.06); }

/* ---------- scrollbars: thin, rounded, quiet ---------- */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink-muted) 45%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink-muted) 40%, transparent); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--indigo) 70%, transparent); }
::-webkit-scrollbar-corner { background: transparent; }
.wc-side, .wc-side * { scrollbar-color: rgba(255,255,255,.18) transparent; }
.wc-side ::-webkit-scrollbar-thumb, .wc-side::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,.16); }

/* ---------- page frame ---------- */
.wc-shell { display: block; }
.wc-main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .2s ease; min-width: 0; }
.wc-main > .wc-page { width: 100%; box-sizing: border-box; flex: 1; }
.wc-side-mini .wc-main { margin-left: var(--side-mini); }

/* ---------- side menu ---------- */
.wc-side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 30; background: var(--side-bg); color: var(--side-ink); display: flex; flex-direction: column; padding: 18px 12px 12px; box-sizing: border-box; transition: width .2s ease, transform .25s ease; overflow: hidden; }
/* the band of the open workspace runs down the menu's edge like a selvedge */
.wc-side::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 3px; background: var(--ws-band, var(--indigo)); opacity: .9; }
.wc-side__top { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 18px; min-height: 30px; }
.wc-side__home { display: flex; align-items: center; }
.wc-side__logo { height: 22px; width: auto; display: block; }
.wc-side__mark { display: none; width: 30px; height: 30px; border-radius: 8px; }
.wc-side__close { display: none; background: none; border: 0; color: var(--side-muted); padding: 6px; border-radius: 8px; cursor: pointer; }
.wc-side__close .wc-ic { width: 20px; height: 20px; }

.wc-side .wc-side__ws { margin: 0 0 14px; }
.wc-side .wc-ws__btn { width: 100%; height: 48px; background: rgba(255,255,255,.05); border: 1px solid var(--side-line); color: var(--side-ink); border-radius: 12px; padding: 0 10px 0 8px; }
.wc-side .wc-ws__btn:hover:not([disabled]) { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.16); }
.wc-side .wc-ws__btn[disabled] { cursor: default; }
.wc-side .wc-ws__btn > .wc-side__label { flex: 1; min-width: 0; }
.wc-side .wc-ws__btn .wc-ws__name { overflow: hidden; text-overflow: ellipsis; color: #fff; }
.wc-side .wc-ws__btn .wc-ws__sub { color: var(--side-muted); }
.wc-side .wc-ws__menu .wc-ws__name { color: var(--ink); }
.wc-side .wc-ws__btn svg { color: var(--side-muted); }
.wc-side .wc-ws__menu { position: fixed; top: 112px; left: 12px; width: 300px; color: var(--ink); z-index: 40; }

.wc-nav { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 0 4px; }
.wc-nav__group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.wc-nav__head { font-size: 12px; font-weight: 600; color: var(--side-muted); padding: 4px 12px 6px; white-space: nowrap; }
.wc-nav__item { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 10px; color: #c9cdf0; text-decoration: none; font: 600 14px var(--font-sans); white-space: nowrap; border: 0; background: none; cursor: pointer; width: 100%; text-align: left; box-sizing: border-box; }
.wc-nav__item .wc-ic { width: 20px; height: 20px; flex: none; opacity: .85; }
.wc-nav__item:hover { background: var(--side-hover); color: #fff; }
.wc-nav__item:focus-visible { outline: 2px solid var(--weft); outline-offset: -2px; }
/* the open page: a gold weft thread passes through it */
.wc-nav__item.is-active { background: rgba(138,148,255,.14); color: #fff; }
.wc-nav__item.is-active .wc-ic { opacity: 1; color: var(--weft); }
.wc-nav__item.is-active::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 22px; margin-top: -11px; border-radius: 0 4px 4px 0; background: var(--weft); width: 4px; }
.wc-side__foot { border-top: 1px solid var(--side-line); padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.wc-side__collapse { color: var(--side-muted); font-weight: 500; font-size: 13px; }

/* narrow menu: icons only */
.wc-side-mini .wc-side { width: var(--side-mini); }
.wc-side-mini .wc-side__label, .wc-side-mini .wc-side__logo, .wc-side-mini .wc-side .wc-ws__btn > svg { display: none; }
.wc-side-mini .wc-side__mark { display: block; }
.wc-side-mini .wc-side__top { justify-content: center; padding-inline: 0; }
.wc-side-mini .wc-side .wc-ws__btn { justify-content: center; padding: 0; }
.wc-side-mini .wc-nav__item { justify-content: center; padding: 0; }
.wc-side-mini .wc-nav__group { margin-bottom: 8px; padding-top: 8px; border-top: 1px solid var(--side-line); }
.wc-side-mini .wc-nav__group:first-child { border-top: 0; padding-top: 0; }
.wc-side-mini .wc-side__collapse .wc-ic { transform: scaleX(-1); }
.wc-side__scrim { display: none; }

/* ---------- top bar ---------- */
.wc-top { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 16px; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
@media (min-width: 900px) { .wc-top { padding-inline: var(--space-8); } }
.wc-top__menu { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); place-items: center; cursor: pointer; flex: none; }
.wc-top__menu .wc-ic { width: 20px; height: 20px; }
.wc-top .wc-search { width: min(440px, 100%); height: 40px; background: var(--surface); border-radius: 12px; }
.wc-top__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.wc-helpbtn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: 600 13px var(--font-sans); cursor: pointer; }
.wc-helpbtn .wc-ic { width: 18px; height: 18px; color: var(--indigo); }
.wc-helpbtn:hover { border-color: var(--indigo); }
.wc-top .wc-user { height: 40px; padding: 0 10px 0 4px; border-radius: 12px; gap: 10px; }
.wc-top .wc-avatar { width: 32px; height: 32px; border-radius: 9px; }
.wc-user__txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.wc-user__txt b { font-size: 13px; }
.wc-user__txt small { font-size: 11px; color: var(--ink-muted); }
.wc-top .wc-user > .wc-ic { width: 14px; height: 14px; color: var(--ink-muted); }
.wc-top .wc-ws__menu--right { top: 48px; }
.wc-shell .wc-foot { margin-top: auto; }

/* phones and small tablets: the menu slides in */
@media (max-width: 1000px) {
  .wc-main, .wc-side-mini .wc-main { margin-left: 0; }
  .wc-side, .wc-side-mini .wc-side { width: min(300px, 86vw); transform: translateX(-102%); box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .wc-side-mini .wc-side__label, .wc-side-mini .wc-side__logo { display: initial; }
  .wc-side-mini .wc-side__mark { display: none; }
  .wc-side-mini .wc-nav__item { justify-content: flex-start; padding: 0 12px; }
  .wc-side-open .wc-side { transform: none; }
  .wc-side__close { display: grid; }
  .wc-side__collapse { display: none; }
  .wc-side-open .wc-side__scrim { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(7,9,23,.5); }
  .wc-top__menu { display: grid; }
  .wc-user__txt, .wc-top .wc-user > .wc-ic, .wc-top .wc-search kbd { display: none; }
  .wc-top .wc-search { display: flex; }
}
@media (max-width: 560px) {
  .wc-helpbtn span { display: none; }
  .wc-helpbtn { padding: 0; width: 40px; justify-content: center; }
  .wc-top { gap: 8px; }
}

/* ---------- confirm box ---------- */
.wc-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(7,9,23,.45); animation: wc-fade .15s ease; }
.wc-modal[hidden] { display: none; }
.wc-modal__box { width: min(420px, 100%); background: var(--surface); color: var(--ink); border-radius: 18px; padding: 24px; box-shadow: var(--shadow-pop); animation: wc-pop .18s cubic-bezier(.2,.9,.3,1.2); }
.wc-modal__box h3 { margin: 0 0 8px; font: 600 18px var(--font-display); }
.wc-modal__box p { margin: 0 0 20px; color: var(--ink-muted); line-height: 1.55; }
.wc-modal__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
@keyframes wc-fade { from { opacity: 0; } }
@keyframes wc-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- small polish across pages ---------- */
.wc-page { gap: var(--space-5); }
.wc-card { transition: border-color .15s; }
.wc-flash { animation: wc-pop .2s ease; }
:focus-visible { outline-color: var(--indigo); }
::selection { background: color-mix(in srgb, var(--indigo) 25%, transparent); }

/* ==================================================================
   Opening animation: the logo weaves itself. ~2.3 s, once per session.
   ================================================================== */
.wc-nointro .wc-intro { display: none; }
.wc-intro { position: fixed; inset: 0; z-index: 100; background: #0e1230; display: grid; place-items: center; cursor: pointer; overflow: hidden; outline: none; }
.wc-intro.is-leaving { animation: wc-intro-out .45s cubic-bezier(.7,0,.3,1) forwards; }
.wc-intro::before { content: ""; position: absolute; inset: 0; opacity: .35;
  background: repeating-linear-gradient(90deg, rgba(138,148,255,.12) 0 2px, transparent 2px 26px);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%); }
.wc-intro__stage { position: relative; width: min(440px, 80vw); text-align: center; }
.wc-intro__go { position: absolute; left: 0; right: 0; bottom: max(48px, 9vh); margin: 0; text-align: center; color: #8b92c4; font: 600 13px var(--font-sans); letter-spacing: .02em; opacity: 0; animation: wc-fade-in .5s ease 2.3s forwards, wc-breathe 2.4s ease-in-out 2.8s infinite; }
.wc-intro__go-touch { display: none; }
@media (hover: none) { .wc-intro__go-pc { display: none; } .wc-intro__go-touch { display: inline; } }
@keyframes wc-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.wc-intro__mark { width: 100%; height: auto; display: block; overflow: visible; }
.wc-intro__mark .b { fill: #fff; transform-box: fill-box; transform-origin: 50% 0; opacity: 0; animation: wc-drop .55s cubic-bezier(.3,1.6,.5,1) forwards; }
.wc-intro__mark .b2, .wc-intro__mark .b4 { fill: #8a94ff; }
.wc-intro__mark .b1 { animation-delay: .05s; } .wc-intro__mark .b2 { animation-delay: .15s; } .wc-intro__mark .b3 { animation-delay: .25s; } .wc-intro__mark .b4 { animation-delay: .35s; }
.wc-intro__mark path { fill: none; stroke-width: 7; stroke-dasharray: 1; stroke-dashoffset: 1; animation: wc-stitch .45s ease-out forwards; }
.wc-intro__mark .eft path { stroke: #fff; }
.wc-intro__mark .core path { stroke: #8a94ff; }
.wc-intro__mark .eft path:nth-child(1) { animation-delay: .5s; } .wc-intro__mark .eft path:nth-child(2) { animation-delay: .6s; }
.wc-intro__mark .eft path:nth-child(3) { animation-delay: .7s; } .wc-intro__mark .eft path:nth-child(4) { animation-delay: .75s; }
.wc-intro__mark .core path:nth-child(1) { animation-delay: .85s; } .wc-intro__mark .core path:nth-child(2) { animation-delay: .95s; }
.wc-intro__mark .core path:nth-child(3) { animation-delay: 1.05s; } .wc-intro__mark .core path:nth-child(4) { animation-delay: 1.12s; }
/* the shuttle: a gold weft thread flies across under the name */
.wc-intro__weft { display: block; height: 3px; margin: 18px auto 0; width: 100%; border-radius: 3px; background: linear-gradient(90deg, transparent, #f2b640 12%, #f2b640 88%, transparent); transform: scaleX(0); transform-origin: 0 50%; animation: wc-weft .45s cubic-bezier(.6,0,.2,1) 1.25s forwards; position: relative; }
.wc-intro__weft::after { content: ""; position: absolute; right: -2px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #f2b640; box-shadow: 0 0 14px 3px rgba(242,182,64,.6); opacity: 0; animation: wc-fade-in .2s 1.6s forwards, wc-fade-out .3s 1.95s forwards; }
.wc-intro__tag { margin: 20px 0 0; color: #c6cbef; font: 500 clamp(11.5px, 3.4vw, 19px)/1.45 var(--font-sans); letter-spacing: .01em; white-space: nowrap; position: relative; left: 50%; transform: translateX(-50%); width: max-content; }
.wc-intro__tag span { display: inline-block; opacity: 0; transform: translateY(10px); animation: wc-rise .4s cubic-bezier(.2,.9,.3,1.3) forwards; animation-delay: calc(1.45s + var(--i) * .08s); }
@keyframes wc-drop { from { opacity: 0; transform: translateY(-120%) scaleY(1.3); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes wc-stitch { to { stroke-dashoffset: 0; } }
@keyframes wc-weft { to { transform: scaleX(1); } }
@keyframes wc-rise { to { opacity: 1; transform: none; } }
@keyframes wc-fade-in { to { opacity: 1; } }
@keyframes wc-fade-out { to { opacity: 0; } }
@keyframes wc-intro-out { to { clip-path: inset(0 0 100% 0); visibility: hidden; pointer-events: none; } }
@media (prefers-reduced-motion: reduce) { .wc-intro { display: none; } .wc-modal, .wc-modal__box, .wc-flash { animation: none; } }

@media print { .wc-side, .wc-top, .wc-intro, .wc-modal, .wc-assist, .wc-assist-fab { display: none !important; } .wc-main { margin: 0 !important; } }

/* label / value lists (invoice totals, details, counts) */
.wc-list-plain { list-style: none; margin: 0; padding: 4px 20px 12px; }
.wc-list-plain li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.wc-list-plain li:last-child { border-bottom: 0; }
.wc-list-plain li > span { color: var(--ink-muted); }
.wc-list-plain li > b { text-align: right; font-weight: 600; }
.wc-card__body .wc-list-plain { padding: 0; }

/* Overview layout: sales story beside the four key figures */
.wc-dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-4); }
.wc-dash > div { min-width: 0; }
.wc-dash .wc-night { height: 100%; box-sizing: border-box; }
.wc-kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); height: 100%; }
.wc-kpi-grid > * { min-width: 0; }
@media (max-width: 1200px) { .wc-dash > div { grid-column: span 12 !important; } }
@media (max-width: 520px) { .wc-kpi-grid { grid-template-columns: 1fr; } }
.wc-btn.is-busy { opacity: .7; cursor: progress; }

/* error log entries */
.wc-errlog { border-top: 1px solid var(--border); }
.wc-errlog:first-of-type { border-top: 0; }
.wc-errlog summary { display: flex; align-items: center; gap: 16px; padding: 12px 20px; cursor: pointer; list-style: none; }
.wc-errlog summary::-webkit-details-marker { display: none; }
.wc-errlog summary:hover { background: var(--surface-sunk); }
.wc-errlog__when { flex: none; width: 110px; font-size: 12.5px; color: var(--ink-muted); }
.wc-errlog__what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wc-errlog__what b { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.wc-errlog__what small { font-size: 12px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-errlog code { flex: none; font: 600 12px var(--font-mono); background: var(--surface-sunk); padding: 3px 8px; border-radius: 6px; }
.wc-errlog pre { margin: 0 20px 16px; padding: 14px; background: var(--surface-sunk); border-radius: 10px; font: 12px/1.55 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }
@media (max-width: 640px) { .wc-errlog summary { flex-wrap: wrap; gap: 6px 12px; } .wc-errlog__what { order: 3; flex-basis: 100%; } }

/* step-by-step setup lists (Backups, Test copy) */
.wc-setup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.wc-setup { display: flex; gap: 14px; }
.wc-setup > em { flex: none; font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--indigo-tint); color: var(--indigo); font: 600 13px var(--font-display); }
.wc-setup.is-done > em { background: var(--success-tint); color: var(--success); }
.wc-setup > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.wc-setup > div > b { font-size: 15px; line-height: 28px; }
.wc-substeps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.55; font-size: 14px; }
.wc-copy { display: flex; align-items: center; gap: 8px; margin-top: 6px; background: var(--surface-sunk); border: 1px solid var(--border); border-radius: 10px; padding: 6px 6px 6px 12px; }
.wc-copy code { flex: 1; min-width: 0; font: 500 12.5px/1.5 var(--font-mono); overflow-wrap: anywhere; }
.wc-setup details summary { cursor: pointer; font-weight: 600; color: var(--indigo); }

/* test copy marker */
.wc-sandbox-bar { position: relative; z-index: 70; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 16px; background: repeating-linear-gradient(-45deg, #f2b640 0 14px, #f5c25b 14px 28px); color: #0e1230; font-size: 13px; text-align: center; }
.wc-sandbox-bar b { font: 700 12px var(--font-sans); letter-spacing: .04em; background: #0e1230; color: #f2b640; padding: 2px 8px; border-radius: 6px; }
.wc-shell .wc-sandbox-bar { margin-left: var(--side-w); }
.wc-side-mini .wc-shell .wc-sandbox-bar, .wc-side-mini .wc-sandbox-bar { margin-left: var(--side-mini); }
@media (max-width: 1000px) { .wc-shell .wc-sandbox-bar, .wc-side-mini .wc-sandbox-bar { margin-left: 0; } }

/* ---------- tasks ---------- */
.wc-nav__count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font: 700 11px/20px var(--font-sans); text-align: center; }
.wc-nav__count.is-new { background: var(--indigo); }
.wc-nav__count.is-late { background: #e5484d; }
.wc-side-mini .wc-nav__count { position: absolute; top: 4px; right: 8px; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; font-size: 10px; }
.wc-taskstrip { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; }
.wc-taskstrip .wc-ic { width: 20px; height: 20px; color: var(--indigo); flex: none; }
.wc-taskstrip span { flex: 1; }
.wc-taskstrip em { font-style: normal; font-weight: 600; color: var(--indigo); white-space: nowrap; }
.wc-taskstrip.is-late { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: var(--danger-tint); }
.wc-taskstrip:hover { border-color: var(--indigo); }
.wc-todo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wc-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-sunk); border-radius: 10px; }
.wc-seg a { padding: 6px 14px; border-radius: 8px; font: 600 13px var(--font-sans); color: var(--ink-muted); text-decoration: none; }
.wc-seg a.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(14,18,48,.1); }
.wc-todo-filter .wc-input { height: 36px; min-width: 200px; }
.wc-todo-wrap { display: flex; flex-direction: column; gap: 18px; }
.wc-todo-group h3 { margin: 0 0 8px; font: 600 14px var(--font-display); display: flex; align-items: center; gap: 8px; }
.wc-todo-group h3 span { font: 600 12px var(--font-sans); color: var(--ink-muted); background: var(--surface-sunk); border-radius: 999px; padding: 1px 8px; }
.wc-todo-group.is-late h3 { color: var(--danger); }
.wc-todo-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.wc-todo { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--border); }
.wc-todo:first-child { border-top: 0; }
.wc-todo:hover { background: color-mix(in srgb, var(--surface-sunk) 60%, transparent); }
.wc-todo__tick { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: transparent; padding: 0; transition: all .15s; }
.wc-todo__tick .wc-ic { width: 14px; height: 14px; }
button.wc-todo__tick:hover { border-color: var(--success); color: var(--success); }
.wc-todo__tick.is-static { cursor: default; }
.wc-todo__tick.is-done { background: var(--success); border-color: var(--success); color: #fff; }
.wc-todo__main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.wc-todo__main b { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.wc-todo__meta { font-size: 12.5px; color: var(--ink-muted); }
.wc-todo.is-done .wc-todo__main b, .wc-todo.is-cancelled .wc-todo__main b { text-decoration: line-through; color: var(--ink-muted); }
.wc-todo__side { flex: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.wc-todo__due { font-size: 12.5px; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }
.wc-todo__due.is-late { color: var(--danger); }
.wc-todo__due.is-today { color: var(--warning); }
.wc-todo__due.is-soon { color: var(--indigo); }
.wc-todo-role { margin: 12px 0 6px; font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.wc-note-thread { list-style: none; margin: 0; padding: 4px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.wc-note-item { background: var(--surface-sunk); border-radius: 12px; padding: 10px 14px; }
.wc-note-item.is-me { background: var(--indigo-tint); }
.wc-note-item b { font-size: 13px; }
.wc-note-item span { font-size: 12px; color: var(--ink-muted); margin-left: 8px; }
.wc-note-item p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; }
@media (max-width: 640px) { .wc-todo { flex-wrap: wrap; } .wc-todo__side { width: 100%; justify-content: flex-start; padding-left: 40px; } }
.wc-page a.wc-todo__main, .wc-page a.wc-taskstrip { color: var(--ink); text-decoration: none; } .wc-page a.wc-todo__main:hover b { color: var(--indigo); }

/* ---------- approvals ---------- */
.wc-tabcount { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--indigo); color: var(--on-indigo); font: 700 11px/18px var(--font-sans); text-align: center; }
.wc-appr-wrap { display: flex; flex-direction: column; gap: 18px; }
.wc-appr-group h3 { margin: 0 0 8px; font: 600 14px var(--font-display); display: flex; align-items: center; gap: 8px; }
.wc-appr-group h3 span { font: 600 12px var(--font-sans); color: var(--ink-muted); background: var(--surface-sunk); border-radius: 999px; padding: 1px 8px; }
.wc-appr-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.wc-appr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--border); }
.wc-appr:first-child { border-top: 0; }
.wc-appr__main { display: flex; flex-direction: column; min-width: 0; }
.wc-appr__main b { font-weight: 600; font-size: 14.5px; }
.wc-page .wc-appr__main b a { color: var(--ink); text-decoration: none; }
.wc-page .wc-appr__main b a:hover { color: var(--indigo); }
.wc-appr__main small { font-size: 12.5px; color: var(--ink-muted); overflow-wrap: anywhere; }
.wc-appr__amt { font-weight: 700; font-size: 14.5px; white-space: nowrap; text-align: right; }
.wc-appr__form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.wc-appr__form .wc-input { width: 170px; height: 32px; font-size: 13px; }
@media (max-width: 900px) { .wc-appr { grid-template-columns: 1fr auto; } .wc-appr__form { grid-column: 1 / -1; justify-content: flex-start; } .wc-appr__form .wc-input { flex: 1; min-width: 140px; } }
.wc-appr__main .wc-brand { margin-left: 8px; }

/* ==================================================================
   Sign-in: one centred column on the night loom.
   ================================================================== */
.wc-public .wc-page { max-width: none; padding: 0; margin: 0; }
.wc-signin { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; box-sizing: border-box; display: grid; place-items: center; padding: 40px 16px; background: radial-gradient(ellipse 70% 55% at 50% 45%, #1b2163 0%, #0e1230 70%); }
.wc-signin__loom { position: absolute; inset: 0; z-index: -1; opacity: .55; -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, transparent 35%, #000 80%); mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, transparent 35%, #000 80%); }
.wc-loom { width: 100%; height: 100%; display: block; }
.wc-loom__warp line { stroke: #8a94ff; stroke-width: 1.2; }
.wc-loom__weft path { fill: none; stroke: #4b55b8; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: wc-loom-weave 1.6s cubic-bezier(.5,0,.2,1) var(--d) forwards; }
.wc-loom__weft path:nth-child(odd) { stroke: #343d94; }
.wc-loom__weft path.gold { stroke: #f2b640; stroke-width: 2.4; }
.wc-loom__cut line { stroke: #0e1230; stroke-width: 6; opacity: 0; animation: wc-loom-show .01s linear var(--d) forwards; }
.wc-loom__over line { stroke: #8a94ff; stroke-width: 1.2; opacity: 0; animation: wc-loom-show .01s linear var(--d) forwards; }
@keyframes wc-loom-weave { to { stroke-dashoffset: 0; } }
@keyframes wc-loom-show { to { opacity: 1; } }

.wc-signin__col { width: min(440px, 100%); text-align: center; }
.wc-signin__brand img { height: 36px; width: auto; display: inline-block; }
.wc-signin__brand p { margin: 14px 0 28px; color: #c6cbef; font: 500 clamp(11.5px, 3.4vw, 16px)/1.5 var(--font-sans); white-space: nowrap; }
.wc-signin__col { width: min(440px, 100%); }
.wc-signin__brand { width: max-content; max-width: calc(100vw - 24px); margin: 0 auto; }

.wc-signin__card { text-align: left; background: var(--surface); color: var(--ink); border-radius: 24px; padding: 32px; box-shadow: 0 30px 80px rgba(3,5,20,.55), 0 0 0 1px rgba(255,255,255,.04); }
.wc-signin__card h1 { margin: 0 0 20px; font: 600 24px/1.2 var(--font-display); letter-spacing: -.01em; }
.wc-signin__card .wc-flash { margin: 0 0 16px; }
.wc-signin__form { display: flex; flex-direction: column; gap: 16px; }
.wc-roleselect { position: relative; display: block; }
.wc-roleselect select { width: 100%; appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; font-weight: 600; background: var(--surface); }
.wc-roleselect select.is-empty { color: var(--ink-muted); font-weight: 500; }
.wc-roleselect select option { color: var(--ink); font-weight: 500; }
.wc-roleselect::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted); transform: rotate(45deg); pointer-events: none; }
.wc-field > .wc-pw { font-size: inherit; font-weight: inherit; }
.wc-pw { position: relative; display: block; }
.wc-pw .wc-input { width: 100%; padding-right: 64px; box-sizing: border-box; }
.wc-pw__eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--indigo); font: 600 12px var(--font-sans); padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.wc-pw__eye:hover { background: var(--indigo-tint); }
.wc-signin__form .wc-input { height: 46px; font-size: 15px; border-radius: 12px; }
.wc-signin__form .wc-field { gap: 6px; }
.wc-signin__go { height: 50px; font-size: 15px; border-radius: 12px; margin-top: 4px; }
.wc-signin__forgot { margin: 16px 0 0; text-align: center; font-size: 12.5px; color: var(--ink-muted); }

.wc-signin__foot { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #8b92c4; }
.wc-signin__install { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff; border-radius: 999px; padding: 7px 14px; font: 600 12.5px var(--font-sans); cursor: pointer; }
.wc-signin__install:hover { background: rgba(255,255,255,.14); }
.wc-signin__install[hidden] { display: none; }

@media (max-width: 480px) {
  .wc-signin { padding: 28px 12px; place-items: start center; }
  .wc-signin__card { padding: 24px 18px; border-radius: 20px; }
  .wc-signin__brand img { height: 30px; }
  .wc-signin__brand p { margin-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) { .wc-loom__weft path { animation: none; stroke-dashoffset: 0; } .wc-loom__cut line, .wc-loom__over line { animation: none; opacity: 1; } }
.wc-loom line { vector-effect: non-scaling-stroke; }

/* ==================================================================
   Help assistant: a panel that slides in from the right.
   ================================================================== */
.wc-assist { position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(400px, calc(100vw - 24px)); z-index: 50; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 24px 60px rgba(14,18,48,.28); overflow: hidden; animation: wc-assist-in .22s cubic-bezier(.2,.9,.3,1); }
.wc-assist[hidden] { display: none; }
@keyframes wc-assist-in { from { opacity: 0; transform: translateX(24px); } }
.wc-assist__head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; background: #0e1230; color: #fff; }
.wc-assist__mark img { width: 34px; height: 34px; border-radius: 10px; display: block; }
.wc-assist__head div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.wc-assist__head b { font: 600 15px var(--font-display); }
.wc-assist__head small { font-size: 12px; color: #a9afd6; }
.wc-assist__lang { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff; border-radius: 999px; padding: 5px 10px; font: 700 11px var(--font-sans); letter-spacing: .04em; cursor: pointer; }
.wc-assist__lang:hover { background: rgba(255,255,255,.14); }
.wc-assist__x { background: none; border: 0; color: #a9afd6; padding: 6px; border-radius: 8px; cursor: pointer; display: grid; }
.wc-assist__x:hover { color: #fff; background: rgba(255,255,255,.08); }
.wc-assist__x .wc-ic { width: 18px; height: 18px; }

.wc-assist__pick { padding: 28px 20px; display: flex; flex-direction: column; gap: 10px; }
.wc-assist__pick[hidden] { display: none; }
.wc-assist__pick p { margin: 0 0 8px; font: 600 18px/1.3 var(--font-display); }
.wc-assist__pick p span { font: 500 14px var(--font-sans); color: var(--ink-muted); }
.wc-assist__pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--ink); cursor: pointer; font: inherit; }
.wc-assist__pick button:hover { border-color: var(--indigo); background: var(--indigo-tint); }
.wc-assist__pick b { font-size: 15px; }
.wc-assist__pick small { color: var(--ink-muted); font-size: 12.5px; }
.wc-assist__pick:not([hidden]) ~ .wc-assist__form, .wc-assist__pick:not([hidden]) ~ .wc-assist__chips { display: none; }

.wc-assist__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.wc-msg { max-width: 92%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; animation: wc-pop .18s ease; }
.wc-msg--bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.wc-msg--me { align-self: flex-end; background: var(--indigo); color: var(--on-indigo); border-bottom-right-radius: 6px; }
.wc-msg p { margin: 0 0 6px; } .wc-msg p:last-child { margin-bottom: 0; }
.wc-msg h4 { margin: 0 0 6px; font: 600 14px var(--font-display); }
.wc-msg ol, .wc-msg ul { margin: 4px 0 8px; padding-left: 20px; }
.wc-msg li { margin: 3px 0; }
.wc-msg a { color: var(--indigo); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.wc-msg code { font: 500 12px var(--font-mono); background: var(--surface-sunk); padding: 1px 5px; border-radius: 5px; }
.wc-msg blockquote { margin: 6px 0 0; padding: 8px 10px; border-left: 3px solid var(--danger); background: var(--danger-tint); color: var(--ink); border-radius: 0 8px 8px 0; font-size: 13px; }
.wc-msg__dots { color: var(--ink-muted); animation: wc-blink 1s infinite alternate; }
@keyframes wc-blink { to { opacity: .4; } }

.wc-assist__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; background: var(--bg); }
.wc-assist__chips:empty { display: none; }
.wc-assist__chips button { border: 1px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: 600 12.5px var(--font-sans); cursor: pointer; text-align: left; }
.wc-assist__chips button:hover { border-color: var(--indigo); color: var(--indigo); }
.wc-assist__form { display: flex; gap: 8px; padding: 12px 14px 14px; background: var(--bg); }
.wc-assist__form input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; font: 500 14px var(--font-sans); background: var(--surface); color: var(--ink); }
.wc-assist__form input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-tint); }
.wc-assist__form button { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--indigo); color: var(--on-indigo); display: grid; place-items: center; cursor: pointer; }
.wc-assist__form button .wc-ic { width: 18px; height: 18px; }
@media (max-width: 560px) { .wc-assist { inset: 0; width: auto; border-radius: 0; border: 0; } }
.wc-assist__pick:not([hidden]) ~ .wc-assist__log { display: none; } .wc-assist__pick { flex: 1; }
