:root {
  --bg: #050D19;
  --bg2: #0A1628;
  --bg3: #0F1F38;
  --card: rgba(255,255,255,0.05);
  --card-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --accent: #00E5A0;
  --accent2: #00C896;
  --accent-glow: rgba(0,229,160,0.15);
  --accent-glow2: rgba(0,229,160,0.08);
  --gold: #FFD700;
  --gold-dim: rgba(255,215,0,0.15);
  --text: #FFFFFF;
  --text2: #8BA7C7;
  --text3: #4A6480;
  --danger: #FF4757;
  --danger-dim: rgba(255,71,87,0.15);
  --success: #00E5A0;
  --nav-h: 76px;
  --topbar-h: 60px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; overflow: hidden; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ─── UTILITIES ─── */
.hidden { display: none !important; }
.view { width: 100%; height: 100%; }
.glass-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ─── LOGIN ─── */
#view-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #020A14 0%, #050D19 40%, #071222 100%);
}

.login-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.login-photo {
  position: absolute;
  inset: 0;
  background: url('/img/login-bg.jpg') center/cover no-repeat;
  animation: kenburns 32s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.06); }
  to { transform: scale(1.16); }
}
.login-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,13,25,0.55) 0%, rgba(5,13,25,0.30) 32%, rgba(5,13,25,0.86) 100%);
}

.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubbles span {
  position: absolute;
  bottom: -20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: bubble 6s ease-in infinite;
}
.bubbles span:nth-child(1)  { left: 10%; width:6px; height:6px; animation-delay:0s; animation-duration:7s; }
.bubbles span:nth-child(2)  { left: 22%; width:10px; height:10px; animation-delay:1s; }
.bubbles span:nth-child(3)  { left: 35%; width:5px; height:5px; animation-delay:2s; animation-duration:8s; }
.bubbles span:nth-child(4)  { left: 50%; width:8px; height:8px; animation-delay:0.5s; animation-duration:9s; }
.bubbles span:nth-child(5)  { left: 63%; width:12px; height:12px; animation-delay:1.5s; animation-duration:6s; }
.bubbles span:nth-child(6)  { left: 75%; width:6px; height:6px; animation-delay:3s; }
.bubbles span:nth-child(7)  { left: 85%; width:9px; height:9px; animation-delay:2.5s; animation-duration:7s; }
.bubbles span:nth-child(8)  { left: 15%; width:11px; height:11px; animation-delay:4s; animation-duration:8s; }
.bubbles span:nth-child(9)  { left: 45%; width:7px; height:7px; animation-delay:1.2s; }
.bubbles span:nth-child(10) { left: 90%; width:5px; height:5px; animation-delay:3.5s; animation-duration:6s; }

@keyframes bubble {
  0% { transform: translateY(0); opacity: 0.6; }
  100% { transform: translateY(-100vh); opacity: 0; }
}

.login-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.login-logo { text-align: center; }
.logo-icon {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  padding: 14px;
  background: linear-gradient(135deg, #122643 0%, #081120 100%);
  border: 1px solid rgba(0,229,160,0.25);
  animation: pulse-glow 3.5s ease-in-out infinite;
}
.logo-icon img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 2px 8px rgba(0,229,160,0.25)); }
@keyframes pulse-glow {
  0%,100% { box-shadow: 0 0 24px rgba(0,229,160,0.18); }
  50% { box-shadow: 0 0 48px rgba(0,229,160,0.32); }
}
.logo-title { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; text-shadow: 0 2px 20px rgba(0,0,0,0.5); }
.logo-sub { font-size: 14px; color: var(--text2); margin-top: 4px; }

/* Auth tabs (Anmelden / Registrieren) */
.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab.active {
  background: var(--accent);
  color: #000;
}

.login-card { padding: 28px 24px; }
.login-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }

.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text2); }
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow2);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238BA7C7' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
.form-group select option { background: #0F1F38; color: var(--text); }

.input-wrap { position: relative; }
.input-wrap input { padding-right: 48px; }
.toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text3); cursor: pointer;
  display: flex; align-items: center;
}
.toggle-pw svg { width: 18px; height: 18px; }

.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #000; font-weight: 700; font-size: 15px;
  border: none; border-radius: var(--radius-sm); padding: 14px 24px;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,229,160,0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-primary svg { width: 18px; height: 18px; }
.btn-primary.btn-full { width: 100%; }
.btn-primary.btn-large { padding: 16px; font-size: 17px; border-radius: var(--radius); }
.btn-primary.btn-sm { padding: 10px 18px; font-size: 13px; }

