:root {
  color-scheme: light;
  --bg: #f4efe8;
  --bg-deep: #e8dfd4;
  --surface: #fffdf9;
  --surface-soft: #f8f3ed;
  --ink: #211d1a;
  --muted: #7a7068;
  --line: #e7ddd2;
  --brand: #b9652f;
  --brand-deep: #8b431e;
  --brand-soft: #f3dfcd;
  --night: #24213e;
  --night-soft: #e9e7f3;
  --success: #2e7d5b;
  --success-soft: #e4f3eb;
  --danger: #b33b3b;
  --danger-soft: #f9e5e3;
  --warning: #a36b16;
  --warning-soft: #fbefd6;
  --shadow-sm: 0 8px 24px rgba(58, 42, 28, .07);
  --shadow-lg: 0 22px 70px rgba(39, 28, 20, .16);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --sidebar-width: 248px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 78px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(231, 199, 158, .58), transparent 31rem),
    radial-gradient(circle at 100% 100%, rgba(36, 33, 62, .12), transparent 34rem),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

img,
svg,
video {
  max-width: 100%;
}

main,
.card,
.page-stack,
.content-grid > *,
.metrics-grid > *,
.form-row > *,
.toolbar-group > *,
.card-header > * {
  min-width: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.boot-screen {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: var(--muted);
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #d8894d, #492f41 70%);
  box-shadow: 0 12px 25px rgba(111, 61, 32, .22);
  font-weight: 800;
  letter-spacing: -.05em;
  flex: 0 0 auto;
}

.brand-mark.large {
  width: 74px;
  height: 74px;
  border-radius: 23px;
  font-size: 30px;
}

.auth-clean-screen {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: calc(clamp(18px, 5vw, 52px) + env(safe-area-inset-top, 0px))
    clamp(18px, 5vw, 52px)
    calc(clamp(18px, 5vw, 52px) + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 12% 8%, rgba(203, 151, 99, .2), transparent 24rem),
    radial-gradient(circle at 92% 92%, rgba(46, 43, 63, .1), transparent 28rem),
    #eee8e1;
}

.auth-clean-screen::before {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  right: -180px;
  top: -190px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .16);
  pointer-events: none;
}

.auth-clean-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  display: grid;
  gap: 26px;
  padding: clamp(25px, 5vw, 40px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 28px;
  background: rgba(255, 253, 249, .94);
  box-shadow: 0 28px 80px rgba(57, 42, 31, .15);
  backdrop-filter: blur(24px);
}

.auth-clean-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.auth-clean-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-clean-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.auth-clean-brand strong {
  font-size: 18px;
  letter-spacing: -.035em;
}

.auth-clean-brand small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .16em;
}

.auth-clean-heading h1 {
  margin: 0;
  font-size: clamp(29px, 5vw, 36px);
  line-height: 1.1;
  letter-spacing: -.055em;
}

.auth-clean-heading p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.auth-clean-card form {
  gap: 16px;
}

.auth-clean-card .field input {
  padding: 14px 15px;
  border-radius: 14px;
  background: #fff;
}

.auth-clean-card .button {
  min-height: 50px;
  border-radius: 14px;
  font-size: 15px;
}

