:root {
  --bg: #f6f7fb;
  --sidebar: #0f172a;
  --sidebar2: #1e293b;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e7eaf0;
  --brand: #1e3a8a;
  --brand-dark: #172a5e;
  --green: #16a34a;
  --green-dark: #15803d;
  --red: #dc2626;
  --amber: #d97706;
  --soft: #f1f5f9;
  --hover: #fafbfd;
  --surface2: #eef1f6;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
}

/* Sötét téma – csak a változókat írja felül, a komponensek ezekből dolgoznak */
html.dark {
  color-scheme: dark; /* a natív vezérlők (legördülő lista, dátumválasztó, görgetősáv) is sötétek lesznek */
  --bg: #0b1120;
  --card: #141d2e;
  --ink: #e6eaf2;
  --muted: #9aa7bd;
  --faint: #6b7a93;
  --line: #243149;
  --soft: #1a2335;
  --hover: #1a2436;
  --surface2: #0f1727;
  --shadow: 0 1px 3px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.3);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}
h1, h2, h3 { margin: 0; }
button { font-family: inherit; }

.app { display: flex; min-height: 100vh; }

/* ---------- Sidebar — „Amber akcentsín" ---------- */
.sidebar {
  width: 238px; flex-shrink: 0;
  background:
    radial-gradient(340px 190px at 18% -4%, rgba(245,158,11,.11), transparent 62%),
    radial-gradient(520px 320px at 118% 112%, rgba(30,58,138,.34), transparent 62%),
    linear-gradient(180deg, #0c1424 0%, #0f1a30 52%, #0b1322 100%);
  color: #c3cee3;
  display: flex; flex-direction: column;
  padding: 11px 12px;
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(148,163,184,.12);
  box-shadow: 6px 0 24px -14px rgba(0,0,0,.55);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 4px 10px; flex-shrink: 0; position: relative; }
.brand::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,.55) 16%, rgba(245,158,11,.18) 55%, transparent); }
.brand .logo { font-size: 23px; line-height: 0; }
.brand .logo img { border-radius: 9px; box-shadow: 0 4px 12px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08); }
.brand strong { display: block; color: #f8fafc; font-size: 16px; letter-spacing: .3px; }
.brand small { color: #92a2c0; font-size: 11px; }

/* A menü a rugalmas középső sáv: kitölti a maradék helyet; a lábléc mindig alul marad.
   Normál képernyőn minden elfér görgetés nélkül; nagyon alacsony ablaknál csak a menü görög. */
#nav { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-top: 5px; }
.navgroup { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
/* Szekciócím: csoportonként MÁS szín (pötty + szöveg + kifutó hajszálvonal) — hogy a
   menü ránézésre átlátható legyen. Minden csoport a --sec változójából dolgozik. */
.navsec {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 4px 3px 2px;
  font-size: 10px; text-transform: uppercase; letter-spacing: .13em; font-weight: 800;
  --sec: #9fb0c8;
  color: var(--sec);
}
.navsec::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 2px; background: currentColor; }
.navsec::after { content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, currentColor 45%, transparent), rgba(148,163,184,.14) 45%, transparent); }
.navsec.s-szolg { --sec: #b79bf5; } /* Szolgáltató – lila */
.navsec.s-ert   { --sec: #ecc06a; } /* Értékesítés – borostyán */
.navsec.s-muv   { --sec: #6cb7e8; } /* Műveletek – kék */
.navsec.s-torzs { --sec: #5bd0a0; } /* Törzsadatok – zöld */
.navsec.s-penz  { --sec: #ef93b5; } /* Pénzügy – rózsa */
.navsec.s-rend  { --sec: #9fb0c8; } /* Rendszer – acélszürke */
.navitem {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  border: none; background: transparent; cursor: pointer;
  color: #b7c3da; text-align: left;
  padding: 6px 10px 6px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500; line-height: 1.25;
  transition: color .18s ease, background-color .18s ease, padding-left .18s ease, box-shadow .18s ease;
}
/* amber jelzősáv (rejtve, aktívnál kinő) */
.navitem::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 3px; height: 0; transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 8px rgba(245,158,11,.55);
  opacity: 0;
  transition: height .22s cubic-bezier(.4,0,.2,1), opacity .18s ease;
}
/* az ikonok saját színeket hordoznak (SVG-attribútum), a CSS csak méretez */
.navitem svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .18s ease; }
.navitem:hover:not(.active) { color: #f1f5f9; background: rgba(148,163,184,.08); padding-left: 16px; }
.navitem:hover svg { transform: translateX(1px) scale(1.06); }
.navitem.active {
  color: #fff; font-weight: 600;
  background: linear-gradient(90deg, rgba(245,158,11,.15), rgba(245,158,11,.05) 62%, rgba(30,58,138,.22));
  box-shadow: inset 0 0 0 1px rgba(245,158,11,.22);
}
.navitem.active::before { height: 18px; opacity: 1; }

.sidebar-foot { margin-top: auto; padding: 9px 2px 2px; flex-shrink: 0; border-top: 1px solid rgba(148,163,184,.12); }
.mode-badge { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; display: block; text-align: center; background: rgba(148,163,184,.1); color: #cbd5e1; box-shadow: inset 0 0 0 1px rgba(148,163,184,.25); }
.mode-badge.demo { background: rgba(245,158,11,.1); color: #fbbf24; box-shadow: inset 0 0 0 1px rgba(245,158,11,.3); animation: demopulse 3.2s ease-in-out infinite; }
.mode-badge.live { background: rgba(34,197,94,.1); color: #86efac; box-shadow: inset 0 0 0 1px rgba(34,197,94,.3); }
@keyframes demopulse {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(245,158,11,.3), 0 0 0 0 rgba(245,158,11,0); }
  50% { box-shadow: inset 0 0 0 1px rgba(245,158,11,.48), 0 0 12px 0 rgba(245,158,11,.16); }
}
@media (prefers-reduced-motion: reduce) { .mode-badge.demo { animation: none; } }

/* ---------- Content ---------- */
.content { flex: 1; min-width: 0; padding: 26px 32px 60px; }
.content-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.content-head h1 { font-size: 23px; }
.view-sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }

/* ---------- Stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.neg { color: var(--red) !important; }
.pos { color: var(--green) !important; }
.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.stat .label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 7px; }
.stat .label svg { width: 16px; height: 16px; fill: var(--brand); }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 8px; letter-spacing: -.5px; }
.stat .value.sm { font-size: 19px; }
.stat .sub { color: var(--faint); font-size: 12px; margin-top: 3px; }
.stat.accent { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; border: none; }
.stat.accent .label, .stat.accent .sub { color: #dbeafe; }
.stat.accent .label svg { fill: #fff; }

/* ---------- Card ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 15.5px; }
.card-body { padding: 6px 0; overflow-x: auto; }
.card.pad .card-body { padding: 18px; }

/* ---------- Toolbar (search/filter) ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search input { width: 100%; padding: 9px 12px 9px 34px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: var(--card); color: var(--ink); }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: var(--faint); }
.filter select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: var(--card); color: var(--ink); }

/* ---------- Table ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--faint); font-weight: 600; padding: 10px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.table td.wrap { white-space: normal; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--hover); }
.table .strong { font-weight: 600; }
.table .muted { color: var(--muted); font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
/* A fejléc-igazítás felülírása a szám-oszlopoknál (.table th alapból balra húzná) */
.table th.right, .table th.num { text-align: right; }
.actions-cell { white-space: nowrap; text-align: right; }

/* ---------- Buttons ---------- */
.btn { border: 1px solid transparent; cursor: pointer; border-radius: 10px; padding: 9px 15px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; transition: .15s; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.green { background: var(--green); color: #fff; }
.btn.green:hover { background: var(--green-dark); }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 6px; border-radius: 8px; background: var(--card); border-color: var(--line); color: var(--muted); }
.btn.icon:hover { background: var(--soft); color: var(--ink); }
.btn.icon.danger:hover { background: #fef2f2; color: var(--red); border-color: #fecaca; }
.btn.sm.danger { background: var(--card); color: var(--red); border-color: #fecaca; }
.btn.sm.danger:hover { background: #fef2f2; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- Badges ---------- */
.badge { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.badge.nyitott { background: #e0f2fe; color: #075985; }
.badge.folyamatban { background: #fef3c7; color: #92400e; }
.badge.teljesitve { background: #cffafe; color: #155e75; }
.badge.szamlazva { background: #dcfce7; color: #166534; }
.badge.fizetve { background: #dcfce7; color: #166534; }
.badge.lejart { background: #fee2e2; color: #991b1b; }
.badge.meghiusult { background: #e2e8f0; color: #475569; }

/* ---------- Tudástár ---------- */
.ts-layout { display: grid; grid-template-columns: 265px 1fr; gap: 18px; align-items: start; }
.ts-nav { position: sticky; top: 20px; }
.ts-item { display: block; width: 100%; text-align: left; border: none; background: none; cursor: pointer; padding: 8px 12px; border-radius: 9px; font-size: 13.5px; color: var(--ink); font-family: inherit; }
.ts-item:hover { background: var(--soft); }
.ts-item.active { background: var(--brand); color: #fff; font-weight: 600; }
.ts-body { padding: 26px 30px !important; max-width: 780px; }
.ts-body h3 { font-size: 15px; margin: 18px 0 8px; }
.ts-body p { margin: 0 0 10px; line-height: 1.55; }
.ts-lead { color: var(--muted); font-size: 14.5px; }
.ts-body ol { margin: 0 0 12px; padding-left: 22px; }
.ts-body ol li { margin-bottom: 7px; line-height: 1.5; }
.ts-tip { background: var(--soft); border-left: 3px solid var(--brand); border-radius: 8px; padding: 10px 14px; margin-top: 14px; font-size: 13.5px; line-height: 1.5; }
.ts-ajanlo { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.ts-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
@media (max-width: 860px) { .ts-layout { grid-template-columns: 1fr; } .ts-nav { position: static; } }

/* ---------- Jogosultság-pipák (tag-modál, user-modál) ---------- */
.jog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); }
.jog-item { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; color: var(--ink); }
.jog-item input { width: auto; }

/* ---------- Globális kereső ---------- */
.content-head { flex-wrap: wrap; }
.gsearch { position: relative; margin-left: auto; }
.gsearch .gs-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.gsearch input { width: 260px; padding: 9px 62px 9px 33px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font-size: 13.5px; }
.gsearch input:focus { outline: 3px solid #dbeafe; border-color: var(--brand); }
.gsearch-kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font-size: 10.5px; color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; pointer-events: none; }
.gsearch-results { position: absolute; top: calc(100% + 6px); right: 0; width: 400px; max-height: 440px; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 44px rgba(0,0,0,.2); z-index: 75; padding: 6px; }
.gsearch-results.hidden { display: none; }
.gs-group { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--faint); padding: 9px 10px 3px; }
.gs-item { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; border: none; background: none; cursor: pointer; padding: 7px 10px; border-radius: 8px; font-family: inherit; }
.gs-item:hover { background: var(--soft); }
.gs-fo { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.gs-al { font-size: 11.5px; color: var(--muted); }
.gs-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13.5px; }
@media (max-width: 768px) {
  .gsearch { order: 3; width: 100%; margin-left: 0; }
  .gsearch input { width: 100%; }
  .gsearch-results { width: 100%; left: 0; right: auto; }
  .gsearch-kbd { display: none; }
}

/* ---------- Naptár ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-title { font-size: 18px; font-weight: 800; min-width: 175px; text-align: center; }
.cal-wrap { overflow-x: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; min-width: 780px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; padding: 4px 0; }
.cal-cell { background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-height: 98px; padding: 6px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal-cell.other { opacity: .45; }
.cal-cell.today { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(37,99,235,.16); }
.cal-daynum { font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-cell.today .cal-daynum { color: var(--brand); }
.cal-ev { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev:hover { filter: brightness(1.08); }
.cal-more { font-size: 11px; color: var(--muted); padding-left: 2px; }
.cal-legend { display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }

/* ---------- Raktár: beolvasás-visszajelzés + leltár ---------- */
.scan-msg { margin: 0 0 10px; font-weight: 600; font-size: 14.5px; border-radius: 10px; }
.scan-msg.ok { padding: 11px 15px; background: #dcfce7; color: #166534; }
.scan-msg.err { padding: 11px 15px; background: #fee2e2; color: #991b1b; }
.scan-msg.info { padding: 11px 15px; background: #e0f2fe; color: #075985; }
.raktar-stat { display: flex; flex-wrap: wrap; gap: 20px; margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }
.raktar-stat b { color: var(--ink); font-size: 15px; }
.badge.kiallitva { background: #e0f2fe; color: #075985; }
.badge.demo { background: #fef3c7; color: #92400e; }
.badge.live { background: #dcfce7; color: #166534; }

/* ---------- Empty state ---------- */
.empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.empty .big { font-size: 30px; margin-bottom: 8px; opacity: .6; }
.empty .small { font-size: 13.5px; color: var(--faint); margin-top: 4px; }

/* ---------- Dashboard split ---------- */
.dash-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.dash-grid.wide { grid-template-columns: 1.8fr 1fr; }
@media (max-width: 900px) { .dash-grid, .dash-grid.wide { grid-template-columns: 1fr; } }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: flex-start; justify-content: center; padding: 50px 16px; z-index: 50; overflow-y: auto; }
.modal-backdrop.hidden { display: none; }
.modal { background: var(--card); border-radius: 16px; width: 100%; max-width: 560px; box-shadow: 0 20px 50px rgba(0,0,0,.3); animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; }
.modal-x { border: none; background: none; cursor: pointer; font-size: 22px; color: var(--faint); line-height: 1; }
.modal-x:hover { color: var(--ink); }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Form ---------- */
form .field { margin-bottom: 14px; }
form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
form input, form select { display: block; width: 100%; padding: 10px 12px; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
form input:focus, form select:focus { outline: 3px solid #dbeafe; border-color: var(--brand); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #0f172a; color: #fff; padding: 12px 20px; border-radius: 11px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #b91c1c; }
.toast.ok { background: #15803d; }

/* ---------- Link-szerű gomb + részletek lista ---------- */
.linklike { border: none; background: none; cursor: pointer; color: var(--brand); font: inherit; font-weight: 600; padding: 0; }
.linklike:hover { text-decoration: underline; }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 9px 16px; font-size: 14px; align-items: baseline; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.dl dt.full { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 700; color: var(--ink); text-transform: uppercase; font-size: 11.5px; letter-spacing: .4px; }

/* ---------- Login (kétoszlopos: márka-panel + űrlap) ---------- */
.login-body { min-height: 100vh; background: var(--bg); }
.login-wrap { display: grid; grid-template-columns: 1.05fr 1fr; width: 100%; min-height: 100vh; }

/* Bal: márka-panel */
.login-hero { position: relative; overflow: hidden; background: linear-gradient(150deg, var(--brand), var(--brand-dark)); color: #fff; padding: 46px 50px; display: flex; flex-direction: column; justify-content: space-between; }
.login-hero::after { content: ""; position: absolute; right: -130px; bottom: -130px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(255,255,255,.13), transparent 70%); pointer-events: none; }
.login-hero::before { content: ""; position: absolute; left: -80px; top: -80px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%); pointer-events: none; }
.login-hero-top { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.login-logo { font-size: 30px; display: inline-flex; }
.login-logo img { height: 42px; width: 42px; object-fit: contain; border-radius: 10px; display: block; background: rgba(255,255,255,.1); }
.login-logo-name { font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.login-hero-mid { max-width: 430px; position: relative; z-index: 1; }
.login-hero-title { font-size: 33px; line-height: 1.16; font-weight: 800; margin: 0 0 14px; letter-spacing: -.5px; }
.login-hero-sub { font-size: 15px; opacity: .85; margin: 0 0 28px; line-height: 1.5; }
.login-feats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.login-feats li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; opacity: .96; }
.login-feats svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.login-hero-foot { font-size: 12.5px; opacity: .55; position: relative; z-index: 1; }

/* Jobb: űrlap-panel */
.login-form-panel { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.login-form-card { width: 100%; max-width: 370px; }
.login-form-brand { display: none; align-items: center; gap: 11px; margin-bottom: 26px; }
.login-form-brand .login-logo { font-size: 26px; }
.login-form-brand .login-logo img { height: 34px; width: 34px; }
.login-form-brand strong { font-size: 20px; font-weight: 800; }
.login-h { font-size: 25px; font-weight: 800; margin: 0 0 6px; }
.login-sub { color: var(--muted); font-size: 14px; margin: 0 0 26px; }
.login-input { position: relative; }
.login-input .login-ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.login-input input { padding: 12px 12px 12px 40px; }
.login-eye { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 7px; color: var(--faint); display: inline-flex; }
.login-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-eye:hover { color: var(--muted); }
.login-submit { width: 100%; justify-content: center; margin-top: 8px; padding: 12px; font-size: 15px; }
.login-err { color: var(--red); font-size: 13.5px; margin: 12px 0 0; min-height: 18px; text-align: center; }
.login-theme { margin-top: 24px; width: 100%; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 9px; font-size: 13px; cursor: pointer; transition: .15s; }
.login-theme:hover { background: var(--soft); color: var(--ink); }

@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-form-brand { display: flex; }
  .login-form-panel { min-height: 100vh; padding: 32px 22px; }
}

/* ---------- Userbox (sidebar) ---------- */
.userbox { margin-bottom: 8px; }
.userbox .user { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.userbox .uinfo { display: flex; flex-direction: column; overflow: hidden; }
.userbox .uname { color: #e6ecf6; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userbox .urole { color: #8093b3; font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox .logout { border: 1px solid rgba(148,163,184,.22); background: rgba(148,163,184,.07); color: #cbd5e1; cursor: pointer; font-size: 11px; padding: 4px 9px; border-radius: 7px; transition: color .18s ease, border-color .18s ease, background-color .18s ease; }
.userbox .logout:hover { color: #fbbf24; border-color: rgba(245,158,11,.55); background: rgba(245,158,11,.08); }

.theme-toggle { width: 100%; margin-bottom: 6px; border: 1px solid rgba(148,163,184,.16); background: rgba(148,163,184,.05); color: #aebad2; cursor: pointer; font-size: 12px; padding: 6px 10px; border-radius: 8px; transition: color .18s ease, border-color .18s ease, background-color .18s ease; }
.theme-toggle:hover { color: #f1f5f9; border-color: rgba(148,163,184,.36); background: rgba(148,163,184,.1); }

/* ---------- Nézet-kapcsoló + Kanban-tábla ---------- */
.viewtoggle { display: flex; gap: 4px; margin-left: auto; }
.vt { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--muted); padding: 8px 12px; border-radius: 9px; cursor: pointer; font-size: 13.5px; }
.vt svg { width: 16px; height: 16px; fill: currentColor; }
.vt:hover { background: var(--soft); }
.vt.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.kboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .kboard { grid-auto-flow: column; grid-auto-columns: 270px; grid-template-columns: none; overflow-x: auto; padding-bottom: 6px; } }
.kcol { background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.kcol.drop { background: #dbeafe; border-color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.kcol-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; }
.kcol-count { font-size: 12px; color: var(--muted); font-weight: 700; }
.kcol-body { display: flex; flex-direction: column; gap: 9px; min-height: 48px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; cursor: grab; box-shadow: var(--shadow); transition: border-color .12s, transform .05s; }
.kcard:hover { border-color: #c7d2e0; }
.kcard:active { transform: scale(.99); }
.kcard.dragging { opacity: .45; }
.kcard[draggable="false"] { cursor: pointer; opacity: .9; }
.kc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kc-id { font-size: 11.5px; color: var(--faint); }
.kc-amt { font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.kc-rel { font-weight: 600; margin: 5px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-fed { font-size: 12px; font-weight: 600; margin-top: 6px; }
.kempty { color: var(--faint); font-size: 12.5px; text-align: center; padding: 14px 6px; border: 1px dashed var(--line); border-radius: 8px; }

/* ---------- Sávdiagram ---------- */
.barrow { display: grid; grid-template-columns: 120px 1fr 38px; align-items: center; gap: 10px; margin: 10px 0; font-size: 13px; }
.barlabel { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bartrack { background: var(--surface2); border-radius: 6px; height: 16px; overflow: hidden; }
.bar { height: 100%; border-radius: 6px; min-width: 3px; transition: width .35s ease; }
.barval { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Árkalkulátor ---------- */
.ak-final { margin: 14px 18px 6px; padding: 16px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; text-align: center; }
.ak-amount { font-size: 27px; font-weight: 800; margin: 4px 0; letter-spacing: -.5px; }
.ak-perkm { color: #dbeafe; font-size: 13px; }

/* ---------- Dokumentumok ---------- */
.dok-h { font-size: 11.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .4px; margin: 0 0 8px; }
.dok-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dok-item:last-child { border-bottom: none; }
.dok-item a { color: var(--brand); text-decoration: none; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dok-item a:hover { text-decoration: underline; }

.pd-entry { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pd-entry:last-child { border-bottom: none; }

/* --- grafikonok (dashboard + riport) --- */
.donutwrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donutlegend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; min-width: 150px; }
.donutlegend .drow { display: flex; align-items: center; gap: 9px; }
.donutlegend i { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }
.donutlegend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.chlegend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.chlegend span { display: inline-flex; align-items: center; gap: 6px; }
.chlegend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.chtoggle { display: inline-flex; gap: 2px; background: var(--surface2); border-radius: 8px; padding: 2px; }
.chtog { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 4px 13px; border-radius: 6px; cursor: pointer; font-family: inherit; }
.chtog.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.1); }

/* ---------- Mobil / hamburger ---------- */
.mobile-topbar { display: none; }
.nav-backdrop { display: none; }
.hamburger { display: none; }
@media (max-width: 768px) {
  .sidebar { position: fixed; left: 0; top: 0; height: 100vh; width: 262px; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 4px 0 20px rgba(0,0,0,.35); }
  .app.nav-open .sidebar { transform: translateX(0); }
  .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .app.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .content { padding: 0 14px 40px; }
  .mobile-topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40; background: var(--bg); padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; font-size: 20px; cursor: pointer; flex-shrink: 0; }
  .mtop-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
  .mtop-logo { font-size: 22px; display: inline-flex; }
  .mtop-logo img { height: 26px; width: 26px; object-fit: contain; border-radius: 6px; }
  .content-head { flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding-top: 12px; }
  .content-head h1 { font-size: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat .value { font-size: 22px; }
  .toolbar .search { max-width: none; }
  .modal { max-width: none; }
}
@media (max-width: 430px) {
  .stats { grid-template-columns: 1fr; }
}
