/* ═══════════════════════════════════════════════════════
   Løwe & Hund — Sharpened Earth Theme
   Mobile-first, expands to tablet/desktop
   Token reference: see DESIGN.md
   ═══════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted, SIL OFL, latin subset) ───────── */
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('../fonts/nunito-sans-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* ── Variables ────────────────────────────────────────── */
:root {
  --bg:            #F4EBD9;
  --surface:       #FFFCF7;
  --surface-alt:   #F8F1E6;
  --brown-dark:    #3C2B1C;
  --brown-body:    #241810;
  --brown-muted:   #6F5E51;

  /* Action — one green for buttons, links, focus, active states */
  --green:         #45753C;
  --green-text:    #3F6E37;
  --green-strong:  #45753C;
  --green-tint:    rgba(69,117,60,0.12);
  --green-light:   #A5C896;

  /* Lion gold — identity accent: wordmark &, available clips, celebration */
  --gold:          #C89B4B;
  --gold-deep:     #8A6420;

  /* Activity categories (nouns): badges, calendar dots, date blocks only */
  --cat-training:  #2E6B4F;
  --cat-dropin:    #3C2B1C;
  --cat-meetup:    #96551A;
  --cat-kursus:    #8A3B5C;
  --green-dark:    var(--cat-training);
  --orange:        var(--cat-meetup);
  --purple:        var(--cat-kursus);

  /* Status (states): never reuse a category hue */
  --ok:            #2E6B34;
  --ok-bg:         #E4F2E0;
  --warn:          #8A5312;
  --warn-bg:       #F7E8CF;
  --orange-text:   var(--warn);
  --red:           #A82C2C;
  --red-bg:        rgba(168,44,44,0.08);
  --red-border:    #D98080;

  --border:        #E8D9C8;
  --border-strong: #B79E7B;

  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:  'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --r-sm:  10px;
  --r:     14px;
  --r-lg:  18px;
  --r-xl:  22px;

  --topbar-h:     56px;
  --bottomnav-h:  68px;

  --shadow-card: 0 1px 4px rgba(60,43,28,0.08);
  --shadow-modal: 0 8px 48px rgba(0,0,0,0.22);
}

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--brown-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
a { color: var(--green-text); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── App chrome ───────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: var(--brown-dark);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  flex-shrink: 0;
}
.topbar-back {
  width: 36px; height: 36px;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: var(--bg);
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  text-decoration: none;
  line-height: 1;
}
.topbar-back:hover { background: rgba(255,255,255,0.2); text-decoration: none; }
.topbar-logo {
  display: flex;
  align-items: center;
  height: 36px;
  flex-shrink: 0;
}
.topbar-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 620;
  color: var(--bg);
  flex: 1;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  color: var(--brown-dark);
  cursor: pointer; flex-shrink: 0;
  letter-spacing: -0.5px;
  text-decoration: none;
  border: none;
}
.topbar-avatar:hover { opacity: 0.85; text-decoration: none; }

/* ── Main content ─────────────────────────────────────── */
.page-wrap {
  padding-bottom: calc(var(--bottomnav-h) + 16px);
  min-height: calc(100vh - var(--topbar-h));
}
.page-wrap--no-nav { padding-bottom: 32px; }

.page {
  padding: 20px 16px 24px;
}

/* ── Bottom nav ───────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--bottomnav-h);
  background: var(--brown-dark);
  display: flex;
  align-items: stretch;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px 4px;
  position: relative;
  text-decoration: none;
  color: rgba(255,255,255,0.72);
}
.nav-tab:hover { text-decoration: none; }
.nav-tab.active { color: var(--green-light); }
.nav-tab.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 3px;
  background: var(--green-light);
  border-radius: 0 0 3px 3px;
}
.nav-tab span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.nav-tab svg { color: inherit; }

/* ── Flash messages (snackbar overlays) ───────────────── */
.flash-stack {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--bottomnav-h) + 16px);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 440px;
  pointer-events: none;
}
.flash {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  border-left: 3px solid transparent;
  background: var(--brown-dark);
  color: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: var(--shadow-modal);
  animation: flashIn 0.25s ease;
  transition: opacity 0.25s, transform 0.25s;
}
.flash--hide    { opacity: 0; transform: translateY(8px); }
.flash--success { border-left-color: var(--green-light); }
.flash--info    { border-left-color: var(--green-light); }
.flash--error   { border-left-color: var(--red-border); }
.flash-msg      { flex: 1; min-width: 0; }
.flash a        { color: var(--green-light); text-decoration: underline; }
.flash-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  font-size: 18px;
  line-height: 1;
  padding: 2px;
  margin: -2px -4px 0 0;
}
.flash-close:hover { opacity: 1; }
@keyframes flashIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Typography ───────────────────────────────────────── */
.greeting {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 640;
  color: var(--brown-body);
  margin-bottom: 4px;
}
.greeting-sub {
  font-size: 14px;
  color: var(--brown-muted);
  margin-bottom: 22px;
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--brown-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

/* ── Overflow (kebab) settings menu ──────────────────────── */
.overflow-menu { position: relative; }
.overflow-menu-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 18px;
  line-height: 1;
  color: var(--brown-body);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.overflow-menu-btn:hover { background: var(--surface-alt); }
.overflow-menu-list {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
  z-index: 50;
}
.overflow-menu.open .overflow-menu-list { display: block; }
.overflow-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--brown-body);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.overflow-menu-item:hover { background: var(--surface-alt); }
.overflow-menu-btn--sm { width: 38px; height: 38px; border-radius: 50%; font-size: 16px; }

