.beheer { width: min(1100px, 100%); margin: 0 auto; padding: 16px 16px 40px; display: grid; gap: 16px; }
.beheer-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.beheer-header .home-brand .brand-logo { height: 32px; padding: 3px 8px; border-radius: 8px; }
.beheer-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.beheer-nav .home-button { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.beheer h1 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.01em; }
.beheer-notice { margin: 0; padding: 10px 14px; color: #ffe2a8; border: 1px solid rgba(255,200,100,.35); border-radius: 8px; background: rgba(255,200,100,.08); font-size: 14px; }
.beheer-notice.error { color: #ffb4ab; border-color: rgba(255,138,128,.4); background: rgba(255,138,128,.08); }
.beheer-card { padding: 16px; border: 1px solid rgba(221,239,224,.14); border-radius: 12px; background: #151d17; }
.card-head h2 { margin: 0 0 4px; font-size: 18px; }
.card-head p { margin: 0 0 14px; color: #9fb0a2; font-size: 14px; }
.account-form { display: grid; grid-template-columns: 1fr 1.2fr 1.6fr 1.3fr auto; align-items: end; gap: 10px; }
.account-form label { display: grid; gap: 4px; color: #c9d8cc; font-size: 12px; font-weight: 700; }
.account-form input, .account-form select { min-height: 38px; padding: 0 10px; color: #edf4ef; border: 1px solid rgba(221,239,224,.3); border-radius: 8px; background: #0f1510; font: inherit; font-weight: 400; color-scheme: dark; }
.account-form input:focus, .account-form select:focus { outline: 2px solid #91d49a; outline-offset: 1px; }
.account-form button { min-height: 38px; padding: 0 16px; color: #102014; border: 0; border-radius: 8px; background: #91d49a; font: inherit; font-weight: 800; cursor: pointer; }
.account-form button:hover { background: #a5e5ac; }
.account-form :disabled { opacity: .5; cursor: not-allowed; }
.form-message { margin: 10px 0 0; color: #91d49a; font-size: 13px; }
.form-message.error { color: #ff8a80; }
.users-wrap { overflow-x: auto; border: 1px solid rgba(221,239,224,.14); border-radius: 8px; }
.users-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.users-table th, .users-table td { padding: 8px 10px; border-bottom: 1px solid rgba(221,239,224,.1); text-align: left; vertical-align: middle; }
.users-table thead th { color: #102014; background: #91d49a; font-weight: 700; white-space: nowrap; }
.users-table td.never { color: #8a9a8d; font-style: italic; }
.users-table td.empty { padding: 16px; color: #9fb0a2; text-align: center; }
.users-table select { min-height: 28px; padding: 0 6px; color: #edf4ef; border: 1px solid rgba(221,239,224,.3); border-radius: 6px; background: #0f1510; font: inherit; font-size: 12px; color-scheme: dark; }
.users-table .you { margin-left: 6px; padding: 1px 6px; color: #102014; border-radius: 999px; background: #91d49a; font-size: 10px; font-weight: 800; }
.users-table button { min-height: 28px; padding: 0 10px; color: #ff8a80; border: 1px solid rgba(255,138,128,.35); border-radius: 6px; background: transparent; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.users-table button.confirm { color: #fff; border-color: #d93025; background: #c62828; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-picks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 38px; margin: 0; padding: 0 10px; border: 1px solid rgba(221,239,224,.3); border-radius: 8px; }
.page-picks legend { padding: 0 4px; color: #c9d8cc; font-size: 12px; font-weight: 700; }
.account-form .page-picks label, .users-table .page-picks label { display: inline-flex; align-items: center; gap: 5px; color: #edf4ef; font-size: 13px; font-weight: 400; cursor: pointer; }
.page-picks input { width: 16px; height: 16px; margin: 0; accent-color: #91d49a; cursor: pointer; }
.users-table .page-picks { min-height: 0; padding: 0; border: 0; }
.users-table .all-pages { color: #91d49a; font-weight: 700; }

.mail-form { grid-template-columns: minmax(0, 420px) auto; justify-content: start; }

/* Postvak: list of mails on the left, the open mail on the right. */
.mailbox-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.mailbox-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.mailbox-filter, .mailbox-refresh { min-height: 32px; padding: 0 12px; color: #c9d8cc; border: 1px solid rgba(221,239,224,.3); border-radius: 8px; background: #19221c; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mailbox-filter:hover, .mailbox-refresh:hover { color: #fff; border-color: #5f8a66; }
.mailbox-filter.active { color: #102014; border-color: #91d49a; background: #91d49a; }
.mailbox-search { flex: 1 1 220px; }
.mailbox-search input { width: 100%; min-height: 32px; padding: 0 10px; color: #edf4ef; border: 1px solid rgba(221,239,224,.3); border-radius: 8px; background: #0f1510; font: inherit; font-size: 13px; color-scheme: dark; }
.mailbox-filter:focus-visible, .mailbox-refresh:focus-visible, .mailbox-search input:focus, .mailbox-item:focus-visible, .mailbox-reader button:focus-visible { outline: 2px solid #91d49a; outline-offset: 1px; }
.mailbox-panes { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); min-height: 360px; border: 1px solid rgba(221,239,224,.14); border-radius: 8px; overflow: hidden; }
.mailbox-list { max-height: 560px; margin: 0; padding: 0; overflow-y: auto; list-style: none; border-right: 1px solid rgba(221,239,224,.14); background: #111713; }
.mailbox-list li { border-bottom: 1px solid rgba(221,239,224,.08); }
.mailbox-empty { padding: 18px 12px; color: #9fb0a2; font-size: 13px; text-align: center; }
.mailbox-item { width: 100%; display: grid; gap: 2px; padding: 9px 12px; color: #c9d8cc; border: 0; border-left: 3px solid transparent; background: transparent; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.mailbox-item:hover { background: rgba(145,212,154,.06); }
.mailbox-item.active { border-left-color: #91d49a; background: rgba(145,212,154,.12); }
.mailbox-item-top { display: flex; align-items: baseline; gap: 6px; }
.mailbox-item-top b { flex: 1 1 auto; min-width: 0; overflow: hidden; color: #edf4ef; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.mailbox-item-top small { flex: none; color: #8a9a8d; font-size: 11px; }
.mailbox-item-subject, .mailbox-item-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mailbox-item-preview { color: #8a9a8d; font-size: 12px; }
.mailbox-item.unread .mailbox-item-top b, .mailbox-item.unread .mailbox-item-subject { color: #fff; font-weight: 800; }
.mailbox-item.unread { border-left-color: #9fc3e8; }
.mailbox-item.unread.active { border-left-color: #91d49a; }
.mailbox-tag { flex: none; padding: 0 6px; color: #fff; border-radius: 999px; background: #b03a2e; font-size: 10px; font-weight: 800; }
.mailbox-reader { min-width: 0; padding: 14px 16px; overflow-y: auto; max-height: 560px; background: #151d17; }
.mailbox-reader h3 { margin: 0 0 8px; font-size: 17px; overflow-wrap: anywhere; }
.mailbox-hint { margin: 40px 0; color: #8a9a8d; font-size: 14px; text-align: center; }
.mailbox-back { display: none; margin-bottom: 8px; padding: 0; color: #9fc3e8; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mailbox-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0 0 10px; font-size: 13px; }
.mailbox-meta dt { color: #8a9a8d; font-weight: 700; }
.mailbox-meta dd { margin: 0; color: #dfe9e2; overflow-wrap: anywhere; }
.mailbox-meta dd.error { color: #ff8a80; }
.mailbox-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mailbox-actions button { min-height: 32px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mailbox-main { color: #102014; border: 0; background: #91d49a; }
.mailbox-plain { color: #c9d8cc; border: 1px solid rgba(221,239,224,.3); background: transparent; }
.mailbox-delete { color: #ff8a80; border: 1px solid rgba(255,138,128,.35); background: transparent; }
.mailbox-delete.confirm { color: #fff; border-color: #d93025; background: #c62828; }
.mailbox-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.mailbox-files button, .mailbox-reader > button { min-height: 32px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mailbox-sub { margin: 14px 0 6px; color: #9fc3e8; font-size: 13px; }
.mailbox-pdf { display: block; width: 100%; min-height: 260px; margin-bottom: 6px; padding: 10px; color: #edf4ef; border: 1px solid rgba(221,239,224,.2); border-radius: 8px; background: #0f1510; font: 13px/1.5 ui-monospace, Consolas, monospace; tab-size: 18; resize: vertical; }
.mailbox-text { margin: 0; padding: 12px; color: #edf4ef; border-radius: 8px; background: #0f1510; font: inherit; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .mail-form { grid-template-columns: 1fr; }
  /* Postvak: list or open mail, one at a time. */
  .mailbox-panes { grid-template-columns: 1fr; min-height: 0; }
  .mailbox-list { max-height: none; border-right: 0; }
  .mailbox-reader { display: none; max-height: none; }
  .mailbox-panes.reading .mailbox-list { display: none; }
  .mailbox-panes.reading .mailbox-reader { display: block; }
  .mailbox-back { display: inline-block; }
  .beheer { padding: 10px 8px 24px; gap: 12px; }
  .beheer-card { padding: 12px; }
  .account-form { grid-template-columns: 1fr; }
  .page-picks { padding: 6px 10px; }
  /* Accounts as cards instead of a wide table. */
  .users-wrap { overflow: visible; border: 0; }
  .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; }
  .users-table thead { display: none; }
  .users-table tbody tr { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; margin-bottom: 10px; padding: 10px; border: 1px solid rgba(221,239,224,.18); border-radius: 10px; background: #111713; }
  .users-table td { min-width: 0; padding: 4px 0; border: 0; overflow-wrap: anywhere; }
  .users-table td::before { content: attr(data-label); display: block; color: #8a9a8d; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
  .users-table td:first-child { grid-column: 1 / -1; padding-right: 100px; font-size: 15px; font-weight: 700; }
  .users-table td:nth-child(2), .users-table td:nth-child(3), .users-table td:nth-child(4) { grid-column: 1 / -1; }
  .users-table td:last-child { position: absolute; top: 10px; right: 10px; padding: 0; }
  .users-table td:last-child::before, .users-table td:empty::before { content: none; }
  .users-table td.empty { grid-column: 1 / -1; position: static; text-align: center; }
  .users-table .page-picks { gap: 6px 14px; }
  .users-table .page-picks label { min-height: 32px; }
  .beheer-header { flex-direction: column; align-items: stretch; }
  .beheer-header .home-brand { justify-content: center; }
  .beheer-nav { display: grid; grid-template-columns: 1fr 1fr; }
}
