:root {
  /* Liber Veda — oranje accent, koel licht */
  --accent: #f97316;
  --accent-2: #ea580c;
  --accent-soft: rgba(249, 115, 22, 0.14);
  --teal: #0d9488;
  --bg: #f4f6fb;
  --bg-glow: rgba(249, 115, 22, 0.16);
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --green: var(--accent);
  --green-2: var(--teal);
  --danger: #e11d48;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --surface-3: #f8fafc;
  --hover: #fff4eb;
  --hover-soft: #ffedd5;
  --nav-icon: #64748b;
  --badge: #0284c7;
  --tabs-bg: rgba(244, 246, 251, 0.96);
  --overlay: rgba(15, 23, 42, 0.4);
  --quote-border: #cbd5e1;
  --sign: #334155;
  --cal-cell: #ffffff;
  --cal-head: #f1f5f9;
  --cal-out: #f1f5f9;
  --cal-out-ink: #94a3b8;
  --cal-today: #ffedd5;
  --cal-hover: #fff7ed;
  --cal-out-hover: #e2e8f0;
  --chip0-bg: #ffedd5; --chip0-ink: #9a3412;
  --chip1-bg: #ccfbf1; --chip1-ink: #115e59;
  --chip2-bg: #e0f2fe; --chip2-ink: #075985;
  --chip3-bg: #ede9fe; --chip3-ink: #5b21b6;
  --login-grad: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  --theme-color: #f97316;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
html[data-theme="dark"] {
  /* Liber Veda — navy + oranje (zoals liberveda.eu) */
  --accent: #f97316;
  --accent-2: #fb923c;
  --accent-soft: rgba(249, 115, 22, 0.18);
  --teal: #2dd4bf;
  --bg: #060913;
  --bg-glow: rgba(249, 115, 22, 0.18);
  --card: #0d1527;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.09);
  --green: var(--accent);
  --green-2: var(--teal);
  --danger: #f87171;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --surface: #101827;
  --surface-2: #0a101c;
  --surface-3: #0d1527;
  --hover: rgba(249, 115, 22, 0.16);
  --hover-soft: rgba(249, 115, 22, 0.22);
  --nav-icon: #94a3b8;
  --badge: #38bdf8;
  --tabs-bg: rgba(6, 9, 19, 0.96);
  --overlay: rgba(0, 0, 0, 0.55);
  --quote-border: rgba(255, 255, 255, 0.14);
  --sign: #cbd5e1;
  --cal-cell: #0d1527;
  --cal-head: #0a101c;
  --cal-out: #080d18;
  --cal-out-ink: #64748b;
  --cal-today: rgba(249, 115, 22, 0.2);
  --cal-hover: rgba(249, 115, 22, 0.14);
  --cal-out-hover: #101827;
  --chip0-bg: rgba(249, 115, 22, 0.28); --chip0-ink: #fed7aa;
  --chip1-bg: rgba(45, 212, 191, 0.22); --chip1-ink: #99f6e4;
  --chip2-bg: rgba(56, 189, 248, 0.22); --chip2-ink: #bae6fd;
  --chip3-bg: rgba(168, 85, 247, 0.22); --chip3-ink: #e9d5ff;
  --login-grad: linear-gradient(180deg, #0d1527 0%, #060913 100%);
  --theme-color: #060913;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

/* Scrollen mag, zichtbare scrollbalken niet */
.main,
.drawer-panel,
.reader-scroll,
.cal-day-panel,
.sheet,
body.is-desktop-web {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.main::-webkit-scrollbar,
.drawer-panel::-webkit-scrollbar,
.reader-scroll::-webkit-scrollbar,
.cal-day-panel::-webkit-scrollbar,
.sheet::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none;
}
body {
  background:
    radial-gradient(900px 520px at 8% -8%, var(--bg-glow), transparent 60%),
    var(--bg);
  color: var(--ink);
}
/* Geen aparte statusbalk-kleur; veiligheidsgebied volgt app-achtergrond */
html, body {
  background-color: var(--bg);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.app {
  width: min(480px, 100%);
  margin: 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 8px;
}
.top-titles { flex: 1; min-width: 0; }
.top h1 { margin: 0; font-size: 1.45rem; letter-spacing: -0.03em; }
.top p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-btn,
.qr-btn {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}
.menu-btn svg,
.qr-btn svg { width: 22px; height: 22px; }
.qr-btn {
  border-radius: 10px;
}
.qr-btn:active {
  background: var(--accent-soft);
}
body.is-webmail-gate .qr-btn {
  display: none !important;
}
.top-action {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 8px 14px;
  font-size: 0.9rem;
  border-radius: 10px;
  margin-left: 4px;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.theme-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--nav-icon);
  display: grid;
  place-items: center;
  padding: 0;
}
.theme-btn svg {
  width: 18px;
  height: 18px;
}
.theme-btn:hover {
  color: var(--ink);
  background: var(--hover);
}
.theme-btn.is-on {
  background: var(--surface);
  color: var(--green);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
html[data-theme="dark"] .theme-btn.is-on {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 7;
  display: flex;
}
.drawer-backdrop {
  flex: 1;
  border: 0;
  background: var(--overlay);
  padding: 0;
}
.drawer-panel {
  width: min(320px, 88vw);
  height: 100%;
  overflow: auto;
  background: var(--surface-2);
  box-shadow: 8px 0 28px rgba(28, 25, 21, 0.12);
  padding-bottom: 28px;
}
.drawer-head { padding: calc(8px + env(safe-area-inset-top)) 6px 4px; }
.nav-section,
.account-row,
.account-add {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 11px 14px;
  font-weight: 700;
}
.account-row span:last-child,
.nav-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-row-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.account-row-text strong {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.account-row-text small {
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.account-row-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}
.account-row-wrap .account-row {
  flex: 1;
  min-width: 0;
}
.account-row-wrap.is-hidden-from-all .account-row {
  opacity: 0.55;
}
.settings-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin: 0 0 12px;
}
.settings-box legend {
  padding: 0 6px;
  font-weight: 700;
  color: var(--green);
}
.settings-mail-list {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.settings-fold {
  padding: 0;
  overflow: hidden;
}
.settings-fold-head {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px 14px;
  user-select: none;
}
.settings-fold-head::-webkit-details-marker { display: none; }
.settings-fold-chev {
  flex: 0 0 auto;
  width: 1rem;
  color: var(--nav-icon);
  font-size: 1.05rem;
  line-height: 1;
  transition: transform .15s ease;
}
.settings-fold[open] > .settings-fold-head .settings-fold-chev {
  transform: rotate(90deg);
}
.settings-fold-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.settings-fold-text strong {
  font-weight: 700;
  font-size: 0.95rem;
}
.settings-fold-text small {
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.settings-fold-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}
.settings-fold-body label:first-child { margin-top: 10px; }
.check-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  margin: 4px 0 8px;
}
.check-line input {
  width: auto;
  margin-top: 3px;
}
.chev { width: 1rem; color: var(--nav-icon); flex: 0 0 auto; }
.nav-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 16px 8px 38px;
  font-weight: 600;
}
.nav-row.sub { padding-left: calc(38px + (var(--depth, 0) * 12px)); }
.nav-row.is-on { background: var(--hover); }
.nav-row b { margin-left: auto; color: var(--badge); }
.nav-icon { width: 18px; height: 18px; flex: 0 0 auto; color: var(--nav-icon); }
.nav-row.is-on .nav-icon { color: var(--green); }
.account-add { margin-top: 14px; }
.drawer-head-mobile {
  display: flex;
  align-items: center;
  gap: 4px;
}
.drawer-head-spacer { flex: 1; }
.drawer-more-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--nav-icon);
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}
.drawer-more-btn svg {
  width: 20px;
  height: 20px;
}
.drawer-more-btn:hover,
.drawer-more-btn:focus-visible {
  background: var(--hover);
  color: var(--green);
}
.drawer-empty-hint {
  margin: 12px 14px;
  line-height: 1.4;
}
.folder-menu-pop button.is-danger {
  color: var(--danger);
}
.nav-folder {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}
.nav-folder .nav-row {
  flex: 1;
  min-width: 0;
}
.nav-folder.is-hidden-from-all .nav-row {
  opacity: 0.55;
}
.folder-menu-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-right: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
}
.folder-menu-btn:hover,
.folder-menu-btn:focus-visible {
  background: var(--hover);
  color: var(--ink);
}
.folder-menu-pop {
  position: fixed;
  z-index: 40;
  min-width: 190px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cal-cell);
  box-shadow: 0 12px 28px rgba(28, 25, 21, 0.16);
}
.folder-menu-pop button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  font-weight: 650;
}
.folder-menu-pop button:hover {
  background: var(--hover-soft);
  color: var(--green);
}