.auth-clean-help {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.auth-clean-footer {
  margin-top: -12px;
  color: #9b9188;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}

.auth-screen {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(320px, 1.08fr) minmax(340px, .92fr);
  position: relative;
  overflow: hidden;
}

.auth-hero {
  padding: clamp(32px, 6vw, 88px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(20, 17, 24, .08), rgba(20, 17, 24, .86)),
    radial-gradient(circle at 25% 20%, rgba(255, 214, 160, .7), transparent 20rem),
    linear-gradient(145deg, #c87336 0%, #6e3e3f 46%, #27233d 100%);
}

.auth-brand,
.top-brand,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.auth-brand small,
.sidebar-brand small {
  display: block;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .68;
  font-weight: 700;
  margin-top: 2px;
}

.auth-hero-copy {
  max-width: 620px;
}

.auth-hero h1 {
  font-size: clamp(42px, 7vw, 88px);
  line-height: .95;
  margin: 0 0 24px;
  letter-spacing: -.07em;
}

.auth-hero p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-size: 16px;
  line-height: 1.85;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-points span {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 13px;
  backdrop-filter: blur(14px);
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(430px, 100%);
  background: rgba(255, 253, 249, .93);
  border: 1px solid rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-lg);
  border-radius: 30px;
  padding: clamp(24px, 5vw, 42px);
  backdrop-filter: blur(24px);
}

.auth-card h2 {
  margin: 28px 0 8px;
  font-size: 29px;
  letter-spacing: -.045em;
}

.auth-card > p {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.7;
}

.form-grid {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span,
.field-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea,
.inline-form input,
.inline-form select,
.toolbar input,
.toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.inline-form input:focus,
.inline-form select:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: rgba(185, 101, 47, .65);
  box-shadow: 0 0 0 4px rgba(185, 101, 47, .11);
}

.login-hint {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.login-hint b {
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 720;
  transition: transform .15s, background .15s, box-shadow .15s;
  white-space: nowrap;
}

.button:hover {
  background: var(--brand-deep);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button.block {
  width: 100%;
}

.logout-button {
  gap: 7px;
}

.logout-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button.secondary {
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.button.secondary:hover {
  background: #f0e8df;
}

.button.ghost {
  color: var(--brand-deep);
  background: transparent;
  border: 1px solid rgba(185, 101, 47, .24);
}

.button.ghost:hover {
  background: var(--brand-soft);
}

.button.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.button.success {
  background: var(--success);
}

.button.small {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 13px;
}

.button.icon {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 11px;
}

.app-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 23px 18px;
  color: rgba(255, 255, 255, .76);
  background:
    radial-gradient(circle at 20% 0%, rgba(201, 120, 61, .22), transparent 18rem),
    #1d1a20;
  display: flex;
  flex-direction: column;
  gap: 25px;
  overflow-y: auto;
}

.sidebar-brand {
  color: #fff;
  font-size: 17px;
  padding: 2px 5px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  min-height: 45px;
  padding: 0 11px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, .68);
  background: transparent;
  text-align: left;
  font-weight: 650;
  transition: background .15s, color .15s;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .07);
  font-size: 15px;
}

.nav-item.active .nav-icon {
  background: var(--brand);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-user {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 14px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e0a26c, #9d542c);
  color: #fff;
  font-weight: 800;
  flex: 0 0 auto;
}

.user-meta {
  min-width: 0;
}

.user-meta strong,
.user-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta strong {
  color: #fff;
  font-size: 14px;
}

.user-meta span {
  color: rgba(255, 255, 255, .5);
  font-size: 12px;
  margin-top: 3px;
}

.main-shell {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  min-height: calc(76px + env(safe-area-inset-top, 0px));
  padding: 15px clamp(16px, 3vw, 36px);
  padding-top: calc(15px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(244, 239, 232, .88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(231, 221, 210, .8);
}

.topbar-title h1 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 29px);
  letter-spacing: -.045em;
}

.topbar-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.content {
  width: min(1500px, 100%);
  padding: clamp(17px, 3vw, 34px);
  padding-bottom: 110px;
}

.page-stack {
  display: grid;
  gap: 18px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 38px);
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 190, 117, .11), transparent 40%),
    linear-gradient(130deg, #b96631 0%, #7c4644 45%, #292641 100%);
  box-shadow: var(--shadow-lg);
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  right: -75px;
  top: -105px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
}

.hero-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 43px);
  letter-spacing: -.055em;
}

.hero-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, .73);
  line-height: 1.75;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.hero-card .button.secondary {
  color: #fff;
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .14);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
}

.metric-card {
  min-height: 128px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 249, .9);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.metric-card strong {
  display: block;
  font-size: clamp(22px, 2.5vw, 31px);
  letter-spacing: -.06em;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
}

.metric-card.accent {
  color: #fff;
  background: linear-gradient(145deg, #2d2a46, #1f1c2e);
  border-color: transparent;
}

.metric-card.accent small,
.metric-card.accent span {
  color: rgba(255, 255, 255, .62);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 249, .93);
  box-shadow: var(--shadow-sm);
}

.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}

.card-header h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -.025em;
}

.card-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.card-header .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.section-title {
  margin: 3px 0 0;
  font-size: 20px;
  letter-spacing: -.04em;
}

.section-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 750;
  background: rgba(248, 243, 237, .65);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(248, 243, 237, .62);
}

.table-main {
  font-weight: 700;
}

