/* Toko Kue Manis — demo. Tema terang, kontras WCAG AA, target sentuh ≥ 44 px, tanpa font/berkas luar. */

:root {
  --bg: #fffaf5;
  --surface: #ffffff;
  --surface-2: #fff3ea;
  --ink: #2b1d1a;
  --ink-2: #4f3c37;
  --muted: #6b554e;
  --line: #e8d6cc;
  --line-strong: #c9ad9f;
  --brand: #a3264b;
  --brand-hover: #861d3d;
  --brand-soft: #fde8ee;
  --focus: #1d4ed8;
  --banner-bg: #fff1c2;
  --banner-ink: #4d3300;
  --danger: #a11a1a;
  --danger-soft: #fde2e2;
  --ok: #14532d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(43 29 26 / 6%), 0 6px 18px rgb(43 29 26 / 6%);
  --gutter: 16px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

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

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.2rem;
}

h3 {
  font-size: 1rem;
  margin-top: 1rem;
}

p {
  margin: 0 0 0.75rem;
}

a {
  color: var(--brand);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

[tabindex='-1']:focus {
  outline: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
  }
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--surface);
  color: var(--brand);
  border: 2px solid var(--brand);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 8px;
}

/* ----- banner demo (wajib di setiap tampilan) ----- */

.demo-banner {
  background: var(--banner-bg);
  color: var(--banner-ink);
  border-bottom: 1px solid #e9cf7a;
}

.demo-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-block: 8px;
}

.demo-banner-text {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 0.925rem;
  min-width: 0;
  flex: 1 1 320px;
}

.demo-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--banner-ink);
  color: #fffbeb;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* ----- tombol ----- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--brand-hover);
  color: #ffffff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--brand);
}

.btn-secondary:hover {
  background: var(--brand-soft);
  color: var(--brand-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
}

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

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: #7f1414;
  color: #ffffff;
}

.btn-danger-outline {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger-outline:hover {
  background: var(--danger-soft);
}

.btn-banner {
  background: var(--surface);
  color: var(--banner-ink);
  border-color: var(--banner-ink);
}

.btn-banner:hover {
  background: #fffbeb;
}

.btn-sm {
  padding: 8px 14px;
}

.btn-lg {
  min-height: 52px;
  padding-inline: 28px;
  font-size: 1.05rem;
}

.btn-icon {
  padding: 0;
  width: 44px;
  font-size: 1.25rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* ----- header & navigasi ----- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
}

.brand:hover {
  color: var(--brand);
}

.brand-logo {
  width: 40px;
  height: 40px;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
}

.main-nav a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.main-nav a[aria-current='page'] {
  background: var(--brand-soft);
  color: var(--brand-hover);
}

.main-nav {
  min-width: 0;
}

@media (max-width: 559px) {
  .main-nav {
    width: 100%;
  }

  .main-nav ul {
    justify-content: space-between;
    gap: 0;
  }

  .main-nav a {
    padding-inline: 8px;
    font-size: 0.95rem;
  }
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding-inline: 6px;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  font-size: 0.8rem;
}

/* ----- kerangka ----- */

.main {
  flex: 1 0 auto;
  padding-block: 24px 48px;
}

.main:focus {
  outline: none;
}

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

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.925rem;
}

.footer-inner {
  padding-block: 20px;
}

.footer-inner p:last-child {
  margin-bottom: 0;
}

.page-head {
  margin-bottom: 20px;
}

.lead {
  color: var(--ink-2);
  font-size: 1.05rem;
  max-width: 68ch;
}

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

.small {
  font-size: 0.9rem;
}

.back {
  margin-bottom: 8px;
}

.notice {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
}

