/* ============================================================
   Demo Cuina de la Plaça (Minairó) — estils
   Paleta: verd sage, crema, kraft, tinta i daurat
   del logo + crema + kraft + tinta carbó + daurat càlid.
   ============================================================ */

:root {
  --sage:        #6f8068;
  --sage-dark:   #54624d;
  --sage-light:  #8a9b82;
  --sage-soft:   #e7ece2;
  --cream:       #f6f1e7;
  --cream-2:     #fbf8f1;
  --ivory:       #fffdf8;
  --kraft:       #c8a87c;
  --kraft-dark:  #a8855a;
  --ink:         #2f2b25;
  --ink-soft:    #6b645a;
  --gold:        #d9a441;
  --red:         #a8432f;
  --line:        #e6ddcc;
  --ok:          #4c8a5a;
  --shadow:      0 6px 24px rgba(47, 43, 37, 0.10);
  --shadow-sm:   0 2px 8px rgba(47, 43, 37, 0.08);
  --radius:      16px;
  --radius-sm:   10px;
  --maxw:        1180px;

  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-hand: "Caveat", "Segoe Script", cursive;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  font-size: 17px;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; color: var(--ink); margin: 0 0 .4em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
a { color: var(--sage-dark); }

.hand { font-family: var(--font-hand); font-weight: 700; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ---------- Capçalera ---------- */
.site-header {
  background: var(--sage);
  color: var(--cream-2);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.site-header .container { display: flex; align-items: center; gap: 14px; padding: 12px 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.55); background: var(--cream); }
.brand .name { font-family: var(--font-hand); font-size: 1.7rem; line-height: 1; }
.brand .sub { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.nav { margin-left: auto; display: flex; gap: 6px; }
.nav a {
  color: var(--cream-2); text-decoration: none; padding: 8px 14px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; transition: background .15s;
}
.nav a:hover { background: rgba(255,255,255,.14); }
.nav a.active { background: rgba(255,255,255,.22); }
.nav a.disabled { opacity: .55; cursor: default; }
@media (max-width: 560px) {
  .site-header .container { gap: 8px; padding: 10px 14px; }
  .brand .sub { display: none !important; }
  .brand .name { font-size: 1.45rem; }
  .brand img { width: 38px; height: 38px; }
  .nav { gap: 2px; }
  .nav a { padding: 6px 10px; font-size: .82rem; }
}

/* ---------- Hero ---------- */
.hero { padding: 46px 0 26px; }
.hero .kicker { font-family: var(--font-hand); font-size: 1.7rem; color: var(--red); }
.hero p.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 60ch; }

/* ---------- Layout calculadora ---------- */
.calc-layout { display: grid; grid-template-columns: 1fr 360px; gap: 26px; align-items: start; padding-bottom: 60px; }
@media (max-width: 900px) { .calc-layout { grid-template-columns: 1fr; } }

.card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.card h2 { display: flex; align-items: center; gap: 10px; }
.step-num {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--sage); color: #fff; font-family: var(--font-body); font-weight: 800; font-size: .95rem;
  flex: none;
}
.card .help { color: var(--ink-soft); font-size: .95rem; margin: -4px 0 16px; }

/* ---------- Inputs ---------- */
label { font-weight: 700; display: block; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], textarea, select {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
textarea { resize: vertical; min-height: 86px; }
.field { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* Stepper numèric */
.stepper { display: flex; align-items: center; gap: 0; max-width: 190px; }
.stepper button {
  width: 44px; height: 46px; border: 1.5px solid var(--line); background: var(--cream-2);
  font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--sage-dark);
}
.stepper button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.stepper button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.stepper input { width: 70px; text-align: center; border-left: 0; border-right: 0; border-radius: 0; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Opcions tipus targeta (menús) ---------- */
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.opt {
  position: relative; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 14px 14px 14px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s, transform .05s;
}
.opt:hover { border-color: var(--sage-light); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt.selected { border-color: var(--sage); background: var(--sage-soft); box-shadow: 0 0 0 2px var(--sage-soft) inset; }
.opt .opt-nom { font-weight: 800; font-size: 1.02rem; }
.opt .opt-preu { color: var(--sage-dark); font-weight: 800; }
.opt .opt-desc { font-size: .86rem; color: var(--ink-soft); margin-top: 4px; }
.opt .opt-foto { width: 100%; height: 92px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }

/* Files de quantitat (per compartir / extres) */
.qty-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; background: #fff; transition: border-color .15s, background .15s; }
.qty-row.has { border-color: var(--sage); background: var(--sage-soft); }
.qty-row .qr-thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.qty-row .qr-info { flex: 1; min-width: 0; }
.qty-row .qr-nom { font-weight: 700; }
.qty-row .qr-unit { font-size: .82rem; color: var(--ink-soft); }
.qty-row .qr-preu { font-weight: 800; color: var(--sage-dark); white-space: nowrap; }
.stepper.mini { max-width: 122px; flex: none; }
.stepper.mini button { width: 34px; height: 36px; font-size: 1.1rem; }
.stepper.mini input { width: 40px; }

/* ---------- Plats a la carta ---------- */
.cat-group { margin-top: 12px; }
.cat-group > h4 { font-family: var(--font-body); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--kraft-dark); margin: 14px 0 8px; }
.plat-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s;
}
.plat-row:hover { border-color: var(--sage-light); }
.plat-row.selected { border-color: var(--sage); background: var(--sage-soft); }
.plat-row input { width: 20px; height: 20px; accent-color: var(--sage); flex: none; }
.plat-row .plat-nom { flex: 1; }
.plat-row .plat-preu { font-weight: 800; color: var(--sage-dark); white-space: nowrap; }

/* ---------- Switch ---------- */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #cfc7b6; border-radius: 999px; transition: .2s; cursor: pointer; }
.slider::before { content: ""; position: absolute; height: 24px; width: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + .slider { background: var(--sage); }
.switch input:checked + .slider::before { transform: translateX(22px); }

.subpanel { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.note-inline { font-size: .9rem; color: var(--ink-soft); background: var(--cream-2); border-left: 3px solid var(--kraft); padding: 8px 12px; border-radius: 6px; }

/* ---------- Resum (sticky) ---------- */
.summary { position: sticky; top: 86px; }
.summary .card { background: var(--sage); color: var(--cream-2); border: none; }
.summary h2 { color: #fff; }
.summary .lines { margin: 8px 0 12px; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed rgba(255,255,255,.22); font-size: .96rem; }
.sum-line.sub { font-size: .9rem; opacity: .9; padding-left: 12px; border-bottom: none; }
.sum-line .lbl { flex: 1; }
.sum-empty { opacity: .8; font-style: italic; padding: 6px 0 12px; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 12px; border-top: 2px solid rgba(255,255,255,.4); }
.sum-total .big { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: #fff; }
.summary .perpax { text-align: right; font-size: .85rem; opacity: .85; margin-top: 2px; }

/* ---------- Botons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 999px; border: none; cursor: pointer;
  font: inherit; font-weight: 800; text-decoration: none; transition: transform .05s, filter .15s, background .15s; width: 100%;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: #3a2e10; }
.btn-gold:hover { filter: brightness(1.05); }
.btn-cream { background: var(--cream-2); color: var(--sage-dark); }
.btn-cream:hover { filter: brightness(.97); }
.btn-ghost { background: transparent; color: var(--cream-2); border: 1.5px solid rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-block { margin-top: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Toast / modal ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 999px; box-shadow: var(--shadow);
  z-index: 200; transition: transform .3s; max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.ok { background: var(--ok); }

.modal-back { position: fixed; inset: 0; background: rgba(47,43,37,.5); display: none; place-items: center; z-index: 150; padding: 20px; }
.modal-back.show { display: grid; }
.modal { background: var(--ivory); border-radius: var(--radius); max-width: 460px; width: 100%; padding: 26px; box-shadow: var(--shadow); }
.modal h3 { font-size: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--sage-dark); color: var(--cream); padding: 30px 0; margin-top: 30px; }
.site-footer a { color: var(--cream); }

/* ---------- Portal (index) ---------- */
.portal { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px;
  background: linear-gradient(180deg, var(--sage) 0%, var(--sage-dark) 100%); color: var(--cream-2); }
.portal-inner { text-align: center; max-width: 760px; }
.portal img.logo { width: 120px; height: 120px; border-radius: 50%; border: 3px solid rgba(255,255,255,.6); object-fit: cover; background: var(--cream); }
.portal h1 { color: #fff; font-family: var(--font-hand); font-size: clamp(3rem, 9vw, 5rem); margin: 14px 0 2px; }
.portal .tagline { letter-spacing: .18em; text-transform: uppercase; font-size: .85rem; opacity: .85; }
.portal-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; }
@media (max-width: 620px) { .portal-cards { grid-template-columns: 1fr; } }
.portal-card {
  background: var(--ivory); color: var(--ink); border-radius: var(--radius); padding: 30px 22px;
  text-decoration: none; box-shadow: var(--shadow); transition: transform .12s; display: block;
}
.portal-card:hover { transform: translateY(-4px); }
.portal-card .emoji { font-size: 2.6rem; }
.portal-card h2 { margin: 10px 0 6px; }
.portal-card p { color: var(--ink-soft); margin: 0; font-size: .96rem; }
.portal-card.soon { opacity: .85; cursor: default; }
.portal-card .badge-soon { display: inline-block; margin-top: 10px; background: var(--gold); color: #3a2e10; font-weight: 800; font-size: .78rem; padding: 3px 12px; border-radius: 999px; }

/* ============================================================
   PANELL ADMIN
   ============================================================ */
.login-overlay { position: fixed; inset: 0; background: linear-gradient(180deg, var(--sage) 0%, var(--sage-dark) 100%); display: grid; place-items: center; z-index: 300; padding: 20px; }
.login-box { background: var(--ivory); border-radius: var(--radius); padding: 32px; max-width: 360px; width: 100%; text-align: center; box-shadow: var(--shadow); }
.login-box img { width: 90px; height: 90px; border-radius: 50%; }
.login-box h2 { margin: 14px 0 4px; }
.login-box input { text-align: center; font-size: 1.3rem; letter-spacing: .2em; margin: 14px 0; }
.login-err { color: var(--red); font-size: .9rem; min-height: 1.2em; }

.admin-bar { background: var(--sage); color: var(--cream-2); position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }
.admin-bar .container { display: flex; align-items: center; gap: 12px; padding: 10px 20px; flex-wrap: wrap; }
.admin-bar img { width: 40px; height: 40px; border-radius: 50%; }
.admin-bar .name { font-family: var(--font-hand); font-size: 1.5rem; }
.pill-mode { margin-left: auto; font-size: .78rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.pill-mode.cloud { background: #2f6b3f; color: #d9f2dd; }
.pill-mode.local { background: var(--gold); color: #3a2e10; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 0 0; }
.tab-btn { padding: 9px 16px; border: 1.5px solid var(--line); background: var(--ivory); border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; color: var(--ink-soft); }
.tab-btn.active { background: var(--sage); color: #fff; border-color: var(--sage); }
.tab-panel { display: none; padding: 22px 0 60px; }
@media (max-width: 560px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
  .tab-btn { flex: none; white-space: nowrap; padding: 8px 13px; font-size: .85rem; }
}
.tab-panel.active { display: block; }

.editor-group { margin-bottom: 26px; }
.editor-group > h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.editor-row { display: flex; flex-direction: column; gap: 12px; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.editor-row.inactiu { opacity: .55; }
.editor-row .er-top { display: flex; align-items: center; gap: 14px; }
.editor-row .thumb { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; background: var(--cream-2); border: 1px solid var(--line); cursor: pointer; display: grid; place-items: center; font-size: 1.4rem; color: var(--kraft-dark); position: relative; flex: none; }
.editor-row .thumb::after { content: "✎"; position: absolute; right: -5px; bottom: -5px; background: var(--sage); color: #fff; width: 20px; height: 20px; border-radius: 50%; font-size: .72rem; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.editor-row .er-namewrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.editor-row .er-namewrap input[type="text"] { width: 100%; padding: 9px 11px; }
.editor-row .er-namewrap > input:first-child { font-weight: 700; }
.editor-row .er-namewrap input.er-unit-input { font-size: .82rem; padding: 6px 9px; color: var(--ink-soft); max-width: 260px; }
.editor-row .er-cat { font-size: .75rem; color: var(--kraft-dark); text-transform: uppercase; letter-spacing: .05em; }
.editor-row .er-bottom { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.editor-row .er-price { display: flex; flex-direction: column; gap: 2px; }
.editor-row .er-price input { width: 110px; padding: 9px 11px; }
.editor-row .er-price .u { font-size: .72rem; color: var(--ink-soft); white-space: nowrap; }
.editor-row .er-ref { font-size: .72rem; color: var(--kraft-dark); white-space: nowrap; font-weight: 700; }
.editor-row .er-actiu-wrap { display: flex; align-items: center; gap: 10px; flex: none; }
.editor-row .er-actiu-wrap .switch { flex: none; }
.editor-row .er-actiu-wrap .lbl { font-size: .85rem; color: var(--ink-soft); font-weight: 700; }
.editor-row .er-foto-actions { display: flex; gap: 8px; margin-left: auto; }
.editor-row .btn-mini { width: auto; padding: 8px 12px; font-size: .8rem; border-radius: 8px; }
.editor-row .er-del { background: #f4e3df; color: var(--red); }
.editor-row .er-del:hover { background: #ecd2cc; }
@media (max-width: 520px) {
  .editor-row .er-foto-actions { margin-left: 0; }
}

.save-bar { position: sticky; bottom: 0; background: var(--cream); border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 12px; align-items: center; z-index: 40; }
.save-bar .btn { width: auto; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; }
.gallery-grid figure { margin: 0; cursor: pointer; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--cream-2); }
.gallery-grid figure:hover { border-color: var(--sage); }
.gallery-grid img { width: 100%; height: 90px; object-fit: cover; display: block; }
.gallery-grid figcaption { font-size: .72rem; padding: 4px 6px; color: var(--ink-soft); }
.modal.wide { max-width: 640px; }

.list-card { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; }
.list-card .top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.list-card .top strong { font-size: 1.05rem; }
.list-card .meta { font-size: .85rem; color: var(--ink-soft); }
.link-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.link-row input { font-family: monospace; font-size: .85rem; background: var(--cream-2); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--sage-soft); color: var(--sage-dark); }
.badge.nou { background: var(--gold); color: #3a2e10; }

/* ============================================================
   PANELL PRO (dashboard amb sidebar)
   ============================================================ */
.dash-body { background: var(--cream); }
.dash { display: flex; min-height: 100vh; }
.tab-panel.active { display: block; }

.dash-side { width: 244px; flex: none; background: var(--sage-dark); color: var(--cream-2); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40; }
.dash-brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 14px; }
.dash-brand img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); background: var(--cream); object-fit: cover; }
.dash-brand .name { font-family: var(--font-hand); font-size: 1.5rem; line-height: 1; display: block; }
.dash-brand .sub { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.dash-nav { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.dash-nav .tab-btn { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: transparent; border: none; color: var(--cream-2); padding: 12px 14px; border-radius: 10px; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; transition: background .12s; }
.dash-nav .tab-btn .i { font-size: 1.1rem; width: 22px; text-align: center; }
.dash-nav .tab-btn:hover { background: rgba(255,255,255,.12); }
.dash-nav .tab-btn.active { background: var(--gold); color: #3a2e10; }
.dash-side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.16); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.dash-weblink { color: var(--cream-2); opacity: .85; font-size: .85rem; text-decoration: none; }
.dash-weblink:hover { opacity: 1; }

.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-top { display: flex; align-items: center; gap: 14px; padding: 14px 24px; background: var(--ivory); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.dash-top strong { font-family: var(--font-head); font-size: 1.25rem; }
.dash-burger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--ink); line-height: 1; }
.dash-content { padding: 24px; max-width: 1120px; width: 100%; }
.dash-backdrop { display: none; }

.dash-hello h1 { font-family: var(--font-hand); color: var(--sage-dark); font-size: clamp(2.2rem, 6vw, 3rem); margin: 0 0 4px; }
.dash-hello p { max-width: 60ch; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 18px 0 28px; }
.kpi { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.kpi .num { font-family: var(--font-head); font-size: 2.1rem; line-height: 1; color: var(--sage-dark); }
.kpi .lbl { color: var(--ink-soft); font-size: .88rem; margin-top: 4px; }

.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.quick-actions .qa { display: flex; align-items: center; gap: 13px; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; text-align: left; font: inherit; box-shadow: var(--shadow-sm); transition: transform .1s, border-color .12s; }
.quick-actions .qa:hover { transform: translateY(-2px); border-color: var(--sage-light); }
.quick-actions .qa .emoji { font-size: 1.9rem; flex: none; }
.quick-actions .qa strong { display: block; color: var(--ink); }
.quick-actions .qa span { color: var(--ink-soft); font-size: .85rem; }

/* Creador de pressupostos */
.builder { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.builder-sum { position: sticky; top: 84px; }
.builder-sum .card { background: var(--sage); color: var(--cream-2); border: none; }
.builder-sum h3 { color: #fff; margin-top: 0; }
.b-qty .qty-row { margin-bottom: 8px; }
.b-qty:empty::after { content: "Cap producte actiu."; color: var(--ink-soft); font-size: .9rem; }

@media (max-width: 900px) {
  .builder { grid-template-columns: 1fr; }
  .builder-sum { position: static; }
}
@media (max-width: 860px) {
  .dash-side { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .dash-side.open { transform: translateX(0); }
  .dash-burger { display: block; }
  .dash-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(47,43,37,.45); z-index: 35; }
  .dash-content { padding: 18px 16px 40px; }
}

/* ---------- Print (PDF bàsic) ---------- */
@media print {
  .site-header, .site-footer, .nav, .btn, .actions, .hero .lead, .toast, .modal-back { display: none !important; }
  body { background: #fff; font-size: 13px; }
  .calc-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .summary .card { background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line) !important; }
  .summary h2, .summary .sum-total .big { color: var(--ink) !important; }
  .sum-line { border-color: var(--line) !important; }
  .card { box-shadow: none; break-inside: avoid; }
}
