/* =========================================================
   ttmails – Design (Hell & Dunkel)
   ========================================================= */

:root {
  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --surface-3: #e5e8f1;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e3e6ef;
  --accent: #6366f1;
  --accent-text: #4f46e5;
  --accent-soft: rgba(99, 102, 241, .11);
  --danger: #e11d48;
  --danger-soft: rgba(225, 29, 72, .09);
  --success: #10b981;
  --warn: #b45309;
  --warn-soft: rgba(245, 158, 11, .15);
  --glass: rgba(255, 255, 255, .75);
  --blob-1: rgba(99, 102, 241, .16);
  --blob-2: rgba(168, 85, 247, .12);
  --toast-bg: #0f172a;
  --toast-text: #f8fafc;
  --toast-accent: #a5b4fc;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow: 0 2px 4px rgba(15, 23, 42, .04), 0 12px 28px -8px rgba(15, 23, 42, .14);
  --shadow-lg: 0 30px 70px -15px rgba(15, 23, 42, .32);
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.45, .64, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d14;
    --surface: #131622;
    --surface-2: #1a1e2c;
    --surface-3: #262b3c;
    --text: #e8ebf4;
    --muted: #8c94aa;
    --line: #242a3a;
    --accent: #818cf8;
    --accent-text: #a5b4fc;
    --accent-soft: rgba(129, 140, 248, .15);
    --danger: #fb7185;
    --danger-soft: rgba(251, 113, 133, .12);
    --success: #34d399;
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, .14);
    --glass: rgba(19, 22, 34, .75);
    --blob-1: rgba(99, 102, 241, .2);
    --blob-2: rgba(168, 85, 247, .14);
    --toast-bg: #e8ebf4;
    --toast-text: #0b0d14;
    --toast-accent: #4f46e5;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 12px 28px -8px rgba(0, 0, 0, .55);
    --shadow-lg: 0 30px 70px -15px rgba(0, 0, 0, .75);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0d14;
  --surface: #131622;
  --surface-2: #1a1e2c;
  --surface-3: #262b3c;
  --text: #e8ebf4;
  --muted: #8c94aa;
  --line: #242a3a;
  --accent: #818cf8;
  --accent-text: #a5b4fc;
  --accent-soft: rgba(129, 140, 248, .15);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, .12);
  --success: #34d399;
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .14);
  --glass: rgba(19, 22, 34, .75);
  --blob-1: rgba(99, 102, 241, .2);
  --blob-2: rgba(168, 85, 247, .14);
  --toast-bg: #e8ebf4;
  --toast-text: #0b0d14;
  --toast-accent: #4f46e5;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 12px 28px -8px rgba(0, 0, 0, .55);
  --shadow-lg: 0 30px 70px -15px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42rem 42rem at 0% 0%, var(--blob-1), transparent 62%),
    radial-gradient(38rem 38rem at 100% 100%, var(--blob-2), transparent 62%);
}
[hidden] { display: none !important; }
h1, h2, h3 { letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
.muted { color: var(--muted); }
kbd {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px;
  background: var(--surface); color: var(--muted);
  font: 600 11px/1 inherit;
}

/* Theme-Wechsel: Kreis breitet sich aus (View Transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Icons ---------- */
.i {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: transform .15s var(--ease), background-color .2s, border-color .2s, box-shadow .25s, color .2s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.96); }
.btn-primary {
  border-color: transparent;
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 16px -6px rgba(99, 102, 241, .65);
}
.btn-primary:hover { background: var(--grad); box-shadow: 0 10px 24px -8px rgba(99, 102, 241, .8); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.96); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn-danger-solid { border-color: transparent; background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: var(--danger); filter: brightness(1.08); }
.btn-block { width: 100%; height: 46px; font-size: 15px; }
.btn .nudge { transition: transform .25s var(--spring); }
.btn:hover .nudge { transform: translateX(3px); }
.btn.loading { pointer-events: none; }
.btn.loading .i { display: none; }
.btn.loading::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .6s linear infinite;
}
.ripple {
  position: absolute; z-index: -1; border-radius: 50%;
  background: currentColor; opacity: .22; transform: scale(0);
  animation: ripple .6s ease-out forwards; pointer-events: none;
}

