/* ============================================================
   Szabászati Kalkulátor — stílusok („Műhely / fa" arculat)
   ============================================================ */
:root {
  /* Papír & háttér */
  --bg: #efe5d3;
  --card: #fdf9f1;
  --card-2: #f6eede;
  --ink: #2b2118;
  --ink-soft: #4a3a28;
  --muted: #8a7559;
  --line: #e4d7bf;
  --line-2: #d8c5a3;

  /* Fa tónusok */
  --walnut: #6b4423;
  --walnut-d: #4a2f17;
  --oak: #c8862a;
  --oak-d: #a86a18;
  --oak-l: #e0a849;

  /* Jelzőszínek */
  --danger: #b0392c;
  --waste-d: #d3c0a0;

  --shadow: 0 1px 2px rgba(74, 47, 23, .08), 0 4px 14px rgba(74, 47, 23, .07);
  --shadow-lg: 0 8px 28px rgba(74, 47, 23, .14);
  --r: 14px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 130% 80% at 50% -10%, rgba(255, 251, 243, .75), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.5;
  /* Nincs fix alsó hirdetősáv (helykitöltő elrejtve). Ha visszakerül, ~110px. */
  padding-bottom: 24px;
}

/* ---------- Fejléc: fa-erezetű, vésett cím ---------- */
header {
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .05) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 13px),
    linear-gradient(135deg, #7a4f2a, var(--walnut-d));
  color: #fdf3e3;
  padding: 22px 16px;
  position: sticky; top: 0; z-index: 20;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .22), 0 2px 10px rgba(74, 47, 23, .3);
  border-bottom: 1px solid rgba(0, 0, 0, .3);
}
.header-inner { max-width: 820px; margin: 0 auto; }
header h1 {
  margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 700;
  display: flex; align-items: center; gap: 10px; letter-spacing: .01em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .45), 0 2px 4px rgba(0, 0, 0, .22);
}
header p { margin: 6px 0 0; font-size: 13.5px; opacity: .88; color: #f3e3cc; }
main { max-width: 820px; margin: 0 auto; padding: 18px 16px; }

/* ---------- „Hogyan működik?" bevezető sáv ---------- */
.how {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  background: linear-gradient(var(--card), var(--card-2));
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px;
}
.how-step { display: flex; gap: 12px; align-items: flex-start; }
.how-num {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--oak-l), var(--oak-d)); color: #3a2208;
  font-weight: 800; font-family: var(--serif); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 0 var(--walnut-d);
}
.how-step b { display: block; font-size: 13.5px; color: var(--walnut-d); margin-bottom: 2px; }
.how-step p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
@media (max-width: 640px) { .how { grid-template-columns: 1fr; gap: 13px; padding: 16px; } }

