:root {
  --ink: #172822;
  --ink-soft: #2b3e37;
  --paper: #f4f0e6;
  --paper-deep: #e9e1d2;
  --cream: #fffdf7;
  --lime: #d7ef67;
  --coral: #f36f55;
  --blue: #8abbd0;
  --green: #477a60;
  --muted: #6f776f;
  --line: rgba(23, 40, 34, .14);
  --shadow: 0 20px 50px rgba(27, 39, 32, .09);
  --radius: 20px;
  --font-body: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --font-number: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; font-family: var(--font-body); background: radial-gradient(circle at 85% 5%, rgba(215,239,103,.22), transparent 25%), var(--paper); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: rgba(71,122,96,.12); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(71,122,96,.4); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 200; left: 12px; top: 10px; padding: 10px 14px; border-radius: 10px; color: #fff; background: var(--ink); transform: translateY(-160%); transition: transform .16s ease; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.paper-grain { position: fixed; inset: 0; pointer-events: none; opacity: .22; z-index: 99; 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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E"); }
.side-rail { position: fixed; inset: 0 auto 0 0; width: 240px; padding: 32px 22px; color: #f8f3e8; background: var(--ink); display: flex; flex-direction: column; z-index: 20; }
.brand-mark { display: flex; align-items: center; gap: 13px; margin-bottom: 54px; }
.brand-seal { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; color: var(--lime); font: 700 24px Georgia, "Songti SC", serif; }
.brand-mark strong { display: block; font: 700 22px Georgia, "Songti SC", serif; letter-spacing: .12em; }
.brand-mark small { display: block; margin-top: 3px; color: rgba(255,255,255,.5); font-size: 11px; letter-spacing: .14em; }
.side-nav { display: grid; gap: 6px; }
.side-nav a { padding: 13px 15px; border-radius: 12px; color: rgba(255,255,255,.7); font-size: 14px; transition: color .2s ease, background-color .2s ease, transform .2s ease; }
.side-nav a:hover { color: var(--ink); background: var(--lime); transform: translateX(4px); }
.rail-foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; color: rgba(255,255,255,.6); font-size: 13px; }
.text-button { border: 0; padding: 0; color: var(--lime); background: transparent; cursor: pointer; }

.app-shell { width: min(1240px, calc(100% - 300px)); margin-left: 270px; padding: 58px 0 80px; }
.auth-shell { width: 100%; margin: 0; min-height: 100vh; padding: 30px; display: grid; place-items: center; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin: 0 0 30px; animation: rise .5s both; }
.hero-head { min-height: 95px; }
.page-head h1 { margin: 5px 0 0; max-width: 720px; font: 600 clamp(30px, 4vw, 52px)/1.12 var(--font-display); letter-spacing: -.025em; text-wrap: balance; }
.page-head .muted { margin: 10px 0 0; }
.eyebrow { margin: 0; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.muted { color: var(--muted); }

.button { min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 999px; appearance: none; display: inline-flex; justify-content: center; align-items: center; gap: 7px; font-weight: 700; line-height: 1.15; white-space: nowrap; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--ink); background: var(--lime); box-shadow: 0 8px 0 rgba(23,40,34,.13); }
.button-quiet { border-color: var(--line); background: rgba(255,255,255,.4); }
.button-block { width: 100%; }

.metric-grid { display: grid; grid-template-columns: 1.15fr 1fr .9fr; gap: 16px; margin-bottom: 18px; }
.metric-card { min-height: 160px; padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow); animation: rise .5s both; }
.metric-card:nth-child(2) { animation-delay: .08s; }.metric-card:nth-child(3) { animation-delay: .16s; }
.metric-card.ink { color: #fff; background: var(--ink); }
.metric-card.lime { background: var(--lime); }
.metric-card.paper { border: 1px solid var(--line); background: rgba(255,253,247,.7); }
.metric-card > span, .metric-card > small { display: block; opacity: .66; font-size: 12px; }
.metric-card strong { display: block; margin: 22px 0 10px; font: 700 clamp(30px, 4vw, 44px) Georgia, serif; }
.metric-card em { font: 600 14px "Noto Sans SC", sans-serif; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 18px; }
.quick-actions a { padding: 16px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,247,.65); transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.quick-actions a:hover { transform: translateY(-3px); background: var(--cream); box-shadow: var(--shadow); }
.action-icon { grid-row: 1 / 3; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; font: 800 17px Georgia, serif; }
.action-icon.coral { background: #ffd2c8; }.action-icon.green { background: #cae4d2; }.action-icon.blue { background: #c8e1eb; }
.quick-actions b { align-self: end; font-size: 14px; }.quick-actions small { color: var(--muted); font-size: 11px; }

.content-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.panel { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,253,247,.76); box-shadow: 0 10px 36px rgba(27,39,32,.04); }
.panel-head { margin-bottom: 20px; display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.panel-head h2, .compact-form h2 { margin: 3px 0 0; font: 600 24px/1.25 var(--font-display); }
.panel-head > a { color: var(--green); font-size: 13px; font-weight: 700; }
.stock-strip { display: grid; grid-template-columns: repeat(5, minmax(70px, 1fr)); gap: 10px; }
.stock-token { min-height: 104px; padding: 15px 10px 11px; border-radius: 14px; background: var(--paper); text-align: center; }
.stock-token.low { background: #ffe0d8; }
.stock-token span, .stock-token small { display: block; font-size: 11px; }.stock-token strong { display: block; margin: 9px 0 1px; font: 700 30px Georgia, serif; }

.record-list { display: grid; }.record-list.roomy .record-row { padding-block: 17px; }
.record-row { min-width: 0; padding: 12px 0; border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; }
.record-row:last-child { border-bottom: 0; }.record-row > span { min-width: 0; }.record-row b, .record-row small { display: block; }.record-row small { margin-top: 3px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.record-row > strong { text-align: right; font: 700 15px Georgia, serif; }
.record-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-weight: 800; }.record-mark.in { color: var(--ink); background: var(--lime); }.record-mark.event { color: var(--ink); background: var(--blue); }
.empty { padding: 35px 10px; color: var(--muted); text-align: center; }

.inventory-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.inventory-card { position: relative; min-height: 155px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--cream); display: flex; align-items: flex-end; justify-content: space-between; overflow: hidden; }
.inventory-card::after { content: ""; position: absolute; width: 100px; height: 100px; border: 18px solid var(--paper); border-radius: 50%; right: -45px; top: -50px; }
.inventory-card.is-low { background: #fff1eb; border-color: rgba(243,111,85,.35); }
.brand-pill { display: inline-block; padding: 4px 8px; border-radius: 999px; color: var(--green); background: #e2eadf; font-size: 10px; font-weight: 800; }.inventory-card h2 { margin: 12px 0 5px; font: 700 24px Georgia, "Songti SC", serif; }.inventory-card small { color: var(--muted); }.inventory-number { display: flex; align-items: baseline; gap: 4px; }.inventory-number strong { font: 700 48px Georgia, serif; }.inventory-number span { color: var(--muted); font-size: 12px; }.low-flag { position: absolute; right: 0; top: 0; padding: 6px 13px; color: #8e3624; background: #ffd4ca; border-radius: 0 0 0 12px; font-size: 10px; font-weight: 800; }

.entry-layout { display: grid; gap: 16px; padding-bottom: 85px; }
.form-panel { padding: 22px 25px; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }.field-grid.compact { margin-top: 18px; }.field.wide { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }.field > span { display: flex; justify-content: space-between; }.field small { font-weight: 500; }
.form-control, .field input, .field select, .login-form input { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: rgba(255,255,255,.75); outline: none; transition: border .15s, box-shadow .15s; }
.form-control:focus, .field input:focus, .field select:focus, .login-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(71,122,96,.12); }
.check-field { display: flex; align-items: center; gap: 8px; font-size: 13px; }.check-field input { width: 18px; height: 18px; accent-color: var(--green); }
.more-fields { border-top: 1px dashed var(--line); margin-top: 18px; padding-top: 15px; }.more-fields summary { color: var(--green); cursor: pointer; font-size: 13px; font-weight: 800; }
.form-error, .errorlist { margin: 0 0 16px; padding: 11px 13px; border-radius: 10px; color: #8e3624; background: #ffe0d8; list-style: none; font-size: 13px; }
.live-total { color: var(--muted); font-size: 12px; }.live-total b { color: var(--ink); font: 700 20px Georgia, serif; }
.product-entry-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.product-entry { min-height: 66px; padding: 10px 10px 10px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); display: flex; align-items: center; justify-content: space-between; gap: 10px; }.product-entry span b, .product-entry span small { display: block; }.product-entry small { margin-top: 3px; color: var(--muted); font-size: 10px; }.product-entry input { width: 55px; height: 44px; border: 0; border-radius: 10px; background: #fff; text-align: center; font: 700 18px Georgia, serif; }
.sale-product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }.sale-product { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }.sale-product.sold-out { opacity: .55; }.sale-product-top { display: flex; justify-content: space-between; align-items: center; }.sale-product-top span b, .sale-product-top span small { display: block; }.sale-product-top small { margin-top: 3px; color: var(--muted); font-size: 10px; }.sale-product-top > input { width: 55px; height: 44px; border: 0; border-radius: 10px; background: #fff; text-align: center; font: 700 18px Georgia, serif; }.price-line { margin-top: 11px; padding-top: 9px; border-top: 1px dashed var(--line); display: flex; align-items: center; color: var(--muted); font-size: 11px; }.price-line span { margin-left: auto; }.price-line input { width: 64px; padding: 0 3px; border: 0; color: var(--ink); background: transparent; font-weight: 800; text-align: right; outline: none; }
.sticky-submit { position: fixed; z-index: 15; bottom: 20px; left: calc(270px + (100vw - 270px - min(1240px, calc(100vw - 300px))) / 2); width: min(1240px, calc(100% - 300px)); padding: 12px 12px 12px 20px; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; color: #fff; background: rgba(23,40,34,.95); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: space-between; box-shadow: 0 16px 45px rgba(23,40,34,.28); }.sticky-submit b { color: var(--lime); }.sticky-submit i { font-style: normal; }

.compact-form { max-width: 700px; margin: 0 auto; display: grid; gap: 18px; }.compact-form .featured select { min-height: 56px; font-weight: 800; }.help { color: var(--muted); font-size: 10px; }
.receipt { max-width: 720px; margin: 0 auto; padding: 35px; border: 1px solid var(--line); border-radius: 4px 4px 24px 24px; background: var(--cream); box-shadow: var(--shadow); }.receipt::after { content: "······························"; display: block; margin-top: 25px; color: var(--paper-deep); letter-spacing: .3em; overflow: hidden; white-space: nowrap; }.receipt-total { padding-bottom: 25px; border-bottom: 2px solid var(--ink); }.receipt-total span, .receipt-total small { display: block; color: var(--muted); }.receipt-total strong { display: block; margin: 8px 0; font: 700 46px Georgia, serif; }.receipt-lines { padding: 20px 0; border-bottom: 1px dashed var(--line); }.receipt-lines > div, .receipt-meta > div { padding: 8px 0; display: flex; justify-content: space-between; gap: 20px; }.receipt-lines small { color: var(--muted); }.receipt-meta { margin: 15px 0 25px; }.receipt-meta dt { color: var(--muted); }.receipt-meta dd { margin: 0; text-align: right; }
.table-panel { padding-block: 10px; }
.customers-layout { grid-template-columns: .65fr 1.35fr; }.customer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }.customer-grid article { padding: 13px; border-radius: 12px; background: var(--paper); display: flex; align-items: center; gap: 11px; }.customer-grid article > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--green); font-weight: 800; }.customer-grid b, .customer-grid small { display: block; }.customer-grid small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.analysis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }.analysis-card { padding: 24px; border-radius: 18px; color: #fff; background: var(--ink); }.analysis-card:nth-child(2) { color: var(--ink); background: var(--lime); }.analysis-card:nth-child(3) { color: var(--ink); background: var(--blue); }.analysis-card > span { opacity: .65; font-size: 12px; }.analysis-card > strong { display: block; margin: 12px 0 20px; font: 700 34px Georgia, serif; }.analysis-card dl { margin: 0; font-size: 11px; }.analysis-card dl div { display: flex; justify-content: space-between; margin-top: 5px; }.analysis-card dt { opacity: .6; }.analysis-card dd { margin: 0; font-weight: 800; }.bar-list > div { padding: 10px 0; display: grid; grid-template-columns: 80px 1fr 55px; gap: 10px; align-items: center; font-size: 12px; }.bar-list i { height: 8px; width: min(100%, calc(var(--value) * 12%)); min-width: 4px; border-radius: 9px; background: var(--coral); }.bar-list b { text-align: right; }.insight-panel { position: relative; overflow: hidden; color: #fff; background: var(--green); }.insight-panel p { color: rgba(255,255,255,.7); line-height: 1.8; }.insight-panel code { display: inline-block; padding: 8px 10px; border-radius: 8px; color: var(--lime); background: rgba(0,0,0,.16); }.insight-stamp { position: absolute; right: 18px; top: 18px; width: 50px; height: 50px; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; display: grid; place-items: center; transform: rotate(10deg); font: 700 18px Georgia, serif; }

.login-card { width: min(430px, 100%); padding: 38px; border-radius: 4px 4px 28px 28px; background: var(--cream); box-shadow: 0 30px 80px rgba(23,40,34,.16); }.login-emblem { float: right; width: 58px; height: 58px; display: grid; place-items: center; border: 2px solid var(--coral); border-radius: 50%; color: var(--coral); font: 700 28px Georgia, "Songti SC", serif; transform: rotate(7deg); }.login-card h1 { clear: both; margin: 35px 0 12px; font: 700 39px/1.2 Georgia, "Songti SC", serif; }.stack-form { display: grid; gap: 15px; }.login-form { margin-top: 30px; }.login-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.toast-stack { position: fixed; z-index: 100; right: 25px; top: 20px; }.toast { padding: 13px 17px; border-radius: 12px; color: #fff; background: var(--green); box-shadow: var(--shadow); animation: toast-in .35s both; }
.bottom-nav { display: none; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 980px) {
  .side-rail { display: none; }.app-shell { width: 100%; margin: 0; padding: 30px 24px 105px; }.content-grid { grid-template-columns: 1fr; }.sticky-submit { left: 18px; bottom: 78px; width: calc(100% - 36px); }.bottom-nav { position: fixed; z-index: 30; inset: auto 0 0; height: 68px; padding: 5px max(10px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.62); background: var(--ink); display: grid; grid-template-columns: repeat(4, 1fr); }.bottom-nav a { display: grid; place-items: center; align-content: center; gap: 2px; font-size: 10px; }.bottom-nav span { font-size: 20px; line-height: 1; }.bottom-nav .nav-primary span { width: 34px; height: 30px; border-radius: 11px; color: var(--ink); background: var(--lime); }.desktop-only { display: none; }
}

@media (max-width: 650px) {
  .app-shell { padding: 24px 15px 110px; }.auth-shell { padding: 15px; }.page-head { align-items: flex-start; }.page-head h1 { font-size: 34px; }.metric-grid { grid-template-columns: repeat(2, 1fr); }.metric-card { min-height: 136px; padding: 18px; }.metric-card:nth-child(3) { grid-column: 1 / -1; min-height: 110px; }.metric-card strong { margin: 18px 0 7px; font-size: 31px; }.quick-actions { grid-template-columns: 1fr; }.quick-actions a { padding: 12px 15px; }.stock-strip { grid-template-columns: repeat(5, 83px); overflow-x: auto; padding-bottom: 6px; }.panel { padding: 19px 16px; }.inventory-board { grid-template-columns: repeat(2, 1fr); gap: 10px; }.inventory-card { min-height: 135px; padding: 16px; display: block; }.inventory-card h2 { font-size: 20px; }.inventory-number { margin-top: 15px; }.inventory-number strong { font-size: 38px; }.field-grid { grid-template-columns: 1fr; gap: 12px; }.product-entry-grid, .sale-product-grid { grid-template-columns: 1fr; }.sticky-submit { padding: 9px 9px 9px 15px; border-radius: 15px; }.receipt { padding: 24px 20px; }.receipt-total strong { font-size: 38px; }.analysis-grid { grid-template-columns: 1fr; }.analysis-card { padding: 20px; }.customers-layout { grid-template-columns: 1fr; }.customer-grid { grid-template-columns: 1fr; }.login-card { padding: 30px 24px; }.toast-stack { left: 15px; right: 15px; top: 12px; }.toast { text-align: center; }
}

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

/* Traceable adjustments, catalog management and full inventory count */
.button-danger { color: #8e3624; border-color: rgba(243,111,85,.35); background: #ffd4ca; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.revision-reason { border-color: rgba(243,111,85,.35); background: #fff8df; }.revision-reason p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.sale-actions { display: flex; flex-wrap: wrap; gap: 9px; }.sale-actions .button { flex: 1 1 150px; }
.void-banner { max-width: 720px; margin: 0 auto 14px; padding: 14px 18px; border-radius: 14px; color: #8e3624; background: #ffd4ca; display: flex; justify-content: space-between; gap: 12px; }.void-banner span { font-size: 11px; }.voided-receipt, .voided-row { opacity: .6; }.voided-row .record-mark { background: var(--coral); }
.revision-history { max-width: 720px; margin: 18px auto 0; }.revision-history article { padding: 12px 0; border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: 42px 1fr; gap: 10px; }.revision-history article > span { color: var(--coral); font: 700 18px Georgia, serif; }.revision-history b, .revision-history small { display: block; }.revision-history small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.return-check { display: grid; gap: 16px; }.refund-compare { padding: 17px; border-radius: 14px; color: #fff; background: var(--green); }.refund-compare span, .refund-compare small, .refund-compare strong { display: block; }.refund-compare strong { margin: 6px 0; font: 700 30px Georgia, serif; }.refund-compare i { font-style: normal; }.refund-compare small { color: rgba(255,255,255,.65); }
.product-admin-layout { grid-template-columns: .7fr 1.3fr; align-items: start; }.management-list { display: grid; }.management-list article { padding: 13px 0; border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; }.management-list b, .management-list small { display: block; }.management-list small { margin-top: 4px; color: var(--muted); font-size: 10px; }.mini-button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); cursor: pointer; font-size: 10px; font-weight: 800; }.mini-button.danger { color: #8e3624; }.brand-admin { margin-top: 18px; }.brand-admin summary { cursor: pointer; list-style: none; }.brand-admin summary span b, .brand-admin summary span small { display: block; }.brand-admin summary span small { margin-top: 4px; color: var(--muted); }.brand-admin-body { margin-top: 20px; }.inline-create { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 15px; }
.count-toolbar { position: sticky; top: 8px; z-index: 8; margin-bottom: 15px; padding: 8px; border-radius: 16px; background: rgba(255,253,247,.94); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }.count-toolbar > span { color: var(--muted); font-size: 11px; }.count-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }.count-grid article { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); display: grid; grid-template-columns: 1fr 142px 44px; align-items: center; gap: 8px; }.count-grid article.has-difference { border-color: var(--coral); background: #fff0eb; }.count-grid article > div:first-child small, .count-grid article > div:first-child b, .count-grid article > div:first-child span { display: block; }.count-grid article > div:first-child small { color: var(--muted); font-size: 9px; }.count-grid article > div:first-child b { margin: 3px 0; }.count-grid article > div:first-child span { color: var(--muted); font-size: 10px; }.count-grid article > em { color: var(--green); text-align: right; font-style: normal; font-weight: 800; }.count-grid article.has-difference > em { color: var(--coral); }.count-result-list article { padding: 13px; border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: 1fr repeat(3, 90px); gap: 10px; }.count-result-list article.has-difference { background: #fff0eb; }.count-result-list b, .count-result-list small { display: block; }.count-result-list small { color: var(--muted); font-size: 9px; }.settings-stack { max-width: 780px; display: grid; gap: 15px; }

@media (max-width: 650px) {
  .head-actions { width: 100%; justify-content: flex-start; }.head-actions .button { min-height: 40px; padding-inline: 13px; font-size: 11px; }
  .product-admin-layout { grid-template-columns: 1fr; }.management-list article { grid-template-columns: 1fr auto; }.management-list article form { grid-column: 1 / -1; }.management-list article form button { width: 100%; }
  .count-toolbar { grid-template-columns: 1fr; }.count-grid { grid-template-columns: 1fr; }.count-grid article { grid-template-columns: 1fr 142px 38px; }.count-result-list article { grid-template-columns: repeat(3, 1fr); }.count-result-list article > span:first-child { grid-column: 1 / -1; }
  .void-banner { display: grid; }.sale-actions { display: grid; }.sale-actions .button { width: 100%; }
}

/* Dense-catalog controls: designed for dozens of flavors on a phone. */
[hidden] { display: none !important; }
.customer-picker-head { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.text-action { padding: 5px 0; border: 0; color: var(--green); background: transparent; font-weight: 800; cursor: pointer; }
.catalog-title { margin-bottom: 14px; }
.catalog-tools { position: sticky; top: 8px; z-index: 8; margin: 0 -8px 18px; padding: 8px; border-radius: 18px; background: rgba(255,253,247,.93); backdrop-filter: blur(14px); }
.catalog-search { min-height: 52px; padding: 0 10px 0 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 22px rgba(23,40,34,.06); }
.catalog-search > span { color: var(--green); font: 700 25px Georgia, serif; transform: rotate(-12deg); }
.catalog-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 15px; }
.catalog-search button { width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--muted); background: var(--paper); cursor: pointer; }
.filter-row { margin-top: 9px; display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.8); font-size: 11px; font-weight: 800; cursor: pointer; }
.filter-chip.is-active { border-color: var(--ink); color: #fff; background: var(--ink); }
.filter-chip i { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--ink); background: var(--lime); font-style: normal; }
.compact-filters { padding-top: 2px; border-top: 1px dashed var(--line); }
.catalog-empty { padding: 45px 15px; text-align: center; color: var(--muted); }.catalog-empty strong, .catalog-empty span { display: block; }.catalog-empty strong { margin-bottom: 6px; color: var(--ink); font: 700 21px Georgia, "Songti SC", serif; }
.inventory-tools { max-width: 760px; margin: 0 0 18px; }

.sale-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sale-product { min-width: 0; padding: 13px; transition: border .18s, background .18s, transform .18s; }
.sale-product.is-selected { border-color: var(--green); background: #eef3df; box-shadow: inset 0 0 0 1px var(--green); }
.sale-product.sold-out { opacity: .48; }
.sale-product-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sale-product-heading span small, .sale-product-heading span b { display: block; }.sale-product-heading span small { margin-bottom: 3px; color: var(--muted); font-size: 9px; }.sale-product-heading span b { font: 700 17px Georgia, "Songti SC", serif; }
.stock-badge { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: var(--green); background: rgba(71,122,96,.1); font-size: 10px; font-style: normal; font-weight: 800; }
.quantity-stepper { width: 100%; height: 44px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; overflow: hidden; }
.quantity-stepper button { align-self: stretch; border: 0; color: var(--ink); background: var(--paper); font-size: 20px; font-weight: 800; cursor: pointer; }.quantity-stepper button:disabled { opacity: .25; cursor: not-allowed; }.quantity-stepper button:active:not(:disabled) { background: var(--lime); }
.quantity-stepper input, .standalone-stepper input.form-control { width: 100%; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: #fff; text-align: center; font: 700 18px Georgia, serif; appearance: textfield; }.quantity-stepper input::-webkit-inner-spin-button { appearance: none; }
.sale-product .price-line { margin-top: 10px; }.sale-product:not(.is-selected) .price-line { display: none; }
.product-entry { min-width: 0; }.product-entry > span small, .product-entry > span b { display: block; }.product-entry > span b { margin-top: 3px; font: 700 17px Georgia, "Songti SC", serif; }
.compact-stepper { flex: 0 0 142px; margin-top: 0; }
.standalone-stepper { max-width: 220px; margin-top: 0; }.standalone-stepper input.form-control { box-shadow: none; }

.quick-dialog { width: min(460px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: transparent; box-shadow: 0 30px 90px rgba(23,40,34,.35); }.quick-dialog::backdrop { background: rgba(16,29,24,.6); backdrop-filter: blur(5px); }.dialog-card { padding: 27px; border-radius: 24px; background: var(--cream); display: grid; gap: 16px; }.dialog-head { display: flex; justify-content: space-between; align-items: start; }.dialog-head h2 { margin: 4px 0 0; font: 700 29px Georgia, "Songti SC", serif; }.dialog-head button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--paper); cursor: pointer; font-size: 20px; }.dialog-error { padding: 10px 12px; border-radius: 9px; color: #8e3624; background: #ffe0d8; font-size: 12px; }

.more-menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }.more-menu-grid > a { min-height: 112px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--cream); display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; transition: .18s ease; }.more-menu-grid > a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }.more-menu-grid h2 { margin: 0 0 5px; font: 700 20px Georgia, "Songti SC", serif; }.more-menu-grid p { margin: 0; color: var(--muted); font-size: 11px; }.more-menu-grid > a > b { color: var(--green); }.menu-symbol { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font: 700 18px Georgia, serif; }.menu-symbol.coral { background: #ffd2c8; }.menu-symbol.green { background: #cae4d2; }.menu-symbol.blue { background: #c8e1eb; }.menu-symbol.lime { background: var(--lime); }.menu-symbol.paper { background: var(--paper); }.menu-symbol.ink { color: #fff; background: var(--ink); }

/* Business intelligence: a compact editorial ledger, not a generic dashboard. */
.analytics-head { align-items: center; }.week-pulse { min-width: 210px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,247,.7); }.week-pulse span, .week-pulse small { display: block; color: var(--muted); font-size: 10px; }.week-pulse strong { display: block; margin: 5px 0; font: 700 25px Georgia, serif; }.week-pulse small { color: var(--green); font-weight: 800; }.week-pulse small.down { color: var(--coral); }
.command-metrics { display: grid; grid-template-columns: 1.25fr 1.1fr 1fr 1fr; gap: 12px; margin-bottom: 34px; }.command-card { min-height: 145px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--cream); }.command-card.revenue { color: #fff; background: var(--ink); }.command-card.profit { background: var(--lime); }.command-card > span, .command-card > small { display: block; opacity: .65; font-size: 10px; }.command-card strong { display: block; margin: 21px 0 8px; font: 700 clamp(27px, 3vw, 39px) Georgia, serif; }
.decision-section { margin-bottom: 34px; }.section-title { margin-bottom: 15px; display: flex; justify-content: space-between; align-items: end; }.section-title h2 { margin: 3px 0 0; font: 700 29px Georgia, "Songti SC", serif; }.section-title > span { color: var(--muted); font-size: 11px; }
.recommendation-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }.recommendation { min-height: 145px; padding: 21px; border: 1px solid var(--line); border-radius: 18px; background: var(--cream); display: grid; grid-template-columns: 42px 1fr; gap: 13px; }.recommendation.danger { border-color: rgba(243,111,85,.4); background: #fff0eb; }.recommendation.warning { background: #fff8df; }.recommendation.good { background: #edf3dc; }.recommendation-index { color: var(--coral); font: italic 700 22px Georgia, serif; }.recommendation h3 { margin: 0 0 7px; font: 700 19px Georgia, "Songti SC", serif; }.recommendation p { margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.65; }.recommendation a { color: var(--green); font-size: 11px; font-weight: 800; }
.analytics-split { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; margin-bottom: 16px; }.chart-legend { color: var(--muted); font-size: 10px; }.chart-legend i { width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--coral); display: inline-block; }
.daily-chart { height: 225px; padding-top: 25px; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px; align-items: stretch; }.daily-column { min-width: 0; display: grid; grid-template-rows: 25px 1fr 20px; align-items: end; text-align: center; }.daily-column > span { color: var(--muted); font-size: 8px; opacity: 0; transition: opacity .15s; }.daily-column:hover > span { opacity: 1; }.daily-column > i { width: min(24px, 70%); height: max(3px, var(--bar-height)); margin: 0 auto; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, var(--coral), #f6a28e); transition: height .35s ease; }.daily-column > small { padding-top: 5px; color: var(--muted); font-size: 8px; }
.money-waterfall { margin: 0; }.money-waterfall > div { padding: 9px 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }.money-waterfall dt small { color: var(--muted); }.money-waterfall dd { margin: 0; font-family: Georgia, serif; font-weight: 700; }.money-waterfall .positive dd { color: var(--green); }.money-waterfall .waterfall-total { margin-top: 8px; padding: 13px; border: 0; border-radius: 11px; color: #fff; background: var(--ink); font-size: 14px; }
.product-intelligence { margin-bottom: 16px; }.responsive-table { overflow-x: auto; }.responsive-table table { width: 100%; border-collapse: collapse; font-size: 12px; }.responsive-table th { padding: 11px 9px; border-bottom: 2px solid var(--ink); color: var(--muted); text-align: left; font-size: 9px; letter-spacing: .06em; }.responsive-table td { padding: 14px 9px; border-bottom: 1px dashed var(--line); white-space: nowrap; }.responsive-table td:first-child b, .responsive-table td:first-child small, .responsive-table td:nth-child(5) small { display: block; }.responsive-table td small { margin-top: 3px; color: var(--muted); font-size: 9px; }.status-pill { padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }.status-pill.danger { color: #8e3624; background: #ffd4ca; }.status-pill.warning { color: #755a05; background: #f8e7a2; }.status-pill.good { color: #315b44; background: #d7eadb; }.status-pill.muted { color: var(--muted); background: var(--paper); }
.lower-analysis { grid-template-columns: 1.15fr .85fr; }.customer-ranking { display: grid; }.customer-ranking article { padding: 12px 0; border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: 33px 1fr auto; gap: 10px; align-items: center; }.rank-number { color: var(--coral); font: italic 700 16px Georgia, serif; }.customer-ranking b, .customer-ranking small { display: block; }.customer-ranking small { margin-top: 3px; color: var(--muted); font-size: 9px; }.rank-money { text-align: right; }.rank-money strong { font: 700 15px Georgia, serif; }
.capital-panel { color: #fff; background: var(--green); }.capital-panel .eyebrow, .capital-panel .muted { color: var(--lime); }.capital-number { padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.18); }.capital-number strong, .capital-number span { display: block; }.capital-number strong { font: 700 38px Georgia, serif; }.capital-number span { margin-top: 4px; color: rgba(255,255,255,.6); font-size: 10px; }.capital-age { padding: 17px 0; display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }.capital-panel p { margin: 5px 0 0; color: rgba(255,255,255,.68); font-size: 11px; line-height: 1.7; }.analysis-note { margin: 22px 0 0; color: var(--muted); text-align: center; font-size: 10px; }

@media (max-width: 1100px) {
  .sale-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .command-metrics { grid-template-columns: repeat(2, 1fr); }
  .analytics-split { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .catalog-tools { top: -1px; margin-inline: -7px; padding: 7px; }
  .sale-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sale-product { padding: 11px; }.sale-product-heading span b { font-size: 16px; }.quantity-stepper { grid-template-columns: 38px 1fr 38px; }
  .product-entry { display: grid; grid-template-columns: 1fr 142px; }
  .quick-dialog { margin-bottom: max(15px, env(safe-area-inset-bottom)); }
  .dialog-card { padding: 23px 19px; }
  .more-menu-grid { grid-template-columns: 1fr; }.more-menu-grid > a { min-height: 90px; }
  .analytics-head { display: grid; }.week-pulse { width: 100%; }
  .command-metrics { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 27px; }.command-card { min-height: 125px; padding: 16px; }.command-card strong { margin: 18px 0 7px; font-size: 25px; }
  .section-title { align-items: start; }.section-title > span { max-width: 130px; text-align: right; }
  .recommendation-grid { grid-template-columns: 1fr; }.recommendation { min-height: 125px; padding: 17px; }
  .daily-chart { height: 190px; gap: 3px; }.daily-column > span { display: none; }.daily-column > i { width: 75%; }
  .product-intelligence { padding-inline: 14px; }.product-intelligence .panel-head { display: block; }.product-intelligence .panel-head > span { display: block; margin-top: 7px; font-size: 9px; }
  .responsive-table { overflow: visible; }.responsive-table table, .responsive-table tbody { display: block; }.responsive-table thead { display: none; }.responsive-table tr { margin-bottom: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }.responsive-table td { min-width: 0; padding: 0; border: 0; white-space: normal; display: grid; gap: 3px; }.responsive-table td::before { content: attr(data-label); color: var(--muted); font-size: 8px; font-weight: 700; }.responsive-table td:first-child { grid-column: 1 / -1; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }.responsive-table td:first-child::before { display: none; }
  .lower-analysis { grid-template-columns: 1fr; }.capital-age { display: grid; }
}

/* Mobile interface coherence: one hierarchy for titles, actions and management rows. */
.metric-link { min-width: 0; display: block; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.metric-link:hover { transform: translateY(-3px); box-shadow: 0 25px 55px rgba(27,39,32,.16); }
.metric-link small { display: flex; justify-content: space-between; gap: 10px; }
.metric-link small i { font-style: normal; font-weight: 700; opacity: .75; }
.more-sections { display: grid; gap: 30px; }
.more-section { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; align-items: start; }
.more-section-head { position: sticky; top: 18px; display: flex; gap: 13px; align-items: flex-start; }
.more-section-head > span { color: var(--paper-deep); font: italic 700 32px var(--font-number); }
.more-section-head h2 { margin: 4px 0 0; font: 600 20px/1.3 var(--font-display); }
.more-section .more-menu-grid > a { min-height: 94px; padding: 16px 18px; grid-template-columns: 42px minmax(0, 1fr) auto; }
.more-section .menu-symbol { width: 42px; height: 42px; border: 0; border-radius: 13px; color: #234b38; background: linear-gradient(145deg, #dff1d5, #b9dfc7); box-shadow: inset 0 0 0 1px rgba(35,75,56,.08); font-family: var(--font-display); font-size: 16px; }
.more-section:nth-child(2) .menu-symbol { color: #244957; background: linear-gradient(145deg, #dceff2, #b8dbe5); box-shadow: inset 0 0 0 1px rgba(36,73,87,.08); }
.more-section:nth-child(3) .menu-symbol { color: #755132; background: linear-gradient(145deg, #fae9cd, #ecd0a9); box-shadow: inset 0 0 0 1px rgba(117,81,50,.08); }
.more-section .more-menu-grid h2 { font-weight: 600; }
.more-section .more-menu-grid > a > b { color: var(--muted); font-size: 16px; }
.price-edit-form label { min-height: 36px; padding-left: 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; }
.price-edit-form input { width: 44px; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-weight: 700; text-align: center; }
.price-edit-form .mini-button { min-height: 34px !important; border-color: transparent !important; border-left-color: var(--line) !important; border-radius: 0 999px 999px 0 !important; }
.sync-price-option { grid-column: 1 / -1; padding: 15px; border: 1px solid rgba(71,122,96,.22); border-radius: 14px; background: #edf3dc; align-items: flex-start; }
.sync-price-option span b, .sync-price-option span small { display: block; }
.sync-price-option span small { margin-top: 4px; color: var(--muted); font-weight: 500; }
.hero-head { position: relative; isolation: isolate; min-height: 285px; overflow: hidden; padding: 34px 38px 30px; border: 1px solid rgba(71,122,96,.1); border-radius: 32px 32px 22px 22px; background: linear-gradient(116deg, #fffdf7 0%, #fffbee 58%, #f8f5df 100%); box-shadow: 0 18px 45px rgba(23,40,34,.08); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "copy art" "actions date"; align-items: end; gap: 20px 28px; }
.hero-head::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(circle at 17% 12%, rgba(255,255,255,.85), transparent 27%), repeating-linear-gradient(90deg, rgba(23,40,34,.012) 0 1px, transparent 1px 4px); opacity: .8; pointer-events: none; }
.hero-copy { grid-area: copy; position: relative; z-index: 2; min-width: 0; align-self: start; }
.hero-copy .eyebrow { padding-bottom: 10px; color: #64766e; font-size: 12px; font-weight: 600; letter-spacing: .12em; }
.hero-copy .eyebrow::after { content: ""; width: 18px; height: 2px; margin-top: 8px; border-radius: 2px; background: #a9c95a; display: block; }
.hero-copy h1 { margin-top: 4px; font-size: clamp(42px, 4.6vw, 64px); line-height: 1.28; }
.hero-copy h1 > span { display: block; white-space: nowrap; }
.hero-period { color: #abc952; }
.hero-actions { grid-area: actions; position: relative; z-index: 2; justify-content: flex-start; }
.hero-actions .button { min-height: 46px; box-shadow: 0 7px 13px rgba(23,40,34,.09); }
.hero-actions .button-quiet { background: rgba(255,253,247,.86); }
.today-stamp { grid-area: date; position: relative; z-index: 2; min-height: 42px; padding: 0 15px; border: 1px solid rgba(71,122,96,.13); border-radius: 13px; color: #356449; background: rgba(255,253,247,.86); box-shadow: 0 7px 16px rgba(23,40,34,.08); display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.today-stamp svg { width: 15px; height: 15px; fill: none; stroke: #6d926f; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-botanical { position: absolute; z-index: 1; top: 21px; right: 0; width: min(43%, 360px); height: 210px; pointer-events: none; }
.hero-botanical svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.botanical-sun { fill: #f6edbd; opacity: .48; }
.botanical-hill { fill: #f2efcf; opacity: .86; }
.botanical-stem, .botanical-cloud { fill: none; stroke: #c8d596; stroke-width: 1.5; stroke-linecap: round; opacity: .46; }
.botanical-leaf { fill: #b7c97d; opacity: .43; }
.botanical-cloud { stroke: #e0dcae; }
.hero-sparkle { position: absolute; z-index: 2; top: 21px; left: 8px; color: #c6a63d; font-size: 20px; }
.bottom-nav { grid-template-columns: repeat(5, 1fr); }
.bottom-nav .nav-dropship span { width: 30px; height: 30px; border-radius: 50%; color: var(--ink); background: var(--blue); }
.dashboard-actions { grid-template-columns: repeat(4, 1fr); }
.action-icon.lime { background: var(--lime); }
.record-mark.dropship-mark, .dropship-mark { color: var(--ink); background: var(--blue); }
.record-money { text-align: right; }
.record-money strong, .record-money small { display: block; }
.record-money small { margin-top: 4px; color: var(--green); font-size: 10px; }
.loss-text { color: #a5422e !important; }
.dropship-summary { margin-bottom: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dropship-summary article, .dropship-insights article { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--cream); }
.dropship-summary article:first-child { color: #fff; background: var(--ink); }
.dropship-summary article:last-child { background: var(--lime); }
.dropship-summary span, .dropship-summary small, .dropship-insights span, .dropship-insights small { display: block; opacity: .68; font-size: 10px; }
.dropship-summary strong, .dropship-insights strong { display: block; margin: 11px 0 6px; font: 700 29px var(--font-number); font-variant-numeric: tabular-nums; }
.dropship-search { max-width: 760px; margin-bottom: 16px; padding: 8px; }
.dropship-search .catalog-search { box-shadow: none; }
.search-submit { min-height: 36px; padding: 0 13px; border: 0; border-radius: 999px; color: var(--ink); background: var(--lime); font-weight: 700; cursor: pointer; }
.featured-money input { min-height: 64px; font: 700 28px var(--font-number); }
.discount-presets, .shipping-choice { margin-top: 13px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.discount-presets button, .shipping-choice button { flex: 1 0 auto; min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--paper); cursor: pointer; font-weight: 700; }
.discount-presets button.is-active, .shipping-choice button.is-active { border-color: var(--ink); color: #fff; background: var(--ink); }
.shipping-choice button.is-active[data-shipping-mode="free"] { border-color: var(--lime); color: var(--ink); background: var(--lime); }
.live-ledger { margin: 20px 0; padding: 15px 18px; border-radius: 16px; color: #fff; background: var(--ink); }
.live-ledger > div { padding: 8px 0; display: flex; justify-content: space-between; gap: 15px; }
.live-ledger dt { color: rgba(255,255,255,.6); }
.live-ledger dd { margin: 0; font-variant-numeric: tabular-nums; }
.live-ledger-total { margin-top: 7px; padding-top: 15px !important; border-top: 1px solid rgba(255,255,255,.2); font-size: 18px; font-weight: 700; }
.live-ledger-profit dd { color: var(--lime); font-weight: 700; }
.dropship-receipt-meta .receipt-cost { margin-top: 8px; padding-top: 18px; border-top: 2px solid var(--ink); font-weight: 700; }
.dropship-receipt .sale-actions { grid-template-columns: 1.35fr .65fr; }
.dropship-receipt .sale-actions .button:first-child { grid-column: auto; }
.business-tabs { width: fit-content; margin: -12px 0 24px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.55); display: flex; gap: 3px; }
.business-tabs a { min-height: 40px; padding: 0 18px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.business-tabs a.is-active { color: #fff; background: var(--ink); }
.business-compare { margin-bottom: 28px; }
.compare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.compare-grid > div { padding: 17px; border-radius: 14px; background: var(--paper); }
.compare-grid span, .compare-grid small { display: block; color: var(--muted); font-size: 10px; }
.compare-grid strong { display: block; margin: 10px 0 6px; font: 700 25px var(--font-number); }
.compare-grid .compare-total { color: #fff; background: var(--green); }
.compare-grid .compare-total span, .compare-grid .compare-total small { color: rgba(255,255,255,.65); }
.dropship-insights { margin-bottom: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dropship-insights article:nth-child(2) { background: #edf3dc; }
.dropship-insights article.danger { border-color: rgba(243,111,85,.4); background: #fff0eb; }
.more-menu-grid > a { transition: transform .18s ease, box-shadow .18s ease; }
.page-head > div { min-width: 0; }
.page-head .muted { line-height: 1.65; }
.head-actions .button { flex: 0 0 auto; }
.inventory-head .head-actions { max-width: 470px; }
.product-admin-layout > .compact-form { width: 100%; }
.product-list-panel { min-width: 0; }
.management-list > .management-item {
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}
.management-list > .management-item:last-child { border-bottom: 0; }
.management-copy { min-width: 0; }
.management-copy b,
.management-copy small { display: block; }
.management-copy b { font-size: 15px; font-weight: 600; line-height: 1.4; }
.management-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.management-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.management-actions form { width: auto; margin: 0; }
.management-actions form .mini-button {
  width: auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  appearance: none;
  color: var(--ink);
  background: var(--paper);
  white-space: nowrap;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.management-actions form .mini-button:hover { border-color: var(--green); background: #fff; }
.management-actions form .mini-button.danger { color: #8e3624; }
.brand-admin summary span b { font-weight: 600; }
.sale-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.sale-meta > span:not(.status-pill) { white-space: nowrap; }
.sale-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.sale-actions .button { min-width: 0; width: 100%; }
.receipt-total strong,
.receipt-lines strong,
.receipt-meta dd,
.inventory-number strong { font-variant-numeric: tabular-nums; }

@media (max-width: 650px) {
  .app-shell { padding: 22px 15px calc(94px + env(safe-area-inset-bottom)); }
  .bottom-nav { padding-inline: max(4px, env(safe-area-inset-left)); }
  .bottom-nav a { font-size: 9px; }
  .bottom-nav span { font-size: 18px; }
  .page-head {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 16px;
  }
  .page-head h1 {
    max-width: none;
    margin-top: 7px;
    font-size: clamp(31px, 9vw, 38px);
    line-height: 1.14;
    letter-spacing: -.02em;
    text-wrap: balance;
  }
  .product-manage-head h1 { font-size: clamp(29px, 8.1vw, 37px); }
  .page-head .muted { margin-top: 10px; font-size: 15px; line-height: 1.6; text-wrap: pretty; }
  .eyebrow { font-size: 11px; line-height: 1.5; }
  .button { min-height: 44px; padding-inline: 15px; font-size: 14px; }
  .panel { padding: 20px 17px; }
  .panel-head { margin-bottom: 18px; align-items: center; }
  .panel-head h2,
  .compact-form h2 { font-size: 24px; line-height: 1.25; }
  .panel-head > .muted { flex: 0 0 auto; margin: 0; font-size: 13px; }
  .field { gap: 8px; font-size: 14px; font-weight: 600; }
  .form-control,
  .field input,
  .field select,
  .login-form input { min-height: 50px; font-size: 16px; }

  .inventory-head .head-actions {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .inventory-head .head-actions .button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding-inline: 8px;
    font-size: 13px;
  }
  .inventory-tools { margin-top: 0; }
  .inventory-card h2 { font-family: var(--font-display); font-weight: 600; }
  .inventory-card h2 { overflow-wrap: anywhere; }
  .dashboard-actions { grid-template-columns: 1fr; }
  .metric-link small i { display: none; }
  .metric-grid { min-width: 0; }
  .metric-card { min-width: 0; }
  .more-sections { gap: 26px; }
  .more-section { display: block; }
  .more-section-head { position: static; margin: 0 3px 11px; align-items: center; }
  .more-section-head > span { font-size: 25px; }
  .more-section-head h2 { font-size: 19px; }
  .more-section .more-menu-grid { gap: 8px; }
  .more-section .more-menu-grid > a { min-height: 82px; padding: 13px 15px; grid-template-columns: 38px minmax(0, 1fr) auto; border-radius: 15px; }
  .more-section .menu-symbol { width: 38px; height: 38px; font-size: 14px; }
  .hero-head { min-height: 222px; margin-inline: -3px; padding: 25px 22px 23px; border-radius: 26px 26px 18px 18px; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "copy copy" "actions date"; gap: 14px 8px; }
  .hero-copy .eyebrow { padding-bottom: 4px; font-size: 10px; }
  .hero-copy .eyebrow::after { width: 15px; margin-top: 5px; }
  .hero-copy h1 { max-width: none; margin-top: 3px; font-size: clamp(35px, 10.4vw, 43px); line-height: 1.28; }
  .hero-actions { width: auto; display: flex; flex-wrap: nowrap; gap: 8px; }
  .hero-actions .button { min-height: 41px; padding-inline: 12px; font-size: 11px; }
  .today-stamp { justify-self: end; min-height: 38px; padding-inline: 10px; gap: 6px; border-radius: 12px; font-size: 10px; }
  .today-stamp svg { width: 13px; height: 13px; }
  .hero-botanical { top: 27px; right: -13px; width: 49%; height: 158px; opacity: .9; }
  .hero-sparkle { top: 5px; left: 9px; font-size: 14px; }
  .management-list > .management-item {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 11px;
  }
  .management-copy { width: 100%; }
  .management-copy b { white-space: normal; overflow-wrap: normal; word-break: keep-all; }
  .management-copy small { overflow-wrap: normal; word-break: normal; }
  .management-actions { width: 100%; max-width: none; flex-wrap: nowrap; justify-content: flex-start; }
  .price-edit-form { order: 0; flex: 1 1 auto; min-width: 0; }
  .price-edit-form label { width: 100%; }
  .price-edit-form input { min-width: 38px; flex: 1; }
  .management-actions > form:last-child { flex: 0 0 auto; }
  .dropship-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dropship-summary article { padding: 16px; }
  .dropship-summary article:last-child { grid-column: 1 / -1; }
  .dropship-summary strong { font-size: 25px; }
  .dropship-search { padding: 7px; }
  .dropship-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .dropship-row .record-money strong { font-size: 14px; }
  .dropship-row .record-money small { max-width: 90px; white-space: normal; }
  .featured-money input { min-height: 58px; font-size: 25px; }
  .discount-presets button, .shipping-choice button { min-height: 44px; padding-inline: 14px; }
  .live-ledger { margin-inline: -2px; padding: 14px; }
  .sticky-submit { gap: 8px; }
  .sticky-submit > span { font-size: 11px; }
  .sticky-submit .button { padding-inline: 13px; font-size: 13px; }
  .dropship-receipt .sale-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dropship-receipt .sale-actions .button:first-child { grid-column: auto; }
  .business-tabs { width: 100%; margin-top: -8px; }
  .business-tabs a { min-width: 0; flex: 1; padding-inline: 8px; }
  .compare-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-grid .compare-total { grid-column: 1 / -1; }
  .compare-grid strong { font-size: 22px; }
  .dropship-insights { grid-template-columns: 1fr; gap: 8px; }
  .dropship-insights article { padding: 16px; }

  .product-admin-layout { gap: 14px; }
  .product-admin-layout > .compact-form { max-width: none; margin: 0; }
  .product-list-panel .panel-head { align-items: end; }
  .management-list > .management-item {
    padding: 15px 0;
    gap: 10px;
  }
  .management-copy b { font-size: 16px; }
  .management-copy small { font-size: 12px; }
  .management-actions { gap: 7px; }
  .management-actions .status-pill { flex: 0 0 auto; }
  .management-list > .management-item .management-actions form { grid-column: auto; width: auto; }
  .management-list > .management-item .management-actions form .mini-button { width: auto; min-height: 40px; padding-inline: 11px; font-size: 12px; }
  .inline-create { grid-template-columns: 1fr; }
  .inline-create .button { width: 100%; }

  .sale-detail-head { position: relative; padding-top: 50px; gap: 0; }
  .sale-detail-head .back-button {
    position: absolute;
    top: 0;
    left: 0;
    min-height: 38px;
    padding: 0 4px;
    border-color: transparent;
    justify-self: start;
    color: var(--green);
    background: transparent;
    box-shadow: none;
    font-size: 13px;
  }
  .sale-detail-head .back-button:hover { transform: none; background: rgba(255,255,255,.35); }
  .sale-meta { margin-top: 12px !important; gap: 7px 9px; font-size: 14px !important; }
  .sale-receipt { width: 100%; padding: 25px 20px; }
  .receipt-total { padding-bottom: 22px; }
  .receipt-total strong { font-size: 40px; line-height: 1.15; }
  .receipt-lines > div,
  .receipt-meta > div { padding: 9px 0; gap: 14px; }
  .receipt-lines > div > span,
  .receipt-meta dt { min-width: 0; }
  .receipt-lines strong,
  .receipt-meta dd { flex: 0 0 auto; white-space: nowrap; }
  .sale-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .sale-actions .button:first-child { grid-column: 1 / -1; }
  .sale-actions .button { min-height: 48px; padding-inline: 10px; font-size: 14px; }
}
