:root {
  --color-primary: #1e3a4c;
  --color-primary-dark: #122733;
  --color-primary-light: #2f5872;
  --color-primary-tint: #eef3f6;
  --color-accent: #a3312c;
  --color-accent-dark: #7d221e;
  --color-accent-tint: #fbeae9;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f6f9;
  --color-sidebar: #142c3a;
  --color-sidebar-hover: #1c3c4d;
  --color-text: #1f2933;
  --color-text-muted: #647481;
  --color-border: #e5e9ef;
  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(18, 39, 51, 0.05);
  --shadow-md: 0 2px 6px rgba(18, 39, 51, 0.07), 0 8px 20px rgba(18, 39, 51, 0.05);
  --shadow-lg: 0 10px 28px rgba(18, 39, 51, 0.12), 0 3px 8px rgba(18, 39, 51, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sidebar-width: 240px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--color-text); background: var(--color-bg-alt); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--color-primary); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   Shared base (admin + client + auth pages)
   ============================================================ */
.site-header { background: var(--color-primary-dark); box-shadow: var(--shadow-md); position: relative; z-index: 5; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { font-weight: 700; font-size: 1.15rem; color: #fff; text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: #fff; opacity: 0.7; font-weight: 400; }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: rgba(255,255,255,0.82); text-decoration: none; font-size: 0.92rem; transition: color 0.15s ease; }
.nav-links a:hover { color: #fff; }

main { padding: 32px 0 60px; }
h1 { color: var(--color-primary-dark); font-size: 1.7rem; margin: 0 0 22px; letter-spacing: -0.015em; }
h2 { color: var(--color-primary-dark); font-size: 1.15rem; letter-spacing: -0.01em; }

.card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow-sm); transition: box-shadow 0.15s ease, transform 0.15s ease; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: #fff; border: 1px solid var(--color-border); border-left: 3px solid var(--color-primary); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat-card .num { font-size: 1.8rem; font-weight: 700; color: var(--color-primary); letter-spacing: -0.02em; }
.stat-card .label { color: var(--color-text-muted); font-size: 0.83rem; margin-top: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: 0.92rem; transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease; }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--color-accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: var(--color-accent-dark); box-shadow: var(--shadow-md); }
.btn-outline { background: #fff; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; text-align: center; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }

.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 600; font-size: 0.88rem; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); width: 100%; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(30, 58, 76, 0.12); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 18px; font-size: 0.9rem; border: 1px solid transparent; }
.alert-success { background: #e6f4ea; color: #1e6b3a; border-color: #b7e0c3; }
.alert-error { background: #fdecea; color: #9c2b26; border-color: #f4c5c1; }
.alert-warning { background: #fff4e0; color: #9a6a00; border-color: #f5dca3; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--color-border); font-size: 0.8rem; white-space: nowrap; }
th { background: var(--color-bg-alt); position: sticky; top: 0; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--color-bg-alt); }
td.wrap { white-space: normal; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }

/* Resizable, horizontally-dense tables (admin catalog) -- explicit <col>
   widths via table-layout:fixed so drag-resize has something to grab.
   The table's own outer width is set by JS to the exact sum of its
   columns (auto-width fixed-layout tables don't reliably resolve to
   that sum across engines otherwise) -- letting it grow past the
   wrapper is the point, a fixed-right column stays reachable regardless. */
.table-resizable { table-layout: fixed; }
.table-resizable th, .table-resizable td { overflow: hidden; text-overflow: ellipsis; }
.table-resizable td.wrap { white-space: nowrap; }
.col-resize-handle { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 4; touch-action: none; }
.col-resize-handle:hover, .col-resize-handle.resizing { background: var(--color-primary-light); opacity: 0.4; }
.sticky-col { position: sticky; right: 0; background: #fff; box-shadow: -2px 0 4px rgba(18, 39, 51, 0.08); }
.table-resizable thead .sticky-col { background: var(--color-bg-alt); z-index: 3; }

/* Collapsible per-column filter panel -- closed by default so it stays
   out of the way; opens into a dense grid rather than one row per filter. */
.col-filter-bar { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.col-filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px 12px; margin-top: 12px; }
.col-filter-item { display: flex; flex-direction: column; gap: 3px; }
.col-filter-item label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-text-muted); margin: 0; }
.col-filter-item input, .col-filter-item select { padding: 5px 7px; font-size: 0.78rem; }
.col-filter-clear { margin-top: 12px; }

/* Lead pipeline -- stage is computed from real account activity, not
   dragged, so columns are plain scrollable stacks rather than a full
   drag-and-drop board. */
.pipeline-board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.pipeline-col { flex: 1 1 250px; min-width: 240px; background: var(--color-bg-alt); border-radius: var(--radius); padding: 12px; }
.pipeline-col-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 0 2px; }
.pipeline-col-head h2 { margin: 0; font-size: 0.9rem; }
.pipeline-count { background: #fff; border: 1px solid var(--color-border); border-radius: 999px; padding: 1px 9px; font-size: 0.74rem; font-weight: 700; color: var(--color-text-muted); }
.pipeline-card { background: #fff; border: 1px solid var(--color-border); border-left: 3px solid var(--color-border); border-radius: var(--radius-sm); padding: 11px 12px; margin-bottom: 9px; box-shadow: var(--shadow-sm); }
.pipeline-card.stale { border-left-color: var(--color-accent); }
.pipeline-card a { text-decoration: none; color: var(--color-primary-dark); font-weight: 700; font-size: 0.88rem; }
.pipeline-card a:hover { text-decoration: underline; }
.pipeline-card .meta { font-size: 0.74rem; color: var(--color-text-muted); margin-top: 5px; line-height: 1.4; }
.pipeline-card .badge { margin-top: 4px; }
.pipeline-empty { color: var(--color-text-muted); font-size: 0.8rem; padding: 18px 4px; text-align: center; }
.pipeline-cards { min-height: 46px; border-radius: var(--radius-sm); transition: background 0.12s ease, outline-color 0.12s ease; }
.pipeline-col.drag-over .pipeline-cards { background: var(--color-primary-tint); outline: 2px dashed var(--color-primary-light); outline-offset: -4px; }
.pipeline-card { cursor: grab; }
.pipeline-card.dragging { opacity: 0.35; }
.pipeline-manual { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pipeline-reset-btn { border: none; background: none; padding: 0; font: inherit; font-size: 0.74rem; color: var(--color-primary); text-decoration: underline; cursor: pointer; }
.pipeline-reset-btn:hover { color: var(--color-primary-dark); }
.pipeline-reset-btn:disabled { opacity: 0.5; cursor: default; text-decoration: none; }

/* Admin is for managing information at a glance, not marketing impact --
   deliberately denser than the client-facing shell even though both share
   these same base classes (.card/.stat-grid/.stat-card). Tiles are capped
   rather than stretched (auto-fit + a max, not 1fr) so a handful of stats
   sit compactly instead of spreading across the full container width. */
body.admin-app .stat-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 200px)); gap: 10px; margin-bottom: 18px; }
body.admin-app .stat-card { padding: 10px 14px; }
body.admin-app .stat-card .num { font-size: 1.3rem; }
body.admin-app .card { padding: 14px 16px; margin-bottom: 14px; }

