.workspace-nav a[aria-current] {
    color:#31052e; font-weight:700; background:linear-gradient(#fff398,#efb316);
    border-inline-start-color:#ffe283;
}
.reference-dashboard { grid-template-columns:minmax(0,1.15fr) minmax(0,.86fr) minmax(0,1fr); }
.reference-dashboard .dashboard-tile h2 small { font-size:.72em; font-weight:400; }
.reference-chart { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:.2rem; }
.reference-chart li { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto 5.5rem auto; gap:.25rem; text-align:center; font-size:.7rem; margin:0; }
.reference-chart strong { overflow-wrap:anywhere; }
.reference-chart .bar-track { position:relative; width:54%; height:100%; margin:auto; border-radius:.18rem; }
.reference-chart .bar-fill { position:absolute; bottom:0; width:100%; background:linear-gradient(#e740b8,#680449); }
.latest-rates dl { margin:0; }
.latest-rates dl div { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.2rem .6rem; padding:.4rem .15rem; border-bottom:1px solid #eadbea; }
.latest-rates dd { margin:0; font-weight:700; }
.dashboard-jewellery { display:flex; flex-direction:column; justify-content:center; align-items:flex-start; gap:.55rem; padding:.9rem; min-height:9rem; border-radius:.8rem; background:url("brand/original-jewellery.webp") right center/auto 100% no-repeat,#35043e; text-decoration:none; }
.dashboard-jewellery strong,.dashboard-jewellery span { max-width:70%; border-radius:.35rem; padding:.25rem .45rem; }
.dashboard-jewellery strong { color:#ffdf76; background:#35043e; }
.dashboard-jewellery span { color:#35043e; background:#ffde6c; }
.dashboard-actions { margin-block:.8rem; }
.dashboard-actions .quick-grid a { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.2rem; background:#fff7e5; border:1px solid #eddfb1; }
.dashboard-actions img { object-fit:contain; }
.pos-item-panel { min-width:0; background:#fff9fc; border:1px solid #e8d2df; border-radius:.65rem; overflow:hidden; }
.pos-item-panel h2 { font-size:1.05rem; margin:0; padding:.55rem .75rem; }
.pos-item-scroll { overflow-x:auto; }
.pos-items { min-width:41rem; }
.pos-items thead th { background:linear-gradient(#950a6a,#35043e); color:white; }
.pos-items th,.pos-items td { padding:.32rem; vertical-align:top; }
.pos-items th[scope="row"] { background:#fdebf6; }
.pos-items select { min-height:2.5rem; padding:.4rem; }
.pos-items td:nth-child(2),.pos-items td:nth-child(3) { width:26%; }
.pos-items [data-row-total],.pos-items [data-row-net] { text-align:end; white-space:nowrap; }
.pos-charges summary { cursor:pointer; color:#790750; padding:.4rem; }
.pos-charge-inputs { min-width:6rem; display:grid; gap:.25rem; }
.pos-charge-inputs input { min-height:2.25rem; padding:.25rem; }
.gold-action { color:#35043e; font-weight:800; background:linear-gradient(#ffec86,#e5aa12); }
.invoice-a4 .invoice-brand { display:grid; grid-template-columns:minmax(65px,20%) minmax(0,1fr); gap:.4rem .7rem; align-items:center; }
.invoice-a4 .invoice-brand::after { grid-column:1/-1; }
.invoice-brand-mark { max-width:100%; height:auto; border-inline-end:1px solid #bd9a47; padding-inline-end:.4rem; }
.invoice-a4 .invoice-summary { display:grid; grid-template-columns:auto minmax(0,1fr) minmax(0,1.15fr); align-items:start; gap:.65rem; }
.invoice-a4 .invoice-summary:not(:has(.invoice-scan)) {grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);}
.invoice-a4 .invoice-money { min-width:0; width:100%; overflow-wrap:anywhere; }
.invoice-a4 .invoice-detail { background:#fff0e7; border:1px solid #eed5bb; }
.invoice-methods { display:flex; flex-wrap:wrap; gap:.35rem .85rem; padding:.45rem .6rem; margin:.3em 0; list-style:none; border:1px solid #ead2e1; border-radius:.45rem; background:#fff4f7; }
.invoice-art-footer { display:block; width:100%; height:auto; margin-top:.65em; }
@media screen and (max-width:1100px) {
    .reference-dashboard { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
    .dashboard-jewellery { grid-column:1/-1; }
}
@media screen and (max-width:640px) {
    .reference-dashboard,.invoice-a4 .invoice-summary,.invoice-a4 .invoice-summary:not(:has(.invoice-scan)) { grid-template-columns:minmax(0,1fr); }
    .invoice-scan .qr-code { margin:auto; }
    .invoice-a4 .invoice-brand { padding-inline-end:4.5rem; }
}
@media print {
    .invoice-art-footer { break-inside:avoid; }
    .invoice-art-footer,.invoice-methods { print-color-adjust:exact; }
}
.pos-scan { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:.35rem .55rem; padding:.5rem .7rem; }
.pos-scan p { grid-column:1/-1; margin:0; }
.pos-scan p:empty { display:none; }
.pos-scan input { min-width:0; }
.pos-stock-photo { width:2.35rem; height:2.35rem; object-fit:contain; border-radius:.25rem; background:#35043e; }
.pos-items td:nth-child(2),.pos-items td:nth-child(3) { width:auto; }
.pos-items td:nth-child(3),.pos-items td:nth-child(4) { width:25%; }
.draft-invoice-header { display:grid; grid-template-columns:3.8rem minmax(0,1fr); align-items:center; gap:.45rem;
    color:#ffe477; padding:.4rem; border-radius:.45rem; background:#35043e; }
.draft-invoice-header img { width:100%; height:auto; }
.draft-invoice-header span { display:block; color:#fff2bd; font-size:.75rem; }
.draft-invoice-header strong { overflow-wrap:anywhere; }
.draft-invoice-customer { font-size:.84rem; padding:.45rem; margin-block:.35rem; background:#f9edf4; overflow-wrap:anywhere; }
.draft-invoice-items { font-size:.8rem; table-layout:fixed; }
.draft-invoice-items th,.draft-invoice-items td { padding:.2rem; overflow-wrap:anywhere; }
.draft-invoice-items th { color:white; background:#35043e; }
.draft-invoice-items th:first-child { width:41%; }
.draft-invoice-items :is(th,td):last-child { text-align:end; }
.pos-calculator { border:1px solid #e6c94f; border-radius:.5rem; background:#fff9e4; padding:.45rem; }
.pos-calculator summary { color:#541149; cursor:pointer; }
.pos-calculator label { font-size:.82rem; }
.pos-calculator input,.pos-calculator select { min-height:2.25rem; }
.pos-calculator output { font-weight:bold; }
.dashboard-lower { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:.8rem; }
.dashboard-month dl { margin:0; }
.dashboard-month dl div { display:flex; justify-content:space-between; gap:.55rem; padding:.4rem; border-bottom:1px solid #eadbea; }
.dashboard-month dl div:last-child { background:#fff0bd; color:#35043e; font-weight:bold; }
.dashboard-month dd { margin:0; font-weight:700; overflow-wrap:anywhere; }
@media (max-width:640px) {
    .dashboard-lower { grid-template-columns:minmax(0,1fr); }
}

/* DEV16.11.2: responsive controls; retain original KPI dimensions. */
@media screen {
  .inline { flex-wrap: wrap; }
  .inline > label { flex: 1 1 10rem; min-width: 0; }
  .inline > button { max-width: 100%; white-space: normal; }
  .panel, .fields > *, .stack > * { min-width: 0; }
  .scroll, .pos-item-scroll { max-width: 100%; }
  .pos-scan input, .pos-scan button { min-height: 48px; }
  .pos-items select, .pos-charge-inputs input, .pos-calculator input, .pos-calculator select { min-height: 48px; }
  .dashboard-compact .reference-chart strong { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
}
@media screen and (max-width: 480px) {
  .pos-scan { grid-template-columns: minmax(0,1fr); }
  .pos-scan button { width: 100%; }
  .workspace > .banner { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* DEV16.11.3: reference palette and existing artwork, no KPI sizing changes. */
.dashboard-actions .quick-grid a { border-color:#e5b638; box-shadow:0 3px 8px #35043e12; }
.dashboard-actions .quick-grid a:focus-visible, .workspace-nav a:focus-visible { outline:3px solid #a60069; outline-offset:2px; }
.pos-item-panel { border-color:#e5b638; }
.pos-item-panel h2 { background:#35043e; color:#fff6e5; border-bottom:2px solid #e5b638; }
.draft-invoice-header { border:1px solid #e5b638; }
.invoice-a4 .invoice-brand { border-bottom:2px solid #e5b638; }
.invoice-a4 .invoice-methods { border-color:#e5b638; background:#fff6e5; }
@media screen and (max-width:480px) {
  .invoice-a4 .invoice-brand { background-image:linear-gradient(112deg,#35043e,#a60069); padding-inline-end:.75rem; }
  .dashboard-jewellery { background-size:auto 85%; }
}

/* DEV16.11.4: shared non-dashboard module controls, screen only. */
@media screen {
 .workspace main > .panel > h1 { color:var(--purple); border-bottom:2px solid var(--gold); padding-bottom:.45rem; overflow-wrap:anywhere; }
 .workspace main > .panel > .scroll { border:1px solid #e8d5bd; border-radius:.65rem; }
 .workspace main > .panel > .scroll th { background:var(--purple); color:#fff6e5; }
 .workspace main > .panel > .scroll tbody tr:nth-child(even) { background:#fff6e5; }
 .workspace main > .panel fieldset { border-color:#e8d5bd; }
 .workspace main > .panel legend { color:var(--purple); font-weight:700; }
 .workspace main > .panel textarea { width:100%; min-height:96px; font:inherit; border:1px solid #a287a2; border-radius:.55rem; padding:.55rem; }
 .workspace-nav a[aria-current="page"] { border-inline-start:3px solid var(--gold); }
 .workspace main > .panel .scroll:focus-visible { outline:3px solid #a94608; outline-offset:2px; }
}
@media screen and (max-width:480px) {
 .workspace main > .panel > h1 { font-size:1.45rem; }
 .workspace main > .panel .fields { grid-template-columns:minmax(0,1fr); }
 .workspace main > .panel .inline > button { flex:1 1 auto; }
}
