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

:root {
  --white:      #ffffff;
  --bg:         #f0f4f8;
  --bg2:        #e8eef4;
  --surface:    #ffffff;
  --surface2:   #f8fafc;
  --border:     #e2e8f0;
  --blue:       #1d4ed8;
  --blue-light: #3b82f6;
  --blue-bg:    #1e40af;
  --teal:       #0d9488;
  --teal-light: #14b8a6;
  --teal-bg:    #0f766e;
  --text:       #0f172a;
  --text-2:     #475569;
  --text-3:     #94a3b8;
  --red:        #ef4444;
  --amber:      #f59e0b;
  --green:      #10b981;
  --sidebar-w:  220px;
  --radius-sm:  8px;
  --radius:     16px;
  --radius-lg:  24px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);
  --shadow-md:  0 4px 24px rgba(0,0,0,.10);
  --font:       'Inter', system-ui, sans-serif;
}

html { font-size: 14px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  padding: 1.5rem 1rem;
}
.sidebar-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue-light);
  text-decoration: none;
  margin-bottom: .15rem;
}
.sidebar-sub {
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 2rem;
}
.sidebar nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .85rem;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: all .15s;
  position: relative;
}
.nav-item:hover {
  background: var(--bg);
  color: var(--text);
}
.nav-item.active {
  color: var(--blue-light);
  font-weight: 600;
}
.nav-item.active::after {
  content: '';
  position: absolute;
  right: -1rem;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--blue-light);
  border-radius: 2px 0 0 2px;
}
.nav-icon { font-size: 1rem; width: 1.2rem; text-align: center; }

.quick-log-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: var(--blue-light);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .75rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-top: 1.5rem;
  transition: background .15s, transform .1s;
}
.quick-log-btn:hover {
  background: var(--blue);
  transform: translateY(-1px);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-light), var(--teal));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
}
.user-name  { font-size: .8rem; font-weight: 600; }
.user-role  { font-size: .65rem; color: var(--text-3); }
.logout-link { font-size: .7rem; color: var(--text-3); text-decoration: none; display: block; margin-top: .1rem; }
.logout-link:hover { color: var(--red); }

/* ── Main ────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 2rem 2.5rem;
  max-width: 1100px;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.page-title { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.page-title span { color: var(--blue-light); }
.page-sub   { color: var(--text-2); margin-top: .35rem; font-size: .9rem; }
.status-badge {
  display: flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 600;
  color: var(--teal);
}
.status-badge.warn { color: var(--amber); }
.status-badge.off  { color: var(--red); }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.card-sm { padding: 1.1rem 1.25rem; }
.card-title {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: .75rem;
}

/* Colored cards */
.card-blue {
  background: var(--blue-bg);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}
.card-teal {
  background: var(--teal-bg);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}
.card-blue .label,
.card-teal .label {
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: .4rem;
}
.card-blue .big-num,
.card-teal .big-num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}
.card-blue .icon,
.card-teal .icon { font-size: 1.5rem; margin-bottom: .5rem; opacity: .8; }

/* ── Grid ────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ── Journey card ────────────────────────────────────────── */
.journey-card { padding: 1.75rem; }
.journey-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .25rem; }
.journey-sub   { font-size: .82rem; color: var(--text-2); margin-bottom: 1.25rem; }
.journey-nums  { display: flex; gap: 2rem; margin-bottom: 1.25rem; }
.journey-num-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.journey-num-val   { font-size: 1.6rem; font-weight: 800; color: var(--blue-light); }
.journey-num-unit  { font-size: .8rem; color: var(--text-2); }

/* Donut progress */
.donut-wrap { display: flex; align-items: center; gap: 1.5rem; }
.donut-svg  { width: 90px; height: 90px; }
.donut-pct  { font-size: 1rem; font-weight: 700; fill: var(--text); }
.donut-lbl  { font-size: .5rem; fill: var(--text-3); }

/* ── Trend bar chart ─────────────────────────────────────── */
.chart-wrap { position: relative; height: 180px; }
.chart-wrap-lg { position: relative; height: 260px; }

