.drv2m-workspace {
  --drv2m-black: #050807;
  --drv2m-deep: #07110f;
  --drv2m-card: #ffffff;
  --drv2m-surface: #f4f9f7;
  --drv2m-teal: #14b8a6;
  --drv2m-teal-dark: #0b4f49;
  --drv2m-border: rgba(20, 92, 83, 0.18);
  --drv2m-muted: #63716d;
  --drv2m-danger: #a53232;
  color: #101817;
  background: var(--drv2m-surface);
  border: 1px solid var(--drv2m-border);
  border-radius: 24px;
  min-width: 0;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(2, 15, 12, 0.1);
}

.drv2m-workspace *,
.drv2m-workspace *::before,
.drv2m-workspace *::after {
  box-sizing: border-box;
}

.drv2m-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  color: #fff;
  background:
    radial-gradient(circle at 78% -30%, rgba(45, 212, 191, 0.24), transparent 42%),
    linear-gradient(112deg, var(--drv2m-black), var(--drv2m-teal-dark));
}

.drv2m-hero h2,
.drv2m-thread-header h3,
.drv2m-composer h3 {
  margin: 0;
  line-height: 1.12;
}

.drv2m-hero p,
.drv2m-thread-header p {
  margin: 8px 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.72);
}

.drv2m-eyebrow {
  margin: 0 0 8px !important;
  color: var(--drv2m-teal) !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.drv2m-hero__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.drv2m-hero__actions > span,
.drv2m-source-badge,
.drv2m-safety {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid rgba(153, 246, 228, 0.24);
  border-radius: 999px;
  color: #d9fff8;
  background: rgba(20, 184, 166, 0.12);
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.drv2m-button,
.drv2m-message__actions button,
.drv2m-thread {
  appearance: none;
  border: 0;
  font: inherit;
}

.drv2m-button,
.drv2m-message__actions button {
  min-height: 44px;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.drv2m-button.is-primary {
  color: #02100e;
  background: #55e5d1;
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.2);
}

.drv2m-button.is-secondary,
.drv2m-message__actions button {
  color: #0a514a;
  border: 1px solid var(--drv2m-border);
  background: #fff;
}

.drv2m-button:hover,
.drv2m-message__actions button:hover {
  transform: translateY(-1px);
}

.drv2m-button:focus-visible,
.drv2m-message__actions button:focus-visible,
.drv2m-thread:focus-visible,
.drv2m-composer input:focus-visible,
.drv2m-composer textarea:focus-visible,
.drv2m-composer input[type="checkbox"]:focus-visible,
.drv2m-draft-panel summary:focus-visible {
  outline: 3px solid rgba(20, 184, 166, 0.42);
  outline-offset: 3px;
}

.drv2m-button:disabled {
  cursor: not-allowed;
  opacity: .48;
  filter: saturate(.35);
}

.drv2m-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  min-height: 680px;
}

.drv2m-sidebar {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--drv2m-border);
  background: rgba(255, 255, 255, 0.78);
}

.drv2m-thread-list,
.drv2m-attachments,
.drv2m-drafts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.drv2m-thread-list {
  display: grid;
  gap: 8px;
}

.drv2m-thread {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 92px;
  padding: 14px;
  text-align: left;
  color: #20302d;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
}

.drv2m-thread:hover {
  background: #eff8f5;
}

.drv2m-thread.is-active {
  color: #062f2b;
  border-color: rgba(20, 184, 166, 0.28);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.13), rgba(153, 246, 228, 0.08));
  box-shadow: inset 3px 0 var(--drv2m-teal);
}

.drv2m-thread > span,
.drv2m-thread small,
.drv2m-message,
.drv2m-attachment,
.drv2m-drafts li,
.drv2m-preview dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.drv2m-thread__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.drv2m-thread small,
.drv2m-muted,
.drv2m-address-line,
.drv2m-drafts small,
.drv2m-attachment small {
  color: var(--drv2m-muted);
}

