:root {
  --black: #000; --text: #222; --muted: #777; --line: #ddd; --bg: #fff; --soft: #f6f6f4;
  --ok: #2e7d32; --wait: #a86b00; --err: #b3261e;
  font-family: 'CustomHelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-size: 15px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
h1, h2 { font-family: 'Gotham', 'CustomHelveticaNeue', sans-serif; font-weight: 500; letter-spacing: .02em; }
h1 { font-size: 1.8rem; margin: 0 0 .6rem; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .8rem; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.top .logo img { height: 26px; display: block; }
.top nav a { margin-left: 18px; text-decoration: none; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 36px 16px 60px; }
.narrow { max-width: 560px; margin: 0 auto; }
.narrow.left { margin: 0; }
.center { text-align: center; }
.lead { font-size: 1.05rem; color: #444; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.bottom { text-align: center; font-size: 12px; color: var(--muted); padding: 24px; border-top: 1px solid var(--line); }

.field { margin: 0 0 16px; }
.field > label, .label-like { display: block; font-size: 13px; margin: 0 0 6px; color: #444; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input:not([type]), select {
  width: 100%; padding: 12px 12px; border: 1px solid #bbb; border-radius: 0; font: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--black); outline-offset: -1px; }
.has-error input, .has-error select { border-color: var(--err); }
.field-error { color: var(--err); font-size: 13px; margin: 6px 0 0; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 0 0 12px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: #000; }
.inline { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 8px; }
.row3b { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 0 10px; }
.row-phone { display: grid; grid-template-columns: 80px 1fr; gap: 8px; }
.row-pass { display: grid; grid-template-columns: 1fr auto; }
.show-pass { border: 1px solid #bbb; border-left: 0; background: #fff; padding: 0 14px; font: inherit; font-size: 13px; cursor: pointer; }
.hp { position: absolute; left: -9999px; }
details.more { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 18px 0; padding: 0; }
details.more summary { cursor: pointer; padding: 14px 0; font-weight: 500; list-style: none; text-align: center; }
details.more summary::after { content: ' ⌄'; }
details.more[open] { padding-bottom: 8px; }
.fattura-box { background: var(--soft); padding: 14px; margin-bottom: 16px; }

.btn { display: inline-block; background: var(--black); color: #fff; border: 1px solid var(--black); padding: 13px 26px; font: inherit; font-size: 13px;
  text-transform: uppercase; letter-spacing: .1em; text-decoration: none; cursor: pointer; }
.btn:hover { background: #333; }
.btn-outline { background: #fff; color: var(--black); }
.btn-outline:hover { background: var(--soft); }
.btn-block { width: 100%; margin: 10px 0 14px; }

.flash { padding: 12px 14px; margin: 0 0 18px; border-left: 3px solid var(--ok); background: #eef6ee; }
.flash-err { border-color: var(--err); background: #fbeeee; }
.store-badge { background: var(--soft); border-left: 3px solid var(--black); padding: 12px 14px; margin: 10px 0 16px; }
.card { border: 1px solid var(--line); padding: 18px 20px; margin-bottom: 20px; background: #fff; }
.card h2:first-child { margin-top: 0; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border: 1px solid var(--line); color: #555; margin-right: 4px; }
.tag-ok { border-color: var(--ok); color: var(--ok); }
.tag-wait { border-color: var(--wait); color: var(--wait); }

.shop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.shop-head h1 { margin: 0; }
.shop-head p { margin: 0 0 4px; }
.store-switch select { width: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 24px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; font-size: 14px; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a.on { border-color: var(--black); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stats div { background: var(--soft); padding: 14px 16px; }
.stats strong { display: block; font-size: 1.7rem; font-weight: 500; }
.stats span { font-size: 12px; color: #555; text-transform: uppercase; letter-spacing: .05em; }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #666; border-bottom: 1px solid var(--line); padding: 8px 8px; }
table.list td { border-bottom: 1px solid #eee; padding: 10px 8px; vertical-align: top; }
table.list .num { text-align: right; }
table.kv { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 14px; }
table.kv th { text-align: left; font-weight: 400; color: var(--muted); width: 38%; padding: 6px 0; vertical-align: top; }
table.kv td { padding: 6px 0; }
.searchbar { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; margin-bottom: 20px; }
.searchbar .check { margin: 0; }
.qr { display: flex; justify-content: center; margin: 16px auto; }
.qr img, .qr canvas { width: 200px; height: 200px; }

body.stampa { background: #fff; }
.poster { max-width: 680px; margin: 40px auto; text-align: center; padding: 40px; border: 1px solid var(--line); }
.poster-logo { height: 42px; margin-bottom: 30px; }
.poster h1 { font-size: 2.4rem; }
.qr-big img, .qr-big canvas { width: 340px; height: 340px; }
.poster-url { font-size: 1.2rem; letter-spacing: .03em; }
@media print { .noprint { display: none; } .poster { border: 0; margin: 0 auto; } }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .searchbar { grid-template-columns: 1fr; }
  .top { padding: 14px 16px; }
  .top nav a { margin-left: 12px; }
  h1 { font-size: 1.5rem; }
}
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } .row3b { grid-template-columns: 1fr 1.6fr; } .row3b .field:last-child { grid-column: 1 / -1; } }
