/* Zellmann-Farbwelt (aus auto-zellmann.de): Petrol, Cyan, Fast-Schwarz, helle Flächen */
:root {
  --petrol: #2f90a2;
  --petrol-dark: #23707e;
  --cyan: #08bfd0;
  --ink: #101010;
  --bg: #f2f2f2;
  --panel: #ffffff;
  --line: #ededed;
  --muted: #666666;
}
* { box-sizing: border-box; margin: 0; }
@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto-var.woff2') format('woff2');
  font-weight: 100 900; /* variable Schrift — deckt Regular bis Bold ab */
}
body { font-family: Roboto, Arial, sans-serif; background: var(--bg); color: var(--ink); height: 100vh; }
.hidden { display: none !important; }

.app { display: grid; grid-template-columns: 230px 1fr 200px; height: 100vh; }

/* Linke, dunkle Navigation */
.sidebar { background: var(--ink); color: #eee; display: flex; flex-direction: column; overflow-y: auto; }
.brand { background: var(--petrol); color: #fff; font-weight: 700; padding: 14px 16px; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #888; padding: 12px 16px 4px; }
.sidebar ul { list-style: none; }
.sidebar li { padding: 9px 16px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.sidebar li:hover { background: #222; }
.sidebar li.active { background: var(--petrol); color: #fff; }
.sidebar .badge { margin-left: auto; background: var(--cyan); color: #fff; border-radius: 10px; padding: 0 7px; font-size: .75rem; }
.me { margin-top: auto; padding: 12px 16px; font-size: .8rem; color: #aaa; border-top: 1px solid #222; }

/* Mitte: Chat */
.chat { display: flex; flex-direction: column; min-width: 0; }
.chat header { background: var(--panel); border-bottom: 1px solid var(--line); padding: 12px 16px; font-weight: 700; }
.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 70%; padding: 8px 12px; border-radius: 12px; background: var(--panel); box-shadow: 0 1px 1px rgba(0,0,0,.06); font-size: .92rem; word-wrap: break-word; }
.msg .sender { color: var(--petrol); font-size: .8rem; font-weight: 700; display: block; }
.msg .time { color: #aaa; font-size: .7rem; margin-left: 8px; }
.msg.own { align-self: flex-end; background: var(--petrol); color: #fff; border-bottom-right-radius: 2px; }
.msg.own .sender { display: none; }
.msg.own .time { color: rgba(255,255,255,.7); }
.msg.other { align-self: flex-start; border-bottom-left-radius: 2px; }
.msg img.att { max-width: 100%; max-height: 240px; border-radius: 8px; cursor: zoom-in; display: block; }
.msg .att-meta { font-size: .75rem; opacity: .8; }
.msg .expired { font-style: italic; opacity: .7; }
.folder-tile { display: flex; align-items: center; gap: 8px; background: #e6f2f4; color: var(--ink); border: 1px solid var(--petrol); border-radius: 8px; padding: 6px 10px; margin-top: 4px; }
.folder-tile code { font-size: .85rem; overflow-wrap: anywhere; }
.folder-tile button { border: 0; background: var(--petrol); color: #fff; border-radius: 6px; padding: 4px 10px; cursor: pointer; }

/* Composer */
.composer { position: relative; display: flex; gap: 8px; align-items: flex-end; background: var(--panel); border-top: 1px solid var(--line); padding: 10px 14px; }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; }
.composer button { border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.composer #send-btn { background: var(--petrol); color: #fff; font-size: .95rem; border-radius: 16px; padding: 8px 18px; }
.composer #send-btn:hover { background: var(--petrol-dark); }
.emoji-picker { position: absolute; bottom: 56px; left: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.emoji-picker button { font-size: 1.3rem; }

/* Rechte Spalte */
.members { background: var(--panel); border-left: 1px solid var(--line); padding: 14px; overflow-y: auto; font-size: .85rem; }
.members-title { font-weight: 700; margin-bottom: 8px; }
.members ul { list-style: none; }
.members li { padding: 4px 0; display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #ccc; }
.dot.on { background: #4ba82e; }
.ad-hint { margin-top: 14px; color: var(--muted); font-size: .75rem; }

/* Overlays */
.overlay { position: fixed; inset: 0; background: rgba(16,16,16,.75); display: flex; align-items: center; justify-content: center; z-index: 10; }
#lightbox-content img, #lightbox-content iframe { max-width: 90vw; max-height: 90vh; border: 0; background: #fff; }
#lightbox-content iframe { width: 90vw; height: 90vh; }
.login-box { background: var(--panel); border-radius: 12px; padding: 28px; width: 340px; display: flex; flex-direction: column; gap: 12px; }
.login-box h1 { color: var(--petrol); font-size: 1.3rem; }
.login-box input { border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; }
.login-box button { background: var(--petrol); color: #fff; border: 0; border-radius: 8px; padding: 10px; font: inherit; cursor: pointer; }
.error { color: #d60f3e; font-size: .85rem; }
.upload-hint { background: #fff6e5; border: 1px solid #e8c37a; border-radius: 8px; padding: 10px; font-size: .85rem; }

@media (max-width: 900px) { .app { grid-template-columns: 200px 1fr; } .members { display: none; } }