.table-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.empty-state {
  padding: 34px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
  background: rgba(248, 243, 237, .45);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tag.success {
  color: var(--success);
  background: var(--success-soft);
}

.tag.warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.tag.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.tag.night {
  color: var(--night);
  background: var(--night-soft);
}

.tag.brand {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.progress-list {
  display: grid;
  gap: 13px;
}

.progress-row {
  display: grid;
  gap: 7px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.progress-meta strong {
  font-weight: 750;
}

.progress-meta span {
  color: var(--muted);
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #eee5db;
}

.progress-bar {
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, #d58347, #a34b2a);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  overflow-x: auto;
  max-width: 100%;
}

.segmented button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.segmented button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 11px rgba(70, 47, 29, .08);
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  align-items: start;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.product-card {
  min-height: 146px;
  padding: 15px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, .93);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  box-shadow: 0 7px 18px rgba(63, 44, 29, .045);
  transition: transform .14s, border-color .14s, box-shadow .14s;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(185, 101, 47, .46);
  box-shadow: 0 12px 24px rgba(63, 44, 29, .09);
}

.product-card h4 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -.02em;
}

.product-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.product-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 17px;
}

.product-price {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.06em;
}

.product-price::before {
  content: "¥";
  font-size: 12px;
  margin-right: 2px;
  font-weight: 700;
}

.product-cost {
  color: var(--muted);
  font-size: 11px;
}

.add-bubble {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  font-size: 19px;
  flex: 0 0 auto;
}

.cart-panel {
  position: sticky;
  top: 94px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, .96);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.cart-head {
  padding: 18px 19px;
  color: #fff;
  background: linear-gradient(135deg, #292641, #1e1b2a);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.cart-head h3 {
  margin: 0;
  font-size: 17px;
}

.cart-head p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, .6);
  font-size: 12px;
}

.cart-body {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.cart-items {
  max-height: 265px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 11px;
  background: var(--surface-soft);
}

.cart-item-name {
  font-size: 13px;
  font-weight: 700;
}

.cart-item-price {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 7px;
}

.qty-control button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 800;
}

.qty-control span {
  min-width: 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 750;
}