.icon-btn, .primary, .ghost, .danger {
  border: 0;
  border-radius: 999px;
}
.icon-btn {
  width: 42px;
  height: 42px;
  background: var(--green);
  color: white;
  font-size: 1.4rem;
  line-height: 1;
}
.primary, .ghost, .danger {
  padding: 12px 16px;
  font-weight: 600;
}
.primary { background: var(--green); color: white; }
.ghost { background: transparent; border: 1px solid var(--line); }
.danger { background: transparent; color: var(--danger); }

.main {
  padding: 8px 16px 24px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.card, .row, .sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.empty {
  margin-top: 28px;
  padding: 28px 22px;
  text-align: center;
}
.empty h2 { margin: 0 0 8px; font-size: 1.35rem; }
.empty p { margin: 0 0 18px; color: var(--muted); line-height: 1.45; }
.hb-preset { text-align: left; margin: 0 0 16px; padding-left: 1.1rem; line-height: 1.6; }

.mail-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.mail-bar .chips { flex: 1; min-width: 0; margin: 0; padding-bottom: 0; }
.folder-btn {
  flex: 0 0 auto;
  max-width: 46%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sheet .folders { margin: 8px 0 12px; }

.folders {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 8px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.folder {
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 11px 12px;
  padding-left: calc(12px + (var(--depth, 0) * 14px));
  font-weight: 700;
}
.folder.sub { font-weight: 600; color: var(--green); }
.folder.is-on { background: var(--green); color: white; }
.folder-tools { display: flex; gap: 8px; margin-bottom: 8px; }
.folder-tools button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.88rem;
}
.move-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.move-list button,
.move-list .move-item {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  padding-left: calc(12px + (var(--depth, 0) * 14px));
  font-weight: 700;
}
.move-list .move-item.is-sub { font-weight: 600; color: var(--green); }
.move-section {
  margin: 12px 0 2px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.rule {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.rule-list { margin-bottom: 8px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 12px;
  white-space: nowrap;
}
.chip.is-on { background: var(--green); color: white; border-color: var(--green); }

.msg {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 14px 2px;
}
.msg strong { display: block; }
.msg span, .meta { color: var(--muted); font-size: 0.92rem; }
.msg em { font-style: normal; font-weight: 600; }
.msg.is-read em { font-weight: 500; color: var(--muted); }

.reader h2.reader-subject { margin: 4px 0 16px; }
.frame {
  width: 100%;
  max-width: 720px;
  min-height: 240px;
  border: 0;
  background: #fff;
  border-radius: 12px;
}
.plain {
  max-width: 720px;
  white-space: pre-wrap;
  line-height: 1.5;
}

.tabs {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 6;
  width: min(480px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--tabs-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  pointer-events: auto;
}
.tabs button {
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 8px 4px;
  color: var(--muted);
  font-weight: 600;
}
.tabs button.is-on { background: var(--surface); color: var(--green); }

.sheet-wrap {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 9;
}
.sheet {
  width: min(480px, 100%);
  border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  max-height: 92dvh;
  overflow: auto;
}
.providers { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
label { display: block; font-size: 0.86rem; color: var(--muted); margin: 10px 0 4px; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
}
textarea { min-height: 120px; resize: vertical; }
.hint { color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.error { color: var(--danger); font-size: 0.92rem; }
.actions { display: flex; gap: 8px; margin-top: 14px; }
.actions > * { flex: 1; }
.hidden { display: none !important; }

.text-danger {
  border: 0;
  background: transparent;
  color: var(--danger);
  padding: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.inbox { padding-bottom: 16px; }
.swipe-hint { margin: 0 0 8px; font-size: 0.82rem; }

.inbox-toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  margin: 0 0 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.inbox-toolbar::-webkit-scrollbar { display: none; }
.inbox-toolbar .tool-btn {
  border: 1px solid var(--line);
  background: var(--surface, var(--cal-cell, #fff));
  color: var(--ink);
  border-radius: 10px;
  padding: 7px 10px;
  font-weight: 650;
  font-size: 0.84rem;
  flex: 0 0 auto;
}
.inbox-toolbar .tool-btn.tool-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 12px;
}
.inbox-toolbar .tool-btn.tool-icon.ghost {
  width: auto;
  min-width: 40px;
  padding: 0 8px;
  gap: 2px;
  grid-auto-flow: column;
}
.inbox-toolbar .tool-count {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.inbox-toolbar .tool-btn:disabled {
  opacity: 0.4;
}
.inbox-toolbar .tool-btn.ghost {
  background: transparent;
}
.inbox-toolbar .tool-hint {
  margin-left: 4px;
  white-space: nowrap;
  font-size: 0.78rem;
}
@media (max-width: 420px) {
  .inbox-toolbar .tool-btn.tool-icon {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
  }
}
.msg-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  z-index: 1;
  background: var(--bg, #f4f1ea);
}
html[data-theme="dark"] .msg-row {
  background: var(--bg);
}
.msg-avatar-select {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  align-self: center;
  margin: 0 4px 0 2px;
  border: 2px solid transparent;
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: manipulation;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}
.msg-avatar-select:hover,
.msg-avatar-select:focus-visible {
  border-color: color-mix(in srgb, var(--green) 55%, transparent);
}
.msg-avatar-select.is-selected {
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 28%, transparent);
  background: var(--green);
  color: #fff;
  font-weight: 800;
}
.msg-avatar-select.is-selected::after {
  content: '✓';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.65rem;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg, #fff);
}
.msg-trash-btn {
  flex: 0 0 auto;
  width: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.05rem;
  align-self: stretch;
}
.msg-trash-btn:hover,
.msg-trash-btn:focus-visible {
  color: var(--danger, #b42318);
  background: var(--hover);
}
.swipe-row.is-selected .msg-row {
  background: transparent;
}
.swipe-row.is-selected .msg-body em {
  color: var(--green);
}
.swipe-row.is-pinned .msg strong {
  font-weight: 700;
}
.msg-flag.is-star,
.msg-flag.is-pin {
  color: var(--green);
}
.swipe-row {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  touch-action: pan-y;
}
.swipe-trash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 18px;
  background: #b42318;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none; /* anders blokkeert deze laag muisklikken op rondje/prullenbak (web) */
  transition: opacity .12s ease;
}
.swipe-row.is-swiping .swipe-trash { opacity: 1; }
.swipe-row.is-right .swipe-trash { justify-content: flex-start; }
.swipe-row.is-left .swipe-trash { justify-content: flex-end; }

.msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 2px;
  position: relative;
  z-index: 1;
  background: transparent;
  border-bottom: 0;
  will-change: transform;
  touch-action: pan-y;
  flex: 1;
  min-width: 0;
  text-align: left;
  border: 0;
  color: inherit;
  font: inherit;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--hover-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: 0 0 auto;
}

.msg-body { min-width: 0; flex: 1; }
.msg-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.msg-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.msg-line time {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}
.msg-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1em;
  color: var(--green);
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 700;
}
.msg-flag.is-answered {
  opacity: 0.95;
}
.msg strong {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg:not(.is-read) em,
.msg:not(.is-read) strong { font-weight: 700; }
.msg.is-answered:not(.is-read) .msg-flag { color: var(--green); }

.fab {
  position: fixed;
  right: max(16px, calc(50vw - 240px + 16px));
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 3;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: white;
  font-weight: 700;
  padding: 14px 18px;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.32);
}

body.is-reading .tabs,
body.is-composing .tabs { display: none; }
body.is-reading .app,
body.is-composing .app {
  padding-bottom: 0;
  overflow: hidden;
}

.reader {
  position: fixed;
  inset: 0;
  z-index: 4;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.reader-top,
.composer-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.reader-top {
  justify-content: space-between;
  padding-bottom: 8px;
}

.composer-top h2 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  margin-right: 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.reader-top-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.reader-top-sep {
  width: 1px;
  height: 18px;
  margin: 0 6px;
  background: var(--line);
  flex: 0 0 auto;
}

.reader-tool {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.reader-tool svg,
.back svg {
  width: 20px;
  height: 20px;
  display: block;
}
.reader-tool:hover,
.reader-tool:focus-visible {
  background: var(--surface-2);
}
.reader-tool.is-on {
  color: var(--accent);
  background: var(--accent-soft);
}
.reader-tool.is-danger:hover,
.reader-tool.is-danger:focus-visible {
  color: var(--danger, #b42318);
  background: color-mix(in srgb, var(--danger, #b42318) 12%, transparent);
}

.back {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.back:hover,
.back:focus-visible {
  background: var(--surface-2);
}

.reader-scroll {
  flex: 1;
  overflow: auto;
  padding: 16px 18px 20px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  box-sizing: border-box;
}

.reader-subject {
  margin: 0 0 18px;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  color: var(--ink);
}

.who {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.who-text {
  min-width: 0;
  flex: 1;
}
.who-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.who-text strong {
  display: block;
  font-size: 1rem;
  min-width: 0;
  overflow-wrap: break-word;
}
.who-when {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.who-from,
.who-to {
  margin-top: 2px;
}

@media (min-width: 900px) {
  .reader-top {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    border-bottom: 0;
    background: transparent;
  }
  .reader {
    background: var(--bg);
  }
  .reader-scroll {
    padding-top: 8px;
    padding-bottom: 28px;
  }
}
.reader-body {
  min-width: 0;
  padding-top: 4px;
}

.reader-menu {
  position: relative;
  flex-shrink: 0;
}

.reader-menu .reader-tool[aria-expanded="true"] {
  background: var(--surface-2);
}

.reader-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 8;
  min-width: 220px;
  padding: 6px;
  border-radius: 14px;
  background: var(--card, #fff);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  display: grid;
  gap: 2px;
}

.reader-menu-panel.hidden { display: none; }

.reader-menu-panel button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 11px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: inherit;
}

.reader-menu-panel button:active,
.reader-menu-panel button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.reader-menu-panel button.is-danger {
  color: #b42318;
}

.composer {
  position: fixed;
  inset: 0;
  z-index: 6;
  background: var(--card);
}

.composer-form {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.composer-top .draft-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  padding: 9px 12px;
  flex: 0 0 auto;
}
.composer-top .draft-btn:disabled { opacity: 0.65; }
.composer-top .send {
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: white;
  font-weight: 700;
  padding: 10px 14px;
  margin-right: 6px;
  flex: 0 0 auto;
}

.composer-top .send:disabled { opacity: 0.65; }

.composer-fields .line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.composer-fields .line span {
  width: 5.2rem;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.92rem;
}

.composer-fields input,
.composer-fields select {
  border: 0;
  border-radius: 0;
  padding: 14px 0;
  background: transparent;
  width: 100%;
  color: inherit;
  font: inherit;
}

.line-tools {
  justify-content: flex-start;
  gap: 14px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.linkish {
  border: 0;
  background: transparent;
  color: var(--green-2);
  font-weight: 700;
  padding: 8px 0;
}

.compose-attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-3, var(--surface));
}
.compose-attach-list.hidden { display: none; }
.compose-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 8px 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface, var(--card));
  font-size: 0.82rem;
  font-weight: 600;
}
.compose-attach-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}
.compose-attach-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.format-bar {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-3);
}
.format-bar button {
  flex: 0 0 auto;
  min-width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  font-weight: 700;
  padding: 0 8px;
}
.format-bar button.is-on { background: var(--green); color: white; }
.format-bar .fmt-i { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 800; }
.emoji-pop {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.emoji-pop button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 1.25rem;
}
.composer-body {
  flex: 1;
  min-height: 140px;
  overflow: auto;
  padding: 16px;
  line-height: 1.5;
  outline: none;
}
.composer-body:empty:before {
  content: attr(data-placeholder);
  color: var(--muted);
}
.composer-body .hb-sign { margin-top: 12px; color: var(--sign); }
.composer-body blockquote {
  margin: 14px 0 0;
  padding-left: 10px;
  border-left: 3px solid var(--quote-border);
  color: var(--muted);
}

#composerError { margin: 0 16px 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  z-index: 12;
  width: min(420px, calc(100% - 28px));
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast:not(.hidden) {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.toast.is-ok {
  border-color: var(--green-2);
  background: var(--hover-soft);
  color: var(--green);
}
.toast.is-warn {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, var(--card));
  color: var(--danger);
}

.dialog-wrap {
  position: fixed;
  inset: 0;
  z-index: 14;
  display: grid;
  place-items: end center;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
.dialog-wrap.hidden { display: none; }
.dialog-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: var(--overlay);
  padding: 0;
  animation: dialogFade .18s ease;
}
.dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px 18px 16px;
  animation: dialogRise .22s ease;
}
.dialog h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--green);
}
.dialog-text {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.45;
}
.dialog-field {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  font-weight: 600;
}
.dialog-field.hidden { display: none; }
.dialog-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface);
}
.dialog .actions { margin-top: 4px; }
.dialog .primary.is-danger {
  background: var(--danger);
}
@keyframes dialogFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes dialogRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.person, .event, .group-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.event-pick {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.event-pick:hover strong { color: var(--green); }
.event-pick .meta { display: block; }
.section-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.group-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  background: var(--hover-soft);
  border-radius: 999px;
  padding: 2px 8px;
}
.compose-groups {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 0 10px;
}
.compose-groups-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-right: 2px;
}
.event-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.event-notes {
  white-space: pre-wrap;
  margin-top: 4px;
}
.cal-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: 100%;
  flex: 1;
}
.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
}
.cal-new {
  padding: 9px 14px;
  font-size: 0.92rem;
  border-radius: 10px;
  white-space: nowrap;
}
.cal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.cal-arrow {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  display: grid;
  place-items: center;
}
.cal-month-label {
  min-width: 9.5rem;
  text-align: center;
  font-size: 0.98rem;
  text-transform: capitalize;
}
.cal-today-btn {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
}
.cal-month {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--cal-cell);
}
.cal-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--cal-head);
  flex: 0 0 auto;
}
.cal-dow {
  padding: 7px 4px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cal-weeks {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(var(--cal-rows, 5), minmax(0, 1fr));
}
.cal-cell {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--cal-cell);
  padding: 4px 4px 3px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.is-out {
  background: var(--cal-out);
  color: var(--cal-out-ink);
}
.cal-cell.is-today {
  background: var(--cal-today);
}
.cal-cell.is-on {
  box-shadow: inset 0 0 0 2px var(--green);
  z-index: 1;
}
.cal-cell:hover {
  background: var(--cal-hover);
}
.cal-cell.is-out:hover {
  background: var(--cal-out-hover);
}
.cal-num {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
  align-self: flex-start;
}
.cal-cell.is-today .cal-num {
  background: var(--green);
  color: #fff;
  border-radius: 999px;
}
.cal-events {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-chip {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-chip.tone-0 { background: var(--chip0-bg); color: var(--chip0-ink); }
.cal-chip.tone-1 { background: var(--chip1-bg); color: var(--chip1-ink); }
.cal-chip.tone-2 { background: var(--chip2-bg); color: var(--chip2-ink); }
.cal-chip.tone-3 { background: var(--chip3-bg); color: var(--chip3-ink); }
.cal-more {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0 2px;
}
.main:has(.cal-view) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dow { color: var(--muted); font-size: 0.75rem; }

.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 3.2rem; box-sizing: border-box; }
.pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--green, #f97316);
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}
.pw-toggle svg { width: 1.35rem; height: 1.35rem; display: block; }
.pw-toggle.is-on { color: var(--accent, #c45c26); }
.pw-toggle:focus-visible { outline: 2px solid var(--green, #f97316); outline-offset: 2px; }

.msg-flag.is-clip {
  opacity: 0.85;
  font-size: 0.85rem;
}
.attach-panel {
  margin: 0 0 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.attach-panel strong {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
}
.attach-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.attach-files li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
}
.attach-name {
  font-weight: 600;
  min-width: 0;
  word-break: break-word;
}
.attach-size {
  color: var(--muted);
  font-size: 0.8rem;
}
.attach-btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}

/* Desktop webmail (mail.liberveda.eu) — volledige breedte */
body.is-desktop-web {
  overflow: hidden;
  height: 100%;
}
body.is-desktop-web .app {
  width: 100%;
  max-width: none;
  margin: 0;
  height: 100dvh;
  max-height: 100dvh;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  overflow: hidden;
}
body.is-desktop-web .main {
  overflow-y: auto;
  width: 100%;
  max-width: none;
}

/* Vaste map-zijbalk helemaal links + inhoud vult de rest */
body.is-desktop-web.is-mail-sidebar .app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  max-width: none;
  margin: 0;
}
body.is-desktop-web.is-mail-sidebar .top {
  grid-column: 2;
  grid-row: 1;
  padding-left: 20px;
  padding-right: 20px;
}
body.is-desktop-web.is-mail-sidebar .main {
  grid-column: 2;
  grid-row: 2;
  padding-left: 20px;
  padding-right: 20px;
  width: 100%;
  max-width: none;
}
body.is-desktop-web.is-mail-sidebar #drawer {
  grid-column: 1;
  grid-row: 1 / -1;
  position: relative;
  inset: auto;
  z-index: 1;
  display: block !important;
  height: 100%;
  width: 100%;
  margin: 0;
}
body.is-desktop-web.is-mail-sidebar .drawer-backdrop {
  display: none !important;
}
body.is-desktop-web.is-mail-sidebar .drawer-panel {
  width: 100%;
  height: 100%;
  max-width: none;
  box-shadow: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-2);
  overflow: auto;
  padding-bottom: 20px;
}
body.is-desktop-web.is-mail-sidebar .menu-btn {
  display: none !important;
}
body.is-desktop-web.is-mail-sidebar .drawer-head-static {
  padding: 14px 12px 10px;
}
body.is-desktop-web.is-mail-sidebar .drawer-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
body.is-desktop-web.is-mail-sidebar .drawer-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
body.is-desktop-web.is-mail-sidebar .drawer-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
body.is-desktop-web.is-mail-sidebar .drawer-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
body.is-desktop-web.is-mail-sidebar .drawer-more-btn {
  width: 42px;
  height: 42px;
}
body.is-desktop-web.is-mail-sidebar .drawer-tab {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--nav-icon);
  display: grid;
  place-items: center;
  padding: 0;
}
body.is-desktop-web.is-mail-sidebar .drawer-tab svg {
  width: 22px;
  height: 22px;
}
body.is-desktop-web.is-mail-sidebar .drawer-tab:hover {
  background: var(--hover);
  color: var(--green);
}
body.is-desktop-web.is-mail-sidebar .drawer-tab.is-on {
  background: var(--hover);
  color: var(--green);
}
body.is-desktop-web.is-mail-sidebar .tabs {
  display: none !important;
}
body.is-desktop-web.is-mail-sidebar .app {
  padding-bottom: 12px;
}
body.is-desktop-web.is-mail-sidebar .qr-btn,
body.is-desktop-web.is-mail-sidebar .fab,
body.is-desktop-web.is-mail-sidebar .cal-new,
body.is-desktop-web.is-mail-sidebar [data-action="add-contact"],
body.is-desktop-web.is-mail-sidebar .actions:has([data-action="add-contact"]) {
  display: none !important;
}
body.is-desktop-web.is-mail-sidebar .nav-folder .nav-row.sub {
  padding-left: calc(28px + (var(--depth, 0) * 12px));
}
body.is-desktop-web.is-mail-sidebar .folder-menu-btn {
  opacity: 1;
}
body.is-desktop-web.is-mail-sidebar .account-row-wrap .folder-menu-btn,
body.is-desktop-web.is-mail-sidebar .nav-folder .folder-menu-btn {
  color: var(--muted);
}
body.is-desktop-web.is-mail-sidebar .account-row-wrap:hover .folder-menu-btn,
body.is-desktop-web.is-mail-sidebar .nav-folder:hover .folder-menu-btn,
body.is-desktop-web.is-mail-sidebar .folder-menu-btn:focus-visible {
  color: var(--ink);
  background: var(--hover);
}
body.is-desktop-web.is-mail-sidebar .swipe-hint {
  display: none;
}
body.is-desktop-web .cal-toolbar {
  gap: 12px;
}
body.is-desktop-web .cal-chip {
  font-size: 0.74rem;
  padding: 3px 6px;
}
body.is-desktop-web .cal-num {
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.84rem;
}
body.is-desktop-web .cal-dow {
  padding: 9px 4px;
  font-size: 0.78rem;
}
body.is-desktop-web .tabs {
  left: 0;
  right: 0;
  transform: none;
  width: 100%;
  max-width: none;
  padding-left: 16px;
  padding-right: 16px;
}
body.is-desktop-web.is-mail-sidebar .tabs {
  /* tabs over de volle breedte onder mappen + inhoud */
  width: 100%;
}
body.is-webmail-gate .tabs,
body.is-webmail-gate .menu-btn,
body.is-webmail-gate #drawer {
  display: none !important;
}
body.is-webmail-gate .app {
  width: min(480px, 100%);
  padding-bottom: 32px;
}
body.is-webmail-gate .top-titles h1 {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.web-login-card {
  text-align: center;
  max-width: 420px;
  margin: 28px auto;
  padding: 28px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--login-grad);
  box-shadow: var(--shadow);
}
.web-login-brand {
  margin: 0 0 6px;
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--green);
}
.web-login-card h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}
.web-login-card > p {
  margin: 0 auto 8px;
  max-width: 32ch;
  color: var(--muted);
  line-height: 1.45;
}
.web-login-qr {
  display: grid;
  place-items: center;
  margin: 18px auto 8px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  width: fit-content;
}
.web-login-qr img {
  display: block;
  width: 260px;
  height: 260px;
}
.web-login-code {
  font-size: 1.2rem;
  letter-spacing: 0.14em;
}
.attach-panel {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
}
.attach-files {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.attach-files li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.attach-name {
  font-weight: 600;
  flex: 1 1 140px;
  word-break: break-word;
}
.attach-size {
  color: var(--muted);
  font-size: 0.85rem;
}
.attach-btn {
  padding: 6px 10px;
}

.qr-scan-wrap {
  position: relative;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #060913;
}
.qr-scan-wrap video {
  display: block;
  width: 100%;
  height: min(52vh, 420px);
  object-fit: cover;
  background: #060913;
  /* Geen standaard WebView play-knop */
  -webkit-appearance: none;
}
.qr-scan-wrap video::-webkit-media-controls-start-playback-button,
.qr-scan-wrap video::-webkit-media-controls,
.qr-scan-wrap video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}
.qr-scan-brand {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 10px;
  background: #060913;
  color: #f8fafc;
  pointer-events: none;
  transition: opacity .25s ease;
}
.qr-scan-brand img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  background: #070b14;
}
.qr-scan-brand span {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}
.qr-scan-wrap.is-live .qr-scan-brand {
  opacity: 0;
  visibility: hidden;
}
.qr-scan-wrap .meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 10px 12px;
  color: #f4f1ea;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  font-size: 0.9rem;
  text-align: center;
}
.qr-viewfinder {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(78%, 280px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(249, 115, 22, 0.9);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18);
}
.qr-scan-active .qr-viewfinder { display: block; }
.qr-manual {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}
.qr-manual summary {
  cursor: pointer;
  padding: 6px 0;
  color: var(--muted);
}
.qr-manual[open] summary { margin-bottom: 8px; }
.qr-manual input {
  width: 100%;
}
