/* Helvino mock platform — one stylesheet for checkout, back office, cellar sites and portal. */
:root {
  --accent: #7a2442; --font: "Roboto Slab", Georgia, serif; --ui: Inter, system-ui, sans-serif;
  --ink: #1d231f; --muted: #5f675f; --line: #e3e0d8; --bg: #faf8f4; --card: #fff; --ok: #2f6b3c; --warn: #b45309; --bad: #b91c1c;
  --r: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink: #ece8df; --muted: #a8a294; --line: #3a3833; --bg: #1a1916; --card: #24221e; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 var(--ui); color: var(--ink); background: var(--bg); }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); } h2 { font-size: 1.5rem; } h3 { font-size: 1.15rem; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: #fff; border: 0; border-radius: var(--r);
  padding: 9px 16px; font: 500 14px var(--ui); cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.small { padding: 5px 10px; font-size: 13px; } .btn[disabled] { opacity: .45; cursor: default; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.muted { color: var(--muted); } .small { font-size: 13px; } .right { text-align: right; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; background: #eee9df; color: #4a4438; }
.pill.ok { background: #e3f1e5; color: var(--ok); } .pill.warn { background: #fdf0dc; color: var(--warn); } .pill.bad { background: #fde4e4; color: var(--bad); }
.pill.info { background: #e4ecf7; color: #1f4e79; }
table { border-collapse: collapse; width: 100%; } th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 12px var(--ui); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
input, select, textarea { font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 3px; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; } .row > * { min-width: 0; }
.stack > * + * { margin-top: 12px; }
.err { color: var(--bad); } .okmsg { color: var(--ok); }
.sim { border: 2px dashed #b9b2a3; border-radius: var(--r); padding: 12px 14px; font-size: 13px; color: var(--muted); }
.proto-flag { position: fixed; bottom: 0; left: 0; right: 0; background: #1d231f; color: #f5efe2; font: 12px var(--ui); text-align: center; padding: 4px 8px; z-index: 50; opacity: .92; }
body { padding-bottom: 28px; }

/* ---------- hosted checkout */
.co-head { background: var(--card); border-bottom: 1px solid var(--line); }
.co-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.co-brand { font-family: var(--font); font-size: 20px; color: var(--ink); text-decoration: none; }
.co-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 20px 0; font-size: 13px; }
.co-steps span { padding: 4px 10px; border-radius: 99px; background: #eee9df; color: #6b6458; }
.co-steps span.on { background: var(--accent); color: #fff; } .co-steps span.done { background: #e3f1e5; color: var(--ok); }
.co-main { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; margin-bottom: 40px; }
@media (max-width: 820px) { .co-main { grid-template-columns: 1fr; } }
.sum-line { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; }
.sum-line.disc { color: var(--ok); } .sum-line.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 600; font-size: 16px; }
.opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin: 8px 0; cursor: pointer; }
.opt input { width: auto; margin-top: 3px; } .opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.provider-frame { max-width: 460px; margin: 30px auto; background: var(--card); border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.12); overflow: hidden; }
.provider-frame header { padding: 14px 18px; color: #fff; font: 600 15px var(--ui); display: flex; justify-content: space-between; }
.provider-frame .body { padding: 20px; }
.selfie { height: 180px; border-radius: 12px; background: radial-gradient(circle at 50% 42%, #d9cbb8 0 22%, #b8a58c 23% 30%, #2a2a2a 31%); margin: 10px 0 16px; position: relative; }
.selfie::after { content: ""; position: absolute; inset: 18px 30%; border: 3px solid rgba(255,255,255,.8); border-radius: 50%; }

/* ---------- back office */
.bo { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.bo nav { background: #22201c; color: #d8d2c4; padding: 18px 12px; }
.bo nav .logo { font: 600 18px var(--ui); color: #fff; padding: 0 8px 4px; } .bo nav .cellar { font-size: 13px; color: #b5ad9c; padding: 0 8px 16px; }
.bo nav a { display: block; color: #d8d2c4; text-decoration: none; padding: 7px 10px; border-radius: 6px; font-size: 14px; }
.bo nav a.on, .bo nav a:hover { background: #3a3630; color: #fff; }
.bo main { padding: 24px 28px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi .v { font: 600 24px var(--ui); } .kpi .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 820px) { .bo { grid-template-columns: 1fr; } .bo nav { display: flex; flex-wrap: wrap; gap: 4px; } .bo main { padding: 16px; } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; } .tabs a { padding: 5px 12px; border-radius: 99px; background: #eee9df; color: #4a4438; text-decoration: none; font-size: 13px; }
.tabs a.on { background: var(--accent); color: #fff; }
.tablewrap { overflow-x: auto; }

/* ---------- printable shipping slip (A4, folded into a transparent pouch) */
@media print { .noprint, .proto-flag { display: none !important; } body { background: #fff; padding: 0; } }
.slip { width: 210mm; min-height: 297mm; margin: 0 auto; background: #fff; color: #000; padding: 14mm; font: 11pt var(--ui); }
.slip .address-window { border: 1px dashed #999; padding: 6mm; width: 95mm; min-height: 45mm; margin-left: auto; font-size: 13pt; }
.slip .fold { border-top: 1px dotted #bbb; margin: 8mm 0; font-size: 8pt; color: #999; text-align: center; }

/* ---------- cellar site (no own website) and portal */
.hero { min-height: 62vh; display: flex; align-items: flex-end; background-size: cover; background-position: center; color: #fff; position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.65)); }
.hero .wrap { position: relative; padding-bottom: 48px; } .hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
.site-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 2; } .site-nav .wrap { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.site-nav a { color: #fff; text-decoration: none; margin-left: 18px; font-size: 14px; }
.section { padding: 56px 0; } .section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wine-card { display: flex; flex-direction: column; gap: 8px; }
.wine-card .bottle { height: 220px; display: flex; align-items: center; justify-content: center; background: linear-gradient(#f4efe6, #ebe4d7); border-radius: 6px; }
.wine-card .bottle img { max-height: 200px; width: auto; }
.fmt { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 14px; }
.fmt input { width: 58px; padding: 5px; }
.stock { font-size: 12px; color: var(--muted); } .stock.low { color: var(--warn); } .stock.out { color: var(--bad); }
.cartbar { position: fixed; right: 16px; bottom: 40px; z-index: 40; background: var(--card); border: 1px solid var(--accent); border-radius: 99px; padding: 8px 8px 8px 18px;
  display: none; align-items: center; gap: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.15); font-size: 14px; }
.cartbar.show { display: flex; }
.portal-head { background: #1d231f; color: #f2ede3; } .portal-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.portal-head a { color: #f2ede3; text-decoration: none; font-size: 14px; } .portal-logo { font: 600 22px var(--font); letter-spacing: .02em; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; } .filters > div { min-width: 150px; flex: 1; }
.region-tile { position: relative; border-radius: var(--r); overflow: hidden; min-height: 160px; display: flex; align-items: flex-end; color: #fff; text-decoration: none; background-size: cover; background-position: center; }
.region-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.7)); }
.region-tile span { position: relative; padding: 14px; font: 500 18px var(--font); }
#map { height: 420px; border-radius: var(--r); border: 1px solid var(--line); }
.credits { font-size: 11px; color: var(--muted); }

/* fixes after the first visual pass */
.fmt > span:first-child b { white-space: nowrap; }
.fmt > span:last-child { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.fmt input { width: 52px; }
.bo td:first-child, .bo td:nth-child(2) { white-space: nowrap; }
.portal-head a.portal-logo { font-size: 26px; }
.site-nav { background: linear-gradient(180deg, rgba(0,0,0,.45), transparent); }
.bars .row span:first-child { width: auto !important; flex: 0 0 38%; }
