/* ===== Horgász Napló – professzionális dashboard stíluslap ===== */
:root {
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.16);
  --shadow: 0 1px 3px rgba(0,0,0,.14), 0 10px 30px -12px rgba(0,0,0,.22);
  --shadow-lg: 0 24px 60px -18px rgba(0,0,0,.45);
  --accent: #16a34a;
  --accent-strong: #12833c;
  --accent2: #0ea5e9;
  --warn: #f59e0b;
  --danger: #ef4444;
  --ring: color-mix(in srgb, var(--accent) 30%, transparent);
  --transition: .18s cubic-bezier(.4,0,.2,1);
  --transition-slow: .35s cubic-bezier(.4,0,.2,1);
  /* Térköz-skála */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

/* Sötét téma (alap) */
html[data-theme="dark"] {
  --bg: #070c17;
  --bg-grad:
    radial-gradient(1100px 520px at 82% -12%, rgba(14,165,233,.14) 0%, transparent 58%),
    radial-gradient(900px 500px at 5% 0%, rgba(22,163,74,.12) 0%, transparent 55%),
    linear-gradient(180deg, #070c17, #0a1120);
  --card: rgba(20, 30, 51, .72);
  --card-solid: #141e33;
  --card2: rgba(27, 39, 66, .7);
  --elev: #223050;
  --text: #eef3fb;
  --muted: #93a3bd;
  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.14);
  --input-bg: rgba(8, 14, 26, .6);
  --header-bg: rgba(9, 15, 28, .72);
}
/* Világos téma */
html[data-theme="light"] {
  --bg: #eef2f7;
  --bg-grad:
    radial-gradient(1100px 520px at 82% -12%, rgba(14,165,233,.18) 0%, transparent 58%),
    radial-gradient(900px 500px at 5% 0%, rgba(22,163,74,.14) 0%, transparent 55%),
    linear-gradient(180deg, #eef2f7, #e4ebf5);
  --card: rgba(255,255,255,.82);
  --card-solid: #ffffff;
  --card2: rgba(244, 247, 251, .85);
  --elev: #ffffff;
  --text: #14233b;
  --muted: #5d6b82;
  --border: rgba(15, 35, 65, .1);
  --border-strong: rgba(15, 35, 65, .16);
  --input-bg: #f7fafc;
  --header-bg: rgba(255,255,255,.72);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ================= APP SHELL LAYOUT ================= */
:root { --sidebar-w: 260px; --topbar-h: 64px; }
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-4);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-right: 1px solid var(--border);
  z-index: 60;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 14px; }
