:root {
  font:
    15px/1.5 system-ui,
    sans-serif;
  color: #392d39;
  background: #fcfafb;
  --accent: #75465c;
  --line: #e9dfe5;
  --soft: #f6edf2;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 8px 20px;
  background: white;
  border-bottom: 1px solid var(--line);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  color: inherit;
  border-radius: 9px;
  padding: 10px 14px;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 650;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  text-align: left;
  min-width: 146px;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.brand b,
.brand small {
  display: block;
}
.brand small {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #806979;
}
.identity {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.identity #connection {
  font-size: 12px;
  color: #75646f;
}
.layout {
  display: flex;
  min-height: calc(100vh - 67px);
}
nav {
  width: 208px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 16px 10px;
  background: white;
}
nav button {
  display: block;
  text-align: left;
  width: 100%;
  margin-bottom: 6px;
  border: 0;
}
nav button.active {
  background: var(--soft);
  color: var(--accent);
  font-weight: 700;
}
main {
  padding: 24px;
  flex: 1;
  min-width: 0;
  max-width: 1600px;
}
h1 {
  font-size: 26px;
  margin: 0 0 14px;
}
h2 {
  font-size: 18px;
  margin: 0 0 12px;
}
h3 {
  font-size: 15px;
  margin: 12px 0;
}
.panel {
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  margin: 0 0 14px;
  min-width: 0;
}
.auth {
  max-width: 450px;
  margin: 5vh auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr);
  gap: 14px;
  align-items: start;
}
.basket {
  position: sticky;
  top: 80px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
}
.field span {
  font-size: 13px;
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 9px;
  color: inherit;
}
input[type="checkbox"] {
  width: auto;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}