.icon-btn {
  position: relative;
  display: inline-grid; place-items: center; flex: none;
  width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--muted);
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .15s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.88); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

/* Hell/Dunkel-Schalter: Sonne und Mond drehen sich ineinander */
.theme-toggle .i {
  position: absolute; inset: 0; margin: auto;
  transition: transform .5s var(--spring), opacity .3s;
}
[data-theme="dark"] .theme-toggle .moon,
[data-theme="light"] .theme-toggle .sun { opacity: 0; transform: rotate(-120deg) scale(.3); }
.theme-toggle:hover .i { animation: none; }

/* ---------- Formulare ---------- */
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.input-wrap {
  display: flex; align-items: center;
  height: 46px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2);
  transition: border-color .2s, box-shadow .25s, background-color .2s;
}
.input-wrap:hover { border-color: var(--surface-3); }
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
.input-wrap input {
  flex: 1; min-width: 0; height: 100%;
  padding: 0 14px; border: 0; outline: none;
  background: transparent; color: var(--text);
  font: inherit; font-size: 15px; font-weight: 400;
}
.suffix { padding-right: 14px; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.pw-toggle { all: unset; display: grid; place-items: center; width: 36px; height: 36px; margin-right: 5px; border-radius: 9px; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s; }
.pw-toggle:hover { background: var(--surface-3); color: var(--text); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); }
.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); color: var(--text);
  font: inherit; outline: none;
  transition: border-color .2s, box-shadow .25s, background-color .2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
textarea.input { min-height: 220px; resize: vertical; line-height: 1.6; }

.error {
  margin: 0; padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-soft); color: var(--danger);
  font-size: 14px; font-weight: 500;
  animation: fadeUp .25s var(--ease);
}
.error:empty { display: none; }

/* Segment-Schalter mit gleitendem Hintergrund */
.segmented {
  --n: 2; --idx: 0;
  position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface-2);
}
.seg-indicator {
  position: absolute; top: 4px; left: 4px; bottom: 4px;
  width: calc((100% - 8px) / var(--n));
  transform: translateX(calc(var(--idx) * 100%));
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--spring);
}
.seg {
  position: relative; z-index: 1;
  height: 36px; padding: 0 10px;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap;
  cursor: pointer;
  transition: color .2s;
}
.seg:hover, .seg.active { color: var(--text); }

/* ---------- Bausteine ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); }

.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
.logo {
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 18px -8px rgba(99, 102, 241, .8);
  transition: transform .4s var(--spring);
}
.logo .i { width: 20px; height: 20px; }
.brand:hover .logo { transform: rotate(-8deg) scale(1.06); }
.tag {
  display: inline-block; margin-left: 4px; padding: 2px 8px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-text);
  font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: middle;
}

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  color: #fff; font-size: 15px; font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }

.badge {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px;
  background: var(--grad); color: #fff;
  font-size: 12px; font-weight: 700;
}

.search {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 8px 0 12px;
  border: 1px solid transparent; border-radius: 12px;
  background: var(--surface-2); color: var(--muted);
  transition: border-color .2s, box-shadow .25s, background-color .2s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); color: var(--accent-text); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search:focus-within kbd { opacity: 0; }
.search kbd { transition: opacity .2s; }

.empty {
  display: grid; place-items: center; align-content: center; gap: 8px;
  padding: 56px 24px; text-align: center; color: var(--muted); font-size: 14px;
  animation: fadeUp .45s var(--ease) both;
}
.empty-icon {
  display: grid; place-items: center;
  width: 68px; height: 68px; margin-bottom: 6px;
  border-radius: 22px;
  background: var(--accent-soft); color: var(--accent-text);
  animation: bob 3.2s ease-in-out infinite;
}
.empty-icon .i { width: 30px; height: 30px; }
.empty strong { color: var(--text); font-size: 16px; }

/* ---------- Mail-Liste ---------- */
.mail-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.mail-item {
  position: relative;
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center;
  padding: 12px 12px 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: background-color .15s, transform .15s var(--ease);
}
.mail-item:hover { background: var(--surface-2); }
.mail-item:active { transform: scale(.985); }
.mail-item:focus-visible { outline-offset: -2px; }
.mail-item.selected { background: var(--accent-soft); }
.mail-item .avatar { grid-row: span 2; }
.mail-item::before {
  content: ""; position: absolute; left: 4px; top: 50%;
  width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: var(--accent);
  transform: scale(0); transition: transform .3s var(--spring);
}
.mail-item.unread::before { transform: scale(1); }
.who, .line2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who { font-weight: 600; font-size: 14.5px; }
.when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.line2 { grid-column: 2 / 4; font-size: 13.5px; color: var(--muted); }
.subj { color: var(--text); }
.mail-item.unread .who, .mail-item.unread .subj { font-weight: 750; }
.mail-item.unread .when { color: var(--accent-text); font-weight: 600; }