/* ── Activity list ───────────────────────────────────────── */
.activity-item {
  display: flex; align-items: center; gap: .85rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}
.activity-main { flex: 1; }
.activity-weight { font-size: .95rem; font-weight: 700; }
.activity-date   { font-size: .72rem; color: var(--text-3); }
.activity-delta  { font-size: .8rem; font-weight: 600; }
.delta-down { color: var(--teal); }
.delta-up   { color: var(--red); }
.delta-flat { color: var(--text-3); }

/* ── Section header ──────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.section-title { font-size: 1rem; font-weight: 700; }
.section-link  { font-size: .8rem; color: var(--blue-light); text-decoration: none; font-weight: 500; }
.section-link:hover { text-decoration: underline; }

/* ── Banner ──────────────────────────────────────────────── */
.banner {
  background: linear-gradient(135deg, #0f172a 60%, #1e3a5f);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.banner-title { font-size: 1.4rem; font-weight: 800; line-height: 1.3; margin-bottom: .5rem; }
.banner-sub   { font-size: .85rem; opacity: .75; }
.banner-link  { color: #fff; font-size: .85rem; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); }

/* ── KPI small ───────────────────────────────────────────── */
.kpi-sm { text-align: center; padding: 1rem; }
.kpi-sm .val { font-size: 1.5rem; font-weight: 800; }
.kpi-sm .lbl { font-size: .7rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-top: .2rem; }

/* ── Velocity table ──────────────────────────────────────── */
.vel-row { display: flex; justify-content: space-between; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.vel-row:last-child { border-bottom: none; }
.vel-label { font-size: .85rem; color: var(--text-2); }
.vel-val   { font-size: .95rem; font-weight: 700; }

/* ── Gallery grid ────────────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.gallery-item {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.gallery-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.gallery-img  { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.gallery-info { padding: .75rem 1rem; }
.gallery-date { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.gallery-w    { font-size: 1.2rem; font-weight: 800; }
.gallery-unit { font-size: .75rem; color: var(--text-2); }

/* ── Forms ───────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: .9rem;
  padding: .65rem .9rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-full { grid-column: 1 / -1; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.4rem;
  background: var(--blue-light);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--blue); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-2);
}
.btn-outline:hover { background: var(--bg); border-color: var(--text-3); transform: none; }
.btn-danger { background: transparent; border: 1.5px solid var(--border); color: var(--text-3); padding: .3rem .6rem; border-radius: var(--radius-sm); }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); transform: none; }
.btn-sm { padding: .4rem .9rem; font-size: .78rem; }
.btn-teal { background: var(--teal); }
.btn-teal:hover { background: var(--teal-bg); }

/* ── Progress bar ────────────────────────────────────────── */
.progress-track { background: var(--bg2); border-radius: 99px; height: 8px; overflow: hidden; margin: .6rem 0; }
.progress-fill  { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--blue-light), var(--teal)); transition: width .5s; }

/* Linear journey bar */
.journey-bar-wrap { position: relative; margin: 1rem 0 .4rem; }
.journey-bar-track { background: var(--bg2); border-radius: 99px; height: 8px; }
.journey-bar-fill  { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--blue-light), var(--teal)); }
.journey-bar-pin {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center;
}
.journey-pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--blue-light); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.journey-pin-label {
  background: var(--blue-light); color: #fff;
  font-size: .65rem; font-weight: 700;
  border-radius: 4px; padding: .15rem .4rem;
  margin-bottom: .25rem; white-space: nowrap;
}

/* ── BMI bar ─────────────────────────────────────────────── */
.bmi-bar-wrap { display: flex; gap: 2px; border-radius: 4px; overflow: hidden; height: 8px; margin: .5rem 0; }
.bmi-seg { flex: 1; }
.bmi-marker-row { display: flex; justify-content: space-between; font-size: .65rem; color: var(--text-3); }

