/* ==========================================================================
   Blooms Colombo — storefront + dashboard styles
   Soft pastel palette, generous tap targets, mobile-first.
   ========================================================================== */

:root {
  --bg: #fdfbf9;
  --surface: #ffffff;
  --surface-alt: #f7f3f6;
  --ink: #3b3340;
  --ink-soft: #6b6172;
  --muted: #8d8496;
  --line: #ece4ee;
  --line-strong: #ddd2e0;

  --mint: #6fbaa8;
  --mint-dark: #4f9a88;
  --mint-soft: #e4f3ef;
  --coral: #f0998e;
  --coral-soft: #fdecea;
  --lilac: #b3a3d8;
  --lilac-soft: #f0ecf9;
  --butter: #f6dfa0;
  --butter-soft: #fdf5e2;
  --sky: #9ec8e8;
  --sky-soft: #eaf3fa;

  --ok: #3f9b6d;
  --ok-soft: #e6f4ec;
  --warn: #c8871f;
  --warn-soft: #fdf1dd;
  --danger: #cc5f5f;
  --danger-soft: #fbeaea;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(59, 51, 64, 0.05), 0 8px 24px rgba(59, 51, 64, 0.06);
  --shadow-sm: 0 1px 2px rgba(59, 51, 64, 0.06);
  --maxw: 1160px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--mint-dark); }
img { max-width: 100%; display: block; }
small { font-size: .82rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 16px; }
.muted { color: var(--muted); }
.soft { color: var(--ink-soft); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { white-space: nowrap; font-variant-numeric: tabular-nums; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.hide { display: none !important; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--mint); color: #fff;
  font: inherit; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--mint-dark); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid var(--sky); outline-offset: 2px;
}
.btn[disabled], .btn.disabled { background: var(--line-strong); color: var(--muted); cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-alt); }
.btn-coral { background: var(--coral); }
.btn-coral:hover { background: #e2857a; }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #e9c7c7; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .88rem; }
.btn-block { width: 100%; }

/* --- Forms ---------------------------------------------------------------- */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=search], input[type=date], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit;
}
textarea { min-height: 96px; resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger); background: var(--danger-soft);
}
.error-text { color: var(--danger); font-size: .85rem; margin-top: 4px; font-weight: 600; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 16px; }
legend { font-weight: 700; font-size: .9rem; padding: 0 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.grid-2 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* --- Notices -------------------------------------------------------------- */
.notice {
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px;
  border: 1px solid var(--line-strong); background: var(--surface-alt); font-size: .92rem;
}
.notice-ok { background: var(--ok-soft); border-color: #c4e3d1; color: #235c40; }
.notice-warn { background: var(--warn-soft); border-color: #f0dcb4; color: #7a5510; }
.notice-danger { background: var(--danger-soft); border-color: #eec9c9; color: #8c3838; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }

/* --- Badges --------------------------------------------------------------- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
  background: var(--surface-alt); color: var(--ink-soft); border: 1px solid var(--line);
}
.badge-new { background: var(--sky-soft); color: #23607f; border-color: #cbe2f0; }
.badge-confirmed { background: var(--lilac-soft); color: #4f3f77; border-color: #ded3f0; }
.badge-packed { background: var(--butter-soft); color: #7a5510; border-color: #f0dcb4; }
.badge-shipped { background: var(--mint-soft); color: #2f6f5f; border-color: #c6e5dd; }
.badge-delivered { background: var(--ok-soft); color: #235c40; border-color: #c4e3d1; }
.badge-cancelled { background: var(--danger-soft); color: #8c3838; border-color: #eec9c9; }
.badge-paid { background: var(--ok-soft); color: #235c40; border-color: #c4e3d1; }
.badge-unpaid { background: var(--warn-soft); color: #7a5510; border-color: #f0dcb4; }
.badge-refunded { background: var(--surface-alt); color: var(--ink-soft); }
.badge-low { background: var(--warn-soft); color: #7a5510; border-color: #f0dcb4; }
.badge-out { background: var(--danger-soft); color: #8c3838; border-color: #eec9c9; }

/* --- Cards / tables ------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px;
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h2, .card-head h1 { margin: 0; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-alt); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.empty {
  text-align: center; padding: 44px 20px; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface);
}
.empty .emoji { font-size: 2rem; display: block; margin-bottom: 8px; }
.empty h3 { color: var(--ink); }

/* ==========================================================================
   Storefront
   ========================================================================== */
.announce {
  background: var(--lilac-soft); color: #4f3f77;
  text-align: center; font-size: .86rem; padding: 8px 16px; border-bottom: 1px solid #e4dcf3;
}
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.header-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.05rem; min-width: 0; }
.brand .mark {
  width: 38px; height: 38px; flex: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--mint-soft), var(--lilac-soft));
  display: grid; place-items: center; font-size: 1.15rem; border: 1px solid var(--line);
}
.brand small { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem;
}
.icon-btn:hover { background: var(--surface-alt); }
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--coral); color: #fff; font-size: .75rem; font-weight: 700;
  display: inline-grid; place-items: center;
}
/* On phones the search bar drops onto its own full-width row. */
.searchbar { display: flex; gap: 8px; flex: 1 0 100%; order: 3; padding-bottom: 4px; }
.searchbar input { flex: 1; min-width: 0; }
.brand small { max-width: 30ch; }
@media (max-width: 520px) {
  .brand small { display: none; }
  .icon-btn { padding: 8px 12px; font-size: .86rem; }
}
@media (min-width: 860px) {
  .searchbar { padding-bottom: 0; flex: 1 1 auto; order: 0; max-width: 440px; margin: 0 8px; }
  .header-row { padding: 14px 0; flex-wrap: nowrap; }
  .brand { font-size: 1.15rem; }
}
.nav-scroll { border-top: 1px solid var(--line); background: var(--surface); }
.nav-scroll ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 6px 16px; overflow-x: auto; max-width: var(--maxw); margin: 0 auto; }
.nav-scroll a {
  display: block; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  text-decoration: none; color: var(--ink-soft); font-size: .9rem; font-weight: 600;
}
.nav-scroll a:hover { background: var(--surface-alt); color: var(--ink); }
.nav-scroll a.active { background: var(--mint-soft); color: var(--mint-dark); }