.drv2m-unread {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--drv2m-teal-dark);
  font-size: 0.72rem;
}

.drv2m-content {
  min-width: 0;
  padding: 24px;
}

.drv2m-thread-header,
.drv2m-composer > header,
.drv2m-preview > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.drv2m-thread-header {
  padding: 20px 22px;
  color: #fff;
  border-radius: 18px;
  background: linear-gradient(116deg, #050807, #0b4f49);
}

.drv2m-source-badge {
  flex: 0 0 auto;
}

.drv2m-messages {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}

.drv2m-message {
  width: min(88%, 820px);
  padding: 18px 20px;
  border: 1px solid var(--drv2m-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(5, 35, 29, 0.05);
}

.drv2m-message.is-outbound {
  justify-self: end;
  border-color: rgba(20, 184, 166, 0.3);
  background: #eefaf7;
}

.drv2m-message header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--drv2m-muted);
  font-size: 0.76rem;
}

.drv2m-message h4 {
  margin: 12px 0 6px;
}

.drv2m-direction {
  color: #0a675e;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.drv2m-address-line {
  margin: 0 0 14px;
  font-size: 0.8rem;
}

.drv2m-message__body {
  color: #24322f;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.drv2m-message__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.drv2m-message__actions button {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 0.8rem;
}

.drv2m-attachments {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.drv2m-attachment {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(20, 92, 83, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.drv2m-attachment.is-blocked {
  border-color: rgba(165, 50, 50, 0.25);
  background: #fff6f6;
}

.drv2m-attachment__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: var(--drv2m-teal-dark);
}

.drv2m-attachment__body {
  display: grid;
  gap: 2px;
}

.drv2m-danger {
  color: var(--drv2m-danger) !important;
}

.drv2m-draft-panel,
.drv2m-composer,
.drv2m-preview {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--drv2m-border);
  border-radius: 18px;
  background: #fff;
}

.drv2m-draft-panel summary {
  min-height: 44px;
  cursor: pointer;
  font-weight: 800;
}

.drv2m-draft-panel summary span {
  margin-left: 8px;
  color: var(--drv2m-teal-dark);
}

.drv2m-drafts {
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.drv2m-drafts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--drv2m-surface);
}

.drv2m-drafts li > span {
  display: grid;
  gap: 3px;
}

.drv2m-drafts li > span:last-child {
  text-align: right;
}

.drv2m-composer > header {
  margin-bottom: 16px;
}

.drv2m-safety {
  color: #0a675e;
  border-color: rgba(20, 184, 166, 0.26);
  background: rgba(20, 184, 166, 0.1);
}

.drv2m-composer form,
.drv2m-composer label {
  display: grid;
  gap: 7px;
}

.drv2m-composer form {
  gap: 13px;
}

.drv2m-composer label,
.drv2m-proposals legend {
  color: #35443f;
  font-size: 0.82rem;
  font-weight: 700;
}

.drv2m-composer input[type="text"],
.drv2m-composer textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 11px 13px;
  color: #101817;
  border: 1px solid rgba(20, 92, 83, 0.22);
  border-radius: 11px;
  background: #fbfdfc;
  font: inherit;
}

.drv2m-composer textarea {
  min-height: 160px;
  resize: vertical;
}

.drv2m-proposals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 3px 0 0;
  padding: 12px;
  border: 1px solid var(--drv2m-border);
  border-radius: 12px;
}

.drv2m-proposals legend {
  padding: 0 6px;
}

.drv2m-proposals label {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  min-height: 48px;
  padding: 8px;
  border-radius: 10px;
  background: var(--drv2m-surface);
}

.drv2m-proposals input {
  width: 20px;
  height: 20px;
  accent-color: var(--drv2m-teal-dark);
}

