/* SF-Cloud Webmail – Farben aus dem SF-Cloud-Portal (app.css), dunkel und hell. */
:root {
  color-scheme: dark;
  --bg: #0a0e13;
  --sidebar: #0d1218;
  --panel: #10161d;
  --panel2: #151d26;
  --field: #0c1118;
  --raised: #1b2532;
  --raised2: #263141;
  --line: #232e3a;
  --line-soft: #151d26;
  --line-strong: #3a4a5e;
  --text: #e6edf3;
  --text-strong: #ffffff;
  --text-soft: #c9d5e6;
  --muted: #8b9aab;
  --placeholder: #6b7a8b;
  --mint: #2dd4a7;
  --mint-hover: #4fe0b9;
  --mint-ink: #052820;
  --mint-text: #9eeed6;
  --mint-soft: rgba(45, 212, 167, .12);
  --mint-ring: rgba(45, 212, 167, .15);
  --red-text: #ffabb2;
  --red-soft: rgba(255, 107, 118, .12);
  --amber-text: #ffd989;
  --info: #7aa9ff;
  --logo-a: #F2F4F6;
  --logo-b: #2DD4A7;
  --logo-c: #0E1420;
  --shadow: 0 18px 40px rgba(0, 0, 0, .35);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f8;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --panel2: #f6f8fa;
  --field: #ffffff;
  --raised: #eef2f6;
  --raised2: #e3e8ef;
  --line: #dde3ea;
  --line-soft: #eef1f5;
  --line-strong: #c4cdd8;
  --text: #0f1720;
  --text-strong: #0b1118;
  --text-soft: #334155;
  --muted: #5b6878;
  --placeholder: #8a96a5;
  --mint: #0b8a6b;
  --mint-hover: #097a5f;
  --mint-ink: #ffffff;
  --mint-text: #08735a;
  --mint-soft: rgba(11, 138, 107, .1);
  --mint-ring: rgba(11, 138, 107, .15);
  --red-text: #b42332;
  --red-soft: rgba(209, 53, 68, .08);
  --amber-text: #7a4f00;
  --info: #2f6fdb;
  --logo-a: #0E1420;
  --logo-b: #0B8068;
  --logo-c: #F2F4F6;
  --shadow: 0 8px 24px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--mint-text); text-decoration: none; }
a:hover { color: var(--mint); }
h1, h2, h3 { color: var(--text-strong); letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.eyebrow { color: var(--mint); text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.icon { flex: 0 0 auto; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* Logo */
.logo-a { fill: var(--logo-a); }
.logo-b { fill: var(--logo-b); }
.logo-c { fill: var(--logo-c); }
.logo-d { stroke: var(--logo-c); stroke-width: 4; stroke-linecap: round; }
.logo-link { stroke: var(--logo-b); stroke-width: 4; stroke-linecap: round; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-strong); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.brand-text small { font-size: 10px; letter-spacing: .3em; color: var(--mint); }

/* Formularelemente */
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-ring); }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--mint); }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 14px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel2); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.button:hover { border-color: var(--line-strong); color: var(--text); }
.button.primary { background: var(--mint); border-color: var(--mint); color: var(--mint-ink); }
.button.primary:hover { background: var(--mint-hover); border-color: var(--mint-hover); color: var(--mint-ink); }
.button.ghost { background: transparent; }
.button.small { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.button.wide { width: 100%; min-height: 46px; }
.icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 6px;
  background: transparent; color: var(--text-soft); cursor: pointer; list-style: none;
}
.icon-button::-webkit-details-marker { display: none; }
.icon-button:hover { border-color: var(--line-strong); color: var(--text); }
.icon-button.active { color: var(--amber-text); border-color: var(--line-strong); }
.icon-button.danger { color: var(--red-text); }
.link-button { border: 0; background: none; color: var(--mint-text); font: inherit; cursor: pointer; padding: 0 4px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }

/* Meldungen */
.flashes { display: grid; gap: 8px; }
.flash { padding: 9px 12px; border-radius: 6px; border: 1px solid var(--line); font-size: 13px; }
.flash-ok { border-color: rgba(45, 212, 167, .35); background: var(--mint-soft); color: var(--mint-text); }
.flash-error { border-color: rgba(255, 107, 118, .4); background: var(--red-soft); color: var(--red-text); }
.notice { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel2); color: var(--muted); font-size: 13px; }
.notice span { flex: 1; }