.cart-summary {
  display: grid;
  gap: 8px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.summary-row.total {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.summary-row.total strong {
  font-size: 25px;
  letter-spacing: -.06em;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.inline-form .field {
  min-width: 0;
}

.stack {
  display: grid;
  gap: 12px;
}

.mobile-bottom {
  display: none;
}

.mobile-topbar {
  display: none;
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.more-tile {
  min-height: 110px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.more-tile .tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 17px;
}

.more-tile strong {
  display: block;
  font-size: 14px;
}

.more-tile span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(24, 19, 16, .42);
  backdrop-filter: blur(8px);
}

.modal {
  width: min(620px, 100%);
  max-height: min(84vh, 780px);
  overflow-y: auto;
  border-radius: 23px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 22px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 19px;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.04em;
}

.modal-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 28px;
  max-width: min(480px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 13px 17px;
  border-radius: 13px;
  color: #fff;
  background: #29252a;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 650;
  animation: toast-in .22s ease-out;
}

.toast.error {
  background: #8c3131;
}

.toast.success {
  background: #246c50;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.muted {
  color: var(--muted);
}

.amount-positive {
  color: var(--success);
  font-weight: 750;
}

.amount-negative {
  color: var(--danger);
  font-weight: 750;
}

.nowrap {
  white-space: nowrap;
}

.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 18px; }
.mb-3 { margin-bottom: 12px; }

@media (max-width: 1250px) {
  .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
  :root { --sidebar-width: 220px; }
  .order-layout { grid-template-columns: minmax(0, 1fr) 350px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-form .button { width: 100%; }
}

@media (max-width: 780px) {
  .auth-clean-screen {
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
    place-items: center;
    background:
      radial-gradient(circle at 12% 8%, rgba(203, 151, 99, .18), transparent 18rem),
      #eee8e1;
  }

  .auth-clean-card {
    gap: 23px;
    padding: 24px;
    border-radius: 23px;
  }

  .auth-clean-top .tag {
    font-size: 10px;
  }

  .auth-clean-heading h1 {
    font-size: 30px;
  }
}

@media (max-width: 780px) {
  body {
    background:
      radial-gradient(circle at 15% 0%, rgba(231, 199, 158, .6), transparent 20rem),
      var(--bg);
  }

  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: 34vh;
    padding: 28px 24px;
    border-radius: 0 0 28px 28px;
  }

  .auth-hero h1 {
    font-size: clamp(32px, 12vw, 48px);
    margin-top: clamp(24px, 7vw, 38px);
    overflow-wrap: anywhere;
  }

  .auth-hero p {
    display: none;
  }

  .auth-points {
    margin-top: 22px;
  }

  .auth-panel {
    padding: 0 16px 28px;
    margin-top: -24px;
    position: relative;
    z-index: 2;
  }

  .auth-card {
    padding: 24px;
    border-radius: 24px;
  }
}

@media (max-width: 780px) and (pointer: coarse), (max-width: 560px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main-shell {
    display: block;
  }

  .topbar {
    display: none;
  }

  .mobile-topbar {
    position: sticky;
    z-index: 15;
    top: 0;
    min-height: calc(61px + env(safe-area-inset-top, 0px));
    padding: 11px 15px;
    padding-top: calc(11px + env(safe-area-inset-top, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(244, 239, 232, .92);
    border-bottom: 1px solid rgba(231, 221, 210, .8);
    backdrop-filter: blur(18px);
  }

  .mobile-brand {
    display: flex;
  }

  .mobile-topbar h1 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -.04em;
  }

  .mobile-topbar p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
  }

  .content {
    padding: 14px;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .hero-card {
    border-radius: 20px;
  }

  .hero-card h2 {
    font-size: 29px;
  }

  .hero-card p {
    font-size: 13px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metric-card {
    min-height: 112px;
    padding: 15px;
  }

  .metric-card strong {
    font-size: 25px;
  }

  .content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: span 1;
  }

  .order-layout {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: static;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .product-card {
    min-height: 137px;
    padding: 13px;
  }

  .card {
    padding: 15px;
    border-radius: 15px;
  }

  .form-row,
  .form-row.three,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .inline-form .button {
    width: 100%;
  }

  .mobile-bottom {
    position: fixed;
    z-index: 30;
    left: max(11px, env(safe-area-inset-left));
    right: max(11px, env(safe-area-inset-right));
    bottom: calc(9px + env(safe-area-inset-bottom));
    min-height: 67px;
    padding: 7px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 20px;
    background: rgba(255, 253, 249, .94);
    box-shadow: 0 14px 45px rgba(51, 34, 22, .18);
    backdrop-filter: blur(20px);
  }

  .mobile-nav-item {
    min-width: 0;
    padding: 4px 2px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    color: var(--muted);
    background: transparent;
    border-radius: 13px;
    font-size: 10px;
    font-weight: 700;
  }

  .mobile-nav-item .mobile-icon {
    font-size: 18px;
    line-height: 1;
  }

  .mobile-nav-item.active {
    color: var(--brand-deep);
    background: var(--brand-soft);
  }

  .more-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar-group {
    width: 100%;
  }

  .toolbar-group > * {
    flex: 1;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .toast {
    bottom: calc(91px + env(safe-area-inset-bottom));
  }
}

@media (min-width: 561px) and (max-width: 980px) and (pointer: fine) {
  :root {
    --sidebar-width: 82px;
  }

  .sidebar {
    padding: 20px 10px;
  }

  .sidebar-brand {
    justify-content: center;
    padding: 2px 0 16px;
  }

  .sidebar-brand-copy,
  .nav-label,
  .user-meta,
  .sidebar-footer .button {
    display: none;
  }

  .nav-list {
    gap: 8px;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .sidebar-user {
    justify-content: center;
    margin-bottom: 0;
  }

  .sidebar-footer {
    padding-top: 12px;
  }

  .content-grid > * {
    grid-column: span 12;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-layout {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: static;
  }

  .form-row,
  .form-row.three,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .inline-form .button {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .product-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr; }
}

.image-preview-grid,
.receipt-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.image-preview {
  position: relative;
  width: 92px;
  display: grid;
  gap: 6px;
}

.image-preview img,
.receipt-thumb img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.receipt-thumb {
  position: relative;
  display: inline-block;
  width: 58px;
  margin-top: 7px;
}

.receipt-thumb img {
  height: 52px;
}

.thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--danger);
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(120, 35, 35, .25);
}

.update-prompt {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
  border-radius: 0;
  color: #fff;
  background: linear-gradient(90deg, #b9652f, #87483d 55%, #302b4b);
  box-shadow: 0 10px 30px rgba(55, 35, 25, .26);
  text-align: center;
  animation: update-prompt-in .24s ease-out;
}

.update-prompt:hover {
  background: linear-gradient(90deg, #a95729, #744039 55%, #26223c);
}

.update-prompt-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  font-size: 18px;
  font-weight: 800;
  flex: 0 0 auto;
}

.update-prompt-copy {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.update-prompt-copy strong {
  font-size: 14px;
}

.update-prompt-copy small {
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
}

@keyframes update-prompt-in {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 780px) {
  .update-prompt {
    right: 0;
    bottom: auto;
    min-height: 52px;
    justify-content: center;
  }
}

.date-chip-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.date-chip {
  min-height: 55px;
  padding: 6px 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--muted);
  background: var(--surface-soft);
}

.date-chip small {
  font-size: 10px;
}

.date-chip strong {
  color: var(--ink);
  font-size: 13px;
}

.date-chip.selected {
  color: #fff;
  background: linear-gradient(145deg, #c87336, #7a4444);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(139, 67, 30, .18);
}

.date-chip.selected strong {
  color: #fff;
}

@media (max-width: 780px) {
  .date-chip-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.brand-select-screen {
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(clamp(22px, 5vw, 56px) + env(safe-area-inset-top, 0px))
    clamp(22px, 5vw, 56px)
    calc(clamp(22px, 5vw, 56px) + env(safe-area-inset-bottom, 0px));
  color: #fff;
  background:
    radial-gradient(circle at 15% 10%, rgba(196, 196, 204, .2), transparent 22rem),
    radial-gradient(circle at 88% 90%, rgba(255, 255, 255, .07), transparent 28rem),
    #1b1a1e;
}

.brand-select-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
}

.brand-select-content {
  max-width: 980px;
  margin: clamp(70px, 12vh, 130px) auto 0;
}

.brand-select-eyebrow {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
  letter-spacing: .08em;
}

.brand-select-content h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -.065em;
}

.brand-select-content > p:not(.brand-select-eyebrow) {
  max-width: 620px;
  margin: 22px 0 34px;
  color: rgba(255, 255, 255, .62);
  line-height: 1.8;
}

.brand-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.brand-choice {
  min-height: 220px;
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  color: #fff;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03)),
    #302a2a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .16);
  transition: transform .18s, border-color .18s;
}

.brand-choice:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, .34);
}

.brand-choice-bar_101 {
  background:
    radial-gradient(circle at 85% 15%, rgba(205, 205, 214, .18), transparent 12rem),
    linear-gradient(150deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .015)),
    #1b1a1f;
}

.brand-choice-bp_coffee {
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 226, 190, .3), transparent 12rem),
    linear-gradient(150deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03)),
    #4b2d23;
}