.btn-secondary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--card); color: var(--text); font-weight: 600; font-size: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 18px;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.btn-secondary:hover { background: var(--card-hover); }

.error-msg {
  background: var(--danger-dim); border: 1px solid rgba(255,71,87,0.3);
  color: #FF6B7A; border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 14px; margin-bottom: 16px;
}

.login-hint {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--text3); font-size: 12px; margin-top: 16px;
}
.login-hint svg { opacity: 0.7; }

/* ─── APP SHELL ─── */
#app-shell {
  display: flex; flex-direction: column;
  height: 100dvh; overflow: hidden;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-h); min-height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 100;
}
.topbar-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700;
}
.topbar-logo img { flex-shrink: 0; filter: drop-shadow(0 1px 4px rgba(0,229,160,0.35)); }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text2); transition: all 0.2s;
}
.icon-btn:hover { background: var(--card-hover); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0098D4);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #000;
  cursor: pointer; flex-shrink: 0;
}

/* MAIN CONTENT */
.main-content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--nav-h);
}
.main-content::-webkit-scrollbar { display: none; }

/* VIEW PAGES */
.view-page {
  animation: fadeSlide 0.25s ease-out;
  min-height: calc(100dvh - var(--topbar-h) - var(--nav-h));
}
.view-page.hidden { display: none; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── DASHBOARD ─── */
.page-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--bg3) 0%, var(--bg2) 100%);
  padding: 24px 20px 32px;
  border-bottom: 1px solid var(--border);
}
.hero-photo {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(10,22,40,0.55) 0%, rgba(10,22,40,0.78) 60%, rgba(10,22,40,0.95) 100%),
    url('/img/hero.jpg') center/cover no-repeat;
}
.hero-wave { position: absolute; bottom: 0; left: 0; right: 0; z-index: 1; }
.hero-wave svg { width: 100%; height: auto; display: block; }
.hero-content { position: relative; z-index: 2; }
.hero-greeting { font-size: 14px; color: var(--text2); margin-bottom: 4px; }
.hero-name { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.hero-date { font-size: 13px; color: var(--text3); margin-top: 6px; }
.hero-fish-icon {
  position: absolute; right: 16px; top: 20px; opacity: 0.8;
  animation: swim 6s ease-in-out infinite;
}
.hero-fish-icon svg { width: 80px; height: 50px; }
@keyframes swim {
  0%,100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(-4px) translateY(-3px); }
  75% { transform: translateX(4px) translateY(3px); }
}

.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 16px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.stat-card:hover, .stat-card:active { background: var(--card-hover); transform: scale(0.98); }
.stat-card.accent {
  background: var(--accent-glow);
  border-color: rgba(0,229,160,0.25);
}
.stat-icon { font-size: 24px; }
.stat-info { display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-size: 22px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 11px; color: var(--text2); }

.section { padding: 0 16px 20px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 12px;
}
.section-header h3 { font-size: 16px; font-weight: 700; }
.text-btn { background: none; border: none; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 0; }

/* ─── CATCH CARDS ─── */
.catch-list { display: flex; flex-direction: column; gap: 10px; }

.catch-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  transition: all 0.2s; cursor: pointer; position: relative;
  overflow: hidden;
}
.catch-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent);
  border-radius: 3px 0 0 3px;
}
.catch-card.kept-false::before { background: #4A90D9; }
.catch-card:hover { background: var(--card-hover); transform: translateX(2px); }

.catch-fish-img {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg3); object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--border);
}
.catch-fish-emoji {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg3); display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; border: 2px solid var(--border);
}
.catch-info { flex: 1; min-width: 0; }
.catch-species { font-size: 15px; font-weight: 700; }
.catch-meta { font-size: 12px; color: var(--text2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catch-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.catch-weight { font-size: 15px; font-weight: 700; color: var(--accent); }
.catch-length { font-size: 12px; color: var(--text2); }
.catch-date { font-size: 11px; color: var(--text3); }

.badge-cr {
  display: inline-flex; align-items: center;
  background: rgba(74,144,217,0.15); color: #4A90D9;
  border-radius: 20px; padding: 2px 8px; font-size: 10px; font-weight: 700;
}
.badge-kept {
  display: inline-flex; align-items: center;
  background: rgba(0,229,160,0.1); color: var(--accent);
  border-radius: 20px; padding: 2px 8px; font-size: 10px; font-weight: 700;
}

.empty-state {
  text-align: center; padding: 48px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-icon { font-size: 48px; opacity: 0.5; }
.empty-state p { color: var(--text2); font-size: 15px; }

/* ─── BEST CATCH ─── */
.best-catch-card {
  background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(255,215,0,0.03));
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: var(--radius); padding: 20px;
  display: flex; align-items: center; gap: 16px;
}
.best-catch-trophy { font-size: 36px; }
.best-catch-info { flex: 1; }
.best-catch-name { font-size: 18px; font-weight: 800; color: var(--gold); }
.best-catch-meta { font-size: 13px; color: var(--text2); margin-top: 4px; }
.best-catch-stats { text-align: right; }
.best-catch-weight { font-size: 24px; font-weight: 800; color: var(--gold); line-height: 1; }
.best-catch-unit { font-size: 12px; color: var(--text3); }

/* ─── PAGE HEADERS ─── */
.page-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 8px;
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-header h2 { font-size: 20px; font-weight: 800; }
.page-header-flex {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 8px;
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-header-flex h2 { font-size: 20px; font-weight: 800; }
.header-actions { display: flex; gap: 8px; }

.back-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text); flex-shrink: 0;
}
.back-btn svg { width: 18px; height: 18px; }

/* ─── CATCH FORM ─── */
.catch-form { padding: 16px; display: flex; flex-direction: column; gap: 0; }

.form-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
}
.form-section-label {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; font-size: 14px; font-weight: 600;
}
.step-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #000; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.chip-selector {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 8px 16px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; color: var(--text2);
}
.chip.selected {
  background: var(--accent-glow); border-color: var(--accent);
  color: var(--accent); font-weight: 700;
}

