/* =====================================================================
   PLUG Dashboard – stílusok (2.0)
   Témák: data-mode = light | dark, data-accent = plug | ocean | violet | ember | graphite
   A kiemelt elem továbbra is az akkumulátor; minden más csendes és rendezett.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..800&display=swap');

/* ---------- Alap tokenek: világos ---------- */
:root,
:root[data-mode="light"] {
  --bg: #f5f5f2;
  --surface: #ffffff;
  --surface-2: #f2f2ee;
  --surface-3: #e9e9e4;
  --border: #e3e3dd;
  --border-strong: #cfcfc8;
  --text: #1b1d1e;
  --text-2: #565a5d;
  --text-3: #8b8f91;
  --brand-grey: #6a6c6d;
  --danger: #c2412c;
  --danger-soft: #fbeae6;
  --warn: #b7700c;
  --warn-soft: #fbf0dd;
  --ok: #3f7d14;
  --ok-soft: #e9f3dd;
  --focus: #2f7bd8;
  --overlay: rgba(20, 22, 23, .42);
  --shadow-sm: 0 1px 2px rgba(20, 22, 23, .05);
  --shadow-md: 0 6px 24px rgba(20, 22, 23, .08), 0 1px 3px rgba(20, 22, 23, .06);
  --shadow-lg: 0 24px 60px rgba(20, 22, 23, .18);
  --cell-empty: #ececE7;

  /* Területek */
  --a-hardver: #3b82d6;
  --a-szoftver: #8456cc;
  --a-jogi: #1f9387;
  --a-marketing: #d04d87;
  --a-egyeb: #8b8f90;
  /* Helyszín-státuszok */
  --p-tervezett: #a1a5a6;
  --p-megkeresve: #3b82d6;
  --p-targyal: #dc9a24;
  --p-alairva: #5f9e1f;
  --p-elutasitva: #c2412c;

  color-scheme: light;
}

/* ---------- Alap tokenek: sötét ---------- */
:root[data-mode="dark"] {
  --bg: #121415;
  --surface: #191c1d;
  --surface-2: #202425;
  --surface-3: #2a2e30;
  --border: #2a2f31;
  --border-strong: #3a4043;
  --text: #ecedec;
  --text-2: #a6abad;
  --text-3: #73797c;
  --brand-grey: #b9bcbd;
  --danger: #ef7a66;
  --danger-soft: rgba(239, 122, 102, .13);
  --warn: #e7b04e;
  --warn-soft: rgba(231, 176, 78, .13);
  --ok: #a6d469;
  --ok-soft: rgba(166, 212, 105, .13);
  --focus: #6aa8f0;
  --overlay: rgba(0, 0, 0, .6);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  --cell-empty: #262a2c;

  --a-hardver: #6aa8f0;
  --a-szoftver: #ab8be6;
  --a-jogi: #45bfb1;
  --a-marketing: #e57ba9;
  --a-egyeb: #9a9fa1;
  --p-tervezett: #8a8f91;
  --p-megkeresve: #6aa8f0;
  --p-targyal: #e7b04e;
  --p-alairva: #8cc64a;
  --p-elutasitva: #ef7a66;

  color-scheme: dark;
}

/* ---------- Akcentusszínek (téma) ----------
   --accent: kitöltés, --accent-ink: szöveg a kitöltésen,
   --accent-text: akcentus színű szöveg, --accent-soft: halvány háttér */
