:root {
  --blue: #0072c6; --blue-d: #005a9e; --blue-l: #cde6f7; --blue-h: #e5f1fb;
  --line: #d4d4d4; --line-l: #e6e6e6; --bg: #f1f1f1; --text: #262626; --muted: #6a6a6a;
  --red: #d13438; --hour: 44px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 13px/1.35 "Segoe UI", "Segoe UI Web", Tahoma, "Helvetica Neue", Arial, sans-serif; color: var(--text); background: #fff; overflow: hidden; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.sprite { position: absolute; width: 0; height: 0; }
symbol .acc { stroke: #1e8e3e; stroke-width: 2; }
symbol .red { stroke: var(--red); stroke-width: 2.2; }
symbol .fill-p { fill: #8b4fb5; stroke: #6d3a93; stroke-width: 1; }
symbol .fill-b { fill: var(--blue); stroke: var(--blue-d); stroke-width: 1; }

/* ---------- Anmeldung */
.auth { position: fixed; inset: 0; background: var(--blue); display: flex; align-items: center; justify-content: center; z-index: 50; }
.auth-box { background: #fff; width: 340px; padding: 28px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.auth-logo { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 300; color: var(--blue); }
.auth-logo svg { width: 34px; height: 34px; }
.auth-box p { margin: 0; color: var(--muted); }
.auth-box input { padding: 8px; border: 1px solid #aaa; }
.auth-err { color: var(--red); min-height: 18px; }

/* ---------- Rahmen */
.app { display: flex; flex-direction: column; height: 100%; }
.titlebar { background: var(--blue); color: #fff; height: 30px; display: flex; align-items: center; padding: 0 4px 0 10px; flex: none; }
.tb-app svg { width: 18px; height: 18px; display: block; }
.tb-title { flex: 1; text-align: center; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-btn { color: #fff; padding: 5px 12px; font-size: 12px; }
.tb-btn:hover { background: var(--blue-d); }
.tabs { background: var(--blue); display: flex; padding-left: 0; flex: none; height: 28px; }
.tab { color: #fff; padding: 0 16px; font-size: 13px; height: 28px; }
.tab:hover { background: #2a8ad4; }
.tab.file { background: #19478a; text-transform: none; }
.tab.file:hover { background: #2a5aa3; }
.tab.active { background: var(--bg); color: var(--blue); }

.ribbon { background: var(--bg); border-bottom: 1px solid var(--line); flex: none; height: 94px; overflow: hidden; }
.rb { display: flex; height: 100%; padding: 2px 4px 0; }
.rg { display: flex; flex-direction: column; border-right: 1px solid #d9d9d9; padding: 0 5px; }
.rg-b { flex: 1; display: flex; align-items: stretch; gap: 1px; }
.rg-b.col { flex-direction: column; justify-content: center; align-items: stretch; }
.rg-l { text-align: center; font-size: 11px; color: var(--muted); padding: 1px 0 3px; white-space: nowrap; }
.rbig { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 7px 2px; min-width: 50px; font-size: 12px; line-height: 1.15; border: 1px solid transparent; text-align: center; }
.rbig svg { width: 30px; height: 30px; stroke: #4d4d4d; stroke-width: 1.2; }
.rsmall { display: flex; align-items: center; gap: 6px; padding: 3px 7px; font-size: 12px; border: 1px solid transparent; white-space: nowrap; }
.rsmall svg { stroke: #4d4d4d; }
.rbig:hover, .rsmall:hover { background: #c5ddf2; border-color: #a3c8ea; }
.rbig:active, .rsmall:active, .rbig.on { background: #a9cdee; border-color: #7fb3e0; }
.rbig:disabled, .rsmall:disabled { opacity: .4; pointer-events: none; }

.main { flex: 1; display: flex; min-height: 0; }
.statusbar { white-space: pre; background: var(--blue); color: #fff; height: 22px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; font-size: 12px; flex: none; }
.st-right { display: flex; gap: 22px; }

.splitter { width: 5px; margin: 0 -2px; cursor: col-resize; z-index: 3; flex: none; position: relative; }
.splitter::after { content: ""; position: absolute; left: 2px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.splitter:hover::after, .splitter.drag::after { background: var(--blue); width: 2px; }

/* ---------- Ordnerbereich */
.navpane { width: 230px; min-width: 150px; max-width: 480px; display: flex; flex-direction: column; background: #fff; flex: none; }
.nav-scroll { flex: 1; overflow-y: auto; padding: 6px 0; }
.nav-h { display: flex; align-items: center; gap: 2px; padding: 5px 8px 4px 4px; font-size: 14px; color: var(--text); cursor: pointer; user-select: none; }
.nav-h span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-h svg { width: 12px; height: 12px; stroke-width: 2.4; transform: rotate(90deg); transition: transform .1s; color: #777; }
.nav-h.closed svg { transform: none; }
.nav-h.closed + .nav-sec { display: none; }
.nav-sec { margin-bottom: 8px; }
.fld { display: flex; align-items: center; gap: 6px; height: 25px; padding-right: 10px; cursor: default; white-space: nowrap; user-select: none; }
.fld:hover { background: var(--blue-h); }
.fld.sel { background: var(--blue-l); }
.fld.drop { outline: 2px solid var(--blue); outline-offset: -2px; background: var(--blue-h); }
.fld.nosel { color: var(--muted); }
.fld .caret { width: 14px; height: 25px; display: flex; align-items: center; justify-content: center; flex: none; }
.fld .caret svg { width: 9px; height: 9px; stroke-width: 3; color: #888; }
.fld .caret.open svg { transform: rotate(90deg); }
.fld > svg { color: #5d6d7e; width: 15px; height: 15px; }
.fld .fn { overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.fld .cnt { color: var(--blue); font-weight: 600; margin-left: 2px; }
.fld.unread .fn { font-weight: 600; }
.modules { border-top: 1px solid var(--line); display: flex; gap: 2px; padding: 5px 6px; flex: none; background: #fff; }
.mod { display: flex; align-items: center; gap: 7px; padding: 6px 10px; font-size: 15px; color: #555; }
.mod svg { width: 22px; height: 22px; stroke-width: 1.3; }
.mod:hover { background: var(--blue-h); }
.mod.active { color: var(--blue); }

/* ---------- Nachrichtenliste */
.mailview { flex: 1; display: flex; min-width: 0; }
.listpane { width: 380px; min-width: 240px; max-width: 70%; display: flex; flex-direction: column; flex: none; }
.searchbox { margin: 8px 8px 4px; position: relative; flex: none; }
.searchbox input { width: 100%; height: 26px; border: 1px solid #ababab; padding: 2px 28px 2px 7px; outline: none; }
.searchbox input:focus { border-color: var(--blue); }
.searchbox svg { position: absolute; right: 7px; top: 5px; color: #666; pointer-events: none; }
.listbar { display: flex; align-items: baseline; gap: 14px; padding: 4px 10px 5px; flex: none; }
.lf { font-size: 14px; color: #555; padding: 1px 0; border-bottom: 2px solid transparent; }
.lf:hover { color: var(--blue); }
.lf.active { color: var(--blue); font-weight: 600; border-color: var(--blue); }
.sort { margin-left: auto; font-size: 12px; color: var(--muted); }
.msglist { flex: 1; overflow-y: auto; outline: none; border-top: 1px solid var(--line-l); }
.grp { font-size: 12px; font-weight: 600; color: #444; padding: 7px 10px 3px; border-bottom: 1px solid var(--line-l); background: #fff; position: sticky; top: 0; z-index: 1; }
.msg { padding: 5px 10px 6px 12px; border-bottom: 1px solid #ececec; border-left: 4px solid transparent; cursor: default; position: relative; }
.msg:hover { background: var(--blue-h); }
.msg.sel { background: var(--blue-l); }
.msg.unread { border-left-color: var(--blue); }
.m1, .m2 { display: flex; align-items: center; gap: 6px; }
.m-from { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-subj { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #555; }
.m-date { font-size: 12px; color: #555; white-space: nowrap; }
.msg.unread .m-from { font-weight: 600; }
.msg.unread .m-subj, .msg.unread .m-date { color: var(--blue); font-weight: 600; }
.m-ico { display: flex; gap: 4px; align-items: center; color: #666; }
.m-ico svg { width: 13px; height: 13px; }
.m-ico .flag svg { stroke: var(--red); fill: var(--red); }
.m-ico .ans svg { width: 12px; height: 12px; }
.list-info { padding: 28px 16px; color: var(--muted); text-align: center; }
.list-more { padding: 10px; text-align: center; color: var(--muted); font-size: 12px; }

/* ---------- Lesebereich */
.readpane { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; }
.rp-empty { margin: auto; color: #8a8a8a; text-align: center; }
.rp-empty svg { width: 64px; height: 64px; stroke-width: .8; color: #c8c8c8; display: block; margin: 0 auto 8px; }
.rp-actions { display: flex; gap: 14px; padding: 8px 16px 0; flex: none; }
.rp-actions button { display: flex; align-items: center; gap: 5px; color: #444; font-size: 13px; padding: 2px 0; }
.rp-actions button:hover { color: var(--blue); }
.rp-head { padding: 8px 16px 10px; display: flex; gap: 12px; border-bottom: 1px solid var(--line-l); flex: none; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: #7a94b8; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.rp-meta { min-width: 0; flex: 1; }
.rp-date { color: var(--muted); font-size: 12px; }
.rp-from { font-size: 15px; overflow-wrap: anywhere; }
.rp-from small { color: var(--muted); font-size: 12px; }
.rp-subj { font-size: 16px; margin: 1px 0 3px; overflow-wrap: anywhere; }
.rp-to { color: #555; font-size: 12px; overflow-wrap: anywhere; }
.rp-info { background: #fdf6d8; border-bottom: 1px solid #e9dfa8; padding: 5px 16px; font-size: 12px; flex: none; }
.rp-info button { color: var(--blue); text-decoration: underline; margin-left: 6px; }
.rp-atts { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--line-l); flex: none; }
.att { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 4px 10px 4px 7px; color: var(--text); text-decoration: none; max-width: 260px; background: #fafafa; }
.att:hover { background: var(--blue-h); border-color: #a3c8ea; }
.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att small { color: var(--muted); white-space: nowrap; }
.rp-body { flex: 1; min-height: 0; display: flex; }
.rp-body iframe { flex: 1; border: 0; width: 100%; background: #fff; }
.rp-body pre { flex: 1; margin: 0; padding: 14px 16px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.45 "Segoe UI", Tahoma, Arial, sans-serif; }

.mailview.bottom { flex-direction: column; }
.mailview.bottom .listpane { width: auto !important; max-width: none; height: 42%; min-height: 120px; }
.mailview.bottom > .splitter { display: none; }
.mailview.bottom .readpane { border-top: 1px solid var(--line); }

/* ---------- Kalender */
.calview { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cal-head { display: flex; align-items: center; gap: 4px; padding: 8px 12px; flex: none; }
.cal-head h2 { font-size: 20px; font-weight: 300; margin: 0 0 0 8px; }
.cal-nav { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; color: #555; }
.cal-nav:hover { background: var(--blue-h); color: var(--blue); }
.cal-nav svg { stroke-width: 2; }
.cal-msg { margin-left: auto; color: var(--muted); font-size: 12px; }
.cal-body { flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.cal-empty { margin: auto; text-align: center; color: var(--muted); max-width: 420px; padding: 20px; }

.tg-head, .tg-allday { display: flex; flex: none; padding-right: var(--sbw, 0px); }
.tg-gutter { width: 52px; flex: none; font-size: 11px; color: var(--muted); text-align: right; padding-right: 6px; }
.tg-dayh { flex: 1; min-width: 0; border-left: 1px solid var(--line); padding: 4px 8px; font-size: 12px; color: #444; text-transform: uppercase; border-top: 3px solid transparent; cursor: pointer; white-space: nowrap; overflow: hidden; }
.tg-dayh b { font-size: 15px; font-weight: 400; margin-right: 6px; }
.tg-dayh.today { border-top-color: var(--blue); color: var(--blue); background: #f0f7fd; }
.tg-allday { border-bottom: 1px solid var(--line); min-height: 24px; }
.tg-adcol { flex: 1; min-width: 0; border-left: 1px solid var(--line); padding: 1px 2px 2px; display: flex; flex-direction: column; gap: 1px; }
.tg-scroll { flex: 1; overflow-y: scroll; position: relative; }
.tg-grid { display: flex; height: calc(var(--hour) * 24); position: relative; }
.tg-hours { width: 52px; flex: none; position: relative; }
.tg-hours div { height: var(--hour); font-size: 11px; color: var(--muted); text-align: right; padding: 2px 6px 0 0; }
.tg-col { flex: 1; min-width: 0; border-left: 1px solid var(--line); position: relative;
  background-image: linear-gradient(to bottom, var(--line-l) 1px, transparent 1px), linear-gradient(to bottom, #f1f1f1 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2); }
.tg-off { position: absolute; left: 0; right: 0; background: rgba(0,0,0,.045); pointer-events: none; }
.tg-col.weekend { background-color: rgba(0,0,0,.045); }
.tg-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 2; pointer-events: none; }
.ev, .chip { --c-bg: color-mix(in srgb, var(--c) 24%, #fff); }
.ev { position: absolute; background: var(--c-bg); border-left: 5px solid var(--c); padding: 1px 5px; font-size: 12px; overflow: hidden; cursor: pointer; line-height: 1.25; color: #1b1b1b; border-radius: 0 2px 2px 0; box-shadow: 0 0 0 1px #fff; }
.ev:hover { filter: brightness(.95); }
.ev b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev small { color: #444; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { background: var(--c-bg); border-left: 5px solid var(--c); padding: 0 5px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; line-height: 19px; height: 19px; flex: none; }
.chip:hover { filter: brightness(.95); }
.chip i { font-style: normal; color: #444; margin-right: 4px; }

.mg { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: 24px repeat(6, 1fr); min-height: 0; }
.mg-h { font-size: 12px; text-transform: uppercase; color: #444; padding: 4px 8px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mg-c { border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 2px; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1px; }
.mg-c.other { background: #f6f6f6; color: #888; }
.mg-c.today { background: #e9f3fc; box-shadow: inset 0 3px 0 var(--blue); }
.mg-d { font-size: 13px; padding: 1px 5px 2px; cursor: pointer; align-self: flex-start; }
.mg-d:hover { color: var(--blue); text-decoration: underline; }
.mg-c.today .mg-d { color: var(--blue); font-weight: 600; }
.mg-more { font-size: 11px; color: var(--blue); padding-left: 6px; cursor: pointer; }

.mini { padding: 4px 12px 10px; user-select: none; }
.mini-h { display: flex; align-items: center; margin-bottom: 4px; }
.mini-h span { flex: 1; text-align: center; font-size: 13px; }
.mini-h button { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; color: #555; }
.mini-h button:hover { background: var(--blue-h); }
.mini-h svg { width: 11px; height: 11px; stroke-width: 2.5; }
.mini-g { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; }
.mini-g span { height: 22px; line-height: 22px; }
.mini-g .wd { color: var(--muted); font-size: 11px; }
.mini-g .d { cursor: pointer; }
.mini-g .d:hover { background: var(--blue-h); }
.mini-g .o { color: #a0a0a0; }
.mini-g .inr { background: var(--blue-l); }
.mini-g .t { background: var(--blue); color: #fff; }
.cal-item { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 22px; cursor: pointer; }
.cal-item:hover { background: var(--blue-h); }
.cal-item input { accent-color: var(--c); margin: 0; }
.cal-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Fenster / Dialoge */
#overlay:empty { display: none; }
#overlay { position: fixed; inset: 0; background: rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center; z-index: 20; }
.win { background: #fff; border: 1px solid var(--blue); box-shadow: 0 10px 40px rgba(0,0,0,.35); display: flex; flex-direction: column; max-height: 94vh; max-width: 96vw; }
.win + .win { display: none; }
.win-t { background: var(--blue); color: #fff; height: 30px; display: flex; align-items: center; padding-left: 12px; font-size: 12px; flex: none; }
.win-t span { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-t button { width: 44px; height: 30px; color: #fff; font-size: 15px; }
.win-t button:hover { background: #e81123; }
.win-tools { background: var(--bg); border-bottom: 1px solid var(--line); display: flex; gap: 2px; padding: 4px 8px; flex: none; }
.win-b { padding: 14px 16px; overflow: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.win-f { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line-l); flex: none; }
.btn { border: 1px solid #adadad; background: #e1e1e1; padding: 5px 18px; min-width: 84px; }
.btn:hover { background: #e5f1fb; border-color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-d); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.link { border: 0; background: none; color: var(--red); min-width: 0; margin-right: auto; padding-left: 0; }

.compose { width: 860px; height: 640px; }
.compose .win-b { padding: 10px 14px 12px; gap: 0; }
.c-row { display: flex; align-items: center; border-bottom: 1px solid var(--line-l); flex: none; }
.c-row label { width: 70px; color: #555; flex: none; }
.c-row input { flex: 1; border: 0; outline: none; padding: 7px 4px; min-width: 0; }
.c-row .mini-link { color: var(--blue); font-size: 12px; padding: 0 4px; }
.c-send { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1px solid #c5c5c5; padding: 8px 12px; margin-right: 12px; font-size: 12px; align-self: stretch; justify-content: center; }
.c-send svg { width: 26px; height: 26px; stroke-width: 1.2; }
.c-send:hover { background: #c5ddf2; border-color: #a3c8ea; }
.c-top { display: flex; flex: none; }
.c-fields { flex: 1; min-width: 0; }
.c-atts { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 0; flex: none; }
.c-atts:empty { display: none; }
.c-atts .att button { color: #777; margin-left: 2px; font-size: 14px; }
.c-atts .att button:hover { color: var(--red); }
.compose textarea { flex: 1; border: 0; outline: none; resize: none; padding: 12px 2px 0; font: 14px/1.45 "Segoe UI", Tahoma, Arial, sans-serif; min-height: 120px; }

.form { display: grid; grid-template-columns: 150px 1fr; gap: 8px 10px; align-items: center; }
.form h3 { grid-column: 1 / -1; margin: 10px 0 0; font-size: 15px; font-weight: 400; color: var(--blue); border-bottom: 1px solid var(--line-l); padding-bottom: 3px; }
.form h3:first-child { margin-top: 0; }
.form input[type=text], .form input[type=password], .form input[type=number], .form input[type=email], .form input[type=url],
.form input[type=date], .form input[type=time], .form select, .form textarea { border: 1px solid #ababab; padding: 4px 6px; width: 100%; outline: none; background: #fff; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--blue); }
.form .inline { display: flex; gap: 8px; align-items: center; }
.form .inline input[type=number] { width: 80px; }
.form .hint { grid-column: 2; color: var(--muted); font-size: 12px; margin-top: -4px; }
.form .full { grid-column: 1 / -1; }
.form textarea { resize: vertical; min-height: 70px; }
.check { display: flex; align-items: center; gap: 6px; }
.tests { margin-top: 12px; font-size: 12px; }
.tests div { padding: 2px 0; }
.tests .ok { color: #107c10; }
.tests .bad { color: var(--red); }
.note { background: #fdf6d8; border: 1px solid #e9dfa8; padding: 5px 8px; font-size: 12px; margin-bottom: 10px; }

.menu { position: fixed; background: #fff; border: 1px solid #c6c6c6; box-shadow: 0 4px 14px rgba(0,0,0,.2); z-index: 30; max-height: 60vh; overflow-y: auto; min-width: 200px; padding: 3px 0; }
.menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 5px 14px 5px 10px; white-space: nowrap; }
.menu button:hover { background: var(--blue-h); }
.menu svg { color: #5d6d7e; }

#toasts { position: fixed; right: 16px; bottom: 34px; display: flex; flex-direction: column; gap: 8px; z-index: 40; }
.toast { background: #323232; color: #fff; padding: 9px 14px; max-width: 420px; box-shadow: 0 4px 14px rgba(0,0,0,.3); font-size: 13px; }
.toast.err { background: #a4262c; }

@media (max-width: 900px) {
  .rg-l { display: none; }
  .ribbon { height: 80px; overflow-x: auto; }
  .navpane { width: 180px; }
  .listpane { width: 280px; }
}

/* ---------- Version 2: Konten, Abwesenheit, Personen, Aufgaben */
.modules { justify-content: flex-start; gap: 4px; }
.mod { padding: 7px 12px; }
.mod svg { width: 24px; height: 24px; }
.mod.active { background: var(--blue-h); }
.fld.err .fn { color: var(--red); font-style: italic; }
.fld .dot, .t-list .dot { width: 10px; height: 10px; border-radius: 2px; flex: none; display: inline-block; }
.rp-add { margin-left: 8px; font-size: 12px; color: var(--blue); }
.rp-add:hover { text-decoration: underline; }

.oofbar { background: #fdf6d8; border-bottom: 1px solid #e3d48a; padding: 5px 12px; display: flex; align-items: center; gap: 10px; flex: none; font-size: 13px; }
.oofbar svg { color: #8a6d00; }
.oofbar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oofbar .btn { padding: 2px 12px; min-width: 0; background: #fff; }

.win.settings { width: 860px; height: 660px; }
.win.settings .win-b { padding: 0; }
.set { display: flex; flex: 1; min-height: 0; }
.set-side { width: 230px; flex: none; background: var(--bg); border-right: 1px solid var(--line); overflow-y: auto; padding: 6px 0; }
.set-h { font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; letter-spacing: .03em; }
.set-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 12px; }
.set-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-item:hover { background: #dfeaf5; }
.set-item.sel { background: var(--blue-l); font-weight: 600; }
.set-item svg { color: #5d6d7e; }
.set-pane { flex: 1; min-width: 0; overflow-y: auto; padding: 14px 18px; }
.set-bar { display: flex; gap: 8px; margin-top: 14px; }
.form.oof { grid-template-columns: 110px 1fr; }
.form.oof .sub { padding-left: 22px; }
.form input:disabled, .form textarea:disabled, .form select:disabled { background: #f3f3f3; color: #888; }
.note.bottom { margin: 12px 0 0; }
.c-row select { flex: 1; border: 0; outline: none; padding: 6px 0; background: #fff; min-width: 0; }

.menu.suggest button { flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 12px; }
.menu.suggest button span { color: var(--muted); font-size: 12px; }
.menu.suggest button.act { background: var(--blue-l); }

.cd { padding: 22px 28px; overflow-y: auto; flex: 1; }
.cd-head { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.avatar.big { width: 72px; height: 72px; font-size: 28px; }
.cd-name { font-size: 24px; font-weight: 300; overflow-wrap: anywhere; }
.cd-sub { color: var(--muted); }
.cd .rp-actions { padding: 8px 0 4px; }
.cd h3 { font-size: 14px; font-weight: 400; color: var(--blue); border-bottom: 1px solid var(--line-l); padding-bottom: 3px; margin: 18px 0 8px; }
.cd-row { display: flex; gap: 12px; padding: 3px 0; }
.cd-row label { width: 90px; color: var(--muted); flex: none; }
.cd-row span, .cd-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.cd-link { color: var(--blue); text-align: left; overflow-wrap: anywhere; }
.cd-link:hover { text-decoration: underline; }

.tasksview { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tfilter { margin-left: 26px; padding: 0; }
.tasklist { flex: 1; overflow-y: auto; border-top: 1px solid var(--line); }
.trow { display: grid; grid-template-columns: 34px minmax(160px, 1fr) 150px 90px minmax(110px, 220px); align-items: center; gap: 0 10px; padding: 0 14px 0 8px; height: 30px; border-bottom: 1px solid #ececec; cursor: default; }
.trow:hover { background: var(--blue-h); }
.trow.sel { background: var(--blue-l); }
.trow.thead { background: var(--bg); font-size: 12px; color: #444; height: 24px; position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); }
.trow.thead:hover { background: var(--bg); }
.trow input { margin: 0 auto; width: 15px; height: 15px; }
.trow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow.done .t-sum { text-decoration: line-through; color: #8a8a8a; }
.trow.late .t-sum, .trow.late .t-due, .grp.late { color: var(--red); }
.t-prio.high { color: var(--red); font-weight: 600; }
.t-prio.low { color: var(--muted); }
.t-list { display: flex; align-items: center; gap: 6px; color: #555; }
.tasklist .grp { top: 24px; }

/* ---------- Version 3: mehrere Kalender, Smartphone, App */
.cal-item small { margin-left: auto; font-size: 10px; color: var(--muted); border: 1px solid var(--line); padding: 0 4px; border-radius: 2px; }
.help p { margin: 0 0 10px; }
.help ul { margin: 0 0 10px; padding-left: 18px; }
.help li { margin-bottom: 6px; }
.tb-ico, .nav-backdrop, .rp-back, .rp-actions .rp-back, .mod span { display: none; }

@media (max-width: 760px) {
  body { font-size: 15px; -webkit-text-size-adjust: 100%; }
  .app { height: 100vh; height: 100dvh; }
  button, .msg, .fld, .trow { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

  /* Kopf: Menü, Titel, Datei-Menü */
  .titlebar { height: calc(48px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 2px 0; }
  .tb-app, .tb-btn, .tabs, .statusbar, .splitter { display: none; }
  .tb-ico { display: flex; width: 46px; height: 46px; align-items: center; justify-content: center; color: #fff; }
  .tb-ico svg { width: 24px; height: 24px; stroke-width: 1.9; }
  .tb-ico:active { background: var(--blue-d); }
  .tb-title { text-align: left; font-size: 17px; padding-left: 4px; }

  /* Menüband wird zur wischbaren Symbolleiste */
  .ribbon { height: 56px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .ribbon::-webkit-scrollbar { display: none; }
  .rb { padding: 0 2px; width: max-content; min-width: 100%; }
  .rg { border-right: 0; padding: 0; }
  .rg-l, .rbig br { display: none; }
  .rg-b.col { flex-direction: row; }
  .rbig, .rsmall { flex-direction: column; justify-content: center; min-width: 62px; padding: 6px 8px 3px; font-size: 11px; gap: 2px; white-space: nowrap; }
  .rbig svg, .rsmall svg { width: 24px; height: 24px; stroke-width: 1.4; }
  .rbig:disabled, .rsmall:disabled { display: none; }

  /* Ordnerleiste als Schublade, Module als untere Leiste */
  .navpane { position: fixed; top: 0; bottom: 0; left: 0; width: min(84vw, 330px) !important; max-width: none; z-index: 15;
    transform: translateX(-104%); transition: transform .2s ease; box-shadow: 4px 0 24px rgba(0,0,0,.3); padding-top: env(safe-area-inset-top); }
  .app.nav-open .navpane { transform: none; }
  .app.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 14; }
  .nav-h { padding: 10px 8px 8px 4px; font-size: 16px; }
  .fld { height: 42px; font-size: 15px; }
  .fld .caret { height: 42px; width: 20px; }
  .cal-item { padding-top: 9px; padding-bottom: 9px; }
  .mini-g span { height: 32px; line-height: 32px; font-size: 14px; }
  .modules { justify-content: space-around; padding: 2px 4px calc(2px + env(safe-area-inset-bottom)); gap: 0; }
  .mod { flex: 1; flex-direction: column; justify-content: center; gap: 1px; font-size: 11px; padding: 6px 0 4px; }
  .mod span { display: block; }
  .mod.active { background: none; }

  /* Liste -> Detail */
  .listpane { width: auto !important; max-width: none; min-width: 0; flex: 1; }
  .mailview, .mailview.bottom { flex-direction: row; }
  .mailview.bottom .listpane { height: auto; min-height: 0; }
  .mailview .readpane { display: none; border-top: 0 !important; }
  body.reading #mailView .listpane, body.cdetail #contactsView .listpane { display: none; }
  body.reading #mailView .readpane, body.cdetail #contactsView .readpane { display: flex; }
  .rp-back, .rp-actions .rp-back { display: flex; font-weight: 600; color: var(--blue) !important; }
  .rp-actions { flex-wrap: wrap; gap: 4px 18px; padding: 8px 12px 0; }
  .rp-actions button { padding: 7px 0; font-size: 14px; }
  .rp-head { padding: 8px 12px 10px; }
  .rp-atts, .rp-info { padding-left: 12px; padding-right: 12px; }
  .searchbox input { height: 38px; font-size: 16px; }
  .searchbox svg { top: 11px; }
  .msg { padding: 9px 12px 10px; }
  .m-from { font-size: 16px; }
  .m-subj { font-size: 14px; }
  .oofbar { flex-wrap: wrap; gap: 6px 8px; }
  .oofbar b, .oofbar svg { display: none; }
  .oofbar span { flex: 1 1 100%; white-space: normal; }

  /* Fenster bildschirmfüllend, Formulare einspaltig */
  .win, .win.settings, .win.compose { width: 100vw !important; height: 100vh !important; height: 100dvh !important; max-width: none; max-height: none; border: 0; }
  .win-t { height: calc(46px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); font-size: 15px; }
  .win-t button { height: 46px; width: 50px; font-size: 18px; }
  .win-f { flex-wrap: wrap; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .btn { padding: 9px 16px; }
  .form, .form.oof { grid-template-columns: 1fr; gap: 4px; }
  .form > label { margin-top: 7px; color: var(--muted); font-size: 13px; }
  .form > label.check { color: var(--text); font-size: 15px; }
  .form .hint { grid-column: 1; margin-top: 0; }
  .form .sub { padding-left: 0; }
  .form input, .form select, .form textarea, .c-row input, .c-row select, .compose textarea { font-size: 16px !important; }
  .form input:not([type=checkbox]):not([type=radio]), .form select { min-height: 38px; }
  .set { flex-direction: column; }
  .set-side { width: auto; display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 4px; flex: none; }
  .set-h { display: none; }
  .set-item { width: auto; flex: none; padding: 9px 12px; }
  .set-pane { padding: 12px 14px; }
  .set-bar { flex-wrap: wrap; }
  .c-row label { width: 58px; }
  .c-send { padding: 6px 10px; margin-right: 8px; }
  .win-tools { overflow-x: auto; }
  .menu { max-width: calc(100vw - 8px); }
  .menu button { padding: 12px 16px 12px 12px; font-size: 15px; white-space: normal; }
  #toasts { left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
  .auth-box { width: calc(100vw - 32px); max-width: 360px; }
  .auth-box input { font-size: 16px; padding: 10px; }

  /* Kalender */
  .cal-head { padding: 6px 6px; }
  .cal-head h2 { font-size: 17px; margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cal-nav { width: 38px; height: 38px; }
  .cal-msg { display: none; }
  .tg-gutter, .tg-hours { width: 42px; }
  .tg-dayh { padding: 3px 2px; font-size: 10px; text-align: center; }
  .tg-dayh b { display: block; margin: 0; font-size: 16px; }
  .ev { font-size: 12px; padding: 1px 4px; border-left-width: 4px; }
  .mg { grid-template-rows: 22px repeat(6, 1fr); }
  .mg-h { padding: 3px 0; text-align: center; font-size: 11px; }
  .mg-c { padding: 1px; }
  .mg-d { font-size: 12px; padding: 0 3px 1px; }
  .mg .chip { font-size: 10px; padding: 0 2px; border-left-width: 3px; height: 15px; line-height: 15px; }
  .mg .chip i { display: none; }
  .mg-more { font-size: 10px; padding-left: 2px; }

  /* Aufgaben, Personen */
  .tasksview .cal-head { flex-wrap: wrap; padding: 8px 12px 4px; }
  .tfilter { margin-left: auto; }
  .trow { grid-template-columns: 40px 1fr auto; height: 48px; font-size: 15px; padding-right: 12px; }
  .trow.thead, .trow .t-prio, .trow .t-list { display: none; }
  .trow input { width: 21px; height: 21px; }
  .t-due { font-size: 12px; color: var(--muted); }
  .tasklist .grp { top: 0; }
  .cd { padding: 6px 16px 16px; }
  .cd .rp-actions { padding-left: 0; }
  .cd-head { margin-top: 8px; }
  .avatar.big { width: 56px; height: 56px; font-size: 22px; }
  .cd-name { font-size: 20px; }
}

/* ---------- Version 4: Editor, Signaturen, Adressauswahl, Junk */
.ed { flex: 1; min-height: 160px; display: flex; flex-direction: column; margin-top: 8px; border: 1px solid var(--line); }
.ed-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1px; padding: 3px 4px; background: var(--bg); border-bottom: 1px solid var(--line); flex: none; }
.ed-tools select { height: 24px; border: 1px solid #ababab; background: #fff; font-size: 12px; }
.ed-font { width: 128px; } .ed-size { width: 50px; margin-right: 2px; }
.ed-btn { min-width: 26px; height: 24px; padding: 0 5px; border: 1px solid transparent; display: flex; align-items: center; justify-content: center; font-size: 13px; font-family: "Times New Roman", serif; }
.ed-btn svg { width: 16px; height: 16px; stroke: #444; }
.ed-btn:hover, .ed-swatch:hover { background: #c5ddf2; border-color: #a3c8ea; }
.ed-sep { width: 1px; height: 18px; background: #c8c8c8; margin: 0 4px; }
.ed-swatch { position: relative; width: 28px; height: 24px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; cursor: pointer; font-weight: 700; font-size: 13px; }
.ed-swatch span { border-bottom: 3px solid #c00000; line-height: 14px; padding: 0 2px; }
.ed-swatch.mark span { border-bottom-color: #ffff00; background: #ffff00; font-weight: 400; font-size: 11px; }
.ed-color { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; padding: 0; border: 0; }
.ed-body { flex: 1; min-height: 0; overflow: auto; padding: 10px 12px; outline: none; font: 11pt/1.4 Calibri, Arial, Helvetica, sans-serif; overflow-wrap: anywhere; background: #fff; }
.ed-body img { max-width: 100%; height: auto; }
.ed-body blockquote { border-left: 2px solid #ccc; margin: 0 0 0 6px; padding-left: 10px; }
.ed-body table { border-collapse: collapse; max-width: 100%; }
.ed-body a { color: #0563c1; }
.sig-ed { margin-top: 10px; display: flex; height: 260px; }
.sig-ed .ed { margin-top: 0; }
.c-pick { width: 62px; margin-right: 8px; flex: none; border: 1px solid #c5c5c5; background: #f6f6f6; padding: 3px 0; font-size: 12px; color: #333; }
.c-pick:hover { background: #c5ddf2; border-color: #a3c8ea; }
.win.picker { height: 620px; }
.pk-search { margin: 0 0 8px; }
.pk-list { flex: 1; min-height: 120px; overflow-y: auto; border: 1px solid var(--line); }
.pk-row { display: grid; grid-template-columns: 1fr 1.2fr .8fr; gap: 10px; padding: 5px 10px; border-bottom: 1px solid #eee; cursor: default; }
.pk-row:hover { background: var(--blue-h); }
.pk-row.sel { background: var(--blue-l); }
.pk-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-e, .pk-c { color: #555; }
.win.picker .hint { color: var(--muted); font-size: 12px; margin: 6px 0; }
.pk-target { display: flex; gap: 8px; margin-top: 6px; }
.pk-target .btn { min-width: 70px; padding: 4px 8px; }
.pk-target input { flex: 1; min-width: 0; border: 1px solid #ababab; padding: 4px 6px; outline: none; }
.form .hint.full { grid-column: 1 / -1; margin-top: 4px; }

@media (max-width: 760px) {
  .ed { border-left: 0; border-right: 0; }
  .ed-tools { display: none; }
  .ed-body { font-size: 16px; padding: 10px 4px; }
  .c-pick { width: 56px; padding: 6px 0; }
  .pk-row { grid-template-columns: 1fr; gap: 0; padding: 8px 10px; }
  .pk-c { display: none; }
  .pk-target input { font-size: 16px; }
  .sig-ed { height: 220px; }
}

/* ---------- Version 4.1: Kontextmenüs, Tastenhinweise, Mehrfachauswahl */
.menu { user-select: none; }
.menu .menu-l { flex: 1; }
.menu .menu-k { color: var(--muted); font-size: 12px; margin-left: 28px; }
.menu .menu-k.arrow { margin-left: 12px; font-size: 11px; color: #444; }
.menu .menu-noicon { width: 16px; flex: none; }
.menu-sep { height: 1px; background: #e1e1e1; margin: 3px 0 3px 34px; }
.menu button.act { background: var(--blue-l); }
.menu button:disabled { opacity: .45; pointer-events: none; }
.menu.sub { z-index: 31; }
.msg { user-select: none; }
.keys h3 { font-size: 14px; font-weight: 400; color: var(--blue); border-bottom: 1px solid var(--line-l); padding-bottom: 3px; margin: 12px 0 4px; }
.keys h3:first-child { margin-top: 0; }
.keys table { border-collapse: collapse; width: 100%; }
.keys td { padding: 2px 0; vertical-align: top; }
.keys td:first-child { width: 46%; padding-right: 12px; }
.keys kbd { font: 12px "Segoe UI", Tahoma, sans-serif; background: #f3f3f3; border: 1px solid #cfcfcf; border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; white-space: nowrap; }
@media (max-width: 760px) { .menu .menu-k:not(.arrow) { display: none; } .keys td:first-child { width: 50%; } }

/* ---------- Version 4.2: Rechtschreibung */
::highlight(ms-spell) { text-decoration: underline wavy #e81123; text-decoration-thickness: 1px; background-color: rgba(232, 17, 35, .07); }
.menu .menu-l.bold { font-weight: 600; }
.sp { display: flex; gap: 16px; }
.sp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sp-main label { color: #555; margin-top: 6px; }
.sp-main label:first-child { margin-top: 0; }
.sp-ctx { border: 1px solid #ababab; padding: 8px 10px; min-height: 74px; max-height: 110px; overflow: auto; background: #fff; overflow-wrap: anywhere; line-height: 1.5; }
.sp-bad { color: #e81123; }
.sp-sugs, .sp-main input { border: 1px solid #ababab; padding: 3px 4px; outline: none; width: 100%; background: #fff; }
.sp-sugs option { padding: 2px 4px; }
.sp-btns { display: flex; flex-direction: column; gap: 6px; width: 200px; flex: none; padding-top: 22px; }
.sp-btns .btn { min-width: 0; padding: 5px 8px; }
.sp-gap { height: 14px; }
.sp-ok { color: #107c10; } .sp-missing { color: var(--red); }
@media (max-width: 760px) { .sp { flex-direction: column; } .sp-btns { width: auto; padding-top: 0; } .sp-main input, .sp-sugs { font-size: 16px; } }

/* ---------- Version 4.3: Erinnerungsfenster */
.rmwin { position: fixed; right: 18px; bottom: 34px; width: 430px; max-width: calc(100vw - 16px); background: #fff; border: 1px solid var(--blue); box-shadow: 0 10px 40px rgba(0,0,0,.4); z-index: 35; display: flex; flex-direction: column; }
.rm-t { cursor: move; gap: 8px; user-select: none; }
.rm-t svg { width: 15px; height: 15px; }
.rm-t span { text-align: left; }
.rm-head { display: flex; gap: 10px; padding: 10px 12px 8px; align-items: flex-start; }
.rm-head .dot { width: 12px; height: 12px; border-radius: 2px; margin-top: 4px; flex: none; }
.rm-head b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.rm-head div div { color: #444; font-size: 12px; }
.rm-list { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-height: 150px; min-height: 58px; overflow-y: auto; }
.rm-row { display: flex; align-items: center; gap: 8px; padding: 5px 12px; cursor: default; }
.rm-row:hover { background: var(--blue-h); }
.rm-row.sel { background: var(--blue-l); }
.rm-row svg { color: #5d6d7e; }
.rm-s { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-w { color: #555; font-size: 12px; white-space: nowrap; }
.rm-btns, .rm-snooze { display: flex; align-items: center; gap: 8px; padding: 8px 12px 0; }
.rm-snooze { padding-bottom: 10px; }
.rm-sp { flex: 1; }
.rmwin .btn { min-width: 0; padding: 4px 12px; }
.rm-snooze select { flex: 1; border: 1px solid #ababab; padding: 3px 4px; background: #fff; min-width: 0; }
.rm-snooze label { color: #555; white-space: nowrap; }
.rm-cal { display: flex; align-items: center; gap: 8px; overflow: hidden; }
.rm-cal .dot { width: 10px; height: 10px; border-radius: 2px; flex: none; }
@media (max-width: 760px) {
  .rmwin { left: 8px; right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); width: auto; }
  .rm-btns { flex-wrap: wrap; }
  .rm-snooze select, .rmwin .btn { font-size: 15px; padding: 7px 10px; }
  .form > label.rm-cal { color: var(--text); font-size: 15px; }
}
@media (min-width: 761px) { body:has(.rmwin) #toasts { right: 466px; } }