/* ---------- Kártya: krém papír ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.card > h2 {
  margin: 0 0 14px;
  font-family: var(--serif); font-size: 18px; font-weight: 700;
  color: var(--walnut-d); letter-spacing: .005em;
  display: flex; align-items: center; gap: 10px;
}
.card > h2::before {
  content: ""; flex: 0 0 auto; width: 4px; height: 20px; border-radius: 2px;
  background: linear-gradient(var(--oak-l), var(--oak-d));
}
.card-hint { margin: -6px 0 16px; font-size: 13px; color: var(--muted); line-height: 1.5; }
h3.sub {
  font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 700; margin: 18px 0 3px;
}
.sub-hint { margin: 0 0 9px; font-size: 12px; color: var(--muted); line-height: 1.45; }
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 5px; font-weight: 600; }
input[type=text], input[type=number], select {
  width: 100%; padding: 11px 12px; font-size: 16px; font-family: inherit;
  border: 1.5px solid var(--line-2); border-radius: 10px; background: #fffdf8; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--oak); box-shadow: 0 0 0 3px rgba(200, 134, 42, .18); }
input.computed { background: var(--card-2); color: var(--ink-soft); font-weight: 700; }
.row { display: flex; gap: 8px; align-items: flex-end; }
.row > * { flex: 1; }
.row .shrink { flex: 0 0 auto; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Mértékegység-kapcsoló (segmented) ---------- */
.seg {
  display: inline-flex; background: var(--card-2);
  border: 1.5px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 3px;
}
.seg button {
  background: transparent; border: none; padding: 8px 18px; border-radius: 7px;
  font-weight: 700; font-size: 14px; color: var(--muted); font-family: inherit; cursor: pointer;
  transition: background .15s, color .15s;
}
.seg button.active {
  background: linear-gradient(135deg, var(--oak-l), var(--oak-d));
  color: #3a2208; box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}

/* ---------- Anyag-kártya ---------- */
.profile {
  border: 1px solid var(--line); border-left: 5px solid var(--walnut);
  border-radius: var(--r); padding: 15px 42px 15px 15px; margin-bottom: 14px;
  background: linear-gradient(var(--card), var(--card-2)); position: relative;
}
.profile-del {
  position: absolute; top: 8px; right: 8px;
  background: transparent; color: var(--danger);
  font-size: 20px; padding: 2px 8px; line-height: 1; font-weight: 700; border: none;
}
.profile-del:hover { filter: brightness(.8); }

.line-item { display: grid; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.line-item:last-child { border-bottom: none; }
.line-item .hd { font-size: 11px; color: var(--muted); font-weight: 600; }
.piece-item { grid-template-columns: 1.6fr 1.2fr .9fr auto; }

/* Szálhossz chip-ek — kompakt inline elrendezés */
.stocks-host { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; align-items: center; }
.stock-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--card-2); border: 1.5px solid var(--line-2); border-radius: 20px;
  padding: 5px 8px 5px 12px;
}
.stock-chip:focus-within { border-color: var(--oak); box-shadow: 0 0 0 2px rgba(200, 134, 42, .15); }
.stock-len-inp, .stock-price-inp {
  border: none; background: transparent; font-size: 14px; font-weight: 700;
  color: var(--ink); padding: 0; outline: none; width: 44px; font-family: inherit;
}
.stock-price-inp { width: 68px; color: var(--muted); font-weight: 600; }
.chip-unit { font-size: 12px; color: var(--muted); font-weight: 600; }
.chip-sep { font-size: 12px; color: var(--line-2); padding: 0 2px; }
.chip-del { background: transparent; border: none; color: var(--danger); font-size: 16px; padding: 0 2px; line-height: 1; cursor: pointer; font-family: inherit; }
.stock-chip-add {
  font-size: 18px; font-weight: 400; color: var(--muted); padding: 3px 13px;
  border-style: dashed; cursor: pointer; border-radius: 20px;
}
.stock-chip-add:hover { border-color: var(--oak); color: var(--oak-d); background: #fbf4e6; }

/* Szakaszfejléc a beágyazott mértékegység-kapcsolóval (darabok) */
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 3px; flex-wrap: wrap; }
.sub-head .seg { padding: 2px; }
.sub-head .seg button { padding: 5px 12px; font-size: 13px; }

