/* =========================================================
   WhatsApp Webclient – modernes UI (Light + Dark)
   ========================================================= */

:root {
  --accent: #00a884;
  --accent-hover: #008f70;
  --accent-soft: #d9fdd3;

  --bg-app: #eae6df;
  --bg-sidebar: #ffffff;
  --bg-panel: #f0f2f5;
  --bg-chat: #efe7dd;
  --bg-hover: #f5f6f6;
  --bg-active: #f0f2f5;
  --bg-input: #ffffff;

  --bubble-sent: #d9fdd3;
  --bubble-received: #ffffff;

  --text-primary: #111b21;
  --text-secondary: #667781;
  --text-inverse: #ffffff;

  --border: #e9edef;
  --shadow: 0 1px 3px rgba(11, 20, 26, 0.13);
  --shadow-lg: 0 16px 40px rgba(11, 20, 26, 0.25);

  --tick-read: #53bdeb;
  --danger: #ea4335;
  --warn: #b7791f;

  --radius: 10px;
  --sidebar-width: 380px;
}

html[data-theme="dark"] {
  --accent: #00a884;
  --accent-hover: #06cf9c;
  --accent-soft: #005c4b;

  --bg-app: #0c1317;
  --bg-sidebar: #111b21;
  --bg-panel: #202c33;
  --bg-chat: #0b141a;
  --bg-hover: #202c33;
  --bg-active: #2a3942;
  --bg-input: #2a3942;

  --bubble-sent: #005c4b;
  --bubble-received: #202c33;

  --text-primary: #e9edef;
  --text-secondary: #8696a0;

  --border: #222d34;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* hidden-Attribut muss immer gewinnen – auch gegen display:flex/grid der Klassen */
[hidden] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

button { font-family: inherit; }

/* ---------- Auth (Login / Setup) ---------- */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--accent) 0 220px, var(--bg-app) 220px);
}

.auth-card {
  background: var(--bg-sidebar);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  width: min(400px, 92vw);
  text-align: center;
}

.auth-logo { color: var(--accent); margin-bottom: 0.5rem; }
.auth-card h1 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.auth-hint { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 1.4rem; }

.auth-error {
  background: rgba(234, 67, 53, 0.12);
  color: var(--danger);
  border-radius: 8px;
  padding: 0.6rem;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.auth-card input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.auth-card button {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
}
.auth-card button:hover { background: var(--accent-hover); }

/* ---------- App-Layout ---------- */

.app {
  display: flex;
  height: 100vh;
  max-width: 1750px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

/* ---------- Sidebar ---------- */

.sidebar {
  width: var(--sidebar-width);
  min-width: 300px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.65rem 0.8rem;
  background: var(--bg-panel);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
}
.brand span { color: var(--text-primary); }

.sidebar-actions { display: flex; gap: 0.1rem; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  flex: none;
  text-decoration: none;
}
.icon-btn svg { width: 21px; height: 21px; fill: currentColor; }
.icon-btn:hover { background: var(--bg-active); color: var(--text-primary); }
.icon-btn.accent { color: var(--accent); }
.icon-btn.small { width: 28px; height: 28px; }
.icon-btn.small svg { width: 16px; height: 16px; }

.search-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-panel);
  border-radius: 8px;
  padding: 0 0.8rem;
}
.search-box svg { width: 17px; height: 17px; fill: var(--text-secondary); flex: none; }
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 0.55rem 0;
}

.filter-tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  overflow-x: auto;
}

.tab {
  border: none;
  background: var(--bg-panel);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
}
.tab.active { background: var(--accent-soft); color: var(--text-primary); font-weight: 600; }

.mini-badge {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 0 6px;
  margin-left: 2px;
}

.chat-list, .search-results { flex: 1; overflow-y: auto; }

.chat-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.chat-item:hover { background: var(--bg-hover); }
.chat-item.active { background: var(--bg-active); }

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex: none;
  background: var(--bg-panel);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.05rem;
  overflow: hidden;
  user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.small { width: 38px; height: 38px; font-size: 0.9rem; }
.avatar.large { width: 96px; height: 96px; font-size: 2.2rem; }

.chat-item-main { flex: 1; min-width: 0; }
.chat-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.chat-item-name {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item-name .star { color: var(--warn); font-size: 0.8rem; }
.chat-item-time { font-size: 0.72rem; color: var(--text-secondary); flex: none; }
.chat-item-time.unread { color: var(--accent); font-weight: 700; }

.chat-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2px;
}
.chat-item-preview {
  font-size: 0.83rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item.unread .chat-item-preview { color: var(--text-primary); font-weight: 600; }

.unread-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  flex: none;
}