.quick {
  position: absolute; right: 8px; top: 50%;
  display: flex; gap: 2px; padding: 3px;
  border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow);
  opacity: 0; transform: translate(8px, -50%) scale(.95);
  pointer-events: none;
  transition: opacity .18s, transform .25s var(--spring);
}
.quick .icon-btn { width: 32px; height: 32px; }
.mail-item:hover .quick, .mail-item:focus-within .quick { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
@media (hover: none) { .quick { display: none; } }

.enter { animation: itemIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
.mail-item.fresh { animation: itemIn .45s var(--ease) both, flash 2s ease; }

.skeleton { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 12px 14px; }
.sk-lines { display: grid; gap: 8px; }
.sk {
  display: block; height: 11px; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
.sk.circle { width: 40px; height: 40px; border-radius: 50%; }

/* ---------- Mail lesen ---------- */
.reader-inner { max-width: 860px; padding: 28px 32px 40px; animation: fadeUp .4s var(--ease) both; }
.reader-inner h1 { margin: 0 0 20px; font-size: 25px; line-height: 1.25; overflow-wrap: anywhere; }
.meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.meta-text { flex: 1 1 220px; min-width: 0; display: grid; gap: 1px; }
.meta-from { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.meta-from span, .meta-text small { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.meta-date { font-size: 13px; color: var(--muted); white-space: nowrap; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.7; }
.back { display: none; margin: -6px 0 12px -10px; }

/* ---------- Dialoge ---------- */
.modal {
  width: min(640px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line); border-radius: 22px;
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal[open] { display: flex; flex-direction: column; animation: modalIn .35s var(--ease); }
.modal::backdrop { background: rgba(8, 10, 18, .45); backdrop-filter: blur(5px); }
.modal[open]::backdrop { animation: fadeIn .3s ease; }
.modal.closing { animation: modalOut .2s ease forwards; }
.modal.closing::backdrop { animation: fadeOut .2s ease forwards; }
.modal-sm { width: min(420px, calc(100% - 24px)); }
.modal-md { width: min(760px, calc(100% - 24px)); }
.modal-lg { width: min(1080px, calc(100% - 24px)); height: min(760px, calc(100dvh - 24px)); }
.modal-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 4px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { display: grid; gap: 12px; padding: 12px 20px 16px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; }
.modal-scroll { overflow-y: auto; min-height: 0; }
.hint { margin-right: auto; font-size: 12px; color: var(--muted); }
.ask-text { margin: 0; }

/* Schreiben: Felder mit wachsender Linie */
.compose-field {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 2px no-repeat;
  transition: background-size .35s var(--ease);
}
.compose-field:focus-within { background-size: 100% 2px; }
.compose-field span { width: 60px; flex: none; color: var(--muted); font-size: 14px; font-weight: 600; }
.compose-field input { flex: 1; min-width: 0; height: 46px; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; }
.send-btn .i { transition: transform .4s var(--ease), opacity .3s; }
.send-btn:hover .i { transform: translate(2px, -2px) rotate(6deg); }
.send-btn.sending { pointer-events: none; }
.send-btn.sending .i { transform: translate(34px, -34px) rotate(12deg); opacity: 0; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; left: 50%; bottom: 24px; z-index: 1000;
  display: grid; justify-items: center; gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 9px 16px 9px 10px;
  border-radius: 16px;
  background: var(--toast-bg); color: var(--toast-text);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn .4s var(--spring) both;
}
.toast.out { animation: toastOut .25s ease forwards; }
.ticon { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--success); color: #fff; }
.toast.error .ticon { background: var(--danger); }
.toast.info .ticon { background: var(--accent); }
.ticon .i { width: 15px; height: 15px; stroke-width: 3; stroke-dasharray: 26; stroke-dashoffset: 26; animation: draw .45s .15s ease forwards; }
.toast-action {
  margin-left: 6px; padding: 5px 10px;
  border: 0; border-radius: 9px;
  background: transparent; color: var(--toast-accent);
  font: inherit; font-weight: 700; cursor: pointer;
}
.toast-action:hover { background: rgba(127, 127, 127, .18); }

/* =========================================================
   Anmelden
   ========================================================= */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 430px; padding: 28px; display: grid; gap: 20px; box-shadow: var(--shadow); animation: rise .55s var(--ease) both; }
.auth-head { display: flex; align-items: center; justify-content: space-between; }
.auth-title { margin: 0; font-size: 27px; line-height: 1.2; }
.auth-sub { margin: 6px 0 0; color: var(--muted); }
.saved { display: grid; gap: 8px; }
.saved-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.saved-list { display: grid; gap: 6px; }
.account-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
  animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms + .15s);
  transition: border-color .2s, box-shadow .25s, transform .2s var(--ease);
}
.account-item:hover { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); transform: translateY(-1px); }
.account-item .chev { margin-left: auto; color: var(--muted); transition: transform .25s var(--spring), color .2s; }
.account-item:hover .chev { transform: translateX(3px); color: var(--accent-text); }
.acc-text { display: grid; min-width: 0; line-height: 1.25; text-align: left; }
.acc-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-text small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =========================================================
   Postfach
   ========================================================= */
.app {
  height: 100dvh;
  display: grid;
  grid-template-columns: 240px minmax(300px, 400px) minmax(0, 1fr);
  grid-template-rows: 68px minmax(0, 1fr);
  column-gap: 12px;
  padding: 0 12px 12px 0;
}
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 0 0 22px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.account { position: relative; }
.account-btn {
  display: flex; align-items: center; gap: 10px;
  max-width: 300px; height: 46px; padding: 0 12px 0 6px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font: inherit; cursor: pointer;
  transition: box-shadow .25s, border-color .2s, transform .15s var(--ease);
}
.account-btn:hover { box-shadow: var(--shadow); }
.account-btn:active { transform: scale(.97); }
.account-btn .chev { color: var(--muted); transition: transform .3s var(--spring); }
.account.open .account-btn { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.account.open .chev { transform: rotate(180deg); }

.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  width: 310px; max-width: calc(100vw - 24px);
  padding: 8px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform-origin: top right;
  animation: menuIn .22s var(--ease);
}
.menu-label { padding: 6px 10px 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 8px 10px;
  border: 0; border-radius: 12px;
  background: transparent; color: var(--text);
  font: inherit; font-size: 14px; text-align: left; cursor: pointer;
  transition: background-color .15s;
  animation: fadeUp .3s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms);
}
.menu-item:hover { background: var(--surface-2); }
.menu-item.danger { color: var(--danger); }
.menu-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--muted); transition: transform .25s var(--spring); }
.menu-item:hover .menu-icon { transform: scale(1.1); }
.menu-item.danger .menu-icon { background: var(--danger-soft); color: var(--danger); }
.menu-item .check { margin-left: auto; color: var(--accent-text); }
.menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }

.sidebar { display: flex; flex-direction: column; gap: 18px; min-height: 0; padding: 4px 0 12px 12px; }
.compose-btn { justify-content: flex-start; height: 50px; padding: 0 20px; border-radius: 16px; font-size: 15px; }
.compose-btn:hover .i { animation: wiggle .5s var(--ease); }
.folders { position: relative; display: grid; gap: 2px; }
.folder-indicator {
  position: absolute; left: 0; top: 0;
  border-radius: 12px;
  background: var(--accent-soft);
  pointer-events: none;
  transition: transform .45s var(--spring), width .3s var(--ease), height .3s var(--ease);
}
.folder-indicator.no-anim { transition: none; }
.folder {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 12px 0 14px;
  border: 0; border-radius: 12px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 14.5px; font-weight: 600; text-align: left;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}
.folder:hover { color: var(--text); background: var(--surface-2); }
.folder.active, .folder.active:hover { color: var(--accent-text); background: transparent; }
.folder.active .i { animation: pop .45s var(--spring); }
.folder .label { flex: 1; }

.panel {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.list-head { display: grid; gap: 12px; padding: 18px 16px 12px; border-bottom: 1px solid var(--line); }
.list-title { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.list-title h2 { margin: 0; font-size: 20px; }
.count {
  padding: 1px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
  font-size: 12px; font-weight: 700;
}
.count:empty { display: none; }
.panel.reader { display: block; overflow-y: auto; }
.reader > .empty { min-height: 100%; }

/* =========================================================
   Admin
   ========================================================= */
.admin-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 66px; padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: saturate(1.5) blur(14px);
}
.admin-main { display: grid; gap: 20px; max-width: 1120px; margin: 0 auto; padding: 28px 16px 56px; }
.admin-hello h1 { margin: 0; font-size: 28px; }
.admin-hello p { margin: 4px 0 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); transition: transform .4s var(--spring); }
.stat:hover .stat-icon { transform: rotate(-8deg) scale(1.08); }
.stat-icon .i { width: 22px; height: 22px; }
.stat-num { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }

.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.admin-toolbar .segmented { width: 280px; }
.admin-toolbar .search { flex: 1; min-width: 200px; height: 44px; }
.admin-toolbar > .btn { height: 44px; }

.rows { overflow: hidden; animation: fadeUp .35s var(--ease) both; }
.row {
  display: grid; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  transition: background-color .15s;
}
.row:last-child { border-bottom: 0; }
.row[role="button"] { cursor: pointer; }
.row:not(.row-head):hover { background: var(--surface-2); }
.row-head { padding: 10px 18px; background: var(--surface-2); font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.user-row { grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, 1fr) 64px 90px 168px; }
.msg-row { grid-template-columns: 40px minmax(0, 1.2fr) minmax(0, 1.5fr) 90px 44px; }
.cell-main { display: grid; min-width: 0; line-height: 1.3; }
.cell-main strong, .cell-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-main small { color: var(--muted); font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.pill { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 700; }
.row.enter { animation-delay: calc(var(--i, 0) * 30ms); }
.row.fresh { animation: itemIn .45s var(--ease) both, flash 2s ease; }

.mb-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mb-bar { padding: 10px 20px 14px; }
.mb-bar .segmented { max-width: 420px; }
.mailbox { flex: 1; min-height: 0; display: grid; grid-template-columns: 360px minmax(0, 1fr); border-top: 1px solid var(--line); }
.mailbox .mail-list { border-right: 1px solid var(--line); }
.mb-reader { min-height: 0; overflow-y: auto; }

/* =========================================================
   Mittlere Breite: Seitenleiste nur mit Icons
   ========================================================= */
@media (min-width: 861px) and (max-width: 1180px) {
  .app { grid-template-columns: 76px minmax(270px, 340px) minmax(0, 1fr); }
  .compose-btn { justify-content: center; padding: 0; }
  .compose-btn span { display: none; }
  .folder { justify-content: center; padding: 0; }
  .folder .label { display: none; }
  .folder .badge { position: absolute; top: 3px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; }
}

/* =========================================================
   Handy & Tablet
   ========================================================= */
@media (max-width: 860px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 62px minmax(0, 1fr);
    padding: 0 8px calc(80px + env(safe-area-inset-bottom)) 8px;
  }
  .topbar { padding: 0 2px 0 6px; }
  .brand-name { display: none; }
  .account-btn { padding: 0 4px; height: 44px; }
  .account-btn .acc-text, .account-btn .chev { display: none; }

  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--glass);
    backdrop-filter: saturate(1.5) blur(16px);
  }
  .folders { grid-auto-flow: column; grid-auto-columns: 1fr; }
  .folder { flex-direction: column; justify-content: center; gap: 3px; height: 58px; padding: 0 4px; font-size: 11.5px; }
  .folder .label { flex: none; }
  .folder .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; }
  .compose-btn {
    position: absolute; right: 16px; bottom: calc(100% + 14px);
    width: 58px; height: 58px; padding: 0; justify-content: center; border-radius: 20px;
    box-shadow: 0 14px 30px -10px rgba(99, 102, 241, .8);
  }
  .compose-btn span { display: none; }
  .compose-btn .i { width: 22px; height: 22px; }

  .panel.reader { display: none; }
  .app.reading .list { display: none; }
  .app.reading .panel.reader { display: block; }
  .app.reading .compose-btn { transform: scale(0); }
  .back { display: inline-flex; }
  .reader-inner { padding: 18px 18px 32px; }
  .reader-inner h1 { font-size: 22px; }
  .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .hint { display: none; }

  .mailbox { grid-template-columns: minmax(0, 1fr); }
  .mailbox .mail-list { border-right: 0; }
  .mailbox.reading .mail-list, .mailbox:not(.reading) .mb-reader { display: none; }
}