.hero {
  background: linear-gradient(135deg, var(--mint-soft) 0%, var(--lilac-soft) 55%, var(--coral-soft) 100%);
  border-radius: var(--radius); padding: 32px 22px; margin: 20px 0; text-align: center;
}
.hero h1 { font-size: 1.8rem; margin-bottom: .35em; }
.hero p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 20px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (min-width: 720px) { .hero { padding: 52px 40px; } .hero h1 { font-size: 2.3rem; } }

.section { margin: 36px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }

.cat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(6, 1fr); } }
.cat-tile {
  display: block; text-align: center; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 10px; font-weight: 600; font-size: .92rem; transition: transform .12s ease, box-shadow .12s ease;
}
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-tile .emoji { font-size: 1.7rem; display: block; margin-bottom: 6px; }
.cat-tile .count { display: block; font-size: .78rem; color: var(--muted); font-weight: 500; }

.product-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; position: relative;
  transition: transform .12s ease, box-shadow .12s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-card > a.thumb { display: block; background: var(--surface-alt); aspect-ratio: 1 / 1; }
.product-card > a.thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; gap: 4px; }
.product-body .brandline { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.product-body h3 { margin: 0; font-size: .98rem; }
.product-body h3 a { color: var(--ink); text-decoration: none; }
.product-body h3 a:hover { color: var(--mint-dark); }
.price { font-weight: 800; font-size: 1.02rem; margin-top: auto; padding-top: 6px; }
.price .from { font-size: .74rem; font-weight: 600; color: var(--muted); }
.flag { position: absolute; top: 10px; left: 10px; }

/* On phones the products come first; the filter panel sits below them. */
.layout-filters { display: grid; gap: 20px; grid-template-columns: 1fr; }
.layout-filters > .filter-panel { order: 2; }
.layout-filters > .results { order: 1; }
.filter-jump { display: inline-block; margin-bottom: 14px; font-weight: 600; }
@media (min-width: 900px) {
  .layout-filters { grid-template-columns: 260px 1fr; align-items: start; }
  .layout-filters > .filter-panel { order: 0; }
  .layout-filters > .results { order: 0; }
  .filter-jump { display: none; }
}
.filter-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
@media (min-width: 900px) { .filter-panel { position: sticky; top: 96px; } }
.filter-panel h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px; }
.filter-panel h3:first-child { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: .85rem;
  background: var(--surface-alt); color: var(--ink-soft); text-decoration: none; border: 1px solid var(--line);
}
.chip:hover { background: var(--mint-soft); color: var(--mint-dark); }
.chip.active { background: var(--mint); color: #fff; border-color: var(--mint); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; padding: 0 10px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem;
}
.pager .current { background: var(--mint); color: #fff; border-color: var(--mint); }

/* Product detail */
.product-detail { display: grid; gap: 24px; grid-template-columns: 1fr; margin: 24px 0; }
@media (min-width: 860px) { .product-detail { grid-template-columns: 1fr 1fr; gap: 40px; } }
.gallery-main { background: var(--surface-alt); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery-main img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs button {
  width: 64px; height: 64px; padding: 0; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid var(--line); background: var(--surface-alt); cursor: pointer;
}
.gallery-thumbs button.active { border-color: var(--mint); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.variant-list { display: grid; gap: 8px; margin: 4px 0 18px; }
.variant-option {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  cursor: pointer; background: var(--surface);
}
.variant-option:hover { border-color: var(--mint); }
.variant-option input { width: 20px; height: 20px; flex: none; }
.variant-option .vlabel { font-weight: 600; }
.variant-option .vmeta { margin-left: auto; text-align: right; }
.variant-option.sold-out { opacity: .55; cursor: not-allowed; background: var(--surface-alt); }
.variant-option:has(input:checked) { border-color: var(--mint); background: var(--mint-soft); }

.qty-row { display: flex; gap: 10px; align-items: flex-end; }
.qty-row .field { margin-bottom: 0; width: 110px; }

.price-big { font-size: 1.7rem; font-weight: 800; }
.stock-line { font-size: .9rem; font-weight: 600; }
.stock-in { color: var(--ok); }
.stock-low { color: var(--warn); }
.stock-out { color: var(--danger); }

/* Cart & checkout */
.cart-layout { display: grid; gap: 20px; grid-template-columns: 1fr; margin: 20px 0; align-items: start; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 1fr 340px; } }
.cart-item { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 76px; height: 76px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-alt); }
.cart-item .line-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.cart-item .line-actions input { width: 72px; }
.totals { list-style: none; margin: 0; padding: 0; }
.totals li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .95rem; }
.totals li.grand { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 1.15rem; font-weight: 800; }
.summary-sticky { position: sticky; top: 96px; }