/* ── Month calendar (used by activity creation + Aktiviteter calendar view) ── */
.cal-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-nav-btn { background: none; border: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--brown-body); padding: 4px 10px; border-radius: 8px; }
.cal-nav-btn:hover { background: var(--bg); }
.cal-month-label { font-weight: 700; font-size: 14px; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-bottom: 4px; }
.cal-dow span { text-align: center; font-size: 10px; font-weight: 700; color: var(--brown-muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-day { aspect-ratio: 1; border-radius: 8px; font-size: 12px; display: flex; align-items: center; justify-content: center; border: 1.5px solid transparent; cursor: pointer; background: var(--bg); color: var(--brown-muted); position: relative; }
.cal-day.cal-day--empty { visibility: hidden; cursor: default; }
.cal-day.cal-day--open { background: rgba(69,117,60,0.15); color: var(--green-text); }
.cal-day.cal-day--busy { background: rgba(150,85,26,0.18); color: var(--orange-text); font-weight: 700; }
.cal-day.cal-day--closed { background: #ECE7DD; color: #6E655B; cursor: not-allowed; }
.cal-day.cal-day--has-activities { background: rgba(69,117,60,0.22); color: var(--green-text); font-weight: 700; }
.cal-day.cal-day--has-activities::after { content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.cal-day.cal-day--active { background: rgba(69,117,60,0.22); color: var(--green-text); font-weight: 700; }
/* Range picker (Julekalender start/end) */
.cal-day.cal-day--in-range { background: rgba(69,117,60,0.22); color: var(--green-text); border-radius: 0; }
.cal-day.cal-day--range-start,
.cal-day.cal-day--range-end { background: var(--green-strong); color: #fff; font-weight: 700; }
.cal-day.cal-day--range-start { border-radius: 8px 0 0 8px; }
.cal-day.cal-day--range-end   { border-radius: 0 8px 8px 0; }
.cal-day.cal-day--range-start.cal-day--range-end { border-radius: 8px; }
.cal-day-dots { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; }
.cal-day-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.cal-day.cal-day--past { opacity: 0.4; cursor: not-allowed; }
.cal-day.cal-day--selected { border-color: var(--brown-dark); font-weight: 700; }
.cal-legend { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.cal-legend span { font-size: 11px; color: var(--brown-muted); display: inline-flex; align-items: center; gap: 5px; }
.cal-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.cal-dot--open { background: var(--green); }
.cal-dot--busy { background: var(--warn); }
.cal-dot--closed { background: #ccc; }
.cal-day-panel { margin-top: 14px; }
.cal-day-panel-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.cal-slot-row { display: flex; justify-content: space-between; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin-bottom: 6px; font-size: 13px; text-decoration: none; color: inherit; }
.cal-slot-row:hover { border-color: var(--green); }
.cal-empty-hint { font-size: 13px; color: var(--brown-muted); }

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.card--clickable { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.card--clickable:hover { border-color: var(--green); box-shadow: 0 3px 10px rgba(60,43,28,0.12); }
.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.card-row:last-child { border-bottom: none; }
.card-row-label { font-size: 14px; color: var(--brown-muted); }
.card-row-value { font-size: 15px; font-weight: 700; color: var(--brown-body); text-align: right; }

/* ── Punch card widget ────────────────────────────────── */
.punchcard-widget {
  background: var(--brown-dark);
  border-radius: var(--r-xl);
  padding: 20px;
  margin-bottom: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
}
.punchcard-widget-info { flex: 1; }
.punchcard-widget-label {
  font-size: 11px;
  color: rgba(255,255,255,0.72);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.punchcard-widget-count {
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  font-family: var(--font-serif);
}
.punchcard-widget-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  margin-top: 5px;
}
.clip-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  width: 68px;
  flex-shrink: 0;
}
.clip-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
}
.clip-dot--used      { background: rgba(255,255,255,0.18); }
.clip-dot--reserved  { background: var(--green-light); }
.clip-dot--available { background: var(--gold); }

/* ── Type badges ──────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 4px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.badge--training { background: var(--cat-training); color: #fff; }
.badge--dropin   { background: var(--cat-dropin); color: #F4EBD9; }
.badge--meetup   { background: var(--cat-meetup); color: #fff; }
.badge--kursus   { background: var(--cat-kursus); color: #fff; }

/* Content categories (gode råd, …) */
.badge--content-1 { background: var(--green-strong); color: #fff; }
.badge--content-2 { background: var(--cat-training); color: #fff; }
.badge--content-3 { background: var(--cat-meetup);   color: #fff; }
.badge--content-4 { background: var(--cat-kursus);   color: #fff; }
.badge--content-5 { background: var(--brown-dark); color: var(--bg); }

/* ── Registration card (user home) ───────────────────── */
.registration-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s;
}
.registration-card:hover { border-color: var(--green); box-shadow: 0 3px 10px rgba(60,43,28,0.12); }
.registration-date-block {
  border-radius: var(--r-sm);
  padding: 10px 12px;
  text-align: center;
  min-width: 52px;
  flex-shrink: 0;
}
.registration-date-day  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.registration-date-num  { font-size: 24px; font-weight: 800; line-height: 1.1; }
.registration-info      { flex: 1; min-width: 0; }
.registration-type      { font-size: 16px; font-weight: 700; color: var(--brown-body); }
.registration-meta      { font-size: 14px; color: var(--brown-muted); margin-top: 2px; }
.registration-participants { font-size: 13px; color: var(--brown-muted); margin-top: 2px; }
.registration-chevron   { color: var(--brown-muted); font-size: 20px; flex-shrink: 0; margin-top: 4px; }

/* ── Activity list item ───────────────────────────────── */
.activity-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.15s;
}
.activity-item:hover { border-color: var(--green); box-shadow: 0 3px 10px rgba(60,43,28,0.12); }
.activity-time       { min-width: 58px; flex-shrink: 0; }
.activity-time-main  { font-size: 18px; font-weight: 800; color: var(--brown-body); }
.activity-time-dur   { font-size: 12px; color: var(--brown-muted); margin-top: 1px; }
.activity-info       { flex: 1; min-width: 0; }
.activity-name       { font-size: 15px; font-weight: 600; color: var(--brown-body); }
.activity-spots      { font-size: 13px; color: var(--brown-muted); margin-top: 2px; }
.activity-clip-tag   { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 20px; flex-shrink: 0; }

/* ── Form elements ────────────────────────────────────── */
.form-group     { margin-bottom: 18px; }
.form-label     { display: block; font-size: 12px; font-weight: 700; color: var(--brown-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.form-input     { width: 100%; height: 52px; border: 1.5px solid var(--border-strong); border-radius: 12px; padding: 0 16px; font-size: 16px; color: var(--brown-body); background: var(--surface); transition: border-color 0.15s; }
.form-input:focus   { outline: none; border-color: var(--green); }
.form-input.error   { border-color: var(--red); }
.form-textarea  { width: 100%; border: 1.5px solid var(--border-strong); border-radius: 12px; padding: 14px 16px; font-size: 15px; color: var(--brown-body); background: var(--surface); resize: vertical; line-height: 1.5; min-height: 88px; transition: border-color 0.15s; }
.form-textarea:focus { outline: none; border-color: var(--green); }
.form-error     { font-size: 13px; color: var(--red); margin-top: 6px; }

/* Native file inputs, restyled so "Vælg fil" reads as a site button rather than the OS default */
input[type="file"].form-input {
  height: auto;
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 8px;
  font-size: 13px;
  color: var(--brown-muted);
  cursor: pointer;
}
input[type="file"].form-input::file-selector-button,
input[type="file"].form-input::-webkit-file-upload-button {
  height: 36px;
  padding: 0 16px;
  margin-right: 12px;
  border: none;
  border-radius: 20px;
  background: var(--green-strong);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
input[type="file"].form-input:hover::file-selector-button,
input[type="file"].form-input:hover::-webkit-file-upload-button {
  opacity: 0.88;
}

/* Poll option rows (create/edit form) */
.poll-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.poll-option-row .form-input { flex: 1; min-width: 0; }
.poll-option-remove {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--red-border);
  background: var(--red-bg);
  color: var(--red);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.15s;
}
.poll-option-remove:hover:not(:disabled) { opacity: 0.8; }
.poll-option-remove:disabled { opacity: 0.35; cursor: not-allowed; }

/* Poll option rows with vote distribution (detail view) */
.poll-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.poll-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
label.poll-opt { cursor: pointer; }
.poll-opt input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--green);
  cursor: inherit;
}
.poll-opt-body { flex: 1; min-width: 0; }
.poll-opt-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.poll-opt-label { font-size: 14px; color: var(--brown-body); }
.poll-opt-count {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--brown-muted);
  white-space: nowrap;
}
.poll-opt-track {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: rgba(60,43,28,0.08);
  overflow: hidden;
}
.poll-opt-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--green);
  transition: width 0.3s ease;
}

/* Poll manage actions — buttons share the row 50/50 */
.poll-actions { display: flex; gap: 10px; }
.poll-actions > * { flex: 1; min-width: 0; }

/* Small thumbnail shown in content overview rows */
.content-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.form-grid-2    { display: grid; grid-template-columns: 1fr; gap: 12px; }
.form-grid-2 > .form-group { min-width: 0; }
@media (min-width: 480px) {
  .form-grid-2  { grid-template-columns: 1fr 1fr; }
}

/* Toggle button group */
.toggle-group   { display: flex; gap: 8px; flex-wrap: wrap; }
.toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--brown-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.toggle-btn.active {
  border-color: var(--green);
  background: rgba(69,117,60,0.15);
  color: var(--green-text);
}

/* ── Segmented control (view switcher, not a filter) ───── */
.seg-control {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: rgba(60,43,28,0.08);
  border-radius: 12px;
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--brown-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.seg-btn:hover { color: var(--brown-body); }
.seg-btn.active {
  background: var(--surface);
  color: var(--green-text);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(60,43,28,0.18);
}

/* ── Section tabs (dark chrome bar under the topbar — Indhold sections) ── */
.section-tabs {
  position: sticky;
  top: var(--topbar-h);
  z-index: 90;
  background: var(--brown-dark);
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  justify-content: center;
}
.section-tab {
  flex: 1;
  max-width: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 4px 15px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  white-space: nowrap;
}
.section-tab:hover { color: var(--bg); text-decoration: none; }
.section-tab.active { color: var(--green-light); }
.section-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 3px;
  background: var(--green-light);
  border-radius: 3px 3px 0 0;
}

/* ── Filter chips (one horizontally scrollable line — never wraps) ───── */
.chip-row-wrap { position: relative; margin-bottom: 16px; }
.chip-row-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 24px;
  background: linear-gradient(90deg, transparent, var(--bg));
  pointer-events: none;
}
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 24px 2px 0; /* right padding so the last chip can scroll clear of the edge fade */
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--brown-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.chip:hover { text-decoration: none; border-color: var(--green); }
.chip.active {
  border-color: var(--green);
  background: var(--green-tint);
  color: var(--green-text);
  font-weight: 700;
}

/* ── Rich content cards (gode råd list) ──────────────────── */
.post-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.post-card:hover {
  border-color: var(--green);
  box-shadow: 0 3px 10px rgba(60,43,28,0.12);
}
.post-card-link { display: block; text-decoration: none; color: inherit; }
.post-card-link:hover { text-decoration: none; }
.post-card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.post-card-body { padding: 14px 16px 15px; }
.post-card-labels { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.post-card-pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brown-muted);
}
.post-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brown-body);
  line-height: 1.35;
  margin-bottom: 4px;
}
.post-card-excerpt {
  font-size: 13.5px;
  color: var(--brown-muted);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: var(--brown-muted);
}
.post-card-meta .meta-dot::before { content: '·'; }
.post-card-adminbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}
.post-card-adminbar .adminbar-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-text);
  text-decoration: none;
  min-height: 26px;
}