.list-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.search-section-title {
  padding: 0.6rem 0.9rem 0.3rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 700;
}

.search-msg-text { font-size: 0.82rem; color: var(--text-secondary); }
.search-msg-text mark { background: rgba(0, 168, 132, 0.25); color: inherit; border-radius: 3px; }

.sidebar-footer {
  padding: 0.5rem 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.sidebar-footer:hover { background: var(--bg-hover); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); flex: none; }
.status-dot.ok { background: var(--accent); }

/* ---------- Chat-Bereich ---------- */

.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-chat);
  background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}
html[data-theme="dark"] .chat-section {
  background-image: radial-gradient(rgba(255, 255, 255, 0.028) 1.5px, transparent 1.5px);
}

.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
}
.empty-state h2 { color: var(--text-primary); font-weight: 600; }
.empty-state p { font-size: 0.9rem; line-height: 1.5; }

.chat-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
}

.chat-header-contact {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  border-radius: 8px;
  padding: 0.15rem 0.4rem;
}
.chat-header-contact:hover { background: var(--bg-hover); }

.chat-header-text { display: flex; flex-direction: column; min-width: 0; }
.chat-header-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-header-sub { font-size: 0.75rem; color: var(--text-secondary); }

.chat-header-actions { display: flex; gap: 0.1rem; }

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem 6% 0.8rem;
  display: flex;
  flex-direction: column;
}

.day-separator {
  align-self: center;
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-size: 0.74rem;
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  margin: 0.6rem 0;
  box-shadow: var(--shadow);
}

.msg {
  max-width: min(65%, 560px);
  margin-bottom: 3px;
  padding: 0.42rem 0.6rem 0.32rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.38;
  word-wrap: break-word;
  white-space: pre-wrap;
  position: relative;
  box-shadow: var(--shadow);
}
.msg.sent { background: var(--bubble-sent); align-self: flex-end; border-top-right-radius: 3px; }
.msg.received { background: var(--bubble-received); align-self: flex-start; border-top-left-radius: 3px; }
.msg.first-of-group { margin-top: 0.55rem; }

.msg img.msg-media {
  max-width: 100%;
  max-height: 340px;
  border-radius: 8px;
  display: block;
  margin-bottom: 0.25rem;
  cursor: pointer;
}
.msg audio { max-width: 260px; display: block; margin-bottom: 0.2rem; }
.msg a.doc-link { color: var(--accent); word-break: break-all; }

.msg-meta {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0.55rem 0 -0.15rem 0.6rem;
  font-size: 0.68rem;
  color: var(--text-secondary);
  user-select: none;
}
.ticks svg { width: 16px; height: 16px; fill: var(--text-secondary); }
.ticks.read svg { fill: var(--tick-read); }
.ticks.failed svg { fill: var(--danger); }

.msg.failed { outline: 1px solid rgba(234, 67, 53, 0.4); }
.msg-error { font-size: 0.72rem; color: var(--danger); margin-top: 2px; }

/* ---------- Composer ---------- */

.composer-area { position: relative; }

.composer {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  padding: 0.55rem 0.8rem;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
}

.composer textarea {
  flex: 1;
  resize: none;
  border: none;
  outline: none;
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.62rem 0.85rem;
  max-height: 140px;
  line-height: 1.4;
}

.send-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.send-btn svg { width: 20px; height: 20px; fill: currentColor; margin-left: 2px; }
.send-btn:hover { background: var(--accent-hover); }
.send-btn:disabled { opacity: 0.5; cursor: default; }

.panel {
  position: absolute;
  bottom: 100%;
  left: 0.8rem;
  right: 0.8rem;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 0.4rem;
  z-index: 30;
}

.emoji-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); padding: 0.5rem; }
.emoji-panel button {
  border: none;
  background: transparent;
  font-size: 1.45rem;
  padding: 0.3rem;
  cursor: pointer;
  border-radius: 8px;
}
.emoji-panel button:hover { background: var(--bg-hover); }