/* ---------- Gombok: tapintható, fa-tónusú ---------- */
button {
  font-family: inherit; font-size: 15px; cursor: pointer; border: none;
  border-radius: 10px; padding: 11px 16px; font-weight: 700;
  transition: transform .06s, filter .15s, box-shadow .15s, border-color .15s, background .15s;
}
button:active { transform: scale(.98); }
.btn-add { background: var(--card-2); color: var(--walnut-d); border: 1.5px dashed var(--line-2); width: 100%; margin-top: 8px; font-size: 14px; }
.btn-add:hover { border-color: var(--oak); color: var(--oak-d); background: #fbf4e6; }
.btn-soft { background: var(--card-2); color: var(--walnut-d); border: 1.5px solid var(--line-2); width: 100%; font-size: 14px; }
.btn-soft:hover { border-color: var(--oak); color: var(--oak-d); background: #fbf4e6; }
.example-btn { margin-top: 10px; }
.price-toggle { margin-top: 6px; }
.btn-link { background: none; border: none; color: var(--oak-d); text-decoration: underline; font-size: 13px; padding: 6px 0 0; width: auto; font-weight: 600; }
.btn-link:hover { color: var(--walnut-d); }
.btn-del { background: transparent; color: var(--danger); font-size: 22px; padding: 4px 10px; line-height: 1; font-weight: 700; }
.btn-del:hover { filter: brightness(.85); }
.btn-primary {
  background: linear-gradient(135deg, var(--oak-l), var(--oak-d));
  color: #3a2208; width: 100%; font-size: 18px; padding: 16px;
  box-shadow: 0 3px 0 var(--walnut-d), var(--shadow);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 0 0 var(--walnut-d), var(--shadow); }
.btn-primary:disabled { cursor: progress; filter: saturate(.6) brightness(.97); box-shadow: 0 3px 0 var(--walnut-d), var(--shadow); }
.btn-primary.is-busy { animation: busy-pulse 1.1s ease-in-out infinite; }
@keyframes busy-pulse { 50% { filter: saturate(.6) brightness(1.05); } }
.btn-ghost { background: var(--card-2); color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--oak); color: var(--walnut-d); }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > button { flex: 1; min-width: 120px; }
.add-profile-row { display: flex; gap: 8px; margin-bottom: 0; }
.add-profile-row > button { flex: 1; }

/* Részletes terv — hangsúlyos teljes szélességű toggle gomb */
.btn-detail-toggle {
  width: 100%; margin: 14px 0 0;
  background: var(--card); border: 2px solid var(--walnut);
  color: var(--walnut-d); font-size: 14px; font-weight: 700;
  padding: 12px 16px; border-radius: var(--r); text-align: center; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-detail-toggle:hover { background: var(--card-2); border-color: var(--walnut-d); }
.btn-detail-toggle.open { background: var(--card-2); border-color: var(--oak); color: var(--oak-d); }

/* Eredmény: műveleti sáv + összegző alcímek */
.action-bar { margin: 16px 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.action-hint { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--ink-soft); text-align: center; }
.summary-sub { margin: -8px 0 12px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

.error { background: #fbeae7; color: #8c2d20; border: 1.5px solid #e8b6ad; border-radius: 10px; padding: 12px; margin-bottom: 12px; font-size: 14px; }
.hidden { display: none !important; }
/* Hirdetés-helykitöltők elrejtve a jóváhagyásig — vedd le az .ad-pending osztályt. */
.ad-pending { display: none !important; }

/* ---------- Összegzés / statisztika ---------- */
.summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: linear-gradient(var(--card-2), #f1e7d4); border: 1px solid var(--line); border-radius: 12px; padding: 13px; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 3px; font-family: var(--serif); }
.stat .v.big { font-size: 27px; }
.stat.cost .v { color: var(--walnut); }
.stat.span2 { grid-column: span 2; }

.result-profile { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; background: var(--card); box-shadow: var(--shadow); }
.result-profile h3 { margin: 0 0 12px; font-size: 17px; font-family: var(--serif); color: var(--walnut-d); }
.result-profile h3 .tag { font-size: 12px; font-weight: 700; color: #fdf3e3; background: var(--walnut); padding: 3px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; font-family: system-ui, sans-serif; }

/* ---------- 1D szál vizualizáció ---------- */
.bar-wrap { margin: 14px 0; }
.bar-label { font-size: 13px; font-weight: 700; margin-bottom: 5px; color: var(--ink-soft); }
.bar { display: flex; width: 100%; height: 42px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); background: var(--waste-d); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .08); }
.seg-bar { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 600; overflow: hidden; white-space: nowrap; text-shadow: 0 1px 1px rgba(0, 0, 0, .3); min-width: 0; }
.seg-bar.waste { background: var(--waste-d); color: var(--muted); text-shadow: none; }
.cutlist { font-size: 13px; color: var(--muted); margin-top: 5px; }
.cutlist b { color: var(--ink); }

/* ---------- Rendelési összesítők ---------- */
.order-tbl { width: 100%; border-collapse: collapse; margin-top: 12px; }
.order-tbl th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 700;
  padding: 0 0 8px; border-bottom: 2px solid var(--ink); text-align: left;
}
.order-tbl th + th { padding-left: 12px; }
.order-tbl th:last-child, .order-tbl td:last-child { text-align: right; padding-right: 0; }
.order-tbl td { padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.order-tbl td + td { padding-left: 12px; }
.order-tbl tbody tr:last-child td { border-bottom: none; }
.or-name { font-weight: 700; color: var(--ink); }
.or-sub { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; font-weight: 400; }
.or-cost { font-weight: 800; color: var(--walnut); white-space: nowrap; font-family: var(--serif); }
.or-cuts { font-weight: 800; color: var(--ink); white-space: nowrap; font-family: var(--serif); }
/* Megrendelő: a szálszám a hangsúlyos (ezt húzza a fatelep) */
.or-bars { display: block; font-weight: 800; color: var(--walnut-d); font-size: 15px; }
.or-bars-total { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 600; }
.or-bars-sum { font-weight: 800; color: var(--walnut); white-space: nowrap; font-family: var(--serif); font-size: 18px; }
.order-tbl .total-row td { border-top: 2px solid var(--walnut) !important; border-bottom: none !important; padding-top: 11px; }
.order-tbl .total-row .or-cost { font-size: 21px; }
.order-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; border-top: 1px solid var(--line); padding-top: 9px; line-height: 1.55; }

/* Megrendelő/projekt fejléc-mező */
.order-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.order-meta-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: 0; white-space: nowrap; }
.order-name-inp { flex: 1; min-width: 160px; padding: 8px 10px; font-size: 14px; border: 1.5px solid var(--line-2); border-radius: 8px; background: #fffdf8; }
.order-name-inp:focus { outline: none; border-color: var(--oak); box-shadow: 0 0 0 3px rgba(200, 134, 42, .18); }
.order-date { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }

/* Összesítők megkülönböztetése */
.customer-summary { border-top: 3px solid var(--oak); }
.order-summary { border-top: 3px solid var(--walnut); }

/* ---------- Lead-gen: teljes szélességű partner-sáv ---------- */
.partner-zone {
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .05) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 13px),
    linear-gradient(160deg, #5c3d20, #2e1c0d);
  border-top: 3px solid rgba(0, 0, 0, .35);
  border-bottom: 3px solid rgba(0, 0, 0, .35);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, .12), 0 4px 18px rgba(0, 0, 0, .12);
  margin-bottom: 0;
}
.partner-label {
  margin: 0; padding: 10px 16px 0;
  text-align: center; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: rgba(255, 255, 255, .28);
}
.lead {
  max-width: 820px; margin: 0 auto;
  color: #fdf3e3; text-align: center; padding: 20px 20px 28px;
  background: none; border: none; border-radius: 0; box-shadow: none;
}
.lead h3 { margin: 0 0 8px; font-size: 22px; font-family: var(--serif); font-weight: 700; }
.lead p { margin: 0 auto 18px; font-size: 14px; opacity: .88; max-width: 520px; line-height: 1.6; }
.lead-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lead a.call, .lead a.visit { display: inline-flex; align-items: center; gap: 8px; justify-content: center; text-decoration: none; padding: 14px 24px; border-radius: 10px; font-weight: 700; font-size: 15px; transition: filter .15s, transform .06s; }
.lead a.call { background: linear-gradient(135deg, var(--oak-l), var(--oak-d)); color: #3a2208; box-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 4px 12px rgba(0, 0, 0, .2); }
.lead a.visit { background: rgba(255, 255, 255, .1); color: #fdf3e3; border: 1px solid rgba(255, 255, 255, .28); }
.lead a.call:hover, .lead a.visit:hover { filter: brightness(1.08); }
.lead a.call:active, .lead a.visit:active { transform: translateY(2px); }

#adBar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line-2); min-height: 60px; display: flex; align-items: center; justify-content: center; padding: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0)); font-size: 12px; color: var(--muted); }

/* In-content hirdetőhely (az eredmény után) */
.ad-inline { margin: 18px 0 4px; text-align: center; }
.ad-tag { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin-bottom: 6px; opacity: .7; }
.ad-box { background: var(--card-2); border: 1.5px dashed var(--line-2); border-radius: 12px; min-height: 110px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; padding: 16px; }

/* ---------- Desktop oldaldobozok (sticky sidebar) ---------- */
.page-wrap { display: flex; justify-content: center; align-items: flex-start; gap: 16px; }
.sidebar { flex: 0 0 160px; position: sticky; top: 80px; min-height: 600px; }
.sidebar-slot {
  width: 160px; min-height: 600px;
  background: var(--card-2); border: 1.5px dashed var(--line-2); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted);
}
/* Csak 1200px+ felett (820 tartalom + 2×160 + rések) */
@media (max-width: 1199px) { .sidebar { display: none !important; } }

.site-footer { text-align: center; padding: 4px 16px 8px; }
.site-footer a { color: var(--muted); font-size: 12.5px; text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--walnut-d); text-decoration: underline; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--walnut-d); color: #fdf3e3; padding: 12px 20px; border-radius: 999px; font-size: 14px; z-index: 50; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

.saved-list { display: flex; flex-direction: column; gap: 6px; }
.saved-row { display: flex; gap: 8px; align-items: center; }
.saved-row .nm { flex: 1; font-weight: 600; font-size: 14px; }

.print-only { display: none; }

@media (max-width: 540px) { .order-tbl .hide-sm { display: none; } }
@media (max-width: 480px) {
  .summary { grid-template-columns: 1fr 1fr; }
  header h1 { font-size: 21px; }
}

/* ============================================================
   Nyomtatás — palettafüggetlen fekete/fehér
   ============================================================ */
@media print {
  @page { margin: 15mm; }
  body { background: #fff; padding: 0; font-size: 11pt; color: #000; }
  header {
    position: static; background: none !important; color: #000;
    box-shadow: none; padding: 0 0 8pt; border-bottom: 2pt solid #000; margin-bottom: 4pt;
  }
  header h1 { font-size: 15pt; color: #000; }
  header p { color: #444; font-size: 10pt; }
  .no-print, #adBar, .btn-row, .btn-add, .btn-soft, .btn-primary, .add-profile-row,
  #inputSection, .how, .lead, .toggle-details, .section-heading,
  .sidebar, .action-bar, .summary-sub { display: none !important; }

  /* Összesítők (ügyfél + megrendelő) */
  .customer-summary, .order-summary {
    box-shadow: none !important; border: 1.5pt solid #000 !important;
    page-break-inside: avoid; margin-bottom: 14pt;
  }
  .customer-summary h2, .order-summary h2 { font-size: 12pt; }
  .order-tbl th { border-bottom-color: #000; border-bottom-width: 1.5pt; }
  .order-tbl td { border-bottom-color: #ddd; }
  .order-tbl .total-row td { border-top-color: #000 !important; }
  .or-cost, .order-tbl .total-row .or-cost { color: #000 !important; }
  .or-bars, .or-bars-sum { color: #000 !important; }
  .or-bars-total { color: #444 !important; }
  .order-note { color: #555; }
  /* Megrendelő fejléc nyomtatva: az input tiszta szövegként, kitölthető aláhúzással */
  .order-meta { margin: 6pt 0 10pt; gap: 6pt; }
  .order-name-inp {
    border: none !important; border-bottom: 0.5pt solid #000 !important; border-radius: 0 !important;
    box-shadow: none !important; padding: 0 4pt !important; font-weight: 700; min-width: 220pt;
  }
  .order-date { color: #000 !important; }

  /* Részletes vágási terv */
  .result-profile { box-shadow: none !important; border: 1pt solid #ccc !important; page-break-inside: avoid; margin-bottom: 10pt; }
  .result-profile h3 { font-size: 12pt; padding-bottom: 5pt; border-bottom: 0.5pt solid #ddd; margin-bottom: 8pt; }
  .result-profile h3 .tag { background: #555 !important; color: #fff !important; }
  .summary { gap: 6pt; margin-bottom: 8pt; }
  .stat { border: 0.5pt solid #ccc; padding: 7pt; }
  .stat .k { font-size: 9pt; }
  .stat .v { font-size: 13pt; }
  .stat.cost .v { color: #000 !important; }
  .bar { border: 1pt solid #444; height: 26px; }
  .seg-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .seg-bar.waste { background: #ddd !important; color: #666 !important; text-shadow: none !important; }
  .bar-label { font-size: 9.5pt; font-weight: 700; margin-bottom: 2pt; }
  .bar-wrap { page-break-inside: avoid; margin-bottom: 7pt; }
  .cutlist { font-size: 9pt; }
  .card { box-shadow: none; border: 1pt solid #ccc; page-break-inside: avoid; }
  main { max-width: none; padding: 0; }
  .page-wrap { display: block; }
  .print-only { display: block !important; }
}