.brand-choice-kind {
  color: rgba(255, 255, 255, .58);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .14em;
}

.brand-choice strong {
  margin-top: auto;
  font-size: clamp(27px, 4vw, 42px);
  letter-spacing: -.055em;
}

.brand-choice-role {
  margin-top: 7px;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
}

.brand-choice-arrow {
  margin-top: 22px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  font-size: 12px;
  font-weight: 700;
}

body[data-brand="bp_coffee"] {
  --bg: #f4efe8;
  --bg-deep: #e8dfd4;
  --surface: #fffdf9;
  --surface-soft: #f8f3ed;
  --ink: #211d1a;
  --muted: #7a7068;
  --line: #e7ddd2;
  --brand: #b9652f;
  --brand-deep: #8b431e;
  --brand-soft: #f3dfcd;
}

body[data-brand="bar_101"] {
  --bg: #e8e8ec;
  --bg-deep: #d7d7dc;
  --surface: #fdfdfe;
  --surface-soft: #f0f0f3;
  --ink: #1d1d22;
  --muted: #707079;
  --line: #d5d5dc;
  --brand: #5b5a64;
  --brand-deep: #2e2d34;
  --brand-soft: #dedee4;
  --night: #29282f;
  --night-soft: #e7e7eb;
  --success: #2c7054;
  --success-soft: #e2f0e9;
  --danger: #a63d48;
  --danger-soft: #f5e5e7;
  --warning: #77644b;
  --warning-soft: #eee9e1;
  --shadow-sm: 0 8px 24px rgba(28, 28, 34, .08);
  --shadow-lg: 0 22px 70px rgba(20, 20, 25, .2);
  background:
    radial-gradient(circle at 8% 0%, rgba(188, 188, 198, .46), transparent 31rem),
    radial-gradient(circle at 100% 100%, rgba(45, 45, 54, .11), transparent 34rem),
    var(--bg);
}