.species-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}
.species-chip {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 8px;
  cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.species-chip.selected {
  background: var(--accent-glow); border-color: var(--accent);
}
.species-chip img {
  width: 44px; height: 44px; object-fit: cover; border-radius: 50%;
}
.species-chip-emoji { font-size: 28px; }
.species-chip-name { font-size: 11px; font-weight: 600; color: var(--text2); line-height: 1.2; }
.species-chip.selected .species-chip-name { color: var(--accent); }

.number-input {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.number-input button {
  width: 44px; height: 48px; background: none; border: none;
  color: var(--text); font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.number-input button:hover { background: rgba(255,255,255,0.08); }
.number-input span { flex: 1; text-align: center; font-size: 20px; font-weight: 700; }

.toggle-group {
  display: flex; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--card);
}
.toggle-btn {
  flex: 1; padding: 12px; background: none; border: none;
  color: var(--text2); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.toggle-btn.active { background: var(--accent); color: #000; }

/* ─── FILTER BAR ─── */
.filter-bar {
  padding: 12px 16px;
  display: flex; gap: 8px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto; flex-wrap: nowrap;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar input, .filter-bar select {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--text); font-size: 14px; font-family: inherit;
  outline: none; flex-shrink: 0;
  -webkit-appearance: none;
}
.filter-bar input { flex: 1; min-width: 140px; }
.filter-bar select { min-width: 120px; }
.catches-list-content { padding: 12px 16px; }

#catches-list { padding: 12px 16px; }

/* ─── STATISTICS ─── */
.stats-summary {
  display: flex; gap: 0;
  padding: 16px;
}
.summary-card {
  flex: 1; text-align: center;
  border-right: 1px solid var(--border);
  padding: 12px;
}
.summary-card:last-child { border-right: none; }
.summary-num { display: block; font-size: 24px; font-weight: 800; color: var(--accent); }
.summary-label { display: block; font-size: 11px; color: var(--text2); margin-top: 4px; }

.year-select {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  color: var(--text); font-size: 14px; font-family: inherit;
  outline: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238BA7C7' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; padding-right: 28px;
}
.year-select option { background: #0F1F38; }

.chart-card { margin: 0 16px 16px; padding: 18px; }
.chart-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; }

/* Bar Chart */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-fill {
  width: 100%; background: linear-gradient(180deg, var(--accent), var(--accent2));
  border-radius: 4px 4px 0 0; min-height: 4px;
  transition: height 0.5s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}
.bar-fill::after {
  content: attr(data-val);
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; color: var(--accent);
  white-space: nowrap;
}
.bar-label { font-size: 10px; color: var(--text3); white-space: nowrap; }

/* Horizontal Bar */
.bar-chart-h { display: flex; flex-direction: column; gap: 10px; }
.hbar-item { display: flex; align-items: center; gap: 10px; }
.hbar-label { font-size: 13px; color: var(--text2); width: 100px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { flex: 1; height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.hbar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 4px; transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1); }
.hbar-val { font-size: 13px; font-weight: 700; color: var(--accent); width: 32px; text-align: right; flex-shrink: 0; }

/* Donut chart (CSS only) */
.donut-container { display: flex; flex-direction: column; gap: 10px; }
.donut-row { display: flex; align-items: center; gap: 10px; }
.donut-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-name { flex: 1; font-size: 13px; }
.donut-bar-wrap { width: 80px; height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; }
.donut-bar { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.donut-count { font-size: 13px; font-weight: 700; width: 28px; text-align: right; }

/* ─── PROFILE ─── */
.profile-card {
  margin: 16px; padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
}
.profile-avatar-large {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0098D4);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: #000;
}
.profile-info h3 { font-size: 20px; font-weight: 800; }
.profile-info p { font-size: 13px; color: var(--text2); margin-top: 4px; }
.badge {
  display: inline-block; background: var(--accent-glow); color: var(--accent);
  border: 1px solid rgba(0,229,160,0.3); border-radius: 20px;
  padding: 4px 12px; font-size: 12px; font-weight: 700; margin-top: 8px;
}

.menu-list { display: flex; flex-direction: column; gap: 0; margin: 0 16px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--card);
  border: none; border-bottom: 1px solid var(--border);
  color: var(--text); font-size: 15px; font-family: inherit;
  cursor: pointer; transition: background 0.15s;
  width: 100%; text-align: left;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--card-hover); }
.menu-item svg { margin-left: auto; color: var(--text3); }
.menu-item.danger { color: var(--danger); }
.menu-icon { font-size: 18px; width: 24px; text-align: center; }
.version-info { text-align: center; color: var(--text3); font-size: 11px; padding: 20px; }

/* ─── ADMIN ─── */
.admin-tabs {
  display: flex; overflow-x: auto; border-bottom: 1px solid var(--border);
  padding: 0 16px; gap: 0;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 14px 16px; background: none; border: none;
  color: var(--text2); font-size: 14px; font-weight: 500;
  cursor: pointer; white-space: nowrap; position: relative;
  border-bottom: 2px solid transparent; font-family: inherit;
  transition: all 0.2s;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-panel { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.admin-panel.hidden { display: none; }

.item-list { display: flex; flex-direction: column; gap: 8px; }
.item-row {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.item-row-info { flex: 1; }
.item-row-name { font-size: 14px; font-weight: 600; }
.item-row-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }
.item-row-actions { display: flex; gap: 6px; }
.action-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text2); transition: all 0.15s;
}
.action-btn:hover { background: var(--card-hover); color: var(--text); }
.action-btn.del:hover { background: var(--danger-dim); color: var(--danger); border-color: rgba(255,71,87,0.3); }
.action-btn svg { width: 14px; height: 14px; }

.inline-form { padding: 16px; margin-top: 4px; }
.inline-form h4 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ─── BOTTOM NAV ─── */
.bottom-nav {
  height: var(--nav-h); min-height: var(--nav-h);
  display: flex; align-items: center;
  background: var(--bg2); border-top: 1px solid var(--border);
  position: relative; z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 8px 4px;
  background: none; border: none;
  color: var(--text3); font-size: 10px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn.active { color: var(--accent); }
.nav-btn.active svg { filter: drop-shadow(0 0 6px rgba(0,229,160,0.5)); }

.nav-add { flex: 0 0 72px; }
.add-btn-inner {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,229,160,0.4);
  transition: all 0.2s; margin-top: -16px;
}
.add-btn-inner:hover { transform: scale(1.05); box-shadow: 0 6px 28px rgba(0,229,160,0.5); }
.add-btn-inner svg { width: 26px; height: 26px; color: #000; }

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 12px); left: 50%; transform: translateX(-50%);
  background: rgba(15, 30, 55, 0.95); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 20px;
  font-size: 14px; font-weight: 500; z-index: 999;
  backdrop-filter: blur(20px); white-space: nowrap;
  animation: slideUp 0.3s ease-out;
  box-shadow: var(--shadow);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── SUCCESS OVERLAY ─── */
.success-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(5, 13, 25, 0.95);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(20px);
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.success-content { text-align: center; padding: 40px 32px; }
.success-icon {
  width: 100px; height: 100px; margin: 0 auto 24px;
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.success-icon svg { width: 100%; height: 100%; }
.success-content h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.success-content p { color: var(--text2); font-size: 16px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 18px; }
  .species-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-color-scheme: dark) {
  input:-webkit-autofill,
  input:-webkit-autofill:hover,
  input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #0A1628 inset;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
  }
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: skeleton-load 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-load {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Pull indicator */
.loading-spinner {
  width: 24px; height: 24px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.6s linear infinite; margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