.sidebar-brand .sb-brand-txt { min-width: 0; }
.sidebar-brand h1 { font-family: var(--font-display); font-size: 1.16rem; margin: 0; letter-spacing: -.02em; font-weight: 800; white-space: nowrap; }
.sidebar-brand .sub { color: var(--muted); font-size: .74rem; margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.sb-close { display: none; margin-left: auto; }
.logo {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 8px 20px -7px color-mix(in srgb, var(--accent) 75%, transparent);
}
.logo.sm { width: 34px; height: 34px; border-radius: 10px; }
.logo .lucide { width: 22px; height: 22px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1; margin: 4px -4px; padding: 0 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 11px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem;
  position: relative; transition: background var(--transition), color var(--transition);
}
.nav-link .lucide { width: 19px; height: 19px; flex: none; }
.nav-link:hover { background: var(--card2); color: var(--text); }
.nav-link.active { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.nav-link.active .lucide { color: #fff; }

.sidebar-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.sidebar-foot .user-badge { justify-content: flex-start; }
.sb-tools { display: flex; align-items: center; gap: 8px; }
.sb-tools .lang-select { margin-right: auto; }

/* ---------- Main + Topbar ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.app-header, .topbar {
  display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 45;
  height: var(--topbar-h); padding: 0 var(--sp-6);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.app-header.scrolled, .topbar.scrolled { box-shadow: var(--shadow); }
.topbar-brand { display: none; align-items: center; gap: 10px; }
.topbar-brand h2 { font-family: var(--font-display); font-size: 1.05rem; margin: 0; font-weight: 700; letter-spacing: -.02em; }
.menu-btn { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

.content { padding: var(--sp-6); max-width: 1280px; width: 100%; margin: 0 auto; }
.anchor, #view-overview { scroll-margin-top: calc(var(--topbar-h) + 12px); }

/* Régi .brand kompat. (auth/egyéb) */
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { font-family: var(--font-display); font-size: 1.3rem; margin: 0; letter-spacing: -.03em; font-weight: 800; }
.brand .sub { color: var(--muted); font-size: .82rem; margin: 2px 0 0; }

/* ---------- Mobil alsó navigáció ---------- */
.bottom-nav { display: none; }
.sidebar-backdrop { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong)); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 9px 15px; font-size: .9rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--accent) 65%, transparent);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition), background var(--transition);
  font-family: var(--font);
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn:active { transform: translateY(0); filter: brightness(.97); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { background: var(--card2); border-color: var(--border-strong); filter: none; }
.btn.blue { background: linear-gradient(180deg, var(--accent2), #0284c7); box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--accent2) 65%, transparent); }
.btn.danger { background: linear-gradient(180deg, var(--danger), #dc2626); box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--danger) 60%, transparent); }
.btn.sm { padding: 6px 11px; font-size: .82rem; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--border); background: var(--card);
  color: var(--text); cursor: pointer; box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.icon-btn:hover { background: var(--card2); border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.lucide { width: 18px; height: 18px; stroke-width: 2; }

/* ---------- Filters ---------- */
.filters {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: var(--sp-5); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.fitem { display: flex; flex-direction: column; gap: 6px; }
.fitem label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
select, input, textarea {
  padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--input-bg); color: var(--text); font-size: .9rem; font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
}
select { min-width: 150px; cursor: pointer; }
select:focus, input:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
::placeholder { color: var(--muted); opacity: .7; }

/* ---------- KPI cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 13px; margin-bottom: var(--sp-5); }
.stat {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.stat::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); opacity: .9;
}
.stat:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.stat .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat .label { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .5px; }
.stat .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; }
.stat .value { font-size: 1.75rem; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; line-height: 1; }
.stat .value small { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat .trend { font-size: .75rem; margin-top: 7px; display: flex; align-items: center; gap: 5px; }
.trend.up { color: var(--accent); }
.trend.down { color: var(--danger); }
.trend.flat { color: var(--muted); }
.stat .spark { position: absolute; right: 8px; bottom: 8px; width: 78px; height: 30px; opacity: .9; }

/* ---------- Records strip ---------- */
.records { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 13px; margin-bottom: 22px; }
.record {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--card)), var(--card));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow);
}
.record .rlabel { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .5px; display: flex; align-items: center; gap: 6px; }
.record .rvalue { font-size: 1.25rem; font-weight: 800; margin-top: 5px; }
.record .rmeta { color: var(--muted); font-size: .8rem; margin-top: 3px; }

/* ---------- Panels / charts ---------- */
.section-title { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; margin: var(--sp-6) 0 var(--sp-3); display: flex; align-items: center; gap: 9px; }
.section-title .lucide { color: var(--accent); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; margin-bottom: 22px; }
.panel {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.panel:hover { border-color: var(--border-strong); }
.panel h3 { margin: 0 0 12px; font-size: .96rem; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.panel h3 .lucide { color: var(--muted); }
.chart-box { position: relative; height: 260px; }
.panel.wide { grid-column: 1 / -1; }
.chart-box.tall { height: 320px; }

/* ---------- Form ---------- */
.form-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 22px; box-shadow: var(--shadow); overflow: hidden; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.form-wrap > summary {
  cursor: pointer; padding: 16px; font-weight: 650; font-size: 1rem; list-style: none;
  display: flex; align-items: center; gap: 9px;
}
.form-wrap > summary::-webkit-details-marker { display: none; }
.form-wrap[open] > summary { border-bottom: 1px solid var(--border); }
.form-body { padding: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .8rem; color: var(--muted); }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.form-actions .spacer { flex: 1; }

/* ---------- Table ---------- */
.table-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 30px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.table-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.table-head .left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.table-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search { min-width: 210px; }
.table-wrap { overflow: auto; max-height: 560px; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th, td { padding: 9px 11px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th { color: var(--muted); position: sticky; top: 0; background: var(--card-solid); z-index: 1; cursor: pointer; user-select: none; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; }
thead th:hover { color: var(--text); }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--card2); }
td a { color: var(--accent2); }
.row-actions { display: flex; gap: 6px; }
.mini { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.mini:hover { background: var(--elev); }
.mini.del:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* Mobil kártya-nézet */
.cards-view { display: none; flex-direction: column; gap: 10px; max-height: 600px; overflow: auto; }
.entry-card { background: var(--card2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.entry-card .ec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.entry-card .ec-title { font-weight: 700; }
.entry-card .ec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: .82rem; }
.entry-card .ec-grid .k { color: var(--muted); }

/* ---------- Messages / toast ---------- */
.msg { font-size: .88rem; padding: 9px 12px; border-radius: var(--radius-sm); display: none; }
.msg.ok { display: block; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.msg.err { display: block; background: color-mix(in srgb, var(--danger) 20%, transparent); color: var(--danger); }
.toast-wrap { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 90; }
.toast { background: var(--card-solid); color: var(--text); border: 1px solid var(--border-strong); border-left: 4px solid var(--accent);
  padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .88rem; min-width: 220px; max-width: 340px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: opacity .25s ease, transform .25s ease;
  animation: slideIn .28s cubic-bezier(.34,1.3,.64,1); }
.toast.err { border-left-color: var(--danger); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.loading { color: var(--muted); padding: 22px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; }
.loading::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Skeleton betöltés ---------- */
.skeleton, .skel { position: relative; overflow: hidden; background: var(--card2); border-radius: var(--radius-sm); }
.skeleton::after, .skel::after {
  content: ""; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 8%, transparent), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ---------- Szekció belépő animáció ---------- */
@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.content > section, .content > .section-title, .content > .table-panel, .content > .form-wrap {
  animation: riseIn .45s ease both;
}
/* Ne animáljuk a fedő rétegeket (modál, gate, lightbox, toast) */
.modal-backdrop, .lightbox, .pin-gate, .toast-wrap { animation: none !important; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(3,7,15,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: none; place-items: center; z-index: 60; padding: 16px; }
.modal-backdrop.open { display: grid; animation: fadeIn .18s ease; }
.modal { background: var(--card-solid); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 640px; max-height: 90vh; overflow: auto; animation: modalPop .24s cubic-bezier(.34,1.3,.64,1); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 1.05rem; }
.modal-body { padding: 16px; }
.modal-foot { display: flex; justify-content: space-between; gap: 10px; padding: 16px; border-top: 1px solid var(--border); }

/* ---------- Fotó feltöltés / előnézet ---------- */
.photo-field { grid-column: 1 / -1; }
.uploader { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.uploader input[type="text"] { flex: 1; min-width: 180px; }
.photo-pick { cursor: pointer; }
.thumb { margin-top: 10px; position: relative; display: inline-block; }
.thumb img { max-height: 150px; max-width: 100%; border-radius: 10px; border: 1px solid var(--border); display: block; }
.thumb-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; }
.thumb-x:hover { background: var(--danger); }
.thumb-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb-list .thumb { margin-top: 0; }
.thumb-list .thumb img { max-height: 90px; }
.thumb-cell { position: relative; display: inline-block; cursor: pointer; }
.ph-count { position: absolute; bottom: 2px; right: 2px; background: rgba(0,0,0,.72); color: #fff; font-size: .64rem; padding: 1px 5px; border-radius: 6px; }
.cell-thumb { height: 42px; width: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; }
.card-photo { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 10px; }

/* ---------- Helpers ---------- */
.muted { color: var(--muted); }

/* Üres állapotok (empty state) */
#trips-empty, #inv-empty, #gallery-empty, #map-empty {
  text-align: center; padding: 26px 18px; margin: 4px 0 0;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: color-mix(in srgb, var(--card2) 60%, transparent);
  font-size: .9rem;
}
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; background: var(--card2); border: 1px solid var(--border); color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Éves cél ---------- */
.goal-bar { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.goal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.goal-title { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.goal-track { position: relative; height: 26px; background: var(--card2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.goal-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 999px; transition: width .6s ease; }
.goal-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--text); }

/* ---------- Térkép ---------- */
.map-panel { padding: 0; overflow: hidden; }
#map { height: 420px; width: 100%; background: var(--card2); }
.map-empty { padding: 20px; }
.leaflet-popup-content { font-family: var(--font); margin: 10px 12px; }
.map-pop img { width: 100%; max-height: 120px; object-fit: cover; border-radius: 8px; margin-top: 6px; }
.map-pop b { font-size: .95rem; }
.map-pop .pp { color: #555; font-size: .8rem; }

/* ---------- Előrejelzés ---------- */
.forecast-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.forecast-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.fc-day { background: var(--card2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: center; }
.fc-day .fc-date { font-size: .78rem; color: var(--muted); }
.fc-day .fc-score { font-size: 1.5rem; font-weight: 800; margin: 6px 0; }
.fc-day .fc-meta { font-size: .74rem; color: var(--muted); }
.fc-day .fc-bar { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 8px; }
.fc-day .fc-bar > div { height: 100%; }
.fc-score.s-high { color: var(--accent); } .fc-score.s-mid { color: var(--warn); } .fc-score.s-low { color: var(--danger); }

/* ---------- Galéria ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.gallery .gitem { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); cursor: pointer; }
.gallery .gitem img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.gallery .gitem:hover img { transform: scale(1.07); }
.gallery .gitem .gcap { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; font-size: .72rem; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 70; display: none; place-items: center; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 8px; }
.lb-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-nav:hover, .lb-close:hover { background: rgba(255,255,255,.3); }
.lb-caption { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: .9rem; }

/* ---------- Modal nagy / részletes ---------- */
.modal-lg { max-width: 760px; }
.detail-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-photos img { height: 120px; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); object-fit: cover; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.detail-grid .dk { color: var(--muted); font-size: .82rem; }
.detail-grid .dv { font-weight: 600; }
.detail-map { height: 200px; border-radius: 10px; margin-top: 14px; border: 1px solid var(--border); }

/* ---------- Megosztható kártya ---------- */
.share-card { width: 100%; aspect-ratio: 1.6; border-radius: 16px; padding: 26px; color: #fff;
  background: linear-gradient(135deg, #0b3d2e, #0e5a8a); display: flex; flex-direction: column; justify-content: space-between; }
.share-card .sc-title { font-size: 1.3rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.share-card .sc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.share-card .sc-stat .n { font-size: 2rem; font-weight: 800; }
.share-card .sc-stat .l { font-size: .8rem; opacity: .85; }
.share-card .sc-foot { font-size: .82rem; opacity: .8; }

/* ---------- Hely választó térkép ---------- */
.pick-map { height: 360px; width: 100%; border-radius: 10px; border: 1px solid var(--border); background: var(--card2); }
.pick-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- PIN ---------- */
.pin-gate { position: fixed; inset: 0; background: var(--bg-grad), var(--bg); z-index: 80; display: none; place-items: center; padding: 20px; }
.pin-gate.open { display: grid; }
.pin-box { background: var(--card-solid); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 34px 30px; text-align: center; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 14px; align-items: center; width: 90%; max-width: 340px; animation: modalPop .3s cubic-bezier(.34,1.3,.64,1); }
.pin-box h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; }
.pin-logo { width: 62px; height: 62px; border-radius: 18px; box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.pin-box h2 { margin: 0; font-size: 1.1rem; }
.pin-box input { text-align: center; font-size: 1.6rem; letter-spacing: .4em; width: 100%; }
.pin-box .btn { width: 100%; justify-content: center; }

.lang-select { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; font-size: .82rem; cursor: pointer; }
.lang-select:hover { background: var(--elev); }

/* ---------- Kapási recept ---------- */
.recipe-intro { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.recipe-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card2); }
.recipe-item .ri-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: #fff; }
.recipe-item .ri-ic i { width: 18px; height: 18px; }
.ri-k { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.ri-v { font-size: 1rem; font-weight: 600; }

/* ---------- Bővített szűrők + térkép ---------- */
.fnum { width: 110px; }
.map-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; margin-bottom: 10px; }
.map-legend { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.map-legend i { width: 15px; height: 15px; color: #ff7a18; }
.hot-marker { background: transparent; border: none; }
.hotpt { display: grid; place-items: center; border-radius: 50%; color: #1a1205; font-weight: 700; font-size: .8rem; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 1px 6px rgba(0,0,0,.4); }
.map-pop-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--border); }
.map-pop-row img { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; flex: none; }
.map-pop-row > div { flex: 1; min-width: 0; }
.map-pop-row .btn.sm { flex: none; }
.fc-moon { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; margin-top: 4px; }
.fc-moon i { width: 13px; height: 13px; }
.fc-moon.sol-high { color: var(--accent); }
.fc-moon.sol-mid { color: var(--warn); }
.fc-moon.sol-low { color: var(--muted); }

/* ---------- Túrák ---------- */
.trips { display: flex; flex-direction: column; gap: 10px; }
.trip-place-group { border: 1px solid var(--border); border-radius: 12px; background: var(--card2); overflow: hidden; }
.trip-place-header { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--card); border: none; cursor: pointer; text-align: left; }
.trip-place-header:hover { background: var(--card2); }
.trip-place-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .95rem; color: var(--text); }
.trip-place-name i { width: 16px; height: 16px; color: var(--accent); }
.trip-place-summary { font-size: .8rem; color: var(--muted); }
.trip-place-arrow { width: 18px; height: 18px; color: var(--muted); flex: none; }
.trip-place-body { padding: 10px 12px; border-top: 1px solid var(--border); }
.trip-card { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--card2); margin-bottom: 8px; }
.trip-card:last-child { margin-bottom: 0; }
.trip-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-weight: 600; margin-bottom: 6px; }
.trip-head i { width: 14px; height: 14px; vertical-align: -2px; color: var(--accent); }
.trip-date { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; }
.trip-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 8px; }
.trip-chips .chip { background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 2px 7px; font-size: .7rem; display: inline-flex; align-items: center; gap: 3px; }
.trip-chips .chip i { width: 11px; height: 11px; }
.trip-chips .chip.strong { background: var(--accent); color: #fff; border-color: transparent; }
.trip-meta { display: flex; flex-direction: column; gap: 6px; }
.trip-cost-l { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .75rem; }
.trip-cost-l i { width: 13px; height: 13px; }
.trip-cost { width: 70px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text); font-size: .8rem; }
.trip-note { width: 100%; padding: 4px 7px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text); font-size: .8rem; }

/* ---------- Felszerelés & csali ---------- */
.inv-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.inv-form input, .inv-form select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--card2); color: var(--text); }
.inv-form #inv-name { flex: 1; min-width: 180px; }
.inv-form .inv-qty { width: 80px; }
.inv-list { display: flex; flex-direction: column; gap: 8px; }
.inv-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--card2); }
.inv-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.inv-tname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-tag { font-size: .72rem; color: var(--muted); background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; flex: none; }
.inv-side { display: flex; align-items: center; gap: 10px; flex: none; }
.inv-eff { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; font-size: .85rem; }
.inv-eff i { width: 15px; height: 15px; }
.inv-q { color: var(--muted); font-size: .85rem; min-width: 32px; text-align: right; }

/* ---------- Bot-időzítő ---------- */
.rods-intro { margin: 0 0 12px; font-size: .88rem; }
.rod-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rod-form input { flex: 1; min-width: 140px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--input-bg); color: var(--text); }
.rod-form #rod-name { flex: 1.3; }
.rods-toolbar { display: flex; align-items: center; gap: 10px 16px; margin-bottom: 14px; flex-wrap: wrap; }
.rods-toolbar > label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.rods-toolbar select { min-width: 90px; }
.rod-silent-chk { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: normal; }
.rod-silent-chk i { width: 15px; height: 15px; color: var(--muted); }
.rods-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rod-card {
  border: 1px solid var(--border); border-radius: 14px; padding: 14px; background: var(--card2);
  display: flex; flex-direction: column; gap: 10px; transition: border-color var(--transition), box-shadow var(--transition);
}
.rod-card.active { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent) inset, 0 10px 26px -14px color-mix(in srgb, var(--accent) 70%, transparent); }
.rod-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rod-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 7px; min-width: 0; }
.rod-name i { width: 17px; height: 17px; color: var(--accent); flex: none; }
.rod-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; flex: none; }
.rod-badge.idle { background: var(--card); border: 1px solid var(--border); color: var(--muted); }
.rod-badge.on { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.rod-badge.on i { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.rod-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rod-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; font-size: .74rem; color: var(--text); }
.rod-chip .rc-k { color: var(--muted); }
.rod-chip i { width: 12px; height: 12px; color: var(--accent2); }
.rod-timer { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: 1.9rem; font-weight: 800; letter-spacing: -.01em; line-height: 1; }
.rod-card.active .rod-timer { color: var(--accent); }
.rod-card:not(.active) .rod-timer { color: var(--muted); }
.rod-alerts { font-size: .74rem; color: var(--warn); display: none; }
.rod-alerts.show { display: block; }
.rod-reminder { display: flex; align-items: center; gap: 7px; }
.rod-reminder i { width: 15px; height: 15px; color: var(--muted); flex: none; }
.rod-int-sel { flex: 1; min-width: 0; padding: 6px 9px; font-size: .82rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.rod-actions { display: flex; align-items: center; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.rod-actions .btn { flex: 1 1 108px; justify-content: center; }
.rod-mini { display: flex; gap: 6px; margin-left: auto; }

/* ---------- Segédeszközök ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tool { display: flex; flex-direction: column; }
.tool.tool-wide { grid-column: 1 / -1; }
.tool-body { display: flex; flex-direction: column; gap: 10px; }
.tool-field { display: flex; flex-direction: column; gap: 5px; }
.tool-field label { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.tool-result { margin-top: 2px; }
.tool-big { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; letter-spacing: -.01em; color: var(--accent); line-height: 1.1; }
.fc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.fc-row:last-of-type { border-bottom: none; }
.fc-row b { font-size: 1.05rem; }

/* Kapási csúcsidők */
.bt-sun { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; font-size: .88rem; }
.bt-sun span { display: inline-flex; align-items: center; gap: 6px; }
.bt-sun i { width: 15px; height: 15px; color: var(--accent2); }
.bt-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.bt-k { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .82rem; min-width: 118px; }
.bt-k i { width: 15px; height: 15px; color: var(--warn); }
.bt-per { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; border: 1px solid var(--border); background: var(--card2); }
.bt-per.maj { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.bt-per.now { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 4px 12px -5px color-mix(in srgb, var(--accent) 70%, transparent); }

/* Légnyomás-trend */
.pt-main { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; font-weight: 700; }
.pt-main i { width: 22px; height: 22px; }
.pt-main.pt-up { color: var(--accent2); }
.pt-main.pt-down { color: var(--warn); }
.pt-main.pt-flat { color: var(--muted); }
.pt-val { font-size: .95rem; color: var(--muted); font-weight: 600; }
.pt-hint { font-size: .82rem; margin: 6px 0 0; }

/* Checklista */
.cl-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cl-form #cl-input { flex: 1; min-width: 160px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--input-bg); color: var(--text); }
.cl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 12px; }
.cl-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 9px; cursor: pointer; }
.cl-item:hover { background: var(--card2); }
.cl-item input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.cl-text { flex: 1; font-size: .9rem; }
.cl-item.done .cl-text { text-decoration: line-through; color: var(--muted); }
.cl-del { opacity: .5; }
.cl-item:hover .cl-del { opacity: 1; }

/* Fotó-mérő */
.pm-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 10px; }
.pm-ref { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--muted); }
.pm-ref input { width: 72px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--input-bg); color: var(--text); }
.pm-step { font-weight: 600; color: var(--accent); margin: 4px 0 10px; font-size: .9rem; }
.pm-canvas-wrap { width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--card2); }
#pm-canvas { display: block; max-width: 100%; cursor: crosshair; touch-action: none; }
.pm-out { margin: 12px 0; }
.rod-mini .icon-btn { width: 34px; height: 34px; }

