/* SENOTY OS – Look & Feel nach der Präsentation der Mobilitätsplattform:
   Nachtblau, Cyan-Akzent, Kicker in Versalien, Pillenformen, Arial. */
:root {
  --ink: #0A1124; --ink-2: #111B33; --ink-3: #17304D; --pill: #1B3A5C;
  --cyan: #00FAFE; --cyan-soft: rgba(0, 250, 254, .14); --cyan-logo: #6CFDFF;
  --teal: #0F5566; --head: #0C2B42; --panel: #EEF3F8; --muted: #5E6C79;
  --line: #D9E1EA; --soft: #B8C7D9; --white: #fff;
  --ok: #0E9F6E; --ok-soft: #E2F6EE; --warn: #B86E00; --warn-soft: #FDF1DB;
  --bad: #C8323A; --bad-soft: #FCE7E8; --info: #2563EB; --info-soft: #E6EEFD;
  --r: 14px; --r-sm: 10px; --round: 999px;
  --shadow: 0 1px 2px rgba(10, 17, 36, .05), 0 8px 24px rgba(10, 17, 36, .06);
  --shadow-lg: 0 24px 60px rgba(10, 17, 36, .28);
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --side-w: 252px; --top-h: 64px; --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--head); background: var(--panel); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
a { color: var(--teal); }
h1, h2, h3, h4 { margin: 0; color: var(--head); letter-spacing: -.01em; }
h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kicker { font-size: 11px; font-weight: bold; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.kicker.cyan { color: var(--cyan); }

/* ---------- Login ---------- */
.login { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--ink); color: #fff; }
.login .hero { padding: 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login .hero h1 { color: #fff; font-size: 46px; line-height: 1.08; max-width: 620px; margin: 18px 0; }
.login .hero p { color: var(--soft); font-size: 17px; max-width: 560px; }
.login .tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 620px; }
.login .tile { background: var(--ink-2); border: 1px solid rgba(255,255,255,.07); border-radius: var(--r); padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.login .tile b { display: block; font-size: 14px; }
.login .tile span { color: var(--soft); font-size: 12px; }
.login .panel { background: var(--panel); color: var(--head); display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login .box { width: 100%; max-width: 400px; }
.login .box .logo-chip { margin-bottom: 26px; }
.login .users { display: grid; gap: 8px; margin-top: 10px; }
.login .users button { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; cursor: pointer; }
.login .users button:hover { border-color: var(--teal); }
.ico-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--ink-3); display: grid; place-items: center; color: var(--cyan); flex: none; }

/* ---------- Logo ---------- */
.logo-chip { display: inline-flex; align-items: center; background: #fff; border-radius: 12px; padding: 8px 12px; }
.logo-chip img { height: 34px; display: block; }
.logo-chip.lg img { height: 54px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100vh; height: 100dvh; }
.side { background: var(--ink); color: #fff; display: flex; flex-direction: column; min-height: 0; z-index: 30; }
.side .brand { padding: 18px 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.side .brand .logo-chip { padding: 8px 14px; align-self: flex-start; }
.side .brand .logo-chip img { height: 54px; }
.side .brand .os { font-size: 11px; letter-spacing: .3em; font-weight: bold; color: var(--cyan); padding-left: 2px; }
.tenant-switch { margin: 0 12px 10px; }
.tenant-switch select { width: 100%; background: var(--ink-2); color: #fff; border: 1px solid rgba(255,255,255,.1); border-radius: var(--round); padding: 9px 14px; font-size: 13px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.nav { flex: 1; overflow-y: auto; padding: 0 10px 10px; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
.nav .sep { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: #6B7A8C; padding: 14px 12px 6px; font-weight: bold; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; margin: 1px 0; color: #C9D3DE; border-radius: var(--round); text-decoration: none; font-size: 13.5px; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--cyan); color: var(--ink); font-weight: bold; }
.nav a .n { margin-left: auto; background: var(--bad); color: #fff; border-radius: var(--round); font-size: 11px; padding: 1px 7px; font-weight: bold; }
.nav a.active .n { background: var(--ink); color: var(--cyan); }
.side .me { margin: 8px 12px 14px; padding: 10px; border-radius: var(--r-sm); background: var(--ink-2); display: flex; gap: 10px; align-items: center; cursor: pointer; border: 1px solid rgba(255,255,255,.06); }
.side .me b { font-size: 13px; display: block; }
.side .me span { font-size: 11px; color: var(--soft); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { height: var(--top-h); flex: none; display: flex; align-items: center; gap: 14px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.top .ttl { display: flex; flex-direction: column; min-width: 0; }
.top .ttl h1 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .ttl .kicker { font-size: 10px; }
.top .search { flex: 1; max-width: 440px; margin-left: auto; position: relative; }
.top .search input { width: 100%; padding: 9px 14px 9px 36px; border-radius: var(--round); border: 1px solid var(--line); background: var(--panel); }
.top .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.top .burger { display: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; position: relative; flex: none; color: var(--head); }
.icon-btn:hover { border-color: var(--teal); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); border: 2px solid #fff; }
.content { flex: 1; overflow-y: auto; padding: 24px 24px 48px; -webkit-overflow-scrolling: touch; }
.content.flush { padding: 0; overflow: hidden; display: flex; min-height: 0; }
.tabbar { display: none; }
.scrim { display: none; }

/* ---------- Hero (Deck-Stil) ---------- */
.hero-band { background: var(--ink); color: #fff; border-radius: var(--r); padding: 26px 28px; position: relative; overflow: hidden; }
.hero-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(0,250,254,.18), transparent 65%); pointer-events: none; }
.hero-band h1, .hero-band h2 { color: #fff; }
.hero-band h1 { font-size: 30px; margin: 8px 0 6px; }
.hero-band p { color: var(--soft); margin: 0; max-width: 680px; }
.hero-band .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; position: relative; z-index: 1; }
.hero-band .stat { background: var(--ink-2); border: 1px solid rgba(255,255,255,.07); border-radius: var(--r-sm); padding: 12px 14px; cursor: pointer; text-decoration: none; color: inherit; display: block; }
.hero-band .stat b { display: block; font-size: 24px; color: var(--cyan); }
.hero-band .stat span { font-size: 12px; color: var(--soft); }

/* ---------- Bausteine ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.span2 { grid-column: span 2; }
.card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card.dark { background: var(--ink); color: #fff; }
.card.dark h2, .card.dark h3 { color: #fff; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.section-title { display: flex; align-items: center; gap: 12px; margin: 26px 0 12px; }
.section-title:first-child { margin-top: 0; }
.section-title::before { content: ""; width: 28px; height: 4px; border-radius: 4px; background: var(--cyan); }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .grow h2 { font-size: 22px; margin-top: 4px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; background: var(--ink); color: #fff; border-radius: var(--round); padding: 9px 18px; font-weight: bold; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none; line-height: 1.2; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--ink-3); }
.btn.cyan { background: var(--cyan); color: var(--ink); }
.btn.cyan:hover { background: #5DFCFE; }
.btn.ghost { background: #fff; color: var(--head); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--teal); }
.btn.subtle { background: var(--panel); color: var(--head); }
.btn.danger { background: var(--bad); }
.btn.ok { background: var(--ok); }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.xs { padding: 4px 10px; font-size: 11.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--round); font-size: 11px; font-weight: bold; background: var(--panel); color: var(--head); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.dark { background: var(--ink); color: var(--cyan); }
.pill.cyan { background: var(--cyan-soft); color: var(--teal); }
.pill .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.av { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: bold; font-size: 12px; color: #fff; flex: none; background: var(--ink-3); letter-spacing: .02em; }
.av.sm { width: 26px; height: 26px; font-size: 10px; }
.av.lg { width: 48px; height: 48px; font-size: 16px; }
.av-stack { display: inline-flex; }
.av-stack .av { border: 2px solid #fff; margin-left: -8px; }
.av-stack .av:first-child { margin-left: 0; }

label.f { display: block; font-size: 12px; font-weight: bold; color: var(--head); margin-bottom: 12px; }
label.f > span { display: block; margin-bottom: 5px; }
.input, select.input, textarea.input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-weight: normal; }
.input:focus { outline: 2px solid var(--cyan); outline-offset: 0; border-color: var(--teal); }
textarea.input { resize: vertical; min-height: 90px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--teal); }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--panel); }
.table-wrap { overflow-x: auto; }

.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty svg { width: 36px; height: 36px; color: var(--soft); margin-bottom: 8px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button, .tabs a { border: 1px solid var(--line); background: #fff; border-radius: var(--round); padding: 7px 14px; font-size: 13px; cursor: pointer; text-decoration: none; color: var(--head); white-space: nowrap; }
.tabs .on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: bold; }
.tabs.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }

.progress { height: 8px; background: var(--panel); border-radius: 8px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--teal); border-radius: 8px; }
.progress.cyan > i { background: var(--cyan); }
.dark .progress { background: var(--ink-3); }

.lock-note { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.info-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); background: var(--info-soft); color: #1E40AF; font-size: 13px; }
.info-note svg, .lock-note svg { width: 18px; height: 18px; flex: none; }

/* ---------- Modal / Toast / Menü ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 17, 36, .55); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s; }
.modal { background: #fff; border-radius: var(--r); width: 100%; max-width: 560px; max-height: calc(100dvh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal.wide { max-width: 860px; }
.modal.xwide { max-width: 1100px; }
.modal-h { padding: 18px 22px 12px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.modal-h h2 { flex: 1; font-size: 17px; }
.modal-b { padding: 18px 22px; overflow-y: auto; }
.modal-f { padding: 12px 22px 18px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); font-size: 13px; display: flex; gap: 10px; align-items: center; animation: pop .2s; max-width: 380px; border-left: 4px solid var(--cyan); }
.menu { position: fixed; background: #fff; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); padding: 6px; z-index: 150; min-width: 200px; border: 1px solid var(--line); }
.menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13px; }
.menu button:hover { background: var(--panel); }
.menu button svg { width: 16px; height: 16px; color: var(--muted); }
.menu .sep { height: 1px; background: var(--line); margin: 4px 0; }

/* ---------- Benachrichtigungen ---------- */
.notif-panel { position: fixed; top: calc(var(--top-h) - 4px); right: 16px; width: 380px; max-height: 70vh; overflow-y: auto; background: #fff; border-radius: var(--r); box-shadow: var(--shadow-lg); z-index: 90; border: 1px solid var(--line); }
.notif { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; text-decoration: none; color: inherit; }
.notif:hover { background: var(--panel); }
.notif .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--cyan); }
.notif .ic svg { width: 16px; height: 16px; }
.notif.unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); margin-left: 6px; box-shadow: 0 0 0 2px var(--teal); vertical-align: middle; }

/* ---------- Pinnwand / Feed ---------- */
.feed { display: flex; flex-direction: column; gap: 16px; }
.post { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.post-h { display: flex; gap: 12px; align-items: center; padding: 14px 18px 8px; }
.post-h b { display: block; font-size: 14px; }
.post-h .meta { font-size: 12px; color: var(--muted); }
.post-body { padding: 4px 18px 12px; white-space: pre-wrap; word-wrap: break-word; }
.post-img { width: 100%; display: block; max-height: 460px; object-fit: cover; background: var(--ink); }
.post-banner { background: var(--ink); color: #fff; padding: 28px 24px; position: relative; overflow: hidden; }
.post-banner h3 { color: #fff; font-size: 22px; margin-top: 6px; }
.post-banner::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px; background: radial-gradient(circle, rgba(0,250,254,.25), transparent 65%); }
.post-f { display: flex; gap: 4px; padding: 6px 10px; border-top: 1px solid var(--line); }
.post-f button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 8px; cursor: pointer; display: flex; gap: 6px; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.post-f button:hover { background: var(--panel); color: var(--head); }
.post-f button.on { color: var(--teal); font-weight: bold; }
.post-f svg { width: 17px; height: 17px; }
.comments { padding: 8px 18px 14px; background: #FAFCFE; border-top: 1px solid var(--line); }
.comment { display: flex; gap: 10px; margin: 8px 0; }
.comment .bubble { background: var(--panel); border-radius: 12px; padding: 8px 12px; font-size: 13px; }
.composer { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 18px; }
.composer textarea { border: 0; width: 100%; resize: none; min-height: 60px; outline: none; font-size: 15px; }
.img-preview { position: relative; margin-top: 8px; }
.img-preview img { border-radius: var(--r-sm); max-height: 220px; }

/* ---------- Mail ---------- */
.mail { display: grid; grid-template-columns: 220px 380px 1fr; width: 100%; min-height: 0; height: 100%; }
.mail-folders { background: #fff; border-right: 1px solid var(--line); padding: 14px 10px; overflow-y: auto; }
.mail-folders a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--round); text-decoration: none; color: var(--head); font-size: 13.5px; cursor: pointer; }
.mail-folders a svg { width: 17px; height: 17px; color: var(--muted); }
.mail-folders a.on { background: var(--ink); color: #fff; font-weight: bold; }
.mail-folders a.on svg { color: var(--cyan); }
.mail-folders a .n { margin-left: auto; font-size: 11px; font-weight: bold; }
.mail-folders .acc { font-size: 11px; color: var(--muted); padding: 14px 12px 6px; text-transform: uppercase; letter-spacing: .1em; font-weight: bold; }
.mail-list { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.mail-list .lh { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.mail-list .items { overflow-y: auto; flex: 1; }
.mail-item { padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; gap: 10px; }
.mail-item:hover { background: #F7FAFC; }
.mail-item.on { background: var(--cyan-soft); box-shadow: inset 3px 0 0 var(--teal); }
.mail-item.unread .from, .mail-item.unread .subj { font-weight: bold; color: var(--ink); }
.mail-item .from { font-size: 13.5px; }
.mail-item .subj { font-size: 13px; }
.mail-item .prev { font-size: 12px; color: var(--muted); }
.mail-item .date { font-size: 11px; color: var(--muted); white-space: nowrap; }
.mail-read { overflow-y: auto; background: var(--panel); padding: 20px; }
.mail-read .sheet { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 22px 26px; }
.mail-read .sheet h2 { font-size: 20px; margin-bottom: 12px; }
.mail-body { line-height: 1.6; margin-top: 18px; word-wrap: break-word; }
.mail-body img { max-width: 100%; }
.attach { display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; margin: 4px 6px 4px 0; background: #fff; font-size: 12.5px; }
.attach svg { width: 18px; height: 18px; color: var(--teal); }
.rte-bar { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-sm) var(--r-sm) 0 0; background: var(--panel); }
.rte-bar button { border: 0; background: none; padding: 5px 9px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.rte-bar button:hover { background: #fff; }
.rte { min-height: 200px; border: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); padding: 12px; outline: none; background: #fff; overflow-y: auto; max-height: 46vh; }
.rte:focus { border-color: var(--teal); }
.sig-preview { border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 14px; background: #fff; }
.chip-input { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px; background: #fff; }
.chip-input input { border: 0; outline: none; flex: 1; min-width: 140px; padding: 4px; }
.chip { display: inline-flex; gap: 6px; align-items: center; background: var(--panel); border-radius: var(--round); padding: 3px 4px 3px 10px; font-size: 12px; }
.chip button { border: 0; background: var(--line); border-radius: 50%; width: 18px; height: 18px; cursor: pointer; font-size: 11px; line-height: 1; }

/* ---------- Chat ---------- */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); width: 100%; height: 100%; min-height: 0; }
.chat-list { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-list .items { overflow-y: auto; flex: 1; }
.chat-ch { display: flex; gap: 10px; align-items: center; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #F0F4F8; }
.chat-ch:hover { background: #F7FAFC; }
.chat-ch.on { background: var(--cyan-soft); box-shadow: inset 3px 0 0 var(--teal); }
.chat-ch .hash { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--cyan); display: grid; place-items: center; font-weight: bold; flex: none; }
.chat-main { display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.chat-h { background: #fff; padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.msg { display: flex; gap: 10px; max-width: 78%; margin-top: 8px; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { background: #fff; border-radius: 14px 14px 14px 4px; padding: 9px 13px; box-shadow: var(--shadow); word-wrap: break-word; white-space: pre-wrap; }
.msg.me .bubble { background: var(--ink); color: #fff; border-radius: 14px 14px 4px 14px; }
.msg .who { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.msg.me .who { text-align: right; }
.msg .ref { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--panel); color: var(--head); font-size: 12px; border-left: 3px solid var(--teal); cursor: pointer; white-space: normal; }
.msg.me .ref { background: var(--ink-3); color: #fff; border-color: var(--cyan); }
.msg .acts { opacity: 0; align-self: center; transition: opacity .15s; }
.msg:hover .acts { opacity: 1; }
.chat-in { background: #fff; padding: 12px 14px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: flex-end; padding-bottom: calc(12px + var(--safe-b)); }
.chat-in textarea { flex: 1; border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px; resize: none; max-height: 140px; min-height: 42px; outline: none; }

/* ---------- Drive ---------- */
.crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.crumbs a { cursor: pointer; text-decoration: none; color: var(--teal); font-weight: bold; }
.crumbs span { color: var(--muted); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.file { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; cursor: pointer; position: relative; border: 2px solid transparent; text-align: center; }
.file:hover { border-color: var(--cyan); }
.file .fi { width: 54px; height: 54px; margin: 4px auto 10px; border-radius: 14px; display: grid; place-items: center; background: var(--panel); color: var(--teal); }
.file.folder .fi { background: var(--ink); color: var(--cyan); }
.file .fi svg { width: 26px; height: 26px; }
.file .nm { font-size: 13px; font-weight: bold; word-break: break-word; }
.file .mt { font-size: 11px; color: var(--muted); margin-top: 3px; }
.file .more { position: absolute; right: 6px; top: 6px; border: 0; background: none; cursor: pointer; padding: 4px; border-radius: 6px; color: var(--muted); }
.file .lockico { position: absolute; left: 10px; top: 10px; color: var(--teal); }
.file .lockico svg { width: 14px; height: 14px; }
.dropzone { border: 2px dashed var(--soft); border-radius: var(--r); padding: 18px; text-align: center; color: var(--muted); margin-top: 16px; }
.dropzone.over { border-color: var(--teal); background: var(--cyan-soft); color: var(--teal); }

/* ---------- Kalender ---------- */
.cal { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-grid .dow { padding: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: bold; border-bottom: 1px solid var(--line); background: var(--panel); }
.cal-day { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; cursor: pointer; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.other { background: #FAFBFD; color: var(--soft); }
.cal-day .dn { font-size: 12px; font-weight: bold; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .dn { background: var(--cyan); color: var(--ink); }
.ev { font-size: 11.5px; padding: 3px 6px; border-radius: 6px; margin-top: 3px; background: var(--ink); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-left: 3px solid var(--cyan); }
.ev.ext { background: var(--ink-3); border-left-color: #F5A524; }
.ev.proj { background: var(--teal); }
.ev.mkt { background: #5B4FD8; border-left-color: #fff; }
.ev.deadline { background: var(--bad-soft); color: var(--bad); border-left-color: var(--bad); }
.agenda .ag { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.agenda .ag .d { width: 54px; text-align: center; flex: none; }
.agenda .ag .d b { display: block; font-size: 22px; color: var(--ink); }
.agenda .ag .d span { font-size: 11px; color: var(--muted); text-transform: uppercase; }

/* ---------- Kanban ---------- */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; scroll-snap-type: x proximity; min-height: 300px; }
.lane { background: #E3EAF2; border-radius: var(--r); width: 290px; flex: none; display: flex; flex-direction: column; max-height: calc(100dvh - 220px); scroll-snap-align: start; }
.lane-h { padding: 12px 14px 8px; display: flex; align-items: center; gap: 8px; }
.lane-h b { font-size: 13px; }
.lane-h .cnt { background: #fff; border-radius: var(--round); font-size: 11px; padding: 1px 8px; font-weight: bold; color: var(--muted); }
.lane-h .bar { width: 10px; height: 10px; border-radius: 3px; background: var(--teal); }
.lane-cards { padding: 4px 10px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.lane.over { outline: 2px dashed var(--teal); outline-offset: -2px; }
.kcard { background: #fff; border-radius: 12px; padding: 11px 12px; box-shadow: 0 1px 2px rgba(10,17,36,.08); cursor: grab; border-left: 4px solid transparent; }
.kcard:hover { box-shadow: 0 4px 14px rgba(10,17,36,.12); }
.kcard.dragging { opacity: .4; }
.kcard .t { font-weight: bold; font-size: 13.5px; margin: 4px 0; }
.kcard .d { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .f { display: flex; gap: 6px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.kcard .f .grow { min-width: 10px; }
.kcard.p-hoch { border-left-color: var(--bad); }
.kcard.p-mittel { border-left-color: #F5A524; }
.kcard.p-niedrig { border-left-color: var(--soft); }
.kcard .thumb { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; display: block; }
.lane-add { margin: 0 10px 10px; border: 0; background: none; color: var(--muted); padding: 8px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13px; }
.lane-add:hover { background: #fff; color: var(--head); }
.plat { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: bold; padding: 2px 8px; border-radius: var(--round); color: #fff; }
.plat.linkedin { background: #0A66C2; } .plat.facebook { background: #1877F2; } .plat.instagram { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); }
.plat.tiktok { background: #111; } .plat.youtube { background: #E62117; } .plat.x { background: #000; } .plat.pinnwand { background: var(--ink); color: var(--cyan); } .plat.newsletter { background: var(--teal); } .plat.intranet { background: var(--ink-3); }
.approval { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; }
.approval .step { display: flex; gap: 10px; align-items: center; padding: 6px 0; }

/* ---------- Projekte ---------- */
.ptile { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: transform .12s; }
.ptile:hover { transform: translateY(-2px); }
.ptile .top-b { background: var(--ink); color: #fff; padding: 16px 18px; position: relative; }
.ptile .top-b h3 { color: #fff; font-size: 16px; margin-top: 6px; }
.ptile .top-b .lock { position: absolute; right: 14px; top: 14px; color: var(--cyan); }
.ptile .top-b .lock svg { width: 16px; height: 16px; }
.ptile .bd { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.traffic { display: inline-flex; align-items: center; gap: 6px; font-weight: bold; font-size: 12px; }
.traffic i { width: 10px; height: 10px; border-radius: 50%; }
.traffic.ok i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); } .traffic.ok { color: var(--ok); }
.traffic.warn i { background: #F5A524; box-shadow: 0 0 0 3px var(--warn-soft); } .traffic.warn { color: var(--warn); }
.traffic.bad i { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); } .traffic.bad { color: var(--bad); }
.gantt { overflow-x: auto; }
.gantt-in { min-width: 760px; }
.g-row { display: grid; grid-template-columns: 260px 1fr; align-items: center; border-bottom: 1px solid var(--line); min-height: 40px; }
.g-row .nm { padding: 8px 10px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.g-row .nm.l1 { padding-left: 28px; font-weight: normal; }
.g-row .nm.l0 { font-weight: bold; }
.g-track { position: relative; height: 40px; }
.g-bar { position: absolute; top: 11px; height: 18px; border-radius: 9px; background: #C9D6E3; overflow: hidden; min-width: 6px; cursor: pointer; }
.g-bar > i { display: block; height: 100%; background: var(--teal); }
.g-bar.late > i { background: var(--bad); }
.g-bar.l0 { top: 13px; height: 14px; background: var(--ink-3); }
.g-bar.l0 > i { background: var(--cyan); }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 2; }
.g-head { display: grid; grid-template-columns: 260px 1fr; border-bottom: 1px solid var(--line); background: var(--panel); }
.g-months { position: relative; height: 32px; }
.g-months span { position: absolute; top: 8px; font-size: 11px; color: var(--muted); font-weight: bold; text-transform: uppercase; letter-spacing: .06em; border-left: 1px solid var(--line); padding-left: 6px; height: 24px; }
.media-status { background: var(--ink); border-radius: var(--r); overflow: hidden; }
.media-status video, .media-status audio { width: 100%; display: block; }

/* ---------- Tickets ---------- */
.ticket-public { min-height: 100%; background: var(--ink); padding: 40px 18px; }
.ticket-public .wrap { max-width: 640px; margin: 0 auto; }
.ticket-public h1 { color: #fff; font-size: 34px; margin: 10px 0; }
.ticket-public p.lead { color: var(--soft); }
.timeline { border-left: 2px solid var(--line); margin-left: 8px; padding-left: 18px; }
.timeline .te { position: relative; padding-bottom: 14px; }
.timeline .te::before { content: ""; position: absolute; left: -25px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--teal); }

/* ---------- Lieferanten / CRM ---------- */
.kpi { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; }
.kpi b { display: block; font-size: 26px; color: var(--ink); margin-top: 4px; }
.kpi.dark { background: var(--ink); }
.kpi.dark b { color: var(--cyan); }
.kpi.dark .kicker { color: var(--soft); }
.vault { background: var(--ink); color: #fff; border-radius: var(--r-sm); padding: 14px 16px; }
.vault .mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--soft); word-break: break-all; }
.tenant-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: bold; padding: 2px 9px; border-radius: var(--round); border: 1px solid var(--line); background: #fff; }
.tenant-tag i { width: 8px; height: 8px; border-radius: 50%; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; }

/* ---------- Admin ---------- */
.perm-grid { overflow-x: auto; }
.perm-grid table td, .perm-grid table th { text-align: center; }
.perm-grid table td:first-child, .perm-grid table th:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; }
.toggle { position: relative; width: 38px; height: 22px; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: var(--line); border-radius: 22px; cursor: pointer; transition: .15s; }
.toggle span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + span { background: var(--teal); }
.toggle input:checked + span::before { transform: translateX(16px); background: var(--cyan); }
.toggle input:disabled + span { opacity: .5; cursor: not-allowed; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .mail { grid-template-columns: 200px 320px 1fr; }
  .hero-band .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .split { grid-template-columns: minmax(0, 1fr); }
  .mail { grid-template-columns: 300px minmax(0, 1fr); }
  .mail-folders { display: none; }
  .mail.show-folders .mail-folders { display: block; position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 60; box-shadow: var(--shadow-lg); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .22s ease; }
  .shell.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .side { z-index: 60; padding-bottom: var(--safe-b); }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(10,17,36,.5); z-index: 55; }
  .top { padding: 0 12px; gap: 8px; height: 58px; }
  :root { --top-h: 58px; }
  .top .burger { display: grid; border: 0; }
  .top .search { display: none; }
  #searchBtn { margin-left: auto; }
  .main, .content, .mail, .chat, .mail-list, .chat-list { max-width: 100vw; }
  .top .search.open { display: block; position: absolute; left: 10px; right: 10px; top: 10px; max-width: none; z-index: 3; }
  .top .ttl h1 { font-size: 17px; }
  .content { padding: 14px 12px calc(var(--tab-h) + 24px + var(--safe-b)); }
  .content.flush { padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--ink); z-index: 40; justify-content: space-around; border-top: 1px solid rgba(255,255,255,.06); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #8D9BAD; text-decoration: none; font-size: 10.5px; position: relative; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--cyan); font-weight: bold; }
  .tabbar a .n { position: absolute; top: 7px; left: calc(50% + 6px); background: var(--bad); color: #fff; border-radius: var(--round); font-size: 10px; padding: 0 5px; font-weight: bold; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .hero-band { padding: 20px; }
  .hero-band h1 { font-size: 24px; }
  .hero-band .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hero-band .stat b { font-size: 20px; }
  .mail, .chat { grid-template-columns: minmax(0, 1fr); }
  .mail-read, .chat-main { display: none; }
  .mail.reading .mail-list, .chat.reading .chat-list { display: none; }
  .mail.reading .mail-read { display: block; padding: 10px; }
  .chat.reading .chat-main { display: flex; }
  .mail-read .sheet { padding: 16px; }
  .msg { max-width: 92%; }
  .msg .acts { opacity: 1; }
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal, .modal.wide, .modal.xwide { max-width: none; max-height: 94dvh; border-radius: var(--r) var(--r) 0 0; }
  .modal-f { padding-bottom: calc(18px + var(--safe-b)); }
  .lane { width: 84vw; max-height: none; }
  .board { scroll-snap-type: x mandatory; margin: 0 -12px; padding: 0 12px 12px; }
  .cal-day { min-height: 64px; padding: 3px; }
  .cal-day .ev { font-size: 0; padding: 0; height: 6px; border-left: 0; margin-top: 2px; }
  .notif-panel { left: 8px; right: 8px; width: auto; }
  .toasts { left: 12px; right: 12px; bottom: calc(var(--tab-h) + 12px + var(--safe-b)); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login .hero { padding: 32px 22px 10px; }
  .login .hero h1 { font-size: 32px; }
  .login .tiles { display: none; }
  .page-head .btn-row { width: 100%; }
  .g-row, .g-head { grid-template-columns: 160px 1fr; }
  .gantt-in { min-width: 620px; }
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table.responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 4px; }
  .table.responsive td::before { content: attr(data-l); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
  .table.responsive td:empty { display: none; }
}
