/* ===== Hero banner ===== */
.hero {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #ffffff 0%, var(--bg-cream) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 20px;
}
.hero-icon {
  width: 56px; height: 56px;
  background: var(--accent-soft);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.hero-title {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}
.hero-sub { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
/* Wegdruk-kruisje voor hero's met data-hero-key (keuze onthouden in localStorage) */
.hero[data-hero-key] { position: relative; }
.hero-dismiss {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px;
  border: none; background: transparent; border-radius: 7px;
  color: var(--ink-mute); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.hero-dismiss:hover { background: var(--bg-warm); color: var(--ink); }

/* ===== Inbox ===== */
.inbox-layout { display: flex; height: 100%; }
.inbox-sidebar {
  width: 200px;
  border-right: 1px solid var(--border);
  padding: 16px 10px;
  background: var(--bg-cream);
  flex-shrink: 0;
  overflow-y: auto;
}
.compose-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: background .1s;
}
.compose-btn:hover { background: var(--accent-hover); }

/* ===== Compose popup (Gmail-style bottom-right) ===== */
.compose-popup {
  position: fixed;
  right: 22px;
  bottom: 0;
  width: 760px;
  max-width: calc(100vw - 44px);
  height: min(720px, calc(100vh - 80px));
  max-height: calc(100vh - 24px);
  background: var(--white);
  border: 1px solid var(--border);
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  display: none;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
}
.compose-popup.open { display: flex; }
.compose-popup.minimized { height: 42px; }
.compose-header {
  display: flex;
  align-items: center;
  padding: 9px 14px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
.compose-header-title { flex: 1; }
.compose-header-actions { display: flex; gap: 6px; }
.compose-header-btn {
  background: transparent;
  border: none;
  color: var(--white);
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  opacity: .85;
}
.compose-header-btn:hover { background: rgba(255,255,255,.12); opacity: 1; }
.compose-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.compose-popup.minimized .compose-body { display: none; }
.compose-field-row {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  border-bottom: 1px solid var(--border-soft);
  gap: 8px;
  font-size: 13px;
}
.compose-field-label {
  color: var(--ink-mute);
  width: 74px;
  flex-shrink: 0;
  font-size: 12px;
  white-space: nowrap;
}
.compose-field-input,
.compose-field-select {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
  padding: 4px 0;
}
.compose-cc-toggle {
  font-size: 11px;
  color: var(--ink-mute);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.compose-cc-toggle:hover { background: var(--bg-warm); color: var(--ink); }
.email-suggest {
  position: fixed;
  z-index: 10000;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  min-width: 240px;
  max-width: 380px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  font-size: 13px;
}
.email-suggest-item {
  display: flex;
  flex-direction: column;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.3;
}
.email-suggest-item:hover,
.email-suggest-item.active {
  background: var(--bg-warm);
}
.email-suggest-name {
  color: var(--ink);
  font-weight: 500;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-suggest-email {
  color: var(--ink-mute);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-suggest-item mark {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 1px;
}
.compose-body-editor {
  flex: 1;
  min-height: 100px;
  overflow-y: auto;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.55;
  outline: none;
  color: var(--ink);
}
.compose-body-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-mute);
}
.compose-attachments {
  padding: 6px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--border-soft);
}
.compose-attachments:empty { display: none; }
.compose-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px;
  color: var(--ink-soft);
}
.compose-attachment-chip .remove {
  cursor: pointer;
  opacity: .6;
  font-weight: 700;
}
.compose-attachment-chip .remove:hover { opacity: 1; color: var(--danger); }

/* Email-detail attachment list */
.email-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 0;
  margin-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.email-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
  text-decoration: none;
  max-width: 280px;
}
.email-attach-chip:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}
.email-attach-chip .att-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.email-attach-chip .att-meta { display: flex; flex-direction: column; min-width: 0; }
.email-attach-chip .att-name {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.email-attach-chip .att-size { color: var(--ink-mute); font-size: 11px; }
.email-attach-chip .att-download {
  margin-left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-mute);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  flex-shrink: 0;
}
.email-attach-chip .att-download:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-soft);
}