/* ── Unread markers ──────────────────────────────────────── */
.post-card-new {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-text);
}
.post-card-new::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.nav-tab-badge {
  position: absolute;
  top: 4px;
  left: 50%;
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--brown-dark);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Klip reaction (the punch-dot as a like) ─────────────── */
.klip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--brown-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.klip-btn:hover { border-color: var(--green); }
.klip-btn:active { transform: scale(0.98); }
.klip-btn.active {
  border-color: var(--green);
  background: var(--green-tint);
  color: var(--green-text);
}
.klip-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: transparent;
  flex-shrink: 0;
  transition: all 0.15s;
}
.klip-btn.active .klip-dot {
  border-color: var(--gold);
  background: var(--gold);
  animation: popIn 0.45s cubic-bezier(0.34,1.56,0.64,1);
}
.klip-btn--sm {
  height: 28px;
  padding: 0 10px;
  gap: 6px;
  font-size: 12px;
}
.klip-btn--sm .klip-dot { width: 9px; height: 9px; border-width: 1.5px; }
.post-card-meta .meta-klip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.post-card-meta .meta-klip::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

/* ── Content search field ────────────────────────────────── */
.content-search {
  position: relative;
  margin-bottom: 12px;
}
.content-search svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--brown-muted);
  pointer-events: none;
}
.content-search input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 40px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  font-size: 14px;
  color: var(--brown-body);
}
.content-search input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px var(--green-tint);
}
.content-search .search-clear {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--brown-muted);
  font-size: 16px;
  text-decoration: none;
}
.content-search .search-clear:hover { background: var(--surface-alt); text-decoration: none; }

