/* Recovery layer: styles.css previously ended a min() function early, so its final rules were ignored. */
button, input, select { font-family: inherit; }
.branch-label, .view-branch-control, [data-branch-label], [data-branch-select], #costs { display: none !important; }
.fruit-visual.has-photo, .cart-fruit.has-photo, .inventory-product-icon.has-photo { overflow: hidden; padding: 0; background: #edf1ed; }
.product-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-card .product-photo { transition: transform .2s ease; }
.product-card:hover .product-photo { transform: scale(1.035); }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.product-card { min-height: 300px; padding: 14px; border-radius: 20px; }
.product-card .fruit-visual { height: 198px; margin-bottom: 14px; border-radius: 16px; }
.product-card strong { min-height: 48px; overflow: visible; font-size: 17px; line-height: 1.4; white-space: normal; text-overflow: initial; }
.product-card b { margin-top: 7px; color: var(--green); font-size: 20px; line-height: 1.2; }
.product-card .stock-pill { z-index: 1; top: 21px; left: 21px; padding: 6px 9px; box-shadow: 0 2px 8px rgba(24,57,42,.12); font-size: 11px; }
.outline-btn, .select-button, .filter-button { font-size: 13px; font-weight: 600; }
.category, .text-button, .discount-row button, .period-tabs button, .report-note button { font-family: inherit; font-weight: 600; }
.pay-button { font-family: inherit; font-size: 14px; font-weight: 700; }

.payment-modal, .small-modal { box-sizing: border-box; width: min(430px, calc(100vw - 24px)) !important; min-width: 0 !important; max-width: calc(100vw - 24px); max-height: calc(100svh - 24px); overflow: auto; border: 0; border-radius: 20px; padding: 0; box-shadow: 0 20px 80px #10291b40; }
.payment-modal::backdrop, .small-modal::backdrop, .inventory-modal::backdrop { background: #123d2d6d; }
.payment-modal form, .small-modal form, .inventory-modal form { position: relative; padding: 28px; }
.modal-close { position: absolute; z-index: 2; top: 14px; right: 14px; display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%; background: #eef2ef; color: #4d5e54; font-family: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.payment-modal .eyebrow, .inventory-modal .eyebrow { padding-right: 42px; }
.payment-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 12px; margin: 14px 0 24px !important; }
.payment-summary > span { font-size: 18px; font-weight: 700; }
.payment-summary strong { min-width: 0; margin: 0; text-align: right; font-size: clamp(28px, 7vw, 36px); line-height: 1.1; white-space: nowrap; }
.payment-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.payment-methods button { min-width: 0; min-height: 74px; padding: 11px 6px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: #66766d; font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.payment-methods button b, .payment-methods button span { display: block; }
.payment-methods button b { margin-bottom: 5px; font-size: 18px; }
.payment-methods button.selected { border-color: #28835a; background: #edf8f1; color: var(--green); }
.promptpay-qr { display: grid; justify-items: center; gap: 9px; margin: -2px 0 16px; padding: 12px; border: 1px solid #dce9e0; border-radius: 14px; background: #f8fbf9; }
.promptpay-qr[hidden] { display: none; }
.promptpay-qr img { display: block; width: min(245px, 100%); max-height: 335px; object-fit: contain; border-radius: 10px; background: #fff; }
.promptpay-qr small { color: var(--muted); font-size: 11px; line-height: 1.45; text-align: center; }
.cash-input { display: none; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 0 8px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; }
.cash-input.show { display: grid; }
.cash-input span { color: var(--muted); font-size: 12px; }
.cash-input input { min-width: 0; width: 100%; border: 0; outline: 0; text-align: right; font-family: inherit; font-size: 18px; font-weight: 700; }
.change-row { min-height: 20px; margin: 4px 0 12px; text-align: right; color: var(--green); font-size: 12px; }
.small-modal h2 { margin: 0 42px 6px 0; font-size: 20px; }
.small-modal p { margin: 0 0 20px; color: var(--muted); font-size: 12px; }
.discount-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
.discount-presets button { min-height: 48px; border: 1px solid #dbe5de; border-radius: 11px; background: #fff; color: #355044; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.discount-presets button:hover, .discount-presets button.selected { border-color: #28835a; background: #edf8f1; color: var(--green); box-shadow: 0 0 0 2px rgba(40,131,90,.08); }
.discount-presets .free-drink-discount { grid-column: 1 / -1; min-height: 56px; border-color: #e7cc72; background: #fff9df; color: #76560d; font-size: 15px; }
.discount-presets .free-drink-discount:hover, .discount-presets .free-drink-discount.selected { border-color: #c89e20; background: #fff2ba; color: #634707; }
.modal-input { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 7px; margin: 0 0 15px !important; }
.modal-input > span { display: block !important; color: #52645a; font-size: 12px; font-weight: 600; line-height: 1.45; }
.modal-input > input, .modal-input > select { display: block; width: 100% !important; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; outline-color: var(--green); background: rgba(255,255,255,.7); color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 600; }
.inventory-modal h2 { margin: 12px 42px 10px 0; line-height: 1.3; }
.inventory-current { margin-bottom: 20px; }
.stock-modes { margin-bottom: 20px; }
.inventory-modal .login-error { margin: 2px 0 10px; }
.product-modal { width: min(620px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100svh - 24px); overflow: auto; border: 0; border-radius: 20px; padding: 0; }
.product-modal h2 { margin: 12px 42px 18px 0; }
.product-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.product-name-field { grid-column: 1 / -1; }
.product-form-note { margin: -1px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.toast { position: fixed; z-index: 20; right: 25px; bottom: 23px; max-width: calc(100vw - 32px); padding: 12px 17px; border-radius: 10px; background: #173e2d; color: #fff; font-size: 13px; opacity: 0; transform: translateY(90px); transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }

.product-sales-chart { grid-column: 1 / -1; }
.metric-tabs { display: flex; gap: 3px; padding: 4px; border-radius: 9px; background: #edf2ee; }
.metric-tabs button { min-height: 30px; border: 0; border-radius: 7px; padding: 0 10px; background: transparent; color: var(--muted); font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.metric-tabs button.active { background: #fff; color: var(--green); box-shadow: 0 1px 4px #234b351c; }
.product-sales-bars { display: grid; gap: 12px; margin-top: 22px; }
.product-bar-row { display: grid; grid-template-columns: minmax(130px, 210px) minmax(120px, 1fr) 86px; gap: 14px; align-items: center; }
.product-bar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #34493f; font-size: 11px; font-weight: 600; }
.product-bar-track { height: 12px; overflow: hidden; border-radius: 4px; background: #edf2ee; }
.product-bar-fill { display: block; height: 100%; min-width: 2px; border-radius: 4px; background: #277a52; }
.product-bar-value { text-align: right; color: var(--ink); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.product-line-chart-wrap { position: relative; width: 100%; height: 360px; margin-top: 18px; }
.product-line-chart-wrap canvas { display: block; width: 100%; height: 100%; }
.product-line-legend { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.product-line-legend button { display: inline-flex; min-height: 28px; align-items: center; gap: 6px; border: 0; border-radius: 7px; padding: 3px 6px; background: transparent; color: #53645b; font-family: inherit; font-size: 10px; font-weight: 600; cursor: pointer; }
.product-line-legend button:hover { background: #f3f6f3; }
.product-line-legend button.muted { opacity: .35; text-decoration: line-through; }
.product-line-swatch { width: 19px; height: 0; border-top: 2px solid var(--series-color); }
.product-line-swatch.dash { border-top-style: dashed; }
.product-line-swatch.dot { border-top-style: dotted; }

@media (max-width: 1100px) {
  main { padding: 28px 25px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-layout { grid-template-columns: minmax(0, 1fr) 330px; }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; z-index: 4; inset: 0 auto auto; width: 100%; height: 64px; padding: 10px 14px; flex-direction: row; align-items: center; }
  .brand { flex: none; margin-right: 8px; padding: 0; }
  .main-nav { display: flex; flex: 1; justify-content: space-around; gap: 3px; overflow-x: auto; }
  .nav-item { min-width: 44px; padding: 10px; justify-content: center; font-size: 0; }
  .nav-item i { width: auto; font-size: 19px; }
  .sidebar-bottom { display: none; }
  main { grid-column: 1; width: 100%; padding: 24px 16px; }
  .pos-layout { grid-template-columns: minmax(0, 1fr); }
  .cart-panel { min-height: 360px; }
  .cart-items { max-height: 280px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .heat-card, .product-sales-chart { grid-column: auto; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .head-actions { width: 100%; justify-content: space-between; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-card { min-height: 270px; }
  .product-card .fruit-visual { height: 170px; }
  .payment-summary { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .payment-summary strong { text-align: left; }
  .payment-methods { grid-template-columns: minmax(0, 1fr); }
  .payment-methods button { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .payment-methods button b { margin: 0; }
}
@media (max-width: 600px) {
  .payment-modal form, .small-modal form, .inventory-modal form { padding: 24px 18px 18px; }
  .product-grid { grid-template-columns: minmax(0, 1fr); }
  .product-card { min-height: 320px; }
  .product-card .fruit-visual { height: 220px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-bar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; }
  .product-bar-label { grid-column: 1; }
  .product-bar-value { grid-column: 2; grid-row: 1; }
  .product-bar-track { grid-column: 1 / -1; grid-row: 2; }
  .card-header { gap: 12px; }
  .metric-tabs { flex: none; }
  .product-line-chart-wrap { height: 300px; margin-top: 14px; }
  .product-line-legend { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .product-line-legend button { flex: none; }
  .toast { right: 16px; bottom: 16px; }
  .product-form-grid { grid-template-columns: minmax(0, 1fr); }
  .product-name-field { grid-column: auto; }
}
@media (max-width: 380px) {
  .stock-modes { grid-template-columns: minmax(0, 1fr); }
  .stock-modes button { min-height: 46px; }
  .payment-summary strong { font-size: 28px; }
}