.notice-warn {
  background: var(--banner-bg);
  border-color: #e9cf7a;
  color: var(--banner-ink);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.card > .btn,
.summary-card > .btn {
  margin: 0 8px 8px 0;
}

.empty {
  padding: 32px 20px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  background: var(--surface);
}

/* ----- katalog ----- */

.hero {
  display: grid;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fde8ee 0%, #fff3ea 60%, #fff8e1 100%);
  border: 1px solid var(--line);
}

.hero .page-head {
  margin-bottom: 8px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
}

.hero-art {
  display: none;
}

.art {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

.art-hero {
  border-radius: 18px;
  box-shadow: var(--shadow);
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    padding: 28px 32px;
  }

  .hero-art {
    display: block;
    max-width: 280px;
    justify-self: end;
    width: 100%;
  }
}

.catalog-tools {
  display: grid;
  gap: 12px;
  margin-bottom: 8px;
}

@media (min-width: 1024px) {
  .catalog-tools {
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    align-items: end;
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.chip[aria-pressed='true'] {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.result-count {
  color: var(--muted);
  font-size: 0.925rem;
  margin: 8px 0 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
  }
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgb(43 29 26 / 8%), 0 12px 28px rgb(43 29 26 / 10%);
}

.product-card.is-out .art {
  filter: grayscale(0.7);
  opacity: 0.75;
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 16px 16px;
}

.product-cat {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-name {
  font-size: 1.05rem;
  margin: 0 0 2px;
}

.product-name a {
  color: var(--ink);
  text-decoration: none;
}

.product-name a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.product-name a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.product-card:has(.product-name a:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.product-name a:focus-visible {
  outline: none;
}

.product-unit {
  color: var(--muted);
  font-size: 0.9rem;
}

.product-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.product-foot > * {
  margin: 0;
}

.product-foot .btn {
  position: relative;
  z-index: 1;
}

.price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
}

.price-lg {
  font-size: 1.5rem;
}

.unit {
  font-weight: 500;
  font-size: 1rem;
  color: var(--muted);
}

/* ----- lencana ----- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-out {
  background: #ececec;
  color: #374151;
}

.status-baru {
  background: #e0ecff;
  color: #1e3a8a;
  border-color: #b9d0fb;
}

.status-diproses {
  background: #fff1c2;
  color: #5c3d00;
  border-color: #ecd27c;
}

.status-siap {
  background: #dcfce7;
  color: #14532d;
  border-color: #a7e3bd;
}

.status-selesai {
  background: #ececec;
  color: #374151;
  border-color: #d1d5db;
}

.status-batal {
  background: var(--danger-soft);
  color: #8a1c1c;
  border-color: #f2b8b8;
}

/* ----- detail produk ----- */

.product-detail {
  display: grid;
  gap: 24px;
}

.detail-art .art {
  border-radius: 22px;
  border: 1px solid var(--line);
}

@media (min-width: 768px) {
  .product-detail {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.facts {
  padding-left: 1.2rem;
  color: var(--ink-2);
}

.buy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.qty {
  display: grid;
  gap: 4px;
}

.qty-label {
  font-weight: 600;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.input.qty-input {
  width: 64px;
  text-align: center;
  padding-inline: 4px;
}

/* ----- formulir ----- */

.field {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  min-width: 0;
}

.field label,
.fieldset legend {
  font-weight: 600;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.input::placeholder {
  color: #806a62;
}

textarea.input {
  resize: vertical;
}

.input:hover {
  border-color: var(--muted);
}

.input[aria-invalid='true'] {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-weight: 600;
  font-size: 0.9rem;
}

.field-error:empty {
  display: none;
}

.fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 14px;
}

.radio-row {
  display: grid;
  gap: 10px;
}

@media (min-width: 560px) {
  .radio-row,
  .field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field-row {
  display: grid;
  gap: 0 16px;
}

.radio-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.radio-card:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.radio-card input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--brand);
  flex: none;
}

.radio-text {
  display: grid;
}

.error-summary {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 2px solid var(--danger);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: #6b1111;
}

.error-summary h2 {
  font-size: 1rem;
}

.error-summary ul {
  margin: 0;
  padding-left: 1.2rem;
}

.form-section {
  margin-bottom: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.form-section > .btn {
  margin-bottom: 14px;
}

/* ----- keranjang & ringkasan ----- */

.cart-layout {
  display: grid;
  gap: 20px;
  align-items: start;
}

@media (min-width: 1024px) {
  .cart-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

.cart-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 16px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.art-thumb {
  width: 72px;
  border-radius: 10px;
}

.cart-name {
  font-size: 1.05rem;
  margin: 0;
}

.cart-name a {
  color: var(--ink);
}

.cart-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.cart-actions > * {
  margin: 0;
}

.line-total {
  font-weight: 700;
  margin-left: auto;
}

@media (min-width: 768px) {
  .cart-item {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: center;
  }

  .art-thumb {
    width: 88px;
  }

  .cart-actions {
    grid-column: auto;
  }
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

@media (min-width: 1024px) {
  .summary-card {
    position: sticky;
    top: 16px;
  }
}

.totals {
  margin: 12px 0;
}

.totals div,
.mini-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block: 4px;
}

.totals dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.totals .grand {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 10px;
  font-weight: 800;
  font-size: 1.1rem;
}

.mini-lines {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.mini-lines li span:last-child {
  white-space: nowrap;
}

/* ----- konfirmasi ----- */

.order-ticket {
  margin-bottom: 20px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  border: 2px dashed var(--brand);
}

.order-ticket p {
  margin: 0 0 4px;
}

.order-no {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--brand-hover);
  font-variant-numeric: tabular-nums;
}

.confirm-grid {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

@media (min-width: 1024px) {
  .confirm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.facts-list {
  margin: 0 0 16px;
}

.facts-list div {
  display: grid;
  gap: 2px;
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
}

.facts-list dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.facts-list dd {
  margin: 0;
  font-weight: 600;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.items-table th,
.items-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.items-table .num {
  text-align: right;
  white-space: nowrap;
}

.items-table tfoot th {
  font-weight: 600;
}

.items-table .grand th,
.items-table .grand td {
  font-weight: 800;
  border-bottom: 0;
}

.wa-bubble {
  margin: 0;
  padding: 14px 16px;
  max-width: 100%;
  border-radius: 14px 14px 4px 14px;
  background: #dcf8c6;
  color: #1c2b16;
  font-family: var(--font);
  font-size: 0.95rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ----- dialog ----- */

.dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px rgb(43 29 26 / 30%);
}

.dialog::backdrop {
  background: rgb(43 29 26 / 45%);
}

.dialog-body {
  padding: 22px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* ----- mode pemilik ----- */

.owner-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #2b1d1a;
  color: #fffaf5;
  font-size: 0.85rem;
  font-weight: 700;
}

.subnav {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.subnav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
}

.subnav-end {
  margin-left: auto;
}

.subnav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
}

.subnav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.subnav-link[aria-current='page'] {
  background: var(--ink);
  color: #ffffff;
}

.login-card {
  max-width: 440px;
}

.login-card .btn {
  margin: 0 8px 8px 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 14px;
  margin: 0 0 20px;
}

.stat {
  margin: 0;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat dd {
  margin: 0;
}

.stat-label {
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.95rem;
}

.stat-value {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.status-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.status-link:hover {
  border-color: var(--brand);
}

.status-count {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.filters {
  display: grid;
  gap: 0 14px;
  padding: 16px 16px 2px;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.order-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-row {
  display: grid;
  gap: 8px 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-row p {
  margin: 0;
}

.order-row-no {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.order-row-no a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.order-row-name {
  font-weight: 600;
}

.order-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.order-total {
  font-weight: 700;
}

@media (min-width: 768px) {
  .order-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .order-side {
    justify-content: flex-end;
    max-width: 460px;
  }
}

.compact .order-row {
  box-shadow: none;
  grid-template-columns: minmax(0, 1fr);
}

.compact .order-side {
  justify-content: flex-start;
}

.plain-list {
  margin: 0;
  padding-left: 1.1rem;
}

.plain-list li {
  padding-block: 4px;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.flow-step {
  counter-increment: step;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.9rem;
}

.flow-step::before {
  content: counter(step) '. ';
}

.flow-step.is-done {
  border-color: var(--ok);
  color: var(--ok);
  background: #effcf3;
}

.flow-step.is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.action-row p {
  margin: 0;
}

.stock-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stock-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stock-row p {
  margin: 0;
}

.stock-name {
  font-weight: 700;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.switch-track {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #8a7770;
  transition: background-color 0.15s ease;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.15s ease;
}

.switch[aria-checked='true'] .switch-track {
  background: #15803d;
}

.switch[aria-checked='true'] .switch-thumb {
  transform: translateX(20px);
}

.switch-label {
  min-width: 5.5em;
}

/* ----- notifikasi singkat ----- */

.toast-region {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 50;
  width: min(480px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: #2b1d1a;
  color: #ffffff;
  box-shadow: 0 10px 30px rgb(43 29 26 / 30%);
  animation: toast-in 0.2s ease-out;
}

@keyframes toast-in {
  /* Hanya geser (tanpa memudar) agar kontras teks selalu penuh. */
  from {
    transform: translateY(12px);
  }

  to {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .product-card:hover {
    transform: none;
  }
}

@media (forced-colors: active) {
  .badge,
  .chip,
  .switch,
  .flow-step {
    border: 1px solid CanvasText;
  }
}