/* ── Indhold hub (/content) ───────────────────────────────
   Hero (newest item in the universe), the mixed "Siden sidst"
   feed rows, type badges and the section entrance cards. */

/* Type badges: which universe a feed item belongs to (nouns, tint-style) */
.type-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.type-badge--advice { background: var(--green-tint); color: var(--green-text); }
.type-badge--door   { background: rgba(200,155,75,0.18); color: var(--gold-deep); }
.type-badge--poll   { background: var(--surface-alt); color: var(--brown-dark); box-shadow: inset 0 0 0 1px var(--border); }

/* Hero: a post-card whose title steps up to Fraunces; the tinted band
   stands in when the newest item has no photo. */
.hub-hero {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 20px;
}
.hub-hero:hover { text-decoration: none; }
.hub-hero-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.hub-hero-band {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 48px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hub-hero-band--advice { background: var(--green-tint); color: var(--green-text); }
.hub-hero-band--door   { background: rgba(200,155,75,0.22); color: var(--gold-deep); }
.hub-hero-band--poll   { background: var(--surface-alt); color: var(--brown-dark); border-bottom: 1px solid var(--border); }
.hub-hero-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 640;
  line-height: 1.25;
  color: var(--brown-dark);
  margin-bottom: 6px;
}
.hub-unvoted { color: var(--green-text); font-weight: 700; }

