/* Five Lion Labs admin. Colours match the public site. */
:root, html[data-theme=dark] {
  color-scheme: dark;
  --bg: #080808; --panel: #0e0e10; --panel-2: #141416; --line: rgba(168,159,141,.16); --line-2: rgba(168,159,141,.28);
  --text: #f4f1ec; --muted: #a89f8d; --gold: #c9a44a; --gold-2: #d9bd76; --gold-bg: rgba(201,164,74,.12);
  --new: #3ecf8e; --new-bg: rgba(62,207,142,.12); --err: #ff6b6b; --err-bg: rgba(255,107,107,.12);
  --hover: rgba(255,255,255,.035); --shadow: 0 30px 80px rgba(0,0,0,.6);
}
html[data-theme=light] {
  color-scheme: light;
  --bg: #f5f1e8; --panel: #fbf9f4; --panel-2: #f2ede3; --line: rgba(62,58,51,.14); --line-2: rgba(62,58,51,.24);
  --text: #1f1f21; --muted: #645f56; --gold: #a07926; --gold-2: #876320; --gold-bg: rgba(184,144,47,.12);
  --new: #13834f; --new-bg: rgba(19,131,79,.1); --err: #c62828; --err-bg: rgba(198,40,40,.08);
  --hover: rgba(28,28,31,.04); --shadow: 0 30px 80px rgba(60,50,30,.25);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-2); padding: 2px 6px; border-radius: 6px; letter-spacing: .05em; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px clamp(16px, 3vw, 40px);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-back[hidden] { display: none; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--gold); font-weight: 600; }
.brand em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 9px; margin-left: 4px; }
.top nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.top nav a { color: var(--muted); padding: 8px 12px; border-radius: 999px; font-size: 14px; }
.top nav a:hover { color: var(--text); text-decoration: none; background: var(--hover); }
.top nav a.on { color: var(--text); background: var(--panel-2); }
.top nav form { margin: 0; }