:root, :root[data-accent="plug"] {
  --accent: #aad25c; --accent-hover: #9cc54d; --accent-ink: #1c2a08;
  --accent-text: #4b7612; --accent-soft: #eef5e0; --accent-ring: rgba(170, 210, 92, .45);
}
:root[data-mode="dark"][data-accent="plug"], :root[data-mode="dark"]:not([data-accent]) {
  --accent-text: #bfe07f; --accent-soft: rgba(170, 210, 92, .13); --accent-hover: #b9dc72;
}
:root[data-accent="ocean"] {
  --accent: #2f7bd8; --accent-hover: #2569bd; --accent-ink: #ffffff;
  --accent-text: #2364b5; --accent-soft: #e7f0fb; --accent-ring: rgba(47, 123, 216, .4);
}
:root[data-mode="dark"][data-accent="ocean"] {
  --accent: #4b90e6; --accent-hover: #67a3ec; --accent-text: #8dbcf3; --accent-soft: rgba(75, 144, 230, .16);
}
:root[data-accent="violet"] {
  --accent: #7656d6; --accent-hover: #6445c4; --accent-ink: #ffffff;
  --accent-text: #5f42c0; --accent-soft: #efebfb; --accent-ring: rgba(118, 86, 214, .4);
}
:root[data-mode="dark"][data-accent="violet"] {
  --accent: #8a6fe0; --accent-hover: #9d86e7; --accent-text: #bba9f2; --accent-soft: rgba(138, 111, 224, .17);
}
:root[data-accent="ember"] {
  --accent: #e8743c; --accent-hover: #d9652d; --accent-ink: #2a1207;
  --accent-text: #b4501d; --accent-soft: #fcede4; --accent-ring: rgba(232, 116, 60, .4);
}
:root[data-mode="dark"][data-accent="ember"] {
  --accent-text: #f2a072; --accent-soft: rgba(232, 116, 60, .15); --accent-hover: #f08752;
}
:root[data-accent="graphite"] {
  --accent: #2c3032; --accent-hover: #3d4245; --accent-ink: #ffffff;
  --accent-text: #2c3032; --accent-soft: #ebebe8; --accent-ring: rgba(44, 48, 50, .35);
}
:root[data-mode="dark"][data-accent="graphite"] {
  --accent: #e4e6e5; --accent-hover: #ffffff; --accent-ink: #141617;
  --accent-text: #e4e6e5; --accent-soft: rgba(255, 255, 255, .08); --accent-ring: rgba(255, 255, 255, .3);
}

:root {
  --font: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 7px;
  --r-md: 10px;
  --r-lg: 14px;
  --rail-w: 252px;
}

/* ---------- Alapok ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-feature-settings: "ss01";
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-ring); }
.muted { color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; }
svg { flex: none; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- Gombok ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background .12s, border-color .12s, color .12s;
  text-decoration: none;
}
a.btn { color: var(--text); }
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.wide { width: 100%; height: 42px; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Űrlapok ---------- */
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
input, select, textarea {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  font-weight: 400; font-size: 14px;
  transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 92px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8f91' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
input[type=color] { padding: 3px; width: 52px; cursor: pointer; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); box-shadow: none; }
.form-grid { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { font-size: 12px; color: var(--text-3); font-weight: 400; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
@media (max-width: 860px) { input, select, textarea { font-size: 16px; } } /* iOS ne nagyítson */

.alert {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: 13px;
}

/* ---------- Váz ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--text-3); }
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 12px 12px;
  background: var(--surface); border-right: 1px solid var(--border);
}
.rail-brand { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 18px; }
.logo-img { height: 26px; display: block; }
.logo-wrap { display: inline-flex; }
.logo-dark { display: none; }
:root[data-mode="dark"] .logo-light { display: none; }
:root[data-mode="dark"] .logo-dark { display: block; }
.nav-group { margin-bottom: 14px; }
.nav-label { padding: 0 10px 6px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px;
  height: 36px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-weight: 600;
}
.nav-link svg { width: 18px; height: 18px; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent-text); }
.nav-link.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-link .badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px;
  display: inline-grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--surface-3); color: var(--text-2);
}
.nav-link.active .badge { background: var(--accent); color: var(--accent-ink); }
.rail-foot {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 8px 4px; border-top: 1px solid var(--border);
}
.rail-foot .who { flex: 1; min-width: 0; font-weight: 600; line-height: 1.25; text-decoration: none; color: var(--text); }
.rail-foot .who small { display: block; color: var(--text-3); font-weight: 400; font-size: 12px; }

.main { min-width: 0; padding: 28px 36px 64px; max-width: 1440px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h1 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.topbar, .tabbar { display: none; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 0 0 2px var(--surface);
}
.avatar.s { width: 24px; height: 24px; font-size: 10px; }

@media (max-width: 860px) {
  .shell { display: block; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .rail { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 500;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px 16px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .topbar .logo-img { height: 22px; }
  .top-right { display: flex; align-items: center; gap: 4px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
    border-top: 1px solid var(--border);
  }
  .tabbar a {
    position: relative; display: grid; justify-items: center; gap: 3px; padding: 9px 2px 8px;
    color: var(--text-3); text-decoration: none; font-size: 11px; font-weight: 600;
  }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--accent-text); }
  .tabbar a.active::after { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--accent); }
  .main { padding: 20px 16px 32px; }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 22px; }
}

/* ---------- Panelek ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.panel h2 {
  margin: 0 0 14px; font-size: 15px; font-weight: 700; letter-spacing: -.005em;
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.panel h2 a { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--accent-text); }
.panel h2 a:hover { text-decoration: underline; }
.panel h2 .map-legend { font-weight: 400; }
.empty { color: var(--text-3); font-size: 14px; padding: 4px 0; margin: 0; }

/* ---------- Akkumulátor (a kiemelt elem) ---------- */
.battery-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.battery { display: flex; align-items: center; flex: 1 1 320px; max-width: 580px; }
.battery-body {
  flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px;
  padding: 6px; height: 68px;
  border: 2.5px solid var(--text); border-radius: 12px;
}
.battery-cap { width: 7px; height: 24px; background: var(--text); border-radius: 0 4px 4px 0; margin-left: 2px; }
.cell { border-radius: 5px; background: var(--cell-empty); position: relative; overflow: hidden; }
.cell.full { background: var(--accent); }
.cell.part::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--accent); }
.battery-label .big { font-size: 52px; font-weight: 800; font-stretch: 118%; line-height: 1; letter-spacing: -.03em; }
.battery-label .muted { font-size: 14px; margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .cell.full, .cell.part::after { animation: charge .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 55ms); }
  @keyframes charge { from { opacity: 0; transform: scaleY(.25); } }
}