/* ===== Attachment viewer overlay ===== */
.att-viewer-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 12, 8, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 32px;
}
.att-viewer-backdrop.open { display: flex; }
.att-viewer {
  width: min(960px, 100%);
  height: min(86vh, 100%);
  background: var(--white);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.att-viewer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-cream);
  flex-shrink: 0;
}
.att-viewer-head .av-icon {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.att-viewer-head .av-title {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.att-viewer-head .av-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.att-viewer-head .av-sub {
  font-size: 11px;
  color: var(--ink-mute);
}
.att-viewer-head .av-action {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.att-viewer-head .av-action:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.att-viewer-head .av-close {
  width: 32px; height: 32px;
  border-radius: 7px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.att-viewer-head .av-close:hover { background: rgba(0,0,0,0.05); color: var(--ink); }
.att-viewer-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f1c18;
  overflow: auto;
  position: relative;
}
.att-viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.att-viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.att-viewer-body audio { width: 80%; }
.att-viewer-body video { max-width: 100%; max-height: 100%; }
.att-viewer-body pre.av-text {
  background: #fff;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 20px;
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  box-sizing: border-box;
}
.att-viewer-body .av-fallback {
  color: #f6f3eb;
  text-align: center;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.att-viewer-body .av-fallback svg { color: rgba(255,255,255,0.5); }
.att-viewer-body .av-fallback .btn {
  background: var(--accent);
  color: #fff;
  padding: 9px 18px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.att-viewer-body .av-fallback .btn:hover { background: #92400e; }
.att-viewer-body .av-loading {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}
.compose-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-cream);
  flex-shrink: 0;
}
.compose-send-group {
  display: inline-flex;
  margin-right: 6px;
  border-radius: 6px;
  overflow: hidden;
}
.compose-send-btn {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 7px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.compose-send-btn:hover { background: var(--accent-hover); }
.compose-send-btn.alt {
  padding: 7px 10px;
  border-left: 1px solid rgba(255,255,255,.25);
}
.compose-fmt-btn {
  width: 28px; height: 28px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
}
.compose-fmt-btn:hover { background: var(--bg-warm); border-color: var(--border); }
.compose-toolbar-spacer { flex: 1; }
.compose-trash {
  width: 28px; height: 28px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-mute);
}
.compose-trash:hover { color: var(--danger); border-color: var(--border); }

/* Schedule picker */
.schedule-popover {
  position: absolute;
  bottom: 56px;
  left: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  display: none;
  z-index: 10;
  width: 480px;
  overflow: hidden;
}
.schedule-popover.open { display: block; }
.schedule-popover-header {
  padding: 12px 16px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--border-soft);
}
.schedule-popover-body {
  display: flex;
  align-items: stretch;
}
.schedule-suggestions {
  flex: 1.1;
  padding: 6px 0;
  border-right: 1px solid var(--border-soft);
  min-height: 200px;
}
.schedule-suggestion {
  padding: 9px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid transparent;
}
.schedule-suggestion:hover { background: var(--bg-warm); border-left-color: var(--accent); }
.schedule-suggestion-main {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.schedule-suggestion-sub {
  font-size: 11px;
  color: var(--ink-mute);
}
.schedule-suggestion.custom .schedule-suggestion-main::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.schedule-custom {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.schedule-custom-title {
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.schedule-custom label {
  font-size: 11px;
  color: var(--ink-mute);
  display: block;
  margin-bottom: 2px;
}
.schedule-custom input {
  width: 100%;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 5px;
  box-sizing: border-box;
}
.schedule-custom input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.schedule-custom .schedule-confirm {
  margin-top: auto;
  width: 100%;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 5px;
  padding: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
}
.schedule-custom .schedule-confirm:hover { background: var(--accent-hover); }
.scheduled-row-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 600;
}
.inbox-folder {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 2px;
}
.inbox-folder:hover { background: var(--bg-warm); }
.inbox-folder.active { background: var(--accent-soft); color: var(--accent); }
.inbox-folder-count { margin-left: auto; font-size: 11px; color: var(--ink-mute); font-weight: 600; }
.inbox-folder.active .inbox-folder-count { color: var(--accent); }
.inbox-section-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  padding: 14px 12px 4px;
}

.inbox-list {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--white);
}
.inbox-toolbar {
  height: 50px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  background: var(--bg-cream);
}
.inbox-toolbar .count { color: var(--ink-mute); font-size: 12px; }
.inbox-search-wrap {
  position: relative;
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
}
.inbox-search-icon {
  position: absolute;
  left: 10px;
  color: var(--ink-mute);
  pointer-events: none;
}
.inbox-search-input {
  width: 100%;
  height: 32px;
  padding: 0 32px 0 30px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.inbox-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.inbox-search-clear {
  position: absolute;
  right: 6px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ink-mute);
  cursor: pointer;
  border-radius: 4px;
}
.inbox-search-clear:hover { background: var(--bg-warm); color: var(--ink); }
.email-account-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--border);
  color: var(--ink-mute);
  margin-left: 5px;
  font-weight: 500;
}
/* ===== Email detail (full-page thread view) ===== */
.email-detail-view {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
}
.email-detail-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}
.detail-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s;
}
.detail-bar-btn:hover { background: var(--bg-warm); }
.detail-bar-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: #fef2f2; }
.email-detail-subject-wrap {
  padding: 22px 32px 10px;
  border-bottom: 1px solid var(--border-soft);
}
.email-detail-subject {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
/* Thread messages */
.thread-msg {
  border-bottom: 1px solid var(--border-soft);
  padding: 16px 32px;
}
.thread-msg-header {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.thread-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white);
}
.thread-sender { font-weight: 600; font-size: 14px; flex: 1; }
.thread-time { font-size: 12px; color: var(--ink-mute); white-space: nowrap; }
.thread-preview {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 4px 0 0 46px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-msg-body { margin: 14px 0 0 46px; }
.thread-msg-meta {
  margin: 10px 0 14px 46px;
  font-size: 12px;
  color: var(--ink-mute);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.thread-msg-meta a { color: var(--accent); text-decoration: none; }
.thread-iframe {
  width: 100%;
  border: none;
  display: block;
}
.thread-reply-actions {
  margin: 18px 0 32px 46px;
  display: flex;
  gap: 8px;
}
.thread-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.thread-reply-btn:hover { background: var(--bg-warm); border-color: var(--accent); }

/* ===== Reply compose panel ===== */
.reply-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  margin: 0 32px 32px 32px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.reply-fields {
  border-bottom: 1px solid var(--border-soft);
}
.reply-field-row {
  display: flex;
  align-items: center;
  padding: 8px 24px;
  border-bottom: 1px solid var(--border-soft);
  gap: 10px;
  font-size: 13px;
}
.reply-field-row:last-child { border-bottom: none; }
.reply-field-label {
  color: var(--ink-mute);
  font-weight: 500;
  width: 36px;
  flex-shrink: 0;
}
.reply-field-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
}
.reply-from-select {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
.reply-body {
  min-height: 140px;
  padding: 14px 24px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  outline: none;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.reply-body:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-mute);
  pointer-events: none;
}
.reply-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px 14px;
  border-top: 1px solid var(--border-soft);
  position: relative;
}
.reply-fmt-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--border); border-radius: 5px;
  background: var(--white); cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s;
}
.reply-fmt-btn:hover { background: var(--bg-warm); }
/* "Toon geciteerde tekst"-knop (in het ouder-document, onder de iframe) */
.crm-quote-toggle {
  font-size: 12px; color: var(--ink-mute);
  cursor: pointer; border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 10px; margin: 8px 0 0;
  background: var(--bg-warm); display: inline-block; font-family: inherit;
  letter-spacing: 1px;
}
.crm-quote-toggle:hover { border-color: var(--accent); color: var(--accent); }
/* Actieve opmaak (vet/cursief/uitlijning/...) zichtbaar maken */
.compose-fmt-btn.active, .reply-fmt-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
/* Rich-text toolbar: lettertype/grootte-selects en kleurknoppen */
.rt-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.rt-select {
  border: 1px solid transparent;
  background-color: transparent;
  font-size: 11.5px;
  color: var(--ink-soft);
  border-radius: 4px;
  height: 28px;
  padding: 3px 20px 3px 5px;
  background-position: right 4px center;
  cursor: pointer;
}
.rt-select:hover { background-color: var(--bg-warm); border-color: var(--border); }
.rt-font { max-width: 105px; }
.rt-color-btn { width: auto !important; padding: 0 4px !important; gap: 0; }
.rt-color-glyph { font-weight: 700; font-size: 12px; line-height: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.rt-color-bar { display: block; width: 13px; height: 3px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); }
/* Kleurkiezer-popover (tekst/achtergrond) */
.rt-color-pop {
  position: fixed; z-index: 4000;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 12px 36px rgba(37,25,19,.16), 0 2px 6px rgba(37,25,19,.06);
  padding: 12px; width: 232px;
}
.rt-color-pop-title { font-size: 12px; font-weight: 600; color: var(--ink-mute); margin-bottom: 8px; }
.rt-color-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.rt-color-swatch {
  width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
  border: 1px solid rgba(0,0,0,0.12); padding: 0; transition: transform 0.1s;
}
.rt-color-swatch:hover { transform: scale(1.12); border-color: var(--ink); }
.rt-color-pop-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.rt-color-none {
  flex: 1; font-size: 12px; color: var(--ink-soft); cursor: pointer;
  background: var(--bg-warm); border: 1px solid var(--border); border-radius: 7px; padding: 6px 8px;
}
.rt-color-none:hover { border-color: var(--accent); color: var(--accent); }
.rt-color-custom {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-soft); cursor: pointer;
  border: 1px solid var(--border); border-radius: 7px; padding: 5px 9px;
}
.rt-color-custom:hover { border-color: var(--accent); color: var(--accent); }
.rt-color-custom-chip { width: 15px; height: 15px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(0,0,0,0.1); }
.rt-color-custom input[type="color"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: none; }
.compose-toolbar { flex-wrap: wrap; row-gap: 4px; }
.reply-toolbar { flex-wrap: wrap; row-gap: 4px; }
/* Gmail-achtige paginering onder de maillijst */
.inbox-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 18px; }
.inbox-pager-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--white); cursor: pointer;
  font-size: 16px; color: var(--ink-soft);
  display: inline-flex; align-items: center; justify-content: center;
}
.inbox-pager-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.inbox-pager-btn:disabled { opacity: 0.4; cursor: default; }
.inbox-pager-label { font-size: 12px; color: var(--ink-mute); }
.reply-toolbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.reply-send-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 18px;
  background: var(--accent); color: var(--white);
  border: none; border-radius: 7px; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  transition: background 0.1s;
}
.reply-send-btn:hover { background: var(--accent-hover); }
.reply-send-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.inbox-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--ink-mute);
  gap: 8px;
  font-size: 13px;
}