.template-panel .tpl-item {
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.template-panel .tpl-item:hover { background: var(--bg-hover); }
.template-panel .tpl-title { font-weight: 600; font-size: 0.86rem; }
.template-panel .tpl-body { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.attach-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  padding: 0.35rem 1rem 0;
  font-size: 0.8rem;
  color: var(--accent);
}

/* ---------- Info-Panel ---------- */

.info-panel {
  width: 340px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: var(--bg-panel);
  font-weight: 600;
  font-size: 0.95rem;
}

.info-body { flex: 1; overflow-y: auto; padding: 1.2rem; }
.info-center { text-align: center; margin-bottom: 1.2rem; }
.info-center .avatar { margin: 0 auto 0.7rem; }
.info-name { font-size: 1.15rem; font-weight: 600; }
.info-number { color: var(--text-secondary); font-size: 0.88rem; }

.info-section { margin-bottom: 1.1rem; }
.info-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.chip {
  display: inline-block;
  background: var(--bg-panel);
  border-radius: 999px;
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  margin: 0 0.3rem 0.3rem 0;
}

.info-actions { display: flex; flex-direction: column; gap: 0.45rem; }

/* ---------- Buttons & Formulare ---------- */

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}
.btn:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--bg-panel); color: var(--text-primary); }
.btn.secondary:hover { background: var(--bg-active); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.danger:hover { background: rgba(234, 67, 53, 0.1); }
.btn.small { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
.btn.block { width: 100%; }

.form-grid { display: flex; flex-direction: column; gap: 0.7rem; }
.form-grid label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); display: block; margin-bottom: 0.25rem; }

.form-grid input[type="text"],
.form-grid input[type="password"],
.form-grid input[type="url"],
.form-grid input[type="time"],
.form-grid input[type="datetime-local"],
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}
.form-grid textarea { resize: vertical; min-height: 70px; }

.checkbox-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--accent); }

.form-row { display: flex; gap: 0.7rem; }
.form-row > * { flex: 1; }

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 20, 26, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.modal {
  background: var(--bg-sidebar);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  width: min(820px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 1.05rem; }

.modal-body { padding: 1.2rem 1.3rem; overflow-y: auto; }

.modal-tabs { display: flex; gap: 0.4rem; margin-bottom: 1.1rem; flex-wrap: wrap; }

/* ---------- Tabellen ---------- */

.table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.table th, .table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-secondary); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; }
.table-wrap { overflow-x: auto; }

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
}
.badge.ok { background: rgba(0, 168, 132, 0.15); color: var(--accent); }
.badge.pending { background: rgba(183, 121, 31, 0.15); color: var(--warn); }
.badge.failed { background: rgba(234, 67, 53, 0.12); color: var(--danger); }
.badge.neutral { background: var(--bg-panel); color: var(--text-secondary); }

/* ---------- Statistik ---------- */

.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.8rem; margin-bottom: 1.4rem; }
.stat-tile { background: var(--bg-panel); border-radius: 12px; padding: 0.9rem 1rem; }
.stat-value { font-size: 1.55rem; font-weight: 700; }
.stat-label { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding: 0.6rem 0.2rem 0;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar-stack { width: 100%; max-width: 38px; display: flex; flex-direction: column-reverse; gap: 2px; flex: 1; justify-content: flex-start; }
.bar-seg { width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-seg.sent { background: var(--accent); }
.bar-seg.received { background: #53bdeb; }
.bar-label { font-size: 0.64rem; color: var(--text-secondary); white-space: nowrap; }

.legend { display: flex; gap: 1rem; font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.6rem; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }

/* ---------- Broadcast-Karten ---------- */

.bc-card { border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.bc-card h3 { font-size: 0.98rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.bc-card h3 .spacer { flex: 1; }

.callout {
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.84rem;
  line-height: 1.45;
  margin-bottom: 0.9rem;
}
.callout.warn { background: rgba(183, 121, 31, 0.12); color: var(--warn); }
.callout.info { background: rgba(0, 168, 132, 0.1); color: var(--text-primary); }
.callout code { background: rgba(0,0,0,0.08); padding: 1px 5px; border-radius: 4px; font-size: 0.8rem; word-break: break-all; }
html[data-theme="dark"] .callout code { background: rgba(255,255,255,0.1); }

/* ---------- Lightbox / Toasts ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  cursor: zoom-out;
}
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 6px; }

.toast-area {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.toast {
  background: var(--bg-panel);
  color: var(--text-primary);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 0.65rem 1.1rem;
  font-size: 0.86rem;
  animation: toast-in 0.2s ease;
}
.toast.error { color: var(--danger); }
.toast.success { color: var(--accent); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Scrollbars ---------- */

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: rgba(134, 150, 160, 0.35); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Responsive ---------- */

.mobile-only { display: none; }

@media (max-width: 900px) {
  .info-panel { position: fixed; right: 0; top: 0; bottom: 0; z-index: 60; box-shadow: var(--shadow-lg); }
}

@media (max-width: 720px) {
  .mobile-only { display: inline-flex; }
  .sidebar { width: 100%; min-width: 0; }
  .app.chat-open .sidebar { display: none; }
  .chat-section { display: none; }
  .app.chat-open .chat-section { display: flex; }
  .messages { padding: 1rem 3% 0.6rem; }
  .msg { max-width: 82%; }
  .info-panel { width: min(340px, 92vw); }
}