/* Feed rows: compact cards for the rest of the mixed feed */
.hub-feed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hub-feed-row:hover {
  text-decoration: none;
  border-color: var(--green);
  box-shadow: 0 3px 10px rgba(60,43,28,0.12);
}
.hub-feed-main { flex: 1; min-width: 0; }
.hub-feed-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--brown-dark);
  line-height: 1.35;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.hub-feed-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--brown-muted);
}
.hub-feed-row > svg { flex-shrink: 0; color: var(--brown-muted); }

/* Section cards: the entrances to Gode råd / Kalendere / Afstemninger */
.hub-seccard {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hub-seccard:hover {
  text-decoration: none;
  border-color: var(--green);
  box-shadow: 0 3px 10px rgba(60,43,28,0.12);
}
.hub-seccard-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hub-seccard-icon--advice { background: var(--green-tint); color: var(--green); }
.hub-seccard-icon--advent { background: rgba(200,155,75,0.18); color: var(--gold-deep); }
.hub-seccard-icon--polls  { background: var(--surface-alt); color: var(--brown-dark); box-shadow: inset 0 0 0 1px var(--border); }
.hub-seccard-info { flex: 1; min-width: 0; }
.hub-seccard-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 640;
  color: var(--brown-dark);
  line-height: 1.2;
}
.hub-seccard-desc {
  font-size: 13px;
  color: var(--brown-muted);
  margin-top: 2px;
}
.hub-seccard-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 700;
}
.hub-seccard-live--green { color: var(--green-text); }
.hub-seccard-live--gold  { color: var(--gold-deep); }
.hub-seccard-live--muted { color: var(--brown-muted); font-weight: 600; }
.hub-seccard-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
}
.hub-seccard-chevron { flex-shrink: 0; color: var(--brown-muted); }

/* ── Pulse banner (one at a time, top of the Indhold hub) ── */
.pulse-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1.5px solid var(--green);
  border-radius: var(--r);
  background: var(--green-tint);
  color: var(--green-text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.15s;
}
.pulse-banner:hover { background: rgba(69,117,60,0.18); text-decoration: none; }
.pulse-banner .pulse-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.pulse-banner .pulse-text { flex: 1; min-width: 0; }
.pulse-banner svg { flex-shrink: 0; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 54px;
  border: none;
  border-radius: var(--r);
  padding: 0 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn--primary  { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-text); }
