/* Energiahíd belső felület – a márkaszínek a shared/brand.json szerint */
:root {
  --brand: #0e4f43; --brand-2: #13665a; --brand-dark: #0a3b32; --brand-soft: #e4efeb; --brand-tint: #f2f7f5;
  --accent: #e9a23b; --accent-ink: #3a2603; --accent-soft: #fbf1e1;
  --ink: #1d2623; --muted: #56635e; --line: #e2ded5; --line-2: #eeebe4; --bg: #fbf8f3; --card: #fff; --hover: #f7f4ee;
  --amber: #8f5300; --amber-soft: #fcefd9; --red: #b42318; --red-soft: #fdecea;
  --blue: #1d5ea8; --blue-soft: #e6effa; --green: #146c43; --green-soft: #e3f3ea; --violet: #6741c0; --violet-soft: #efeafb;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(16 40 34 / 5%), 0 6px 18px -8px rgb(16 40 34 / 14%);
  --shadow-lg: 0 2px 4px rgb(16 40 34 / 6%), 0 24px 48px -12px rgb(16 40 34 / 28%);
  --top-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.boot { padding: 40px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -4px; }

/* segédosztályok (inline style a CSP miatt nem használható) */
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; }
.mb10 { margin-bottom: 10px; } .mb14 { margin-bottom: 14px; } .m0 { margin: 0; }
.grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; }
.right { text-align: right; }
.wauto { width: auto !important; }
.h-name { font-size: 18px; font-weight: 700; line-height: 1.25; }
.ul-tight { margin: 6px 0 0 18px; padding: 0; }
.ok-t { color: var(--green); }
.pad-check { padding-top: 7px; }
.w40 { width: 40%; }
.narrow { max-width: 720px; }

