/* Majer Connect – saját arculat (nem a CRM-é): felső sötétkék menü, levegős, árnyékolt kártyák, smaragdzöld akció.
   Szabály: sötétkék = keret és navigáció, zöld = hívás, mentés, siker; minden más semleges. */
:root {
  --navy: #0f2858;
  --navy-2: #183a78;
  --navy-50: #eef2fa;
  --navy-100: #dde5f4;
  --green: #10b981;         /* sávok, pontok */
  --green-fill: #047857;    /* gombok fehér felirattal (5,4:1) */
  --green-fill-h: #065f46;
  --green-50: #e8f8f1;
  --green-100: #c9eedd;
  --green-ink: #065f46;
  --bg: #f2f5fa;
  --card: #ffffff;
  --line: #e3e8f0;
  --line-2: #cfd6e2;
  --ink: #142037;
  --ink-2: #44506a;
  --muted: #5f6b82;
  --warn: #8a4b0b; --warn-50: #fff5e5; --warn-fill: #f59e0b;
  --bad: #c62828; --bad-700: #b01f1f; --bad-50: #fdeeee;
  --info: #1d5fd1; --info-50: #ebf2fe;
  --shadow: 0 1px 2px rgba(15,40,88,.06), 0 4px 16px rgba(15,40,88,.06);
  --r: 16px;
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; scrollbar-gutter: stable; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 15px; line-height: 22px; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
html, body { overflow-x: clip; }
b, strong { font-weight: 600; }
a { color: var(--info); }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 26px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 18px; }
.hidden, [hidden] { display: none !important; }
:where(button, a[href], select, input, textarea, summary):focus-visible { outline: 3px solid #93b4ef; outline-offset: 2px; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; background: var(--navy-50); border: 1px solid var(--navy-100); color: var(--navy); font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- felső menü ---------- */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; }
.top .in { max-width: 1480px; margin: 0 auto; height: 60px; padding: 0 24px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .04em; font-size: 15px; white-space: nowrap; }
.brand .logo-img { width: 32px; height: 32px; border-radius: 7px; display: block; }
.brand { font-size: 16px; letter-spacing: .08em; }
.brand span { color: #8ee6c2; font-weight: 700; letter-spacing: .08em; }
.top nav { display: flex; align-items: stretch; height: 100%; gap: 2px; flex: 1; min-width: 0; }
.top nav a, .top nav > .more > button { display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #c9d4ec; text-decoration: none; font-weight: 500; font-size: 14px; position: relative; white-space: nowrap; background: none; border: 0; font-family: inherit; cursor: pointer; height: 100%; }
.top nav a:hover, .top nav > .more > button:hover { color: #fff; background: rgba(255,255,255,.06); }
.top nav a.on { color: #fff; }
.top nav a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--green); }
.top nav .count { background: var(--green-fill); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; }
.more { position: relative; height: 100%; }
.menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; background: #fff; color: var(--ink); border-radius: 12px; box-shadow: 0 12px 40px rgba(15,40,88,.22); padding: 6px; z-index: 40; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--navy-50); }
.menu a.on { background: var(--green-50); color: var(--green-ink); font-weight: 600; }
.menu svg { width: 18px; height: 18px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.topr { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.userchip { position: relative; }
.userchip > button { display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; border-radius: 99px; padding: 3px 12px 3px 3px; font: inherit; font-size: 14px; cursor: pointer; }
.userchip > button:hover { background: rgba(255,255,255,.14); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #2a4f95; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.statechip { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border-radius: 99px; padding: 5px 12px; font-size: 13px; color: #e6ecf8; white-space: nowrap; }

.pagehead { max-width: 1480px; margin: 0 auto; padding: 22px 24px 4px; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pagehead .crumb { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.pagehead .right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page { max-width: 1480px; margin: 0 auto; padding: 16px 24px 72px; }
.mobilebar { display: none; }
.sitefoot { max-width: 1480px; margin: 0 auto; padding: 0 24px 28px; font-size: 12px; color: var(--muted); }
.mob-only { display: none; }

@media (max-width: 960px) {
  .mob-only { display: block; }
  .top nav, .statechip .lbl { display: none; }
  .top .in { padding: 0 14px; gap: 12px; height: 56px; }
  .userchip > button .nm { display: none; }
  .userchip > button { padding: 3px; }
  .pagehead { padding: 16px 16px 2px; }
  .pagehead h1 { font-size: 21px; }
  .page { padding: 12px 16px 24px; }
  .sitefoot { padding: 0 16px 96px; }
  .mobilebar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); padding: 6px 6px max(6px, env(safe-area-inset-bottom)); justify-content: space-around; box-shadow: 0 -4px 16px rgba(15,40,88,.06); }
  .mobilebar a { color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 500; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 8px; border-radius: 10px; min-width: 60px; }
  .mobilebar a.on { color: var(--green-ink); background: var(--green-50); }
  .mobilebar svg { width: 22px; height: 22px; }
}

/* ---------- kártyák, rács ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 16px; }
.card h2 { margin-bottom: 12px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-head .r { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 6px; }

/* ---------- gombok ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 15px; line-height: 20px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, color .12s, box-shadow .12s; }
@media (pointer: coarse) { .btn { min-height: 46px; } }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { background: #f4f6fa !important; color: #9aa4b6 !important; border-color: var(--line) !important; box-shadow: none !important; cursor: not-allowed; }
.btn.primary, .btn.call { background: var(--green-fill); color: #fff; box-shadow: 0 2px 6px rgba(4,120,87,.25); }
.btn.primary:hover, .btn.call:hover { background: var(--green-fill-h); }
.btn.navy { background: var(--navy); color: #fff; }
.btn.navy:hover { background: var(--navy-2); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-2); font-weight: 500; }
.btn.ghost:hover { background: var(--navy-50); border-color: #aab6cc; }
.btn.danger { background: #fff; color: var(--bad-700); border-color: #f1c4c4; font-weight: 500; }
.btn.danger:hover { background: var(--bad-50); }
.btn.hangup { background: var(--bad); color: #fff; }
.btn.hangup:hover { background: var(--bad-700); }
.btn.sm { min-height: 34px; padding: 5px 12px; font-size: 14px; border-radius: 10px; }
.btn.lg { min-height: 54px; padding: 12px 24px; font-size: 17px; border-radius: 14px; }
.btn.link { background: none; color: var(--info); padding: 4px 6px; min-height: 0; font-weight: 500; }
.btn.link:hover { text-decoration: underline; }

/* szegmens-választó */
.seg { display: inline-flex; background: #e9eef6; border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; padding: 7px 13px; border-radius: 9px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fff; color: var(--navy); font-weight: 650; box-shadow: 0 1px 3px rgba(15,40,88,.14); }
.seg button .n { margin-left: 6px; font-size: 12px; opacity: .8; }

/* ---------- űrlap ---------- */
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
input, select, textarea { width: 100%; font: inherit; font-size: 15px; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: 11px; background: #fff; color: var(--ink); min-height: 42px; }
input:focus, select:focus, textarea:focus { border-color: #7ea2e3; box-shadow: 0 0 0 3px #e1eafb; outline: none; }
@media (pointer: coarse) { input, select, textarea { font-size: 16px; } }
textarea { min-height: 96px; resize: vertical; line-height: 22px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--green-fill); box-shadow: none; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; cursor: pointer; padding: 4px 0; }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------- táblázat ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -22px -22px; border-top: 1px solid var(--line); }
.tbl-wrap { border-radius: 0 0 var(--r) var(--r); }
.card > .tbl-wrap:first-child { margin-top: -22px; border-top: 0; border-radius: var(--r); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; background: #f8fafd; border-bottom: 1px solid var(--line); padding: 10px 14px; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { padding-left: 22px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 22px; }
.tbl td { border-bottom: 1px solid var(--line); padding: 12px 14px; vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #f9fbfe; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- jelvények ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #edf0f5; color: var(--ink-2); white-space: nowrap; }
.pill.fut, .pill.ok, .pill.lead { background: var(--green-50); color: var(--green-ink); }
.pill.szunetel, .pill.warn { background: var(--warn-50); color: var(--warn); }
.pill.lezarva { background: #e7eaf0; color: #3b4356; }
.pill.tervezet { background: var(--info-50); color: var(--info); }
.pill.bad { background: var(--bad-50); color: var(--bad-700); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.hiv { background: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,.25); }
.dot.varakozik { background: #60a5fa; }
.dot.utomunka { background: var(--warn-fill); }
.dot.szunet { background: #9aa4b6; }
.dot.offline { background: #cfd6e2; }

/* ---------- számok ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.kpi { background: #fff; border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .v { font-size: 28px; font-weight: 700; line-height: 34px; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi.hl { background: var(--navy); }
.kpi.hl .v { color: #8ee6c2; }
.kpi.hl .l { color: #c9d4ec; }
.mini { display: flex; gap: 22px; flex-wrap: wrap; }
.mini div { font-size: 12px; color: var(--muted); }
.mini b { display: block; font-size: 18px; line-height: 24px; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: #e6ebf3; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.progress-top { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.progress-top .bar { width: 180px; }

/* ---------- hívópult ---------- */
.desk { display: grid; gap: 18px; grid-template-columns: 290px minmax(0, 1fr) 400px; align-items: start; }
.desk > aside, .desk > section { position: sticky; top: 76px; }
@media (max-width: 1320px) { .desk { grid-template-columns: minmax(0, 1fr) 380px; } .desk > .queue { display: none; } }
@media (max-width: 1000px) { .desk { grid-template-columns: 1fr; } .desk > aside, .desk > section { position: static; } }
.statusbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: #fff; border-radius: var(--r); padding: 12px 18px; box-shadow: var(--shadow); margin-bottom: 18px; }
.statusbar .sep { width: 1px; height: 28px; background: var(--line); }
.contact-card .company { font-size: 30px; font-weight: 700; line-height: 36px; letter-spacing: -.02em; color: var(--navy); }
.contact-card .person { font-size: 17px; color: var(--ink-2); margin-top: 4px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.callbtn { font-size: 28px; min-height: 72px; padding: 14px 30px; border-radius: 18px; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.callbtn svg { width: 28px; height: 28px; }
.call-live { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px; background: var(--green-50); border: 1px solid var(--green-100); }
.call-live.wrap { background: var(--warn-50); border-color: #f6d9a8; }
.call-live .t { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--green-ink); line-height: 40px; }
.call-live.wrap .t { color: var(--warn); }
.call-live .lbl { font-size: 12px; font-weight: 700; color: var(--green-ink); text-transform: uppercase; letter-spacing: .08em; }
.call-live.wrap .lbl { color: var(--warn); }
.script { white-space: pre-wrap; font-size: 17px; line-height: 28px; }
.script b { background: #fff3c4; padding: 0 3px; border-radius: 4px; }
.script-box { margin: 20px -22px -22px; padding: 20px 22px 22px; background: #fbfcfe; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices.one { grid-template-columns: 1fr; }
.choice { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 11px 12px; background: #fff; cursor: pointer; font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); text-align: left; min-height: 48px; }
.choice:hover { border-color: #9fb0cc; background: #fafbfe; }
.choice kbd { margin-left: auto; }
.choice.on { border-color: var(--navy); background: var(--navy-50); box-shadow: inset 0 0 0 1px var(--navy); }
.choice.good { border-color: var(--green-100); }
.choice.good.on { border-color: var(--green-fill); background: var(--green-50); color: var(--green-ink); box-shadow: inset 0 0 0 1px var(--green-fill); }
.note-box { background: var(--info-50); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: #1b4597; }
.note-box.warn { background: var(--warn-50); color: var(--warn); }
.note-box.good { background: var(--green-50); color: var(--green-ink); }
.side-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 0 0 10px; }
.list { display: flex; flex-direction: column; }
.list .it { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.list .it:last-child { border-bottom: 0; }
.list .it .main { flex: 1; min-width: 0; }
.list .it .main b { display: block; }
.queue .it { cursor: pointer; border-radius: 10px; padding: 10px; margin: 0 -10px; border-bottom: 0; }
.queue .it:hover { background: var(--navy-50); }
.shortcuts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.shortcuts span { display: inline-flex; align-items: center; gap: 5px; }

/* csillagok */
.stars { display: inline-flex; gap: 1px; }
.stars button { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: #d3d9e4; padding: 2px; }
.stars button.on { color: #f5a524; }

/* belépés */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 15% 0%, #1d4590 0%, transparent 60%), radial-gradient(900px 500px at 100% 100%, #0c6b55 0%, transparent 55%), var(--navy); }
.auth .box { width: 100%; max-width: 420px; }
.auth .logo-full { display: block; width: 380px; max-width: 80%; height: auto; margin: 0 auto 18px; }
.auth .app-name { text-align: center; color: #8ee6c2; font-weight: 700; letter-spacing: .18em; font-size: 13px; margin: -6px 0 22px; }
.auth form { background: #fff; border-radius: 20px; padding: 30px; box-shadow: 0 24px 64px rgba(0,0,0,.25); }
.auth form h1 { font-size: 24px; margin-bottom: 4px; }
.auth .foot { text-align: center; color: #b7c4e0; font-size: 13px; margin-top: 18px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 500; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(15,40,88,.3); }
#toast.err { background: var(--bad-700); }
@media (max-width: 960px) { #toast { bottom: 84px; } }
dialog { border: 0; border-radius: 20px; padding: 0; width: min(700px, calc(100% - 32px)); box-shadow: 0 24px 64px rgba(15,40,88,.3); }
dialog::backdrop { background: rgba(15, 40, 88, .5); }
dialog .card { box-shadow: none; padding: 26px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