/* Farbschema-Umschalter */
.theme-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); }
.theme-switch button { padding: 5px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: var(--raised); color: var(--mint-text); font-weight: 600; }

/* Avatare */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; font-size: 12px; font-weight: 700; }
.avatar.large { width: 42px; height: 42px; font-size: 14px; }
.avatar-0 { background: #7aa9ff; color: #08142a; }
.avatar-1 { background: #2dd4a7; color: #052820; }
.avatar-2 { background: #f2b544; color: #2a1c00; }
.avatar-3 { background: #ffabb2; color: #3a0a10; }
.avatar-4 { background: #c9d5e6; color: #10161d; }
.avatar-5 { background: #b9a4ff; color: #1b1033; }
[data-theme="light"] .avatar-0 { background: #dce8fb; color: #1d4fa8; }
[data-theme="light"] .avatar-1 { background: #d5f0e8; color: #08735a; }
[data-theme="light"] .avatar-2 { background: #fbefd6; color: #7a4f00; }
[data-theme="light"] .avatar-3 { background: #fbe3e5; color: #b42332; }
[data-theme="light"] .avatar-4 { background: #e3e8ef; color: #334155; }
[data-theme="light"] .avatar-5 { background: #ebe5fb; color: #5b3fb5; }

/* Anmeldung */
.login { display: grid; grid-template-columns: minmax(380px, 560px) minmax(0, 1fr); min-height: 100vh; }
.login-intro { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 48px 56px; background: var(--sidebar); border-right: 1px solid var(--line); }
.login-intro .brand-text strong { font-size: 20px; }
.login-intro .brand-text small { font-size: 11px; }
.login-claim { display: grid; gap: 18px; }
.login-claim h1 { font-size: clamp(32px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.04em; }
.login-claim .muted { max-width: 400px; font-size: 15px; }
.login-links { display: flex; gap: 20px; font-size: 13px; }
.login-links a { color: var(--muted); }
.login-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 40px 20px; }
.login-card { width: min(420px, 100%); display: grid; gap: 18px; padding: 34px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.login-card h2 { font-size: 26px; letter-spacing: -.03em; margin-bottom: 4px; }
.login-mobile-brand { display: none; }

/* App-Rahmen */
.shell { display: grid; grid-template-columns: 240px 420px minmax(0, 1fr); height: 100vh; overflow: hidden; }
.sidebar { display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 16px 10px 12px; background: var(--sidebar); border-right: 1px solid var(--line); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 4px; }
.sidebar-close { display: none; }
.compose-button { margin: 0 4px; min-height: 42px; }
.folders { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; flex: 1; }
.folder { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 6px; color: var(--text-soft); }
.folder:hover { background: var(--panel2); color: var(--text); }
.folder.active { background: var(--mint-soft); color: var(--mint-text); font-weight: 600; }
.folder-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.folder-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder.depth-1 { padding-left: 26px; }
.folder.depth-2 { padding-left: 42px; }
.folder.depth-3 { padding-left: 58px; }
.count { font-size: 12px; font-weight: 600; color: var(--muted); }
.folder.active .count { color: var(--mint); }
.sidebar-foot { display: grid; gap: 10px; }
.account-box { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.quota-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.quota { width: 100%; height: 6px; }
meter.quota::-webkit-meter-bar { background: var(--raised); border: 0; border-radius: 3px; height: 6px; }
meter.quota::-webkit-meter-optimum-value { background: var(--mint); border-radius: 3px; }
meter.quota::-webkit-meter-suboptimum-value { background: #f2b544; border-radius: 3px; }
meter.quota::-webkit-meter-even-less-good-value { background: #ff6b76; border-radius: 3px; }
meter.quota::-moz-meter-bar { background: var(--mint); border-radius: 3px; }
.account { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-mail { font-size: 12px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.account-actions form { margin: 0; }
.account-actions .button { padding: 4px 8px; }
.sidebar-backdrop { display: none; }

/* Nachrichtenliste */
.list-pane { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg); }
.list-head { display: grid; gap: 12px; padding: 16px 16px 10px; border-bottom: 1px solid var(--line); }
.list-title { display: flex; align-items: center; gap: 10px; }
.list-title h1 { flex: 1; font-size: 22px; letter-spacing: -.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-button { display: none; }
.search { position: relative; margin: 0; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 36px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active { border-color: rgba(45, 212, 167, .4); background: var(--mint-soft); color: var(--mint-text); font-weight: 600; }
.bulk { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 18px; border-bottom: 1px solid var(--line); margin: 0; }
.select-all { display: flex; }
.bulk-count { flex: 1; font-size: 12px; color: var(--muted); }
.bulk-actions { display: flex; gap: 4px; }
.bulk-actions .icon-button { width: 32px; height: 32px; }
.rows { flex: 1; overflow-y: auto; }
.row-group { padding: 12px 16px 4px; color: var(--muted); text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.row { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 0 16px 0 18px; border-bottom: 1px solid var(--line-soft); }
.row:hover { background: var(--panel); }
.row.active { background: var(--panel2); box-shadow: inset 3px 0 0 var(--mint); }
.row.selected { background: var(--mint-soft); }
.row-check { margin-top: 15px !important; }
.row-link { display: grid; gap: 1px; flex: 1; min-width: 0; padding: 11px 0; color: var(--text-soft); }
.row-link:hover { color: var(--text-soft); }
.row-top { display: flex; justify-content: space-between; gap: 10px; }
.row-from, .row-subject, .row-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-from { color: var(--text); }
.row-meta { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.row-meta .flagged { color: var(--amber-text); }
.row-preview { font-size: 13px; color: var(--muted); }
.row.unread .row-from, .row.unread .row-subject { font-weight: 650; color: var(--text-strong); }
.row.unread .row-link::before { content: ""; position: absolute; left: 6px; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.row.unread time { color: var(--mint-text); font-weight: 600; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); }

/* Lesebereich */
.reader { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.reader-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 24px; border-bottom: 1px solid var(--line); margin: 0; }
.reader-back { display: none; }
.toolbar-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.move-menu { position: relative; }
.move-panel { position: absolute; right: 0; top: 42px; z-index: 5; display: grid; gap: 10px; width: 260px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.message { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 22px 28px 20px; gap: 16px; overflow-y: auto; }
.message-head { display: grid; gap: 14px; }
.message-head h2 { font-size: 24px; line-height: 1.2; letter-spacing: -.03em; overflow-wrap: anywhere; }
.message-from { display: flex; align-items: center; gap: 12px; }
.message-people { display: grid; gap: 1px; min-width: 0; }
.message-people p { overflow-wrap: anywhere; }
.message-paper { flex: 1; min-height: 420px; display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #ffffff; }
.message-frame { flex: 1; width: 100%; min-height: 420px; border: 0; background: #ffffff; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-soft); font-size: 15px; line-height: 1.6; max-width: 820px; }
.message-text .quote { color: var(--muted); }
.attachments { display: grid; gap: 8px; }
.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.attachment { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--muted); }
.attachment:hover { border-color: var(--line-strong); color: var(--text); }
.file-badge { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 6px; background: var(--raised); color: var(--info); font-size: 10px; font-weight: 700; }
.attachment-name { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.attachment-name strong { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-name small { color: var(--muted); }
.reader-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }

/* Einfache Seiten: Schreiben, Einstellungen, Fehler */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; padding: 0 max(20px, calc((100vw - 1100px) / 2)); background: var(--sidebar); border-bottom: 1px solid var(--line); }
.page { width: min(1100px, calc(100% - 32px)); margin: 28px auto 60px; display: grid; gap: 18px; }
.page.narrow { width: min(520px, calc(100% - 32px)); margin-top: 12vh; }
.page-head { display: grid; gap: 4px; }
.page-head h1 { font-size: 30px; letter-spacing: -.04em; }
.compose { display: grid; gap: 14px; }
.compose-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.compose-head h1 { font-size: 22px; letter-spacing: -.03em; overflow-wrap: anywhere; }
.compose-fields { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 8px 12px; }
.compose-fields > label { font-weight: 500; color: var(--muted); }
.from-fixed { padding: 9px 0; color: var(--text-soft); }
.field-with-toggle { display: flex; align-items: center; gap: 8px; }
.compose-body { min-height: 360px; resize: vertical; font-size: 15px; line-height: 1.6; padding: 14px 16px; }
.editor-wrap { display: grid; }
.editor-toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--panel2); }
.editor-toolbar + .compose-body, .editor-toolbar ~ .compose-body { border-top-left-radius: 0; border-top-right-radius: 0; }
.tool { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 32px; height: 32px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-soft); font: inherit; font-size: 14px; cursor: pointer; }
/* Hover nur andeuten (und nur mit Maus), damit er nicht wie "gedrückt" aussieht. */
@media (hover: hover) {
  .tool:not(.active):not(:disabled):hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
}
.tool.active { background: var(--mint-soft); color: var(--mint-text); box-shadow: inset 0 0 0 1px rgba(45, 212, 167, .45); }
[data-theme="light"] .tool.active { box-shadow: inset 0 0 0 1px rgba(11, 138, 107, .45); }
.tool:disabled { opacity: .35; cursor: default; background: transparent; }
.tool-sep { width: 1px; height: 20px; margin: 0 6px; background: var(--line); }
.tool-mode { margin-left: auto; font-size: 12px; color: var(--muted); border: 1px solid var(--line); }
.tool-mode[aria-pressed="true"] { color: var(--mint-text); border-color: rgba(45, 212, 167, .4); }
.editor { min-height: 360px; max-height: 60vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--field); color: var(--text); outline: none; overflow-wrap: anywhere; }
.editor:focus { border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-ring); }
.editor blockquote { margin: 6px 0; padding-left: 12px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.editor ul, .editor ol { margin: 4px 0; padding-left: 26px; }
.editor a { color: var(--mint-text); text-decoration: underline; }
.editor p { margin: 0 0 8px; }
.kept { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 0; }
.kept legend { padding: 0 6px; color: var(--muted); font-size: 12px; }
.compose-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.push-right { margin-left: auto; }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-nav { display: grid; gap: 2px; position: sticky; top: 16px; }
.settings-nav a { padding: 9px 12px; border-radius: 6px; color: var(--text-soft); }
.settings-nav a:hover { background: var(--panel2); color: var(--text); }
.settings-nav a.active { background: var(--mint-soft); color: var(--mint-text); font-weight: 600; }
.settings-content { display: grid; gap: 16px; min-width: 0; }
.settings-content .notice { margin: 0; }
.settings-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.settings-title h2 { margin-bottom: 4px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--raised2); transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + .switch-track { background: var(--mint); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: var(--mint-ink); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--mint); outline-offset: 2px; }
.switch:has(input:checked) { border-color: rgba(45, 212, 167, .45); color: var(--mint-text); }
.address-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.address-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--field); }
.rule-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rule { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); }
.rule.disabled .rule-text { opacity: .6; }
.rule-text { display: grid; gap: 2px; min-width: 0; flex: 1 1 280px; }
.rule-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; }
.rule-actions .icon-button { width: 32px; height: 32px; }
.rule-actions .icon-button:disabled { opacity: .35; cursor: default; }
.settings { display: grid; gap: 16px; max-width: 760px; }
.settings h2 { font-size: 17px; }
.settings small { font-weight: 400; }
.settings .theme-switch { max-width: 320px; }
.error-card { display: grid; gap: 18px; justify-items: start; }
.error-card h1 { font-size: 20px; }

/* Schmale Bildschirme */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 220px 340px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  body.page-mail { overflow: hidden; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 30; width: min(300px, 86vw);
    transform: translateX(-100%); transition: transform .18s ease;
  }
  .sidebar-open .sidebar { transform: none; }
  .sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .45); }
  .sidebar-close, .menu-button { display: inline-flex; }
  .list-pane { border-right: 0; height: 100vh; }
  .reader { display: none; height: 100vh; }
  .has-message .list-pane { display: none; }
  .has-message .reader { display: flex; }
  .reader-back { display: inline-flex; }
  .reader-toolbar { padding: 10px 12px; }
  .toolbar-group .button span { display: none; }
  .message { padding: 16px; }
  .message-head h2 { font-size: 20px; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-intro { display: none; }
  .login-mobile-brand { display: block; }
  .login-card { padding: 24px 20px; }
  .compose-fields { grid-template-columns: minmax(0, 1fr); }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .form-row, .form-row.three { grid-template-columns: minmax(0, 1fr); }
  .settings-title { flex-direction: column; }
  .push-right { margin-left: 0; }
}