/* Compact bordered-row lists for repeated records (contacts, locations,
   orders...) inside an admin .card -- replaces loose <p> tags whose
   default browser margins are most of what "spread out" felt like. */
.detail-list { display: flex; flex-direction: column; }
.detail-row { padding: 7px 2px; border-bottom: 1px solid var(--color-bg-alt); font-size: 0.85rem; line-height: 1.4; }
.detail-row:last-child { border-bottom: none; }

/* Record cards side by side instead of one long single-column stack --
   trimming padding alone still left 7 full-width cards of 2-3 lines each
   forcing most of the scroll; this is the actual fix for that. Each card
   sizes to its own content (align-items:start) rather than stretching to
   match its tallest row-neighbor. */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.detail-grid .card { margin-bottom: 0; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.01em; }
.badge-yes { background: #e6f4ea; color: #1e6b3a; }
.badge-no { background: #f1f2f4; color: #5b6b79; }
.badge-maybe { background: #fff4e0; color: #9a6a00; }
.badge-quote { background: #eef0fb; color: #3d4a9c; }
.badge-requested, .badge-pending, .badge-invited { background: #fff4e0; color: #9a6a00; }
.badge-approved, .badge-scheduled, .badge-active, .badge-paid, .badge-trialing { background: #e6f4ea; color: #1e6b3a; }
.badge-completed { background: #eef0fb; color: #3d4a9c; }
.badge-declined, .badge-canceled, .badge-past_due, .badge-error, .badge-inactive { background: #fdecea; color: #9c2b26; }
.badge-in_progress, .badge-incomplete { background: #e7f0fb; color: #1d5c9c; }

.filters { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; align-items: end; }
.store-category-heading { margin-top: 32px; padding-bottom: 6px; border-bottom: 1px solid var(--color-border); }
.store-category-heading:first-of-type { margin-top: 0; }
.filters .form-group { margin-bottom: 0; min-width: 200px; }

.auth-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; background: var(--color-bg-alt); }
.auth-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 36px; width: 380px; box-shadow: var(--shadow-lg); }
.auth-card h1 { text-align: center; font-size: 1.3rem; }
.auth-card.wide { width: 480px; }
.tos-box { max-height: 160px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 12px; font-size: 0.9rem; color: var(--color-text-muted); background: var(--color-bg-alt); }
.form-group.inline { flex-direction: row; align-items: center; gap: 8px; }
.form-group.inline input[type=checkbox] { width: auto; }

.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-actions .btn { flex: 1 1 160px; text-align: center; }

/* ============================================================
   Client app shell -- sidebar layout, distinct from admin's
   plain top-nav (admin keeps .site-header as-is above)
   ============================================================ */
.client-shell { display: flex; min-height: 100vh; }
.client-sidebar { width: var(--sidebar-width); flex: 0 0 var(--sidebar-width); background: var(--color-sidebar); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.client-sidebar .brand { display: block; padding: 22px 20px; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.client-nav { list-style: none; margin: 0; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.client-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: rgba(255,255,255,0.78); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: background 0.15s ease, color 0.15s ease; }
.client-nav a:hover { background: var(--color-sidebar-hover); color: #fff; }
.client-nav a.active { background: var(--color-accent); color: #fff; }
.client-nav svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.9; }
.client-nav-logout { padding: 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.client-nav-logout a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.88rem; }
.client-nav-logout a:hover { background: var(--color-sidebar-hover); color: #fff; }
.client-nav-logout svg { width: 17px; height: 17px; }
.client-main { flex: 1; min-width: 0; }
.client-main main { padding: 34px 0 60px; }
.client-mobile-bar { display: none; }

/* ============================================================
   Dashboard tiles with icon chips
   ============================================================ */
.tile-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--color-primary-tint); color: var(--color-primary); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.tile-icon svg { width: 20px; height: 20px; }
.stat-card.accent .tile-icon { background: var(--color-accent-tint); color: var(--color-accent); }
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.action-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); text-decoration: none; color: var(--color-text); box-shadow: var(--shadow-sm); transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease; }
.action-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--color-primary-light); }
.action-tile .tile-icon { margin-bottom: 0; }
.action-tile.primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.action-tile.primary .tile-icon { background: rgba(255,255,255,0.15); color: #fff; }
.action-tile .label { font-weight: 600; font-size: 0.9rem; }

/* ============================================================
   Store -- product grid, ecommerce feel
   ============================================================ */
.store-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.category-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.category-pill { display: inline-block; padding: 7px 15px; border-radius: 999px; background: #fff; border: 1px solid var(--color-border); color: var(--color-text); text-decoration: none; font-size: 0.85rem; font-weight: 600; transition: all 0.15s ease; }
.category-pill:hover { border-color: var(--color-primary); color: var(--color-primary); }
.category-pill.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.store-summary-bar { position: sticky; bottom: 0; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 16px 22px; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; z-index: 10; }
.store-summary-bar .totals { font-size: 0.95rem; }
.store-summary-bar .totals strong { color: var(--color-primary); font-size: 1.15rem; }

.product-section { margin-bottom: 22px; scroll-margin-top: 20px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.product-section-head { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 2px solid var(--color-primary-tint); }
.product-section-head h2 { margin-bottom: 2px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 10px; }
.product-card { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 12px; box-shadow: none; display: flex; flex-direction: column; gap: 6px; transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease; position: relative; }
.product-card:hover { background: #fff; box-shadow: var(--shadow-md); border-color: var(--color-primary-light); }
.product-card.selected { background: #fff; border-color: var(--color-accent); box-shadow: 0 0 0 2px rgba(163, 49, 44, 0.15); }
.product-card-top { display: flex; flex-direction: column; gap: 2px; }
.product-name { font-weight: 700; font-size: 0.83rem; color: var(--color-primary-dark); line-height: 1.25; }
.product-price { font-weight: 700; color: var(--color-accent); font-size: 0.92rem; white-space: nowrap; }
.product-unit { font-weight: 400; color: var(--color-text-muted); font-size: 0.68rem; }
.product-desc { color: var(--color-text-muted); font-size: 0.74rem; flex: 1; line-height: 1.35; }
.product-scope-note { font-size: 0.68rem; color: var(--color-primary); background: var(--color-primary-tint); border-radius: var(--radius-sm); padding: 5px 7px; }
.product-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--color-border); }
.product-select { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.76rem; cursor: pointer; }
.product-select input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--color-accent); cursor: pointer; }
.product-qty { width: 46px; padding: 4px 5px; text-align: center; font-size: 0.8rem; }

.product-tier-heading { margin: 18px 0 10px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }
.product-tier-heading:first-of-type { margin-top: 0; }

.product-image { margin: -12px -12px 4px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; overflow: hidden; background: var(--color-border); }
.product-image img { width: 100%; height: 90px; object-fit: cover; display: block; }
.product-gallery-strip { display: flex; gap: 4px; margin-top: -2px; }
.product-gallery-strip img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; border: 1px solid var(--color-border); }

/* Higher-value: bigger card, bigger image, gallery strip visible */
.product-grid.tier-higher { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.product-grid.tier-higher .product-card { padding: 14px; gap: 8px; }
.product-grid.tier-higher .product-image img { height: 130px; }
.product-grid.tier-higher .product-name { font-size: 0.92rem; }
.product-grid.tier-higher .product-price { font-size: 1rem; }
.product-grid.tier-higher .product-desc { font-size: 0.8rem; }

/* Core subscriptions: the biggest, most prominent tile */
.product-grid.tier-core { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.product-grid.tier-core .product-card { padding: 16px; gap: 10px; }
.product-grid.tier-core .product-image img { height: 170px; }
.product-grid.tier-core .product-name { font-size: 1.02rem; }
.product-grid.tier-core .product-price { font-size: 1.15rem; }
.product-grid.tier-core .product-desc { font-size: 0.85rem; }
.product-grid.tier-core .product-gallery-strip img { width: 40px; height: 40px; }

/* Related products: smallest, no gallery strip (rendered via tierOrder logic) */
.product-grid.tier-related { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.product-grid.tier-related .product-card { padding: 10px; gap: 4px; }
.product-grid.tier-related .product-image img { height: 60px; }
.product-grid.tier-related .product-name { font-size: 0.76rem; }
.product-grid.tier-related .product-price { font-size: 0.85rem; }

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 900px) {
  .client-shell { flex-direction: column; }
  .client-sidebar { display: none; }
  .client-mobile-bar { display: flex; align-items: center; justify-content: space-between; background: var(--color-sidebar); color: #fff; padding: 14px 16px; position: sticky; top: 0; z-index: 20; box-shadow: var(--shadow-md); }
  .client-mobile-bar .brand { padding: 0; font-size: 1.05rem; }
  .client-mobile-bar select { width: auto; background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.25); }
}

@media (max-width: 640px) {
  .site-header .container { flex-wrap: wrap; min-height: auto; padding: 12px 16px; gap: 10px; }
  .nav-links { flex-wrap: wrap; gap: 8px 16px; width: 100%; }
  .container { padding: 0 16px; }
  main { padding: 20px 0 40px; }
  h1 { font-size: 1.35rem; }
  .card { padding: 16px; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 20px; }
  .stat-card { padding: 14px; }
  .stat-card .num { font-size: 1.4rem; }
  .auth-card, .auth-card.wide { width: 100%; max-width: 100%; padding: 24px 18px; }
  .quick-actions .btn { flex-basis: 100%; }
  .action-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { flex-direction: column; align-items: stretch; }
  .filters .form-group { min-width: 0; }
  form .btn-primary, form .btn-accent { width: 100%; text-align: center; }
  th, td { padding: 8px 10px; font-size: 0.82rem; }
  .product-section { padding: 14px 16px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .store-summary-bar { flex-direction: column; align-items: stretch; text-align: center; }
}
