:root {
  --ink: #1c1b1a;
  --paper: #f4efdf;
  --panel: #fffdf7;
  --line: #d7d0bd;
  --muted: #777164;
  --lime: #c7ef5c;
  --pink: #ef6d96;
  --coral: #f37d5f;
  --blue: #83c5e8;
  --yellow: #f0c74e;
  --green: #68a77b;
  --shadow: 0 14px 40px rgba(54, 47, 29, .08);
  --display: 'Bowlby One', sans-serif;
  --body: 'Manrope', sans-serif;
  --mono: 'DM Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  line-height: 1.45;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E");
}
.app-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 18px 20px;
  background: #22211f;
  color: #f9f5e9;
  display: flex;
  flex-direction: column;
  z-index: 15;
}
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 10px 28px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--lime); border-radius: 50% 50% 46% 54%; transform: rotate(-4deg); }
.brand-mark svg { width: 26px; fill: var(--ink); }
.brand-mark ellipse { fill: var(--lime); transform-box: fill-box; transform-origin: center; transform: rotate(18deg); }
.brand-mark ellipse:last-child { transform: rotate(-18deg); }
.brand-lockup strong { display: block; font-family: var(--display); font-size: .91rem; letter-spacing: .03em; line-height: 1; }
.brand-lockup span { color: #aaa598; font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; }
.primary-nav { display: grid; gap: 5px; }
.nav-link { min-height: 46px; padding: 0 13px; border-radius: 8px; color: #bdb8ac; text-decoration: none; display: flex; align-items: center; gap: 13px; font-size: .88rem; font-weight: 600; transition: background .2s ease, color .2s ease, transform .2s ease; }
.nav-link:hover { color: white; transform: translateX(2px); }
.nav-link.active { background: var(--lime); color: var(--ink); }
.nav-link b { margin-left: auto; min-width: 22px; padding: 2px 6px; color: var(--ink); background: #f8f4e8; border-radius: 999px; text-align: center; font-size: .68rem; }
.nav-icon { width: 19px; text-align: center; font-family: var(--mono); font-size: 1.1rem; }
.sidebar-bottom { margin-top: auto; }
.owner-card { margin-top: 18px; padding: 18px 7px 2px; border-top: 1px solid #3a3935; display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; }
.avatar { width: 38px; aspect-ratio: 1; display: grid; place-items: center; background: var(--pink); color: var(--ink); border-radius: 50%; font-family: var(--mono); font-size: .76rem; font-weight: 500; }
.owner-card strong, .owner-card span { display: block; }
.owner-card strong { font-size: .79rem; }
.owner-card span { color: #8d897f; font-size: .65rem; }
.icon-button { border: 0; background: transparent; cursor: pointer; padding: 7px; border-radius: 8px; }
.icon-button:hover, .icon-button:focus-visible { background: rgba(128, 128, 128, .14); outline: none; }
.dashboard { min-width: 0; padding: 35px clamp(24px, 4vw, 58px) 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; animation: rise .5s ease both; }
.page-heading p, .panel-heading p, .bestseller-copy > p:first-child, .modal-top p { margin: 0 0 4px; color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; font-size: .64rem; font-weight: 500; }
h1, h2 { margin: 0; font-weight: 700; letter-spacing: -.045em; }
h1 { font-size: clamp(2rem, 3.8vw, 3.35rem); }
h2 { font-size: 1.18rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-actions .icon-button { width: 42px; height: 42px; border: 1px solid var(--line); background: rgba(255,255,255,.35); }
.notification-button { position: relative; }
.notification-dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); border: 1px solid var(--paper); }
.primary-button, .dark-button, .secondary-button, .text-button { border: 0; cursor: pointer; font-weight: 700; }
.primary-button { min-height: 44px; padding: 0 17px; color: var(--paper); background: var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--pink); transition: transform .18s ease, box-shadow .18s ease; }
.primary-button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--pink); }
.primary-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pink); }
.primary-button span { margin-right: 4px; }
.menu-toggle { display: none; }
.status-banner { min-height: 52px; margin-bottom: 22px; padding: 0 16px; border: 1px solid #9eaf6b; background: rgba(199, 239, 92, .24); display: flex; align-items: center; justify-content: space-between; gap: 15px; animation: rise .5s .06s ease both; }
.status-copy { display: flex; align-items: center; gap: 10px; font-size: .78rem; }
.status-copy span:last-child { color: #686550; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #73a52e; box-shadow: 0 0 0 4px rgba(115,165,46,.15); }
.status-banner.paused { border-color: #c98d7e; background: rgba(243,125,95,.15); }
.status-banner.paused .live-dot { background: var(--coral); box-shadow: 0 0 0 4px rgba(243,125,95,.15); }
.text-button { padding: 7px 0; background: transparent; border-bottom: 1px solid currentColor; font-size: .72rem; }
.metric-grid { display: grid; grid-template-columns: 1.35fr .9fr .9fr .95fr; gap: 14px; margin-bottom: 14px; }
.metric-card, .panel { border: 1px solid var(--line); background: rgba(255, 253, 247, .72); box-shadow: var(--shadow); }
.metric-card { min-height: 184px; padding: 18px; position: relative; overflow: hidden; animation: rise .5s ease both; }
.metric-card:nth-child(1) { animation-delay: .1s; }
.metric-card:nth-child(2) { animation-delay: .14s; }
.metric-card:nth-child(3) { animation-delay: .18s; }
.metric-card:nth-child(4) { animation-delay: .22s; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .72rem; }
.metric-card > strong { display: block; margin-top: 13px; font-family: var(--display); font-size: clamp(2rem, 3vw, 2.75rem); font-weight: 400; line-height: 1; letter-spacing: -.03em; }
.metric-card > strong span { font-size: .48em; }
.metric-card small { color: var(--muted); font-size: .67rem; }
.metric-card small b { color: #568322; }
.trend { padding: 4px 7px; border-radius: 4px; font-family: var(--mono); font-size: .61rem; }
.trend.up { color: #537b24; background: rgba(199,239,92,.33); }
.spark-chart { height: 48px; margin: 3px -4px 5px; }
.spark-chart svg { width: 100%; height: 100%; overflow: visible; }
.spark-chart .area { fill: rgba(239,109,150,.12); }
.spark-chart .line { fill: none; stroke: var(--pink); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.metric-symbol { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); font-family: var(--mono); }
.metric-symbol.lime { background: var(--lime); }
.metric-symbol.pink { background: var(--pink); }
.metric-symbol.dark { background: var(--ink); color: var(--lime); }
.order-breakdown { display: flex; gap: 12px; margin: 23px 0 13px; color: var(--muted); font-size: .65rem; }
.order-breakdown i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; }
.order-breakdown .prep { background: var(--yellow); }
.order-breakdown .ready { background: var(--green); }
.comparison { height: 5px; margin: 26px 0 15px; background: #ded9cc; border-radius: 99px; }
.comparison span { display: block; width: var(--width); height: 100%; background: var(--blue); border-radius: inherit; }
.accent-card { background: var(--lime); border-color: #a9c84c; transform: rotate(.4deg); }
.accent-card p { margin: 7px 0 18px; font-size: .68rem; }
.streak-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.streak-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .7fr); gap: 14px; }
.panel { padding: 20px; animation: rise .55s .22s ease both; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 690px; border-collapse: collapse; }
th { padding: 0 10px 9px; color: var(--muted); font-family: var(--mono); font-size: .58rem; font-weight: 500; text-align: left; text-transform: uppercase; letter-spacing: .08em; }
td { padding: 13px 10px; border-top: 1px solid #e1dbcb; font-size: .71rem; white-space: nowrap; }
.new-row { animation: rowIn .35s ease both; }
td:nth-child(2) { display: flex; align-items: center; gap: 8px; }
.customer-dot { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 50%; font-family: var(--mono); font-size: .56rem; }
.customer-dot.coral { background: #f2ac98; }.customer-dot.blue { background: #a8d4e9; }.customer-dot.yellow { background: #edd783; }.customer-dot.green { background: #9fc5a9; }
.status-pill { padding: 6px 9px; border: 0; border-radius: 4px; cursor: pointer; font-size: .6rem; font-weight: 700; }
.status-pill.preparing { background: rgba(240,199,78,.27); color: #7b651d; }
.status-pill.ready { background: rgba(104,167,123,.2); color: #3f7550; }
.date-chip { padding: 5px 8px; border: 1px solid var(--line); font-family: var(--mono); font-size: .61rem; }
.timeline { display: grid; }
.timeline-item { position: relative; display: grid; grid-template-columns: 38px 16px 1fr; gap: 8px; min-height: 63px; }
.timeline-item:not(:last-child)::after { content: ''; position: absolute; left: 53px; top: 22px; bottom: -3px; width: 1px; background: var(--line); }
.timeline-item time { padding-top: 1px; color: var(--muted); font-family: var(--mono); font-size: .62rem; }
.timeline-item > span { position: relative; z-index: 1; width: 10px; height: 10px; margin-top: 4px; border: 2px solid var(--paper); border-radius: 50%; background: #b7b1a3; box-shadow: 0 0 0 1px #b7b1a3; }
.timeline-item.current > span { background: var(--pink); box-shadow: 0 0 0 1px var(--pink), 0 0 0 5px rgba(239,109,150,.12); }
.timeline-item strong, .timeline-item small { display: block; }
.timeline-item strong { font-size: .74rem; }
.timeline-item small { margin-top: 3px; color: var(--muted); font-size: .62rem; }
.inventory-list { display: grid; gap: 4px; }
.inventory-item { display: grid; grid-template-columns: 38px minmax(130px, 1fr) minmax(80px, .75fr) 36px; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid #e1dbcb; }
.product-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; font-family: var(--mono); }
.product-icon.butter { background: #f2d982; }.product-icon.berry { background: #f0a3b3; color: #a52f4a; }.product-icon.cup { background: #abd5e7; }
.inventory-item strong, .inventory-item small { display: block; }
.inventory-item strong { font-size: .72rem; }
.inventory-item small { margin-top: 2px; color: var(--muted); font-size: .61rem; }
.stock-meter { height: 5px; background: #e0dbce; border-radius: 99px; overflow: hidden; }
.stock-meter span { display: block; width: var(--stock); height: 100%; background: var(--coral); border-radius: inherit; }
.stock-meter .safe { background: var(--green); }
.low-label, .good-label { font-family: var(--mono); font-size: .57rem; }
.low-label { color: #b74e35; }.good-label { color: #487358; }
.bestseller-panel { padding: 0; display: grid; grid-template-columns: .8fr 1.2fr; overflow: hidden; background: var(--pink); border-color: #c9587c; }
.bestseller-art { min-height: 248px; overflow: hidden; background: var(--ink); clip-path: polygon(0 0, 91% 0, 100% 100%, 0 100%); }
.bestseller-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; filter: saturate(.82) contrast(1.05); transform: scale(1.06); }
.bestseller-copy { padding: 28px 27px 25px 15px; align-self: center; }
.bestseller-copy > p:first-child { color: #5c2939; }
.bestseller-copy h2 { max-width: 280px; font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 400; line-height: 1.04; text-transform: uppercase; }
.bestseller-copy > p { font-size: .7rem; }
.bestseller-stats { display: flex; gap: 24px; margin: 17px 0; font-size: .65rem; }
.bestseller-stats b { display: block; font-family: var(--display); font-size: 1.15rem; font-weight: 400; }
.dark-button { padding: 10px 13px; color: var(--paper); background: var(--ink); font-size: .65rem; }
.order-modal { width: min(520px, calc(100% - 28px)); padding: 0; color: var(--ink); background: var(--panel); border: 1px solid var(--ink); box-shadow: 12px 12px 0 var(--pink); }
.order-modal::backdrop { background: rgba(28,27,26,.58); backdrop-filter: blur(3px); }
.order-modal form { padding: 25px; }
.modal-top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 20px; }
.modal-top h2 { font-size: 1.55rem; }
.modal-top .icon-button { font-size: 1.5rem; line-height: 1; }
.order-modal label { display: grid; gap: 7px; margin-top: 14px; font-size: .69rem; font-weight: 700; }
.order-modal input, .order-modal textarea { width: 100%; padding: 11px 12px; color: var(--ink); background: #f9f5e9; border: 1px solid var(--line); border-radius: 0; outline: none; }
.order-modal input:focus, .order-modal textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(239,109,150,.15); }
.order-modal textarea { min-height: 90px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-error { min-height: 18px; color: #ac402b; font-size: .68rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; }
.secondary-button { padding: 0 15px; background: transparent; border: 1px solid var(--line); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; padding: 13px 16px; color: var(--paper); background: var(--ink); border-left: 4px solid var(--lime); box-shadow: var(--shadow); font-size: .75rem; opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .22s ease, transform .22s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .pickup-panel { grid-row: 2; }
  .bestseller-panel { min-height: 270px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; width: 240px; transform: translateX(-105%); box-shadow: 18px 0 50px rgba(0,0,0,.28); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .dashboard { padding: 22px 16px 45px; }
  .menu-toggle { display: inline-grid; place-items: center; width: 41px; height: 41px; border: 1px solid var(--line); background: rgba(255,255,255,.35); }
  .topbar { align-items: flex-start; }
  .page-heading { margin-right: auto; }
  .page-heading p { display: none; }
  h1 { font-size: 1.7rem; }
  .topbar-actions .notification-button { display: none; }
  .status-copy span:last-child { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 164px; }
  .content-grid { display: block; }
  .panel { margin-bottom: 14px; }
  .bestseller-panel { grid-template-columns: .75fr 1.25fr; }
  .bestseller-art { min-height: 290px; }
  .inventory-item { grid-template-columns: 38px 1fr 42px; }
  .inventory-item .stock-meter { grid-column: 2 / 4; }
  .inventory-item > b { grid-column: 3; grid-row: 1; }
}
@media (max-width: 500px) {
  .primary-button { padding: 0 12px; }
  .topbar-actions .primary-button { font-size: 0; }
  .topbar-actions .primary-button span { margin: 0; font-size: 1.2rem; }
  .status-banner { padding: 0 12px; }
  .status-copy { gap: 7px; }
  .bestseller-panel { display: block; }
  .bestseller-art { height: 190px; min-height: 0; clip-path: polygon(0 0, 100% 0, 100% 89%, 0 100%); }
  .bestseller-copy { padding: 18px 20px 23px; }
  .form-row { grid-template-columns: 1fr; }
}
