/* HowManyDays web — iOS-achtige stijl (licht + donker) */

.hmd-web-wrap {
  position: relative;
  max-width: 32rem;
  margin: 1rem auto 3rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hmd-web-root {
  /* Typografie: 1 = standaard; verhoog voor grotere tekst (bijv. 1.08 … 1.2) */
  --hmd-type-scale: 1.15;
  --hmd-bg0: #ffffff;
  --hmd-bg1: #f2f2f7;
  --hmd-card: #f2f2f7;
  --hmd-card-elev: #ffffff;
  --hmd-border: rgba(60, 60, 67, 0.18);
  --hmd-text: #1c1c1e;
  --hmd-text2: rgba(60, 60, 67, 0.85);
  --hmd-text3: rgba(60, 60, 67, 0.55);
  --hmd-blue: #007aff;
  --hmd-blue-press: #0056b3;
  --hmd-green: #34c759;
  --hmd-orange: #ff9500;
  --hmd-red: #ff3b30;
  --hmd-radius-lg: 16px;
  --hmd-radius-md: 12px;
  --hmd-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  color: var(--hmd-text);
}

@media (prefers-color-scheme: dark) {
  .hmd-web-root {
    --hmd-bg0: #000000;
    --hmd-bg1: #1c1c1e;
    --hmd-card: #2c2c2e;
    --hmd-card-elev: #2c2c2e;
    --hmd-border: rgba(235, 235, 245, 0.18);
    --hmd-text: #f2f2f7;
    --hmd-text2: rgba(235, 235, 245, 0.85);
    --hmd-text3: rgba(235, 235, 245, 0.45);
    --hmd-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  }
}

.hmd-app {
  position: relative;
  min-height: 12rem;
  padding-bottom: 5rem;
  border-radius: var(--hmd-radius-lg);
  background: linear-gradient(180deg, var(--hmd-bg0) 0%, var(--hmd-bg1) 100%);
}

.hmd-app--login {
  padding-bottom: 1rem;
}

.hmd-app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.25rem 0.125rem 0;
}

