:root{
  --bg:#020617;
  --bg2:#06111f;
  --panel:rgba(7,17,31,.86);
  --panel2:rgba(15,23,42,.92);
  --line:rgba(148,163,184,.22);
  --line2:rgba(148,163,184,.36);
  --text:#f8fafc;
  --muted:#94a3b8;
  --green:#10b981;
  --green2:#059669;
  --white:#ffffff;
  --dark:#111827;
  --soft:#f8fafc;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}
button,input,textarea{font:inherit}

.login-page,.app-page,.compose-page{
  background:
    radial-gradient(circle at 14% 6%,rgba(16,185,129,.28),transparent 28%),
    radial-gradient(circle at 86% 10%,rgba(14,165,233,.12),transparent 25%),
    radial-gradient(circle at 50% 100%,rgba(16,185,129,.09),transparent 30%),
    linear-gradient(135deg,#020617 0%,#07111f 52%,#0b1220 100%);
}

/* LOGIN */
.login-shell{
  width:min(1180px,94vw);
  min-height:100vh;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(320px,1.1fr) minmax(340px,.9fr);
  align-items:center;
  gap:48px;
  padding:48px;
}
.logo-card{
  width:290px;
  min-height:104px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  border-radius:30px;
  padding:18px;
  margin-bottom:32px;
  box-shadow:0 24px 70px rgba(0,0,0,.34);
}
.logo-card img{max-width:250px;max-height:88px;object-fit:contain}
.login-hero h1{
  font-size:clamp(46px,6vw,76px);
  line-height:.98;
  margin:0 0 18px;
  font-weight:950;
  letter-spacing:-.04em;
}
.login-hero p{color:#cbd5e1;font-size:22px;max-width:590px;line-height:1.45}
.feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:36px}
.feature-grid div{
  background:rgba(255,255,255,.07);
  border:1px solid rgba(148,163,184,.22);
  border-radius:20px;
  padding:20px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.feature-grid b{display:block;color:var(--green);margin-bottom:8px;font-size:18px}
.feature-grid span{color:#cbd5e1;font-size:14px}
.login-card,.compose-card{
  background:rgba(15,23,42,.88);
  border:1px solid rgba(148,163,184,.24);
  border-radius:30px;
  padding:36px;
  box-shadow:0 28px 80px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter:blur(18px);
}
.login-card h2{margin:0 0 8px;font-size:34px;letter-spacing:-.02em}
.login-card p{color:var(--muted);margin:0 0 26px}
.alert{
  padding:14px 16px;
  border-radius:16px;
  margin-bottom:18px;
  border:1px solid rgba(148,163,184,.24);
  background:rgba(255,255,255,.08);
}
.alert.error{border-color:rgba(239,68,68,.45);background:rgba(239,68,68,.13)}
.alert.success{border-color:rgba(16,185,129,.45);background:rgba(16,185,129,.13)}
label{display:block;margin:15px 0 8px;color:#e5e7eb;font-weight:800}
input,textarea{
  width:100%;
  background:#07111f;
  color:#fff;
  border:1px solid rgba(148,163,184,.35);
  border-radius:15px;
  padding:0 15px;
  outline:none;
}
input:focus,textarea:focus{border-color:rgba(16,185,129,.75);box-shadow:0 0 0 4px rgba(16,185,129,.12)}
input{height:52px}
textarea{height:360px;padding:16px;resize:vertical;line-height:1.5}
button,.primary-small{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:46px;
  padding:0 20px;
  cursor:pointer;
  background:linear-gradient(135deg,var(--green),var(--green2));
  color:#fff;
  border:0;
  border-radius:15px;
  font-weight:900;
  box-shadow:0 14px 32px rgba(16,185,129,.24);
}
button:hover,.primary-small:hover{filter:brightness(1.08)}
.login-card button{width:100%;height:54px;margin-top:16px}

/* APP LAYOUT */
.mail-app{
  position:fixed;
  inset:0;
  display:grid;
  grid-template-columns:96px 310px minmax(410px,480px) minmax(540px,1fr);
  gap:16px;
  padding:16px;
  overflow:hidden;
}
.appbar{
  border-radius:28px;
  background:rgba(2,6,23,.92);
  border:1px solid rgba(148,163,184,.16);
  box-shadow:0 28px 80px rgba(0,0,0,.36);
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:14px 8px;
  gap:12px;
  backdrop-filter:blur(18px);
}
.appbar img{
  width:68px;
  height:68px;
  object-fit:contain;
  background:#fff;
  border-radius:20px;
  padding:7px;
  margin-bottom:12px;
}
.appbar a{
  width:74px;
  min-height:66px;
  border-radius:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(148,163,184,.11);
  color:#cbd5e1;
  font-size:25px;
  transition:.15s ease;
}
.appbar a:hover,.appbar a.active{
  background:linear-gradient(135deg,var(--green),var(--green2));
  color:#fff;
  box-shadow:0 14px 34px rgba(16,185,129,.24);
  transform:translateY(-1px);
}
.folders-panel,.messages-panel,.preview-panel{
  border-radius:28px;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.24);
  box-shadow:0 28px 80px rgba(0,0,0,.36),inset 0 1px 0 rgba(255,255,255,.04);
}
.folders-panel{
  background:linear-gradient(180deg,rgba(8,21,36,.94),rgba(3,8,18,.97));
  backdrop-filter:blur(18px);
}
.messages-panel{
  background:linear-gradient(180deg,rgba(8,21,36,.94),rgba(7,17,31,.94));
  display:flex;
  flex-direction:column;
  min-width:0;
  backdrop-filter:blur(18px);
}
.preview-panel{
  background:#fff;
  color:var(--dark);
  display:flex;
  flex-direction:column;
  min-width:0;
}
.panel-brand{
  padding:24px 20px 16px;
  border-bottom:1px solid rgba(148,163,184,.16);
}
.panel-brand strong{display:block;color:#fff;font-size:25px;line-height:1.05;letter-spacing:-.02em}
.panel-brand span{display:block;color:var(--green);font-weight:900;margin-top:5px}
.account{
  margin:16px 18px;
  padding:14px;
  border-radius:18px;
  background:rgba(255,255,255,.06);
  color:#cbd5e1;
  font-size:13px;
  word-break:break-all;
  border:1px solid rgba(148,163,184,.13);
}
.folder-list{padding:0 0 16px;overflow:auto;max-height:calc(100vh - 185px)}
.folder-list a{
  display:flex;
  align-items:center;
  gap:10px;
  margin:7px 12px;
  padding:13px 15px;
  border-radius:17px;
  border:1px solid rgba(148,163,184,.12);
  background:rgba(255,255,255,.045);
  color:#e5e7eb;
  transition:.15s ease;
}
.folder-list a:before{content:"";width:9px;height:9px;border-radius:50%;background:rgba(148,163,184,.55)}
.folder-list a:hover,.folder-list a.selected{
  background:linear-gradient(135deg,rgba(16,185,129,.72),rgba(5,150,105,.52));
  border-color:rgba(16,185,129,.80);
  color:#fff;
  box-shadow:0 14px 34px rgba(16,185,129,.18);
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;

    background: #07111f;
    backdrop-filter: blur(20px);

    z-index: 99999;

    transition: left .3s ease;
    overflow-y: auto;
}

.mobile-sidebar.open {
    left: 0;
}

.mobile-overlay {
    position: fixed;
    inset: 0;

    background: rgba(0,0,0,.55);

    opacity: 0;
    visibility: hidden;

    z-index: 99998;

    transition: .3s;
}

.mobile-overlay.show {
    opacity: 1;
    visibility: visible;
}

.folder-list a.selected:before{background:#fff}
.panel-header{
  min-height:76px;
  padding:16px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  background:rgba(15,23,42,.86);
  border-bottom:1px solid rgba(148,163,184,.18);
}
.panel-header strong{display:block;font-size:22px;letter-spacing:-.02em}
.panel-header span{display:block;color:var(--muted);font-size:12px;margin-top:4px}
.message-list{overflow:auto;flex:1}
.message-row{
  display:block;
  padding:17px 18px;
  border-bottom:1px solid rgba(148,163,184,.13);
  background:rgba(255,255,255,.055);
  box-shadow:inset 3px 0 0 transparent;
  transition:.12s ease;
}
.message-row:hover{
  background:rgba(16,185,129,.14);
  box-shadow:inset 3px 0 0 rgba(16,185,129,.65);
}
.message-row.active{
  background:linear-gradient(90deg,rgba(16,185,129,.32),rgba(16,185,129,.13));
  box-shadow:inset 3px 0 0 #10b981;
}
.message-row.unread strong{font-weight:950}
.row-top{display:flex;justify-content:space-between;gap:12px;color:#cbd5e1;font-size:13px;margin-bottom:8px}
.row-top b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:70%}
.row-top time{white-space:nowrap;color:var(--muted)}
.message-row strong{display:block;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}
.pager{
  min-height:54px;
  padding:12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:rgba(15,23,42,.72);
  border-top:1px solid rgba(148,163,184,.16);
  color:#cbd5e1;
  font-size:13px;
}
.pager a{color:var(--green);font-weight:900}
.preview-header{
  padding:22px 26px;
  border-bottom:1px solid #e5e7eb;
  display:flex;
  justify-content:space-between;
  gap:18px;
  background:#fff;
}
.preview-header h2{margin:0 0 7px;font-size:25px;color:var(--dark);letter-spacing:-.02em}
.preview-header p{margin:0;color:#6b7280}
.preview-actions{display:flex;gap:10px;align-items:flex-start}
.preview-actions a,.preview-actions button{
  height:42px;
  border-radius:13px;
  background:#ecfdf5;
  color:#059669;
  box-shadow:none;
}
.mail-body{padding:28px;overflow:auto;line-height:1.6;color:var(--dark);font-size:15px}
.mail-html{max-width:100%;overflow:auto}
.welcome-preview{margin:auto;text-align:center;color:#6b7280;padding:30px}
.welcome-preview img{
  width:260px;
  background:#fff;
  border-radius:28px;
  padding:18px;
  box-shadow:0 18px 50px rgba(0,0,0,.14);
  margin-bottom:20px;
}
.welcome-preview h2{color:var(--dark);font-size:28px;margin:0 0 8px}
.attachments{padding:20px 28px;border-top:1px solid #e5e7eb}
.attachments h3{margin:0 0 10px}
.attachments a{display:inline-block;margin:4px 8px 4px 0;padding:9px 13px;border-radius:11px;background:#ecfdf5;color:#059669;font-weight:800}
.empty{padding:34px;color:var(--muted);text-align:center}

/* COMPOSE */
.compose-shell{
  position:fixed;
  inset:0;
  display:grid;
  grid-template-columns:96px minmax(500px,920px);
  gap:16px;
  padding:16px;
  justify-content:center;
}
.compose-card{align-self:stretch;overflow:auto}
.compose-card header{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}
.compose-card h1{margin:0;font-size:32px}
.compose-card p{color:var(--muted);margin:5px 0 0}
.compose-card header a{color:var(--green);font-weight:900}

/* RESPONSIVE */
@media(max-width:1200px){
  .mail-app{grid-template-columns:90px 280px minmax(360px,1fr)}
  .preview-panel{
  display:flex;
  position:fixed;
  inset:8px 8px 86px 8px;
  z-index:9998;
  border-radius:20px;
  overflow:auto;
}
}
@media(max-width:760px){
  .login-shell{grid-template-columns:1fr;padding:28px}
  .feature-grid{grid-template-columns:1fr}
  .mail-app,.compose-shell{grid-template-columns:1fr;padding:8px}
  .messages-panel,.compose-card{grid-column:1}
  .preview-panel{
  display:flex;
  position:fixed;
  inset:8px 8px 86px 8px;
  z-index:9998;
  border-radius:20px;
  overflow:auto;
}
}

@media(max-width:760px){
  .mail-app{
    grid-template-columns:1fr;
    padding:8px;
  }

  .appbar{
    display:flex;
    position:fixed;
    left:8px;
    right:8px;
    bottom:8px;
    height:70px;
    z-index:9999;
    flex-direction:row;
    justify-content:center;
  }

  .appbar img{
    display:none;
  }

  .folders-panel{
    display:none;
  }

  .messages-panel{
    margin-bottom:82px;
  }

  .preview-panel{
    display:none;
  }
}


/* KundenFlow Mail Weiterentwicklung */
.searchbar{
  padding:14px;
  display:flex;
  gap:10px;
  border-bottom:1px solid rgba(148,163,184,.14);
}
.searchbar input{
  height:44px;
  background:rgba(2,6,23,.72);
  border:1px solid rgba(148,163,184,.30);
  color:#fff;
  border-radius:14px;
}
.searchbar button{
  height:44px;
  min-width:92px;
}
.searchbar a{
  height:44px;
  display:inline-flex;
  align-items:center;
  padding:0 12px;
  color:#10b981;
  font-weight:900;
}
.account small{display:block;color:#94a3b8;font-size:11px;margin-bottom:4px}
.account b{display:block;color:#fff;font-size:13px}
.folder-list a i{font-style:normal;width:20px;text-align:center}
.preview-actions form{margin:0}
.preview-actions{flex-wrap:wrap;justify-content:flex-end}
.preview-actions button{cursor:pointer}
.attachments small{color:#6b7280;margin-left:5px}
.compose-form{display:grid;gap:2px}
.check-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 0;
  border-bottom:1px solid rgba(148,163,184,.18);
}
.check-row span{
  font-weight:900;
  padding:6px 10px;
  border-radius:999px;
}
.check-row.ok span{background:rgba(16,185,129,.16);color:#10b981}
.check-row.fail span{background:rgba(239,68,68,.16);color:#ef4444}
.mail-body img{max-width:100%;height:auto}
.mail-body table{max-width:100%}
.mail-body a{color:#059669;font-weight:700}
@media(max-width:760px){
  .searchbar{flex-direction:column}
  .searchbar button,.searchbar a{width:100%;justify-content:center}
}

/* v4 Funktionen */
.folder-list a{position:relative}.folder-list a em{margin-left:auto;min-width:24px;height:22px;padding:0 7px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:rgba(16,185,129,.22);color:#fff;font-style:normal;font-size:12px;font-weight:900}.folder-list a i{font-style:normal;width:20px;text-align:center}.message-row.flagged strong{color:#fde68a}.preview-actions form{margin:0}.preview-actions{flex-wrap:wrap;justify-content:flex-end;max-width:560px}.move-bar{padding:12px 22px;background:#f8fafc;border-bottom:1px solid #e5e7eb}.move-bar form{display:flex;align-items:center;gap:10px}.move-bar label{color:#374151;margin:0;font-size:13px;white-space:nowrap}.move-bar select{height:40px;border:1px solid #d1d5db;border-radius:12px;background:#fff;color:#111827;padding:0 12px}.move-bar button{height:40px;box-shadow:none}.folder-create-form{margin-bottom:24px}.inline-form{display:flex;gap:12px}.inline-form input{flex:1}.folder-admin-list{display:grid;gap:10px;margin-top:20px}.folder-admin-list a{display:flex;align-items:center;gap:14px;padding:15px;border:1px solid rgba(148,163,184,.20);border-radius:17px;background:rgba(255,255,255,.06)}.folder-admin-list i{width:42px;height:42px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:rgba(16,185,129,.14);font-style:normal}.folder-admin-list b{display:block;color:#fff}.folder-admin-list span{display:block;color:#94a3b8;font-size:13px;margin-top:3px}.compose-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}@media(max-width:760px){.inline-form,.move-bar form,.compose-grid{display:block}.inline-form button,.move-bar button{width:100%;margin-top:10px}.move-bar select{width:100%;margin-top:8px}}

/* Mobile Detailansicht v5 */
.view-page{min-height:100vh;background:radial-gradient(circle at 14% 6%,rgba(16,185,129,.25),transparent 28%),linear-gradient(135deg,#020617 0%,#07111f 52%,#0b1220 100%);color:#f8fafc}
.mobile-view-shell{width:min(980px,100%);margin:0 auto;padding:12px}
.mobile-view-top{position:sticky;top:0;z-index:50;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 4px 14px;background:linear-gradient(180deg,rgba(2,6,23,.96),rgba(2,6,23,.72));backdrop-filter:blur(14px)}
.mobile-view-top a{color:#10b981;font-weight:900}.mobile-view-top strong{color:#fff}
.mobile-message-card{background:#fff;color:#111827;border-radius:24px;overflow:hidden;box-shadow:0 24px 70px rgba(0,0,0,.35)}
.mobile-message-head{padding:20px;border-bottom:1px solid #e5e7eb}.mobile-message-head h1{margin:0 0 10px;font-size:24px;line-height:1.15;color:#111827}.mobile-message-head p{margin:4px 0;color:#6b7280;font-size:14px}
.mobile-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px;background:#f8fafc;border-bottom:1px solid #e5e7eb}
.mobile-actions a,.mobile-actions button{width:100%;min-height:44px;box-shadow:none;border-radius:14px;background:#ecfdf5;color:#059669;border:0;font-weight:900}.mobile-actions form{margin:0}
.mobile-move-form{padding:14px;display:grid;gap:10px;background:#fff;border-bottom:1px solid #e5e7eb}.mobile-move-form label{color:#374151;margin:0}.mobile-move-form select{height:44px;border-radius:14px;border:1px solid #d1d5db;background:#fff;color:#111827;padding:0 12px}.mobile-move-form button{width:100%}
@media(max-width:760px){.message-row{cursor:pointer}.preview-panel{display:none!important}}

/* Phase 1: HTML Editor, Anhänge, Entwürfe, Einstellungen */
.editor-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px}
.editor-toolbar button{height:38px;padding:0 13px;border-radius:12px;background:rgba(255,255,255,.08);border:1px solid rgba(148,163,184,.24);box-shadow:none;color:#e5e7eb}
.html-editor{min-height:320px;width:100%;background:#07111f;color:#fff;border:1px solid rgba(148,163,184,.35);border-radius:15px;padding:16px;outline:none;line-height:1.55;overflow:auto}
.html-editor.small{min-height:180px}
.html-editor:focus{border-color:rgba(16,185,129,.75);box-shadow:0 0 0 4px rgba(16,185,129,.12)}
.html-editor a{color:#10b981;text-decoration:underline}.html-editor blockquote{background:rgba(255,255,255,.05);border-radius:12px;padding:10px 12px}
.form-hint{display:block;color:#94a3b8;margin:7px 0 12px}.compose-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:10px}.secondary-button{background:rgba(255,255,255,.08);border:1px solid rgba(148,163,184,.24);box-shadow:none;color:#e5e7eb}
input[type="file"]{height:auto;padding:14px;background:#07111f;color:#e5e7eb}
@media(max-width:760px){.compose-actions button{width:100%}.html-editor{min-height:260px}}
.dropzone{border:2px dashed rgba(16,185,129,.45);border-radius:18px;padding:22px;text-align:center;background:rgba(16,185,129,.08);color:#d1fae5;font-weight:900;cursor:pointer;margin-bottom:10px}
.dropzone.dragover{background:rgba(16,185,129,.22);transform:scale(1.01)}
.attachment-preview{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 4px}.attachment-preview span,.folder-chip{display:inline-flex;border-radius:999px;background:rgba(16,185,129,.12);color:#059669;padding:6px 10px;font-weight:800;font-size:12px;margin-top:6px}.search-all{display:flex;align-items:center;gap:7px;margin:0;color:#cbd5e1;white-space:nowrap}.search-all input{width:auto;height:auto}.contact-list{display:flex;flex-direction:column;gap:12px;margin-top:20px}.contact-row{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid rgba(148,163,184,.22);background:rgba(255,255,255,.06);border-radius:18px;padding:14px}.contact-row b{display:block}.contact-row span{display:block;color:#94a3b8}.contact-row>div:last-child{display:flex;gap:8px;align-items:center}.secondary-button{background:rgba(255,255,255,.08)!important;color:#fff;border:1px solid rgba(148,163,184,.25);box-shadow:none}.toast{position:fixed;right:22px;bottom:22px;background:#10b981;color:#fff;border-radius:16px;padding:16px 20px;font-weight:900;box-shadow:0 18px 50px rgba(0,0,0,.25);z-index:9999}.contact-search{margin-top:22px}
@media (max-width:760px){.contact-row{align-items:flex-start;flex-direction:column}.contact-row>div:last-child{width:100%;justify-content:space-between}.dropzone{padding:18px}}

/* Phase 3 Erweiterungen */
.compose-card.wide{max-width:1100px;width:100%;}
.compose-form.compact{border:1px solid #e5e7eb;border-radius:18px;padding:18px;background:#fff;margin-bottom:18px;}
.inline-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;}
.inline-actions button,.mobile-actions button,.mobile-move-form button{border:0;border-radius:10px;padding:9px 12px;background:#eef2ff;color:#1e3a8a;font-weight:700;cursor:pointer;}
.message-row.done{opacity:.65;text-decoration:line-through;}
.identity-card{border:1px solid #e5e7eb;border-radius:16px;padding:14px;margin:12px 0;background:#f9fafb;}
.identity-card textarea{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:10px;font:inherit;}
.thread-list .message-row{border-left:4px solid #2563eb;}
.mobile-move-form input{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:10px;margin:6px 0 10px;}
.move-bar input{border:1px solid #d1d5db;border-radius:10px;padding:8px;min-width:170px;}
.appbar a[title="Kalender/Aufgaben"],.appbar a[title="Spamfilter"],.appbar a[title="Konten"]{font-size:18px;}

/* KundenFlow Mail Design Update 2026 */
.kf-dashboard{overflow:hidden}
.kf-app-shell{position:fixed;inset:0;padding:0 8px 10px;background:radial-gradient(circle at 0 0,rgba(16,185,129,.18),transparent 28%),radial-gradient(circle at 78% 52%,rgba(16,185,129,.08),transparent 28%),linear-gradient(135deg,#031015 0%,#07111f 54%,#030816 100%);color:#f8fafc}
.kf-topbar{height:92px;display:grid;grid-template-columns:340px 210px minmax(320px,420px) 1fr auto;align-items:center;gap:18px;padding:0 18px;border-bottom:1px solid rgba(148,163,184,.18)}
.kf-logo{display:flex;align-items:center;gap:12px;min-width:0}.kf-logo img{width:88px;height:52px;object-fit:contain}.kf-logo span{font-size:26px;font-weight:900;letter-spacing:-.04em;white-space:nowrap}.kf-logo strong{color:#10b981;font-weight:900}.kf-compose-btn{height:50px;display:inline-flex;align-items:center;justify-content:center;gap:10px;border-radius:9px;background:linear-gradient(135deg,#12c77c,#079b63);box-shadow:0 14px 35px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.18);font-weight:800}.kf-compose-btn span{font-size:24px;font-weight:400}.kf-compose-btn em{margin-left:12px;padding-left:14px;border-left:1px solid rgba(255,255,255,.14);font-style:normal}.kf-top-search{height:50px;display:flex;align-items:center;background:rgba(10,20,32,.86);border:1px solid rgba(148,163,184,.24);border-radius:9px;overflow:hidden;box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}.kf-top-search input{height:100%;flex:1;border:0;border-radius:0;background:transparent;padding:0 16px;color:#e5e7eb;box-shadow:none}.kf-top-search button,.kf-top-search label{width:52px;height:100%;display:flex;align-items:center;justify-content:center;margin:0;border:0;border-left:1px solid rgba(148,163,184,.18);border-radius:0;background:transparent;color:#e5e7eb;box-shadow:none;font-size:24px;cursor:pointer}.kf-top-search label{font-size:20px}.kf-top-search label input{display:none}.kf-top-links{display:flex;align-items:center;justify-content:flex-end;gap:26px;font-weight:800;color:#e5e7eb;white-space:nowrap}.kf-top-links a{opacity:.94}.kf-top-links a:hover{color:#10b981}.kf-profile{display:flex;align-items:center;gap:10px}.kf-profile span{width:46px;height:46px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(135deg,#12c77c,#079b63);font-size:24px;font-weight:800}.kf-profile b{font-size:13px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-profile a{color:#cbd5e1}
.kf-main-grid{height:calc(100vh - 92px);display:grid;grid-template-columns:330px minmax(420px,560px) minmax(540px,1fr);gap:18px;padding:12px 0 0}.kf-sidebar{padding:0 20px 12px 12px;border-right:1px solid rgba(148,163,184,.16);overflow:auto}.kf-sidebar section{padding:12px 0 18px;border-bottom:1px solid rgba(148,163,184,.16)}.kf-sidebar h3{margin:0 0 12px 6px;color:#a8b3c3;font-size:13px;font-weight:800;letter-spacing:.02em}.kf-side-nav{display:grid;gap:8px}.kf-side-nav a,.kf-dark-toggle{width:100%;height:50px;display:flex;align-items:center;gap:14px;padding:0 12px;border:0;border-radius:8px;background:transparent;color:#f8fafc;font-size:16px;font-weight:650;box-shadow:none;text-align:left}.kf-side-nav a i,.kf-dark-toggle i{width:26px;font-style:normal;text-align:center;font-size:22px;opacity:.9}.kf-side-nav a em{margin-left:auto;min-width:31px;height:29px;display:inline-flex;align-items:center;justify-content:center;border-radius:9px;background:#10b981;color:#fff;font-style:normal;font-weight:900}.kf-side-nav a.active{background:linear-gradient(90deg,rgba(16,185,129,.58),rgba(16,185,129,.2));box-shadow:inset 3px 0 0 #10b981;color:#fff}.kf-side-nav.quiet a:hover,.kf-side-nav a:hover,.kf-dark-toggle:hover{background:rgba(255,255,255,.06)}.kf-dark-toggle{cursor:default;justify-content:flex-start}.kf-dark-toggle em{margin-left:auto;width:46px;height:25px;border-radius:999px;background:#10b981;position:relative;font-style:normal}.kf-dark-toggle em:after{content:"";position:absolute;right:4px;top:4px;width:17px;height:17px;border-radius:50%;background:#fff}.kf-brand-card{margin-top:18px;padding:30px 18px;border-radius:9px;background:rgba(10,20,32,.78);border:1px solid rgba(148,163,184,.16);text-align:center}.kf-brand-card img{width:105px;height:58px;object-fit:contain}.kf-brand-card b{display:block;margin-top:8px;font-size:18px}.kf-brand-card p{margin:10px 0 16px;color:#cbd5e1;line-height:1.45}.kf-brand-card a{color:#10b981;font-weight:800}
.kf-list-panel{min-width:0;display:flex;flex-direction:column;padding:0 0 10px;border-right:1px solid rgba(148,163,184,.16)}.kf-list-head{height:66px;display:flex;align-items:center;gap:18px;padding:0 18px}.kf-list-head h1{font-size:25px;margin:0;letter-spacing:-.03em}.kf-list-head h1 span{color:#94a3b8;font-size:16px}.kf-list-status{margin-left:auto;color:#10b981;font-weight:800}.kf-dots{font-size:28px;color:#94a3b8}.kf-search-note{margin:0 18px 10px;padding:10px 12px;border-radius:10px;background:rgba(16,185,129,.08);color:#d1fae5}.kf-search-note a{color:#10b981;font-weight:900}.kf-message-list{flex:1;overflow:auto;padding:0 10px}.kf-message{position:relative;min-height:108px;display:grid;grid-template-columns:18px minmax(0,1fr) 20px;gap:10px;padding:18px 16px;border:1px solid rgba(148,163,184,.12);border-radius:8px 8px 0 0;background:rgba(7,18,29,.58);border-bottom-color:rgba(148,163,184,.18);transition:.15s ease}.kf-message+.kf-message{border-top:0;border-radius:0}.kf-message:hover{background:rgba(12,35,45,.84)}.kf-message.active{background:linear-gradient(90deg,rgba(16,185,129,.34),rgba(16,185,129,.13));border-left-color:#10b981;box-shadow:inset 3px 0 0 #10b981}.kf-dot{width:9px;height:9px;border-radius:50%;background:#10b981;margin-top:10px}.kf-message:not(.unread) .kf-dot{background:transparent;border:1px solid rgba(16,185,129,.45)}.kf-msg-content{min-width:0}.kf-msg-meta{display:flex;justify-content:space-between;gap:10px;color:#cbd5e1;font-size:13px}.kf-msg-meta b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-msg-meta time{color:#d1d5db;white-space:nowrap}.kf-message strong{display:block;margin:8px 0 7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#f8fafc;font-size:16px}.kf-message p{margin:0;color:#cbd5e1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kf-read-circle{width:11px;height:11px;border-radius:50%;border:1px solid rgba(203,213,225,.7);align-self:center}.kf-message.unread .kf-read-circle{background:#10b981;border-color:#10b981}.kf-pager{height:62px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;color:#d1d5db}.kf-pager div{display:flex;align-items:center;gap:18px}.kf-pager a,.kf-pager span{color:#cbd5e1}.kf-pager b{width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:linear-gradient(135deg,#0d8f60,#086b49);box-shadow:0 10px 25px rgba(0,0,0,.2)}
.kf-preview-panel{min-width:0;margin:10px 10px 10px 0;border-radius:9px;background:radial-gradient(circle at 52% 44%,rgba(16,185,129,.11),transparent 26%),linear-gradient(160deg,rgba(18,29,42,.96),rgba(9,15,25,.96));border:1px solid rgba(148,163,184,.23);box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 22px 60px rgba(0,0,0,.26);overflow:auto;color:#f8fafc}.kf-welcome{min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:44px}.kf-envelope{width:130px;height:116px;display:flex;align-items:center;justify-content:center;border-radius:18px;background:linear-gradient(135deg,#10b981,#059669);font-size:64px;color:#fff;box-shadow:0 0 70px rgba(16,185,129,.25);margin-bottom:76px}.kf-welcome h2{margin:0;color:#fff;font-size:31px;font-weight:400}.kf-welcome h2 b{font-weight:900}.kf-welcome h2 span{color:#10b981}.kf-welcome>p{margin:18px 0 88px;color:#a8b3c3;font-size:17px;line-height:1.55}.kf-quick-cards{width:min(760px,100%);display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.kf-quick-cards a{min-height:145px;padding:25px;border-radius:9px;border:1px solid rgba(148,163,184,.2);background:rgba(5,14,24,.62);text-align:left}.kf-quick-cards i{display:block;color:#10b981;font-size:26px;font-style:normal;margin-bottom:16px}.kf-quick-cards b{display:block;font-size:14px}.kf-quick-cards p{min-height:38px;margin:12px 0 18px;color:#a8b3c3;font-size:13px;line-height:1.45}.kf-quick-cards em{color:#10b981;font-style:normal;font-size:20px}.kf-preview-head{display:flex;justify-content:space-between;gap:18px;padding:24px;border-bottom:1px solid rgba(148,163,184,.18)}.kf-preview-head h2{margin:0 0 8px;font-size:26px}.kf-preview-head p{margin:0;color:#a8b3c3}.kf-preview-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}.kf-preview-actions a,.kf-action-grid button,.kf-move-box button{height:40px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;padding:0 14px;background:rgba(16,185,129,.13);color:#10b981;border:1px solid rgba(16,185,129,.2);box-shadow:none;font-weight:800}.kf-action-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:14px 24px;border-bottom:1px solid rgba(148,163,184,.18)}.kf-action-grid form{margin:0}.kf-action-grid button{width:100%}.kf-move-box{padding:16px 24px;border-bottom:1px solid rgba(148,163,184,.18)}.kf-move-box form{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px}.kf-move-box label{margin:0;color:#d1d5db}.kf-move-box select{height:42px;border-radius:9px;border:1px solid rgba(148,163,184,.25);background:#07111f;color:#fff;padding:0 12px}.kf-mail-body{padding:28px;line-height:1.65;color:#f8fafc}.kf-mail-body a{color:#10b981}.kf-mail-body img{max-width:100%;height:auto}.kf-mail-body table{max-width:100%}.kf-attachments{padding:20px 28px;border-top:1px solid rgba(148,163,184,.18)}.kf-attachments h3{margin:0 0 12px}.kf-attachments a{display:inline-flex;gap:6px;margin:4px 8px 4px 0;padding:9px 13px;border-radius:10px;background:rgba(16,185,129,.13);color:#10b981;font-weight:800}.kf-attachments small{color:#a8b3c3}.kf-dashboard .alert{margin:0 18px 12px}.kf-dashboard .empty{color:#94a3b8}
@media(max-width:1400px){.kf-topbar{grid-template-columns:280px 190px minmax(260px,380px) 1fr auto}.kf-top-links{gap:14px}.kf-main-grid{grid-template-columns:290px minmax(380px,520px) minmax(440px,1fr)}.kf-logo span{font-size:22px}.kf-logo img{width:78px}.kf-profile b{display:none}}
@media(max-width:1020px){.kf-topbar{grid-template-columns:1fr auto;gap:10px;height:auto;min-height:78px;align-items:center}.kf-top-search{grid-column:1 / -1;order:5;margin-bottom:10px}.kf-compose-btn{justify-self:end}.kf-top-links,.kf-profile{display:none}.kf-main-grid{height:calc(100vh - 140px);grid-template-columns:1fr}.kf-sidebar{display:none}.kf-list-panel{border-right:0}.kf-preview-panel{display:none}.kf-message-list{padding:0 8px 80px}}
@media(max-width:640px){.kf-logo img{width:64px}.kf-logo span{font-size:19px}.kf-compose-btn{height:44px;padding:0 12px;font-size:14px}.kf-list-head{padding:0 12px}.kf-message{min-height:96px;padding:14px 12px}.kf-pager{padding:0 12px}.kf-app-shell{padding:0 4px}}

/* ===== KundenFlow Design Update V2 - gesamtes System ===== */
.kf-logo img{display:none!important}
.kf-logo{min-width:0;display:flex;align-items:center;gap:14px;white-space:nowrap;overflow:hidden}.kf-logo span:not(.kf-logo-mark){font-size:30px;font-weight:950;letter-spacing:-.055em;color:#fff}.kf-logo strong{color:#10b981}.kf-logo-mark{width:54px;height:54px;border-radius:16px;display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#ffffff,#e8fff6);color:#062016;font-weight:1000;letter-spacing:-.12em;box-shadow:0 18px 45px rgba(0,0,0,.22)}.kf-logo-mark:after{content:'✓';font-size:12px;color:#10b981;margin-left:2px;margin-top:-18px}.kf-logo-mark.small{margin:auto;width:78px;height:58px;border-radius:18px;font-size:24px}.kf-logo-mark.small:after{font-size:11px}
.kf-topbar{height:86px!important;grid-template-columns:320px 205px minmax(330px,430px) 1fr auto!important;padding:0 22px!important;background:rgba(3,9,18,.28);backdrop-filter:blur(20px)}.kf-compose-btn{height:52px!important;border-radius:12px!important;background:linear-gradient(135deg,#13c986,#059669)!important;box-shadow:0 18px 42px rgba(16,185,129,.2)!important;font-size:17px!important;font-weight:900!important}.kf-compose-btn span{font-size:22px}.kf-compose-btn em{margin-left:auto;padding-left:16px;border-left:1px solid rgba(255,255,255,.2);font-style:normal}.kf-top-search{height:48px!important;border-radius:10px!important;background:rgba(10,18,30,.88)!important;border:1px solid rgba(148,163,184,.24)!important;overflow:hidden}.kf-top-search input{height:48px!important;border:0!important;background:transparent!important;font-size:17px!important}.kf-top-search button,.kf-top-search label{height:48px!important;width:58px!important;border-left:1px solid rgba(148,163,184,.18)!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;color:#f8fafc!important}.kf-top-links{display:flex;align-items:center;gap:26px;white-space:nowrap}.kf-top-links a{font-size:16px;font-weight:850;color:#e5e7eb}.kf-profile{display:flex;align-items:center;gap:10px;min-width:0}.kf-profile span{width:56px;height:56px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#10b981;color:#fff;font-weight:950;font-size:24px}.kf-profile b{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.kf-main-grid{grid-template-columns:315px minmax(430px,560px) minmax(560px,1fr)!important;gap:18px!important;padding-top:14px!important}.kf-sidebar{padding:0 20px 16px 12px!important}.kf-sidebar h3{margin:0 0 13px 6px!important;font-size:13px!important;color:#aab4c3!important}.kf-side-nav a,.kf-dark-toggle{height:54px!important;border-radius:10px!important;font-size:17px!important;font-weight:800!important}.kf-side-nav a i,.kf-dark-toggle i{font-size:21px!important}.kf-side-nav a.active{background:linear-gradient(90deg,rgba(16,185,129,.62),rgba(16,185,129,.26))!important;border:1px solid rgba(16,185,129,.25)!important;box-shadow:inset 4px 0 0 #10d899!important}.kf-list-panel{border-right:1px solid rgba(148,163,184,.16);padding:0 10px 0 0!important;overflow:hidden}.kf-list-head{height:74px!important;padding:0 14px!important}.kf-list-head h1{font-size:28px!important;letter-spacing:-.04em}.kf-list-status{color:#10d899!important;font-size:17px!important}.kf-message-list{border-radius:9px;border:1px solid rgba(148,163,184,.17);overflow:auto;height:calc(100vh - 245px)}.kf-message{min-height:98px!important;padding:15px 20px!important;border-bottom:1px solid rgba(148,163,184,.14)!important;background:rgba(5,14,25,.35)!important}.kf-message:hover,.kf-message.active{background:linear-gradient(90deg,rgba(16,185,129,.28),rgba(16,185,129,.08))!important}.kf-message.unread .kf-dot{background:#10d899!important}.kf-msg-meta b{font-size:14px!important}.kf-message strong{font-size:17px!important}.kf-message p{font-size:15px!important;color:#cbd5e1!important}.kf-preview-panel{margin-right:10px!important;border-radius:9px!important;background:linear-gradient(180deg,rgba(17,30,44,.9),rgba(9,19,32,.96))!important;color:#f8fafc!important;border:1px solid rgba(148,163,184,.22)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.04)!important}.kf-welcome{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.kf-envelope{width:132px;height:132px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle,rgba(16,185,129,.28),transparent 70%);font-size:74px;color:#10b981;filter:drop-shadow(0 25px 65px rgba(16,185,129,.22))}.kf-welcome h2{font-size:29px;font-weight:500}.kf-welcome h2 b{font-weight:950}.kf-welcome h2 span{color:#10b981}.kf-welcome p{color:#a8b3c3;font-size:16px;line-height:1.6}.kf-quick-cards{display:grid;grid-template-columns:repeat(3,minmax(0,220px));gap:18px;margin-top:45px}.kf-quick-cards a{min-height:132px;text-align:left;border:1px solid rgba(148,163,184,.18);border-radius:9px;background:rgba(9,21,34,.72);padding:22px}.kf-quick-cards i{color:#10d899;font-style:normal;font-size:24px}.kf-quick-cards b{display:block;margin:12px 0 7px}.kf-quick-cards p{font-size:13px;margin:0}.kf-preview-head{border-bottom:1px solid rgba(148,163,184,.18);padding:22px}.kf-preview-head h2{color:#fff}.kf-preview-head p{color:#aab4c3}.kf-mail-body{background:#fff;color:#111827;margin:22px;border-radius:12px;padding:24px;line-height:1.55}.kf-action-grid button,.kf-preview-actions a,.kf-move-box button{border-radius:10px!important;background:rgba(16,185,129,.12)!important;color:#10d899!important;box-shadow:none!important}.kf-move-box select{height:48px;background:#07111f;color:#fff;border:1px solid rgba(148,163,184,.25);border-radius:10px;width:100%;padding:0 14px}.kf-attachments{margin:22px}.kf-attachments a{background:rgba(16,185,129,.12);color:#10d899;border-radius:10px;padding:12px 16px;display:inline-flex;margin:5px 8px 5px 0;font-weight:850}

/* Unterseiten benutzen dasselbe Menü/Layout */
.compose-page{min-height:100vh;background:radial-gradient(circle at 0 0,rgba(16,185,129,.18),transparent 28%),radial-gradient(circle at 78% 52%,rgba(16,185,129,.08),transparent 28%),linear-gradient(135deg,#031015 0%,#07111f 54%,#030816 100%)!important;color:#f8fafc}.compose-shell{width:100%!important;height:100vh!important;margin:0!important;padding:0 8px 14px!important;display:grid!important;grid-template-columns:315px minmax(0,1fr)!important;grid-template-rows:86px minmax(0,1fr)!important;gap:18px!important}.compose-shell>.kf-sub-topbar{grid-column:1 / -1;grid-row:1}.compose-shell>.kf-sub-sidebar{grid-column:1;grid-row:2;border-right:1px solid rgba(148,163,184,.16);overflow:auto}.compose-shell>.compose-card{grid-column:2;grid-row:2;margin:0 10px 0 0!important;max-width:none!important;width:auto!important;align-self:stretch!important;overflow:auto!important;background:linear-gradient(180deg,rgba(17,30,44,.9),rgba(9,19,32,.96))!important;color:#f8fafc!important;border:1px solid rgba(148,163,184,.22)!important;border-radius:9px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 28px 80px rgba(0,0,0,.28)!important;padding:26px!important}.compose-card header{border-bottom:1px solid rgba(148,163,184,.16);padding-bottom:18px;margin-bottom:24px}.compose-card h1{font-size:32px!important;letter-spacing:-.04em}.compose-card h2{margin-top:30px}.compose-card p,.form-hint{color:#aab4c3!important}.compose-card header a,.secondary-button{height:42px;display:inline-flex;align-items:center;justify-content:center;padding:0 16px;border-radius:10px;background:rgba(16,185,129,.12)!important;color:#10d899!important;font-weight:900}.compose-form label{color:#e5e7eb!important}.compose-form input,.compose-form textarea,.compose-form select,.html-editor{background:rgba(3,10,20,.82)!important;color:#fff!important;border:1px solid rgba(148,163,184,.24)!important;border-radius:10px!important}.html-editor{min-height:260px;padding:16px}.html-editor.small{min-height:140px}.editor-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}.editor-toolbar button{height:38px;padding:0 12px;border-radius:9px;background:rgba(255,255,255,.06)!important;color:#fff!important;box-shadow:none!important}.identity-card,.contact-card,.task-card,.filter-card,.account-card{background:rgba(4,13,24,.72)!important;border:1px solid rgba(148,163,184,.18)!important;border-radius:12px!important;padding:18px!important;margin:14px 0!important}.table,.contacts-list,table{width:100%;border-collapse:collapse;background:rgba(4,13,24,.5);border-radius:12px;overflow:hidden}th,td{border-bottom:1px solid rgba(148,163,184,.14);padding:13px;text-align:left}th{color:#aab4c3;font-size:13px;text-transform:uppercase}td{color:#f8fafc}.appbar{display:none!important}

@media(max-width:1200px){.kf-topbar,.compose-shell>.kf-sub-topbar{grid-template-columns:260px 190px 1fr auto!important}.kf-top-links{display:none}.kf-main-grid,.compose-shell{grid-template-columns:280px minmax(360px,1fr)!important}.kf-main-grid{grid-template-columns:280px minmax(360px,1fr)!important}.kf-preview-panel{display:none}.kf-logo span:not(.kf-logo-mark){font-size:24px}.kf-profile b{display:none}}
@media(max-width:820px){.kf-topbar,.compose-shell>.kf-sub-topbar{grid-template-columns:1fr auto!important;height:auto!important;min-height:78px!important}.kf-top-search{grid-column:1 / -1}.kf-profile{display:none}.kf-main-grid,.compose-shell{grid-template-columns:1fr!important}.kf-sidebar,.compose-shell>.kf-sub-sidebar{display:none!important}.compose-shell>.compose-card{grid-column:1!important}.kf-list-panel{padding:0!important}.kf-message-list{height:calc(100vh - 230px)}.kf-quick-cards{grid-template-columns:1fr}}

/* Header Clean Update: nur Profil rechts, Dropdown mit Kontowechsel, Einstellungen, Logout */
.kf-top-links{display:none!important}
.kf-topbar{grid-template-columns:320px 205px minmax(330px,520px) 1fr!important}
.kf-profile{display:none!important}
.kf-profile-menu{justify-self:end;position:relative;min-width:0;z-index:80}
.kf-profile-menu summary{list-style:none;display:flex;align-items:center;gap:10px;cursor:pointer;border-radius:999px;padding:5px 8px 5px 5px;background:transparent;transition:.15s ease;outline:0;color:#fff}
.kf-profile-menu summary::-webkit-details-marker{display:none}
.kf-profile-menu summary:hover,.kf-profile-menu[open] summary{background:rgba(255,255,255,.06)}
.kf-profile-menu summary>span{width:56px;height:56px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#10b981;color:#fff;font-weight:950;font-size:24px;box-shadow:0 14px 35px rgba(16,185,129,.2)}
.kf-profile-menu summary>b{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;color:#f8fafc}
.kf-profile-menu summary>i{font-style:normal;color:#cbd5e1;font-size:15px;transition:.15s ease}
.kf-profile-menu[open] summary>i{transform:rotate(180deg)}
.kf-profile-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 260px;

    background: #0f172a;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;

    z-index: 999999; /* sehr hoch */
    box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.kf-profile-dropdown:before{content:"";position:absolute;right:22px;top:-7px;width:14px;height:14px;background:rgba(6,14,25,.98);border-left:1px solid rgba(148,163,184,.22);border-top:1px solid rgba(148,163,184,.22);transform:rotate(45deg)}
.kf-profile-dropdown strong{display:block;font-size:12px;color:#94a3b8;text-transform:uppercase;letter-spacing:.04em;margin:2px 6px 3px}
.kf-profile-dropdown p{margin:0 6px 12px;color:#f8fafc;font-weight:850;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kf-profile-dropdown em{display:block;margin:12px 6px 8px;color:#94a3b8;font-style:normal;font-size:12px;font-weight:850;text-transform:uppercase;letter-spacing:.04em}
.kf-profile-dropdown a,.kf-profile-dropdown button{width:100%;min-height:46px;display:flex;align-items:center;gap:10px;padding:0 12px;border:0;border-radius:11px;background:transparent;color:#e5e7eb;font-weight:850;text-align:left;box-shadow:none;cursor:pointer;font-size:14px}
.kf-profile-dropdown a:hover,.kf-profile-dropdown button:hover,.kf-profile-dropdown button.active{background:rgba(16,185,129,.12);color:#10d899}
.kf-profile-dropdown button span{width:30px;height:30px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#10b981;color:#fff;font-weight:950;flex:0 0 auto}
.kf-profile-dropdown button b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.kf-profile-dropdown .danger{color:#fecaca;margin-top:6px;border-top:1px solid rgba(148,163,184,.13);border-radius:0;padding-top:12px}
.kf-profile-dropdown .danger:hover{color:#fff;background:rgba(239,68,68,.14);border-radius:11px}
@media(max-width:1400px){.kf-topbar{grid-template-columns:280px 190px minmax(260px,1fr) auto!important}.kf-profile-menu summary>b{max-width:160px}}
@media(max-width:1020px){.kf-profile-menu{display:block!important}.kf-profile-menu summary>b{display:none}.kf-profile-menu summary>span{width:44px;height:44px;font-size:20px}.kf-profile-dropdown{top:56px;right:0;width:min(310px,calc(100vw - 24px))}.kf-topbar{grid-template-columns:1fr auto auto!important}.kf-compose-btn{justify-self:end}.kf-top-search{grid-column:1 / -1;order:5}}

/* Refined UI */
.app-shell,.mail-layout{gap:24px!important;padding:18px!important;}
.sidebar{padding:22px 18px!important;border-right:1px solid rgba(255,255,255,.08);overflow-y:auto;}
.header,.topbar{position:sticky;top:0;z-index:500;background:rgba(2,6,23,.82)!important;backdrop-filter:blur(20px);border-bottom:1px solid rgba(255,255,255,.08);}
.mail-list,.mail-preview,.panel,.card{border-radius:24px!important;overflow:hidden;}
.mail-list-item{padding:18px 20px!important;transition:.2s;}
.mail-list-item:hover{transform:translateX(4px);background:rgba(16,185,129,.08)!important;}
.profile-dropdown{z-index:999999!important;right:12px!important;top:calc(100% + 12px)!important;overflow:visible!important;box-shadow:0 30px 80px rgba(0,0,0,.5)!important;}
.header,.topbar,.profile-area,.user-menu{overflow:visible!important;}
.main-content,.content,.mail-preview{overflow:auto;}
.btn,.button{border-radius:16px!important;}
@media(max-width:1024px){.sidebar{position:fixed;left:0;top:0;height:100vh;z-index:1000}.mail-preview{display:none}}
/* Final polish 2026-06-23: saubere Ebenen, Header, Dropdown, Unterseiten */
.kf-app-shell,
.compose-shell{position:relative;isolation:isolate;overflow:visible!important;}
.kf-topbar,
.compose-shell>.kf-sub-topbar{
  position:relative!important;
  z-index:100000!important;
  overflow:visible!important;
  background:rgba(3,9,18,.72)!important;
}
.kf-main-grid,
.compose-shell>.compose-card,
.kf-sidebar,
.kf-list-panel,
.kf-preview-panel{position:relative;z-index:1;}
.kf-preview-panel,.kf-welcome,.kf-envelope{z-index:1!important;}
.kf-profile-menu{position:relative!important;z-index:100001!important;}
.kf-profile-menu[open]{z-index:100002!important;}
.kf-profile-dropdown{
  position:fixed!important;
  top:76px!important;
  right:22px!important;
  left:auto!important;
  width:min(360px,calc(100vw - 32px))!important;
  max-height:calc(100vh - 96px)!important;
  overflow:auto!important;
  padding:14px!important;
  z-index:2147483000!important;
  background:rgba(10,18,34,.98)!important;
  border:1px solid rgba(148,163,184,.28)!important;
  border-radius:18px!important;
  box-shadow:0 35px 100px rgba(0,0,0,.72)!important;
}
.kf-profile-dropdown:before{right:28px!important;}
.kf-profile-dropdown p{font-size:16px;}
.kf-profile-dropdown a,
.kf-profile-dropdown button{border-radius:12px!important;min-height:48px!important;}
.kf-compose-btn{
  min-width:245px!important;
  height:56px!important;
  padding:0 0 0 18px!important;
  justify-content:flex-start!important;
  gap:14px!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
.kf-compose-btn span{flex:0 0 auto;line-height:1;}
.kf-compose-btn em{
  margin-left:auto!important;
  width:54px!important;
  height:56px!important;
  padding:0!important;
  border-left:1px solid rgba(255,255,255,.16)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
}
.kf-list-head h1 span,
.kf-dots{display:none!important;}
.kf-list-head{gap:12px!important;}
.kf-list-status{margin-left:auto!important;}
.compose-shell{
  grid-template-columns:315px minmax(0,1fr)!important;
  grid-template-rows:86px minmax(0,1fr)!important;
  gap:18px!important;
  height:100vh!important;
  padding:0 8px 14px!important;
}
.compose-shell>.kf-sub-sidebar{grid-column:1!important;grid-row:2!important;display:block!important;}
.compose-shell>.compose-card{
  grid-column:2!important;
  grid-row:2!important;
  align-self:stretch!important;
  max-width:none!important;
  margin:0 10px 0 0!important;
}
.compose-card header .page-back,
.compose-card header a.back-link{display:none!important;}
.compose-card header{align-items:flex-start!important;}
.contact-form .compose-grid{align-items:end!important;}
.contact-form button{height:54px!important;margin-top:0!important;}
.contact-list{display:grid;gap:12px;margin-top:18px;}
.contact-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:18px!important;
  background:rgba(15,30,45,.82)!important;
  border:1px solid rgba(148,163,184,.22)!important;
  border-radius:18px!important;
}
.contact-row>div:first-child{min-width:0;}
.contact-row>div:last-child{display:flex;align-items:center;gap:10px;flex:0 0 auto;}
.contact-row b,.contact-row span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.contact-row span{color:#aab4c3;}
@media(max-width:1020px){
  .kf-profile-dropdown{top:68px!important;right:12px!important;}
  .kf-compose-btn{min-width:190px!important;height:50px!important;font-size:15px!important;}
  .kf-compose-btn em{height:50px!important;width:46px!important;}
  .compose-shell{grid-template-columns:1fr!important;grid-template-rows:auto minmax(0,1fr)!important;padding:0 10px 12px!important;}
  .compose-shell>.kf-sub-sidebar{display:none!important;}
  .compose-shell>.compose-card{grid-column:1!important;grid-row:2!important;margin:0!important;}
  .contact-row,.contact-row>div:last-child{align-items:stretch!important;flex-direction:column!important;}
  .contact-row>div:last-child a,.contact-row>div:last-child button{width:100%;}
}

/* UI Fix Pack: Header compose dropdown + dark subpages */
.kf-topbar,
.compose-shell>.kf-sub-topbar{
  grid-template-columns:300px 220px minmax(360px,520px) 1fr auto!important;
  gap:18px!important;
  align-items:center!important;
}
.kf-compose-btn{display:none!important;}
.kf-compose-split{
  height:52px!important;
  min-width:220px!important;
  max-width:220px!important;
  display:grid!important;
  grid-template-columns:1fr 48px!important;
  align-items:stretch!important;
  position:relative!important;
  z-index:100004!important;
  border-radius:13px!important;
  overflow:visible!important;
  background:linear-gradient(135deg,#13c986,#059669)!important;
  box-shadow:0 18px 42px rgba(16,185,129,.20),inset 0 1px 0 rgba(255,255,255,.18)!important;
}
.kf-compose-main{
  min-width:0!important;
  height:52px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:12px!important;
  padding:0 14px!important;
  color:#fff!important;
  font-weight:950!important;
  font-size:17px!important;
  white-space:nowrap!important;
  border-radius:13px 0 0 13px!important;
}
.kf-compose-main span{font-size:23px;line-height:1;font-weight:400;}
.kf-compose-main b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.kf-compose-menu{position:relative!important;z-index:100005!important;}
.kf-compose-menu summary{
  list-style:none!important;
  width:48px!important;
  height:52px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-left:1px solid rgba(255,255,255,.18)!important;
  color:#fff!important;
  font-weight:950!important;
  cursor:pointer!important;
  border-radius:0 13px 13px 0!important;
  user-select:none!important;
}
.kf-compose-menu summary::-webkit-details-marker{display:none!important;}
.kf-compose-menu[open] summary{background:rgba(0,0,0,.16)!important;}
.kf-compose-dropdown{
  position:absolute!important;
  top:calc(100% + 12px)!important;
  left:0!important;
  width:330px!important;
  max-width:calc(100vw - 24px)!important;
  padding:12px!important;
  background:rgba(10,18,34,.98)!important;
  border:1px solid rgba(148,163,184,.28)!important;
  border-radius:18px!important;
  box-shadow:0 35px 100px rgba(0,0,0,.72)!important;
  z-index:2147482500!important;
}
.kf-compose-dropdown:before{content:"";position:absolute;top:-7px;left:186px;width:14px;height:14px;background:rgba(10,18,34,.98);border-left:1px solid rgba(148,163,184,.28);border-top:1px solid rgba(148,163,184,.28);transform:rotate(45deg);}
.kf-compose-dropdown strong{display:block;margin:3px 6px 10px;color:#94a3b8;font-size:12px;text-transform:uppercase;letter-spacing:.05em;}
.kf-compose-dropdown a,
.kf-compose-dropdown button{
  width:100%!important;
  min-height:48px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:0 12px!important;
  border:0!important;
  border-radius:12px!important;
  background:transparent!important;
  color:#e5e7eb!important;
  box-shadow:none!important;
  font-weight:850!important;
  text-align:left!important;
  cursor:pointer!important;
}
.kf-compose-dropdown a:hover,
.kf-compose-dropdown button:hover,
.kf-compose-dropdown button.active{background:rgba(16,185,129,.14)!important;color:#10d899!important;}
.kf-compose-dropdown button span{width:32px;height:32px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#10b981;color:#fff;font-weight:950;flex:0 0 auto;}
.kf-compose-dropdown button b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;}
.kf-top-search{align-self:center!important;}
.kf-top-search input{min-width:0!important;}

/* Dark cards for contacts/tasks/filters/accounts/settings/folders */
.compose-card,
.compose-card.wide{
  background:linear-gradient(180deg,rgba(17,30,44,.92),rgba(9,19,32,.97))!important;
  color:#f8fafc!important;
}
.compose-card .compose-form,
.compose-card form.compact,
.compose-card .contact-form,
.compose-card .identity-form,
.compose-card .filter-form,
.compose-card .task-form,
.compose-card .account-form{
  background:rgba(8,18,32,.86)!important;
  border:1px solid rgba(148,163,184,.22)!important;
  border-radius:22px!important;
  padding:24px!important;
  box-shadow:0 24px 70px rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.04)!important;
}
.compose-card label{color:#dbe4ef!important;font-weight:850!important;}
.compose-card input,
.compose-card textarea,
.compose-card select,
.compose-card .html-editor{
  background:rgba(3,10,20,.88)!important;
  color:#f8fafc!important;
  border:1px solid rgba(148,163,184,.25)!important;
  border-radius:13px!important;
  box-shadow:none!important;
}
.compose-card input::placeholder,
.compose-card textarea::placeholder{color:rgba(203,213,225,.55)!important;}
.compose-card select option{background:#0b1220!important;color:#f8fafc!important;}
.compose-card input:focus,
.compose-card textarea:focus,
.compose-card select:focus,
.compose-card .html-editor:focus{border-color:#10d899!important;box-shadow:0 0 0 4px rgba(16,185,129,.14)!important;outline:none!important;}
.compose-card button:not(.secondary-button),
.compose-card .primary-small{
  background:linear-gradient(135deg,#13c986,#059669)!important;
  color:#fff!important;
  border:0!important;
  border-radius:13px!important;
  box-shadow:0 16px 36px rgba(16,185,129,.20)!important;
}
.compose-card .secondary-button,
.compose-card a.secondary-button,
.inline-actions button + button{
  background:rgba(255,255,255,.06)!important;
  border:1px solid rgba(148,163,184,.22)!important;
  color:#e5e7eb!important;
  box-shadow:none!important;
}
.message-row,
.contact-row,
.identity-card,
.contact-card,
.task-card,
.filter-card,
.account-card{
  background:rgba(12,25,39,.82)!important;
  color:#f8fafc!important;
  border:1px solid rgba(148,163,184,.20)!important;
  border-radius:17px!important;
}
.message-row:hover,
.contact-row:hover{background:rgba(16,185,129,.10)!important;}
.row-top time,.contact-row span,.message-row time{color:#aab4c3!important;}
.compose-card .message-list{background:transparent!important;display:grid;gap:12px;margin-top:18px;}
.compose-card hr{border:0;border-top:1px solid rgba(148,163,184,.18)!important;}

@media(max-width:1400px){
  .kf-topbar,.compose-shell>.kf-sub-topbar{grid-template-columns:250px 210px minmax(280px,1fr) auto!important;}
  .kf-compose-split{min-width:210px!important;max-width:210px!important;}
}
@media(max-width:1020px){
  .kf-topbar,.compose-shell>.kf-sub-topbar{grid-template-columns:1fr auto!important;}
  .kf-compose-split{justify-self:end;min-width:190px!important;max-width:190px!important;height:48px!important;grid-template-columns:1fr 44px!important;}
  .kf-compose-main,.kf-compose-menu summary{height:48px!important;}
  .kf-compose-dropdown{right:0!important;left:auto!important;width:min(320px,calc(100vw - 24px))!important;}
  .kf-compose-dropdown:before{left:auto;right:15px;}
}

/* Header consistency fix: same clean header on inbox and subpages */
.kf-topbar,
.compose-shell>.kf-sub-topbar{
  grid-template-columns:minmax(250px,300px) 220px minmax(280px,1fr) auto!important;
  gap:18px!important;
  align-items:center!important;
  overflow:visible!important;
}
.kf-logo{min-width:0!important;overflow:visible!important;}
.kf-logo span:not(.kf-logo-mark){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.kf-compose-split{grid-column:auto!important;min-width:220px!important;max-width:220px!important;}
.kf-top-search{grid-column:auto!important;min-width:0!important;width:100%!important;}
.kf-profile-menu{justify-self:end!important;min-width:0!important;}
.kf-profile-menu summary>b{max-width:230px!important;}
@media(max-width:1350px){
  .kf-topbar,.compose-shell>.kf-sub-topbar{grid-template-columns:230px 205px minmax(220px,1fr) auto!important;gap:14px!important;}
  .kf-logo span:not(.kf-logo-mark){font-size:24px!important;}
  .kf-compose-split{min-width:205px!important;max-width:205px!important;}
  .kf-profile-menu summary>b{max-width:150px!important;}
}
@media(max-width:1050px){
  .kf-topbar,.compose-shell>.kf-sub-topbar{grid-template-columns:1fr auto auto!important;height:auto!important;min-height:82px!important;}
  .kf-top-search{grid-column:1 / -1!important;order:5!important;}
  .kf-compose-split{justify-self:end!important;min-width:190px!important;max-width:190px!important;}
  .kf-logo span:not(.kf-logo-mark){font-size:22px!important;}
}
@media(max-width:720px){
  .kf-logo span:not(.kf-logo-mark){display:none!important;}
  .kf-logo-mark{width:46px!important;height:46px!important;border-radius:14px!important;}
  .kf-compose-split{min-width:54px!important;max-width:54px!important;grid-template-columns:54px!important;}
  .kf-compose-main{display:none!important;}
  .kf-compose-menu summary{width:54px!important;border-left:0!important;border-radius:14px!important;background:linear-gradient(135deg,#13c986,#059669)!important;}
  .kf-profile-menu summary>b{display:none!important;}
}

/* Phase 4 function polish */
.kf-form-card,.compose-form.compact{background:rgba(12,22,40,.78)!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:24px!important;padding:28px!important;box-shadow:0 18px 50px rgba(0,0,0,.28)!important}.checkline{display:flex!important;align-items:center;gap:10px;color:#cbd5e1!important}.checkline input{width:auto!important;height:auto!important}.account-list .message-row{background:rgba(15,27,47,.72)!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:18px!important;margin-bottom:12px!important}.inline-actions{display:flex;gap:10px;flex-wrap:wrap}.inline-actions button{border-radius:14px!important;padding:12px 18px!important}

/* Mobile Navigation Fix */
.kf-mobile-menu{display:none;position:relative;z-index:2147483001;}
.kf-mobile-menu summary{list-style:none;width:48px;height:48px;border-radius:14px;background:rgba(255,255,255,.07);border:1px solid rgba(148,163,184,.20);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;}
.kf-mobile-menu summary::-webkit-details-marker{display:none;}
.kf-mobile-menu summary span{width:22px;height:2px;border-radius:99px;background:#f8fafc;display:block;}
.kf-mobile-drawer{position:fixed;top:0;left:0;bottom:0;width:min(320px,86vw);padding:18px;background:rgba(4,13,24,.98);border-right:1px solid rgba(148,163,184,.24);box-shadow:35px 0 100px rgba(0,0,0,.62);z-index:2147483002;overflow:auto;}
.kf-mobile-menu[open]::after{content:"";position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:2147483001;}
.kf-mobile-drawer-head{display:flex;align-items:center;gap:12px;padding:6px 2px 20px;margin-bottom:10px;border-bottom:1px solid rgba(148,163,184,.16);}
.kf-mobile-drawer-head b{font-size:19px;color:#fff;}
.kf-mobile-drawer nav{display:grid;gap:8px;}
.kf-mobile-drawer a{display:flex;align-items:center;gap:12px;min-height:48px;padding:0 13px;border-radius:14px;color:#e5e7eb;background:rgba(255,255,255,.04);border:1px solid rgba(148,163,184,.10);font-weight:850;}
.kf-mobile-drawer a.active,.kf-mobile-drawer a:hover{background:rgba(16,185,129,.16);border-color:rgba(16,185,129,.34);color:#10d899;}
.kf-mobile-drawer i{font-style:normal;width:24px;text-align:center;}

@media(max-width:820px){
  html,body{overflow-x:hidden;}
  .kf-topbar,.compose-shell>.kf-sub-topbar{
    display:grid!important;
    grid-template-columns:52px 1fr auto!important;
    grid-template-rows:auto auto!important;
    align-items:center!important;
    gap:10px!important;
    height:auto!important;
    min-height:0!important;
    padding:10px!important;
    border-radius:18px!important;
    position:sticky!important;
    top:8px!important;
    margin:0!important;
  }
  .kf-mobile-menu{display:block!important;grid-column:1;grid-row:1;}
  .kf-logo{grid-column:2;grid-row:1;min-width:0;justify-self:start;}
  .kf-logo .kf-logo-mark{width:42px;height:42px;border-radius:13px;font-size:15px;}
  .kf-logo span:not(.kf-logo-mark){font-size:19px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .kf-compose-split{grid-column:1 / span 2;grid-row:2;width:100%;min-width:0;}
  .kf-compose-main{height:48px!important;min-width:0!important;width:100%!important;border-radius:14px!important;justify-content:center!important;}
  .kf-compose-menu summary{height:48px!important;width:48px!important;border-radius:14px!important;}
  .kf-compose-dropdown{position:fixed!important;left:10px!important;right:10px!important;top:138px!important;width:auto!important;max-height:calc(100vh - 155px)!important;z-index:2147483000!important;}
  .kf-top-search{grid-column:1 / -1!important;grid-row:3!important;width:100%!important;height:48px!important;min-width:0!important;display:flex!important;}
  .kf-top-search input{height:48px!important;min-width:0!important;}
  .kf-top-search button{height:48px!important;width:48px!important;flex:0 0 auto;}
  .kf-profile-menu{display:block!important;grid-column:3;grid-row:1;justify-self:end;}
  .kf-profile-menu summary{padding:0!important;gap:0!important;background:transparent!important;}
  .kf-profile-menu summary>span{width:44px!important;height:44px!important;font-size:19px!important;}
  .kf-profile-menu summary>b,.kf-profile-menu summary>i{display:none!important;}
  .kf-profile-dropdown{top:68px!important;right:10px!important;left:auto!important;width:min(330px,calc(100vw - 20px))!important;max-height:calc(100vh - 82px)!important;}
  .kf-main-grid,.compose-shell{grid-template-columns:1fr!important;grid-template-rows:auto minmax(0,1fr)!important;padding:8px!important;gap:10px!important;height:100vh!important;overflow:hidden!important;}
  .kf-main-grid>.kf-sub-topbar,.compose-shell>.kf-sub-topbar{grid-column:1!important;grid-row:1!important;}
  .kf-sidebar,.compose-shell>.kf-sub-sidebar{display:none!important;}
  .kf-list-panel,.compose-shell>.compose-card{grid-column:1!important;grid-row:2!important;margin:0!important;width:100%!important;border-radius:18px!important;overflow:auto!important;}
  .kf-preview-panel{display:none!important;}
  .kf-message-list{height:auto!important;max-height:none!important;}
  .compose-card{padding:18px!important;}
}

/* Mobile UX Fix 2026-06-23 */
@media(max-width:820px){
  .kf-app-shell{position:relative!important;min-height:100vh!important;height:auto!important;overflow-x:hidden!important;padding:8px!important;}
  .kf-topbar{
    position:sticky!important;top:0!important;z-index:200000!important;
    display:grid!important;grid-template-columns:48px 1fr 48px!important;grid-template-rows:auto auto auto!important;
    gap:10px!important;padding:12px!important;margin:0 0 10px!important;border-radius:22px!important;
    background:rgba(4,13,24,.96)!important;border:1px solid rgba(148,163,184,.18)!important;
    box-shadow:0 18px 50px rgba(0,0,0,.36)!important;backdrop-filter:blur(18px)!important;
  }
  .kf-mobile-menu{display:block!important;grid-column:1!important;grid-row:1!important;align-self:center!important;}
  .kf-mobile-menu summary{width:46px!important;height:46px!important;border-radius:14px!important;background:rgba(255,255,255,.06)!important;}
  .kf-logo{grid-column:2!important;grid-row:1!important;justify-self:center!important;display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;}
  .kf-logo .kf-logo-mark{width:48px!important;height:48px!important;border-radius:15px!important;font-size:18px!important;}
  .kf-logo span:not(.kf-logo-mark){display:none!important;}
  .kf-profile-menu{grid-column:3!important;grid-row:1!important;justify-self:end!important;display:block!important;z-index:200010!important;}
  .kf-profile-menu summary{padding:0!important;background:transparent!important;}
  .kf-profile-menu summary>span{width:48px!important;height:48px!important;font-size:20px!important;}
  .kf-profile-menu summary>b,.kf-profile-menu summary>i{display:none!important;}
  .kf-profile-dropdown{position:fixed!important;top:68px!important;right:10px!important;width:min(330px,calc(100vw - 20px))!important;max-height:calc(100vh - 84px)!important;z-index:2147483000!important;}
  .kf-compose-split{
    grid-column:1 / -1!important;grid-row:2!important;width:100%!important;min-width:0!important;max-width:none!important;
    height:50px!important;display:grid!important;grid-template-columns:1fr 52px!important;border-radius:16px!important;
  }
  .kf-compose-main{display:flex!important;height:50px!important;border-radius:16px 0 0 16px!important;font-size:16px!important;justify-content:center!important;gap:10px!important;}
  .kf-compose-main span{font-size:22px!important;}
  .kf-compose-menu summary{display:flex!important;width:52px!important;height:50px!important;border-radius:0 16px 16px 0!important;background:transparent!important;border-left:1px solid rgba(255,255,255,.18)!important;}
  .kf-compose-dropdown{position:fixed!important;top:132px!important;left:10px!important;right:10px!important;width:auto!important;max-height:calc(100vh - 145px)!important;z-index:2147483000!important;}
  .kf-top-search{
    grid-column:1 / -1!important;grid-row:3!important;width:100%!important;height:50px!important;display:grid!important;grid-template-columns:1fr 52px 52px!important;
    margin:0!important;border-radius:16px!important;overflow:hidden!important;background:rgba(5,14,25,.88)!important;
  }
  .kf-top-search input{height:50px!important;font-size:16px!important;min-width:0!important;}
  .kf-top-search button,.kf-top-search label{height:50px!important;width:52px!important;display:flex!important;align-items:center!important;justify-content:center!important;}
  .kf-main-grid{display:block!important;height:auto!important;overflow:visible!important;padding:0!important;}
  .kf-sidebar{display:none!important;}
  .kf-list-panel{width:100%!important;border-radius:22px!important;padding:12px!important;background:rgba(5,14,25,.74)!important;border:1px solid rgba(148,163,184,.16)!important;overflow:visible!important;}
  .kf-list-head{height:auto!important;min-height:54px!important;padding:6px 4px 14px!important;display:flex!important;align-items:flex-end!important;}
  .kf-list-head h1{font-size:32px!important;line-height:1.1!important;margin:0!important;}
  .kf-list-status{font-size:16px!important;white-space:nowrap!important;margin-left:auto!important;}
  .kf-message-list{height:auto!important;max-height:none!important;overflow:visible!important;border-radius:18px!important;border:1px solid rgba(148,163,184,.15)!important;}
  .kf-message{min-height:112px!important;padding:16px 14px!important;display:grid!important;grid-template-columns:18px minmax(0,1fr) 20px!important;gap:10px!important;align-items:start!important;}
  .kf-msg-meta{display:flex!important;gap:10px!important;align-items:center!important;}
  .kf-msg-meta b{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:15px!important;}
  .kf-msg-meta time{font-size:13px!important;white-space:nowrap!important;}
  .kf-message strong{font-size:18px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  .kf-message p{font-size:15px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin-top:8px!important;}
  .kf-preview-panel{display:none!important;}
  .kf-pager{padding:14px 4px 4px!important;}
}

/* Mobile Off-Canvas Final Fix 2026-06-23 */
.kf-mobile-menu{display:none!important;}
.kf-mobile-menu-btn{display:none;border:0;background:rgba(255,255,255,.065);border:1px solid rgba(148,163,184,.22);width:48px;height:48px;border-radius:14px;align-items:center;justify-content:center;flex-direction:column;gap:5px;cursor:pointer;color:#fff;box-shadow:none;}
.kf-mobile-menu-btn span{display:block;width:22px;height:2px;border-radius:99px;background:#f8fafc;}
.kf-mobile-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);backdrop-filter:blur(2px);opacity:0;visibility:hidden;pointer-events:none;z-index:2147483000;transition:opacity .22s ease,visibility .22s ease;}
.kf-mobile-drawer{position:fixed!important;inset:0 auto 0 0!important;width:min(286px,82vw)!important;max-width:82vw!important;height:100dvh!important;padding:16px!important;background:linear-gradient(180deg,rgba(6,16,30,.99),rgba(3,10,20,.99))!important;border-right:1px solid rgba(148,163,184,.22)!important;box-shadow:34px 0 90px rgba(0,0,0,.62)!important;z-index:2147483001!important;overflow-y:auto!important;overflow-x:hidden!important;transform:translateX(-105%)!important;transition:transform .24s ease!important;box-sizing:border-box!important;}
body.kf-mobile-open .kf-mobile-overlay{opacity:1;visibility:visible;pointer-events:auto;}
body.kf-mobile-open .kf-mobile-drawer{transform:translateX(0)!important;}
.kf-mobile-drawer-head{display:flex!important;align-items:center!important;gap:12px!important;padding:4px 0 16px!important;margin:0 0 14px!important;border-bottom:1px solid rgba(148,163,184,.18)!important;}
.kf-mobile-drawer-head .kf-logo-mark{width:48px!important;height:48px!important;border-radius:15px!important;flex:0 0 auto!important;}
.kf-mobile-drawer-head b{font-size:18px!important;line-height:1.1!important;color:#fff!important;min-width:0!important;}
.kf-mobile-drawer-head button{margin-left:auto;width:40px;height:40px;border-radius:13px;border:1px solid rgba(148,163,184,.18);background:rgba(255,255,255,.05);color:#fff;font-size:28px;line-height:1;cursor:pointer;}
.kf-mobile-drawer nav{display:grid!important;gap:8px!important;}
.kf-mobile-drawer nav a{display:flex!important;align-items:center!important;gap:12px!important;width:100%!important;min-height:48px!important;padding:0 12px!important;border-radius:14px!important;color:#e5e7eb!important;background:rgba(255,255,255,.035)!important;border:1px solid rgba(148,163,184,.10)!important;font-weight:850!important;text-decoration:none!important;box-sizing:border-box!important;}
.kf-mobile-drawer nav a.active,.kf-mobile-drawer nav a:hover{background:linear-gradient(90deg,rgba(16,185,129,.28),rgba(16,185,129,.10))!important;border-color:rgba(16,185,129,.34)!important;color:#24f0b5!important;}
.kf-mobile-drawer nav a i{font-style:normal!important;width:24px!important;text-align:center!important;flex:0 0 24px!important;}
.kf-mobile-drawer nav a span{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}

@media(max-width:820px){
  body.kf-mobile-open{overflow:hidden!important;}
  .kf-app-shell{padding:8px!important;overflow-x:hidden!important;}
  .kf-topbar,.compose-shell>.kf-sub-topbar{
    position:sticky!important;top:0!important;z-index:1000!important;
    display:grid!important;grid-template-columns:48px minmax(0,1fr) 48px!important;grid-template-rows:48px 50px 50px!important;
    gap:10px!important;padding:12px!important;margin:0 0 10px!important;border-radius:22px!important;min-height:0!important;height:auto!important;
    overflow:visible!important;background:rgba(4,13,24,.96)!important;border:1px solid rgba(148,163,184,.18)!important;
    box-shadow:0 18px 50px rgba(0,0,0,.36)!important;backdrop-filter:blur(18px)!important;
  }
  .kf-mobile-menu-btn{display:flex!important;grid-column:1!important;grid-row:1!important;align-self:center!important;justify-self:start!important;}
  .kf-logo{grid-column:2!important;grid-row:1!important;justify-self:center!important;align-self:center!important;display:flex!important;gap:8px!important;max-width:100%!important;overflow:hidden!important;}
  .kf-logo .kf-logo-mark{width:48px!important;height:48px!important;border-radius:15px!important;font-size:18px!important;flex:0 0 auto!important;}
  .kf-logo span:not(.kf-logo-mark){display:block!important;font-size:18px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  .kf-profile-menu{grid-column:3!important;grid-row:1!important;justify-self:end!important;align-self:center!important;display:block!important;z-index:1200!important;}
  .kf-profile-menu summary{width:48px!important;height:48px!important;padding:0!important;background:transparent!important;display:flex!important;align-items:center!important;justify-content:center!important;}
  .kf-profile-menu summary>span{width:48px!important;height:48px!important;font-size:20px!important;}
  .kf-profile-menu summary>b,.kf-profile-menu summary>i{display:none!important;}
  .kf-compose-split{grid-column:1 / -1!important;grid-row:2!important;width:100%!important;height:50px!important;display:grid!important;grid-template-columns:minmax(0,1fr) 52px!important;min-width:0!important;max-width:none!important;border-radius:16px!important;overflow:visible!important;}
  .kf-compose-main{height:50px!important;width:100%!important;min-width:0!important;border-radius:16px 0 0 16px!important;display:flex!important;justify-content:center!important;font-size:16px!important;}
  .kf-compose-main b{display:inline!important;white-space:nowrap!important;}
  .kf-compose-menu summary{height:50px!important;width:52px!important;border-radius:0 16px 16px 0!important;display:flex!important;align-items:center!important;justify-content:center!important;}
  .kf-top-search{grid-column:1 / -1!important;grid-row:3!important;height:50px!important;width:100%!important;display:grid!important;grid-template-columns:minmax(0,1fr) 52px 52px!important;margin:0!important;border-radius:16px!important;overflow:hidden!important;}
  .kf-top-search input{height:50px!important;min-width:0!important;font-size:16px!important;}
  .kf-top-search button,.kf-top-search label{height:50px!important;width:52px!important;min-width:52px!important;display:flex!important;align-items:center!important;justify-content:center!important;}
  .kf-profile-dropdown{position:fixed!important;top:72px!important;right:10px!important;left:auto!important;width:min(330px,calc(100vw - 20px))!important;max-height:calc(100dvh - 84px)!important;z-index:2147482999!important;}
  .kf-compose-dropdown{position:fixed!important;top:132px!important;left:10px!important;right:10px!important;width:auto!important;max-height:calc(100dvh - 145px)!important;z-index:2147482999!important;}
  .kf-main-grid{display:block!important;height:auto!important;overflow:visible!important;padding:0!important;}
  .kf-sidebar,.compose-shell>.kf-sub-sidebar{display:none!important;}
  .kf-list-panel{width:100%!important;margin:0!important;border-radius:22px!important;padding:12px!important;overflow:visible!important;}
  .kf-preview-panel{display:none!important;}
}


/* Funktionsrunde: Chat, Regelmanager, Verschlüsselung */
.kf-chat-box{display:flex;flex-direction:column;gap:14px;max-height:52vh;overflow:auto;padding:18px;border:1px solid rgba(255,255,255,.08);border-radius:22px;background:rgba(5,12,24,.45);margin-bottom:22px}
.kf-chat-msg{max-width:72%;padding:14px 16px;border-radius:18px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.07)}
.kf-chat-msg.me{align-self:flex-end;background:linear-gradient(135deg,rgba(18,194,135,.35),rgba(9,120,91,.3));border-color:rgba(30,220,157,.28)}
.kf-chat-msg b{display:block;color:#fff;margin-bottom:6px;font-size:13px}.kf-chat-msg p{margin:0;color:#dce7f5}.kf-chat-msg small{display:block;margin-top:8px;color:#8ea0b8;font-size:12px}
.compose-card.wide .compose-form.compact{background:rgba(10,20,36,.72)!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:24px!important;padding:24px!important}
.compose-card.wide input,.compose-card.wide select,.compose-card.wide textarea{background:#08111f!important;border:1px solid rgba(255,255,255,.11)!important;color:#eef5ff!important;border-radius:14px!important}
.compose-card.wide label{color:#c9d5e6!important}.compose-card.wide button{border-radius:14px}
@media(max-width:760px){.kf-chat-msg{max-width:92%}.compose-card.wide .compose-grid{grid-template-columns:1fr!important}}

/* ===== KI-Assistent ===== */
.ai-mail-tools{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0;padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:18px;background:rgba(9,18,34,.72)}
.ai-mail-tools button,.editor-toolbar button[data-compose-ai]{border:1px solid rgba(24,213,157,.25);background:rgba(24,213,157,.10);color:#eafff8;border-radius:12px;padding:10px 14px;font-weight:700;cursor:pointer}
.ai-mail-tools button:hover,.editor-toolbar button[data-compose-ai]:hover{background:rgba(24,213,157,.18)}
.ai-mail-tools button:disabled,.editor-toolbar button[data-compose-ai]:disabled{opacity:.6;cursor:wait}
.ai-result-box{margin:14px 0 18px;border:1px solid rgba(24,213,157,.24);border-radius:20px;background:rgba(6,15,29,.92);box-shadow:0 18px 40px rgba(0,0,0,.22);overflow:hidden}
.ai-result-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid rgba(255,255,255,.08);color:#fff}
.ai-result-head button{border:0;border-radius:12px;background:#18d59d;color:#04120d;padding:8px 12px;font-weight:800;cursor:pointer}
.ai-result-box pre{white-space:pre-wrap;word-break:break-word;margin:0;padding:16px;color:#dbeafe;font-family:inherit;line-height:1.6}
.ai-help-box{margin-top:24px;padding:20px;border:1px solid rgba(255,255,255,.08);border-radius:18px;background:rgba(255,255,255,.04);color:#cbd5e1}
.ai-help-box h2{margin-top:0;color:#fff}.ai-help-box pre{overflow:auto;background:#050b14;color:#d1fae5;padding:16px;border-radius:14px}.ai-help-box code{color:#8ee6c7}.check-row{display:flex!important;align-items:center;gap:10px}.check-row input{width:auto;height:auto}
@media(max-width:780px){.ai-mail-tools{gap:8px}.ai-mail-tools button{flex:1 1 140px}.editor-toolbar button[data-compose-ai]{font-size:12px;padding:8px 10px}}