.icon-btn { background: transparent; border: 1px solid var(--line-2); border-radius: 999px; min-width: 34px; height: 34px; padding: 0 10px; color: var(--muted); }
.icon-btn:hover { color: var(--text); border-color: var(--gold); }
.icon-btn.danger:hover { color: var(--err); border-color: var(--err); }
.ghost { background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; font-size: 14px; color: var(--text); }
.ghost:hover { border-color: var(--gold); }
.primary { white-space: nowrap; background: var(--gold); color: #0b0b0b; border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 600; }
.primary:hover { background: var(--gold-2); }
.link { background: none; border: 0; padding: 0; color: var(--gold-2); text-decoration: underline; }

/* ---------- layout ---------- */
main { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 40px) 40px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 32px); margin-bottom: 20px; }
.card.narrow { max-width: 460px; margin: 6vh auto 20px; }
h1 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 18px; font-weight: 600; }
h2 { font-size: 17px; margin: 0 0 12px; font-weight: 600; letter-spacing: -.01em; }
.msg { padding: 10px 14px; border-radius: 12px; margin: 0 0 16px; }
.msg.err { background: var(--err-bg); color: var(--err); }
.msg.ok { background: var(--new-bg); color: var(--new); }
.pad { padding: 12px 16px; margin: 0; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.form input, .form select {
  font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 11px 13px; width: 100%;
}
.form input:focus, .form select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-bg); }
.form .primary { justify-self: start; margin-top: 4px; }
.inline-form { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; }
.inline-form .port { max-width: 110px; }
.inline-form .primary { margin-top: 0; }
.steps { padding-left: 20px; margin: 0 0 18px; display: grid; gap: 10px; }
.qr { width: 190px; height: 190px; margin: 12px 0 6px; background: #fff; border-radius: 12px; padding: 6px; }
.qr svg { width: 100%; height: 100%; display: block; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.settings-col { background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.plain-list li:first-child { border-top: 0; }
.plain-list .addr { overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 6px; }
.row-actions form { margin: 0; }

/* ---------- dashboard: three columns ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.col { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.col-head h2 { margin: 0; font-size: 18px; }
.col-head h2::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 10px; vertical-align: 2px; }
.domain { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.boxes { list-style: none; margin: 0; padding: 6px; }
.box + .box { border-top: 1px solid var(--line); }
.box-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: transparent; border: 0; border-radius: 12px; padding: 13px 14px; text-align: left;
}
.box-row:hover { background: var(--hover); }
.box.open .box-row { background: var(--panel-2); }
.box-row .addr { font-weight: 500; overflow-wrap: anywhere; }
.box-row .addr::before { content: '›'; display: inline-block; width: 14px; color: var(--muted); transition: transform .2s; }
.box.open .box-row .addr::before { transform: rotate(90deg); }
.state { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; padding: 4px 10px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.state.new { color: var(--new); background: var(--new-bg); border-color: transparent; font-weight: 600; }
.state.new i { opacity: 1; box-shadow: 0 0 0 3px var(--new-bg); animation: pulse 2s infinite; }
.state.error { color: var(--err); background: var(--err-bg); border-color: transparent; cursor: help; }
.state.loading i { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.empty { padding: 16px 14px; color: var(--muted); font-size: 14px; }

.msgs { padding: 4px 0 8px; }
.msg-list { list-style: none; margin: 0; padding: 0; max-height: 62vh; overflow-y: auto; }
.item { width: 100%; display: grid; gap: 2px; text-align: left; background: transparent; border: 0; border-radius: 10px; padding: 9px 14px 9px 28px; position: relative; }
.item:hover { background: var(--hover); }
.item.unread::before { content: ''; position: absolute; left: 12px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--new); }
.msg-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.msg-from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.item.unread .msg-from { color: var(--text); font-weight: 600; }
.msg-date { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.msg-subject { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item.unread .msg-subject { font-weight: 600; }

/* ---------- e-mail popup ---------- */
dialog#mail {
  width: min(960px, 96vw); max-height: 92vh; padding: 0; border: 1px solid var(--line-2); border-radius: 20px;
  background: var(--panel); color: var(--text); box-shadow: var(--shadow); overflow: hidden;
  display: none; flex-direction: column;
}
dialog#mail[open] { display: flex; }
dialog#mail::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.mail-head { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.mail-meta { min-width: 0; }
.mail-meta h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.mail-meta p { margin: 0; overflow-wrap: anywhere; }
.mail-meta .from { font-size: 14px; }
.blocked-note { margin: 0; padding: 9px 24px; font-size: 13px; background: var(--gold-bg); color: var(--text); }
.mail-body { overflow-y: auto; overflow-x: hidden; background: #fff; flex: 1; min-height: 160px; }
.mail-body iframe { display: block; width: 100%; border: 0; min-height: 160px; background: #fff; }
.attachments { list-style: none; margin: 0; padding: 12px 24px; display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); }
.att { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.att:hover { border-color: var(--gold); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: auto; }
.foot-inner {
  max-width: 1600px; margin: 0 auto; padding: 18px clamp(16px, 3vw, 40px);
  display: flex; justify-content: space-between; align-items: center; gap: 10px 24px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }
.foot b { color: var(--text); font-weight: 500; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .board, .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .brand span { display: none; }
  .mail-head { padding: 16px; }
  dialog#mail { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .foot-inner { justify-content: center; text-align: center; }
}
@media (max-width: 640px) {
  .top { padding: 10px 16px; gap: 8px; }
  .top nav { gap: 4px; }
  .top nav a { padding: 6px 9px; font-size: 13px; }
  .ghost { padding: 6px 11px; font-size: 13px; }
  .brand em { display: none; }
}

/* ---------- actions, compose, toast ---------- */
.mail-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: var(--panel); }
.act { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--text); white-space: nowrap; }
.act:hover { border-color: var(--gold); }
.act.primary-act { background: var(--gold); border-color: var(--gold); color: #0b0b0b; font-weight: 600; }
.act.primary-act:hover { background: var(--gold-2); }
.act.danger:hover { border-color: var(--err); color: var(--err); }
.act-gap { flex: 1; }
.list-bar { display: flex; justify-content: flex-end; padding: 2px 14px 6px; }
.small-btn { padding: 5px 12px; font-size: 12.5px; }

dialog#compose {
  width: min(820px, 96vw); max-height: 94vh; padding: 0; border: 1px solid var(--line-2); border-radius: 20px;
  background: var(--panel); color: var(--text); box-shadow: var(--shadow); overflow: hidden;
}
dialog#compose::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.compose { display: flex; flex-direction: column; max-height: 94vh; margin: 0; }
/* a column: the text editor takes the free height and scrolls inside, the other fields keep their size (2.8.6) */
.compose-fields { padding: 14px 24px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.compose-fields > *:not(.rte) { flex-shrink: 0; }
.compose-fields label:not(.check) { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.compose-fields input:not([type=checkbox]):not([type=color]), .compose-fields textarea {
  font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; width: 100%;
}
.compose-fields textarea { min-height: 300px; resize: vertical; line-height: 1.55; font-size: 14.5px; }
.compose-fields input:focus, .compose-fields textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-bg); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
/* text editor in the write window (admin 2.8.4): the writing area looks like the e-mail (white, dark text) in both themes */
/* the editor keeps its frame in the window and scrolls inside down to the last line (2.8.6) */
.rte { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 220px; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; }
.rte:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-bg); }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px; background: var(--panel-2); border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.rte-btn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 30px; height: 32px; padding: 0 4px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: 15px/1 Georgia, 'Times New Roman', serif; cursor: pointer; position: relative; }
.rte-btn:hover { background: var(--gold-bg); }
.rte-btn.on { background: var(--gold-bg); color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.rte-btn:focus-visible, .rte-size:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.rte-sep { flex: 0 0 1px; align-self: stretch; margin: 4px 3px; background: var(--line); }
.rte-size { flex: 0 0 auto; height: 32px; padding: 0 8px; margin-right: 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); font-size: 13px; }
.rte-color span { font-weight: 700; border-bottom: 3px solid #c0392b; line-height: 1.1; }
.rte-color input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.rte-hl { background: #fff3a3; color: #1a1a1a; padding: 1px 3px; border-radius: 3px; font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; }
.rte-area { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px; background: #fff; color: #1a1a1a; font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; outline: none; overflow-wrap: anywhere; }
.rte-area div, .rte-area p { margin: 0; }
.rte-area ul, .rte-area ol { margin: 0; padding-left: 28px; }
.rte-area blockquote { margin: 0 0 0 40px; }
.rte-area a { color: #1a5fb4; }
.rte-area h1 { font-size: 26px; margin: 0; } .rte-area h2 { font-size: 21px; margin: 0; } .rte-area h3 { font-size: 17px; margin: 0; }
@media (max-width: 640px) { .rte { min-height: 200px; } }
.compose-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); }
.compose-foot button:disabled { opacity: .6; cursor: progress; }
@media (max-width: 640px) { .compose-foot { gap: 6px; padding: 12px 14px; } .compose-foot button { padding-left: 12px; padding-right: 12px; white-space: nowrap; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  transition: opacity .2s, transform .2s; z-index: 100; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--err); color: #fff; }
@media (max-width: 640px) {
  .mail-actions { padding: 10px 16px; }
  .act-gap { display: none; }
  dialog#compose { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .compose { max-height: 100vh; height: 100%; }
  .compose-fields { flex: 1; }
  .compose-fields label:not(.check) { grid-template-columns: 1fr; gap: 4px; }
}
.attachments li { display: flex; gap: 4px; flex-wrap: wrap; }
.att-receipt { color: var(--gold-2); }
.att-receipt:disabled { opacity: .8; cursor: default; }

/* Light mode: menus and field labels in black for easier reading (Omar, 2026-10-15) */
html[data-theme=light] .top nav a, html[data-theme=light] .subnav a, html[data-theme=light] .akq-tabs a, html[data-theme=light] .seg a,
html[data-theme=light] .form label, html[data-theme=light] .form-grid label, html[data-theme=light] label.block,
html[data-theme=light] .compose-fields label:not(.check), html[data-theme=light] .dialog-form label:not(.check), html[data-theme=light] .akq-markbar label,
html[data-theme=light] .akq-letter-form > label, html[data-theme=light] .akq-letter-form .tpl-fields label, html[data-theme=light] .table th { color: var(--text); }

/* Deleting with the admin password (lib/delete.php, assets/delete.js) */
dialog.del-dialog { width: min(440px, calc(100vw - 32px)); background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
dialog.del-dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.del-dialog h2 { margin: 0 0 8px; font-size: 18px; }
.del-dialog #del-what { margin: 0 0 14px; white-space: pre-line; }
.del-dialog label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.del-dialog input[type=password] { font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; width: 100%; box-sizing: border-box; }
.del-dialog .form-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.del-dialog .primary.danger { background: var(--err); color: #fff; border-color: var(--err); }
.del-dialog .del-err { color: var(--err); font-size: 13px; margin: 8px 0 0; }
.del-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 12px 0; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); }
.del-bar[hidden] { display: none; }
input.del-check { width: 16px; height: 16px; accent-color: var(--err); vertical-align: middle; cursor: pointer; }
th.del-sel, td.del-sel { width: 34px; padding-right: 0 !important; }
.tasks li > .del-check, .inbox-item .del-check { margin-top: 4px; flex-shrink: 0; }
.inbox-item { position: relative; }
.inbox-item > .del-check { position: absolute; top: 12px; left: 12px; z-index: 2; }
.del-nav b { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--err); color: #fff; font-size: 11px; text-align: center; line-height: 18px; }
/* e-mail list: tick several e-mails for the Trash folder */
.msg-li { display: flex; align-items: flex-start; }
.msg-li .item { flex: 1; min-width: 0; }
.msg-pick { flex-shrink: 0; width: 15px; height: 15px; margin: 12px 0 0 10px; accent-color: var(--err); cursor: pointer; }
.msg-li .item.unread::before { left: 8px; }
.list-bar { display: flex; flex-wrap: wrap; gap: 8px; }

/* read-only editors for accounts without the right to save (admin 2.6; the server checks again) */
form[data-readonly] button, form[data-readonly] .form-foot { display: none; }
form[data-readonly] input, form[data-readonly] select, form[data-readonly] textarea { opacity: .8; }

/* ---------- mail client: one mailbox with all folders (admin 2.8) ---------- */
.col-head { position: relative; }
.mc-toggle { font: inherit; font-size: 18px; font-weight: 600; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.mc-toggle:hover, .mc-toggle[aria-expanded=true] { color: var(--gold-2); }
.mc-caret { font-size: 13px; color: var(--muted); }
.mc-menu { position: absolute; z-index: 20; top: calc(100% - 6px); left: 14px; min-width: 260px; max-width: calc(100% - 28px); background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px; }
.mc-menu[hidden] { display: none; }
/* the column clips its content (rounded corners); while the account menu is open it may reach below the column (2.8.2) */
.col:has(.mc-menu:not([hidden])) { overflow: visible; position: relative; z-index: 15; }
.mc-menu-title { margin: 6px 10px 4px; font-size: 12px; color: var(--muted); }
.mc-account { text-align: left; font: inherit; font-size: 14px; color: var(--text); background: none; border: 0; border-radius: 10px; padding: 9px 10px; cursor: pointer; overflow-wrap: anywhere; }
.mc-account:hover, .mc-account:focus-visible { background: var(--gold-bg); outline: none; }

dialog#mc { width: min(1320px, 97vw); height: 92vh; max-height: 92vh; padding: 0; border: 1px solid var(--line-2); border-radius: 20px;
  background: var(--panel); color: var(--text); box-shadow: var(--shadow); overflow: hidden; display: none; flex-direction: column; }
dialog#mc[open] { display: flex; }
dialog#mc::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.mc-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mc-head h3 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.mc-gap { flex: 1; }
.mc-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px minmax(280px, 380px) 1fr; }
.mc-folders { border-right: 1px solid var(--line); overflow-y: auto; padding: 8px; }
.mc-folders ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mc-folder { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; font: inherit; font-size: 14px; color: var(--text); background: none; border: 0; border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.mc-folder:hover { background: var(--panel-2); }
.mc-folder.on { background: var(--gold-bg); color: var(--gold-2); font-weight: 600; }
.mc-fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-folder .count { font-size: 11px; background: var(--gold); color: #0b0b0b; border-radius: 999px; padding: 1px 7px; }
.mc-fcount { font-size: 12px; color: var(--muted); }
.mc-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.mc-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); min-height: 44px; }
.mc-all { display: flex; align-items: center; }
.mc-all input, .mc-pick { width: 17px; height: 17px; accent-color: var(--gold); flex-shrink: 0; }
.mc-folder-name { font-weight: 600; font-size: 14px; }
.mc-items { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.mc-item { display: flex; align-items: flex-start; gap: 10px; padding: 0 0 0 12px; border-bottom: 1px solid var(--line); }
.mc-item .mc-pick { margin-top: 13px; }
.mc-item.on { background: var(--gold-bg); }
.mc-row { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left; font: inherit; color: inherit; background: none; border: 0; padding: 10px 12px 10px 0; cursor: pointer; }
.mc-row-top { display: flex; gap: 8px; align-items: baseline; }
.mc-from { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--muted); }
.mc-date { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.mc-subj { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-item.unseen .mc-from { color: var(--text); font-weight: 600; }
.mc-item.unseen .mc-subj { font-weight: 600; }
.mc-item.unseen .mc-row-top::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex-shrink: 0; align-self: center; }
.mc-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.mc-pager[hidden] { display: none; }
.mc-read { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.mc-read[hidden] { display: none; }
.mc-read-head { padding: 14px 20px 10px; border-bottom: 1px solid var(--line); }
.mc-subject { margin: 0 0 6px; font-size: 18px; overflow-wrap: anywhere; }
.mc-meta { margin: 0 0 10px; font-size: 14px; overflow-wrap: anywhere; }
.mc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mc-actions[hidden] { display: none; }
.mc-frame { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; background: #fff; }
.mc-frame iframe { display: block; width: 100%; border: 0; min-height: 200px; background: #fff; }
.mc-atts { border-top: 1px solid var(--line); }
dialog.mc-compose-dlg { width: min(820px, 96vw); max-height: 94vh; padding: 0; border: 1px solid var(--line-2); border-radius: 20px;
  background: var(--panel); color: var(--text); box-shadow: var(--shadow); overflow: hidden; }
dialog.mc-compose-dlg::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
@media (max-width: 1100px) {
  .mc-body { grid-template-columns: 170px minmax(240px, 320px) 1fr; }
}
/* tablets and phones: folders as a strip on top, then the list; an opened e-mail takes the whole window */
@media (max-width: 899px) {
  dialog#mc { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .mc-body { display: flex; flex-direction: column; }
  .mc-folders { border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; padding: 6px 8px; flex-shrink: 0; }
  .mc-folders ul { display: flex; gap: 4px; }
  .mc-folder { white-space: nowrap; padding: 7px 12px; }
  .mc-list { border-right: 0; flex: 1; }
  dialog#mc.reading .mc-folders, dialog#mc.reading .mc-list { display: none; }
  dialog#mc.reading .mc-read { flex: 1; }
  .mc-head { padding: 10px 12px; gap: 8px; }
  .mc-head h3 { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mc-head .mc-gap { display: none; }
  .mc-head h3 { flex: 1; }
  .mc-new { white-space: nowrap; }
  .mc-read-head { padding: 12px 14px 10px; }
  .act { padding: 7px 12px; }
  dialog.mc-compose-dlg { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
}

/* ---------- main menu (admin 2.9): Postfächer | 5LL | websites, 5LL sub-row ---------- */
.top .nav-main { flex: 1; justify-content: center; }
.top .nav-main a { font-weight: 500; color: var(--muted); }
.top .nav-main a.on { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.top .nav-main a.on::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 7px; vertical-align: 2px; }
.top-tools { display: flex; align-items: center; gap: 6px; }
.top-tools form { margin: 0; }
.top-tools a { color: var(--muted); padding: 8px 12px; border-radius: 999px; font-size: 14px; }
.top-tools a:hover { color: var(--text); text-decoration: none; background: var(--hover); }
.top-tools a.on { color: var(--text); background: var(--panel-2); }
.top .nav-sub { flex-basis: 100%; gap: 4px; margin: 2px 0 -6px; padding-top: 8px; border-top: 1px solid var(--line); }
.top .nav-sub a { font-size: 13.5px; padding: 6px 12px; }
.top .nav-sub a.on { color: var(--text); background: var(--gold-bg); box-shadow: inset 0 0 0 1px var(--gold); }
@media (max-width: 900px) {
  .top .nav-main { order: 3; flex-basis: 100%; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .top .nav-main::-webkit-scrollbar, .top .nav-sub::-webkit-scrollbar { display: none; }
  .top .nav-main a, .top .nav-sub a { white-space: nowrap; }
  .top .nav-sub { order: 4; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 640px) {
  .top-tools { gap: 4px; }
  .top-tools a { padding: 6px 9px; font-size: 13px; }
}
html[data-theme=light] .top-tools a { color: var(--muted); }
/* phones: the header with up to three menu rows scrolls away, so the page keeps its space */
@media (max-width: 640px) {
  .top { position: static; }
}