/* keret */
.shell { display: flex; min-height: 100vh; }
.side { width: 232px; flex: none; background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%); color: #cfe2dc; padding: 16px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 750; font-size: 17px; letter-spacing: -.01em; margin: 2px 8px 22px; }
.logo:hover { color: #fff; text-decoration: none; opacity: .9; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo small { display: block; font-weight: 500; font-size: 11px; color: #9fc3b9; letter-spacing: .02em; }
.side nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -12px; padding: 0 12px; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 10px; color: #d6e7e2; margin-bottom: 2px; position: relative; font-weight: 500; }
.side nav a .ic { opacity: .85; }
.side nav a:hover { background: rgb(255 255 255 / 8%); color: #fff; text-decoration: none; }
.side nav a.on { background: rgb(255 255 255 / 14%); color: #fff; font-weight: 650; }
.side nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.side nav a.on .ic { opacity: 1; color: var(--accent); }
.side nav .sep { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #8fb5aa; margin: 18px 11px 6px; font-weight: 650; }
.side nav .soon { opacity: .5; pointer-events: none; }
.side .me { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid rgb(255 255 255 / 12%); font-size: 12.5px; display: flex; align-items: center; gap: 10px; }
.side .me .who { flex: 1; min-width: 0; line-height: 1.3; }
.side .me .who b { display: block; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .me .who span { color: #a9cbc1; }
.side .me .avatar { background: rgb(255 255 255 / 14%); color: #fff; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; flex: none; padding: 0; }
.iconbtn:hover { background: var(--hover); }
.side .iconbtn { background: transparent; border-color: rgb(255 255 255 / 22%); color: #d6e7e2; }
.side .iconbtn:hover { background: rgb(255 255 255 / 10%); color: #fff; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { background: rgb(255 255 255 / 92%); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); padding: 10px 24px; display: flex; align-items: center; gap: 12px; min-height: var(--top-h); position: sticky; top: 0; z-index: 20; }
.top h1 { font-size: 19px; margin: 0; letter-spacing: -.01em; line-height: 1.2; }
.top .crumb { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.top .sp { flex: 1; }
.top .ttl { min-width: 0; }
.top .ttl h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content { padding: 20px 24px 32px; flex: 1; min-height: 0; }

/* elemek */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; background: var(--brand); color: #fff; padding: 8px 14px; font-weight: 650; cursor: pointer; white-space: nowrap; line-height: 1.25; transition: background .12s, box-shadow .12s; box-shadow: 0 1px 2px rgb(16 40 34 / 12%); }
.btn:hover { background: var(--brand-2); color: #fff; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn .ic { width: 16px; height: 16px; vertical-align: 0; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--hover); border-color: #d3cec3; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: #f0b04f; color: var(--accent-ink); }
.btn.danger { background: var(--red); }
.btn.danger:hover { background: #9a1d13; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; box-shadow: var(--shadow); }
.card h2 { font-size: 14.5px; margin: 0 0 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; letter-spacing: -.005em; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: #eeece6; color: #4b524f; white-space: nowrap; line-height: 1.5; vertical-align: middle; }
.chip .ic { width: 13px; height: 13px; vertical-align: 0; }
.chip.t { background: var(--brand-soft); color: var(--brand); } .chip.g { background: var(--green-soft); color: var(--green); }
.chip.a { background: var(--amber-soft); color: var(--amber); } .chip.r { background: var(--red-soft); color: var(--red); }
.chip.b { background: var(--blue-soft); color: var(--blue); } .chip.v { background: var(--violet-soft); color: var(--violet); }
.chip.call { background: var(--accent); color: var(--accent-ink); }
.chip.ini { background: var(--brand-tint); color: var(--brand); border: 1px solid var(--brand-soft); padding: 1px 7px; }
.chip.ini.pm { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.grid { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tel { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tel .ic { width: 15px; height: 15px; vertical-align: 0; }

/* táblák */
.tblwrap { padding: 0; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f8f5ef; white-space: nowrap; }
.tblwrap .tbl thead th { position: sticky; top: var(--top-h); z-index: 2; }
.tblwrap .tbl thead th:first-child { border-top-left-radius: var(--radius); }
.tblwrap .tbl thead th:last-child { border-top-right-radius: var(--radius); }
.tbl th.num { text-align: right; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--brand-tint); }
.tbl.small td, .tbl.small th { padding: 7px 9px; }
.card > .tbl th { background: transparent; text-transform: none; letter-spacing: 0; font-size: 12px; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty .ic { display: block; width: 34px; height: 34px; margin: 0 auto 8px; color: #b9b2a3; }
.empty b { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 2px; }
.tbl td.empty { background: transparent !important; }
.tbl td.err { border-radius: 0; }
.tbl tr.grp td { background: #f8f5ef !important; padding-top: 8px; padding-bottom: 8px; font-size: 12.5px; }
.warn { color: var(--amber); }

/* űrlapok */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 650; }
.field input, .field select, .field textarea, .inp { border: 1px solid #d7d2c7; border-radius: 10px; padding: 8px 11px; background: #fff; width: 100%; transition: border-color .12s, box-shadow .12s; }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .inp { min-height: 40px; line-height: 1.35; }
select, select.inp, .field select, .fform select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px !important; text-overflow: ellipsis; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230e4f43' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 12px 8px; }
select:disabled { cursor: default; opacity: 1; }
.field .static { min-height: 40px; padding: 9px 11px; border-radius: 10px; background: var(--brand-tint); border: 1px solid var(--line-2); font-weight: 600; }
.field input:hover, .field select:hover, .field textarea:hover, .inp:hover { border-color: #bfb8aa; }
.field textarea { min-height: 76px; resize: vertical; }
.field input[type=checkbox], .check input { width: auto; flex: none; }
.field input:disabled, .field select:disabled, .field textarea:disabled { background: #f6f4ef; color: #5c6662; }
.check { align-self: flex-start; }
input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; }
.field input:focus, .field select:focus, .field textarea:focus, .inp:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgb(19 102 90 / 18%); }
.fgrid { display: grid; gap: 12px 14px; grid-template-columns: repeat(6, 1fr); }
.fgrid .c2 { grid-column: span 2; } .fgrid .c3 { grid-column: span 3; } .fgrid .c4 { grid-column: span 4; } .fgrid .c6 { grid-column: span 6; } .fgrid .c1 { grid-column: span 1; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d7d2c7; border-radius: 999px; padding: 4px 12px; cursor: pointer; user-select: none; background: #fff; }
.checks label:hover { border-color: var(--brand-2); }
.checks label:has(input:checked) { background: var(--brand-soft); border-color: var(--brand-2); color: var(--brand); font-weight: 650; }
.checks label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 1px; }
.checks input { margin: 0; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.formsec { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-2); font-weight: 750; margin: 20px 0 8px; display: flex; align-items: center; gap: 8px; }
.formsec::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.mbody > .formsec:first-child, .mbody > form:first-child > .formsec:first-child { margin-top: 0; }
.err { background: var(--red-soft); color: #8f1d14; border: 1px solid #f6cbc6; border-radius: 10px; padding: 9px 12px; margin-top: 10px; }
.note { background: var(--accent-soft); color: #6b4300; border: 1px solid #f3dcb4; border-radius: 10px; padding: 9px 12px; }

/* belépés */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(1100px 520px at 12% -10%, #d9ebe4 0%, transparent 60%),
  radial-gradient(900px 500px at 110% 110%, #f8e3bf 0%, transparent 55%), var(--bg); }
.login form { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-lg); }
.login .brand { display: flex; align-items: center; gap: 12px; color: var(--brand); margin-bottom: 6px; }
.login .brand svg { width: 44px; height: 44px; flex: none; }
.login h1 { font-size: 22px; margin: 0; letter-spacing: -.015em; line-height: 1.15; }
.login .brand small { display: block; color: var(--muted); font-size: 13px; font-weight: 500; margin-top: 2px; }
.login .btn { padding: 11px 14px; font-size: 15px; margin-top: 4px; }
.login .field input { padding: 10px 12px; font-size: 15px; }
.login .foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* érdeklődések: teendők + kanban */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters .inp { width: 300px; }
.search { position: relative; display: inline-block; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; width: 16px; height: 16px; }
.search .inp { padding-left: 34px; }
.count { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.inbox { background: linear-gradient(180deg, #fff8ec 0%, #fff 100%); border: 1px solid #f1d9ad; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.inbox > header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 11px 16px; border-bottom: 1px solid #f5e4c4; }
.inbox > header h2 { margin: 0; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.inbox > header h2 .ic { color: #c27c12; }
.inbox > header .chip { background: var(--accent); color: var(--accent-ink); }
.inbox ul { list-style: none; margin: 0; padding: 0; }
.ib { display: grid; grid-template-columns: minmax(150px, 1.4fr) minmax(130px, 1fr) auto 70px; grid-template-areas: "who what reach when"; gap: 6px 14px; align-items: center; padding: 9px 16px; border-top: 1px solid #f7ead2; cursor: pointer; }
.ib:first-child { border-top: 0; }
.ib:hover { background: #fffaf1; }
.ib .who { grid-area: who; min-width: 0; }
.ib .who b { display: block; }
.ib .reach { grid-area: reach; }
.ib .who .sub { color: var(--muted); font-size: 12px; }
.ib .what { grid-area: what; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 0; }
.ib .when { grid-area: when; color: var(--muted); font-size: 12px; white-space: nowrap; text-align: right; }
.ib.call { background: #fff4df; }
.ib.call:hover { background: #ffefd2; }
.kanban { display: grid; grid-template-columns: repeat(7, minmax(208px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; padding-bottom: 10px; }
.kcol { background: #f1eee7; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 8px; min-height: 150px; display: flex; flex-direction: column; gap: 8px; --dot: #9aa39f; }
.kcol.drop { outline: 2px dashed var(--brand-2); background: var(--brand-soft); }
.kcol h3 { margin: 2px 4px 2px; font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.kcol h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); flex: none; }
.kcol h3 .n { margin-left: auto; color: var(--muted); font-weight: 600; background: #fff; border-radius: 999px; padding: 0 7px; font-size: 11.5px; }
.kcol[data-col=uj], .kcol[data-col=kapcsolatfelvetel] { --dot: var(--blue); }
.kcol[data-col=minositett] { --dot: var(--brand-2); }
.kcol[data-col=felmeres] { --dot: var(--violet); }
.kcol[data-col=ajanlat] { --dot: var(--accent); }
.kcol[data-col=lezart] { --dot: var(--green); }
.kcol .kempty { color: #9a948a; font-size: 12px; text-align: center; padding: 18px 6px; border: 1.5px dashed #ddd7cb; border-radius: 10px; }
.lc { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; cursor: pointer; box-shadow: 0 1px 2px rgb(16 40 34 / 6%); transition: border-color .12s, box-shadow .12s, transform .12s; position: relative; }
.lc:hover { border-color: var(--brand-2); box-shadow: var(--shadow); }
.lc:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.lc.dragging { opacity: .5; }
.lc.web { border-left: 4px solid var(--accent); padding-left: 8px; }
.lc.web.fresh { background: #fffaf1; }
.lc .nm { font-weight: 700; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; line-height: 1.3; }
.lc .roles { display: inline-flex; gap: 3px; flex-shrink: 0; }
.lc .sub { color: var(--muted); font-size: 12px; margin: 3px 0 6px; }
.lc .tel { font-size: 12.5px; margin: -2px 0 6px; }
.lc .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.lc .next { font-size: 12px; margin-top: 7px; color: var(--ink); display: flex; gap: 5px; align-items: flex-start; }
.lc .next .ic { width: 14px; height: 14px; color: var(--muted); margin-top: 1px; }
.lc .next.late { color: var(--red); font-weight: 650; }
.lc .next.late .ic { color: var(--red); }
.auto { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; line-height: 1.35; border-radius: 8px; padding: 6px 8px; margin-top: 8px; border: 1px solid transparent; }
.auto .ic { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.auto.wait { background: var(--amber-soft); color: var(--amber); border-color: #f3dcb4; }
.auto.done { background: var(--green-soft); color: var(--green); border-color: #bfe3cf; font-weight: 650; }
.auto.lost { background: var(--red-soft); color: var(--red); border-color: #f6cbc6; font-weight: 650; }
.lhead + .auto { font-size: 13px; padding: 8px 11px; margin-top: 12px; }

/* adatlapok */
.cust-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cust-head .danger-t { align-self: center; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 750; flex: none; }
.avatar.sm { width: 34px; height: 34px; font-size: 12px; }
.cols3 { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; margin-top: 16px; align-items: start; }
.prop { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.prop.click { cursor: pointer; transition: border-color .12s, background .12s; }
.prop.click:hover { border-color: var(--brand-2); background: var(--brand-tint); }
.kv { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 4px 12px; margin: 0; font-size: 12.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.kvh { font-size: 12.5px; font-weight: 650; margin: 10px 0 4px; }
#leorigin .note { margin-bottom: 8px; }
.callme { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid #f1d9ad; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.callme .ic.big { width: 26px; height: 26px; color: #c27c12; }
.callme b { display: block; }
.callme > div { flex: 1 1 180px; }
.callme .btn { flex: 0 1 auto; }
.lhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.lhead .h-name { font-size: 16px; }
/* hívást segítő összefoglaló az érdeklődés adatlapján */
.lcall { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; background: var(--brand-tint); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.lcall.call { background: var(--accent-soft); border-color: #f1d9ad; }
.lcall > .btn { flex: 0 0 auto; }
.lcall .websum { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lcall .websum .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.lcall .msg { font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; border-left: 3px solid var(--line); padding-left: 8px; }
.lprop .kv { margin-bottom: 8px; }
.lprop form { margin-top: 8px; }
.tl { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 18px; }
.tl .it { position: relative; padding-bottom: 14px; }
.tl .it::before { content: ""; position: absolute; left: -25px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--brand-2); }
.tl .it.rendszer::before { border-color: #b3ab9c; }
.tl .meta { font-size: 11.5px; color: var(--muted); }
.tl .body, .pre { white-space: pre-wrap; }
.actf { align-items: flex-start; margin-bottom: 16px; }
.actf textarea { flex: 1; min-width: 220px; }

/* modális ablak */
.modal-bg { position: fixed; inset: 0; background: rgb(14 30 26 / 48%); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; animation: fade .12s ease-out; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 860px; box-shadow: var(--shadow-lg); animation: rise .16s ease-out; }
.modal header { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line-2); }
.modal header h2 { margin: 0; font-size: 17px; flex: 1; letter-spacing: -.01em; }
.modal header .x { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: none; border: 0; border-radius: 9px; cursor: pointer; color: var(--muted); padding: 0; }
.modal header .x:hover { background: var(--hover); color: var(--ink); }
.modal .mbody { padding: 18px 20px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line-2); background: #faf8f4; border-radius: 0 0 16px 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.matches { border: 1px solid #f1d9ad; background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.matches .m { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid #f1d9ad; }
.matches .m:first-of-type { border-top: 0; }
.picked { display: flex; justify-content: space-between; align-items: center; background: var(--brand-soft); border-radius: 12px; padding: 10px 12px; }
.status-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* felmérés kitöltése (telefonra tervezve; asztalon középre igazított oszlop, az oldalsáv marad) */
.shell.bare .top { display: none; }
.shell.bare .content { padding: 0; }
.fill { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.fhead { background: var(--brand); color: #fff; padding: 12px 16px 14px; display: flex; gap: 8px; align-items: flex-start; }
.fhead small { display: block; color: #cfe6e1; font-size: 12.5px; }
.fhead b { display: block; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.fback { color: #fff; font-size: 28px; line-height: 1; padding: 0 8px 4px 0; }
.fback:hover { color: #fff; text-decoration: none; }
.fbody { flex: 1; padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.fbody > .err, .fbody > .note { margin: 0; }
.fcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.fprog { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.fsec, .fitem { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--ink); border-top: 1px solid var(--line-2); }
.fsec:first-child, .fitem:first-of-type { border-top: 0; }
a.fsec:hover, a.fitem:hover { text-decoration: none; background: var(--hover); color: var(--ink); }
.fsec-t, .fitem-t { flex: 1; min-width: 0; font-size: 15px; }
.fsec-t small, .fitem-t small { display: block; color: var(--muted); font-size: 12px; }
.fh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.fempty { padding: 6px 0; }
.cb { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #bdb6a8; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none; color: #fff; }
.cb.done { background: var(--brand-2); border-color: var(--brand-2); }
.cb.warn { background: var(--accent); border-color: var(--accent); }
.cb.na { background: #eeece6; border-color: #e2ded5; color: #8a8478; }
.btn.big { justify-content: center; padding: 13px 16px; font-size: 15px; border-radius: 12px; width: 100%; }
.btn.ghost.danger-t { color: var(--red); align-self: flex-start; }
.ffoot { position: sticky; bottom: 0; z-index: 5; }
.fbar { display: flex; gap: 8px; padding: 10px 16px 12px; background: var(--bg); border-top: 1px solid var(--line); }
.sigpad { display: block; width: 100%; aspect-ratio: 5 / 2; background: #fff; border: 2px dashed #bdb6a8; border-radius: 12px; touch-action: none; cursor: crosshair; }
.sigpad.on { border-style: solid; border-color: var(--brand-2); }
.sigimg { display: block; width: 100%; max-width: 360px; aspect-ratio: 5 / 2; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: #14213d; }
.sigtext { font-size: 14px; line-height: 1.45; margin: 0; }
.fnav { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid var(--line); }
.fnav a, .fnav span { text-align: center; padding: 11px 4px 13px; color: var(--muted); font-size: 13px; }
.fnav a:hover { text-decoration: none; }
.fnav .on { color: var(--brand); font-weight: 700; box-shadow: inset 0 3px 0 var(--accent); }
.fnav .soon { opacity: .55; line-height: 1.15; padding-top: 6px; }
.fnav .soon small { display: block; font-size: 10px; }
.fform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fform > * { grid-column: span 2; }
.fform > .half { grid-column: span 1; }
.fform .field > span { font-size: 13px; }
.fform input, .fform select, .fform textarea { font-size: 16px; padding: 10px 11px; }
.fform input:not([type=checkbox]):not([type=radio]):not([type=file]), .fform select { min-height: 46px; }
.fform input:disabled, .fform select:disabled, .fform textarea:disabled { background: #f6f4ef; color: var(--ink); }
.req { color: var(--red); font-style: normal; }
.field.miss > span:first-child, .fswitch.miss > span { color: var(--amber); }
.field.miss input, .field.miss select { border-color: var(--accent); background-color: #fffaf0; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--red); background-color: #fffafa; }
.ferr { color: var(--red); font-size: 12px; }
.unit { position: relative; display: block; }
.unit input { padding-right: 46px; }
.unit em { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-style: normal; pointer-events: none; }
.fswitch { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #d7d2c7; border-radius: 10px; padding: 9px 11px; cursor: pointer; font-size: 15px; background: #fff; }
.fswitch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 13px; background: #d7d2c7; position: relative; flex: none; margin: 0; cursor: pointer; transition: background .15s; }
.fswitch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 25%); transition: left .15s; }
.fswitch input:checked { background: var(--brand-2); }
.fswitch input:checked::after { left: 21px; }
.fswitch input:disabled { opacity: .6; }
.flocal { margin: 6px 0 8px 18px; padding: 0; }
.fdl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 15px; }
.fdl dt { color: var(--muted); }
.fdl dd { margin: 0; overflow-wrap: anywhere; }

.toast { position: fixed; right: 20px; bottom: 20px; background: var(--brand-dark); color: #fff; padding: 11px 16px 11px 14px; border-radius: 12px; max-width: 440px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; z-index: 60; box-shadow: var(--shadow-lg); border-left: 4px solid var(--accent); font-weight: 500; }
.toast.on { opacity: 1; transform: none; }
.toast.err { background: var(--red); border-left-color: #ffd0ca; }
@media (max-width: 600px) { .toast { left: 16px; right: 16px; top: 12px; bottom: auto; max-width: none; transform: translateY(-8px); } }

/* ajánlatszerkesztő */
.qgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.qmain { display: grid; gap: 16px; min-width: 0; }
.qside { position: sticky; top: calc(var(--top-h) + 12px); }
#qtable thead th { position: static; }
#qtable { font-size: 13px; }
#qtable th, #qtable td { padding: 8px 7px; }
#qtable td:first-child, #qtable th:first-child { padding-left: 14px; min-width: 170px; }
.qinp { width: 76px; padding: 4px 8px; text-align: right; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-variant-numeric: tabular-nums; }
.qinp.w { width: 54px; }
.qinp:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--brand-2); }
.tbl tr.need td { background: var(--amber-soft); }
.tbl tr.on td { background: var(--brand-tint); }
.qsum { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; margin: 0; font-size: 13px; align-items: center; }
.qsum dt { color: var(--muted); } .qsum dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qsum .tot { color: var(--ink); font-weight: 750; font-size: 15px; }
.qbig { font-size: 26px; font-weight: 750; font-variant-numeric: tabular-nums; }
.g-t { color: var(--green); } .a-t { color: var(--amber); } .r-t { color: var(--red); }
.mbar { position: relative; height: 10px; border-radius: 999px; background: #eeece6; margin: 10px 0 6px; }
.mbar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: var(--muted); }
.mbar > i.g { background: var(--green); } .mbar > i.a { background: var(--accent); } .mbar > i.r { background: var(--red); }
.mbar .tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .45; }
.qms { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.qms .unit input { width: 100%; }
.qsum .unit .qinp { width: 140px; }
@media (max-width: 1100px) { .qgrid { grid-template-columns: 1fr; } .qside { position: static; } }

/* fotók */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.ptile { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #eeece6; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ptile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ptile .pl { position: absolute; left: 0; right: 0; bottom: 0; background: rgb(14 30 26 / 62%); color: #fff; font-size: 11px; padding: 2px 5px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile.busy { opacity: .7; }
.ptile.error { border-color: var(--red); cursor: default; }
.ptile.error .pl { background: rgb(180 35 24 / 85%); }
.ptile .btn { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); }
.ptile .pwait { color: var(--muted); font-size: 11px; padding: 6px; text-align: center; }
.ptile .pflag { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-style: normal; font-weight: 700; font-size: 13px; line-height: 20px; }
.padd { border: 1.5px dashed #bdb6a8; background: #fff; color: #8a8478; font-size: 26px; }
.pchip { border: 0; cursor: pointer; font-size: 13px; padding: 4px 11px; }
.pchip.on { background: var(--brand-soft); color: var(--brand); }
button.fsec { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer; font: inherit; }
.fsec.pneed .chip { flex: none; }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.ppick { position: relative; }
.pbig { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: 10px; }
.pcheck { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.psig { margin: 0 0 8px 18px; padding: 0; }
.psig li.w { color: #6b4300; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; overflow-wrap: anywhere; }
pre.mono { white-space: pre-wrap; margin: 4px 0 0; }
td.ua { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scrollx { overflow-x: auto; }

/* mobil menü */
.burger { display: none; }
.scrim { display: none; }

@media (max-width: 900px) {
  :root { --top-h: 58px; }
  .side { display: none; }
  .burger { display: inline-flex; }
  .top { padding: 8px 14px; gap: 10px; }
  .top h1 { font-size: 17px; }
  .top .avatar.sm { display: none; }
  .content { padding: 14px 14px 28px; }
  .shell.menu .side { display: flex; position: fixed; left: 0; top: 0; bottom: 0; height: auto; z-index: 40; width: 264px; box-shadow: 4px 0 24px rgb(0 0 0 / 28%); animation: slidein .16s ease-out; }
  .shell.menu .scrim { display: block; position: fixed; inset: 0; background: rgb(14 30 26 / 45%); z-index: 39; }
  .side nav a { padding: 11px 12px; }
  .cols3 { grid-template-columns: 1fr; }
  .fgrid { grid-template-columns: repeat(2, 1fr); }
  .fgrid .c3, .fgrid .c4, .fgrid .c6 { grid-column: span 2; }
  .tblwrap { overflow-x: auto; }
  .tblwrap .tbl thead th { position: static; }
  .tblwrap .tbl td { white-space: nowrap; }
  .filters .search, .filters .search .inp { width: 100%; }
  .count { margin-left: 0; }
  .kanban { grid-template-columns: repeat(7, 82vw); scroll-snap-type: x mandatory; margin: 0 -14px; padding: 0 14px 10px; scroll-padding: 0 14px; }
  .kcol { scroll-snap-align: start; }
  .ib { grid-template-columns: 1fr auto; grid-template-areas: "who when" "what what" "reach reach"; padding: 11px 14px; }
  .ib .reach .tel { font-size: 15px; padding: 4px 0; }
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 94vh; overflow-y: auto; }
  .modal footer { border-radius: 0; position: sticky; bottom: 0; }
  .btn.newlead span { display: none; }
  .callme .btn { flex: 1 1 100%; }
  .lcall > .btn { flex: 1 1 100%; justify-content: center; }
}
@keyframes slidein { from { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