.btn--dark     { background: var(--brown-dark); color: var(--bg); }
.btn--dark:hover { background: #2C1E14; }
.btn--secondary { background: var(--surface); color: var(--brown-muted); border: 1.5px solid var(--border-strong); height: 48px; font-size: 15px; font-weight: 600; }
.btn--secondary:hover { background: var(--surface-alt); }
.btn--danger   { background: var(--red-bg); color: var(--red); border: 1.5px solid var(--red-border); height: 48px; font-size: 15px; font-weight: 600; }
.btn--danger:hover { background: rgba(168,44,44,0.14); }
.btn--outline-green { background: var(--green-tint); color: var(--green-text); border: 1.5px solid var(--green); height: 48px; font-size: 14px; font-weight: 600; }
.btn--outline-green:hover { background: rgba(69,117,60,0.2); }
.btn--sm   { height: 38px; font-size: 13px; font-weight: 600; border-radius: 20px; width: auto; padding: 0 16px; }
.btn--full { width: 100%; }
.btn--multiline { height: auto; min-height: 48px; white-space: normal; flex-direction: column; gap: 2px; padding: 10px 16px; text-align: center; }
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Quantity stepper ─────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: 16px;
}
.stepper-btn {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  border: none; background: var(--surface);
  box-shadow: var(--shadow-card);
  font-size: 24px; font-weight: 700; line-height: 1; color: var(--brown-dark);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.1s, background 0.15s;
}
.stepper-btn:hover { background: rgba(69,117,60,0.15); }
.stepper-btn:active { transform: scale(0.92); }
.stepper-btn--plus { color: var(--green-text); }
.stepper-btn--minus { color: var(--red); }
.stepper-center { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 90px; }
.stepper-input {
  width: 100%;
  border: none; background: transparent;
  font-size: 30px; font-weight: 800; text-align: center;
  color: var(--brown-body);
  padding: 0;
  border-radius: 8px;
}
.stepper-input:focus-visible {
  outline: 2px solid var(--green-strong);
  outline-offset: 2px;
}
.stepper-preview { font-size: 12px; color: var(--brown-muted); white-space: nowrap; }
.stepper-presets { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.chip-btn {
  border: 1.5px solid var(--border); background: var(--surface);
  border-radius: 20px; padding: 6px 14px;
  font-size: 13px; font-weight: 700; color: var(--brown-body);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.chip-btn:hover { border-color: var(--green); background: rgba(69,117,60,0.08); }
.chip-btn--reset { color: var(--brown-muted); font-weight: 600; }

/* ── Callout / info box ───────────────────────────────── */
.callout {
  background: rgba(69,117,60,0.15);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--green-text);
  line-height: 1.55;
}
.callout--warn {
  background: rgba(138,83,18,0.08);
  border-color: var(--warn);
  color: var(--warn);
}
.callout--danger {
  background: var(--red-bg);
  border-color: var(--red);
  color: var(--red);
}

/* ── Status badges ────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  white-space: nowrap;
}
.status-badge--confirmed { background: var(--ok-bg); color: var(--ok); }
.status-badge--cancelled { background: #FFF0F0; color: var(--red); }
.status-badge--completed { background: #EEF4EE; color: var(--ok); }
.status-badge--expired   { background: var(--warn-bg); color: var(--warn); }
.status-badge--active    { background: var(--ok-bg); color: var(--ok); }
.status-badge--inactive  { background: #F0F0F0; color: #6C6C6C; }
.status-badge--low       { background: var(--warn-bg); color: var(--warn); }

/* ── Avatar ───────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.avatar--sm  { width: 36px; height: 36px; font-size: 12px; }
.avatar--md  { width: 44px; height: 44px; font-size: 14px; }
.avatar--lg  { width: 58px; height: 58px; font-size: 18px; }
.avatar--xl  { width: 72px; height: 72px; font-size: 22px; }
.avatar--green    { background: rgba(69,117,60,0.15); color: var(--green-text); }
.avatar--dark     { background: var(--brown-dark); color: var(--green-light); }
.avatar--brown    { background: var(--brown-dark); color: var(--green-light); }
.avatar--inactive { background: #E5DED6; color: #A89880; }

/* ── Section date divider ─────────────────────────────── */
.date-divider {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--brown-dark);
  letter-spacing: -0.2px;
  margin-bottom: 12px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.date-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── User list item ───────────────────────────────────── */
.user-card {
  display: block;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.user-card:hover { border-color: var(--green); }
.user-card--low  { border-color: #E8C8B0; }
.user-card-top   { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.user-card-name  { font-size: 15px; font-weight: 700; color: var(--brown-body); }
.user-card-email { font-size: 13px; color: var(--brown-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card-bottom { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--surface-alt); border-radius: var(--r-sm); }

/* ── Punch card full view ─────────────────────────────── */
.punchcard-full {
  background: var(--brown-dark);
  border-radius: var(--r-xl);
  padding: 24px;
  margin-bottom: 24px;
}
.punchcard-full-header {
  font-size: 11px;
  color: rgba(255,255,255,0.72);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 18px;
}
.punchcard-dots-lg {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.clip-dot-lg { width: 32px; height: 32px; border-radius: 50%; }
.punchcard-stats {
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
}
.punchcard-stat {
  flex: 1;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.punchcard-stat:last-child { border-right: none; }
.punchcard-stat-num   { font-size: 28px; font-weight: 800; font-family: var(--font-serif); }
.punchcard-stat-label { font-size: 11px; color: rgba(255,255,255,0.72); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Admin dashboard cards ────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.dash-card {
  border-radius: var(--r-lg);
  padding: 20px;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: opacity 0.15s;
}
.dash-card:hover { opacity: 0.88; text-decoration: none; }
.dash-card--dark  { background: var(--brown-dark); }
.dash-card--light { background: var(--surface); border: 1.5px solid var(--border); }
.dash-card--green { background: var(--green-strong); }
.dash-card--warn  { background: var(--surface); border: 1.5px solid #E8C8B0; }
.dash-num   { font-family: var(--font-serif); font-size: 36px; font-weight: 700; line-height: 1; }
.dash-label { font-size: 13px; margin-top: 6px; line-height: 1.3; }
.dash-card--dark  .dash-num   { color: #fff; }
.dash-card--dark  .dash-label { color: rgba(255,255,255,0.72); }
.dash-card--light .dash-num   { color: var(--brown-body); }
.dash-card--light .dash-label { color: var(--brown-muted); }
.dash-card--green .dash-num   { color: #fff; font-size: 26px; font-weight: 300; }
.dash-card--green .dash-label { color: rgba(255,255,255,0.88); }
.dash-card--warn  .dash-num   { color: var(--orange-text); }
.dash-card--warn  .dash-label { color: var(--brown-muted); }

/* ── Activity teaser card (home page meetup preview) ──── */
.activity-teaser {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: border-color 0.15s;
  text-decoration: none;
  display: block;
  color: inherit;
}
.activity-teaser:hover { border-color: var(--orange); text-decoration: none; color: inherit; }

/* ── Profile header ───────────────────────────────────── */
.profile-header {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 20px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}
.profile-name  { font-size: 19px; font-weight: 700; color: var(--brown-body); }
.profile-email { font-size: 14px; color: var(--brown-muted); margin-top: 2px; }
.profile-phone { font-size: 14px; color: var(--brown-muted); margin-top: 1px; }

/* ── Dog list item ────────────────────────────────────── */
.dog-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.dog-item:last-child { border-bottom: none; }
.dog-item:hover { background: var(--surface-alt); }
.dog-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(69,117,60,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Confirm modal ────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.5);
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 28px 24px 36px;
  width: 100%;
  max-width: 480px;
  animation: slideUp 0.25s ease;
}
.modal-sheet--scroll {
  max-height: 85vh;
  overflow-y: auto;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  font-weight: 700;
}
.modal-icon--danger { background: rgba(168,44,44,0.1); color: var(--red); }
.modal-icon--warn   { background: rgba(138,83,18,0.1);  color: var(--orange-text); }
.modal-title   { font-family: var(--font-serif); font-size: 22px; font-weight: 640; color: var(--brown-body); text-align: center; margin-bottom: 10px; line-height: 1.2; }
.modal-body    { font-size: 14px; color: var(--brown-muted); text-align: center; line-height: 1.6; margin-bottom: 24px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.modal-check-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 16px; }
.modal-check-row label { font-size: 14px; color: var(--brown-body); cursor: pointer; line-height: 1.4; }
.modal-check-row input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--green); flex-shrink: 0; }
.form-group input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--green-strong); flex-shrink: 0; }

/* ── Header card (session type color) ────────────────── */
.type-header {
  padding: 24px 20px 28px;
}
.type-header-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; opacity: 0.7; }
.type-header-title { font-family: var(--font-serif); font-size: 26px; font-weight: 640; line-height: 1.2; margin-bottom: 6px; }
.type-header-meta  { font-size: 14px; opacity: 0.7; }

/* ── Adjust clips stepper ─────────────────────────────── */
.clip-stepper { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 16px; }
.clip-stepper-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-alt); border: 1.5px solid var(--border); font-size: 22px; color: var(--brown-body); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.clip-stepper-val { min-width: 60px; text-align: center; }
.clip-stepper-num { font-size: 36px; font-weight: 800; font-family: var(--font-serif); line-height: 1; }
.clip-stepper-sub { font-size: 12px; color: var(--brown-muted); margin-top: 2px; }

/* ── History list ─────────────────────────────────────── */
.history-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }
.history-dot { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; flex-shrink: 0; }
.history-dot--add    { background: rgba(40,160,80,0.1);   color: #1A8040; }
.history-dot--remove { background: rgba(200,50,50,0.1);   color: var(--red); }
.history-label { font-size: 15px; font-weight: 600; color: var(--brown-body); }
.history-date  { font-size: 13px; color: var(--brown-muted); margin-top: 2px; }

/* ── Expiring card item ───────────────────────────────── */
.expiry-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin-bottom: 12px;
  border-left-width: 4px;
}
.expiry-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.expiry-card-bottom { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface-alt); border-radius: var(--r-sm); }

/* ── Login page ───────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.login-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
}
.login-logo {
  width: 76px; height: 76px;
  background: var(--brown-dark);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.login-brand {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 640;
  color: var(--brown-dark);
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 6px;
}
.login-tagline { font-size: 15px; color: var(--brown-muted); text-align: center; }
.login-form { padding: 0 28px 44px; display: flex; flex-direction: column; gap: 12px; }
.login-divider { display: flex; align-items: center; gap: 12px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-divider span { font-size: 12px; color: var(--brown-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Inline form feedback ─────────────────────────────── */
.input-with-error { position: relative; }
.input-error-msg  { font-size: 13px; color: var(--red); margin-top: 5px; }
.form-hint        { font-size: 12px; color: var(--brown-muted); margin-top: 6px; display: block; }

/* ── Empty state ──────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px 24px; }
.empty-state p { font-size: 15px; color: var(--brown-muted); line-height: 1.6; }

/* ── Participant pill ─────────────────────────────────── */
.participant-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px 6px 6px;
}
.participant-pill .avatar { width: 28px; height: 28px; font-size: 11px; }

/* ── Map placeholder ──────────────────────────────────── */
.map-placeholder {
  height: 148px;
  background: #D8E8D4;
  position: relative;
  overflow: hidden;
}
.map-placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(0,0,0,0.04) 19px, rgba(0,0,0,0.04) 20px),
    repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(0,0,0,0.04) 19px, rgba(0,0,0,0.04) 20px);
}
.map-placeholder-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.map-placeholder-label span {
  background: rgba(255,255,255,0.92);
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px; color: #5A7060; font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.map-open-btn {
  position: absolute; right: 14px; bottom: 14px;
  background: white; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 6px 12px;
  font-size: 12px; color: var(--brown-muted);
  cursor: pointer; text-decoration: none;
}
.map-open-btn:hover { text-decoration: none; }