/* ---------- Áttekintő ---------- */
.overview { display: grid; gap: 16px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.overview .hero { grid-column: 1 / -1; padding: 24px; }
.overview .half { grid-column: span 3; }
.overview .third { grid-column: span 2; }
@media (max-width: 1180px) { .overview .third { grid-column: span 3; } }
@media (max-width: 760px) { .overview { grid-template-columns: 1fr; } .overview .half, .overview .third { grid-column: auto; } }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 0;
  margin-top: 22px; border-top: 1px solid var(--border);
}
.stat { padding: 14px 16px 2px 0; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--border); }
.stat b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--text-2); }
.stat.bad b { color: var(--danger); }
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat, .stat + .stat { padding: 12px 8px 4px; border-left: 0; }
}

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; margin: 0 -8px; border-radius: var(--r-sm); cursor: pointer;
}
.list li + li { box-shadow: 0 -1px 0 var(--border); }
.list li:hover { background: var(--surface-2); box-shadow: none; }
.list li:hover + li { box-shadow: none; }
.list .grow { flex: 1; min-width: 0; }
.list .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .s { font-size: 12.5px; color: var(--text-2); }

.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 92px 1fr 28px; align-items: center; gap: 10px; font-size: 13px; }
.funnel-row b { text-align: right; }
.funnel-bar, .area-row .track, .week-row .track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.funnel-bar i, .area-row .track i { display: block; height: 100%; border-radius: 99px; }
.area-bars { display: grid; gap: 12px; }
.area-row { font-size: 13px; }
.area-row .top { display: flex; justify-content: space-between; margin-bottom: 6px; }