.drv2m-proposals span {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.drv2m-composer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.drv2m-form-note {
  margin: 0;
  color: var(--drv2m-muted);
  font-size: 0.78rem;
}

.drv2m-preview.is-intercepted {
  border-color: rgba(20, 184, 166, 0.38);
  box-shadow: inset 4px 0 var(--drv2m-teal);
}

.drv2m-preview > header span {
  color: #0a675e;
  font-size: 0.78rem;
  font-weight: 800;
}

.drv2m-preview dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
}

.drv2m-preview dl > div {
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: var(--drv2m-surface);
}

.drv2m-preview dt {
  color: var(--drv2m-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.drv2m-preview dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.drv2m-empty {
  padding: 22px;
  color: var(--drv2m-muted);
  text-align: center;
}

.drv2m-empty p {
  margin: 8px auto 0;
  max-width: 620px;
  line-height: 1.55;
}

.drv2m-empty.is-large {
  display: grid;
  align-content: center;
  min-height: 420px;
}

.drv2m-alert {
  margin: 16px 24px 0;
  padding: 12px 14px;
  border: 1px solid rgba(20, 184, 166, 0.24);
  border-radius: 12px;
  background: #effcf8;
}

.drv2m-alert.is-error {
  color: #7d2424;
  border-color: rgba(165, 50, 50, 0.22);
  background: #fff3f3;
}

@media (max-width: 1100px) {
  .drv2m-layout {
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  }

  .drv2m-content {
    padding: 18px;
  }

  .drv2m-message {
    width: 94%;
  }
}

@media (max-width: 820px) {
  .drv2m-hero {
    align-items: flex-start;
    padding: 24px;
  }

  .drv2m-layout {
    display: block;
  }

  .drv2m-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--drv2m-border);
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .drv2m-thread-list {
    display: flex;
    width: max-content;
  }

  .drv2m-thread-list li,
  .drv2m-thread {
    width: 250px;
  }
}

@media (max-width: 620px) {
  .drv2m-workspace {
    border-radius: 16px;
  }

  .drv2m-hero,
  .drv2m-thread-header,
  .drv2m-composer > header,
  .drv2m-preview > header,
  .drv2m-drafts li {
    flex-direction: column;
  }

  .drv2m-hero__actions {
    width: 100%;
    justify-content: space-between;
  }

  .drv2m-content {
    padding: 12px;
  }

  .drv2m-thread-header,
  .drv2m-draft-panel,
  .drv2m-composer,
  .drv2m-preview {
    border-radius: 14px;
    padding: 16px;
  }

  .drv2m-message {
    width: 100%;
    padding: 15px;
  }

  .drv2m-message header {
    align-items: flex-start;
    flex-direction: column;
  }

  .drv2m-proposals,
  .drv2m-preview dl {
    grid-template-columns: 1fr;
  }

  .drv2m-composer__actions .drv2m-button {
    width: 100%;
  }

  .drv2m-drafts li > span:last-child {
    text-align: left;
  }
}

.drv2m-configuration {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(320px, 1.5fr) auto;
  gap: 16px;
  align-items: start;
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid rgba(18, 102, 94, .14);
  border-radius: 18px;
  background: rgba(247, 252, 250, .96);
}

.drv2m-configuration > .drv2m-button {
  align-self: end;
}

.drv2m-configuration.is-empty {
  display: block;
  color: #315b57;
}

.drv2m-configuration.is-loading,
.drv2m-configuration.is-error {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #315b57;
}

.drv2m-configuration.is-error {
  border-color: rgba(165, 50, 50, .24);
  color: #8b2929;
  background: #fff8f8;
}

.drv2m-configuration__spinner {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 3px solid rgba(20, 184, 166, .18);
  border-top-color: #14b8a6;
  border-radius: 50%;
  animation: drv2m-spin .8s linear infinite;
}

@keyframes drv2m-spin {
  to { transform: rotate(360deg); }
}

.drv2m-configuration.is-empty strong,
.drv2m-configuration.is-empty small,
.drv2m-configuration.is-loading strong,
.drv2m-configuration.is-loading small,
.drv2m-configuration.is-error strong,
.drv2m-configuration.is-error small {
  display: block;
}

.drv2m-configuration:is(.is-empty, .is-loading, .is-error) small {
  max-width: 760px;
  margin-top: 4px;
  line-height: 1.45;
}

.drv2m-configuration label > span,
.drv2m-configuration legend {
  display: block;
  margin-bottom: 6px;
  color: #214b47;
  font-size: .78rem;
  font-weight: 800;
}

.drv2m-configuration select,
.drv2m-configuration__manual-entry input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(18, 102, 94, .22);
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
}