@media (max-width: 760px) {
  .hide-sm { display: none !important; }
  .row-head { display: none; }
  .user-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .msg-row { grid-template-columns: 40px minmax(0, 1fr) auto auto; }
  .admin-toolbar .segmented { width: 100%; }
  .admin-top { padding: 0 12px; }
  .admin-hello h1 { font-size: 24px; }
  .user-row .row-actions .icon-btn { width: 34px; height: 34px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .stat-icon { width: 36px; height: 36px; border-radius: 11px; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 12px; }
}

/* =========================================================
   Sprache, Hinweise, Firmen, Codes, Viele erstellen
   ========================================================= */
.head-tools { display: flex; align-items: center; gap: 2px; }
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 10px;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .15s var(--ease);
}
.lang-btn:hover, .lang-switch.open .lang-btn { background: var(--surface-2); color: var(--text); }
.lang-btn:active { transform: scale(.92); }
.lang-btn .i { transition: transform .5s var(--spring); }
.lang-btn:hover .i, .lang-switch.open .lang-btn .i { transform: rotate(-25deg); }
.lang-menu { width: 210px; }
.lang-badge {
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 24px; border-radius: 7px;
  background: var(--surface-2); color: var(--muted);
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
  transition: background-color .2s, color .2s;
}
.lang-menu .menu-item[aria-checked="true"] .lang-badge { background: var(--accent-soft); color: var(--accent-text); }

.auth-foot {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: 13.5px; font-weight: 600;
  transition: color .2s;
}
.auth-foot:hover { color: var(--accent-text); }
.auth-foot .i { width: 16px; height: 16px; transition: transform .3s var(--spring); }
.auth-foot:hover .i { transform: scale(1.15) rotate(-6deg); }

.note { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 12.5px; }
.note .i { width: 15px; height: 15px; }

.ext-tag {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 8px; padding: 1px 8px;
  border-radius: 999px;
  background: var(--warn-soft); color: var(--warn);
  font-size: 11px; font-weight: 700; vertical-align: 1px; white-space: nowrap;
}
.ext-tag .i { width: 12px; height: 12px; }
.attachments {
  display: flex; align-items: center; gap: 8px;
  margin: -8px 0 18px; padding: 10px 12px;
  border-radius: 12px; background: var(--surface-2);
  color: var(--muted); font-size: 13px;
}
.attachments .i { width: 16px; height: 16px; }