/* ---------- Címkék ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  font-size: 12px; font-weight: 600; border-radius: 99px;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap;
  border: 1px solid var(--border);
}
.chip.good { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.prio { font-size: 12px; font-weight: 700; }
.prio-4 { color: var(--danger); }
.prio-3 { color: var(--warn); }
.prio-2, .prio-1 { color: var(--text-2); }
.due.over { color: var(--danger); font-weight: 700; }
.due.soon { color: var(--warn); font-weight: 700; }

/* ---------- Eszköztár / szűrők ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar select { width: auto; min-width: 150px; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.search input { padding-left: 34px; width: 240px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 5px;
  cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg button .n { font-weight: 500; color: var(--text-3); }

/* ---------- Kanban ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px; min-height: 160px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 700; font-size: 13.5px; }
.col-head .count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center;
  background: var(--surface-3); color: var(--text-2); font-weight: 700; font-size: 11px;
}
.col-head .meter { margin-left: auto; display: flex; gap: 2px; }
.col-head .meter i { width: 4px; height: 12px; border-radius: 1px; background: var(--border-strong); }
.col-head .meter i.on { background: var(--accent); }
.col.drag-over { outline: 2px dashed var(--accent); outline-offset: -3px; background: var(--accent-soft); }
.cards { display: grid; gap: 8px; min-height: 40px; }
.card {
  position: relative;
  background: var(--surface); border-radius: var(--r-md); padding: 11px 12px 11px 12px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; cursor: pointer;
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.card::before { content: ''; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--area, var(--border)); }
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.card.dragging { opacity: .45; }
.card .check {
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface);
  cursor: pointer; padding: 0; margin-top: 1px; display: grid; place-items: center; color: var(--accent-ink);
}
.card .check:hover { border-color: var(--accent); background: var(--accent-soft); }
.card.done .check { background: var(--accent); border-color: var(--accent); }
.card .check svg { width: 12px; height: 12px; }
.card.inreview .check { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.card.inreview .check svg { width: 11px; height: 11px; }
.card .title { font-weight: 600; word-break: break-word; line-height: 1.35; }
.card.done .title { text-decoration: line-through; text-decoration-color: var(--text-3); color: var(--text-2); }
.card .meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; color: var(--text-2); }
.card .meta .avatar { margin-left: auto; }
.add-inline { width: 100%; margin-top: 8px; border-style: dashed; background: transparent; box-shadow: none; color: var(--text-2); }
.add-inline:hover { background: var(--surface); color: var(--text); }
.mobile-cols { display: none; margin-bottom: 12px; }
@media (max-width: 1100px) and (min-width: 861px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .board { grid-template-columns: 1fr; }
  .board .col { display: none; background: transparent; border: 0; padding: 0; }
  .board .col.shown { display: block; }
  .board .col-head { display: none; }
  .mobile-cols { display: flex; width: 100%; }
  .mobile-cols button { flex: 1; padding: 0 4px; justify-content: center; }
  .toolbar .search { flex: 1 1 100%; }
  .toolbar .search input { width: 100%; }
  .toolbar select { flex: 1; min-width: 0; }
}

/* ---------- Helyszínek ---------- */
.places { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 14px; height: calc(100vh - 190px); min-height: 500px; }
.places .side { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.place-item { padding: 13px 16px; border-top: 1px solid var(--border); cursor: pointer; display: grid; gap: 3px; }
.place-item:first-child { border-top: 0; }
.place-item:hover { background: var(--surface-2); }
.place-item.sel { background: var(--accent-soft); }
.place-item .row { display: flex; align-items: center; gap: 8px; }
.place-item .name { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-item .addr, .place-item .next { font-size: 12.5px; color: var(--text-2); }
.place-item .nopin { font-size: 12px; color: var(--warn); }
.map { border-radius: var(--r-lg); border: 1px solid var(--border); overflow: hidden; min-height: 300px; background: var(--surface-2); z-index: 0; }
.map-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.view-toggle { display: none; }
@media (max-width: 860px) {
  .places { grid-template-columns: 1fr; height: auto; }
  .places.show-map .side { display: none; }
  .places.show-list .map { display: none; }
  .places .map { height: calc(100vh - 270px); min-height: 360px; }
  .view-toggle { display: inline-flex; }
}
.leaflet-container { font-family: var(--font); background: var(--surface-2); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); }
.leaflet-popup-content-wrapper { border-radius: var(--r-md); }
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; line-height: 1.5; }
.leaflet-popup-content b { font-size: 14px; }
.leaflet-bar a { background: var(--surface); color: var(--text); border-color: var(--border); }
.leaflet-bar a:hover { background: var(--surface-2); }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--text-3); }
.leaflet-control-attribution a { color: var(--text-2); }
:root[data-mode="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7); }
.pin-map { height: 220px; border-radius: var(--r-md); border: 1px solid var(--border); }
.geo-results { display: grid; gap: 4px; }
.geo-results:empty { display: none; }
.geo-results button { text-align: left; border: 1px solid var(--border); background: var(--surface); padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 13px; }
.geo-results button:hover { border-color: var(--accent); background: var(--accent-soft); }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; }