.drv2m-configuration__manual-entry {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(170px, auto);
  gap: 8px;
  align-items: center;
  margin-bottom: 9px;
}

.drv2m-configuration__manual-entry small {
  color: #627a77;
  font-size: .72rem;
  line-height: 1.35;
}

.drv2m-configuration fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.drv2m-configuration fieldset > p {
  margin: -2px 0 8px;
  color: #627a77;
  font-size: .75rem;
}

.drv2m-configuration__senders {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.drv2m-configuration__senders label {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(18, 102, 94, .14);
  border-radius: 12px;
  background: #fff;
}

.drv2m-configuration__senders label.is-disabled {
  opacity: .55;
}

.drv2m-configuration__senders span strong,
.drv2m-configuration__senders span small,
.drv2m-recipient-readonly span,
.drv2m-recipient-readonly strong,
.drv2m-recipient-readonly small {
  display: block;
}

.drv2m-configuration__senders span small,
.drv2m-recipient-readonly small {
  color: #6f817f;
  font-size: .72rem;
}

.drv2m-recipient-readonly {
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(18, 102, 94, .15);
  border-radius: 12px;
  background: #f6fbf9;
}

.drv2m-recipient-readonly > span {
  color: #52706d;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 960px) {
  .drv2m-configuration {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .drv2m-configuration__manual-entry {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .drv2m-hero {
    padding: 20px 16px;
  }

  .drv2m-hero__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .drv2m-thread-list li,
  .drv2m-thread {
    width: 220px;
  }

  .drv2m-message__actions button {
    width: 100%;
  }
}

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

/* Shared luxury surface polish for the V2 mailbox. */
.drv2m-workspace {
  background:
    radial-gradient(circle at 92% 0%, rgba(45, 212, 191, .08), transparent 26%),
    #f2f7f5;
  box-shadow: 0 26px 70px rgba(2, 20, 17, .11), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.drv2m-workspace :is(.drv2m-thread-list, .drv2m-content, .drv2m-drawer__body) {
  scrollbar-width: thin;
  scrollbar-color: rgba(20, 125, 112, .34) transparent;
}

.drv2m-workspace :is(.drv2m-thread-list, .drv2m-content)::-webkit-scrollbar { width: 9px; height: 9px; }
.drv2m-workspace :is(.drv2m-thread-list, .drv2m-content)::-webkit-scrollbar-track { background: transparent; }
.drv2m-workspace :is(.drv2m-thread-list, .drv2m-content)::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: rgba(20, 125, 112, .35); background-clip: padding-box; }

.drv2m-thread-pane .drv2m-thread {
  position: relative;
  border: 1px solid transparent;
  box-shadow: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.drv2m-thread-pane .drv2m-thread:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 125, 112, .14);
  background: #f4faf8;
  box-shadow: 0 9px 20px rgba(3, 38, 32, .055);
}

.drv2m-thread-pane .drv2m-thread.is-active {
  border-color: rgba(20, 184, 166, .3);
  background: linear-gradient(120deg, #eafaf6, #f8fcfb);
  box-shadow: inset 3px 0 #14b8a6, 0 10px 24px rgba(3, 38, 32, .07);
}

.drv2m-message {
  border-color: rgba(12, 92, 82, .13);
  background: linear-gradient(145deg, #fff, #fbfdfc);
}

.drv2m-message.is-outbound {
  border-color: rgba(20, 184, 166, .26);
  background: linear-gradient(145deg, #ebfaf6, #f6fffc);
}

.drv2m-message__body,
.drv2m-address-line,
.drv2m-thread :is(strong, span, small),
.drv2m-composer :is(label, input, textarea, select) {
  overflow-wrap: break-word;
  word-break: normal;
}

.drv2m-composer {
  overflow: hidden;
  padding: 0;
  border-color: rgba(12, 92, 82, .16);
  background: #fff;
  box-shadow: 0 18px 42px rgba(3, 38, 32, .075);
}

.drv2m-composer > header {
  align-items: center;
  margin: 0;
  padding: 17px 19px;
  border-bottom: 1px solid rgba(20, 125, 112, .13);
  background: linear-gradient(120deg, #f7fbfa, #edf7f4);
}

.drv2m-composer > form { padding: 19px; }
.drv2m-composer :is(input[type="text"], textarea, select) { transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.drv2m-composer :is(input[type="text"], textarea, select):hover { border-color: rgba(20, 125, 112, .36); background: #fff; }
.drv2m-composer :is(input[type="text"], textarea, select):focus { border-color: #14b8a6; box-shadow: 0 0 0 4px rgba(20, 184, 166, .1); }

.drv2m-composer__actions {
  padding-top: 15px;
  border-top: 1px solid rgba(20, 125, 112, .11);
}

.drv2m-empty.is-large {
  border-style: solid;
  border-color: rgba(20, 125, 112, .14);
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), #edf8f5);
  box-shadow: 0 16px 40px rgba(3, 38, 32, .06);
}

@media (max-width: 720px) {
  .drv2m-workspace { border-radius: 18px; }
  .drv2m-composer > header { align-items: flex-start; }
  .drv2m-composer > form { padding: 15px; }
}

/* Directe Deal Room Mail: mailbox, gesprekken en actieve thread blijven in één werkvlak. */
.drv2m-layout {
  grid-template-columns: minmax(184px, 220px) minmax(286px, 352px) minmax(0, 1fr);
  min-height: 720px;
  background: #f5faf8;
}

.drv2m-sidebar {
  display: flex;
  min-width: 0;
  padding: 22px 14px 18px;
  flex-direction: column;
  border-right: 1px solid rgba(153, 246, 228, 0.12);
  color: #effffb;
  background:
    radial-gradient(circle at 10% 16%, rgba(20, 184, 166, 0.19), transparent 36%),
    linear-gradient(164deg, #071712 0%, #06100e 56%, #050a09 100%);
}

.drv2m-sidebar > header {
  padding: 2px 10px 20px;
}

.drv2m-sidebar > header strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.drv2m-sidebar > footer {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 1px 9px;
  margin: auto 6px 0;
  padding: 15px 12px;
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-radius: 14px;
  color: #ccfbf1;
  background: rgba(15, 118, 110, 0.12);
}

.drv2m-sidebar > footer > span {
  display: grid;
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: #5eead4;
  background: rgba(45, 212, 191, 0.12);
}

.drv2m-sidebar > footer p,
.drv2m-sidebar > footer small {
  min-width: 0;
  margin: 0;
}

.drv2m-sidebar > footer p {
  overflow: visible;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.drv2m-sidebar > footer small {
  color: rgba(204, 251, 241, 0.58);
  font-size: 0.67rem;
}

.drv2m-folder-list {
  display: grid;
  gap: 5px;
}

.drv2m-folder {
  display: grid;
  align-items: center;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  min-height: 45px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: rgba(236, 253, 245, 0.72);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.drv2m-folder:hover {
  color: #fff;
  background: rgba(45, 212, 191, 0.09);
}

.drv2m-folder.is-active {
  color: #edfffb;
  border-color: rgba(94, 234, 212, 0.18);
  background: linear-gradient(120deg, rgba(20, 184, 166, 0.24), rgba(20, 184, 166, 0.08));
  box-shadow: inset 3px 0 #2dd4bf;
}

.drv2m-folder__glyph {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  color: #5eead4;
  background: rgba(45, 212, 191, 0.1);
  font-size: 0.8rem;
}

.drv2m-folder strong {
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #99f6e4;
  background: rgba(153, 246, 228, 0.1);
  font-size: 0.68rem;
  text-align: center;
}

.drv2m-folder:focus-visible,
.drv2m-composer select:focus-visible {
  outline: 3px solid rgba(45, 212, 191, 0.46);
  outline-offset: 2px;
}

.drv2m-thread-pane {
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: 0;
  flex-direction: column;
  border-right: 1px solid var(--drv2m-border);
  background: rgba(255, 255, 255, 0.9);
}

.drv2m-thread-pane > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 91px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(20, 92, 83, 0.12);
}

.drv2m-thread-pane > header h3 {
  margin: 0;
  color: #12221f;
  font-size: 1.02rem;
}

.drv2m-thread-pane > header .drv2m-eyebrow {
  margin-bottom: 5px !important;
}

.drv2m-thread-pane .drv2m-thread-list {
  align-content: start;
  gap: 4px;
  min-height: 0;
  padding: 10px;
  overflow-y: auto;
  scrollbar-color: rgba(20, 184, 166, 0.3) transparent;
}

.drv2m-thread-pane .drv2m-thread {
  min-height: 98px;
  padding: 14px 13px;
  border-radius: 13px;
}

.drv2m-thread-pane .drv2m-empty {
  margin: 18px;
}

.drv2m-loading-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f766e;
  background: #e6fffa;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.drv2m-thread-skeleton {
  display: grid;
  gap: 9px;
  margin: 10px;
  padding: 15px;
  border-radius: 14px;
  background: #f3f8f6;
}

.drv2m-thread-skeleton span {
  display: block;
  width: 78%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #deebe7, #f5faf8, #deebe7);
  background-size: 220% 100%;
  animation: drv2m-shimmer 1.4s linear infinite;
}

.drv2m-thread-skeleton span:nth-child(2) {
  width: 55%;
}

.drv2m-thread-skeleton span:nth-child(3) {
  width: 92%;
}

.drv2m-thread-skeleton p {
  margin: 2px 0 0;
  color: var(--drv2m-muted);
  font-size: 0.75rem;
}

@keyframes drv2m-shimmer {
  to { background-position: -220% 0; }
}

.drv2m-content {
  min-width: 0;
  min-height: 0;
  padding: 24px clamp(18px, 2.2vw, 34px) 34px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.08), transparent 30%),
    #f5faf8;
}

.drv2m-thread-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.drv2m-button.is-thread-action,
.drv2m-button.is-quiet {
  color: #0a514a;
  border: 1px solid rgba(20, 92, 83, 0.18);
  background: rgba(255, 255, 255, 0.86);
}

.drv2m-button.is-thread-action {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.76rem;
}

.drv2m-recipient-tools,
.drv2m-recipient-grid,
.drv2m-assets-grid {
  display: grid;
  gap: 12px;
}

.drv2m-recipient-tools {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(20, 92, 83, 0.12);
  border-radius: 14px;
  background: #f7fbfa;
}

.drv2m-recipient-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr);
}

.drv2m-select-field {
  min-width: 0;
}

.drv2m-select-field > span {
  display: block;
  margin-bottom: 7px;
}

.drv2m-composer select {
  width: 100%;
  min-height: 44px;
  padding: 10px 38px 10px 12px;
  border: 1px solid var(--drv2m-border);
  border-radius: 11px;
  color: #142724;
  background: #fff;
  font: inherit;
}

.drv2m-assets-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.drv2m-assets-grid .drv2m-proposals {
  grid-template-columns: 1fr;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(20, 92, 83, 0.13);
  border-radius: 14px;
  background: #f8fcfb;
}

.drv2m-assets-grid .drv2m-proposals legend {
  padding: 0 7px;
}

.drv2m-send-confirmation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 15px 16px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 14px;
  color: #0b4f49;
  background: linear-gradient(120deg, #ecfdf9, #f7fffd);
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.08);
}

.drv2m-send-confirmation p {
  max-width: 680px;
  margin: 4px 0 0;
  color: #52706a;
  font-size: 0.78rem;
  line-height: 1.5;
}

.drv2m-send-confirmation > div:last-child {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.drv2m-inline-loading {
  margin: 14px 0 0;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 750;
}

.drv2m-alert.is-success {
  color: #075e54;
  border-color: rgba(16, 185, 129, 0.24);
  background: #ecfdf5;
}

@media (max-width: 1240px) {
  .drv2m-layout {
    grid-template-columns: minmax(170px, 192px) minmax(270px, 306px) minmax(0, 1fr);
  }

  .drv2m-sidebar {
    padding-inline: 10px;
  }

  .drv2m-folder {
    padding-inline: 8px;
  }

  .drv2m-content {
    padding-inline: 18px;
  }

  .drv2m-recipient-grid {
    grid-template-columns: 1fr 1fr;
  }

  .drv2m-recipient-grid > label:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .drv2m-layout {
    display: grid;
    grid-template-columns: minmax(172px, 210px) minmax(0, 1fr);
    min-height: 0;
  }

  .drv2m-sidebar {
    grid-column: 1;
    min-height: 470px;
  }

  .drv2m-thread-pane {
    grid-column: 2;
    min-height: 470px;
    border-right: 0;
  }

  .drv2m-thread-pane .drv2m-thread-list {
    max-height: 610px;
  }

  .drv2m-content {
    grid-column: 1 / -1;
    min-height: 520px;
    border-top: 1px solid var(--drv2m-border);
  }
}

@media (max-width: 720px) {
  .drv2m-layout {
    display: block;
  }

  .drv2m-sidebar {
    display: block;
    min-height: 0;
    padding: 14px 12px;
    border-right: 0;
  }

  .drv2m-sidebar > header {
    padding: 0 3px 10px;
  }

  .drv2m-sidebar > footer {
    display: none;
  }

  .drv2m-folder-list {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 1px 1px 8px;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
  }

  .drv2m-folder {
    width: 172px;
    min-width: 172px;
    max-width: none;
    flex: 0 0 172px;
    scroll-snap-align: start;
  }

  .drv2m-folder > span:not(.drv2m-folder__glyph) {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .drv2m-thread-pane {
    min-height: 0;
    border-bottom: 1px solid var(--drv2m-border);
  }

  .drv2m-thread-pane > header {
    min-height: 75px;
    padding: 15px 16px 11px;
  }

  .drv2m-thread-pane .drv2m-thread-list {
    display: flex;
    width: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 12px 13px;
    scroll-snap-type: x proximity;
  }

  .drv2m-thread-pane .drv2m-thread-list li,
  .drv2m-thread-pane .drv2m-thread {
    width: 252px;
    min-width: 252px;
    scroll-snap-align: start;
  }

  .drv2m-content {
    min-height: 480px;
    padding: 18px 14px 28px;
  }

  .drv2m-recipient-tools,
  .drv2m-recipient-grid,
  .drv2m-assets-grid {
    grid-template-columns: 1fr;
  }

  .drv2m-recipient-grid > label:first-child {
    grid-column: auto;
  }

  .drv2m-thread-toolbar {
    width: 100%;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .drv2m-send-confirmation {
    align-items: stretch;
    flex-direction: column;
  }

  .drv2m-send-confirmation > div:last-child {
    flex-wrap: wrap;
  }
}

@media (max-width: 430px) {
  .drv2m-folder {
    width: 164px;
    min-width: 164px;
    flex-basis: 164px;
  }

  .drv2m-thread-pane .drv2m-thread-list li,
  .drv2m-thread-pane .drv2m-thread {
    width: 228px;
    min-width: 228px;
  }

  .drv2m-send-confirmation > div:last-child .drv2m-button {
    width: 100%;
  }
}

/* Threadgebonden Layer-B-notities en vervolgacties; mailverzending blijft buiten deze flow. */
.drv2m-thread-notes {
  margin-top: 18px;
  border: 1px solid var(--drv2m-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(5, 35, 29, 0.04);
}

.drv2m-thread-notes > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 12px 16px;
  color: #17312d;
  cursor: pointer;
  list-style: none;
}

.drv2m-thread-notes > summary::-webkit-details-marker {
  display: none;
}

.drv2m-thread-notes > summary:focus-visible,
.drv2m-thread-note-form select:focus-visible,
.drv2m-thread-note-form input:focus-visible,
.drv2m-thread-note-form textarea:focus-visible {
  outline: 3px solid rgba(20, 184, 166, 0.4);
  outline-offset: 3px;
}

.drv2m-thread-notes > summary > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.drv2m-thread-notes > summary small {
  color: var(--drv2m-muted);
  font-size: 0.72rem;
  font-weight: 550;
  overflow-wrap: anywhere;
}

.drv2m-thread-notes__count {
  display: inline-grid;
  flex: 0 0 auto;
  width: 30px;
  min-height: 30px;
  place-items: center;
  border-radius: 999px;
  color: #0b4f49;
  background: #ddf7f2;
  font-size: 0.74rem;
  font-weight: 850;
}

.drv2m-thread-notes__body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(20, 92, 83, 0.1);
}

.drv2m-thread-note-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.drv2m-thread-note-list li {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(20, 92, 83, 0.1);
  border-radius: 12px;
  background: #f7fbfa;
}

.drv2m-thread-note-list li > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drv2m-thread-note-kind,
.drv2m-thread-note-list time {
  color: #0f766e;
  font-size: 0.7rem;
  font-weight: 800;
}

.drv2m-thread-note-list p {
  margin: 7px 0;
  color: #243a36;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.drv2m-thread-note-list small {
  color: var(--drv2m-muted);
}

.drv2m-thread-note-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.55fr) minmax(150px, 0.55fr) minmax(240px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid rgba(20, 184, 166, 0.16);
  border-radius: 14px;
  background: #eff9f6;
}

.drv2m-thread-note-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #35443f;
  font-size: 0.76rem;
  font-weight: 750;
}

.drv2m-thread-note-form select,
.drv2m-thread-note-form input,
.drv2m-thread-note-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(20, 92, 83, 0.2);
  border-radius: 10px;
  color: #142724;
  background: #fff;
  font: inherit;
}

.drv2m-thread-note-form textarea {
  min-height: 70px;
  resize: vertical;
}

.drv2m-thread-note-form .drv2m-button {
  min-height: 42px;
  white-space: nowrap;
}

.drv2m-thread-note-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #075e54;
  background: #ecfdf5;
  font-size: 0.78rem;
  font-weight: 700;
}

.drv2m-thread-note-status.is-error {
  color: #7d2424;
  background: #fff3f3;
}

@media (max-width: 1240px) {
  .drv2m-thread-note-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drv2m-thread-note-text {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .drv2m-thread-notes {
    border-radius: 14px;
  }

  .drv2m-thread-note-form {
    grid-template-columns: 1fr;
  }

  .drv2m-thread-note-text {
    grid-column: auto;
  }

  .drv2m-thread-note-form .drv2m-button {
    width: 100%;
  }
}