.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .04em; }
.domain-preview { margin: -6px 0 0; font-size: 13px; color: var(--muted); }
.domain-preview strong { color: var(--accent-text); }
.input-wrap select {
  flex: 1; min-width: 0; height: 100%; padding: 0 12px;
  border: 0; outline: none; background: transparent;
  color: var(--text); font: inherit; font-size: 14.5px; cursor: pointer;
}
.input-wrap select option { background: var(--surface); color: var(--text); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg { overflow: hidden; text-overflow: ellipsis; }

/* Verwaltung */
.toolbar-actions { display: flex; gap: 8px; }
.toolbar-actions .btn { height: 44px; }
.admin-toolbar .segmented { width: min(100%, calc(var(--n) * 128px)); }

.quota { display: grid; gap: 10px; padding: 16px 20px; animation: rise .5s var(--ease) both; animation-delay: .2s; }
.quota-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.quota-full { margin: 0; color: var(--danger); font-size: 13px; font-weight: 600; }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--grad); transition: width 1s var(--ease); }
.bar.warn > span { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.bar.sm { height: 6px; }
.usage { display: grid; gap: 5px; min-width: 0; }
.usage small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.usage .bar > span { transform-origin: left; animation: grow .9s var(--ease) both; }

.user-row.with-company { grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, .9fr) minmax(0, 1fr) 56px 84px 168px; }
.company-row { grid-template-columns: 40px minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .9fr) 244px; }