.email-row {
  display: grid;
  grid-template-columns: 28px 20px minmax(0, 160px) minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.08s;
}
.star-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  cursor: pointer;
  color: var(--border);
  flex-shrink: 0;
  transition: color .15s, transform .1s;
}
.star-btn:hover { color: #f4b400; transform: scale(1.15); }
.star-btn.starred { color: #f4b400; }
.star-btn svg { pointer-events: none; }
.person-star-cell { text-align: center; padding-right: 0 !important; }
.person-star-btn { display: inline-flex; width: 22px; height: 22px; }
.email-row:hover { background: var(--bg-cream); }
.email-row.unread { background: #fffdf7; }
.email-row.unread .email-sender,
.email-row.unread .email-subject { font-weight: 600; color: var(--ink); }
.email-sender { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-sender-count {
  display: inline-block;
  background: var(--bg-warm);
  color: var(--ink-mute);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 5px;
  font-weight: 600;
}
.email-content { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.email-subject { color: var(--ink); font-weight: 500; }
.email-snippet { color: var(--ink-mute); }
mark.srch-hl { background: #fff3a3; color: inherit; padding: 0 1px; border-radius: 2px; }
.email-meta {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; color: var(--ink-mute); font-size: 12px;
}
.email-time { white-space: nowrap; }
.unread-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