.pay-option { display: block; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; cursor: pointer; background: var(--surface); }
.pay-option:has(input:checked) { border-color: var(--mint); background: var(--mint-soft); }
.pay-option .row { display: flex; gap: 10px; align-items: center; }
.pay-option .pay-detail { font-size: .86rem; color: var(--ink-soft); margin: 8px 0 0 30px; white-space: pre-line; }

.order-hero { background: var(--mint-soft); border: 1px solid #c6e5dd; border-radius: var(--radius); padding: 26px 22px; text-align: center; margin: 22px 0; }
.order-number { font-size: 1.5rem; font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.step { flex: 1; min-width: 88px; text-align: center; font-size: .78rem; font-weight: 700; padding: 8px 4px; border-radius: var(--radius-sm); background: var(--surface-alt); color: var(--muted); border: 1px solid var(--line); }
.step.done { background: var(--mint-soft); color: var(--mint-dark); border-color: #c6e5dd; }
.step.current { background: var(--mint); color: #fff; border-color: var(--mint); }

.site-footer { margin-top: 56px; background: var(--surface); border-top: 1px solid var(--line); padding: 28px 0; font-size: .9rem; color: var(--ink-soft); }
.footer-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--mint-dark); text-decoration: underline; }

/* ==========================================================================
   Admin dashboard
   ========================================================================== */
body.admin { background: var(--surface-alt); }
.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 960px) { .admin-shell { grid-template-columns: 236px 1fr; } }

.admin-side { background: var(--ink); color: #e8e3ec; padding: 16px; }
.admin-side .brand { color: #fff; margin-bottom: 18px; }
.admin-side .brand small { color: #b3a9bd; }
.admin-side .mark { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.14); }
.admin-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; }
@media (min-width: 960px) { .admin-nav ul { display: block; overflow: visible; } .admin-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 10px 12px; border-radius: var(--radius-sm); color: #cfc7d6;
  text-decoration: none; font-weight: 600; font-size: .93rem; margin-bottom: 2px;
}
.admin-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav a.active { background: var(--mint); color: #fff; }
.admin-side .side-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: .84rem; color: #b3a9bd; }
.admin-side .side-foot a { color: #e8e3ec; }

.admin-main { padding: 18px 16px 56px; min-width: 0; }
@media (min-width: 960px) { .admin-main { padding: 26px 28px 60px; } }
.admin-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-head h1 { margin: 0; font-size: 1.5rem; }

.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-sm);
}
.stat .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.stat .value { font-size: 1.5rem; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.stat.accent-mint { border-left: 4px solid var(--mint); }
.stat.accent-lilac { border-left: 4px solid var(--lilac); }
.stat.accent-butter { border-left: 4px solid var(--butter); }
.stat.accent-coral { border-left: 4px solid var(--coral); }

.two-col { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1040px) { .two-col { grid-template-columns: 3fr 2fr; align-items: start; } }

.filters-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 16px; }
.filters-bar .field { margin-bottom: 0; }
.filters-bar input, .filters-bar select { min-width: 140px; }

.repeat-row { display: grid; gap: 10px; grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; background: var(--surface); }
@media (min-width: 900px) { .repeat-row { grid-template-columns: repeat(6, 1fr); align-items: end; } }
.repeat-row .field { margin-bottom: 0; }
.repeat-row .row-actions { display: flex; gap: 8px; }

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin-bottom: 0; }

.stock-table td:first-child { min-width: 230px; }
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--mint); }

/* Printable invoice / packing slip */
.doc { max-width: 760px; margin: 24px auto; background: #fff; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); }
.doc-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 18px; }
.doc h1 { font-size: 1.4rem; margin: 0; }
.doc .addr { font-size: .9rem; line-height: 1.5; }
.print-actions { max-width: 760px; margin: 16px auto; display: flex; gap: 8px; padding: 0 16px; }
@media print {
  .print-actions, .no-print { display: none !important; }
  body { background: #fff; }
  .doc { border: 0; margin: 0; padding: 0; max-width: none; border-radius: 0; }
}

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, var(--mint-soft), var(--lilac-soft)); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 100; background: #fff; padding: 10px 14px; border-radius: 8px; }