body[data-brand="bar_101"] .sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(169, 169, 181, .16), transparent 18rem),
    #17161a;
}

body[data-brand="bar_101"] .metric-card,
body[data-brand="bar_101"] .card,
body[data-brand="bar_101"] .product-card,
body[data-brand="bar_101"] .cart-panel,
body[data-brand="bar_101"] .more-tile {
  background: var(--surface);
  border-color: rgba(255, 255, 255, .92);
}

body[data-brand="bar_101"] th {
  background: rgba(240, 240, 243, .82);
}

body[data-brand="bar_101"] tbody tr:hover {
  background: rgba(240, 240, 243, .7);
}

body[data-brand="bar_101"] .empty-state {
  background: rgba(240, 240, 243, .52);
}

body[data-brand="bar_101"] .progress-track {
  background: #dcdce1;
}

body[data-brand="bar_101"] .mobile-bottom {
  background: rgba(253, 253, 254, .96);
  border-color: rgba(255, 255, 255, .9);
}

body[data-brand="bar_101"] .brand-mark {
  background: linear-gradient(140deg, #85848e, #25242b 72%);
  box-shadow: 0 12px 25px rgba(20, 20, 25, .24);
}

body[data-brand="bar_101"] .hero-card {
  background:
    radial-gradient(circle at 92% 4%, rgba(255, 255, 255, .13), transparent 19rem),
    linear-gradient(130deg, #5c5b65 0%, #36353d 48%, #19181e 100%);
}

body[data-brand="bar_101"] .topbar,
body[data-brand="bar_101"] .mobile-topbar {
  background: rgba(232, 232, 236, .9);
  border-bottom-color: rgba(204, 204, 212, .82);
}

body[data-brand="bar_101"] .metric-card.accent,
body[data-brand="bar_101"] .cart-head {
  background: linear-gradient(145deg, #47464f, #1d1c22);
}

body[data-brand="bar_101"] .product-card:hover {
  border-color: rgba(91, 90, 100, .5);
  box-shadow: 0 12px 24px rgba(25, 25, 30, .11);
}

body[data-brand="bar_101"] .button.secondary:hover {
  background: #e5e5e9;
}

body[data-brand="bar_101"] .button.ghost {
  border-color: rgba(91, 90, 100, .28);
}

body[data-brand="bar_101"] .field input:focus,
body[data-brand="bar_101"] .field select:focus,
body[data-brand="bar_101"] .field textarea:focus,
body[data-brand="bar_101"] .inline-form input:focus,
body[data-brand="bar_101"] .inline-form select:focus,
body[data-brand="bar_101"] .toolbar input:focus,
body[data-brand="bar_101"] .toolbar select:focus {
  border-color: rgba(91, 90, 100, .62);
  box-shadow: 0 0 0 4px rgba(91, 90, 100, .12);
}

body[data-brand="bar_101"] .progress-bar {
  background: linear-gradient(90deg, #85848e, #34333a);
}

body[data-brand="bar_101"] .date-chip.selected {
  background: linear-gradient(145deg, #696872, #33323a);
  box-shadow: 0 8px 18px rgba(28, 28, 34, .2);
}

body[data-brand="bar_101"] .update-prompt {
  background: linear-gradient(90deg, #53525b, #2d2c33 55%, #17161b);
}

body[data-brand="bar_101"] .update-prompt:hover {
  background: linear-gradient(90deg, #45444c, #25242a 55%, #131217);
}

@media (max-width: 700px) {
  .brand-select-screen {
    padding: calc(20px + env(safe-area-inset-top, 0px)) 16px calc(32px + env(safe-area-inset-bottom, 0px));
  }

  .brand-select-content {
    margin-top: 54px;
  }

  .brand-choice-grid {
    grid-template-columns: 1fr;
  }

  .brand-choice {
    min-height: 185px;
  }
}

.brand-choice-desc {
  margin-top: 7px;
  color: rgba(255, 255, 255, .5);
  font-size: 11px;
}
