/* Seiten der App */
.d-block { display: block; }
.stack-tight { display: flex; flex-direction: column; gap: 6px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card-title { display: flex; align-items: center; gap: 9px; font-size: 1.05rem; }
.card-title .i { color: var(--link); }
.btn-large { min-height: 52px; font-size: 1.05rem; }
.block-note { margin-top: 10px; }

.band-compact { min-height: 210px; padding-bottom: 22px; }
.band-compact h1 { font-size: clamp(2rem, 3.6vw, 3.2rem); }

.ev-cyan { --ev: #1aa7e0; --ev-soft: rgba(26, 167, 224, .18); --ev-ink: #6ec6ee; }
.ev-coral { --ev: #ff7a63; --ev-soft: rgba(255, 122, 99, .18); --ev-ink: #ff9d8c; }
.ev-violet { --ev: #9b82ff; --ev-soft: rgba(155, 130, 255, .2); --ev-ink: #bcaaff; }
.ev-green { --ev: #45cf94; --ev-soft: rgba(69, 207, 148, .18); --ev-ink: #7fe3b8; }
.ev-amber { --ev: #f2b544; --ev-soft: rgba(242, 181, 68, .18); --ev-ink: #f7cd80; }
[data-theme="light"] .ev-cyan { --ev-ink: #0a6c9c; }
[data-theme="light"] .ev-coral { --ev-ink: #b4442a; }
[data-theme="light"] .ev-violet { --ev-ink: #5b3fc4; }
[data-theme="light"] .ev-green { --ev-ink: #0d7a4c; }
[data-theme="light"] .ev-amber { --ev-ink: #8a5d00; }

.swatches { display: flex; gap: 8px; }
.swatch { width: 30px; height: 30px; padding: 0; background: var(--ev); border: 2px solid transparent; border-radius: 50%; cursor: pointer; transition: transform .12s; }
.swatch:hover { transform: scale(1.1); }
.swatch.is-on { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Übersicht ---------- */
.hero-dash { min-height: max(600px, calc(86svh - 2 * var(--inset))); margin-top: var(--inset); }
.hero-dash h1 { font-size: clamp(2.6rem, 6.2vw, 6.6rem); }
.dash-stats { padding-block: 30px 22px; }
.dash-stats .stats { padding-bottom: 24px; border-bottom: 1px solid var(--line); justify-content: space-between; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-block: 12px 40px; }
.dash-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.dash-wide { grid-column: span 2; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; }
.card-head h3 { display: flex; align-items: center; gap: 9px; font-size: 1.05rem; }
.card-head h3 .i { color: var(--link); }
.text-link { font-size: .88rem; font-weight: 500; white-space: nowrap; }
.stats-small { gap: 12px 28px; }
.stats-small strong { font-size: 1.7rem; }
.stats-small span { font-size: .84rem; }
.link-preview { padding: 6px 10px; font-size: .84rem; background: var(--field); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }

.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mini-head strong { font-weight: 600; font-size: .98rem; }
.mini-head .row { gap: 0; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mini-label { padding: 2px 0 6px; color: var(--muted); font-size: .76rem; text-align: center; }
.mini-day {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 30px;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 8px;
  font-size: .87rem;
  cursor: pointer;
}
.mini-day:hover { background: var(--panel-2); }
.mini-day.is-out { color: var(--muted); opacity: .5; }
.mini-day.is-holiday { color: var(--coral); }
.mini-day.is-today { color: var(--accent-ink); background: var(--accent); font-weight: 600; }
.mini-dot { position: absolute; bottom: 4px; width: 4px; height: 4px; background: var(--link); border-radius: 50%; }
.mini-day.is-today .mini-dot { background: var(--accent-ink); }

.agenda { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.agenda-item {
  display: flex;
  align-items: stretch;
  gap: 11px;
  width: 100%;
  padding: 8px 9px;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 9px;
  text-align: left;
  cursor: pointer;
}
.agenda-item:hover { background: var(--panel-2); }
.agenda-bar { flex: 0 0 3px; background: var(--ev); border-radius: 3px; }
.agenda-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.agenda-text strong { overflow: hidden; font-weight: 500; font-size: .96rem; text-overflow: ellipsis; white-space: nowrap; }
.agenda-text small { color: var(--muted); font-size: .84rem; }
.agenda-holiday { margin-top: auto; padding: 8px 9px 0; }

.todo-add { display: flex; align-items: center; gap: 6px; }
.todo-add input[type="text"] { flex: 1; min-width: 0; min-height: 40px; }
.todo-add .btn { min-height: 40px; padding-inline: 10px; }
.todo-date { width: 140px !important; min-height: 40px !important; font-size: .85rem; padding: 6px 8px !important; }
.todo-high { display: inline-grid; place-items: center; width: 34px; height: 40px; color: var(--muted); border-radius: 8px; cursor: pointer; }
.todo-high input { position: absolute; opacity: 0; width: 0; height: 0; }
.todo-high:has(input:checked) { color: var(--amber); background: var(--amber-soft); }
.todo-list { display: flex; flex-direction: column; gap: 1px; }
.todo { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 3px 4px 3px 8px; border-radius: 8px; }
.todo:hover { background: var(--panel-2); }
.todo-title { flex: 1; min-width: 0; overflow: hidden; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.todo.is-done .todo-title { color: var(--muted); text-decoration: line-through; }
.todo.is-high .todo-title { font-weight: 600; }
.todo.is-high:not(.is-done) input { accent-color: var(--amber); }
.todo-due { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.todo-due.is-overdue { color: var(--red); font-weight: 500; }
.todo-del { width: 28px; height: 28px; opacity: 0; }
.todo:hover .todo-del, .todo-del:focus-visible { opacity: 1; }
.todo-empty { padding: 10px 8px; }

.note-list { display: flex; flex-direction: column; gap: 2px; }
.note-item { display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 9px 10px; color: var(--ink); background: none; border: 0; border-radius: 9px; text-align: left; cursor: pointer; }
.note-item:hover { background: var(--panel-2); }
.note-item strong { display: flex; align-items: center; gap: 6px; overflow: hidden; font-weight: 500; font-size: .96rem; white-space: nowrap; text-overflow: ellipsis; }
.note-item strong .i { width: 14px; height: 14px; color: var(--amber); }
.note-item small { overflow: hidden; color: var(--muted); font-size: .84rem; white-space: nowrap; text-overflow: ellipsis; }
.note-when { font-size: .76rem !important; opacity: .8; }

.mail-summary { display: flex; flex-direction: column; gap: 2px; }
.mail-row { display: flex; align-items: center; gap: 11px; padding: 8px 9px; color: var(--ink); border-radius: 9px; text-decoration: none; }
.mail-row:hover { color: var(--ink); background: var(--panel-2); }
.mail-avatar { display: grid; place-items: center; flex: 0 0 34px; height: 34px; color: var(--accent-ink); background: var(--accent); border-radius: 9px; font-weight: 600; font-size: .95rem; }
.mail-row-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.mail-row-text strong { overflow: hidden; font-weight: 500; font-size: .95rem; white-space: nowrap; text-overflow: ellipsis; }
.mail-row-text small { overflow: hidden; color: var(--muted); font-size: .82rem; white-space: nowrap; text-overflow: ellipsis; }
.mail-spin { width: 14px; height: 14px; color: var(--muted); border-width: 1.5px; }

.check-list { display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; line-height: 1.35; }
.check-list .i { flex: 0 0 18px; margin-top: 1px; color: var(--link); }
.check-list .is-ok .i { color: var(--green); }
.check-list .is-warn .i { color: var(--amber); }
.check-list a { color: var(--ink); text-underline-offset: 3px; }

.photo-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.photo-strip-item { aspect-ratio: 1; overflow: hidden; background: var(--panel-2); border-radius: 10px; }
.photo-strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.photo-strip-item:hover img { transform: scale(1.06); }

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: clamp(36px, 5vw, 64px) max(24px, 50% - 606px);
  background-position: center 62%;
}
.cta-band::before { background: linear-gradient(90deg, rgba(8, 14, 30, .78), rgba(8, 14, 30, .28)); }
.cta-band h2 { font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1.1; }
.cta-band p { margin-top: 14px; color: #e4e9f0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Kalender ---------- */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; padding-block: 12px 40px; }
.cal-panel { padding: 16px; }
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cal-toolbar h2 { min-width: 200px; margin-inline: 6px; font-size: 1.55rem; }
.cal-toolbar .row { gap: 4px; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 12px; }
.cal-label { padding: 7px 10px; color: var(--muted); background: var(--table-head); font-size: .82rem; font-weight: 500; }
.cal-day { display: flex; flex-direction: column; gap: 4px; min-height: 104px; min-width: 0; padding: 6px; background: var(--panel); cursor: pointer; transition: background .12s; }
.cal-day:hover { background: var(--table-hover); }
.cal-day.is-weekend { background: color-mix(in srgb, var(--panel) 88%, var(--panel-2)); }
.cal-day.is-out { background: var(--bg); }
.cal-day.is-out .cal-num { color: var(--muted); opacity: .55; }
.cal-day-head { display: flex; align-items: center; gap: 5px; min-height: 24px; min-width: 0; }
.cal-num { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; font-size: .87rem; border-radius: 50%; }
.cal-day.is-today .cal-num { color: var(--accent-ink); background: var(--accent); font-weight: 600; }
.cal-holiday { overflow: hidden; color: var(--coral); font-size: .72rem; line-height: 1.15; white-space: nowrap; text-overflow: ellipsis; }
.cal-chips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-chip {
  display: flex;
  align-items: baseline;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 2px 6px;
  color: var(--ev-ink);
  background: var(--ev-soft);
  border: 0;
  border-left: 2px solid var(--ev);
  border-radius: 4px;
  font-size: .78rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.cal-chip b { font-weight: 600; font-size: .72rem; }
.cal-chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-more { padding: 0 6px; color: var(--muted); background: none; border: 0; font-size: .75rem; text-align: left; cursor: pointer; }
.cal-more:hover { color: var(--ink); }

.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-col { display: flex; flex-direction: column; gap: 6px; min-height: 380px; min-width: 0; padding: 6px; background: var(--field); border: 1px solid var(--line); border-radius: 10px; }
.week-col.is-today { border-color: var(--accent); }
.week-head { display: flex; align-items: baseline; justify-content: space-between; padding: 5px 7px; color: var(--ink); background: none; border: 0; border-radius: 7px; cursor: pointer; }
.week-head:hover { background: var(--panel-2); }
.week-head span { color: var(--muted); font-size: .82rem; }
.week-head strong { font-weight: 500; font-size: 1.25rem; }
.week-col.is-today .week-head strong { color: var(--link); }
.week-holiday { padding: 0 7px; white-space: normal; }
.week-events { display: flex; flex-direction: column; gap: 5px; }
.week-event { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; color: var(--ink); background: var(--ev-soft); border: 0; border-left: 3px solid var(--ev); border-radius: 6px; font-size: .85rem; text-align: left; cursor: pointer; }
.week-event strong { font-weight: 500; overflow-wrap: anywhere; }
.week-event small { color: var(--muted); font-size: .74rem; }

.cal-list { display: flex; flex-direction: column; gap: 18px; padding: 6px; }
.cal-list-day h3 { margin-bottom: 6px; color: var(--muted); font-size: .92rem; font-weight: 500; }
.cal-tasks { display: flex; flex-direction: column; gap: 12px; padding: 18px; position: sticky; top: 84px; }
.cal-tasks .todo-add { flex-wrap: wrap; }
.cal-tasks .todo-add input[type="text"] { flex: 1 1 100%; }
.cal-tasks .todo-date { flex: 1 1 auto; width: auto !important; }

/* ---------- Tresor ---------- */
.vault-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; padding-block: 18px 40px; }
.searchbar-page { color: var(--ink); background: var(--field); border-color: var(--field-line); min-height: 52px; }
.searchbar-page input::placeholder { color: var(--muted); }
.login-list { display: flex; flex-direction: column; gap: 6px; }
.login-none { padding: 18px; text-align: center; }
.login-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.login-row:hover { background: var(--table-hover); border-color: var(--field-line); }
.login-tile { display: grid; place-items: center; flex: 0 0 40px; height: 40px; color: var(--ev-ink); background: var(--ev-soft); border-radius: 10px; font-weight: 600; font-size: 1.05rem; }
.login-main { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.login-main strong { display: flex; align-items: center; gap: 6px; overflow: hidden; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.login-main small { overflow: hidden; color: var(--muted); font-size: .86rem; white-space: nowrap; text-overflow: ellipsis; }
.fav { width: 14px; height: 14px; color: var(--amber); fill: var(--amber); }
.login-tags { display: flex; gap: 5px; }
.login-actions { display: flex; }
.login-actions .icon-btn { text-decoration: none; }
.totp { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.totp:hover { border-color: var(--accent); }
.totp-code { font-size: .95rem; letter-spacing: .08em; }
.totp-ring { width: 16px; height: 16px; background: conic-gradient(var(--line) var(--p, 0%), var(--accent) 0); border-radius: 50%; }

.gen-card { display: flex; flex-direction: column; gap: 13px; position: sticky; top: 84px; }
.gen-seg { display: flex; }
.gen-seg button { flex: 1; }
.gen-box { display: flex; align-items: center; gap: 4px; min-height: 76px; padding: 12px 8px 12px 14px; background: var(--field); border: 1px solid var(--line); border-radius: 12px; }
.gen-output { flex: 1; min-width: 0; font-family: var(--mono); font-size: 1rem; line-height: 1.45; overflow-wrap: anywhere; }
.gen-actions { display: flex; flex-direction: column; }
.gen-slider { display: flex; flex-direction: column; gap: 4px; font-size: .93rem; }
.gen-slider strong { font-weight: 600; }
.gen-toggles { display: grid; gap: 8px; }
.gen-toggles .check { font-size: .92rem; }
.field-title { font-size: .92rem; font-weight: 500; }
.field > .row-between { margin-bottom: 6px; }

/* ---------- Post ---------- */
.wrap-wide { width: min(1560px, 100%); margin-inline: auto; padding-inline: var(--inset); }
.mail-app { display: grid; grid-template-columns: 250px minmax(280px, 400px) minmax(0, 1fr); gap: 10px; height: calc(100svh - 92px); min-height: 560px; padding-block: 0 var(--inset); }
.mail-app > .mail-onboard { grid-column: 1 / -1; align-self: start; }
.mail-side, .mail-list-pane, .mail-reader { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mail-side { gap: 16px; padding: 12px; overflow-y: auto; }
.mail-group { display: flex; flex-direction: column; gap: 2px; }
.mail-group-title { padding: 4px 8px 6px; color: var(--muted); font-size: .8rem; font-weight: 500; }
.mail-account { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; color: var(--ink); background: none; border: 0; border-radius: 9px; text-align: left; cursor: pointer; }
.mail-account:hover { background: var(--panel-2); }
.mail-account.is-active { background: var(--panel-2); }
.mail-account-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.mail-account-text strong { overflow: hidden; font-weight: 500; font-size: .92rem; white-space: nowrap; text-overflow: ellipsis; }
.mail-account-text small { overflow: hidden; color: var(--muted); font-size: .78rem; white-space: nowrap; text-overflow: ellipsis; }
.mail-account-edit { flex: 0 0 28px; width: 28px; height: 28px; }
.mail-add { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; color: var(--muted); background: none; border: 0; border-radius: 9px; font-size: .9rem; cursor: pointer; }
.mail-add:hover { color: var(--ink); background: var(--panel-2); }
.mail-folder { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px 7px calc(9px + var(--depth, 0) * 14px); color: var(--ink-soft); background: none; border: 0; border-radius: 8px; font-size: .92rem; text-align: left; cursor: pointer; }
.mail-folder .i { width: 16px; height: 16px; color: var(--muted); }
.mail-folder:hover { background: var(--panel-2); }
.mail-folder.is-active { color: var(--ink); background: var(--panel-2); font-weight: 500; }
.mail-folder.is-active .i { color: var(--link); }
.mail-count { padding: 0 7px; color: var(--link); background: var(--blue-soft); border-radius: 99px; font-size: .76rem; font-weight: 600; }
.mail-list-head { display: flex; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); }
.searchbar-small { flex: 1; min-height: 42px; padding: 0 0 0 12px; color: var(--ink); background: var(--field); border-color: var(--field-line); min-width: 0; }
.searchbar-small input[type="search"] { min-height: 38px; padding: 4px 10px; font-size: .92rem; }
.searchbar-small input::placeholder { color: var(--muted); }
.mail-rows-wrap { flex: 1; min-height: 0; overflow-y: auto; }
.mail-row-item { border-bottom: 1px solid var(--line); }
.mail-row-btn { display: grid; gap: 2px; grid-template-columns: 1fr auto; width: 100%; padding: 10px 14px; color: var(--ink); background: none; border: 0; text-align: left; cursor: pointer; }
.mail-row-btn:hover { background: var(--table-hover); }
.mail-row-item.is-active .mail-row-btn { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.mail-row-top { display: flex; grid-column: 1 / -1; justify-content: space-between; gap: 10px; min-width: 0; }
.mail-row-top strong { overflow: hidden; font-weight: 400; font-size: .94rem; white-space: nowrap; text-overflow: ellipsis; }
.mail-row-top time { flex: 0 0 auto; color: var(--muted); font-size: .8rem; }
.mail-row-subject { overflow: hidden; color: var(--muted); font-size: .88rem; white-space: nowrap; text-overflow: ellipsis; }
.mail-row-icons { display: flex; gap: 5px; color: var(--muted); }
.mail-row-icons .i { width: 14px; height: 14px; }
.mail-row-item.is-unread .mail-row-top strong { font-weight: 600; }
.mail-row-item.is-unread .mail-row-subject { color: var(--ink); }
.mail-row-item.is-unread .mail-row-btn { box-shadow: inset 3px 0 0 var(--link); }
.mail-pager { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px; border-top: 1px solid var(--line); }
.mail-error { padding: 14px; }
.mail-reader-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; }
.mail-reader-head { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.mail-reader-head h2 { font-size: 1.5rem; line-height: 1.2; overflow-wrap: anywhere; }
.mail-meta-row { align-items: flex-start; }
.mail-meta { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 240px; font-size: .9rem; overflow-wrap: anywhere; }
.mail-meta b { color: var(--muted); font-weight: 500; }
.mail-actions { display: flex; align-items: center; gap: 2px; }
.mail-actions .btn { margin-right: 4px; }
.mail-images { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 20px; color: var(--amber); background: var(--amber-soft); font-size: .88rem; }
.mail-images span { flex: 1; min-width: 200px; }
.mail-content { flex: 1; min-height: 0; overflow: auto; }
.mail-frame { display: block; width: 100%; height: 100%; min-height: 360px; background: #fff; border: 0; }
.mail-text { padding: 20px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .97rem; line-height: 1.55; }
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-reader > .attach-list { padding: 8px 20px; border-bottom: 1px solid var(--line); }
.attach-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 280px; padding: 4px 8px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; cursor: pointer; }
.attach-chip .i { width: 14px; height: 14px; color: var(--muted); }
.attach-chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.attach-chip small { color: var(--muted); white-space: nowrap; }
.attach-chip .icon-btn { width: 22px; height: 22px; }

.compose { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.compose-to { position: relative; }
.compose-to .link-button { position: absolute; top: 0; right: 0; }
.compose-body { min-height: 300px; font-size: .97rem; }
.ai-panel { display: flex; flex-direction: column; gap: 11px; padding: 14px; background: var(--panel-2); border-radius: 12px; }
.ai-panel select, .ai-panel textarea { font-size: .92rem; }
.ai-panel select { min-height: 40px; }
.advanced summary { color: var(--muted); font-size: .92rem; font-weight: 500; cursor: pointer; }
.advanced-body { margin-top: 10px; }
.grid-server { display: grid; grid-template-columns: minmax(0, 1fr) 90px 120px; gap: 10px; }
.test-status { padding: 8px 0 0; }

/* ---------- Fotos ---------- */
.photos-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-block: 12px 4px; }
.photos-meter { flex: 1 1 340px; padding: 14px 18px; }
.storage { display: flex; flex-direction: column; gap: 8px; font-size: .95rem; }
.storage .meter { height: 7px; }
.storage .meter i { min-width: 3px; background: var(--accent); }
.storage .meter.is-full i { background: var(--red); }
.photos-body { padding-block: 14px 40px; }
.upload-queue { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.upload-queue:empty { display: none; }
.upload-row { display: grid; grid-template-columns: minmax(120px, 260px) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; }
.upload-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upload-row .meter i { background: var(--accent); }
.photo-sections { display: flex; flex-direction: column; gap: 26px; }
.photo-section h3 { margin-bottom: 10px; color: var(--muted); font-size: .95rem; font-weight: 500; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.photo-tile { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; overflow: hidden; background: var(--panel-2); border: 0; border-radius: 10px; cursor: pointer; }
.photo-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.photo-tile:hover img { transform: scale(1.05); }
.photo-fav { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 26px; height: 26px; color: #ffd76a; background: rgba(5, 8, 14, .6); border-radius: 50%; backdrop-filter: blur(6px); }
.photo-fav .i { width: 14px; height: 14px; fill: currentColor; }
.photo-nothumb { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; color: var(--muted); font-size: .8rem; word-break: break-all; }

.viewer { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-rows: auto minmax(0, 1fr); background: rgba(3, 6, 12, .95); animation: fade .15s; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px 10px 20px; color: #edf1f7; }
.viewer-name { overflow: hidden; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.viewer-tools { flex: 0 0 auto; gap: 2px; }
.viewer-btn { color: #dbe2ec; }
.viewer-btn:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.viewer-btn.is-active { color: #ffd76a; }
.viewer-btn.is-active .i { fill: currentColor; }
.viewer-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 70px 20px; color: #dbe2ec; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; animation: fade .2s; }
.viewer-note { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.viewer-nav { position: absolute; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; color: #fff; background: rgba(255, 255, 255, .1); border: 0; border-radius: 50%; transform: translateY(-50%); cursor: pointer; }
.viewer-nav:hover { background: rgba(255, 255, 255, .2); }
.viewer-prev { left: 12px; }
.viewer-next { right: 12px; }
.drop-hint { position: fixed; inset: var(--inset); z-index: 80; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff; background: rgba(9, 18, 34, .82); border: 2px dashed var(--accent); border-radius: var(--radius); font-size: 1.2rem; pointer-events: none; backdrop-filter: blur(6px); }
.drop-hint .i { width: 42px; height: 42px; }
body.is-dropping .drop-hint { display: flex; }

/* ---------- Portfolio-Editor ---------- */
.pf-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; width: min(1560px, 100%); padding-block: 16px 6px; }
.pf-bar code { font-size: .92rem; color: var(--ink-soft); }
.pf-layout { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 14px; align-items: start; width: min(1560px, 100%); padding-block: 8px 40px; }
.pf-editor { gap: 8px; }
.pf-section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.pf-section summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 600; cursor: pointer; list-style: none; }
.pf-section summary::-webkit-details-marker { display: none; }
.pf-section summary > .i:first-child { color: var(--link); }
.pf-section summary > span { flex: 1; }
.pf-chevron { color: var(--muted); transition: transform .2s; }
.pf-section[open] .pf-chevron { transform: rotate(180deg); }
.pf-body { padding: 2px 16px 16px; }
.pf-item { position: relative; padding: 12px; background: var(--panel-2); border-radius: 10px; }
.pf-item-tools { display: flex; justify-content: flex-end; gap: 0; margin: -6px -6px 2px 0; }
.pf-item-tools .icon-btn { width: 30px; height: 30px; }
.pf-handle { display: flex; align-items: center; gap: 6px; }
.pf-feature { align-self: center; margin-top: 22px; }
.pf-preview-wrap { position: sticky; top: 84px; height: calc(100svh - 104px); min-height: 500px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.pf-preview { display: block; width: 100%; height: 100%; border: 0; }
.img-picker { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.img-picker img, .img-empty { width: 96px; height: 96px; object-fit: cover; background: var(--panel-2); border-radius: 12px; }
.img-picker.is-wide img, .img-picker.is-wide .img-empty { width: 100%; height: 110px; }
.img-empty { display: grid; place-items: center; color: var(--muted); }
.banner-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.banner-pick { position: relative; aspect-ratio: 16 / 10; padding: 0; overflow: hidden; color: #fff; background-position: center; background-size: cover; border: 2px solid transparent; border-radius: 10px; cursor: pointer; }
.banner-pick.is-on { border-color: var(--accent); }
.banner-pick span { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 5px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); font-size: .74rem; }

/* ---------- Einstellungen ---------- */
.settings-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; padding-block: 14px 40px; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; position: sticky; top: 84px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.settings-tab { display: flex; align-items: center; gap: 10px; padding: 9px 11px; color: var(--ink-soft); background: none; border: 0; border-radius: 8px; font-size: .95rem; font-weight: 500; text-align: left; cursor: pointer; }
.settings-tab:hover { background: var(--panel-2); }
.settings-tab.is-active { color: var(--ink); background: var(--panel-2); }
.settings-tab.is-active .i { color: var(--link); }
.settings-panel { max-width: 760px; }
.session-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; font-size: .95rem; border-bottom: 1px solid var(--line); }
.session-row:last-child { border-bottom: 0; }
.session-row > .i { color: var(--muted); }
.session-row strong { font-weight: 500; }
.session-row small { font-size: .84rem; }
.switch-row { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch-row input { margin-top: 4px; }
.theme-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme-card { display: flex; flex-direction: column; gap: 3px; padding: 10px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 12px; text-align: left; cursor: pointer; }
.theme-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme-card small { color: var(--muted); font-size: .82rem; }
.theme-swatch { display: flex; flex-direction: column; justify-content: center; gap: 5px; height: 54px; margin-bottom: 7px; padding: 0 12px; background: #0a0f1a; border-radius: 8px; }
.theme-swatch i { display: block; height: 4px; background: #1aa7e0; border-radius: 4px; }
.theme-swatch i + i { width: 60%; background: #6ec6ee; }
.theme-card[data-preview="light"] .theme-swatch { background: #f4f6fa; }
.theme-card[data-preview="light"] .theme-swatch i { background: #101827; }
.theme-card[data-preview="contrast"] .theme-swatch { background: #000; }
.theme-card[data-preview="contrast"] .theme-swatch i { background: #ffd84d; }
.theme-card[data-preview="off"] .theme-swatch i { background: #5a6778; }

/* ---------- Admin ---------- */
.admin-stats { margin-bottom: 22px; }
.admin-log-head { margin-top: 38px; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th { padding: 11px 14px; color: var(--muted); background: var(--table-head); font-size: .84rem; font-weight: 500; text-align: left; white-space: nowrap; }
table.data td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:hover td { background: var(--table-hover); }
table.data strong { font-weight: 500; }
.table-actions { text-align: right; white-space: nowrap; }
.quota { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.quota small { font-size: .82rem; color: var(--muted); }
.quota .meter i { background: var(--accent); }
.i.ok { color: var(--green); }
.invite-link { display: block; padding: 11px 13px; font-size: .86rem; line-height: 1.5; word-break: break-all; color: var(--link); background: var(--field); border: 1px solid var(--line); border-radius: 10px; }

/* ---------- Auszeit-Vorbereitung ---------- */
.auszeit-setup { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; padding-block: 14px 40px; }
.duration-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.duration { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 86px; padding: 8px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.duration:hover { border-color: var(--field-line); }
.duration strong { font-size: 1.8rem; font-weight: 400; letter-spacing: -.03em; line-height: 1.1; }
.duration span { color: var(--muted); font-size: .82rem; }
.duration[aria-pressed="true"], .duration.is-on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.duration[aria-pressed="true"] span, .duration.is-on span { color: inherit; opacity: .8; }
.duration-custom input { width: 70px; min-height: 34px; padding: 2px 4px; color: inherit; background: none; border: 0; border-bottom: 1px solid currentColor; border-radius: 0; font-size: 1.1rem; text-align: center; }
.duration-custom input:focus { outline: 0; }
.duration-custom input::placeholder { color: inherit; opacity: .7; }
.volume-row { gap: 12px; }
.volume-row input { flex: 1; min-width: 100px; width: auto; }
.volume-row > .i { color: var(--muted); }
.screen-row { gap: 18px; }
.screen-map { position: relative; flex: 0 0 auto; }
.screen-box { position: absolute; display: grid; place-items: center; color: var(--muted); background: var(--field); border: 1px solid var(--field-line); border-radius: 5px; font-size: .72rem; }
.screen-box.is-main { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.auszeit-go { position: sticky; top: 84px; }
.auszeit-go .notice p { margin: 0; }

/* ---------- Kleinere Fenster ---------- */
@media (max-width: 1240px) {
  .mail-app { grid-template-columns: 210px minmax(240px, 320px) minmax(0, 1fr); }
  .pf-layout { grid-template-columns: minmax(0, 1fr); }
  .pf-preview-wrap { position: static; height: 70svh; }
}
@media (max-width: 1040px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-wide { grid-column: span 2; }
  .cal-layout, .vault-layout, .auszeit-setup { grid-template-columns: minmax(0, 1fr); }
  .cal-tasks, .gen-card, .auszeit-go { position: static; }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
  .settings-tab { white-space: nowrap; }
  .compose { grid-template-columns: minmax(0, 1fr); }
  .mail-app { grid-template-columns: minmax(0, 1fr); height: auto; }
  .mail-side { gap: 8px; max-height: none; }
  .mail-group { flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .mail-group-title { display: none; }
  .mail-account, .mail-folder, .mail-add { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .mail-folder { padding-left: 9px; }
  .mail-account-text small { display: none; }
  .mail-list-pane { max-height: 52svh; }
  .mail-reader { min-height: 60svh; }
  .photo-strip { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 680px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-wide { grid-column: auto; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .dash-stats .stats { gap: 16px 28px; justify-content: flex-start; }
  .stats strong { font-size: 1.9rem; }
  .cal-panel { padding: 8px; }
  .cal-day { min-height: 64px; padding: 3px; }
  .cal-chip { padding: 1px 3px; font-size: .68rem; }
  .cal-chip b, .cal-holiday { display: none; }
  .cal-toolbar h2 { min-width: 0; font-size: 1.25rem; }
  .cal-week { grid-template-columns: minmax(0, 1fr); }
  .week-col { min-height: 0; }
  .login-tags { display: none; }
  .login-row { gap: 9px; padding: 9px; }
  .grid-server { grid-template-columns: minmax(0, 1fr) 80px; }
  .grid-server > :nth-child(3) { grid-column: 1 / -1; }
  .viewer-stage { padding-inline: 8px; }
  .viewer-nav { display: none; }
  .upload-row { grid-template-columns: minmax(0, 1fr) auto; }
  .upload-row .meter { grid-column: 1 / -1; grid-row: 2; }
  .banner-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
