:root {
  --bg: #f2ede3;
  --paper: #fffefa;
  --ink: #211d17;
  --muted: #696351;
  --olive: #4e5340;
  --line: #ded9cc;
  --danger: #923e30;
  --radius: 14px;
  --font-body: "M Sefira", "Segoe UI", Arial, sans-serif;
  --font-heading: "M Jardin", "Frank Ruhl Libre", Georgia, serif;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  font-family: var(--font-body);
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 600;
}
button:hover {
  background: #e9e6dd;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button.primary {
  background: var(--olive);
  color: white;
  border-color: var(--olive);
}
button.primary:hover {
  background: #3e4234;
}
button.quiet {
  background: transparent;
  border-color: transparent;
}
button.danger {
  color: var(--danger);
}
a {
  color: var(--olive);
  text-underline-offset: 4px;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #bdb7a7;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  min-height: 46px;
  caret-color: var(--olive);
}
textarea {
  min-height: 110px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
}
input[type="file"] {
  font-size: 14px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 24px;
}
h3 {
  font-size: 18px;
}
p {
  line-height: 1.65;
}
small,
.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
:focus-visible {
  outline: 3px solid #777f59;
  outline-offset: 3px;
}
::selection {
  background: #d5ddbf;
}
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-thumb {
  background: #c0baa9;
  border-radius: 8px;
}
.brand {
  font-family: Georgia, serif;
  font-size: 19px;
  letter-spacing: 0.1em;
  direction: ltr;
}
.brand small {
  display: block;
  letter-spacing: 0.18em;
  font-size: 11px;
  margin-top: 8px;
}
.layout {
  min-height: 100vh;
  padding-right: 238px;
}
.sidebar {
  width: 238px;
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  background: #e9e4d8;
  border-left: 1px solid var(--line);
  padding: 34px 22px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.sidebar nav {
  display: grid;
  gap: 9px;
}
.navbtn {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
  background: transparent;
  border: 0;
  font-weight: 400;
}
.navbtn.active {
  background: var(--olive);
  color: white;
}
.sidebar footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--olive);
  color: white;
}
.userline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.main {
  max-width: 1440px;
  margin: auto;
  padding: 36px 42px;
}
.topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.source {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}
.notice {
  padding: 12px 16px;
  background: #e8eadf;
  border-radius: 9px;
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.notice.warning {
  background: #faedd9;
  color: #70451b;
}
.notice button {
  white-space: nowrap;
}
.toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg);
  padding: 8px 0 18px;
  display: flex;
  gap: 10px;
}
.search {
  position: relative;
  flex: 1;
}
.search input {
  height: 54px;
  padding-right: 48px;
  border-color: #b6b1a0;
  font-size: 17px;
}
.search svg {
  position: absolute;
  right: 16px;
  top: 16px;
  color: var(--olive);
}
svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.segmented {
  display: flex;
  gap: 4px;
  align-items: center;
}
.segmented button {
  padding: 11px;
}
.segmented .selected {
  background: var(--olive);
  color: white;
}
.filterbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.chip {
  border-radius: 22px;
  min-height: 36px;
  padding: 7px 15px;
  font-size: 14px;
  font-weight: 400;
}
.chip.active {
  background: var(--olive);
  color: white;
}
.filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 20px;
  background: var(--paper);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.resultsline {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  align-items: center;
}
.catalogue.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.product {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: right;
  padding: 0;
  display: block;
  font-weight: 400;
  transition: border-color 0.18s;
}
.product:hover {
  background: var(--paper);
  border-color: #8b9077;
}
.product .photo {
  background: #ece9e2;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}
.product img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.product .info {
  padding: 17px 19px;
}
.product h3 {
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 5px;
}
.product .sku {
  direction: ltr;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.035em;
}
.stockline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 8px;
}
.stock {
  font-size: 22px;
  color: var(--olive);
  font-variant-numeric: tabular-nums;
}
.stock span {
  font-size: 13px;
  color: var(--muted);
}
.badge {
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 5px;
  background: #f0ece2;
  color: #5d5542;
}
.badge.low {
  background: #f7e8ce;
  color: #7b4d17;
}
.badge.zero {
  background: #f3ded7;
  color: #923e30;
}
.catalogue.list {
  display: grid;
  gap: 10px;
}
.list .product {
  display: flex;
  align-items: center;
}
.list .photo {
  width: 140px;
  min-width: 140px;
  aspect-ratio: 4/3;
}
.list .info {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 2px 20px;
  align-items: center;
}
.list .stockline {
  grid-column: 2;
  grid-row: 1/3;
  margin: 0;
}
.list h3 {
  margin: 0;
}
.empty {
  padding: 70px 20px;
  text-align: center;
  display: grid;
  gap: 12px;
  color: var(--muted);
}
.veil {
  position: fixed;
  inset: 0;
  background: #211d1750;
  z-index: 10;
  display: flex;
  justify-content: flex-start;
}
.drawer {
  width: min(600px, 100%);
  height: 100%;
  background: var(--paper);
  overflow: auto;
  padding: 26px 30px;
  box-shadow: 8px 0 35px #211d1720;
}
.drawerhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}
.detailphoto {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background: #eeeae2;
  border-radius: 12px;
  margin-bottom: 20px;
}
.section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.section h3 {
  margin-bottom: 16px;
}
.variant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 8px 0;
  text-align: right;
  font-weight: 400;
}
.variant.selected {
  border-color: var(--olive);
  background: #e9ecdf;
}
.variant strong {
  font-variant-numeric: tabular-nums;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions > * {
  flex: 1;
}
.form {
  display: grid;
  gap: 18px;
}
.twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.formfooter {
  position: sticky;
  bottom: -26px;
  background: var(--paper);
  padding: 18px 0 26px;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
}
.formfooter button {
  flex: 1;
}
.formerror {
  color: var(--danger);
  font-size: 14px;
}
.variantedit {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}
.movement {
  padding: 22px 0;
  display: grid;
  gap: 16px;
}
.amountsummary {
  font-size: 19px;
  padding: 16px;
  background: #ecefe4;
  border-radius: 9px;
}
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.authbrand {
  background: var(--olive);
  color: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px;
  gap: 35px;
}
.authbrand h1 {
  font-family: Georgia, serif;
  font-size: 60px;
  line-height: 1.05;
  font-weight: 400;
}
.authbrand p {
  max-width: 360px;
  color: #e0e1d4;
  font-size: 19px;
}
.authform {
  display: grid;
  place-content: center;
  padding: 35px;
}
.authform > div {
  width: min(390px, 80vw);
  display: grid;
  gap: 25px;
}
.authform h2 {
  font-size: 28px;
}
.authform button {
  width: 100%;
}
.activity {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.event {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
}
.event:last-child {
  border: 0;
}
.event p {
  font-size: 15px;
}
.settings {
  max-width: 720px;
  display: grid;
  gap: 26px;
}
.settings section {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 25px;
  border-radius: 14px;
  display: grid;
  gap: 16px;
}
.settings h2 {
  font-size: 21px;
}
.tableline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  border-radius: 9px;
  padding: 14px 23px;
  max-width: 90vw;
  z-index: 30;
  display: none;
}
#toast.show {
  display: block;
}
.mobilebrand {
  display: none;
}
.iconbutton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.hide {
  display: none !important;
}
.dangertext {
  color: var(--danger);
}
@media (min-width: 1500px) {
  .catalogue.grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1050px) {
  .layout {
    padding-right: 190px;
  }
  .sidebar {
    width: 190px;
    padding: 28px 14px;
  }
  .main {
    padding: 28px 24px;
  }
  .catalogue.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .brand {
    font-size: 15px;
  }
  .list .info {
    grid-template-columns: 1fr;
  }
  .list .stockline {
    grid-column: auto;
    grid-row: auto;
    margin-top: 8px;
  }
}
@media (max-width: 700px) {
  .layout {
    padding: 0 0 78px;
  }
  .sidebar {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    height: 68px;
    padding: 5px 10px;
    background: var(--paper);
    border-top: 1px solid var(--line);
    z-index: 6;
  }
  .sidebar > .brand,
  .sidebar footer {
    display: none;
  }
  .sidebar nav {
    display: flex;
    justify-content: space-around;
    gap: 0;
  }
  .navbtn {
    font-size: 12px;
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 5px 16px;
    min-height: 55px;
  }
  .navbtn.active {
    background: #e9ecdf;
    color: var(--olive);
  }
  .main {
    padding: 20px 16px;
  }
  .mobilebrand {
    display: block;
    font-family: Georgia, serif;
    letter-spacing: 0.08em;
    font-size: 14px;
    margin-bottom: 20px;
    direction: ltr;
  }
  .topline {
    margin-bottom: 14px;
    align-items: flex-start;
  }
  h1 {
    font-size: 27px;
  }
  .topline > .primary {
    font-size: 14px;
    padding: 10px;
  }
  .notice {
    font-size: 12px;
    margin-bottom: 10px;
    padding: 10px 12px;
  }
  .notice button {
    font-size: 12px;
    padding: 6px;
    min-height: 36px;
  }
  .toolbar {
    gap: 6px;
    padding-top: 8px;
  }
  .search input {
    font-size: 15px;
    height: 50px;
  }
  .segmented button {
    padding: 8px;
    min-width: 40px;
  }
  .toolbar > .iconbutton {
    padding: 8px;
    min-width: 40px;
  }
  .toolbar .btntext {
    display: none;
  }
  .filterbar {
    gap: 6px;
    margin-bottom: 14px;
  }
  .chip {
    font-size: 12px;
    padding: 6px 12px;
  }
  .catalogue.grid {
    gap: 12px;
  }
  .product .info {
    padding: 12px;
  }
  .product h3 {
    font-size: 14px;
  }
  .product .sku {
    font-size: 11px;
  }
  .stockline {
    display: block;
    margin-top: 10px;
  }
  .stock {
    font-size: 20px;
  }
  .badge {
    display: inline-block;
    margin-top: 5px;
    font-size: 11px;
  }
  .list .photo {
    width: 105px;
    min-width: 105px;
    aspect-ratio: 1;
  }
  .list .info {
    padding: 12px;
  }
  .list .stockline {
    display: flex;
    margin-top: 4px;
  }
  .list .product h3 {
    font-size: 15px;
  }
  .drawer {
    padding: 20px;
  }
  .drawerhead h2 {
    font-size: 21px;
  }
  .detailphoto {
    height: 200px;
  }
  .auth {
    display: block;
  }
  .authbrand {
    padding: 30px;
    gap: 15px;
  }
  .authbrand h1 {
    font-size: 35px;
  }
  .authbrand p {
    font-size: 16px;
  }
  .authform {
    padding: 30px 20px;
  }
  .filters {
    padding: 14px;
    gap: 12px;
  }
  .event {
    padding: 16px;
    display: block;
  }
  .event > small {
    display: block;
    margin-top: 8px;
  }
  .twocol {
    gap: 12px;
  }
  .formfooter {
    bottom: -20px;
  }
  .settings section {
    padding: 20px;
  }
  .topline .source {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 700px) {
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar > .search {
    flex: 1 0 100%;
  }
  .toolbar > .segmented {
    margin-inline-start: auto;
  }
  .toolbar .btntext {
    display: inline;
  }
  .filterbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }
  .filterbar > .chip {
    flex-shrink: 0;
    min-height: 44px;
  }
  .stock span {
    font-size: 14px;
  }
  .notice {
    font-size: 13px;
  }
  .product .sku {
    font-size: 12px;
  }
}