/* ---------- Vízadat (időjárás panel) ---------- */
.wx-water { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--border); }
.wx-water i { color: #38bdf8; }
.wx-trend { font-weight: 700; }
.wx-river-name { display: block; font-weight: 600; color: var(--text); margin-bottom: 4px; }

/* ---------- Időjárás-jelentés ---------- */
.weather { display: flex; flex-direction: column; gap: 14px; }
.wx-current { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.wx-now { display: flex; align-items: center; gap: 12px; }
.wx-now > i { width: 46px; height: 46px; color: var(--accent); }
.wx-temp { font-size: 2rem; font-weight: 700; line-height: 1; }
.wx-cond { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.wx-detail { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .85rem; color: var(--muted); }
.wx-detail span { display: inline-flex; align-items: center; gap: 5px; }
.wx-detail i { width: 15px; height: 15px; }
.wx-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.wx-day { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--card2); text-align: center; }
.wx-day > i { width: 24px; height: 24px; color: var(--accent); }
.wx-dname { font-size: .76rem; font-weight: 600; color: var(--muted); }
.wx-mm { font-size: .82rem; } .wx-mm b { font-size: .92rem; }
.wx-rain { font-size: .72rem; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.wx-rain i { width: 12px; height: 12px; }
@media (max-width: 700px) { .wx-days { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 420px) { .wx-days { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Ranglista ---------- */
.leaderboard { display: flex; flex-direction: column; gap: 8px; }
.lb-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card2); }
.lb-row.me { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.lb-rank { font-size: 1.1rem; font-weight: 700; text-align: center; }
.lb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-stats { font-size: .82rem; color: var(--muted); text-align: right; }
.lb-stats b { color: var(--text); font-size: .95rem; }
@media (max-width: 560px) { .lb-row { grid-template-columns: 30px 1fr; } .lb-stats { grid-column: 2; text-align: left; } }

/* ---------- Bejelentkezés / felhasználók ---------- */
#auth-gate .pin-box { max-width: 340px; }
#auth-gate input { text-align: left; font-size: 1rem; letter-spacing: normal; width: 100%; }
#auth-gate .muted { font-size: .85rem; }
.user-badge { color: var(--text); }
.badge.sm { padding: 1px 7px; font-size: .68rem; }
.users-list { display: flex; flex-direction: column; gap: 8px; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--card2); }
.user-info { display: inline-flex; align-items: center; gap: 8px; }
.user-info i { width: 16px; height: 16px; }
.users-form { display: flex; flex-direction: column; gap: 10px; }
.users-form input[type="text"], .users-form input[type="password"] { width: 100%; }
.chk { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; cursor: pointer; }
.chk input { width: auto; }

/* ================= RESPONSIVE ================= */
/* Tablet / mobil: oldalsáv fiókká (drawer) válik, alsó navigáció megjelenik */
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; width: 284px; max-width: 84vw; height: 100dvh;
    transform: translateX(-100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: var(--shadow-lg); z-index: 90;
  }
  .sidebar.open { transform: none; }
  .sb-close { display: grid; }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 85;
    background: rgba(3,7,15,.55); opacity: 0; pointer-events: none;
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    transition: opacity .28s;
  }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  .menu-btn { display: grid; }
  .topbar-brand { display: flex; }
  .header-actions {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding: 2px 4px; margin: 0 -4px 0 auto;
  }
  .header-actions::-webkit-scrollbar { display: none; }
  .header-actions > * { flex: none; }
  .content { padding: var(--sp-5) var(--sp-4) calc(72px + env(safe-area-inset-bottom)); }
  /* Alsó tab-navigáció */
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    justify-content: space-around; align-items: stretch;
    background: var(--header-bg); border-top: 1px solid var(--border);
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bn-link {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 5px 2px; background: none; border: none; cursor: pointer; text-decoration: none;
    color: var(--muted); font-size: .64rem; font-weight: 600; font-family: var(--font);
    transition: color var(--transition);
  }
  .bn-link .lucide { width: 21px; height: 21px; }
  .bn-link.active { color: var(--accent); }
}
@media (max-width: 720px) {
  .brand h1 { font-size: 1.12rem; }
  .section-title { margin-top: var(--sp-5); }
  .detail-grid { grid-template-columns: 1fr; }
  #map { height: 320px; }
  .table-wrap { display: none; }
  .cards-view.active { display: flex; }
  .chart-box { height: 230px; }
  .modal-foot { flex-direction: column; }
  .modal-foot > * , .modal-foot > div { width: 100%; }
  .modal-foot > div { display: flex; }
  .modal-foot .btn { flex: 1; justify-content: center; }
}
@media (max-width: 440px) {
  .content { padding-left: var(--sp-3); padding-right: var(--sp-3); }
  .filters { padding: 12px; gap: 10px; }
  .fitem { flex: 1 1 46%; }
  .fitem select, .fitem input { min-width: 0; width: 100%; }
  .stat .value { font-size: 1.5rem; }
  .topbar-brand h2 { font-size: .98rem; }
}