.hmd-app-title {
  margin: 0;
  font-size: calc(1.375rem * var(--hmd-type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hmd-text);
}

.hmd-search-wrap {
  margin-bottom: 0.85rem;
}

.hmd-search {
  margin-top: 0;
  background: var(--hmd-card);
  border: none;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: calc(1rem * var(--hmd-type-scale));
  width: 100%;
  box-sizing: border-box;
  color: var(--hmd-text);
}

.hmd-search::placeholder {
  color: var(--hmd-text3);
}

.hmd-search:focus {
  outline: 2px solid var(--hmd-blue);
  outline-offset: 1px;
}

.hmd-segment {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  padding: 3px;
  background: var(--hmd-card);
  border-radius: 10px;
}

.hmd-seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.45rem 0.35rem;
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text2);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.hmd-seg-btn.is-active {
  background: var(--hmd-card-elev);
  color: var(--hmd-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  .hmd-seg-btn.is-active {
    background: #3a3a3c;
  }
}

.hmd-seg-btn:hover:not(.is-active) {
  color: var(--hmd-text);
}

.hmd-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Dashboard: detail links, lijst rechts (desktop); op smal scherm lijst boven detail */
.hmd-dashboard-toolbar {
  margin-bottom: 1rem;
}

.hmd-dashboard-toolbar .hmd-search-wrap {
  margin-bottom: 0.85rem;
}

.hmd-split {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

.hmd-split-main {
  min-width: 0;
  flex: 1 1 auto;
}

.hmd-split-rail {
  flex: 0 0 auto;
  min-width: 0;
}

@media (min-width: 900px) {
  .hmd-split {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .hmd-split-main {
    flex: 1 1 55%;
    order: 1;
  }

  .hmd-split-rail {
    flex: 0 1 min(42%, 22rem);
    max-width: 22rem;
    order: 2;
  }

  .hmd-rail-chrome {
    position: sticky;
    top: 0.5rem;
  }
}

@media (max-width: 899px) {
  .hmd-split-rail {
    order: -1;
  }

  .hmd-rail-scroll {
    max-height: min(42vh, 22rem);
  }

  /* Dashboard: geen binnen-scroll; alleen de pagina scrollt (header/footer thema mee). */
  .hmd-web-wrap--dashboard .hmd-rail-scroll {
    max-height: none;
  }
}

/* [howmanydays]: volle breedte; één pagina-scroll (geen viewport-lock in het blok) */
.hmd-web-wrap--dashboard {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  box-sizing: border-box;
}

.hmd-web-wrap--dashboard .hmd-app--split {
  display: flex;
  flex-direction: column;
  padding-bottom: 4.25rem;
  box-sizing: border-box;
}

.hmd-web-wrap--dashboard .hmd-app--split > .hmd-app-header,
.hmd-web-wrap--dashboard .hmd-app--split > .hmd-dashboard-toolbar {
  flex-shrink: 0;
}

.hmd-web-wrap--dashboard .hmd-app--split .hmd-dashboard-toolbar {
  margin-bottom: 0.75rem;
}

.hmd-web-wrap--dashboard .hmd-app--split .hmd-app-header {
  margin-bottom: 0.65rem;
}

/* [howmanydays_events]: geen paginatitel / uitlog / jaartal-strip — strakkere bovenkant */
.hmd-web-wrap--dashboard .hmd-app--wpb-list-minimal > .hmd-dashboard-toolbar {
  margin-top: 0;
}

.hmd-web-wrap--dashboard .hmd-app--split .hmd-split {
  flex: 0 1 auto;
  min-height: 0;
  overflow: visible;
}

.hmd-web-wrap--dashboard .hmd-split-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
}

.hmd-web-wrap--dashboard .hmd-split-main > .hmd-detail-pane {
  flex: 0 1 auto;
  min-height: 0;
}

.hmd-web-wrap--dashboard .hmd-split-main > .hmd-panel,
.hmd-web-wrap--dashboard .hmd-split-main > .hmd-detail-placeholder {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: visible;
}

@media (min-width: 900px) {
  .hmd-web-wrap--dashboard .hmd-split {
    align-items: stretch;
  }

  .hmd-web-wrap--dashboard .hmd-split-main {
    flex: 1 1 58%;
  }

  .hmd-web-wrap--dashboard .hmd-split-rail {
    flex: 0 1 38%;
    max-width: min(28rem, 46%);
    min-width: 14rem;
  }

  .hmd-web-wrap--dashboard .hmd-rail-chrome {
    position: static;
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 899px) {
  .hmd-web-wrap--dashboard .hmd-split-rail {
    flex: 0 1 auto;
    max-height: none;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .hmd-web-wrap--dashboard .hmd-rail-chrome {
    flex: 0 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
    position: static;
  }

  .hmd-web-wrap--dashboard .hmd-split-main {
    flex: 1 1 auto;
  }
}

/* WPBakery: [howmanydays_events] + [howmanydays_detail] / [howmanydays_click] in aparte kolommen */
.hmd-wpb-split-wrap.hmd-web-wrap {
  max-width: none;
  width: 100%;
}

.hmd-app--wpb-list-shell {
  padding: 1rem 0.5rem;
  min-height: 8rem;
}

/* Geen 5rem onderpadding van .hmd-app (FAB). Inhoud bovenaan (geen verticale centrering in een hoge kolom). */
.hmd-app--split-detail {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 12rem;
  padding: 1.25rem 0.65rem 1.35rem;
  box-sizing: border-box;
}

.hmd-web-wrap--dashboard .hmd-app--split-detail > .hmd-detail-pane,
.hmd-web-wrap--dashboard .hmd-app--split-detail > .hmd-panel,
.hmd-web-wrap--dashboard .hmd-app--split-detail > .hmd-detail-placeholder {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: visible;
}

/* WPBakery: gelijke kolomhoogte; kaart bovenaan, niet het hele blok in het midden van de rij */
.vc_row:has([data-hmd-split-list]):has([data-hmd-split-detail]) {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.vc_row .wpb_column:has([data-hmd-split-list]),
.vc_row .wpb_column:has([data-hmd-split-detail]) {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.vc_row .wpb_column:has([data-hmd-split-list]) .vc_column-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 100%;
}

.vc_row .wpb_column:has([data-hmd-split-list]) .wpb_wrapper {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.vc_row .wpb_column:has([data-hmd-split-detail]) .vc_column-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 100%;
}

/* WPB: wrapper rond shortcode mag inhoud niet verticaal centreren bij gelijke kolomhoogte */
.vc_row .wpb_column:has([data-hmd-split-detail]) .wpb_wrapper {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
}

/* WPB split: beide kolommen vullen de rij; lijstkolom scrollt in de rail */
.hmd-wpb-split-wrap.hmd-web-wrap--dashboard:has([data-hmd-split-detail]) {
  width: 100%;
  align-self: stretch;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hmd-wpb-split-wrap.hmd-web-wrap--dashboard:has([data-hmd-split-detail]) .hmd-web-root {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hmd-wpb-split-wrap.hmd-web-wrap--dashboard:has([data-hmd-split-detail]) .hmd-app--split-detail {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.hmd-wpb-split-wrap.hmd-web-wrap--dashboard:has([data-hmd-split-list]) {
  width: 100%;
  align-self: stretch;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hmd-wpb-split-wrap.hmd-web-wrap--dashboard:has([data-hmd-split-list]) .hmd-web-root {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hmd-wpb-split-wrap.hmd-web-wrap--dashboard:has([data-hmd-split-list]) .hmd-app--split {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hmd-wpb-split-wrap.hmd-web-wrap--dashboard:has([data-hmd-split-list]) .hmd-app--split > .hmd-year-strip {
  flex-shrink: 0;
}

/*
 * WPBakery lijstkolom: volle breedte; rail vult resthoogte; scroll in .hmd-rail-scroll.
 */
.hmd-wpb-split-wrap.hmd-web-wrap--dashboard .hmd-app--split > .hmd-split-rail {
  width: 100%;
  max-width: none !important;
  min-width: 0;
}

.hmd-wpb-split-wrap.hmd-web-wrap--dashboard:has([data-hmd-split-list]) .hmd-app--split > .hmd-split-rail {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hmd-wpb-split-wrap.hmd-web-wrap--dashboard .hmd-app--split .hmd-rail-chrome {
  position: static;
  display: flex;
  flex-direction: column;
}

.hmd-wpb-split-wrap.hmd-web-wrap--dashboard:has([data-hmd-split-list]) .hmd-app--split .hmd-rail-chrome {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.hmd-wpb-split-wrap.hmd-web-wrap--dashboard:has([data-hmd-split-list]) .hmd-app--split .hmd-rail-scroll {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  -webkit-overflow-scrolling: touch;
}

.hmd-rail-heading {
  margin: 0 0 0.5rem;
  font-size: calc(0.6875rem * var(--hmd-type-scale));
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hmd-text3);
}

.hmd-rail-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.45rem;
  border-radius: var(--hmd-radius-md);
  background: var(--hmd-card);
  border: 1px solid var(--hmd-border);
  box-sizing: border-box;
}

/* Dashboard: geen tweede scrolllaag in de rail; pagina scrollt door */
.hmd-web-wrap--dashboard .hmd-rail-scroll {
  overflow-y: visible;
  max-height: none;
}

.hmd-rail-section {
  margin-bottom: 0.85rem;
}

.hmd-rail-section:last-child {
  margin-bottom: 0;
}

.hmd-rail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  padding: 0 0.15rem;
}

.hmd-rail-section-title {
  margin: 0;
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  font-weight: 700;
  color: var(--hmd-text);
}

.hmd-rail-section-count {
  font-size: calc(0.6875rem * var(--hmd-type-scale));
  font-weight: 700;
  color: var(--hmd-text2);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  background: var(--hmd-card-elev);
}

.hmd-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hmd-rail-item {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hmd-rail-card {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.45rem;
  margin: 0;
  border: none;
  border-radius: 10px;
  background: var(--hmd-card-elev);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  font: inherit;
  /* Geen color:inherit: themes zetten vaak button:hover { color: #fff } → onleesbaar op lichte kaart */
  color: var(--hmd-text);
  box-sizing: border-box;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.hmd-rail-card:hover,
.hmd-rail-card:focus,
.hmd-rail-card:focus-visible {
  color: var(--hmd-text);
  background: var(--hmd-bg0);
}

.hmd-rail-card.is-selected {
  box-shadow: 0 0 0 2px var(--hmd-blue);
  background: var(--hmd-bg0);
  color: var(--hmd-text);
}

.hmd-rail-card--next.is-selected {
  box-shadow: 0 0 0 2px var(--hmd-blue), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.hmd-rail-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hmd-rail-card .hmd-status-dot {
  margin-top: 0.28rem;
  width: 9px;
  height: 9px;
}

.hmd-rail-card-title {
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  font-weight: 600;
  line-height: 1.25;
  display: block;
  color: var(--hmd-text);
}

.hmd-rail-card-meta {
  font-size: calc(0.6875rem * var(--hmd-type-scale));
  color: var(--hmd-text2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.hmd-rail-card:hover .hmd-rail-card-meta,
.hmd-rail-card:focus .hmd-rail-card-meta,
.hmd-rail-card.is-selected .hmd-rail-card-meta {
  color: var(--hmd-text2);
}

.hmd-rail-card-count {
  font-weight: 600;
}

.hmd-rail-train,
.hmd-rail-next {
  font-size: calc(0.5625rem * var(--hmd-type-scale));
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: var(--hmd-card);
  color: var(--hmd-text2);
}

.hmd-rail-next {
  color: var(--hmd-blue);
  background: rgba(0, 122, 255, 0.12);
}

.hmd-rail-empty {
  margin: 0.25rem 0;
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  color: var(--hmd-text2);
}

.hmd-detail-placeholder {
  padding: 2rem 1rem;
  text-align: center;
  border-radius: var(--hmd-radius-lg);
  border: 1px dashed var(--hmd-border);
  background: var(--hmd-card);
}

.hmd-detail-placeholder-p {
  margin: 0;
  font-size: calc(0.9375rem * var(--hmd-type-scale));
  line-height: 1.45;
  color: var(--hmd-text2);
}

/* Ingebed detailpaneel (geen modal) */
.hmd-detail-pane {
  display: flex;
  flex-direction: column;
  border-radius: var(--hmd-radius-lg);
  background: var(--hmd-bg0);
  border: 1px solid var(--hmd-border);
  box-shadow: var(--hmd-shadow);
  min-height: 12rem;
  overflow: hidden;
}

.hmd-detail-toolbar--inline {
  padding: 0.5rem 0.65rem 0;
  justify-content: flex-end;
}

.hmd-detail-scroll--inline {
  padding: 0.9rem 1rem 1rem;
}

.hmd-detail-actions--inline {
  border-top: 1px solid var(--hmd-border);
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0));
}

.hmd-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding: 0 4px;
}

.hmd-section-title {
  margin: 0;
  font-size: calc(1.25rem * var(--hmd-type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hmd-text);
}

.hmd-section-count {
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text2);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--hmd-card);
}

.hmd-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hmd-card-wrap {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hmd-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  padding: 1rem 1rem 1rem 0.95rem;
  margin: 0;
  border: none;
  border-radius: var(--hmd-radius-lg);
  background: var(--hmd-card);
  box-shadow: var(--hmd-shadow);
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-sizing: border-box;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.hmd-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.hmd-card:active {
  transform: scale(0.992);
}

.hmd-card--next {
  box-shadow: 0 0 0 2px var(--hmd-blue), var(--hmd-shadow);
}

.hmd-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.hmd-status-dot--lg {
  width: 14px;
  height: 14px;
  margin-top: 0.45rem;
}

.hmd-status--upcoming {
  background: var(--hmd-green);
}

.hmd-status--today {
  background: var(--hmd-orange);
}

.hmd-status--past {
  background: var(--hmd-red);
}

.hmd-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hmd-card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.hmd-card-title {
  font-size: calc(1.0625rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text);
  line-height: 1.25;
}

.hmd-badge-next {
  font-size: calc(0.6875rem * var(--hmd-type-scale));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--hmd-blue);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.hmd-badge-train {
  font-size: calc(0.6875rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text2);
  background: rgba(0, 122, 255, 0.12);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}

.hmd-card-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.hmd-card-countdown {
  font-size: calc(0.9375rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text2);
}

.hmd-card-km {
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  color: var(--hmd-text3);
}

.hmd-card-addr {
  display: block;
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  color: var(--hmd-text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hmd-chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--hmd-text3);
  border-bottom: 2px solid var(--hmd-text3);
  transform: rotate(-45deg);
  flex-shrink: 0;
  margin-top: 0.55rem;
  opacity: 0.7;
}

.hmd-fab {
  position: absolute;
  right: 0.25rem;
  bottom: 0.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #0a84ff, var(--hmd-blue));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  z-index: 5;
}

.hmd-fab:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.45);
}

.hmd-fab-icon {
  font-size: calc(1.75rem * var(--hmd-type-scale));
  font-weight: 300;
  line-height: 1;
  margin-top: -2px;
}

.hmd-empty,
.hmd-empty--pad {
  color: var(--hmd-text3);
  text-align: center;
  padding: 2rem 1rem;
  margin: 0;
}

/* Panel / formulier */
.hmd-panel {
  background: var(--hmd-card);
  border-radius: var(--hmd-radius-lg);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--hmd-shadow);
}

.hmd-panel--login {
  border: 1px solid var(--hmd-border);
}

.hmd-panel--login .hmd-auth-tabs {
  margin-bottom: 1rem;
}

.hmd-title {
  margin: 0 0 0.5rem;
  font-size: calc(1.35rem * var(--hmd-type-scale));
}

.hmd-subtitle {
  margin: 0 0 1rem;
  font-size: calc(1.1rem * var(--hmd-type-scale));
}

.hmd-hint {
  margin: 0 0 1rem;
  color: var(--hmd-text3);
  font-size: calc(0.9rem * var(--hmd-type-scale));
}

.hmd-label {
  display: block;
  margin-bottom: 0.85rem;
  font-size: calc(0.875rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text2);
}

.hmd-input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--hmd-border);
  border-radius: 10px;
  font-size: calc(1rem * var(--hmd-type-scale));
  box-sizing: border-box;
  background: var(--hmd-bg0);
  color: var(--hmd-text);
}

.hmd-textarea {
  resize: vertical;
  min-height: 4rem;
}

.hmd-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
  font-size: calc(0.9rem * var(--hmd-type-scale));
  cursor: pointer;
  color: var(--hmd-text2);
}

.hmd-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hmd-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--hmd-border);
  border-radius: 10px;
  background: var(--hmd-card-elev);
  color: var(--hmd-text);
  font-size: calc(0.9rem * var(--hmd-type-scale));
  font-weight: 500;
  cursor: pointer;
}

.hmd-button:hover {
  opacity: 0.92;
}

.hmd-button-primary {
  background: var(--hmd-blue);
  border-color: transparent;
  color: #fff;
}

.hmd-button-primary:hover {
  background: var(--hmd-blue-press);
}

.hmd-button-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--hmd-blue);
  font-weight: 600;
  padding: 0.35rem 0.5rem;
}

.hmd-button-danger {
  border-color: rgba(255, 59, 48, 0.35);
  color: var(--hmd-red);
}

.hmd-button-block {
  width: 100%;
  text-align: center;
  margin-top: 0.25rem;
}

.hmd-form {
  margin-bottom: 1.5rem;
}

.hmd-error {
  color: var(--hmd-red);
  font-size: calc(0.875rem * var(--hmd-type-scale));
  margin-top: 0.75rem;
}

.hmd-warning {
  color: var(--hmd-orange);
  font-size: calc(0.875rem * var(--hmd-type-scale));
  margin: 0 0 0.75rem;
}

.hmd-web-notice {
  padding: 0.75rem 1rem;
  background: rgba(255, 149, 0, 0.15);
  border-radius: var(--hmd-radius-md);
  color: var(--hmd-text);
}

/* [howmanydays_field] — inline in tekst */
.hmd-field-shell,
.hmd-field-wrap {
  display: inline;
  max-width: 100%;
}

.hmd-field {
  display: inline;
}

.hmd-field a {
  text-decoration: underline;
  color: var(--hmd-blue);
}

/* Stat-blokken: icoon + label + grote waarde ([howmanydays_detail_field tile="1"], detail_tiles, year_stat) */
.hmd-field-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hmd-stat-brick.hmd-field-tile,
.hmd-year-stat-brick {
  border-radius: var(--hmd-radius-md);
  border: 1px solid var(--hmd-border);
  background: var(--hmd-card-elev);
  box-shadow: var(--hmd-shadow);
  padding: 0.85rem 1rem 1rem;
  box-sizing: border-box;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hmd-stat-brick-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 0 0.4rem;
  color: var(--hmd-orange);
  flex-shrink: 0;
}

.hmd-stat-brick-icon-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hmd-stat-brick-label {
  display: block;
  font-size: calc(0.6875rem * var(--hmd-type-scale));
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hmd-text3);
  margin: 0 0 0.2rem;
  line-height: 1.2;
}

.hmd-stat-brick-sublabel {
  display: block;
  font-size: calc(0.75rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text2);
  margin: 0 0 0.45rem;
  line-height: 1.2;
}

.hmd-stat-brick .hmd-field-wrap,
.hmd-year-stat-brick .hmd-year-stat-value {
  display: block;
  width: 100%;
  min-width: 0;
}

.hmd-stat-brick .hmd-field,
.hmd-year-stat-brick .hmd-field {
  display: block;
  font-size: calc(1rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text);
  line-height: 1.35;
  word-break: break-word;
}

.hmd-stat-brick .hmd-field--stat-value,
.hmd-year-stat-brick .hmd-field--stat-value {
  font-size: calc(1.65rem * var(--hmd-type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hmd-stat-brick .hmd-field a {
  font-size: inherit;
  font-weight: 600;
}

/* [howmanydays_count] — inline */
.hmd-count-shell,
.hmd-count-wrap {
  display: inline;
}

.hmd-count {
  display: inline;
  font-weight: 600;
}

.hmd-count-login {
  color: var(--hmd-blue);
  text-decoration: underline;
}

/* [howmanydays_profile] — profielkaart met foto (zelfde bron als menu-auth) */
.hmd-profile-shell {
  max-width: 28rem;
  margin: 0 auto 1.5rem;
}

.hmd-profile-card {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.1rem 1.25rem;
  padding: 1.15rem 1.2rem 1.2rem;
  border-radius: var(--hmd-radius-lg);
  border: 1px solid var(--hmd-border);
  background: var(--hmd-card-elev);
  box-shadow: var(--hmd-shadow);
  box-sizing: border-box;
}

.hmd-profile-card--guest {
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.hmd-profile-hint {
  margin: 0 0 0.85rem;
  font-size: calc(0.9375rem * var(--hmd-type-scale));
  color: var(--hmd-text2);
  line-height: 1.45;
}

.hmd-profile-avatar {
  flex-shrink: 0;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--hmd-card);
  border: 2px solid var(--hmd-border);
  box-sizing: border-box;
}

.hmd-profile-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hmd-profile-avatar-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: calc(1.375rem * var(--hmd-type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hmd-text2);
  background: var(--hmd-card);
}

.hmd-profile-main {
  flex: 1 1 12rem;
  min-width: 0;
}

.hmd-profile-name {
  margin: 0 0 0.35rem;
  font-size: calc(1.2rem * var(--hmd-type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hmd-text);
  line-height: 1.25;
}

.hmd-profile-email {
  margin: 0 0 0.75rem;
  font-size: calc(0.875rem * var(--hmd-type-scale));
  color: var(--hmd-text2);
  word-break: break-word;
}

.hmd-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.5rem;
  align-items: center;
}

.hmd-profile-link.hmd-button {
  font-size: calc(0.875rem * var(--hmd-type-scale));
}

.hmd-profile-logout.hmd-button {
  font-size: calc(0.875rem * var(--hmd-type-scale));
}

@media (max-width: 480px) {
  .hmd-profile-card:not(.hmd-profile-card--guest) {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hmd-profile-card:not(.hmd-profile-card--guest) .hmd-profile-actions {
    justify-content: center;
  }
}

/* Detail sheet */
.hmd-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: hmd-fade-in 0.2s ease;
}

@keyframes hmd-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hmd-detail-sheet {
  width: 100%;
  max-width: 32rem;
  max-height: min(92vh, 44rem);
  background: var(--hmd-bg0);
  border-radius: var(--hmd-radius-lg) var(--hmd-radius-lg) 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  animation: hmd-slide-up 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 520px) {
  .hmd-detail-backdrop {
    align-items: center;
    padding: 1rem;
  }

  .hmd-detail-sheet {
    border-radius: var(--hmd-radius-lg);
    max-height: min(88vh, 40rem);
  }
}

@keyframes hmd-slide-up {
  from {
    transform: translateY(18px);
    opacity: 0.85;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.hmd-detail-toolbar {
  flex-shrink: 0;
  padding: 0.65rem 0.75rem 0;
  display: flex;
  justify-content: flex-end;
}

.hmd-detail-close {
  border: none;
  background: transparent;
  color: var(--hmd-blue);
  font-weight: 600;
  font-size: calc(1rem * var(--hmd-type-scale));
  cursor: pointer;
  padding: 0.35rem 0.65rem;
}

.hmd-detail-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.15rem 1rem;
  -webkit-overflow-scrolling: touch;
}

.hmd-detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.hmd-detail-hero-symbol {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  background: var(--hmd-card);
  border: 1px solid var(--hmd-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hmd-blue);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.hmd-detail-hero-symbol .hmd-svg-icon {
  width: 1.65rem;
  height: 1.65rem;
}

.hmd-detail-hero-main {
  display: flex;
  flex-direction: row;
  gap: 0.65rem;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.hmd-detail-hero-text {
  flex: 1;
  min-width: 0;
}

.hmd-svg-icon {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
}

/* Statistieken-kaart (iOS-achtig) */
.hmd-stats-card {
  background: var(--hmd-card);
  border-radius: var(--hmd-radius-lg);
  padding: 1rem 1rem 1.05rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--hmd-border);
  box-shadow: var(--hmd-shadow);
}

.hmd-stats-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.hmd-stats-card-ic {
  display: flex;
  color: var(--hmd-blue);
}

.hmd-stats-card-ic .hmd-svg-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.hmd-stats-card-title {
  margin: 0;
  font-size: calc(1.05rem * var(--hmd-type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hmd-text);
}

.hmd-stat-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hmd-stat-tile {
  flex: 1 1 calc(50% - 0.35rem);
  min-width: 7.5rem;
  padding: 0.65rem 0.7rem;
  border-radius: var(--hmd-radius-md);
  background: var(--hmd-bg0);
  border: 1px solid var(--hmd-border);
  box-sizing: border-box;
}

.hmd-stat-tile-ic {
  display: block;
  margin-bottom: 0.35rem;
}

.hmd-stat-tile-ic .hmd-svg-icon {
  width: 1.2rem;
  height: 1.2rem;
}

.hmd-stat-tile--blue .hmd-stat-tile-ic {
  color: #007aff;
}

.hmd-stat-tile--orange .hmd-stat-tile-ic {
  color: #ff9500;
}

.hmd-stat-tile--green .hmd-stat-tile-ic {
  color: #34c759;
}

.hmd-stat-tile--red .hmd-stat-tile-ic {
  color: #ff3b30;
}

.hmd-stat-tile-lb {
  display: block;
  font-size: calc(0.7rem * var(--hmd-type-scale));
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hmd-text3);
  margin-bottom: 0.2rem;
}

.hmd-stat-tile-val {
  font-size: calc(1rem * var(--hmd-type-scale));
  font-weight: 700;
  color: var(--hmd-text);
  letter-spacing: -0.02em;
}

/* Jaaroverzicht hardlopen (zoals app-kaart) */
.hmd-year-strip {
  background: var(--hmd-card);
  border-radius: var(--hmd-radius-lg);
  padding: 1rem 1.1rem 1.1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--hmd-border);
  box-shadow: var(--hmd-shadow);
}

.hmd-year-strip-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.hmd-year-strip-title {
  margin: 0 0 0.2rem;
  font-size: calc(1.05rem * var(--hmd-type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hmd-text);
}

.hmd-year-strip-sub {
  margin: 0;
  font-size: calc(0.875rem * var(--hmd-type-scale));
  color: var(--hmd-text3);
}

.hmd-year-strip-chart {
  color: var(--hmd-blue);
  flex-shrink: 0;
}

.hmd-year-strip-chart .hmd-svg-icon {
  width: 1.75rem;
  height: 1.75rem;
}

.hmd-year-strip-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: stretch;
}

.hmd-year-stat {
  flex: 1 1 8rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0;
}

.hmd-year-stat-ic .hmd-svg-icon {
  width: 1.2rem;
  height: 1.2rem;
}

.hmd-year-stat--dist .hmd-year-stat-ic {
  color: #34c759;
}

.hmd-year-stat--time .hmd-year-stat-ic {
  color: #ff9500;
}

.hmd-year-stat-lb {
  font-size: calc(0.8rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text2);
}

.hmd-year-stat-val {
  font-size: calc(1.1rem * var(--hmd-type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hmd-text);
}

.hmd-detail-title {
  margin: 0 0 0.35rem;
  font-size: calc(1.35rem * var(--hmd-type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hmd-detail-countdown {
  margin: 0;
  font-size: calc(1.0625rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text2);
}

.hmd-detail-timer {
  margin: 0.35rem 0 0;
  font-size: calc(0.9375rem * var(--hmd-type-scale));
  color: var(--hmd-text3);
}

.hmd-detail-card {
  background: var(--hmd-card);
  border-radius: var(--hmd-radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}

.hmd-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  font-size: calc(0.9375rem * var(--hmd-type-scale));
  border-bottom: 1px solid var(--hmd-border);
}

.hmd-detail-row:last-child {
  border-bottom: none;
}

.hmd-detail-k {
  color: var(--hmd-text3);
  flex-shrink: 0;
}

.hmd-detail-v {
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

.hmd-detail-addr {
  margin: 0 0 0.5rem;
  font-size: calc(0.9375rem * var(--hmd-type-scale));
  line-height: 1.4;
}

/* Route (polyline uit app / Strava / HealthKit) */
.hmd-route-card {
  padding: 0;
  overflow: hidden;
}

.hmd-route-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem 0.4rem;
}

.hmd-route-head-title {
  margin: 0;
  font-size: calc(1rem * var(--hmd-type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hmd-text);
}

.hmd-route-addr {
  margin: 0 1rem 0.5rem;
  font-size: calc(0.9375rem * var(--hmd-type-scale));
  line-height: 1.4;
}

.hmd-route-addr .hmd-link {
  word-break: break-word;
}

/* Leaflet + OSM-tegels; fallback = SVG-lijn (.hmd-route-map--svg-fallback) */
.hmd-route-map--leaflet {
  position: relative;
  height: min(240px, 45vw);
  min-height: 180px;
  background: var(--hmd-bg1);
  border-top: 1px solid var(--hmd-border);
  border-bottom: 1px solid var(--hmd-border);
}

.hmd-route-map--leaflet .leaflet-container {
  height: 100%;
  width: 100%;
  font-family: inherit;
  z-index: 0;
}

.hmd-route-map--leaflet .leaflet-control-attribution {
  font-size: calc(0.65rem * var(--hmd-type-scale));
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px 0 0 0;
}

@media (prefers-color-scheme: dark) {
  .hmd-route-map--leaflet .leaflet-control-attribution {
    background: rgba(28, 28, 30, 0.92);
    color: var(--hmd-text2);
  }
}

.hmd-route-map--svg-fallback {
  color: var(--hmd-red);
}

.hmd-route-map--svg-fallback .hmd-route-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hmd-route-poly {
  opacity: 0.95;
}

.hmd-route-actions {
  margin: 0;
  padding: 0.65rem 1rem 0.9rem;
  font-size: calc(0.9375rem * var(--hmd-type-scale));
}

.hmd-detail-notes p {
  margin: 0;
  font-size: calc(0.9375rem * var(--hmd-type-scale));
  line-height: 1.48;
  color: var(--hmd-text2);
}

.hmd-link {
  color: var(--hmd-blue);
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.hmd-link:hover {
  text-decoration: underline;
}

.hmd-detail-actions {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem calc(0.85rem + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--hmd-border);
  background: var(--hmd-bg0);
}

.hmd-detail-actions .hmd-button {
  flex: 1;
  min-width: 7rem;
  text-align: center;
}

/* ——— Top auth-balk: in documentflow boven header (geen fixed — voorkomt overlap met menubalk) ——— */
.hmd-top-auth-bar {
  position: relative;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  background: var(--hmd-card);
  border-bottom: 1px solid var(--hmd-border);
  padding: 0.45rem 0.75rem;
  z-index: 5;
}

.hmd-top-auth-bar .hmd-nav-auth-shell {
  max-width: 72rem;
  margin: 0 auto;
}

.hmd-top-auth-bar .hmd-web-wrap {
  margin: 0;
  max-width: none;
}

/* ——— Compacte auth (menu / widget) ——— */
.hmd-nav-auth-shell {
  margin: 0;
}

.hmd-nav-auth-shell .hmd-web-wrap {
  margin: 0;
  max-width: none;
}

.hmd-nav-auth-root {
  width: 100%;
}

.hmd-nav-auth-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  justify-content: flex-end;
}

/* Dropdown: knop + paneel (menu & topbalk) */
.hmd-nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.hmd-nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem 0.65rem;
  min-height: 2.375rem;
  box-sizing: border-box;
  border: 1px solid var(--hmd-border);
  border-radius: 999px;
  background: var(--hmd-card-elev);
  color: var(--hmd-text);
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  font-family: inherit;
}

.hmd-nav-trigger:hover {
  opacity: 0.92;
}

.hmd-nav-trigger--avatar {
  padding: 0.2rem 0.45rem 0.2rem 0.2rem;
  border-radius: 999px;
  gap: 0.25rem;
}

.hmd-nav-chevron {
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  border-right: 2px solid var(--hmd-text3);
  border-bottom: 2px solid var(--hmd-text3);
  transform: rotate(45deg);
  margin-top: -0.15rem;
  opacity: 0.85;
  transition: transform 0.15s ease;
}

.hmd-nav-dropdown.is-open .hmd-nav-chevron {
  transform: rotate(-135deg);
  margin-top: 0.1rem;
}

.hmd-nav-avatar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--hmd-card);
}

.hmd-nav-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hmd-nav-avatar-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  font-weight: 800;
  color: var(--hmd-text2);
  background: linear-gradient(145deg, rgba(0, 122, 255, 0.2), rgba(0, 122, 255, 0.08));
}

.hmd-nav-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  left: auto;
  min-width: 16.5rem;
  max-width: calc(100vw - 1.5rem);
  padding: 0;
  margin: 0;
  border-radius: var(--hmd-radius-md);
  background: var(--hmd-bg0);
  border: 1px solid var(--hmd-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000001;
}

.hmd-nav-panel-inner {
  padding: 0.65rem 0.75rem;
}

.hmd-nav-panel-inner--login {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem 0.95rem;
}

.hmd-nav-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  font-size: calc(0.75rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text2);
}

.hmd-nav-field-label {
  display: block;
}

.hmd-nav-input--dd {
  width: 100%;
  max-width: none;
  flex: none;
  margin: 0;
}

.hmd-top-auth-bar .hmd-nav-panel {
  right: 0;
}

.hmd-nav-login-submit {
  width: 100%;
  margin-top: 0.15rem;
}

.hmd-nav-error--dd {
  margin: 0;
  font-size: calc(0.8rem * var(--hmd-type-scale));
}

.hmd-nav-dd-head {
  padding: 0.25rem 0.15rem 0.5rem;
  border-bottom: 1px solid var(--hmd-border);
  margin-bottom: 0.35rem;
}

.hmd-nav-dd-email {
  font-size: calc(0.8rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text2);
  word-break: break-all;
}

.hmd-nav-dd-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.5rem;
}

.hmd-nav-dd-link {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: calc(0.9rem * var(--hmd-type-scale));
  font-weight: 500;
  color: var(--hmd-text);
  text-decoration: none;
}

.hmd-nav-dd-link:hover {
  background: var(--hmd-card);
}

.hmd-nav-dd-logout {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--hmd-border);
  border-radius: 8px;
  background: transparent;
  font-size: calc(0.875rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-red);
  cursor: pointer;
  font-family: inherit;
}

.hmd-nav-dd-logout:hover {
  background: rgba(255, 59, 48, 0.08);
}

/* Zelfde hoogte/uitlijning als menu-links (header / ul.primary-menu) */
.hmd-nav-auth-shell--in-menu {
  display: flex;
  align-items: center;
  align-self: center;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

.hmd-nav-auth-shell--in-menu .hmd-nav-auth-root {
  display: flex;
  align-items: center;
  width: 100%;
}

.hmd-nav-auth-shell--in-menu .hmd-nav-auth-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  margin: 0;
  padding: 0;
  width: 100%;
}

li.menu-item-hmd-auth {
  list-style: none;
  flex-shrink: 0;
  float: none;
  clear: none;
  margin: 0;
  padding: 0;
  border: 0;
  /* Veel themes zetten op li display:block of table-cell — forceer flex voor verticale centrering */
  display: flex !important;
  align-items: center !important;
  align-self: center !important;
  height: auto;
  line-height: normal;
}

li.menu-item-hmd-auth > .hmd-nav-auth-shell {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  height: auto;
}

@media (max-width: 782px) {
  .hmd-nav-auth-shell--in-menu .hmd-nav-auth-inner {
    justify-content: flex-start;
  }

  li.menu-item-hmd-auth {
    width: 100%;
    display: flex;
    justify-content: stretch;
  }

  li.menu-item-hmd-auth .hmd-nav-panel {
    left: 0;
    right: 0;
    min-width: 0;
  }
}

.hmd-nav-input {
  flex: 1 1 7rem;
  min-width: 0;
  max-width: 11rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--hmd-border);
  border-radius: 8px;
  font-size: calc(0.875rem * var(--hmd-type-scale));
  background: var(--hmd-bg0);
  color: var(--hmd-text);
  box-sizing: border-box;
}

.hmd-top-auth-bar .hmd-nav-input {
  max-width: 10rem;
}

.hmd-nav-btn {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--hmd-border);
  background: var(--hmd-card-elev);
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  font-weight: 600;
  cursor: pointer;
  color: var(--hmd-text);
}

.hmd-nav-btn--primary {
  background: var(--hmd-blue);
  border-color: transparent;
  color: #fff;
}

.hmd-nav-btn--primary:hover {
  background: var(--hmd-blue-press);
}

.hmd-nav-user {
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  font-weight: 500;
  color: var(--hmd-text2);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hmd-nav-error {
  flex-basis: 100%;
  font-size: calc(0.75rem * var(--hmd-type-scale));
  color: var(--hmd-red);
  margin: 0;
}

/* ——— Eerstvolgend-evenement blok ——— */
.hmd-first-shell {
  margin: 1rem auto;
}

.hmd-first-wrap {
  width: 100%;
}

.hmd-first {
  border-radius: var(--hmd-radius-lg);
  background: var(--hmd-card);
  box-shadow: var(--hmd-shadow);
  padding: 1rem 1.15rem;
}

.hmd-first--guest,
.hmd-first--empty,
.hmd-first--error {
  text-align: center;
}

.hmd-first-p {
  margin: 0;
  font-size: calc(0.9375rem * var(--hmd-type-scale));
  color: var(--hmd-text2);
  line-height: 1.45;
}

.hmd-first-link {
  color: var(--hmd-blue);
  font-weight: 600;
  text-decoration: none;
}

.hmd-first-link:hover {
  text-decoration: underline;
}

.hmd-first--card .hmd-first-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.hmd-first-head-txt {
  flex: 1;
  min-width: 0;
}

.hmd-first-badge {
  display: inline-block;
  font-size: calc(0.625rem * var(--hmd-type-scale));
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--hmd-blue);
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  margin-bottom: 0.35rem;
}

.hmd-first-title {
  margin: 0;
  font-size: calc(1.125rem * var(--hmd-type-scale));
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--hmd-text);
}