.badge:empty {
  display: none;
}
@font-face {
  font-family: "M Jardin";
  src: url("/fonts/MJardinRegular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "M Jardin";
  src: url("/fonts/MJardinBold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "M Sefira";
  src: url("/fonts/MSefiraPreviewRegular.ttf") format("truetype");
  font-weight: 300 600;
  font-display: swap;
}
@font-face {
  font-family: "Frank Ruhl Libre";
  src: url("/fonts/FrankRuhlLibre-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
unicode-range:U+0000-058F,U+0600-FB1C,U+FB50-10FFFF;}
:root {
  font-family: "M Sefira", "Segoe UI", Arial, sans-serif;
}
h1,
h2,
h3,
.authbrand h1 {
  font-family: "M Jardin", "Frank Ruhl Libre", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0;
}
.brand,
.mobilebrand {
  font-family: "Frank Ruhl Libre", Georgia, serif;
}
.authbrand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(36px, 6vw, 90px);
  justify-content: flex-end;
  min-height: 100vh;
  gap: 24px;
}
.authphoto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.authbrand:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    #17201726 10%,
    #172017b8 70%,
    #172017eb 100%
  );
  z-index: -1;
}
.authbrand > .brand {
  position: static;
  align-self: flex-start;
  margin-bottom: auto;
  padding-bottom: 32px;
  color: #fffefa;
}
.authbrand h1 {
  font-size: clamp(52px, 6vw, 88px);
  line-height: 1.08;
  color: #fffefa;
}
.authbrand p {
  font-size: 20px;
  color: #fffefa;
}
.authform {
  background: var(--paper);
  display: flex;
  justify-content: center;
  align-items: center;
}
.authform > div {
  width: min(390px, 100%);
}
.authbrand .brand small {
  color: #fffefa;
  font-family: "M Sefira", "Segoe UI", sans-serif;
  letter-spacing: 0;
  direction: rtl;
  font-size: 14px;
}
.authform h2 {
  font-size: 36px;
}
.authform input {
  font-family: "M Sefira", "Segoe UI", Arial, sans-serif;
}
.syncstatus {
  display: block;
  font-size: 13px;
  margin-top: 5px;
}
@media (max-width: 700px) {
  .authbrand {
    min-height: 0;
    padding: 24px 28px 28px;
    gap: 12px;
  }
  .authbrand > .brand {
    margin-bottom: 0;
    padding-bottom: 8px;
  }
  .authbrand h1 {
    font-size: 48px;
  }
  .authbrand p {
    font-size: 17px;
  }
  .authform {
    padding: 28px 24px 40px;
  }
  .authform > div {
    width: min(390px, 100%);
  }
  .authform h2 {
    font-size: 30px;
  }
}
@font-face {
  font-family: "BG Model";
  src: url("/fonts/MJardinRegular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0590-05FF, U+FB1D-FB4F;
}
@font-face {
  font-family: "BG Model";
  src: url("/fonts/FrankRuhlLibre-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-058F, U+0600-FB1C, U+FB50-10FFFF;
}
.product h3.product-model,
.list .product h3.product-model {
  font-family: "BG Model", Georgia, serif;
  font-size: 28px;
  line-height: 1.15;
  margin: 0 0 6px;
  text-align: right;
  overflow-wrap: anywhere;
}
.product-type {
  font-family: "M Sefira", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 6px;
}
.drawerhead .product-model {
  font-family: "BG Model", Georgia, serif;
  font-size: 34px;
}
.product .sku {
  direction: rtl;
  letter-spacing: 0;
}
@media (max-width: 700px) {
  .product h3.product-model,
  .list .product h3.product-model {
    font-size: 24px;
  }
  .product-type {
    font-size: 13px;
  }
}
/* UI copy and controls always use the body face, even inside a heading. */
body,
button,
input,
select,
textarea,
option,
label,
p,
small,
li,
dt,
dd,
td,
th,
.stock,
.badge,
.chip,
.navbtn,
#toast,
button :where(span, strong, small),
label :where(span, strong) {
  font-family: var(--font-body);
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}
.categorybar {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 20px;
  padding: 2px 0 10px;
}
.category-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 100px;
  padding: 12px 5px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  background: transparent;
  border: 1px solid transparent;
}
.category-choice img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.category-choice > svg {
  width: 40px;
  height: 48px;
}
.category-choice.active {
  background: var(--paper);
  border-color: var(--olive);
  box-shadow: inset 0 -3px var(--olive);
}
.category-choice:hover {
  background: var(--paper);
}
@media (max-width: 1050px) {
  .categorybar {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  .category-choice {
    flex: 0 0 100px;
  }
}
@media (max-width: 700px) {
  .categorybar {
    gap: 6px;
    margin-bottom: 12px;
  }
  .category-choice {
    flex-basis: 90px;
    font-size: 13px;
    min-height: 94px;
  }
  .category-choice img {
    width: 42px;
    height: 42px;
  }
}
/* Product workflow: compact identity, stock actions, then optional detail. */
.product-detail,
.product-editor {
  width: min(640px, 100%);
  padding: 24px 30px 30px;
}
.product-detail .drawerhead,
.product-editor .drawerhead {
  position: sticky;
  top: -24px;
  z-index: 2;
  background: var(--paper);
  padding: 16px 0;
  margin: -8px 0 18px;
  border-bottom: 1px solid var(--line);
}
.product-heading .product-type {
  margin: 0 0 4px;
}
.product-detail .detailphoto {
  height: 220px;
  margin: 0;
  display: block;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 16px 0 22px;
  color: var(--muted);
  font-size: 14px;
}
.product-stock {
  padding: 20px 0 24px;
  border-block: 1px solid var(--line);
}
.stock-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.stock-heading h3 {
  font-size: 23px;
}
.stock-heading button {
  font-size: 14px;
  padding: 8px;
}
.stock-total {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0 22px;
}
.stock-total strong {
  font-family: var(--font-body);
  font-size: 42px;
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--olive);
}
.stock-total span {
  font-size: 16px;
  color: var(--muted);
}
.stock-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.product-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}
.product-tools .edit-product {
  flex: 1;
}
.product-description,
.editor-description,
.editor-variants {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.product-description summary,
.editor-description summary,
.editor-variants summary {
  font-family: var(--font-body);
  font-size: 17px;
  cursor: pointer;
  min-height: 44px;
  line-height: 1.6;
  padding: 8px 0;
}
.description-content {
  padding: 12px 0 8px;
  display: grid;
  gap: 12px;
}
.description-content p {
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.description-content h4 {
  font-size: 22px;
  font-weight: 400;
  margin: 16px 0 0;
}
.editor-media {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 4px;
}
.editor-media .detailphoto {
  width: 116px;
  height: 100px;
  flex-shrink: 0;
  margin: 0;
}
.editor-media > div {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 8px;
}
.editor-media input[type="file"] {
  font-size: 13px;
  padding: 8px;
  width: 100%;
}
.editor-section {
  display: grid;
  gap: 16px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--line);
}
.editor-section h3 {
  font-size: 23px;
}
.product-editor .form {
  gap: 20px;
}
.editor-description[open] > label {
  margin-top: 12px;
}
.editor-description textarea {
  min-height: 210px;
  line-height: 1.7;
}
.editor-variants[open] > small {
  display: block;
  margin: 8px 0 16px;
}
.product-editor .formfooter {
  margin-top: 8px;
  bottom: -30px;
  padding: 16px 0 24px;
  z-index: 2;
}
@media (max-width: 700px) {
  .product-detail,
  .product-editor {
    padding: 20px;
  }
  .product-detail .drawerhead,
  .product-editor .drawerhead {
    top: -20px;
  }
  .product-detail .detailphoto {
    height: 180px;
  }
  .product-meta {
    font-size: 13px;
    padding: 14px 0 18px;
  }
  .editor-media {
    gap: 12px;
  }
  .editor-media .detailphoto {
    width: 86px;
    height: 86px;
  }
  .product-editor .formfooter {
    bottom: -20px;
    padding-bottom: 20px;
  }
  .product-editor .twocol {
    grid-template-columns: 1fr;
  }
  .stock-heading h3 {
    font-size: 21px;
  }
  .stock-total strong {
    font-size: 36px;
  }
}
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --motion-panel: 280ms;
}
.product-price {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.4;
  margin-top: 10px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.detail-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 20px;
}
.detail-price span {
  font-size: 14px;
  color: var(--muted);
}
.detail-price strong {
  font-family: var(--font-body);
  font-size: 26px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.modal-open {
  overflow: hidden;
}
.drawer {
  overscroll-behavior: contain;
}
@media (hover: hover) and (pointer: fine) {
  button:not(.product):not(.category-choice) {
    transition:
      background-color 160ms ease,
      border-color 160ms ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  .veil,
  .veil .drawer {
    transition: none !important;
    transform: none !important;
  }
}
/* Phone layouts use readable text and a thumb-sized bottom sheet grip. */
.sheet-grip {
  display: none;
}
@media (max-width: 700px) {
  body {
    font-size: 17px;
  }
  button,
  input,
  select,
  textarea {
    font-size: 16px;
  }
  input:not([type="checkbox"]):not([type="radio"]),
  select {
    min-height: 48px;
  }
  button {
    min-height: 44px;
  }
  .search input {
    font-size: 17px;
    height: 52px;
  }
  .chip,
  .badge,
  .product .sku,
  .product-type,
  .category-choice {
    font-size: 15px;
  }
  .product .info {
    padding: 14px;
  }
  .product .product-model,
  .list .product .product-model {
    font-size: 28px;
    line-height: 1.2;
  }
  .product-meta,
  .detail-price > span,
  .stock-heading button,
  label,
  .drawer small {
    font-size: 16px;
  }
  .description-content,
  .drawer summary {
    font-size: 17px;
    line-height: 1.65;
  }
  .drawer summary {
    min-height: 48px;
    align-content: center;
  }
  .category-choice {
    min-height: 76px;
  }
  .veil {
    align-items: flex-end;
  }
  .drawer,
  .product-detail,
  .product-editor {
    width: 100%;
    height: calc(100dvh - max(16px, env(safe-area-inset-top)));
    border-radius: 22px 22px 0 0;
    padding: 0 20px calc(24px + env(safe-area-inset-bottom));
  }
  .drawer .drawerhead {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--paper);
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 0;
    padding: 16px 0;
    margin-bottom: 18px;
  }
  .product-detail .drawerhead {
    padding-top: 0;
  }
  .product-detail .sheet-grip {
    display: flex;
    flex: 0 0 100%;
    height: 44px;
    justify-content: center;
    align-items: center;
    touch-action: none;
    cursor: grab;
    user-select: none;
  }
  .sheet-grip span {
    width: 44px;
    height: 5px;
    border-radius: 3px;
    background: #858373;
  }
  .sheet-grip:active {
    cursor: grabbing;
  }
  .drawerhead > button {
    min-width: 48px;
    min-height: 48px;
  }
  .drawerhead .product-heading {
    flex: 1;
    min-width: 0;
  }
  .drawerhead .product-model {
    font-size: 36px;
    overflow-wrap: anywhere;
  }
  .product-detail .detailphoto {
    height: clamp(160px, 24dvh, 220px);
  }
  .product-meta {
    flex-wrap: wrap;
    gap: 10px;
  }
  .detail-price {
    gap: 12px;
  }
  .detail-price strong {
    font-size: 28px;
  }
  .product-editor .formfooter,
  .formfooter {
    bottom: calc(-24px - env(safe-area-inset-bottom));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .formfooter button,
  .stock-actions button {
    min-height: 50px;
  }
  .drawer .twocol {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 380px) {
  .catalogue.grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .drawerhead .product-model {
    text-align: right;
  }
  .drawer:focus:not(:focus-visible) {
    outline: none;
  }
}
.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 1000;
  padding: 12px 20px;
  background: #fff;
  color: #28382c;
  border-radius: 8px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }
button, a, summary { touch-action: manipulation; }
/* Combined product layout: gallery, concise facts, stock and clear actions. */
.product-detail {
  width: min(960px, 100%);
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.detail-gallery { min-width: 0; }
.product-detail .detail-gallery .detailphoto {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin: 0;
}
.detail-information {
  min-width: 0;
}
.detail-information .product-meta {
  display: grid;
  gap: 12px;
  padding: 0 0 20px;
}
.product-meta > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
}
.product-meta strong {
  font-weight: 400;
  text-align: left;
}
.detail-information .detail-price {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.detail-information .detail-price strong {
  font-size: 30px;
}
.detail-information .product-stock {
  margin-top: 12px;
  padding-top: 20px;
}
.stock-actions button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.recent-movement,
.pending-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.65;
}
progress {
  width: 100%;
  height: 12px;
  accent-color: var(--olive);
}
@media (max-width: 700px) {
  .detail-layout {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .detail-gallery {
    position: static;
    width: 100%;
  }
  .detail-information {
    width: 100%;
  }
  .product-detail .detail-gallery .detailphoto {
    aspect-ratio: 16 / 10;
    max-height: 280px;
  }
  .detail-information .product-meta {
    font-size: 16px;
  }
  .detail-information .product-stock {
    margin-top: 0;
  }
  .stock-actions {
    gap: 10px;
  }
}
/* Keep the entire furniture composition visible in the desktop gallery. */
.product-detail .detail-gallery .detailphoto { aspect-ratio: 4 / 3; object-fit: contain; background: #f5f2ec; }
@media (max-width:700px) { .product-detail .detail-gallery .detailphoto { aspect-ratio:16 / 10; } }
/* Shared item inventory and set composition. */
.catalogue-modes { display: flex; gap: 4px; margin: 16px 0; padding: 4px; width: fit-content; border: 1px solid var(--line, #ded9cc); border-radius: 12px; background: var(--paper, #fffefa); }
.catalogue-modes button { border: 0; background: transparent; min-height: 44px; }
.catalogue-modes button.selected { color: #fff; background: var(--olive, #4e5340); }
.item-type-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.item-type-filter select { width: min(100%, 260px); }
.storefront-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--olive, #4e5340); text-underline-offset: 4px; }
.composition-section { margin-top: 24px; }
.composition-section > h3 { margin-bottom: 8px; }
.composition-note { font-size: 15px; color: #705422; background: #f7efd9; border-radius: 9px; padding: 12px; }
.component-row { display: flex; width: 100%; align-items: center; gap: 12px; text-align: start; border: 0; border-bottom: 1px solid var(--line, #ded9cc); border-radius: 0; padding: 14px 0; background: transparent; }
.component-row:hover { background: #f2ede3; }
.component-row > img, .component-noimage { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 8px; object-fit: contain; background: #f2ede3; }
.component-noimage { display: grid; place-items: center; color: #696351; }
.component-row svg, .component-noimage svg { width: 22px; height: 22px; flex-shrink: 0; }
.component-copy { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; font-size: 15px; font-weight: 400; overflow-wrap: anywhere; }
.component-copy strong { font-family: "M Sefira", sans-serif; font-size: 17px; }
.component-stock, .component-price { font-size: 15px; font-weight: 400; color: var(--muted); }
.component-stock { min-width: 100px; }
.component-price { min-width: 150px; text-align: end; font-variant-numeric: tabular-nums; }
.product-detail .drawerhead { flex-wrap: wrap; }
.product-detail .product-heading { flex: 1; }
.product-detail .product-model { text-align: right; }
.product-detail .detail-price.price-pending strong { font-size: 17px; color: var(--muted); }
.product-detail .drawerhead .product-tools { padding: 0; margin: 0; gap: 4px; }
.product-detail .drawerhead .edit-product { flex: none; }
.product-detail .detail-extra { margin-top: 28px; }
.product-detail .composition-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.composition-note { padding: 0; background: transparent; color: var(--muted); font-size: 15px; }
.composition-note summary { min-height: 44px; cursor: pointer; display: list-item; padding-block: 12px; }
.composition-note p { max-width: 70ch; margin: 0 0 16px; }
.availability-pending { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 16px 0 0; line-height: 1.6; }
.availability-pending svg { width: 20px; height: 20px; flex-shrink: 0; }
.product-detail .set-availability { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 701px) {
  .product-veil { align-items: center; justify-content: center; padding: 28px; }
  .product-detail { width: min(1080px, 100%); height: auto; max-height: calc(100dvh - 56px); padding: 0 32px 28px; border-radius: 16px; }
  .product-detail .drawerhead { position: sticky; top: 0; z-index: 2; padding: 24px 0 20px; margin-bottom: 24px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .product-detail .detail-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; }
  .product-detail .detail-gallery .detailphoto { max-height: 300px; }
  .product-detail .detail-information .product-meta { gap: 10px; padding-bottom: 16px; }
  .product-detail .detail-information .detail-price { padding: 16px 0; }
  .product-detail .detail-information .product-stock { margin-top: 0; padding-top: 16px; }
  .product-detail .component-row { gap: 20px; }
  .product-detail .detail-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 700px) {
  .product-detail .drawerhead { gap: 10px; }
  .product-detail .drawerhead .product-tools { order: 4; width: 100%; padding-bottom: 12px; }
  .product-detail .drawerhead .edit-product { flex: 1; }
  .product-detail .component-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 22px; gap: 6px 12px; }
  .product-detail .component-row > img, .product-detail .component-noimage { grid-column: 1; grid-row: 1 / 4; width: 56px; height: 56px; }
  .product-detail .component-copy { grid-column: 2; grid-row: 1; }
  .product-detail .component-stock { grid-column: 2; grid-row: 2; }
  .product-detail .component-price { grid-column: 2; grid-row: 3; text-align: start; min-width: 0; }
  .product-detail .component-row > svg { grid-column: 3; grid-row: 1 / 4; }
  .product-detail .detail-extra { margin-top: 24px; }
}
.parent-sets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; border-top: 1px solid var(--line, #ded9cc); padding-top: 12px; }
.detail-image-empty { min-height: 240px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; color: #696351; background: #f2ede3; border-radius: 12px; }
.detail-image-empty svg { width: 40px; height: 40px; }
.composition-edit-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px auto; gap: 10px; align-items: end; margin: 16px 0; }
.composition-confirm { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.composition-confirm input { width: 20px; min-height: 20px; accent-color: #4e5340; }
.composition-editor[hidden] { display: none; }
@media (max-width: 700px) {
  .catalogue-modes { width: 100%; }
  .catalogue-modes button { flex: 1; padding-inline: 8px; }
  .composition-edit-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .composition-edit-row > button { grid-column: 1 / -1; justify-self: start; }
  .component-row { gap: 10px; }
  .component-copy { font-size: 15px; }
  .detail-image-empty { min-height: 170px; }
}
.component-group { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.component-group .component-row { border-bottom: 0; }
.quick-stock-toggle { margin-inline-start: 76px; min-height: 44px; }
.inline-stock-form { margin: 8px 0 12px; padding: 18px; background: var(--bg); border-radius: 9px; display: grid; gap: 14px; }
.inline-stock-summary { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.inline-stock-actions { display: flex; justify-content: flex-end; gap: 10px; }
.inline-stock-form [hidden] { display: none; }
@media (max-width: 700px) { .inline-stock-form { padding: 14px; } .inline-stock-actions > button { flex: 1; } .quick-stock-toggle { margin-inline-start: 0; } }
.product-editor { scroll-padding-block: 90px 110px; }
.product-editor input, .product-editor select, .product-editor textarea, .product-editor .formerror { scroll-margin-block: 100px; }
.product-editor .formerror:empty { display: none; }
.product-editor .formerror:not(:empty) { padding: 12px; border: 1px solid currentColor; border-radius: 9px; }
.product-editor .composition-edit-row { padding-block: 16px; margin: 0; border-bottom: 1px solid var(--line); }
.product-editor .composition-edit-row label { min-width: 0; }
.product-editor .composition-edit-row select { min-width: 0; width: 100%; }
.product-editor .composition-confirm { min-height: 44px; line-height: 1.6; }
.inline-stock-title { margin: 0; font-family: var(--font-body); font-size: 17px; }
@media (max-width: 700px) {
  .product-editor .composition-edit-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .product-editor .composition-edit-row > label:first-child { grid-column: 1 / -1; }
  .product-editor .composition-edit-row > button { grid-column: auto; align-self: end; }
  .product-editor .composition-edit-row > label:nth-child(2) { max-width: 180px; }
  .product-editor .formfooter { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}
.export-options summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }

/* Responsive operation layout: preserve the brand, bring products closer to search. */
.main, .search, .settings, .settings section, .tableline > * { min-width: 0; }
.settings p, .tableline, .component-copy { overflow-wrap: anywhere; }
.topline { margin-bottom: 18px; }
.notice { margin-bottom: 12px; }
.toolbar { padding-bottom: 10px; }
.catalogue-modes { margin-block: 8px 12px; }
.categorybar { margin-bottom: 12px; padding-bottom: 6px; }
.category-choice { min-height: 84px; gap: 6px; padding-block: 8px; }
.filterbar { margin-bottom: 10px; }
.resultsline { margin-bottom: 10px; }
h1, h2, h3 { text-wrap: balance; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
::selection { background: #dce2cb; color: #211d17; }
.drawer { scrollbar-color: #aaa58f var(--paper); }
@media (min-width: 1200px) {
  .settings { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; }
}
@media (min-width: 701px) and (max-width: 1050px) {
  .layout { padding-right: 128px; }
  .sidebar { width: 128px; padding: 24px 10px; }
  .sidebar .brand { font-size: 13px; letter-spacing: .02em; }
  .sidebar .navbtn { display: grid; justify-items: center; gap: 6px; padding: 12px 8px; }
  .sidebar .userline { flex-wrap: wrap; justify-content: center; text-align: center; }
  .sidebar footer { font-size: 14px; }
  .main { padding: 24px; }
  .product-editor { width: min(720px, 100%); }
  .drawerhead { position: sticky; top: 0; z-index: 3; background: var(--paper); padding-block: 20px; }
  .product-editor { padding-top: 0; }
  label, .drawer small { font-size: 16px; }
}
@media (max-width: 700px) {
  .mobilebrand { margin-bottom: 12px; }
  .topline { margin-bottom: 12px; }
  .catalogue-modes { margin-block: 4px 10px; }
  .categorybar { padding-bottom: 8px; margin-bottom: 10px; }
  .category-choice { flex-basis: 132px; flex-direction: row; min-height: 64px; padding: 8px; gap: 8px; text-align: start; font-size: 14px; }
  .category-choice img, .category-choice > svg { width: 32px; height: 32px; flex-shrink: 0; }
  .filterbar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .filterbar .chip { flex-shrink: 0; }
  .settings { gap: 18px; }
  .settings section { padding: 20px; gap: 14px; }
  .settings h2 { font-size: 26px; }
  .tableline { flex-wrap: wrap; }
  .layout { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .sidebar { height: calc(68px + env(safe-area-inset-bottom)); padding-bottom: calc(5px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(82px + env(safe-area-inset-bottom)); }
}
@media (pointer: coarse) {
  .chip, .notice button, .segmented button, .toolbar > .iconbutton { min-height: 44px; min-width: 44px; }
  input, select, textarea { font-size: 16px; }
}

/* ===================================================================
   ליטוש ממשק 16.9.2026
   משלים את הליטוש הרספונסיבי הקיים; רק מגע, מספרים, מצבי טופס וגיליון התנועה.
   =================================================================== */
button, a, [role="button"] { touch-action: manipulation; }
select { background-color: var(--white, #fff); color: var(--ink); }
.num, .stock, .amountsummary strong, .stock-total, .component-stock, .product-price, .detail-price { font-variant-numeric: tabular-nums; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: #777f59; }
.drawer { overscroll-behavior: contain; }
.formerror:empty { display: none; }
.formerror { margin: 6px 0 0; }
button[aria-busy="true"] { opacity: .7; cursor: progress; }
.chip { min-height: 40px; padding: 8px 15px; }
.brand small { font-size: 12px; }

/* גיליון תנועה: צעדים ±, לפני→אחרי, מצב ספירה מודרך */
.movement .stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: 8px; align-items: stretch; margin-top: 6px; direction: ltr; }
.movement .stepper input[type="number"] { -moz-appearance: textfield; text-align: center; font-size: 24px; min-height: 52px; direction: ltr; }
.movement .stepper input::-webkit-outer-spin-button, .movement .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.movement .step { min-height: 52px; padding: 0; font-size: 24px; line-height: 1; border-radius: 9px; }
.movement .step:disabled { opacity: .4; cursor: not-allowed; }
.movement label { display: grid; gap: 6px; }
.amountsummary { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; text-align: center; padding: 14px; }
.amountsummary strong { display: block; font-size: 30px; line-height: 1.1; }
.amountsummary small { display: block; margin-top: 2px; }
.amountsummary .arrow { font-size: 22px; color: var(--muted); }
.amountsummary.bad > div:last-child strong { color: var(--danger); }
.movement .notice.warning { margin: 12px 0 8px; display: block; }
.movement button.primary { width: 100%; margin-top: 12px; }

/* Portrait tablets keep images and stock labels readable. */
@media (min-width: 701px) and (max-width: 1050px) {
  .catalogue.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 700px) {
  .catalogue-modes button { min-height: 44px; }
  .formfooter { position: sticky; bottom: calc(-1 * env(safe-area-inset-bottom, 0px)); background: var(--paper); padding: 12px 0 calc(8px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); z-index: 2; }
}
/* תנועה מופחתת: משאירים שינויי צבע/שקיפות, מבטלים תזוזה */
@media (prefers-reduced-motion: reduce) {
  .veil, .drawer, .toast { transition-property: opacity, background-color !important; transition-duration: .15s !important; }
}

/* Approved brand fonts: Latin headings only. */
@font-face {
  font-family: "Frank Ruhl Libre";
  src: url("/fonts/FrankRuhlLibre-Bold.ttf") format("truetype");
  font-weight:700;
  font-display: swap;
unicode-range:U+0000-058F,U+0600-FB1C,U+FB50-10FFFF;}
@font-face {
  font-family: "BG Model";
  src: url("/fonts/MJardinBold.woff2") format("woff2");
  font-weight:700;
  font-display: swap;
  unicode-range: U+0590-05FF, U+FB1D-FB4F;
}
@font-face {
  font-family: "BG Model";
  src: url("/fonts/FrankRuhlLibre-Bold.ttf") format("truetype");
  font-weight:700;
  font-display: swap;
  unicode-range: U+0000-058F, U+0600-FB1C, U+FB50-10FFFF;
}

.brand-logo{width:150px;height:auto;display:block;margin:auto}.authbrand .brand-logo{width:min(260px,100%)}.mobile-brand-logo{width:190px;height:auto}.authbrand .brand{color:#fffefa;max-width:100%}

.featured-picks{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-block:24px}.featured-pick{display:flex;align-items:center;gap:12px;padding:18px;border:1px solid #d8d3c6;border-radius:8px}.featured-pick[hidden]{display:none}.featured-pick input{width:20px;height:20px;accent-color:#4e5340;flex:none}

.sync-review-field{margin-block:18px;padding:18px;border:1px solid #d8d3c6}.sync-review-values{display:grid;grid-template-columns:1fr 1fr;gap:20px}.sync-review-values pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;max-height:240px;overflow:auto}@media(max-width:650px){.sync-review-values{grid-template-columns:1fr}}

/* ===================================================================
   עומק (17.9.2026) — לפי "The Easy Way to Fix Boring UIs":
   שלוש-ארבע דרגות של אותו שנהב לשכבות (עמוד → אזור → אלמנט אינטראקטיבי),
   צל משולב (הבהרה דקה למעלה + צל רך למטה) בשלוש רמות, ואלמנטים "שקועים"
   לשדות ולמסלולים. הפלטה, הפונטים והמבנה ללא שינוי. למחיקה — בלוק זה בלבד.
   =================================================================== */
:root {
  --bg-dark: #ece6d9;                     /* בסיס העמוד — הדרגה הכהה */
  --bg: #f4f0e7;                          /* אזורים ומשטחי ביניים */
  --bg-light: #fffefa;                    /* השכבה העליונה: כרטיסים, כפתורים, שדות */
  --paper: var(--bg-light);
  --line: #e2ddd0;
  --hi: rgba(255, 255, 255, 0.72);        /* קו האור שבראש כל אלמנט מורם */
  --sh-s: inset 0 1px 0 var(--hi), 0 1px 2px rgba(33, 29, 23, 0.07), 0 2px 6px rgba(33, 29, 23, 0.05);
  --sh-m: inset 0 1px 0 var(--hi), 0 2px 4px rgba(33, 29, 23, 0.07), 0 8px 18px rgba(33, 29, 23, 0.10);
  --sh-l: inset 0 1px 0 var(--hi), 0 4px 10px rgba(33, 29, 23, 0.09), 0 20px 44px rgba(33, 29, 23, 0.18);
  --sh-sunken: inset 0 2px 4px rgba(33, 29, 23, 0.09), inset 0 -1px 0 rgba(255, 255, 255, 0.85);
  --sh-olive: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(33, 29, 23, 0.22), 0 5px 12px rgba(78, 83, 64, 0.28);
  --olive-grad: linear-gradient(180deg, #5c614b 0%, #4e5340 100%);
  background: var(--bg-dark);
}
.toolbar, .authform { background: var(--bg-dark); }
.sidebar { background: #e4ded0; border-left: 0; box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.55), inset -1px 0 0 rgba(33, 29, 23, 0.05); }
.layout { background: var(--bg-dark); }

/* כפתורים: מורמים; לחיצה שוקעת */
button { background: var(--bg-light); border-color: transparent; box-shadow: var(--sh-s); transition: box-shadow .18s ease, transform .18s ease, background-color .18s ease; }
button:hover { background: #fff; box-shadow: var(--sh-m); }
button:active { box-shadow: var(--sh-sunken); transform: translateY(1px); }
button:disabled { box-shadow: none; transform: none; }
button.quiet { background: transparent; box-shadow: none; }
button.quiet:hover { background: var(--bg); box-shadow: var(--sh-s); }
button.primary, .navbtn.active, .segmented .selected, .catalogue-modes button.selected, .chip.active {
  background: var(--olive-grad); border-color: transparent; color: #fff; box-shadow: var(--sh-olive);
}
button.primary:hover, .navbtn.active:hover { background: linear-gradient(180deg, #666b53 0%, #545a45 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 4px rgba(33, 29, 23, 0.22), 0 9px 20px rgba(78, 83, 64, 0.32); }
button.primary:active { box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28); transform: translateY(1px); }
.navbtn { box-shadow: none; }
.navbtn:hover { background: var(--bg-light); box-shadow: var(--sh-s); }
.iconbutton, .stock-actions button, .product-tools button { box-shadow: var(--sh-s); }

/* שדות: שקועים בתוך המשטח; פוקוס מרים אותם */
input, select, textarea, .search input { background: #fffdf8; border-color: transparent; box-shadow: var(--sh-sunken), 0 0 0 1px rgba(33, 29, 23, 0.10); transition: box-shadow .18s ease; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .search input:focus-visible { outline: none; border-color: transparent; box-shadow: var(--sh-sunken), 0 0 0 2px #777f59, 0 6px 16px rgba(33, 29, 23, 0.10); }
.search input { background: var(--bg-light); }

/* קבוצות בחירה: מסלול שקוע, האפשרות הנבחרת מורמת */
.catalogue-modes, .segmented { background: var(--bg-dark); border-color: transparent; box-shadow: var(--sh-sunken); padding: 4px; border-radius: 12px; }
.segmented button, .catalogue-modes button { box-shadow: none; background: transparent; }
.segmented button:hover, .catalogue-modes button:hover { background: var(--bg-light); box-shadow: var(--sh-s); }
.chip { background: var(--bg-light); border-color: transparent; box-shadow: var(--sh-s); }
.category-choice { background: var(--bg-light); border-color: transparent; box-shadow: var(--sh-s); }
.category-choice:hover { box-shadow: var(--sh-m); background: #fff; }
.category-choice.active { box-shadow: var(--sh-m), 0 0 0 2px var(--olive); }

/* כרטיסי מוצר: השכבה העליונה, מורמים; ריחוף מרים יותר; אזור התמונה שקוע מעט */
.product { background: var(--bg-light); border-color: transparent; box-shadow: var(--sh-s); transition: box-shadow .2s ease, transform .2s ease; }
.product:hover { border-color: transparent; box-shadow: var(--sh-m); transform: translateY(-2px); }
.product .photo { background: var(--bg); box-shadow: inset 0 -1px 0 rgba(33, 29, 23, 0.05); }
.product .info { border-top: 1px solid rgba(33, 29, 23, 0.06); }
.badge { box-shadow: var(--sh-s); background: var(--bg-light); }
.badge.low { background: #faedd9; }
.badge.zero { background: #f3dcd6; }

/* שורות פריטים בסט ורשומות פעילות */
.component-row:hover { background: var(--bg-light); box-shadow: var(--sh-s); border-radius: 10px; }
.component-row > img, .component-noimage { background: var(--bg); box-shadow: var(--sh-sunken); }
.inline-stock-form { background: var(--bg); box-shadow: var(--sh-sunken); }
.activity { background: var(--bg-light); border-color: transparent; box-shadow: var(--sh-s); }
.event { border-bottom-color: rgba(33, 29, 23, 0.08); }
.event:hover { background: #fff; }

/* הודעות, סינון, הגדרות: משטחי ביניים מורמים מעט */
.notice { box-shadow: var(--sh-s); }
.filters, .settings section { background: var(--bg-light); border-color: transparent; box-shadow: var(--sh-s); }
.tableline { border-bottom-color: rgba(33, 29, 23, 0.08); }
.amountsummary { background: var(--bg); box-shadow: var(--sh-sunken); }
.movement .stepper input[type="number"] { background: #fffdf8; }
.movement .step { box-shadow: var(--sh-s); }
.detailphoto, .product-detail .detail-gallery .detailphoto { background: var(--bg); box-shadow: var(--sh-sunken); }
.product-meta > div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }

/* חלונות: השכבה הגבוהה ביותר */
.drawer { box-shadow: var(--sh-l); }
.drawerhead { padding-bottom: 12px; border-bottom: 1px solid rgba(33, 29, 23, 0.07); }
.formfooter { border-top-color: rgba(33, 29, 23, 0.07); box-shadow: 0 -8px 16px rgba(255, 254, 250, 0.9); }
#toast { box-shadow: var(--sh-l); }

/* כניסה */
.authform > div { background: var(--bg-light); border-radius: 18px; padding: 30px 28px; box-shadow: var(--sh-m); }
.authform h2 { margin-top: 0; }

/* מובייל: סרגל הניווט התחתון צף מעל התוכן */
@media (max-width: 700px) {
  .sidebar { background: var(--bg-light); border-top: 0; box-shadow: inset 0 1px 0 var(--hi), 0 -1px 0 rgba(33, 29, 23, 0.06), 0 -8px 24px rgba(33, 29, 23, 0.10); }
  .product:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  button, .product, input, select, textarea { transition: none !important; }
  .product:hover, button:active, button.primary:active { transform: none; }
}
/* Work area spacing and numeric alignment. */
.topline { gap: 16px; margin-bottom: 16px; }
.source { margin-top: 8px; }
.toolbar { gap: 8px; padding-bottom: 12px; }
.resultsline { margin-bottom: 12px; }
.stock, .product-price, .event time { font-variant-numeric: tabular-nums; }
.product-meta > div { padding: 12px; }
@media (min-width: 1051px) {
  .main { padding: 36px 40px; }
  .sidebar { padding: 32px 20px; gap: 28px; }
  .sidebar nav { gap: 4px; }
}

/* 24.9 audit: which set a component record belongs to (two records can share a catalogue name) */
.product .parent-set {
  font-size: 13px;
  color: var(--muted);
  margin: 2px 0 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
/* 24.9: dimensions in the editor and the product sheet */
.dimsgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 700px) {
  .dimsgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.editor-dimensions small { display: block; margin-top: 8px; color: var(--muted); overflow-wrap: anywhere; }
.detail-dimensions { margin: 6px 0 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.detail-dimensions span { color: var(--muted); }
/* 24.9: bottom bar on phones — short labels so six items never wrap below the screen */
.navlabel-short { display: none; }
@media (max-width: 700px) {
  .sidebar .navbtn { padding: 5px 4px; flex: 1 1 0; min-width: 0; }
  .sidebar .navbtn .navlabel { display: none; }
  .sidebar .navbtn .navlabel-short { display: inline; }
  .sidebar .navbtn { white-space: nowrap; }
}
/* 24.9: list/grid toggle reaches the 44px touch size on every width */
.toolbar .segmented button { min-width: 44px; min-height: 44px; }
/* 24.9: status chips keep the 44px touch height on touch screens at every width */
.chip { min-height: 44px; }
/* 24.9: muted text on the tablet side rail reaches 4.5:1 contrast */
.sidebar .muted, .sidebar .brand small, .brand small { color: #5c5646; }
/* 24.9: the logo fits the narrow tablet side rail instead of being cut off */
@media (min-width: 701px) and (max-width: 1050px) { .sidebar .brand-logo { width: 100%; max-width: 104px; } }
/* 24.9: on short tablet/desktop screens the side rail scrolls, so the account block and "נעילה ויציאה" stay reachable */
@media (min-width: 701px) { .sidebar { overflow-y: auto; overscroll-behavior: contain; } }
.product-editor .twocol { align-items: start; }
/* 24.9: visible loading state while the app and the product list arrive on a slow connection */
.boot { min-height: 60vh; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 18px; color: #5c5646; font-family: system-ui, sans-serif; }
.boot-spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #d8d2c2; border-top-color: #4e5340; animation: boot-spin 0.9s linear infinite; }
@keyframes boot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .boot-spinner { animation: none; } }
/* 24.9: the toast never blocks taps; on short (landscape / keyboard-up) screens it shows at the top instead of over the save buttons */
#toast { pointer-events: none; }
@media (max-height: 500px) { #toast { bottom: auto; top: 12px; } }

/* ---------- סגירה למסירה 25.9: התחברות מחדש, התנגשויות, ארכיון, החלטות מנהל, מלאי שטרם נספר ---------- */
dialog.reauth-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--sh-l, 0 20px 44px rgba(33, 29, 23, 0.18));
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 20px;
}
dialog.reauth-dialog::backdrop { background: rgba(33, 29, 23, 0.45); }
dialog.reauth-dialog h2 { margin: 0 0 8px; font-family: var(--font-heading); }
dialog.reauth-dialog .formfooter { position: static; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; padding: 12px 0 0; background: none; border: 0; }
dialog.reauth-dialog .formfooter button { min-height: 44px; }
.conflict-field { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; display: grid; gap: 6px; }
.conflict-field label { display: flex; gap: 8px; align-items: flex-start; min-height: 44px; }
.notice .notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.notice .notice-actions button { min-height: 44px; }
.stock-basis { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: #f7efd9; color: #5a4a22; font-size: 0.92rem; }
.archived-note { margin-bottom: 12px; }
.review-decisions { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.review-decisions h3 { margin: 0 0 6px; }
.review-form { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 10px 0; background: var(--bg-light, var(--paper)); }
.review-form h4 { margin: 0; }
.review-reason { margin: 4px 0; font-size: 0.92rem; }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; margin: 8px 0; }
.compare-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; gap: 4px; align-content: start; background: var(--paper); }
.compare-card.mine { outline: 2px solid var(--olive); outline-offset: -2px; }
.compare-card img, .compare-card .empty { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: var(--bg); border-radius: 8px; display: grid; place-items: center; font-size: 0.85rem; }
.compare-card small { color: var(--muted); }
.compare-card button { min-height: 44px; }
label.ack { display: flex; gap: 8px; align-items: flex-start; min-height: 44px; }
label.ack input { margin-top: 3px; width: 20px; height: 20px; flex: none; }
.composition-evidence { font-size: 0.9rem; }
.review-codes { margin-top: 4px; }
/* 6 מצבי תצוגה (כולל ״ארכיון״) — שבירת שורה במקום גלילה אופקית במסכים צרים */
.catalogue-modes { max-width: 100%; flex-wrap: wrap; }
.collection-filter { display: grid; gap: 6px; margin-block: 14px; max-width: 100%; }
.collection-filter select { width: 100%; min-width: 0; min-height: 44px; }
@media (max-width: 700px) { .catalogue-modes button { flex: 1 1 30%; } }
/* פרסום לאתר (25.9.2026) */
.sync-head{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-block:12px 18px}.sync-head .chips{display:flex;flex-wrap:wrap;gap:8px}
.sync-list{display:grid;gap:10px}.sync-row{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:12px 14px;border:1px solid #d8d3c6;border-radius:8px;background:#fffdf8}
.sync-info{display:grid;gap:3px;min-width:0}.sync-info strong{overflow-wrap:anywhere}.sync-acts{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.sync-acts .button{display:inline-flex;align-items:center;min-height:44px;padding:0 14px}
.sync-badge{font-size:12.5px;padding:4px 10px;border-radius:999px;background:#ece7da;color:#3d3a32;white-space:nowrap}.sync-badge.s-published{background:#e3ecd9;color:#2f4a1f}.sync-badge.s-error{background:#f6dedb;color:#8a2424}.sync-badge.s-conflict{background:#f7ecd2;color:#6b4a00}.sync-badge.s-skip{background:#eeeeee;color:#555}
.sync-imgs{display:flex;flex-wrap:wrap;gap:6px}.sync-imgs img{width:72px;height:72px;object-fit:cover;border-radius:4px;background:#f2ede3}.sync-val{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:700px){.sync-row{grid-template-columns:1fr}.sync-acts{justify-content:flex-start}}

/* Quick access to item colours from a set; quantities remain on the items. */
.set-color-item { padding-block: 16px; border-bottom: 1px solid var(--line); }
.set-color-item strong { overflow-wrap: anywhere; }
.set-color-item button { min-height: 44px; }
/* Compact colour form and optional management details. */
.add-color .movement { max-width: 32rem; margin-inline: auto; }
.add-color summary, .review-decisions > summary, .stock-basis > summary { min-height: 44px; padding-block: 10px; cursor: pointer; }
.review-decisions > summary { font-weight: 600; }
.add-color .movement > h3 { margin-bottom: 0; overflow-wrap: anywhere; }
.add-color .movement > .muted { margin-top: 6px; }
.add-color input[type="file"] { max-width: 100%; }
/* Daily work first; supporting information opens on demand. */
.filterbar:empty, .badge:empty { display: none; }
.settings { gap: 16px; }
.settings-group { border-bottom: 1px solid var(--line); min-width: 0; }
.settings-group > summary { padding: 18px 4px; min-height: 44px; font-size: 1.2rem; cursor: pointer; }
.settings .settings-group > section { background: transparent; box-shadow: none; border: 0; padding: 8px 4px 24px; }
.activity-note > summary, .backup-explanation > summary, .composition-evidence > summary, .editor-dimensions > summary { min-height: 44px; padding-block: 10px; cursor: pointer; }
.activity-note p, .backup-explanation p { max-width: 70ch; overflow-wrap: anywhere; }
.product .parent-set { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.editor-dimensions > summary { font-weight: 600; }
@media (min-width: 1000px) { .settings { grid-template-columns: minmax(0, 1fr); max-width: 780px; } }
.add-color .movement { max-width: 48rem; }
.finish-builder { margin-block: 20px; }
.finish-builder h3 { font-size: 1.15rem; margin-bottom: 12px; }
.finish-add-actions, .finish-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.finish-add-actions button, .finish-tabs button { min-height: 44px; }
.finish-picker { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.finish-picker[hidden], .finish-picker button[hidden] { display: none; }
.finish-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.finish-tabs { margin-block: 12px; }
.finish-tabs [aria-pressed="true"] { background: var(--olive); color: white; }
.texture-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.texture-filters label, .finish-custom label { min-width: 0; }
.texture-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.texture-choice { display: flex; flex-direction: column; padding: 8px; gap: 6px; min-width: 0; height: auto; }
.texture-choice > span:last-child { font-size: .9rem; overflow-wrap: anywhere; }
.texture-sample { display: block; width: 100%; aspect-ratio: 1; background: var(--bg); border-radius: 6px; overflow: hidden; }
.texture-sample img { display: block; width: 100%; height: 100%; object-fit: contain; }
.finish-selection { display: flex; align-items: center; gap: 10px; padding-block: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.finish-selection > span:nth-child(2) { display: grid; gap: 4px; flex: 1; min-width: 100px; overflow-wrap: anywhere; }
.finish-sample { display: inline-block; flex: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--bg); }
.finish-sample img { width: 100%; height: 100%; object-fit: contain; }
.finish-swatches { display: flex; flex-wrap: wrap; gap: 3px; max-width: 72px; }
.finish-swatches .finish-sample { width: 30px; height: 30px; }
.finish-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block: 16px; }
.finish-custom label:last-child { grid-column: 1/-1; }
.finish-custom input[type="color"] { padding: 4px; height: 52px; width: 100%; cursor: pointer; }
@media (max-width: 640px) {
  .texture-filters { grid-template-columns: 1fr; }
  .texture-results { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .texture-choice { padding: 5px; gap: 4px; min-height: 44px; }
  .texture-choice > span:last-child { font-size: .8rem; line-height: 1.35; }
}
@media (min-width: 420px) and (max-width: 640px) { .texture-results { grid-template-columns: repeat(4,minmax(0,1fr)); } }
/* Inventory work surfaces — 20261021: compact, readable, keyboard-friendly. */

/* Compact inventory workflows, retaining the existing brand and gallery option. */
.catalogue.list .product .photo { width:96px; min-width:96px; height:96px; }
.catalogue.list .product .info { padding:12px 16px; grid-template-columns:minmax(0,1fr) minmax(170px,230px); gap:8px 20px; }
.catalogue.list .product .info>div { min-width:0; }
.catalogue.list .stockline { flex-wrap:wrap; gap:6px; }
.catalogue.list .product-price { margin:2px 0; font-size:14px; }
.catalogue.list .product-type { margin:0; font-size:14px; }
.catalogue.list .product-model { font-size:20px; line-height:1.35; }
.catalogue.list .stock { font-size:21px; font-variant-numeric:tabular-nums; }
.catalogue.list .stock span { display:block; font-size:13px; }
.product-editor .editor-media { align-items:center; gap:16px; }
.product-editor .editor-media>div { min-width:0; }
.product-editor input[type=file] { max-width:100%; min-width:0; overflow:hidden; }
.product-editor .formfooter { flex-wrap:wrap; }
.product-editor .formfooter button { white-space:normal; min-height:48px; }
.editor-save-state,.save-help { font-size:14px; color:#5f594a; line-height:1.5; }
.save-help { margin:8px 0; }
.activity-filters { display:grid; grid-template-columns:minmax(180px,2fr) minmax(140px,1fr) 1fr 1fr auto; gap:12px; align-items:end; margin:20px 0 8px; }
.activity-filters label { display:grid; gap:6px; font-size:14px; }
.activity-filters input,.activity-filters select { min-width:0; width:100%; min-height:44px; }
.activity-batch { border-bottom:1px solid var(--line); }
.activity-batch summary { min-height:48px; padding:12px; cursor:pointer; }
.activity-batch .event { margin-inline:12px; }
.notice:not(.warning) { padding-block:8px; font-size:13px; }
@media(max-width:1050px) { .activity-filters { grid-template-columns:1fr 1fr; } .activity-filters>input[type=search] { grid-column:1/-1; } }
@media(max-width:700px) {
 .catalogue.list .product { align-items:flex-start; }
 .catalogue.list .product .photo { width:76px; min-width:76px; height:76px; margin:12px; margin-inline-end:0; border-radius:8px; }
 .catalogue.list .product .info { padding:10px 12px; grid-template-columns:minmax(0,1fr); gap:6px; }
 .catalogue.list .stockline { grid-column:1; grid-row:auto; margin:0; }
 .catalogue.list .product-model { font-size:18px; }
 .catalogue.list .stock { font-size:18px; }
 .catalogue.list .stock span { display:inline; font-size:12px; }
 .catalogue.list .parent-set { font-size:12px; }
 .product-editor .editor-media { gap:10px; }
 .product-editor .editor-media>.detailphoto { width:88px; height:88px; max-height:88px; flex-basis:88px; }
 .product-editor .formfooter button { flex:1 1 120px; padding:10px; font-size:15px; }
 .activity-filters { gap:10px; }
 .activity-filters>select { grid-column:1/-1; }
 .detail-layout .detail-information { order:-1; }
}

.set-color-picker .set-colour-line { padding-block:16px; border-bottom:1px solid var(--line); min-width:0; }
.set-colour-title { display:flex; gap:12px; align-items:baseline; justify-content:space-between; margin-bottom:8px; }
.set-colour-title strong { min-width:0; overflow-wrap:anywhere; }
.set-colour-title > span { flex-shrink:0; }
.set-colour-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; }
.set-colour-controls select { width:100%; min-width:0; min-height:44px; font:inherit; }
.set-colour-controls button { min-height:44px; }
.set-colour-samples:empty { display:none; }
.set-colour-samples { margin-top:8px; }
.set-colour-result { font-weight:600; margin-block:12px; }
.set-availability > .stock-heading { flex-wrap:wrap; gap:8px; }

.product-detail .detail-information > .product-tools { display:flex; flex-wrap:wrap; gap:8px; margin-block:0 16px; padding:0; }
.product-detail .detail-information > .product-tools button { min-height:44px; flex:1 1 auto; }
.product-detail .color-stock { gap:12px; }
.product-detail .color-row { min-height:84px; grid-template-columns:auto minmax(0,1fr) auto; padding:12px; border-radius:12px; }
.product-detail .colour-card-stock { display:grid; gap:4px; text-align:center; min-width:76px; }
.product-detail .colour-card-stock .color-qty { font-size:1.5rem; line-height:1.1; }
.product-detail .colour-card-stock small { font-size:.78rem; }
.product-detail .add-colour-card { width:100%; min-height:56px; display:flex; justify-content:center; gap:8px; border:1px dashed var(--olive); border-radius:12px; margin-block:8px 16px; }
.product-detail .product-secondary-facts { margin-top:16px; }
.product-detail .product-secondary-facts > summary { min-height:44px; padding-block:12px; cursor:pointer; }
@media(max-width:700px) {
 .product-detail .detail-layout .detail-information { order:0; }
 .product-detail .detail-layout .detail-gallery { order:0; }
 .product-detail .drawerhead { padding-block:12px; margin-bottom:12px; }
 .product-detail .detail-layout { gap:16px; }
 .product-detail .detail-gallery .catalogue-photo-frame { max-height:280px; }
 .product-detail .detail-information > .product-tools { margin-bottom:12px; }
 .product-detail .detail-information .detail-price { padding-block:12px; }
 .product-detail .detail-information .product-stock { padding-top:12px; }
}
.finish-inspector { display:flex; flex-wrap:wrap; gap:8px; margin-block:12px; }
.finish-inspector details { flex:1 1 120px; min-width:0; }
.finish-inspector summary { display:flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; }
.finish-inspector .finish-code { font-size:.85rem; overflow-wrap:anywhere; margin-block:8px; }

.set-configurator { margin-block:20px; min-width:0; }
.set-configurator h3 { margin:0 0 12px; }
.set-config-modes { display:flex; gap:8px; margin-bottom:12px; }
.set-config-modes:empty { display:none; }
.set-config-modes button { flex:1; min-height:44px; padding:8px 12px; }
.set-config-modes button[aria-pressed="true"] { background:var(--olive); color:#fff; }
.set-config-line { display:flex; justify-content:space-between; align-items:center; gap:12px; padding-block:10px; margin:0; border-bottom:1px solid var(--line); }
.set-config-line > span { min-width:0; overflow-wrap:anywhere; }
.set-config-line small { display:block; font-size:.85rem; color:var(--muted); margin-top:4px; }
.set-config-line input { width:72px; min-height:44px; flex:0 0 72px; text-align:center; }
.set-config-choices select { min-height:44px; min-width:0; width:100%; font:inherit; }
.set-config-line select { flex:1; }
.set-preset-line { display:grid; grid-template-columns:minmax(0, 1fr) 60px; gap:6px 12px; }
.set-preset-check { display:flex; align-items:center; min-width:0; min-height:44px; gap:10px; cursor:pointer; }
.set-preset-check span { overflow-wrap:anywhere; }
.set-preset-check input { width:20px; height:20px; min-height:20px; flex:0 0 20px; accent-color:var(--olive); }
.set-preset-line .set-preset-quantity { width:100%; grid-column:2; grid-row:1; }
.set-preset-line select { grid-column:1 / -1; }
.set-preset-editor-summary { margin-bottom:0; line-height:1.6; }
.set-config-result { font-size:1.1rem; font-weight:600; margin-block:12px 4px; font-variant-numeric:tabular-nums; }
.set-config-note { color:var(--muted); font-size:.85rem; margin-block:4px 0; }
.set-stock-maintenance { margin-block:16px; }
.set-stock-maintenance > summary,.set-recorded-availability > summary { min-height:44px; padding-block:12px; cursor:pointer; }
.set-stock-maintenance .composition-section { margin-top:8px; }
.set-stock-maintenance .composition-section > h3 { font-size:1rem; }
.set-configurator button:focus-visible,.set-configurator input:focus-visible,.set-configurator select:focus-visible { outline:2px solid var(--olive); outline-offset:3px; }
@media(max-width:700px) {
 .product-detail .detail-information > .product-tools { display:grid; grid-template-columns:1.3fr 1fr 1fr; }
 .product-detail .detail-information > .product-tools button { min-width:0; padding:8px 6px; font-size:.9rem; gap:4px; white-space:nowrap; }
 .product-detail .detail-information > .product-tools button svg { width:16px; height:16px; flex-shrink:0; }
}
.selected-configuration-stock { margin-block:16px; }
.selected-configuration-stock .stock-heading { flex-wrap:wrap; gap:8px; }
.selected-configuration-stock .stock-heading h3 { font-size:1rem; }
.selected-configuration-stock button { min-height:44px; }
.selected-configuration-count { margin-block:8px 0; }
.set-configurator input:disabled { opacity:.55; cursor:not-allowed; }
@media(max-width:700px) {
 .product-detail .drawerhead { padding-block:8px; margin-bottom:8px; }
 .product-detail .drawerhead .product-model { font-size:30px; line-height:1.1; margin:0; }
 .product-detail .drawerhead .product-type { font-size:.9rem; line-height:1.3; }
 .product-detail .detail-gallery { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; }
 .product-detail .detail-gallery > .catalogue-photo-frame,
 .product-detail .detail-gallery > .detail-image-empty,
 .product-detail .detail-gallery > .catalogue-hero-options,
 .product-detail .detail-gallery > .catalogue-family-note { grid-column:1/-1; }
 .product-detail .detail-gallery .catalogue-primary-caption { margin:0; align-self:center; font-size:.75rem; line-height:1.3; }
 .product-detail .detail-gallery .catalogue-full-image { margin:0; min-height:44px; max-width:112px; font-size:.75rem; line-height:1.3; }
 .product-detail .detail-gallery .catalogue-hero-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:4px 0; }
 .product-detail .detail-gallery .catalogue-hero-option { width:100%; min-height:68px; padding:4px; gap:4px; font-size:.7rem; line-height:1.2; }
 .product-detail .detail-gallery .catalogue-hero-option[aria-pressed=true] { padding:3px; }
 .product-detail .detail-gallery .catalogue-hero-option img { width:40px; height:40px; object-fit:contain; }
 .product-detail .detail-gallery .catalogue-family-note { margin:4px 0; font-size:.75rem; line-height:1.3; }
}

/* Approved per-size commercial prices; no inventory controls. */
.detail-size-prices { margin-block: 16px; padding-block: 12px; border-block: 1px solid rgba(78,83,64,.18); }
.detail-size-prices h3 { margin: 0 0 6px; font-size: 1rem; }
.size-price-line { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-block: 8px; }
.record-dimensions { overflow-wrap: anywhere; }

/* Commercial size cards: stock remains on the existing physical owner. */
.product-size-label{font-size:.9rem;line-height:1.5;color:var(--muted,#60665c);margin:.35rem 0;overflow-wrap:anywhere}
.size-product .stock{font-size:.83rem}.size-product .stockline{flex-wrap:wrap;gap:.35rem}
.detail-size-prices button.size-price-line{width:100%;display:flex;justify-content:space-between;gap:1rem;align-items:center;text-align:start;border:1px solid var(--line,#d8ded3);background:transparent;border-radius:8px;padding:.75rem;margin:.4rem 0;color:inherit;font:inherit;cursor:pointer}
.detail-size-prices button.size-price-line[aria-pressed="true"]{border-color:var(--accent,#49684e);background:var(--soft,#eef2e8);box-shadow:inset 0 0 0 1px var(--accent,#49684e)}
.selected-size-caption{font-size:.88rem;line-height:1.6}.set-config-size-image{width:52px;height:44px;object-fit:contain;border-radius:5px;flex:none}
@media(max-width:480px){.detail-size-prices button.size-price-line{gap:.5rem;flex-wrap:wrap}.set-config-line{min-width:0}.set-config-line>span{min-width:0;overflow-wrap:anywhere}}

/* Activity filters and status */
.activity-filters {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  margin-block: 16px 8px;
}
.activity-filters label { gap: 4px; min-width: 0; }
.activity-filters :is(input, select, button) { min-height: 44px; }
.activity-count { margin-block: 0 12px; }
.event > div { min-width: 0; overflow-wrap: anywhere; }
.event > small { flex-shrink: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 1050px) {
  .activity-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity-filters > button { justify-self: start; }
}
@media (max-width: 700px) {
  .activity-filters { gap: 8px; }
  .activity-filters > :is(.activity-search, .activity-kind) { grid-column: 1 / -1; }
}

/* Account and management actions */
.settings { gap: 12px; }
.settings .settings-group > summary { padding: 12px 4px; }
.settings .settings-group > section { padding-block: 8px 16px; }
.user-row { align-items: flex-start; flex-wrap: wrap; }
.user-row-identity { flex: 1 1 180px; }
.user-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
@media (max-width: 700px) {
  .user-row-actions { width: 100%; }
  .user-row-actions > button { padding-inline: 8px; }
}

/* Website selection and publishing */
.featured-toolbar {
  display: grid;
  gap: 8px;
  margin-block: 16px;
  max-width: 44rem;
}
.featured-toolbar input { min-width: 0; }
.featured-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.featured-picks {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin-block: 16px 24px;
}
.featured-pick { min-width: 0; padding: 16px; overflow-wrap: anywhere; }
.featured-pick:focus-within { outline: 2px solid var(--olive); outline-offset: 2px; }
.sync-head { gap: 8px 12px; margin-block: 12px 16px; }
.sync-head > label { min-width: 0; max-width: 100%; }
.sync-head .chip[aria-pressed="true"] {
  color: #fff;
  background: var(--olive);
  border-color: var(--olive);
}
.sync-list { gap: 8px; }
.sync-row { padding: 12px 16px; }
.sync-info { gap: 4px; }
.sync-badge { justify-self: start; padding-inline: 8px; }
.sync-acts > :is(button, a) { min-height: 44px; }
@media (max-width: 700px) {
  .sync-head > label { flex: 1 1 100%; }
  .sync-row { padding: 12px; gap: 8px; }
  .sync-acts { justify-content: flex-start; }
}

/* Keep inventory controls aligned and preserve room for product content. */
.filters {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.filters label, .filters select { min-width: 0; }
.product-photo-empty {
  display: grid;
  align-content: center;
  justify-items: center;
  width: 100%;
  height: 100%;
  padding: 8px;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}
.product-photo-empty svg { width: 20px; height: 20px; }
.catalogue.list .stockline { justify-content: flex-start; gap: 8px; }

.texture-results { gap: 8px; }
.texture-choice { gap: 8px; }
.finish-selection { gap: 8px; }

@media (max-width: 700px) {
  .filters { grid-template-columns: minmax(0, 1fr); }
  .product-detail .detail-information > .product-tools button {
    justify-content: center;
    white-space: normal;
    line-height: 1.3;
  }
}
@media (max-width: 640px) {
  .texture-choice { padding: 8px; gap: 4px; }
  .texture-choice > span:last-child { font-size: 13px; }
}
@media (max-width: 360px) {
  .product-detail .detail-information > .product-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .texture-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Give desktop list thumbnails the same inset and top alignment as on phones. */
@media (min-width: 701px) {
  .catalogue.list .product { align-items: flex-start; }
  .catalogue.list .product .photo {
    margin: 12px;
    margin-inline-end: 0;
    border-radius: 8px;
  }
}
.sync-head .chip[aria-pressed="true"] {
  background: var(--olive-grad);
  box-shadow: var(--sh-olive);
}