/* ---------- Állomások ---------- */
.station-ph { display: grid; gap: 16px; grid-template-columns: 1.2fr 1fr; }
@media (max-width: 860px) { .station-ph { grid-template-columns: 1fr; } }
.ph-station { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.ph-station:first-of-type { border-top: 0; }
.ph-slots { display: grid; grid-template-columns: repeat(6, 9px); gap: 3px; }
.ph-slots i { height: 18px; border-radius: 2px; background: var(--surface-2); border: 1px dashed var(--border-strong); }
.plan-list { margin: 0; padding-left: 18px; color: var(--text-2); }
.plan-list li { margin: 6px 0; }

/* ---------- Beállítások ---------- */
.settings { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1040px; }
.settings .wide { grid-column: 1 / -1; }
@media (max-width: 860px) { .settings { grid-template-columns: 1fr; } }
.user-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.user-row:first-of-type { border-top: 0; }
.panel-desc { margin: -8px 0 16px; color: var(--text-2); font-size: 13px; }

/* Téma-választó */
.mode-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mode-opt {
  border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 8px; background: var(--surface);
  cursor: pointer; text-align: left; display: grid; gap: 8px; color: var(--text);
}
.mode-opt:hover { border-color: var(--border-strong); }
.mode-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.mode-opt .lbl { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; padding: 0 2px 2px; }
.mode-opt .lbl svg { width: 15px; height: 15px; color: var(--text-2); }
.mini {
  height: 74px; border-radius: 7px; overflow: hidden; display: grid; grid-template-columns: 28% 1fr;
  border: 1px solid rgba(0, 0, 0, .08);
}
.mini .m-side { padding: 7px 5px; display: grid; gap: 4px; align-content: start; }
.mini .m-side i { height: 5px; border-radius: 3px; }
.mini .m-main { padding: 8px; display: grid; gap: 5px; align-content: start; }
.mini .m-main i { height: 6px; border-radius: 3px; }
.mini .m-main b { height: 22px; border-radius: 4px; display: block; }
.mini.light { background: #f5f5f2; }
.mini.light .m-side { background: #fff; border-right: 1px solid #e3e3dd; }
.mini.light .m-side i, .mini.light .m-main i { background: #e3e3dd; }
.mini.light .m-main b { background: #fff; border: 1px solid #e3e3dd; }
.mini.dark { background: #121415; border-color: #2a2f31; }
.mini.dark .m-side { background: #191c1d; border-right: 1px solid #2a2f31; }
.mini.dark .m-side i, .mini.dark .m-main i { background: #2f3436; }
.mini.dark .m-main b { background: #191c1d; border: 1px solid #2a2f31; }
.mini.auto { background: linear-gradient(110deg, #f5f5f2 50%, #121415 50%); grid-template-columns: 1fr; }
.mini.auto .m-main i:nth-child(odd) { background: #d9d9d3; }
.mini.auto .m-main i:nth-child(even) { background: #3a3f42; }
.mini .acc { background: var(--accent) !important; }
.accent-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.accent-opt {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 8px;
  border: 1.5px solid var(--border); border-radius: 99px; background: var(--surface);
  cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text);
}
.accent-opt:hover { border-color: var(--border-strong); }
.accent-opt.on { border-color: var(--text); }
.accent-opt .sw { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.setting-block + .setting-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.setting-title { font-weight: 700; font-size: 13.5px; margin-bottom: 10px; }
@media (max-width: 560px) { .mode-pick { grid-template-columns: repeat(3, 1fr); gap: 8px; } .mini { height: 56px; } }

/* ---------- Modális ablak ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 1000; background: var(--overlay);
  display: grid; place-items: center; padding: 24px;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.modal {
  width: 100%; max-width: 580px; max-height: calc(100vh - 48px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 16px 14px 22px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 2;
}
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 20px 22px; }
.modal-foot {
  display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px;
  border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface);
}
.modal-foot .left { margin-right: auto; }
@media (max-width: 860px) {
  .modal-back { padding: 0; place-items: end stretch; }
  .modal { max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0; border-bottom: 0; }
  .modal-head::before { content: ''; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--border-strong); }
  .modal-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: no-preference) {
  .modal-back { animation: fade .15s ease-out; }
  .modal { animation: rise .2s cubic-bezier(.2, .8, .2, 1); }
  @keyframes fade { from { opacity: 0; } }
  @keyframes rise { from { transform: translateY(16px); opacity: 0; } }
}

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000;
  display: flex; align-items: center; gap: 8px;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--r-md);
  font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px);
}
.toast.err { background: var(--danger); color: #fff; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: rise .2s ease-out; } }
@media (max-width: 860px) { .toast { bottom: calc(80px + env(safe-area-inset-bottom)); } }

.fab { display: none; }
@media (max-width: 860px) {
  .fab {
    display: grid; place-items: center; position: fixed; right: 16px; z-index: 600;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: 54px; height: 54px; border-radius: 16px; border: 0;
    background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-md); cursor: pointer;
  }
  .fab svg { width: 24px; height: 24px; }
  .hide-mobile { display: none !important; }
}

/* ---------- Beadás ---------- */
.submit-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
.stack { display: grid; gap: 16px; }
@media (max-width: 1000px) { .submit-grid { grid-template-columns: 1fr; } }
.list li .btn { flex: none; }
.sub {
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; margin-top: 10px;
  background: var(--surface); position: relative;
}
.sub::before { content: ''; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--border-strong); }
.sub.good::before { background: var(--ok); }
.sub.bad::before { background: var(--danger); }
.panel > .sub:first-of-type, .modal .sub:first-child { margin-top: 0; }
.sub-head { display: flex; gap: 10px; align-items: flex-start; }
.sub-head .grow { flex: 1; min-width: 0; line-height: 1.4; }
.sub-note { margin: 10px 0 0; font-size: 13.5px; }
.verdict { margin-top: 10px; padding: 11px 13px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 13.5px; }
.verdict p { margin: 0 0 6px; }
.verdict p:last-child { margin-bottom: 0; }
.verdict ul { margin: 6px 0 0; padding-left: 18px; }
.sub-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sub-acts svg { width: 15px; height: 15px; }
.files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.file {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface);
  font-size: 12.5px; color: var(--text); text-decoration: none; max-width: 100%;
}
.file svg { width: 15px; height: 15px; color: var(--text-3); }
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file small { color: var(--text-3); white-space: nowrap; }
.file small.warn { color: var(--warn); }
a.file:hover { border-color: var(--accent); background: var(--accent-soft); }
.picked { display: grid; gap: 6px; }
.picked:empty { display: none; }
.picked .file { display: flex; height: 36px; padding: 0 4px 0 10px; }
.picked .file span:nth-child(2) { flex: 1; }
.task-brief { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); position: relative; }
.task-brief::before { content: ''; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--area); }
.drop {
  display: flex; align-items: center; gap: 14px; padding: 18px; cursor: pointer;
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); color: var(--text); font-weight: 400; font-size: 14px;
  transition: border-color .12s, background .12s;
}
.drop svg { width: 26px; height: 26px; color: var(--accent-text); }
.drop small { color: var(--text-3); }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.checking { display: grid; justify-items: center; gap: 10px; padding: 36px 10px; text-align: center; }
.checking p { margin: 0; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin .8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } }
.result { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); margin-bottom: 14px; font-size: 15px; }
.result.good { background: var(--ok-soft); color: var(--ok); }
.result.bad { background: var(--danger-soft); color: var(--danger); }

/* ---------- Teljesítés ---------- */
.perf-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; }
.perf-grid .wide { grid-column: 1 / -1; }
@media (max-width: 1000px) { .perf-grid { grid-template-columns: 1fr; } }
.donut { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.donut svg { width: 210px; height: 210px; }
.donut.compact svg { width: 148px; height: 148px; }
.donut path:hover { opacity: .85; }
.donut .d-big { font: 800 34px var(--font); fill: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.donut .d-small { font: 600 13px var(--font); fill: var(--text-2); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; min-width: 190px; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto 42px; align-items: center; gap: 10px; font-size: 14px; }
.legend .sw { width: 12px; height: 12px; border-radius: 4px; }
.legend .nm { font-weight: 600; }
.legend .muted { text-align: right; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td .avatar { vertical-align: middle; margin-right: 6px; }
.tbl .n { text-align: right; }
.tip {
  position: fixed; z-index: 3000; pointer-events: none; display: none;
  background: var(--text); color: var(--bg); padding: 6px 10px; border-radius: var(--r-sm);
  font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow-md);
}

/* ---------- Claude ---------- */
.ai { max-width: 860px; display: flex; flex-direction: column; min-height: calc(100vh - 92px); }
.chat { flex: 1; display: flex; flex-direction: column; gap: 14px; padding-bottom: 12px; }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 16px; line-height: 1.55; word-wrap: break-word; font-size: 14.5px; }
.msg p { margin: 0 0 8px; }
.msg p:last-child { margin-bottom: 0; }
.msg ul, .msg ol { margin: 4px 0 8px; padding-left: 20px; }
.msg code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; box-shadow: var(--shadow-sm); }
.msg .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.msg .acts .chip { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.msg .acts svg { width: 12px; height: 12px; }
.typing { display: flex; gap: 4px; padding: 15px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); opacity: .4; }
@media (prefers-reduced-motion: no-preference) {
  .typing span { animation: blink 1.2s infinite; }
  .typing span:nth-child(2) { animation-delay: .2s; }
  .typing span:nth-child(3) { animation-delay: .4s; }
  @keyframes blink { 40% { opacity: 1; } }
}
.sugg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip-btn {
  border: 1px solid var(--border); background: var(--surface); border-radius: 99px;
  padding: 7px 13px; font-size: 13px; cursor: pointer; text-align: left; color: var(--text); box-shadow: var(--shadow-sm);
}
.chip-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.composer {
  position: sticky; bottom: 0; display: flex; gap: 8px; align-items: flex-end;
  padding: 12px 0 16px; background: linear-gradient(to bottom, transparent, var(--bg) 30%);
}
.composer textarea { min-height: 48px; max-height: 160px; resize: none; border-radius: 14px; padding: 13px 15px; box-shadow: var(--shadow-sm); }
.composer .btn { height: 48px; width: 48px; padding: 0; border-radius: 14px; }
@media (max-width: 860px) {
  .ai { min-height: calc(100vh - 190px); }
  .composer { bottom: calc(58px + env(safe-area-inset-bottom)); }
}

/* =====================================================================
   Bejelentkezés / első indítás
   ===================================================================== */
.auth-page { min-height: 100vh; background: var(--bg); }
.auth {
  min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
.auth-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 44px 52px; align-items: flex-start;
  background: #151718; color: #eceeed;
  border-right: 1px solid #24282a;
}
.auth-brand::after {
  content: ''; position: absolute; inset: auto -20% -40% auto; width: 70%; aspect-ratio: 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%);
  pointer-events: none;
}
.auth-brand .logo-img { height: 30px; }
.auth-hero { position: relative; z-index: 1; max-width: 460px; }
.auth-hero h2 { margin: 0 0 12px; font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -.02em; font-stretch: 108%; }
.auth-hero p { margin: 0; color: #a6abad; font-size: 15.5px; line-height: 1.55; }
.auth-battery { display: flex; align-items: center; margin: 0 0 32px; max-width: 360px; }
.auth-battery .battery-body { height: 64px; border-color: #eceeed; }
.auth-battery .battery-cap { background: #eceeed; }
.auth-battery .cell { background: #232729; }
@media (prefers-reduced-motion: no-preference) {
  .auth-battery .cell { animation: pulse-cell 4.2s ease-in-out infinite; animation-delay: calc(var(--i) * .18s); }
  @keyframes pulse-cell {
    0%, 8% { background: #232729; }
    18%, 72% { background: var(--accent); }
    86%, 100% { background: #232729; }
  }
}
@media (prefers-reduced-motion: reduce) { .auth-battery .cell:nth-child(-n+7) { background: var(--accent); } }
.auth-foot { position: relative; z-index: 1; font-size: 12.5px; color: #73797c; }

.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .mobile-logo { display: none; margin-bottom: 28px; }
.auth-card h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.auth-card .lead { margin: 0 0 24px; color: var(--text-2); }
.auth-card form { display: grid; gap: 16px; }
.auth-card .btn.wide { margin-top: 6px; }
.pw { position: relative; }
.pw input { padding-right: 42px; }
.pw button { position: absolute; right: 3px; top: 3px; }
.theme-switch { position: fixed; top: 16px; right: 16px; }
.auth-note { margin-top: 18px; font-size: 12.5px; color: var(--text-3); }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-card .mobile-logo { display: block; }
  .auth-main { align-items: start; padding-top: 18vh; }
}