.hmd-first-meta {
  margin: 0 0 0.35rem;
  font-size: calc(0.875rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-text2);
}

.hmd-first-timer {
  margin: 0 0 0.5rem;
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  color: var(--hmd-text3);
}

.hmd-first-addr {
  display: block;
  font-size: calc(0.8125rem * var(--hmd-type-scale));
  color: var(--hmd-text3);
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.hmd-first-cta {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: calc(0.875rem * var(--hmd-type-scale));
  font-weight: 600;
  color: var(--hmd-blue);
  text-decoration: none;
}

.hmd-first-cta:hover {
  text-decoration: underline;
}

/* ——— AppLy (LeafColor / Bootstrap) ———
   https://demo.leafcolor.com/applay/doc/ — hoofdkleur via Theme Options.
   --hmd-applay-main wordt door de plugin gezet uit Option Tree (fallback #39ba93). */

.hmd-theme-applay.hmd-nav-auth-shell,
.hmd-theme-applay.hmd-web-wrap {
  font-family: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

.hmd-theme-applay.hmd-web-root,
.hmd-theme-applay .hmd-web-root {
  --hmd-bg0: #ffffff;
  --hmd-bg1: #f8f9fa;
  --hmd-card: #f8f9fa;
  --hmd-card-elev: #ffffff;
  --hmd-border: #dee2e6;
  --hmd-text: #212529;
  --hmd-text2: #6c757d;
  --hmd-text3: rgba(33, 37, 41, 0.5);
  --hmd-blue: var(--hmd-applay-main, #39ba93);
  --hmd-blue-press: color-mix(in srgb, var(--hmd-blue) 88%, #000);
  --hmd-radius-lg: 0.375rem;
  --hmd-radius-md: 0.375rem;
  --hmd-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
  font-family: inherit;
}

/* Site op AppLy is meestal licht: OS-dark mode mag de plugin niet “iOS-donker” maken. */
@media (prefers-color-scheme: dark) {
  .hmd-theme-applay.hmd-web-root,
  .hmd-theme-applay .hmd-web-root {
    --hmd-bg0: #ffffff;
    --hmd-bg1: #f8f9fa;
    --hmd-card: #f8f9fa;
    --hmd-card-elev: #ffffff;
    --hmd-border: #dee2e6;
    --hmd-text: #212529;
    --hmd-text2: #6c757d;
    --hmd-text3: rgba(33, 37, 41, 0.5);
    --hmd-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
  }

  .hmd-theme-applay .hmd-seg-btn.is-active {
    background: #e9ecef;
    color: var(--hmd-text);
  }
}

.hmd-top-auth-bar.hmd-theme-applay {
  background: #ffffff;
  border-bottom: 1px solid #e9ecef;
}

/* Bootstrap-achtige secundaire knop (zoals theme menu-button / .btn-default) */
.hmd-theme-applay .hmd-nav-trigger {
  border-radius: 0.25rem;
  font-size: calc(0.875rem * var(--hmd-type-scale));
  font-weight: 600;
  background: #ffffff;
  border-color: #ced4da;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.hmd-theme-applay .hmd-nav-trigger:hover {
  opacity: 1;
  background: #f8f9fa;
  border-color: #adb5bd;
}

.hmd-theme-applay .hmd-nav-trigger--avatar {
  border-radius: 0.25rem;
}

.hmd-theme-applay .hmd-nav-panel {
  border-radius: 0.25rem;
  border-color: #dee2e6;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.12);
}

.hmd-theme-applay .hmd-nav-field {
  font-size: calc(0.8125rem * var(--hmd-type-scale));
}

.hmd-theme-applay .hmd-nav-input {
  border-radius: 0.25rem;
  border-color: #ced4da;
}

.hmd-theme-applay .hmd-nav-input:focus {
  outline: 0;
  border-color: var(--hmd-blue);
  box-shadow: 0 0 0 0.15rem color-mix(in srgb, var(--hmd-blue) 22%, transparent);
}

.hmd-theme-applay .hmd-nav-dd-link {
  border-radius: 0.2rem;
}

.hmd-theme-applay .hmd-nav-dd-logout {
  border-radius: 0.2rem;
}

.hmd-theme-applay .hmd-nav-btn {
  border-radius: 0.25rem;
  border-color: #ced4da;
}

.hmd-theme-applay .hmd-nav-btn--primary {
  border-color: transparent;
}

.hmd-theme-applay .hmd-nav-btn--primary:hover {
  background: var(--hmd-blue-press);
  filter: none;
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .hmd-theme-applay.hmd-web-root,
  .hmd-theme-applay .hmd-web-root {
    --hmd-blue-press: #2d8f73;
  }

  .hmd-theme-applay .hmd-nav-input:focus {
    box-shadow: 0 0 0 0.15rem rgba(57, 186, 147, 0.28);
  }
}

.hmd-theme-applay .hmd-nav-avatar-ph {
  background: rgba(57, 186, 147, 0.2);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--hmd-blue) 28%, transparent),
    color-mix(in srgb, var(--hmd-blue) 12%, transparent)
  );
  color: var(--hmd-text);
}

/* Dashboard + first-widget:zelfde tokens als auth (geen iOS-gradient hero) */
.hmd-theme-applay .hmd-app {
  border-radius: 0.375rem;
  background: #ffffff;
  border: 1px solid #e9ecef;
}

.hmd-theme-applay .hmd-split-main .hmd-detail-pane,
.hmd-theme-applay .hmd-detail-placeholder {
  border-radius: 0.375rem;
}

.hmd-theme-applay .hmd-rail-scroll {
  border-color: #e9ecef;
}

.hmd-theme-applay .hmd-search,
.hmd-theme-applay .hmd-segment {
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
}

.hmd-theme-applay .hmd-search {
  background: #ffffff;
}

.hmd-theme-applay .hmd-seg-btn.is-active {
  background: #e9ecef;
  box-shadow: none;
}

.hmd-theme-applay .hmd-card {
  border-radius: 0.375rem;
  border: 1px solid #e9ecef;
  box-shadow: none;
}

.hmd-theme-applay .hmd-first {
  border: 1px solid #e9ecef;
  box-shadow: none;
}

.hmd-theme-applay .hmd-first-badge {
  background: var(--hmd-blue);
}

.hmd-theme-applay .hmd-stats-card,
.hmd-theme-applay .hmd-year-strip {
  border-radius: 0.375rem;
  box-shadow: none;
}

.hmd-theme-applay .hmd-detail-hero-symbol {
  border-radius: 0.375rem;
}

/* ——— WPBakery Page Builder ———
   Shortcode in een volle kolom. Optioneel op de rij bij “Extra CSS klasse” (Extra class name): hmd-vc-dashboard-row;
   sfeer: hmd-vc-dashboard-hero (+ hmd-vc-dashboard-hero--muted). Zie plugin-instellingen. */

.wpb_text_column .hmd-web-wrap,
.wpb_raw_html .hmd-web-wrap {
  max-width: none;
}

.vc_row .wpb_column:has(.hmd-web-wrap--dashboard) .vc_column-inner {
  overflow: visible;
}

/* Ook als WPBakery de extra class op een wrapper zet (fluid row / sectie) */
.vc_row-fluid.hmd-vc-dashboard-row .hmd-web-wrap--dashboard,
.vc_row.hmd-vc-dashboard-row .hmd-web-wrap--dashboard {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.vc_row-fluid.hmd-vc-dashboard-row .wpb_column .vc_column-inner,
.vc_row.hmd-vc-dashboard-row .wpb_column .vc_column-inner {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Duidelijke accentstreep: zonder deze class zie je vooral “breedte”; mét class wel contrast */
.vc_row-fluid.hmd-vc-dashboard-row,
.vc_row.hmd-vc-dashboard-row {
  border-left: 4px solid #007aff;
  box-sizing: border-box;
}

.vc_row-fluid.hmd-vc-dashboard-hero,
.vc_row.hmd-vc-dashboard-hero {
  padding-top: 2rem !important;
  padding-bottom: 2.5rem !important;
}

/* Niet meer “bijna wit op wit”: zichtbare band + lichte schaduw */
.vc_row-fluid.hmd-vc-dashboard-hero.hmd-vc-dashboard-hero--muted,
.vc_row.hmd-vc-dashboard-hero.hmd-vc-dashboard-hero--muted {
  background: linear-gradient(180deg, #e8eef5 0%, #f5f8fb 45%, #ffffff 100%) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

@media (prefers-color-scheme: dark) {
  .vc_row-fluid.hmd-vc-dashboard-hero.hmd-vc-dashboard-hero--muted,
  .vc_row.hmd-vc-dashboard-hero.hmd-vc-dashboard-hero--muted {
    background: linear-gradient(180deg, #2c2c2e 0%, #1c1c1e 55%, #000000 100%) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .vc_row-fluid.hmd-vc-dashboard-row,
  .vc_row.hmd-vc-dashboard-row {
    border-left-color: #0a84ff;
  }
}
