:root {
  --bg-1: #0a1f10;
  --bg-2: #123320;
  --card: rgba(255, 255, 255, 0.93);
  --ink: #0d2416;
  --muted: #4f6a57;
  --brand: #2db358;
  --brand-2: #5dd98a;
  --ok: #148f4a;
  --warn: #b76e00;
  --danger: #b8312f;
  --chip: #e2f5e9;
  --line: rgba(13, 36, 22, 0.13);
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Saira Semi Condensed", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(45, 179, 88, 0.28), transparent 36%),
    radial-gradient(circle at 90% 20%, rgba(93, 217, 138, 0.18), transparent 38%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
}

.page-wrap {
  width: min(1120px, 94vw);
  margin: 0 auto;
  padding: 20px 0 40px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d8ffea;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-main {
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  color: #072712;
}

.btn-soft {
  background: rgba(255, 255, 255, 0.2);
  color: #f7fbff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.panel {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.4);
  overflow: hidden;
}

.hero {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(45, 179, 88, 0.14), rgba(18, 51, 32, 0.02));
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  margin: 0;
  font-size: clamp(26px, 5vw, 42px);
  line-height: 1.04;
}

.hero p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.status {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.section {
  padding: 18px 20px;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.tile {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--line);
}

.tile h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.tile p {
  margin: 0 0 10px;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.metric strong {
  display: block;
  font-size: 20px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.tabbar {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 4px;
}

.tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.tab-panel {
  display: none;
  margin-top: 12px;
}

.tab-panel.active {
  display: block;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.item h4 {
  margin: 0;
  font-size: 17px;
}

.item-meta {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  background: var(--chip);
  color: #0c3b42;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.cols {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  font: inherit;
  background: #fff;
}

.muted {
  color: var(--muted);
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
  color: var(--muted);
}

.score-stars {
  letter-spacing: 1px;
  color: #eeab21;
}

.month-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 120px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.month-col {
  flex: 1;
  text-align: center;
}

.month-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(to top, #0d4020, #47a96a);
  min-height: 4px;
}

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
}

/* ── Bottom Navigation Bar ── */
body {
  padding-bottom: 60px;
}

.bottom-nav {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-top: 1px solid #dbe2ea;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.10);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 1200;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 2px;
  color: #9ca3af;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.bnav-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.bottom-nav-btn:hover,
.bottom-nav-btn.active {
  color: #2db358;
}

/* ── Slide-up navigációs menü panel ── */
.nav-menu-panel {
  display: none;
}
.nav-menu-panel.open {
  display: block;
}
.nav-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  background: rgba(0,0,0,0.45);
  z-index: 1300;
}
.nav-menu-sheet {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  z-index: 1301;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 -6px 32px rgba(0,0,0,0.18);
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  max-height: calc(80vh - 68px);
  overflow-y: auto;
  animation: slideUp 0.22s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.nav-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e9edf0;
}
.nav-menu-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-menu-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2db358, #5dd98a);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-menu-name {
  font-weight: 700;
  font-size: 15px;
  color: #111;
}
.nav-menu-sub {
  font-size: 12px;
  color: #9ca3af;
}
.nav-menu-close {
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-menu-links {
  display: flex;
  flex-direction: column;
  padding: 8px 0 16px;
}
.nav-menu-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  text-decoration: none;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.12s, color 0.12s;
}
.nav-menu-link:last-child {
  border-bottom: none;
}
.nav-menu-link:hover {
  background: #f0fdf4;
  color: #2db358;
}
.nm-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: #6b7280;
  display: flex;
  align-items: center;
}
.nm-icon svg {
  width: 26px;
  height: 26px;
}