/* ── Flash ───────────────────────────────────────────────── */
.flash-list { list-style: none; margin-bottom: 1rem; }
.flash {
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  background: #dcfce7; color: #166534; border-left: 4px solid #22c55e;
  margin-bottom: .4rem;
}
.flash.error { background: #fee2e2; color: #991b1b; border-color: var(--red); }
.flash.info  { background: #fef3c7; color: #92400e; border-color: var(--amber); }

/* ── Table ───────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th {
  text-align: left; padding: .5rem .75rem;
  font-size: .68rem; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-3);
  border-bottom: 2px solid var(--border);
}
.data-table td { padding: .65rem .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.thumb { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; cursor: pointer; transition: transform .2s; }
.thumb:hover { transform: scale(1.1); }

/* ── Photo modal ─────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.75); align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.modal-close { position: fixed; top: 1rem; right: 1.5rem; font-size: 2rem; cursor: pointer; color: #fff; line-height: 1; }

/* ── File drop ───────────────────────────────────────────── */
.file-drop {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 1.25rem; text-align: center; color: var(--text-3);
  font-size: .85rem; cursor: pointer; transition: border-color .15s, color .15s;
}
.file-drop:hover { border-color: var(--blue-light); color: var(--blue-light); }
.file-drop input[type=file] { display: none; }

/* ── Login page ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: var(--bg);
}
.login-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  width: 100%; max-width: 380px;
}
.login-logo { font-size: 1.3rem; font-weight: 800; color: var(--blue-light); margin-bottom: .25rem; }
.login-sub  { font-size: .8rem; color: var(--text-3); margin-bottom: 2rem; letter-spacing: .08em; text-transform: uppercase; }
.login-box .form-group input { background: var(--bg); }

/* ── Utility ─────────────────────────────────────────────── */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex  { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.text-blue  { color: var(--blue-light); }
.text-teal  { color: var(--teal); }
.text-red   { color: var(--red); }
.text-amber { color: var(--amber); }
.text-muted { color: var(--text-3); }
.text-2     { color: var(--text-2); }
.fw-800 { font-weight: 800; }
.fw-600 { font-weight: 600; }
.fs-sm  { font-size: .8rem; }
.fs-xs  { font-size: .7rem; }

/* ═══════════════════════════════════════════════════════════
   Mobile Bottom Navigation  (≤ 768 px)
   ═══════════════════════════════════════════════════════════ */

/* Hide bottom nav on desktop */
.bottom-nav { display: none; }

@media (max-width: 768px) {

  /* Hide the sidebar on mobile */
  .sidebar { display: none; }

  /* Main takes full width, add bottom padding so content
     isn't hidden behind the nav bar                       */
  .main {
    margin-left: 0;
    padding: 1.25rem 1rem 5.5rem;
    max-width: 100%;
  }

  /* ── Bottom Navigation Bar ─────────────────────────────── */
  .bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(0,0,0,.08);
    z-index: 100;
    /* safe-area for iOS home indicator */
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 2px;
    text-decoration: none;
    color: var(--text-3);
    font-size: .6rem;
    font-weight: 500;
    padding: .4rem .25rem;
    border-radius: var(--radius-sm);
    transition: color .15s;
  }

  .bottom-nav-item:hover,
  .bottom-nav-item.active {
    color: var(--blue-light);
  }

  .bottom-nav-icon {
    font-size: 1.3rem;
    line-height: 1;
  }

  .bottom-nav-label {
    line-height: 1;
  }

  /* ── "Log" centre button (highlighted) ─────────────────── */
  .bottom-nav-add {
    position: relative;
    top: -10px;
    background: var(--blue-light);
    color: #fff !important;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    flex: none;
    box-shadow: 0 4px 16px rgba(59,130,246,.45);
    padding: 0;
  }

  .bottom-nav-add .bottom-nav-icon {
    font-size: 1.6rem;
  }

  .bottom-nav-add .bottom-nav-label {
    display: none;          /* no label under the floating button */
  }

  .bottom-nav-add:hover {
    background: var(--blue) !important;
  }

}
/* ═══════════════════════════════════════════════════════════ */

/* donut fix */
.donut-svg { width: 100px; height: 100px; overflow: visible; }
.donut-wrap { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
/* stepper button */
.stepper-btn { padding: .4rem .85rem !important; font-size: 1.1rem !important; min-width: 40px; }

/* ── Stepper row ─────────────────────────── */
.stepper-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  width: 100%;
}
.stepper-row input[type=number] {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}
.stepper-btn {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0 !important;
  font-size: 1.2rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px !important;
  border: 1.5px solid var(--border) !important;
  background: var(--surface2) !important;
  color: var(--text-1) !important;
  cursor: pointer;
  user-select: none;
}
.stepper-btn:active { background: var(--border) !important; }

/* ── Rating ──────────────────────────────── */
.rating-row {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.rating-label { cursor: pointer; }
.rating-icon {
  font-size: 1.6rem;
  opacity: .25;
  transition: opacity .15s, transform .15s;
  display: inline-block;
  cursor: pointer;
}
.rating-icon.rating-active { opacity: 1; transform: scale(1.15); }
.rating-icon:hover { opacity: .8; }

/* ── Photo toolbar ───────────────────────── */
.photo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .6rem;
  align-items: center;
}
.tool-btn {
  padding: .3rem .65rem;
  font-size: .75rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text-1);
  cursor: pointer;
  transition: background .12s;
}
.tool-btn:active, .tool-btn.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

/* ── Donut fix ───────────────────────────── */
.donut-svg { width: 100px; height: 100px; overflow: visible; }
.donut-wrap { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }

/* ── Layout: nur Bottom-Nav, keine Sidebar ─────────────────────────────── */
.sidebar { display: none !important; }

.main {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 980px;
  padding: 1.25rem 1.25rem 80px !important;
}

/* ── Bottom Navigation ─────────────────────────────────────────────────── */
.bottom-nav {
  display: flex !important;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface2, #1e293b);
  border-top: 1px solid var(--border, #334155);
  z-index: 100;
  height: 60px;
  align-items: center;
  padding: 0;
}

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text-2, #94a3b8);
  transition: color .15s;
  height: 100%;
  padding: 0 4px;
}
.bnav-item.active, .bnav-item:hover { color: var(--accent, #3b82f6); }
.bnav-icon { font-size: 1.25rem; line-height: 1; }
.bnav-label { font-size: .62rem; white-space: nowrap; }

/* Plus-Button: runder Kreis, schwebend */
.bnav-add {
  flex: 0 0 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.bnav-add-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent, #3b82f6);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(59,130,246,.45);
  transition: transform .15s, box-shadow .15s;
  text-decoration: none;
}
.bnav-add:hover .bnav-add-circle {
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(59,130,246,.55);
}

/* User-Item in der Bottom-Nav */
.bnav-user {
  flex: 1.3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  height: 100%;
  padding: 4px 4px 2px;
  position: relative;
}
.bnav-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent, #3b82f6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
}
.bnav-username {
  font-size: .6rem;
  color: var(--text-2, #94a3b8);
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bnav-logout {
  position: absolute;
  top: 5px; right: 4px;
  font-size: .85rem;
  color: var(--text-3, #64748b);
  text-decoration: none;
  line-height: 1;
}
.bnav-logout:hover { color: #ef4444; }

/* Settings grid */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 680px) {
  .settings-grid { grid-template-columns: 1fr; }
  .main { padding: 1rem .75rem 80px !important; }
}

/* ── Avatar Preview (Settings) ───────────────────────────── */
.avatar-preview {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent, #3b82f6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.avatar-preview img, #avatarImg {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ── Nav: User/Profile item (kein logout-button mehr) ─────── */
.bnav-user-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text-2, #94a3b8);
  transition: color .15s;
  height: 100%;
  padding: 0 4px;
}
.bnav-user-item.active, .bnav-user-item:hover { color: var(--accent, #3b82f6); }
.bnav-user-item .bnav-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent, #3b82f6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
  overflow: hidden;
}
.bnav-avatar-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