.product {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 4px;
  text-align: left;
  padding: 14px;
}
.muted {
  color: #7b6c78;
  font-size: 13px;
}
.total {
  font-size: 27px;
  font-weight: 750;
}
.scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  color: #76616e;
  font-size: 12px;
}
.qty {
  display: flex;
  gap: 6px;
  align-items: center;
}
.qty button {
  padding: 6px 10px;
}
.metric {
  background: var(--soft);
  border-radius: 10px;
  padding: 12px;
}
.metric strong {
  display: block;
  font-size: 23px;
}
.notice {
  padding: 12px;
  background: #f4edf1;
  border-radius: 9px;
  margin: 0 0 12px;
}
#message {
  position: fixed;
  bottom: 15px;
  right: 15px;
  max-width: calc(100vw - 30px);
  background: #392d39;
  color: white;
  border-radius: 10px;
  padding: 12px 18px;
  z-index: 9;
}
details {
  margin: 12px 0;
}
summary {
  cursor: pointer;
  font-weight: 650;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #98728b;
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  header {
    padding: 8px 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .brand {
    min-width: 0;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .identity {
    gap: 7px;
  }
  .identity #connection {
    display: none;
  }
  header #page-title {
    display: none;
  }
  main {
    padding: 12px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .basket {
    position: static;
  }
  nav {
    position: fixed;
    z-index: 4;
    top: 66px;
    bottom: 0;
    overflow: auto;
    box-shadow: 0 8px 30px #0002;
  }
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .panel {
    padding: 12px;
  }
}
/* Fixed shell; checkout workspaces remain usable when content grows. */
:root {
  background: white;
}
header {
  height: 72px;
  min-height: 72px;
  flex-wrap: nowrap;
}
nav {
  position: sticky;
  top: 72px;
  height: calc(100dvh - 72px);
  overflow: auto;
}
main {
  max-width: none;
  overflow-wrap: anywhere;
}
.split {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 44%);
  gap: 14px;
}
.basket {
  top: 84px;
  max-height: calc(100dvh - 96px);
  overflow: auto;
}
.basket-top,
.held-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.basket-top h2 {
  margin: 0;
}
.basket-lines {
  margin-top: 10px;
}
.basket-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.basket-line small {
  display: block;
  color: #76616e;
}
.qty input {
  width: 54px;
  text-align: center;
  padding: 8px 3px;
}
.qty button {
  min-width: 38px;
  min-height: 38px;
}
.basket .total {
  margin: 14px 0;
}
.basket form .primary {
  width: 100%;
  min-height: 48px;
}
.receipt-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  width: min(560px, calc(100vw - 24px));
  max-height: 90dvh;
  color: inherit;
  overflow: auto;
}
.receipt-dialog::backdrop {
  background: #0006;
}
.held-row {
  margin: 8px 0;
  flex-wrap: wrap;
}
.held-row strong {
  flex: 1;
}
.receipt-dialog .panel {
  border: 0;
  padding: 4px;
}
.receipt-dialog .actions {
  justify-content: flex-end;
}
@media (max-width: 760px) {
  header {
    height: 64px;
    min-height: 64px;
  }
  .identity #who {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .identity button {
    padding: 8px;
  }
  .brand small {
    letter-spacing: 0;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  nav {
    position: fixed;
    top: 64px;
    height: calc(100dvh - 64px);
  }
  .split {
    grid-template-columns: 1fr;
  }
  .basket {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .basket-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .basket-line > strong {
    grid-column: 2;
    text-align: right;
  }
  .basket .total {
    font-size: 24px;
  }
}
@media print {
  body:has(.receipt-dialog[open]) > :not(.receipt-dialog) {
    display: none !important;
  }
  .receipt-dialog[open] {
    position: static;
    display: block;
    width: 100%;
    max-height: none;
    border: 0;
    overflow: visible;
    margin: 0;
  }
  .receipt-dialog .actions {
    display: none !important;
  }
}
/* Operational integration: reuse the approved warm, restrained GeylMo visual language. */
:root {
  --accent: #563749;
  --soft: #f5eff3;
  --line: #e7dfe4;
  color: #3e3040;
  font:
    14px/1.48 system-ui,
    sans-serif;
}
header {
  padding: 8px 18px;
  gap: 12px;
}
header .brand {
  width: 166px;
  min-width: 166px;
}
header #toggle {
  width: 42px;
  flex-shrink: 0;
  padding: 9px;
}
nav {
  width: 238px;
  padding: 8px 12px;
}
nav button {
  position: relative;
  padding: 12px 14px;
  margin-bottom: 3px;
}
nav button.active::before {
  position: absolute;
  content: "";
  width: 3px;
  left: 0;
  top: 8px;
  bottom: 8px;
  background: #8a536d;
  border-radius: 3px;
}
.panel {
  border-radius: 14px;
  padding: 16px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.metric strong {
  font-size: clamp(18px, 2vw, 26px);
  margin-top: 6px;
}
.overview-metrics {
  margin: 0 0 14px;
}
.chart-scroll {
  overflow: auto;
}
.chart-scroll svg {
  display: block;
  min-width: 600px;
  width: 100%;
  height: 250px;
}
.chart-label {
  font-size: 12px;
  fill: #786a76;
}
.order-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px auto;
  gap: 8px;
  align-items: end;
}
.order-line button {
  margin-bottom: 8px;
}
.order-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.order-status {
  text-transform: capitalize;
  font-weight: 650;
  font-size: 12px;
  color: #76576a;
  background: var(--soft);
  border-radius: 6px;
  padding: 4px 8px;
}
form > .primary {
  margin: 8px 0 0;
}
.product {
  min-height: 112px;
  justify-content: space-between;
  border-color: #e8e0e4;
}
.product:hover:not(:disabled) {
  border-color: #a48094;
  background: #fdf9fb;
}
.product strong {
  font-size: 15px;
}
.basket .total {
  text-align: right;
}
header #who {
  font-weight: 650;
}
header #connection {
  font-size: 11px;
}
.actions .field {
  min-width: 110px;
  margin: 0;
}
nav[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  header {
    padding: 8px 10px;
    gap: 6px;
  }
  header .brand {
    width: auto;
    min-width: 0;
    flex-shrink: 1;
  }
  header #toggle {
    width: 36px;
    min-width: 36px;
  }
  header .identity {
    gap: 4px;
  }
  .order-line {
    grid-template-columns: minmax(0, 1fr) 72px auto;
  }
  .order-line button {
    padding: 8px;
  }
  .overview-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .chart-scroll svg {
    min-width: 560px;
  }
  main {
    padding: 12px;
  }
  .panel {
    padding: 12px;
  }
}
/* Match the legacy header rail, independent sidebar and white workspace. */
:root {
  --header-height: 72px;
  --rail-width: 238px;
}
html {
  scroll-padding-top: calc(var(--header-height) + 12px);
}
header {
  position: fixed;
  inset: 0 0 auto;
  width: 100%;
  height: var(--header-height);
  min-height: var(--header-height);
  z-index: 10;
}
header .brand {
  width: 156px;
  min-width: 156px;
}
header #toggle {
  margin-right: 16px;
  background: #faf7f9;
  color: #684858;
}
.layout {
  padding-top: var(--header-height);
  min-height: 100dvh;
}
nav {
  top: var(--header-height);
  width: var(--rail-width);
  height: calc(100dvh - var(--header-height));
}
nav button {
  min-height: 44px;
}
.identity {
  min-width: 0;
}
#who {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#page-title {
  display: none;
}
@media (max-width: 760px) {
  :root {
    --header-height: 64px;
    --rail-width: min(238px, 78vw);
  }
  header .brand {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
  }
  header #toggle {
    min-width: 40px;
    width: 40px;
    min-height: 40px;
    margin-right: 0;
  }
  nav {
    bottom: auto;
    z-index: 9;
  }
  .split > *,
  .grid > * {
    min-width: 0;
  }
  main {
    width: 100%;
  }
}
@media print {
  .layout {
    padding-top: 0;
  }
}

.scroll:focus-visible,
.chart-scroll:focus-visible {
  outline: 2px solid #98728b;
  outline-offset: 2px;
}
