/* Vislog UI v2 – gebaseerd op docs/design/tokens.md (Figma export)
   Doel: nieuwe look & feel zonder backend-wijzigingen.
   Gebruik: public/css/ui.v2.css
*/

:root{
  /* Colors */
  --color-primary:#1F6F78;
  --color-dark:#0F3D3E;
  --color-accent:#F2B441;

  --color-bg:#F7F9FA;
  --color-surface:#FFFFFF;
  --color-border:#E5E7EB;

  --color-text:#111827;
  --color-muted:#6B7280;

  /* Aliases used by some migrated components */
  --muted: var(--color-muted);
  --surface: var(--color-surface);
  --border: var(--color-border);
  --brand: var(--color-primary);
  --accent: var(--color-accent);

  --color-danger:#DC2626;
  --color-success:#059669;
  --color-warning:#D97706;

  --scrim: rgba(0,0,0,0.30);
  --primary-soft: rgba(31,111,120,0.05);

  /* Typography */
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --text-base: 16px;
  --text-sm: 14px;
  --lh: 1.5;
  --weight-body: 400;
  --weight-heading: 600;

  /* Radius */
  --radius-input: 10px;
  --radius-card: 14px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-panel: 0 10px 15px rgba(0,0,0,0.12);
  --shadow-fab: 0 4px 12px rgba(242,180,65,0.30);

  /* Spacing */
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  --container: 1100px;

  /* Motion */
  --dur: .3s;
  --ease: ease-out;

  /* Icon sizes */
  --icon-16: 16px;
  --icon-20: 20px;
  --icon-24: 24px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  font-size:var(--text-base);
  font-weight:var(--weight-body);
  line-height:var(--lh);
  background:var(--color-bg);
  color:var(--color-text);
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; height:auto; }

/* Layout helpers */
.container{ max-width:var(--container); margin:0 auto; padding:var(--space-4); }
.page-wrap{ padding: var(--space-6) var(--space-4); }
.page-inner{ max-width:var(--container); margin:0 auto; }