/* ── Utilities ────────────────────────────────────────── */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.flex   { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--brown-muted); }
.text-green { color: var(--green-text); }
.text-red   { color: var(--red); }
.fw-700 { font-weight: 700; }
.hidden { display: none !important; }

/* ── Tablet / Desktop ─────────────────────────────────── */
@media (min-width: 768px) {
  :root { --bottomnav-h: 0px; }

  body { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: var(--topbar-h) 1fr; min-height: 100vh; }

  .topbar { grid-column: 1 / -1; grid-row: 1; position: sticky; top: 0; }

  .bottom-nav {
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    flex-direction: column;
    align-items: stretch;
    border-top: none;
    border-right: 1px solid rgba(255,255,255,0.07);
    grid-row: 2;
    grid-column: 1;
  }

  .nav-tab {
    flex: 0 0 auto;
    height: 56px;
    flex-direction: row;
    justify-content: flex-start;
    padding: 0 20px;
    gap: 12px;
  }
  .nav-tab.active::before {
    top: 50%; left: 0;
    transform: translateY(-50%);
    width: 3px; height: 28px;
    border-radius: 0 3px 3px 0;
  }
  .nav-tab span { font-size: 14px; }

  .page-main {
    grid-row: 2;
    grid-column: 2;
    overflow-y: auto;
  }

  /* page-main is the scroll container here, so the tab bar sticks to its top */
  .section-tabs { top: 0; }

  /* Sidebar tabs are rows — the badge sits at the right edge instead of over the icon */
  .nav-tab-badge {
    position: static;
    margin-left: auto;
  }

  .page-wrap { padding-bottom: 32px; }

  .page { padding: 28px 32px; max-width: 680px; }

  .login-wrap { grid-column: 1 / -1; grid-row: 1 / -1; }

  .form-grid-2 { gap: 16px; }

  .dash-grid { grid-template-columns: repeat(4, 1fr); }

  .modal-sheet { border-radius: var(--r-xl); margin-bottom: 10vh; }
  .modal-overlay { align-items: center; }
}