/* Zwei-Faktor-Anmeldung */
.steps { display: grid; gap: 6px; margin: 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; }
.steps li::marker { color: var(--accent-text); font-weight: 700; }
.twofa-setup { display: grid; gap: 14px; }
.qr-box {
  display: grid; justify-items: center; gap: 10px; padding: 16px;
  border: 1px dashed var(--line); border-radius: 16px; background: var(--surface-2);
  animation: fadeUp .35s var(--ease) both;
}
.qr-box img { width: 180px; height: 180px; border-radius: 12px; background: #fff; padding: 6px; box-shadow: var(--shadow-sm); }
.qr-key { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.qr-key code { padding: 6px 10px; border-radius: 9px; background: var(--surface); font-size: 13px; overflow-wrap: anywhere; text-align: center; }
.code-input { font-size: 22px !important; letter-spacing: .3em; text-align: center; }
.twofa-on { color: var(--success); font-weight: 600; }
.twofa-off { color: var(--warn); font-weight: 600; }
.attachments.sanitized { background: rgba(16, 185, 129, .1); color: var(--success); }
.limit-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px 0 4px; color: var(--muted); font-size: 12.5px; }
.limit-note .i { width: 14px; height: 14px; }

/* Laufzeit von Firmen */
.notices { display: grid; gap: 10px; }
.notice-card {
  display: grid; gap: 4px; padding: 14px 18px;
  border-color: rgba(245, 158, 11, .35);
  background: linear-gradient(var(--warn-soft), var(--warn-soft)), var(--surface);
  animation: rise .45s var(--ease) both;
}
.notice-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--warn); font-weight: 700; }
.notice-head .i { animation: wiggle .8s var(--ease) .4s; }
.notice-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 0; border-top: 1px solid rgba(245, 158, 11, .2);
}
.notice-head + .notice-item, .notice-card > .notice-item:first-child { border-top: 0; }
.notice-text { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 500; }
.notice-text .i { color: var(--warn); }
.notice-item .btn { height: 36px; }
.req-pill { background: var(--accent-soft); color: var(--accent-text); }
.warn-pill { background: var(--warn-soft); color: var(--warn); }
.bad-pill { background: var(--danger-soft); color: var(--danger); }
.expiry { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.req-note { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-size: 12px; font-weight: 600; }
.req-note .i { width: 13px; height: 13px; }
.tab-badge {
  display: inline-grid; place-items: center; vertical-align: 1px;
  min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700;
  animation: pop .5s var(--spring);
}
.expired-card { display: grid; justify-items: center; gap: 10px; padding: 44px 24px; text-align: center; animation: rise .5s var(--ease) both; }
.expired-card h2 { margin: 4px 0 0; font-size: 22px; }
.expired-card p { max-width: 460px; margin: 0 0 8px; }
.expired-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 24px; background: var(--danger-soft); color: var(--danger); animation: bob 3.2s ease-in-out infinite; }
.expired-icon .i { width: 32px; height: 32px; }
.quick-months { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-months .btn { height: 34px; min-width: 56px; font-variant-numeric: tabular-nums; }
.code-row { grid-template-columns: 40px minmax(0, 1.2fr) 70px minmax(0, 1fr) minmax(0, .9fr) 84px; }
.invite-row { grid-template-columns: 40px minmax(0, 1.1fr) 76px minmax(0, 1.1fr) minmax(0, .7fr) 84px; }
.join-status { display: flex; align-items: center; gap: 8px; margin: -4px 0 0; font-size: 13.5px; font-weight: 600; animation: fadeUp .25s var(--ease); }
.join-status:empty { display: none; }
.join-status .i { width: 16px; height: 16px; stroke-width: 2.6; }
.join-status.ok { color: var(--success); }
.join-status.ok .i { stroke-dasharray: 26; stroke-dashoffset: 26; animation: draw .4s ease forwards; }
.join-status.bad { color: var(--danger); }
.code-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.ok-pill, .muted-pill {
  display: inline-block; max-width: 100%; line-height: 22px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
.ok-pill { background: rgba(16, 185, 129, .14); color: var(--success); }
.muted-pill { background: var(--surface-2); color: var(--muted); }
.icon-btn.copied { background: rgba(16, 185, 129, .14); color: var(--success); }
.icon-btn.copied .i { animation: pop .4s var(--spring); }

/* Viele Adressen erstellen */
.series { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.random-pane { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; align-items: end; }
.random-pane .reroll { grid-column: 1 / -1; justify-self: start; }
.reroll .i, .dice-btn .i { transition: color .2s; }
.reroll:hover .i, .dice-btn:hover .i { color: var(--accent-text); }
.dice-btn {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; margin-right: 2px;
  border: 0; border-radius: 9px;
  background: transparent; color: var(--muted);
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .15s var(--ease);
}
.dice-btn:hover { background: var(--surface-3); color: var(--text); }
.dice-btn:active { transform: scale(.88); }
.bulk-list { min-height: 150px; }
.bulk-preview { display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  max-width: 100%; padding: 4px 10px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-text);
  font-size: 12.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  animation: fadeUp .25s var(--ease) both;
}
.chip.more { background: var(--surface-2); color: var(--muted); }
.chip.bad { background: var(--danger-soft); color: var(--danger); }
.result-head { display: flex; align-items: center; gap: 14px; }
.result-head strong { font-size: 17px; }
.result-check { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--success); color: #fff; animation: pop .55s var(--spring); }
.result-check.none { background: var(--danger); }
.result-check .i { width: 24px; height: 24px; stroke-width: 3; stroke-dasharray: 26; stroke-dashoffset: 26; animation: draw .5s .2s ease forwards; }
.failed-list { display: grid; gap: 4px; max-height: 120px; overflow-y: auto; padding: 10px 12px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 13px; }
.result-table { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.result-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.result-table th, .result-table td { padding: 9px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.result-table th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.result-table tr:last-child td { border-bottom: 0; }

@media (max-width: 860px) {
  .folder .label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .lang-btn { padding: 0 8px; }
}

@media (max-width: 760px) {
  .user-row.with-company { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .company-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .code-row { grid-template-columns: 40px minmax(0, 1fr) 44px auto; }
  .invite-row { grid-template-columns: 40px minmax(0, 1fr) 52px auto; }
  .company-row .row-actions .icon-btn, .code-row .row-actions .icon-btn { width: 32px; height: 32px; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .btn { flex: 1; }
}

/* =========================================================
   Animationen
   ========================================================= */
@keyframes grow { from { transform: scaleX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes itemIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes flash { 0%, 35% { background-color: var(--accent-soft); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes pop { 40% { transform: scale(1.3); } }
@keyframes wiggle { 25% { transform: rotate(-14deg); } 60% { transform: rotate(10deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.95); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes modalOut { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(18px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }
}