/* Header / nav */
.app-header{
  position:sticky; top:0; z-index:2000;
  background: rgba(247,249,250,.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom:1px solid var(--color-border);
}
.header-inner{
  max-width:var(--container);
  margin:0 auto;
  padding: var(--space-3) var(--space-4);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: var(--space-3);
}
.brand{
  display:flex; align-items:baseline; gap:2px;
  font-weight:700; letter-spacing:-0.4px;
}
.brand .vis{ color:var(--color-dark); }
.brand .log{ color:var(--color-primary); }

.nav{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}

/* Active nav (optioneel, toe te passen door class) */
.nav a.is-active, .nav button.is-active{
  border-color: rgba(31,111,120,.35);
  background: var(--primary-soft);
}

/* Cards */
.card{
  background:var(--color-surface);
  border:1px solid var(--color-border);
  border-radius:var(--radius-card);
  box-shadow: var(--shadow-card);
}
.card:hover{ box-shadow: var(--shadow-card-hover); }
.card-pad{ padding: var(--space-4); }

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: var(--radius-input);
  border:1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 600;
  font-size: var(--text-base);
  line-height: var(--lh);
  cursor:pointer;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
button.btn,
input.btn{
  font-size: var(--text-base);
  line-height: var(--lh);
  font-family: var(--font);
}
.btn:hover{ border-color: rgba(31,111,120,.30); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.btn-primary:hover{
  background: var(--color-dark);
  border-color: var(--color-dark);
}

.btn-danger{
  background: rgba(220,38,38,0.08);
  border-color: rgba(220,38,38,0.25);
  color: var(--color-danger);
}
.btn-danger:hover{ background: rgba(220,38,38,0.12); }

/* Icon-only button */
.btn-icon{
  width:40px; height:40px;
  padding:0;
  border-radius: var(--radius-input);
}

/* Forms */
.label{ display:block; font-size:13px; color:var(--color-muted); margin-bottom:6px; }
.help{ font-size:13px; color:var(--color-muted); }

.input, .textarea, .select, .vl-select{
  width:100%;
  border:1px solid var(--color-border);
  outline:none;
  background:#fff;
  border-radius: var(--radius-input);
  padding: 10px 12px;
  font-size: var(--text-sm);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.select, .vl-select{
  font-weight: 500;
  line-height: 1.2;
  font-size: inherit;
  border-radius: 12px;
  border-color: #E5E7EB;
  padding: 12px 42px 12px 14px;
  min-height: 40px;
  appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

.select:hover, .vl-select:hover{
  border-color: var(--color-primary);
}
.input:focus, .textarea:focus, .select:focus, .vl-select:focus{
  border-color: rgba(31,111,120,.45);
  box-shadow: 0 0 0 4px rgba(31,111,120,.12);
}

/* Datum/tijd UX states (hard requirement) */
.input.is-empty{ border-color: rgba(217,119,6,.65); box-shadow: 0 0 0 4px rgba(217,119,6,.12); }
.input.is-filled{ border-color: rgba(5,150,105,.65); box-shadow: 0 0 0 4px rgba(5,150,105,.12); }

/* Alerts */
.alert{
  border:1px solid var(--color-border);
  background:#fff;
  border-radius: var(--radius-card);
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.alert-danger{ border-color: rgba(220,38,38,0.25); background: rgba(220,38,38,0.05); }
.alert-success{ border-color: rgba(5,150,105,0.25); background: rgba(5,150,105,0.05); }

/* Toolbar (logboek) */
.toolbar{
  display:flex; align-items:center; justify-content:space-between;
  gap: var(--space-3);
  flex-wrap:wrap;
  margin-bottom: var(--space-3);
}
.toolbar-left{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.toolbar-right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.search{ min-width: 260px; flex:1; max-width: 520px; }

/* Catch list */
.catch-list{ display:grid; gap: var(--space-3); }

.catch-card{
  background: var(--color-surface);
  border:1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.catch-card:hover{ box-shadow: var(--shadow-card-hover); }
.catch-card__pad{ padding: var(--space-4); }

.catch-row{
  display:grid;
  grid-template-columns: 92px 1fr auto;
  gap: var(--space-3);
  align-items: stretch;
}
@media (max-width: 720px){
  .catch-row{ grid-template-columns: 78px 1fr; }
  .catch-actions{ grid-column: 1 / -1; justify-content:flex-start; }
}

.catch-thumb{
  width:92px; height:72px;
  border-radius: var(--radius-card);
  border:1px solid var(--color-border);
  background: var(--primary-soft);
  overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  color: var(--color-muted);
  font-size: 13px;
}
@media (max-width:720px){ .catch-thumb{ width:78px; height:64px; } }
.catch-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

.catch-main{ min-width:0; }
.catch-title{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin:0; }
.catch-title .species{ font-weight:700; font-size:16px; letter-spacing:-0.2px; }
.catch-title .dt{ font-size:13px; color:var(--color-muted); display:inline-flex; gap:6px; align-items:center; }

.catch-meta{ margin-top:6px; font-size:13px; color:var(--color-muted); display:flex; gap:6px; align-items:center; }

.catch-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.catch-chip{
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 10px;
  border:1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size:13px;
  background: var(--primary-soft);
}
.catch-chip strong{ font-weight:600; color: var(--color-text); }

.catch-notes{ margin-top:8px; font-size:14px; line-height:1.45; color: var(--color-text); }
.catch-actions{ display:flex; gap:10px; align-items:center; justify-content:flex-end; flex-wrap:wrap; }

/* Sheet / drawer (map sidebar) */
.sheet{
  position:absolute;
  right: var(--space-4);
  top: var(--space-4);
  width: 360px;
  max-width: calc(100vw - (var(--space-4) * 2));
  background: var(--surface);
  border:1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-panel);
  overflow:hidden;

  /* hidden by default; JS toggles .open */
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  z-index: 3500;
}
.sheet.open{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Mobiel: sheet onderin als drawer */
@media (max-width: 720px){
  .sheet{
    left: var(--space-4);
    right: var(--space-4);
    top: auto;
    bottom: var(--space-4);
    width: auto;
  }
}

.sheet-header{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding: 12px 14px;
  border-bottom:1px solid var(--color-border);
  /* Solid background so the title/close never become unreadable */
  background: var(--surface);
  /* Ensure the close button never falls under the fixed app header */
  position: sticky;
  top: 0;
  z-index: 2;
}
.sheet-title{ display:flex; align-items:center; gap:8px; font-weight:700; }
.sheet-body{ padding: var(--space-4); }

/* Map sheet: scrollable content + sticky actions */
.vl-map .sheet{ display:flex; flex-direction:column; }
.vl-map .sheet-body{ flex:1; overflow:auto; }

/* Mobile detail: fullscreen sheet (kaart blijft er niet achter zichtbaar) */
@media (max-width: 720px){
  body.map-detail-open .vl-map .sheet.open{
    position: fixed;
    left: 0;
    right: 0;
    top: var(--nav-height);
    bottom: var(--bottom-nav-height);
    width: auto;
    max-width: none;
    border-radius: 0;
    margin: 0;
  }
  body.map-detail-open .vl-map .sheet.open .sheet-handle{ display:none; }
  body.map-detail-open .vl-map{ padding-bottom: var(--bottom-nav-height); }
  body.map-detail-open .vl-fab{ display:none; }
}

/* Desktop: FAB left of sidebar when open */
@media (min-width: 768px){
  body.map-panel-open .vl-fab{ right: var(--map-fab-right, 32px); }
}


/* Panel details */
.panel-meta{ display:grid; gap: 12px; }
.panel-photo{ width:100%; border-radius: var(--radius-card); border:1px solid var(--color-border); cursor:pointer; }
.panel-datetime{ font-size:13px; color: var(--color-muted); display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.panel-stats{ display:flex; flex-wrap:wrap; gap:8px; }
.panel-actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

@media (max-width: 720px){
  .panel-actions{ flex-direction: column; align-items: stretch; }
  .panel-actions .btn{ width: 100%; justify-content: center; }
}

.section{ padding-top:10px; border-top:1px solid var(--color-border); }
.section-title{ font-size:13px; color: var(--color-muted); margin:0 0 8px; }
.panel-notes{ font-size:14px; white-space:pre-wrap; line-height:1.45; }

.weather-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:10px 12px; font-size:13px; }
.weather-item{ padding:10px; border:1px solid var(--color-border); border-radius:12px; background: var(--color-surface); }
.weather-item .k{ display:block; color: var(--color-muted); font-size:12px; margin-bottom:3px; }
.weather-item .v{ font-weight:600; color: var(--color-text); }

/* FAB (mobile action) */
.fab{
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  border:1px solid rgba(242,180,65,0.40);
  background: var(--color-accent);
  color: #111827;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: var(--shadow-fab);
  z-index: 2500;
}
.fab:hover{ filter: brightness(0.98); }

/* Empty states (minimaal: icon + tekst) */
.empty{
  border:1px dashed rgba(229,231,235,1);
  background: rgba(255,255,255,.6);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  text-align:center;
}
.empty .empty-icon{ width:48px; height:48px; margin:0 auto 10px; color: var(--color-muted); }
.empty .empty-title{ margin:0; font-weight:700; font-size:16px; }
.empty .empty-text{ margin:6px 0 0; color: var(--color-muted); font-size:14px; }

/* Lightbox */
.lightbox{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.72);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 9999;
}
.lightbox img{
  max-width: min(980px, 100%);
  max-height: 90vh;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-panel);
}

/* Icon base (SVG inline) */
.ui-icon{ width: var(--icon-20); height: var(--icon-20); display:inline-block; vertical-align:-4px; color: currentColor; }
.ui-icon--meta{ width: var(--icon-16); height: var(--icon-16); color: var(--color-muted); }
.ui-icon--primary{ color: var(--color-primary); }
.ui-icon--danger{ color: var(--color-danger); }

/* Optional: map user location dot */
.user-dot{
  width:14px; height:14px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  border:2px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.20);
}

/* ------------------------------------------------------------
   Header (Figma-style brand + quiet nav links)
   Additive rules (no breaking changes to existing .btn usage)
------------------------------------------------------------ */

.brand.brand--figma{
  align-items:center;
  gap:10px;
  font-weight:700;
  letter-spacing:-0.3px;
}
.brand-badge{
  width:32px;
  height:32px;
  border-radius:10px;
  background: var(--color-primary);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.brand-word{
  font-size:18px;
  font-weight:700;
  color: var(--color-primary);
}

/* Quiet nav item (Figma): muted by default, subtle bg on hover/active */
.nav-link{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: var(--radius-input);
  border:1px solid transparent;
  background: transparent;
  color: var(--color-muted);
  font-weight: 600;
  cursor:pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav-link:hover{
  color: var(--color-primary);
  background: var(--primary-soft);
  border-color: rgba(31,111,120,0.18);
}
.nav-link.is-active{
  color: var(--color-primary);
  background: var(--primary-soft);
  border-color: rgba(31,111,120,0.35);
}
.nav-link .ui-icon{ color: currentColor; }

/* Keep .nav layout but allow mixed buttons + nav-links */
.nav{ gap:8px; }
.nav .btn{ margin:0; }

/* ------------------------------------------------------------
   Profile page (Figma layout)
------------------------------------------------------------ */
.profile-wrap{
  padding: var(--space-6) var(--space-4);
}
.profile-inner{
  max-width: 900px;
  margin: 0 auto;
}
.profile-title{
  margin: 0 0 var(--space-6);
  font-size: 28px;
  font-weight: var(--weight-heading);
  letter-spacing:-0.2px;
}
.profile-card{
  background: var(--color-surface);
  border:1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
@media (min-width: 900px){
  .profile-card{ padding: 32px; }
}
.profile-head{
  display:flex;
  gap: 24px;
  align-items:flex-start;
  margin-bottom: 24px;
}
.profile-avatar{
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: var(--color-primary);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}
.profile-name{
  margin:0 0 8px;
  font-size: 20px;
  font-weight: var(--weight-heading);
}
.profile-email{
  display:flex;
  align-items:center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 14px;
}
.profile-stats{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}
@media (max-width: 720px){
  .profile-stats{ grid-template-columns: 1fr; }
}
.profile-stat{
  text-align:center;
  padding: 16px;
  border-radius: var(--radius-input);
  background: var(--color-bg);
}
.profile-stat .stat-icon{
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  margin: 0 auto 8px;
}
.profile-stat .stat-value{
  font-weight: 600;
  margin-bottom: 4px;
}
.profile-stat .stat-label{
  font-size: 12px;
  color: var(--color-muted);
}

.profile-actions{
  margin-top: 16px;
  display:grid;
  gap: 12px;
}
.profile-action{
  width: 100%;
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-card);
  border:1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  cursor:pointer;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
  font-weight: 600;
}
.profile-action:hover{
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}
.profile-action .ui-icon{ color: var(--color-muted); }
.profile-action.danger{
  color: var(--color-danger);
}
.profile-action.danger .ui-icon{ color: currentColor; }

.profile-footer{
  margin-top: 32px;
  text-align:center;
  font-size: 14px;
  color: var(--color-muted);
}
.profile-footer p{ margin:0; }
.profile-footer p + p{ margin-top: 4px; }

/* ============================================================
   Figma UI Migration – App Shell & Navigation (Top + Bottom)
   ============================================================ */

:root{
  --nav-height: 64px;
  --bottom-nav-height: 64px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
  --radius-auth: 14px;
}

body{
  background: var(--color-bg);
}

/* Top navigation (desktop/tablet) */
.vl-topnav{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 4000;
}
.vl-mobile-topbar{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 4200;
  padding: 0 var(--space-4);
}
.vl-mobile-brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
}
.vl-mobile-brand__badge{
  width:28px;
  height:28px;
  border-radius:10px;
  background: var(--color-primary);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
}
.vl-mobile-brand__badge .ui-icon{ width:18px; height:18px; }
.vl-map-back{
  position:absolute;
  left: var(--space-4);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: #fff;
  display:none;
  align-items:center;
  justify-content:center;
}
.vl-map-back svg{ width:20px; height:20px; }
.vl-topnav__inner{
  width: 100%;
  max-width: none;
  margin: 0;
  height: 100%;
  padding: 0 var(--space-6);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: var(--space-6);
  position: relative;
}
.vl-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration:none;
  color: var(--color-primary);
  font-weight: 600;
  flex: 0 0 auto;
}
.vl-brand__badge{
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  display:flex;
  align-items:center;
  justify-content:center;
  color: #fff;
}
.vl-topnav .ui-icon{
  width: 20px;
  height: 20px;
}
.vl-brand__badge .ui-icon{
  width: 20px;
  height: 20px;
}
.vl-navlinks{
  display:flex;
  align-items:center;
  gap: 32px;
  height: 100%;
  margin-left: auto;
  justify-content: flex-end;
}
.vl-navlink{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor:pointer;
  text-decoration:none;
  transition: background var(--dur), color var(--dur);
}
.vl-navlink:hover{
  color: var(--color-primary);
  background: var(--color-bg);
}
.vl-navlink.is-active{
  color: var(--color-primary);
  background: rgba(31,111,120,0.05);
}
.vl-navlink svg{ width: 20px; height: 20px; }

/* Topnav profile menu */
.vl-navprofile{ position: static; display:flex; align-items:center; height: 100%; }
.vl-navprofile__toggle{
  border: 1px solid transparent;
  background: transparent;
  padding: 0;
  display:flex;
  align-items:center;
  cursor: pointer;
  border-radius: 999px;
  transition: box-shadow var(--dur), border-color var(--dur), background var(--dur);
}
.vl-navprofile__toggle:hover{
  border-color: rgba(31,111,120,0.25);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.vl-navprofile__toggle.is-active{
  border-color: rgba(31,111,120,0.35);
  background: rgba(31,111,120,0.05);
}
.vl-navprofile__avatar{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--color-primary);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}
.vl-navprofile__avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}
.vl-navprofile__avatar .ui-icon{
  width: 18px;
  height: 18px;
}
.vl-navprofile__avatar--lg{
  width: 56px;
  height: 56px;
}
.vl-navprofile__avatar--lg .ui-icon{
  width: 26px;
  height: 26px;
}
.vl-navprofile__menu{
  position: absolute;
  right: 0;
  top: 100%;
  width: 280px;
  display: none;
  z-index: 4200;
}
.vl-navprofile__menu.is-open{ display:block; }
.vl-navprofile__card{
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 28px rgba(0,0,0,.18);
  display:grid;
  gap: 14px;
}
.vl-navprofile__header{
	display:flex;
	flex-direction: column;
	align-items:center;
	text-align: center;
	gap: 10px;
}
.vl-navprofile__hello{
	font-weight: 600;
	font-size: 15px;
	text-align: center;
}
.vl-navprofile__actions{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}
.vl-navprofile__actions > *{
  width: 100%;
}
.vl-navprofile__actions form{
  display:block;
}
.vl-navprofile__action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  height: 38px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration:none;
  width: 100%;
  transition: border-color var(--dur), background var(--dur), box-shadow var(--dur);
}
.vl-navprofile__action:hover{
  border-color: rgba(31,111,120,0.25);
  background: rgba(31,111,120,0.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.vl-navprofile__action .ui-icon{
  width: 16px;
  height: 16px;
}
.vl-navprofile__action--invite{
  border-color: rgba(31,111,120,0.35);
  background: rgba(31,111,120,0.09);
  color: var(--color-primary);
}
.vl-navprofile__action--invite:hover{
  border-color: rgba(31,111,120,0.45);
  background: rgba(31,111,120,0.16);
}
.vl-navprofile__action--danger{
  color: var(--color-danger);
  border-color: rgba(220,38,38,0.25);
  background: rgba(220,38,38,0.06);
}
.vl-navprofile__action--danger:hover{
  background: rgba(220,38,38,0.10);
  border-color: rgba(220,38,38,0.35);
}

/* Bottom navigation (mobile) */
.vl-bottomnav{
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: 4000;
  padding-bottom: env(safe-area-inset-bottom);
}
.vl-bottomnav__inner{
  height: calc(var(--bottom-nav-height) - env(safe-area-inset-bottom));
  display:flex;
  align-items:center;
  justify-content:space-around;
}
.vl-bottomnav__item{
  flex: 1;
  height: 100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 4px;
  text-decoration:none;
  color: var(--muted);
  transition: color var(--dur);
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.vl-bottomnav__item.is-active{ color: var(--color-primary); }
.vl-bottomnav__item svg{ width: 24px; height: 24px; }
.vl-bottomnav__label{ font-size: 12px; }
.vl-bottomnav__avatar{
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.vl-bottomnav__avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}
.vl-bottomnav__avatar svg{
  width: 16px;
  height: 16px;
}

.vl-sheet--profile{
  z-index: 4600;
}
.vl-sheet--profile .vl-sheet__panel{
  padding: 18px 20px 20px;
  max-height: 45vh;
  text-align: center;
  width: 100%;
  left: 0;
  right: 0;
  transform: none;
  bottom: var(--bottom-nav-height);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.vl-profile-sheet{
  display: grid;
  gap: 16px;
}
.vl-profile-sheet__hello{
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}
.vl-profile-sheet__invite{
  width: 100%;
  min-height: 40px;
}
.vl-profile-sheet__actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.vl-profile-sheet__actions form{
  margin: 0;
}
.vl-profile-sheet__actions .btn{
  width: 100%;
  font-size: 13px;
  font-weight: 400;
}
@media (min-width: 768px){
  .vl-sheet--profile{ display:none !important; }
}

/* Responsive: hide/show navs */
@media (max-width: 767px){
  .vl-topnav{ display:none; }
  .vl-mobile-topbar{ display:flex; }
  .vl-mobile-topbar + .vl-page{ padding-top: 72px; }
}
@media (min-width: 768px){
  .vl-bottomnav{ display:none; }
}

/* App shell spacing */
.vl-app{
  min-height: 100vh;
}
.vl-app__content{
  padding-top: var(--space-6);
  padding-bottom: calc(var(--space-6) + var(--bottom-nav-height));
}
@media (min-width: 768px){
  .vl-app__content{
    padding-top: calc(var(--nav-height) + var(--space-6));
    padding-bottom: var(--space-8);
  }
}

/* ============================================================
   Auth screens (Login/Register)
   ============================================================ */

.vl-auth{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 32px 16px;
}
.vl-auth__card{
  width: 100%;
  max-width: 448px;
  background: var(--color-surface);
  border-radius: var(--radius-auth);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
@media (min-width: 768px){
  .vl-auth__card{ padding: 40px; }
}
.vl-auth__logo{
  display:flex;
  flex-direction:column;
  align-items:center;
  margin-bottom: 32px;
}
.vl-auth__logo-badge{
  width: 64px;
  height: 64px;
  border-radius: var(--radius-auth);
  background: var(--color-primary);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  margin-bottom: 16px;
}
.vl-auth__subtitle{
  color: var(--muted);
  margin-top: 8px;
  text-align:center;
}

.vl-field{ margin-bottom: 16px; }
.vl-two{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px){
  .vl-two{ grid-template-columns: 1fr; }
}
.vl-label{
  display:block;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--color-text);
}
.vl-inputwrap{ position:relative; }
.vl-inputicon{
  position:absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height: 0;
  color: var(--muted);
  pointer-events:none;
}
.vl-inputicon .ui-icon{
  display:block;
  vertical-align: middle;
}
.vl-input{
  width:100%;
  padding: 12px 16px;
  padding-left: 44px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  outline: none;
  background: #fff;
  transition: border-color var(--dur);
}
.vl-input--toggle{ padding-right: 52px; }
.vl-inputwrap--toggle .vl-inputicon{ pointer-events:none; }
.vl-input-toggle{
  position:absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  padding: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur);
}
.vl-input-toggle.is-visible{
  opacity: 1;
  pointer-events: auto;
}
.vl-toggle-icon{
  display:flex;
  align-items:center;
  justify-content:center;
}
.vl-toggle-icon--hide{ display:none; }
.vl-input-toggle[aria-pressed="true"] .vl-toggle-icon--show{ display:none; }
.vl-input-toggle[aria-pressed="true"] .vl-toggle-icon--hide{ display:flex; }
.vl-input-toggle svg{
  width: 20px;
  height: 20px;
  display:block;
}
.vl-input:focus{ border-color: var(--color-primary); }
.vl-actions{ margin-top: 24px; }
.vl-btn-primary{
  width:100%;
  background: var(--color-primary);
  color:#fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  cursor:pointer;
  transition: background var(--dur);
  font-weight: 600;
}
.vl-btn-primary:hover{ background: var(--color-dark); }

.vl-auth__footer{
  margin-top: 24px;
  text-align:center;
  color: var(--muted);
  font-size: 14px;
}
.vl-auth__footer a{ color: var(--color-primary); text-decoration:none; }
.vl-auth__footer a:hover{ text-decoration:underline; }

/* Alerts */
.vl-alert{
  border: 1px solid rgba(220,38,38,0.25);
  background: rgba(220,38,38,0.08);
  color: #b91c1c;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 14px;
}
.vl-alert--success{
  border-color: rgba(34, 197, 94, 0.35);
  background: #ecfdf3;
  color: #047857;
}
.vl-toast{
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 5200;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.vl-toast--success{
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: #ecfdf3;
  color: #047857;
}
@media (max-width: 640px){
  .vl-toast{
    left: 16px;
    right: 16px;
    top: 12px;
  }
}

/* Floating Action Button */
.vl-fab{
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  background: var(--color-accent);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index: 4500;
  box-shadow: 0 4px 12px rgba(242,180,65,0.3);
  transition: transform var(--dur);
}
.vl-fab:hover{ transform: scale(1.08); }
.vl-fab:active{ transform: scale(0.96); }
.vl-fab svg{ width: 24px; height: 24px; }
@media (min-width: 768px){
  .vl-fab{ right: 32px; bottom: 32px; }
}


/* Map: keep sidebar below fixed header */
.vl-map .sheet{ top: calc(var(--nav-height) + var(--space-4)); }
/* Map screen layout */
.vl-map{
  position: fixed;
  inset: 0;
  /* Keep map and sidebar clear of the fixed header and mobile bottomnav */
  padding-top: var(--nav-height);
  padding-bottom: calc(var(--bottom-nav-height));
}
@media (min-width: 768px){
  .vl-map{
    padding-bottom: 0;
  }
}
/* Leaflet map canvas must have explicit size */
.vl-map #map{
  width: 100%;
  height: 100%;
}



/* Leaflet catch marker (Figma: MapPin filled + Fish overlay) */
.vl-marker-wrap{ background: transparent; border: 0; }
.vl-marker{
  position: relative;
  width: 40px;
  height: 40px;
  transform: translateY(-6px);
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.22));
}
.vl-marker svg{ width: 40px; height: 40px; display:block; color: var(--brand); }
.vl-marker.is-selected svg{ color: var(--accent); }

/* Selected marker: add a crisp ring (Figma-like state) */
.vl-marker.is-selected::after{
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 2px solid rgba(242,180,65,.95);
  box-shadow: 0 0 0 3px rgba(31,111,120,.18);
  pointer-events: none;
}

/* Hover/focus: subtle scale without breaking icon sizing */
.vl-marker:hover{ transform: translateY(-6px) scale(1.03); }

/* Weather icons must never scale unpredictably */
.weather-mini svg,
.weather-grid svg{ width: 16px; height: 16px; display:inline-block; flex: 0 0 auto; }

/* Logboek filter/sort controls (Figma usability) */
.vl-logbook-controls{ margin-top: 24px; position: relative; margin-bottom: 24px; }
.vl-logbook-controls .vl-desktop-inline{
  display:none;
  align-items:center;
  gap: 16px;
  flex-wrap: wrap;
}
.vl-logbook-controls .vl-mobile-btn{
  display:flex;
}
.vl-mobile-filter-btn{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: #fff;
  color: var(--brand);
}
.vl-mobile-filter-btn .ui-icon{ width: 20px; height: 20px; }

.vl-inline-sort{ display:flex; align-items:center; gap: 10px; }
.vl-inline-sort label{ font-size: 14px; color: #6B7280; }
.vl-inline-sort select{
  height: 40px;
  padding: 0 12px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
}
.vl-inline-sort select:focus{ outline: none; border-color: var(--brand); }

.vl-chiprow{
  display:flex;
  align-items:center;
  gap: 8px;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  max-width: 100%;
}
.vl-chiprow::-webkit-scrollbar{ height: 6px; }
.vl-chip{
  border: 1px solid #E5E7EB;
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 14px;
  white-space: nowrap;
  cursor:pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.vl-chip.is-active{
  background: rgba(31,111,120,.08);
  border-color: rgba(31,111,120,.35);
  color: #0F3D3E;
}
.vl-inline-actions{ display:flex; align-items:center; gap: 10px; }
.vl-inline-filter-btn{
  height: 40px;
  padding: 0 14px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: #fff;
  color: var(--brand);
}

@media (min-width: 768px){
  .vl-logbook-controls .vl-desktop-inline{ display:flex; }
  .vl-logbook-controls .vl-mobile-btn{ display:none; }
  .vl-chiprow{ overflow: visible; }
}

.vl-date-dropdown{
  position:absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 320px;
  display:none;
  z-index: 90;
}
.vl-date-dropdown.open{ display:block; }
.vl-date-dropdown__inner{
  background: var(--color-surface);
  border:1px solid var(--color-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 16px 28px rgba(0,0,0,.18);
}
.vl-date-dropdown__actions{
  display:flex;
  justify-content:flex-end;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.vl-sheet{
  position: fixed;
  inset: 0;
  z-index: 80;
  display:none;
}
.vl-sheet.open{ display:block; }
.vl-sheet__scrim{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.30);
}
.vl-sheet__panel{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  background: var(--color-surface);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 24px;
  box-shadow: 0 -20px 40px rgba(0,0,0,.22);
  max-height: 80vh;
  overflow:auto;
}
.vl-sheet__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom:1px solid var(--color-border);
  margin-bottom: var(--space-3);
}
.vl-sheet__title{ font-size: 16px; font-weight: 700; }
.vl-filterform .grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.vl-filterform .field label{
  display:block;
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 6px;
}
.vl-filterform input,
.vl-filterform select{
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border:1px solid var(--color-border);
  padding: 0 12px;
  background: var(--color-surface);
}
.vl-filterform .range2{
  display:flex;
  align-items:center;
  gap: var(--space-2);
}
.vl-filterform .range2 span{ color: var(--color-muted); }
.vl-filterform .chiprow{ display:flex; gap: var(--space-2); overflow-x:auto; padding-bottom: 4px; }
.vl-filterform .daterange{ display:grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-top: var(--space-2); }
.vl-sheet__footer{
  position: sticky;
  bottom: 0;
  background: var(--color-surface);
  padding-top: var(--space-3);
  border-top:1px solid var(--color-border);
  margin-top: var(--space-3);
  display:flex;
  justify-content:space-between;
  gap: var(--space-2);
}

/* Desktop: sheet becomes popover, chips inline */
@media (min-width: 900px){
  .vl-chips{ overflow: visible; padding-bottom: 0; }
  .vl-sheet{
    position: absolute;
    inset: auto;
    right: 0;
    top: calc(100% + 8px);
    width: 520px;
    display:none;
  }
  .vl-sheet__scrim{ display:none; }
  .vl-sheet__panel{
    position: relative;
    left:auto; right:auto; bottom:auto;
    border-radius: 18px;
    border:1px solid var(--color-border);
    max-height: 70vh;
  }
  .vl-filterform .grid{
    grid-template-columns: 1fr 1fr;
  }
}

.vl-bottomnav svg{ width: 24px; height: 24px; display:block; }

/* Logboek: prevent oversized icons inside rows */
.row-card svg.ui-icon{ width: var(--icon-20); height: var(--icon-20); }
.row-card .ui-icon--meta{ width: var(--icon-16); height: var(--icon-16); vertical-align:-3px; }
.row-card .muted svg,
.row-card .chips svg{ width: var(--icon-16); height: var(--icon-16); }
.row-card .actions svg{ width: var(--icon-20); height: var(--icon-20); }




/* ============================================================
   Capacitor app-only behavior
   - Safe area handling (status/navigation bars)
   - Dark mode following OS preference
   ============================================================ */

html.vl-native-app{
  --vl-safe-top: max(env(safe-area-inset-top), var(--vl-safe-top-runtime, 0px), 0px);
  --vl-safe-bottom: max(env(safe-area-inset-bottom), var(--vl-safe-bottom-runtime, 0px), 0px);
  --nav-height: calc(64px + var(--vl-safe-top));
  --bottom-nav-height: calc(64px + var(--vl-safe-bottom));
}

html.vl-native-app .vl-topnav{
  padding-top: var(--vl-safe-top);
}

html.vl-native-app .vl-topnav__inner{
  height: calc(var(--nav-height) - var(--vl-safe-top));
}

html.vl-native-app .vl-mobile-topbar{
  top: 0;
  height: calc(56px + var(--vl-safe-top));
  padding-top: var(--vl-safe-top);
}

html.vl-native-app .vl-mobile-topbar + .vl-page{
  padding-top: calc(72px + var(--vl-safe-top));
}

html.vl-native-app .vl-bottomnav{
  padding-bottom: 0;
}

html.vl-native-app .vl-bottomnav__inner{
  height: calc(var(--bottom-nav-height) - var(--vl-safe-bottom));
}

html.vl-native-app .vl-auth{
  padding-top: calc(32px + var(--vl-safe-top));
  padding-bottom: calc(32px + var(--vl-safe-bottom));
}

html.vl-native-app.vl-native-dark{
  color-scheme: dark;
  --color-bg: #0b1220;
  --color-surface: #111b2d;
  --color-border: #2a3a52;
  --color-text: #e5e7eb;
  --color-muted: #94a3b8;
  --primary-soft: rgba(31,111,120,0.20);
  --scrim: rgba(2, 6, 23, 0.68);
}

html.vl-native-app.vl-native-dark body{
  background: var(--color-bg);
  color: var(--color-text);
}

html.vl-native-app.vl-native-dark .vl-topnav,
html.vl-native-app.vl-native-dark .vl-mobile-topbar,
html.vl-native-app.vl-native-dark .vl-bottomnav,
html.vl-native-app.vl-native-dark .vl-navprofile__card,
html.vl-native-app.vl-native-dark .vl-sheet__panel,
html.vl-native-app.vl-native-dark .vl-auth__card{
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
}

html.vl-native-app.vl-native-dark .btn,
html.vl-native-app.vl-native-dark .vl-navprofile__action,
html.vl-native-app.vl-native-dark .vl-input,
html.vl-native-app.vl-native-dark .vl-select,
html.vl-native-app.vl-native-dark .vl-textarea{
  background: #0f172a;
  border-color: var(--color-border);
  color: var(--color-text);
}

html.vl-native-app.vl-native-dark .vl-navprofile__action--invite{
  border-color: rgba(45, 212, 191, 0.38);
  background: rgba(31, 111, 120, 0.28);
  color: #bff6ea;
}

html.vl-native-app.vl-native-dark .vl-navprofile__action--invite:hover{
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(31, 111, 120, 0.38);
}

html.vl-native-app.vl-native-dark .vl-navprofile__action--danger{
  border-color: rgba(248, 113, 113, 0.44);
  background: rgba(220, 38, 38, 0.22);
  color: #fecaca;
}

html.vl-native-app.vl-native-dark .vl-navprofile__action--danger:hover{
  border-color: rgba(248, 113, 113, 0.62);
  background: rgba(220, 38, 38, 0.32);
}

html.vl-native-app.vl-native-dark .vl-auth__subtitle,
html.vl-native-app.vl-native-dark .vl-auth__footer,
html.vl-native-app.vl-native-dark .vl-bottomnav__label{
  color: var(--color-muted);
}