@media (min-width: 1024px) {
  body { grid-template-columns: 240px 1fr; }
  .page { max-width: 760px; }
}

/* ── Animations ───────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  0%   { transform: scale(0.5); }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.fade-up { animation: fadeUp 0.28s ease forwards; }
.pop-in  { animation: popIn 0.45s cubic-bezier(0.34,1.56,0.64,1) forwards; }

/* ── Notification toggle switch ───────────────────────── */
.notif-toggle {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.notif-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.notif-track {
  position: absolute;
  inset: 0;
  background: #8F867C;
  border-radius: 13px;
  transition: background 0.2s;
}
.notif-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.notif-toggle input:checked + .notif-track { background: var(--green); }
.notif-toggle input:checked + .notif-track::after { transform: translateX(18px); }
.notif-toggle input:focus-visible + .notif-track { outline: 2px solid var(--green); outline-offset: 2px; }
.batch-panel { display: none; }
.batch-panel--open { display: block; }

/* ── Content editor (content universe: advice entries, advent doors, …) ── */
.content-editor { border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.content-editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1.5px solid var(--border); background: var(--surface-alt); }
.content-editor-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--brown-body);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.content-editor-btn:hover { border-color: var(--green); background: var(--surface-alt); }
.content-editor-body {
  min-height: 160px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--brown-body);
}
.content-editor-body:focus { outline: none; }
/* Shared with .rich-text so rendered post bodies match what was typed in the editor */
.content-editor-body h2, .rich-text h2 { font-size: 19px; font-weight: 700; margin: 0.6em 0 0.3em; }
.content-editor-body h3, .rich-text h3 { font-size: 16px; font-weight: 700; margin: 0.6em 0 0.3em; }
.content-editor-body p, .rich-text p { margin: 0 0 0.6em; }
.content-editor-body ul, .content-editor-body ol,
.rich-text ul, .rich-text ol { margin: 0 0 0.6em; padding-left: 1.4em; }
.content-editor-body blockquote, .rich-text blockquote { margin: 0 0 0.6em; padding-left: 12px; border-left: 3px solid var(--green-light); color: var(--brown-muted); }
.content-editor-body a, .rich-text a { color: var(--green-text); text-decoration: underline; }

/* ── Advent calendar door grid ───────────────────────── */
.advent-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (min-width: 480px) {
  .advent-grid { grid-template-columns: repeat(6, 1fr); }
}
.advent-door {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--brown-body);
  cursor: pointer;
  font: inherit;
  padding: 8px 4px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.advent-door:hover { border-color: var(--cal-accent, var(--green)); }
.advent-door-number { font-family: var(--font-serif); font-size: 22px; font-weight: 700; }
.advent-door-status { font-size: 10px; line-height: 1.3; color: var(--brown-muted); }
.advent-door--unassigned { background: var(--surface-alt); border-style: dashed; }
.advent-door--locked { background: rgba(60,43,28,0.05); }
.advent-door--own { background: var(--cal-tint, rgba(69,117,60,0.15)); border-color: var(--cal-accent, var(--green)); }
.advent-door--own .advent-door-status { color: var(--cal-accent, var(--green-text)); font-weight: 700; }
.advent-door--revealed { background: var(--cal-tint, rgba(69,117,60,0.1)); }
.advent-door--revealed .advent-door-status { color: var(--cal-accent, var(--green-text)); }

/* ── Calendar themes (presentation layer over the same door mechanics) ──
   Accents are calendar "nouns" like the activity-category colors — never
   reused for status, and all dark enough for ≥4.5:1 text on cream/surface. */
.advent-theme-jul    { --cal-accent: #8A3B2C; --cal-tint: rgba(138,59,44,0.10); }
.advent-theme-paaske { --cal-accent: #8A6420; --cal-tint: rgba(138,100,32,0.12); }
.advent-theme-sommer { --cal-accent: #2E6B4F; --cal-tint: rgba(46,107,79,0.10); }
/* 'klub' theme: no overrides — falls back to the app's green action colors */

.advent-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--cal-tint, var(--green-tint));
  border: 1.5px solid var(--cal-accent, var(--green));
  border-radius: var(--r);
}
.advent-hero-icon { font-size: 26px; line-height: 1; flex-shrink: 0; }
.advent-hero-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 620;
  color: var(--cal-accent, var(--green-text));
  margin-bottom: 2px;
}
.advent-hero-sub { font-size: 13px; color: var(--brown-muted); line-height: 1.4; }
