:root {
  --wa-teal: #00a884;
  --wa-teal-dark: #008069;
  --wa-header: #202c33;
  --wa-panel: #111b21;
  --wa-panel-2: #0b141a;
  --wa-chat-bg: #0b141a;
  --wa-bubble-out: #005c4b;
  --wa-bubble-in: #202c33;
  --wa-border: #222d34;
  --wa-text: #e9edef;
  --wa-muted: #8696a0;
  --wa-hover: #202c33;
  --wa-active: #2a3942;
  --wa-danger: #f15c6d;
  --wa-warn: #eab308;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font);
  background: #0a1014;
  color: var(--wa-text);
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #111b21 0%, #0b141a 40%, #0a1014 100%);
  padding: 20px;
}
.login-box {
  width: min(420px, 100%);
  background: var(--wa-panel);
  border: 1px solid var(--wa-border);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
}
.wa-logo { font-size: 48px; margin-bottom: 8px; }
.login-box h1 { margin: 0 0 6px; font-size: 1.4rem; }
.login-box .sub { color: var(--wa-muted); margin: 0 0 16px; font-size: 0.92rem; }
.login-tip {
  text-align: left;
  background: rgba(0, 168, 132, 0.12);
  border: 1px solid rgba(0, 168, 132, 0.3);
  border-radius: 10px;
  padding: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
  margin-bottom: 16px;
  color: #d1f4eb;
}
.login-box form { display: grid; gap: 10px; }
.login-box input {
  width: 100%;
  border: 1px solid var(--wa-border);
  background: var(--wa-panel-2);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
}
.login-box input:focus { border-color: var(--wa-teal); }
.login-box button {
  border: 0;
  border-radius: 10px;
  padding: 12px;
  background: var(--wa-teal);
  color: #04140f;
  font-weight: 700;
  cursor: pointer;
}
.login-box button:hover { background: #06c294; }
.login-box .err { color: var(--wa-danger); min-height: 1.2em; margin: 4px 0 0; font-size: 0.88rem; }

/* App shell */
.app {
  width: 100vw;
  height: 100vh;
  display: flex;
  background: var(--wa-panel-2);
}

/* Folders Sidebar */
.folders-sidebar {
  width: 250px;
  background: var(--wa-panel-2);
  border-right: 1px solid var(--wa-border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  flex-shrink: 0;
  height: 100%;
}
.folders-list-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
}
.folders-list-vertical::-webkit-scrollbar {
  width: 4px;
}
.folders-list-vertical::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

/* Folder Card Item (折页卡片风格) */
.folder-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--wa-border);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  user-select: none;
}
.folder-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Layered 3D folded card effect on active */
.folder-card.active {
  background: var(--folder-bg, rgba(0, 168, 132, 0.08));
  border: 1px solid var(--folder-color, var(--wa-teal));
  transform: translateY(-2px);
  box-shadow: 
    0 4px 14px var(--folder-shadow, rgba(0, 168, 132, 0.15)),
    0 4px 0 -1px var(--folder-color, var(--wa-teal)),
    0 8px 0 -2px var(--folder-color-dark, rgba(0, 168, 132, 0.4));
  z-index: 5;
}
.folder-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--wa-border);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  transition: all 0.2s;
}
.folder-card.active .folder-card-avatar {
  background: #fff;
  color: #111;
  border-color: transparent;
}
.folder-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.folder-card-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--wa-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.folder-card-stats {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.stat-pill {
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 500;
}
.stat-pill.total {
  background: rgba(255, 255, 255, 0.08);
  color: var(--wa-muted);
}
.stat-pill.pending {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}
.stat-pill.replied {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.folder-card-actions {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--wa-muted);
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.folder-card:hover .folder-card-actions {
  opacity: 1;
}
.folder-card-actions:hover {
  background: rgba(255,255,255,0.06);
  color: var(--wa-text);
}

/* New folder button inside sidebar */
.add-folder-btn {
  width: 100%;
  border: 1px dashed var(--wa-border);
  background: rgba(255, 255, 255, 0.01);
  color: var(--wa-muted);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  outline: none;
}
.add-folder-btn:hover {
  border-color: var(--wa-teal);
  color: var(--wa-teal);
  background: rgba(0, 168, 132, 0.05);
}

/* Sidebar */
.sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--wa-panel);
  border-right: 1px solid var(--wa-border);
  min-height: 0;
}
.side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--wa-header);
}
.me-block { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; cursor: pointer; }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #6b7c85;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
  font-size: 0.95rem;
}
.avatar.me { background: linear-gradient(135deg, #00a884, #028a6e); }
.me-info { min-width: 0; }
.me-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-phone {
  font-size: 0.78rem;
  color: var(--wa-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.me-phone.warn { color: #fbbf24; }
.side-actions { display: flex; gap: 2px; }
.icon-btn {
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}
.icon-btn:hover { background: rgba(255,255,255,0.06); }

.search-wrap { padding: 8px 10px 10px; }
.search-wrap input {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: var(--wa-panel-2);
  padding: 10px 14px;
  outline: none;
  color: var(--wa-text);
}
.search-wrap input::placeholder { color: var(--wa-muted); }

.chat-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.chat-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  align-items: center;
}
.chat-item:hover { background: var(--wa-hover); }
.chat-item.active { background: var(--wa-active); }
.chat-item .meta { min-width: 0; }
.chat-item .top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.chat-item .name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item .time {
  color: var(--wa-muted);
  font-size: 0.72rem;
  flex-shrink: 0;
}
.chat-item .preview {
  color: var(--wa-muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item .note-tag {
  color: #93c5fd;
  font-size: 0.72rem;
}
.star { color: #fbbf24; margin-left: 4px; }

/* Chat pane */
.chat-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background:
    linear-gradient(rgba(11, 20, 26, 0.92), rgba(11, 20, 26, 0.92)),
    radial-gradient(circle at 20% 20%, rgba(0,168,132,0.05), transparent 40%);
}
.empty-chat {
  flex: 1;
  display: grid;
  place-items: center;
  background: var(--wa-panel);
  border-bottom: 6px solid var(--wa-teal);
}
.empty-inner { text-align: center; max-width: 420px; padding: 24px; }
.empty-inner .big-icon { font-size: 64px; margin-bottom: 8px; }
.empty-inner h2 { margin: 0 0 8px; }
.empty-inner p { color: var(--wa-muted); margin: 0 0 8px; line-height: 1.5; }
.empty-inner .hint { color: #fbbf24; font-size: 0.9rem; }
.primary {
  border: 0;
  background: var(--wa-teal);
  color: #04140f;
  font-weight: 700;
  border-radius: 24px;
  padding: 10px 22px;
  cursor: pointer;
  margin-top: 12px;
}
.primary:hover { background: #06c294; }

.active-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--wa-header);
  border-bottom: 1px solid var(--wa-border);
}
.chat-peer { display: flex; align-items: center; gap: 12px; min-width: 0; }
.peer-name { font-weight: 600; }
.peer-sub { color: var(--wa-muted); font-size: 0.8rem; }
.chat-header-actions { display: flex; gap: 4px; }

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 8% 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}
.day-sep {
  align-self: center;
  background: #182229;
  color: var(--wa-muted);
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 8px;
  margin: 8px 0;
}
.bubble {
  max-width: min(72%, 560px);
  padding: 8px 10px 4px;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
  word-wrap: break-word;
}
.bubble.out {
  align-self: flex-end;
  background: var(--wa-bubble-out);
  border-top-right-radius: 0;
}
.bubble.in {
  align-self: flex-start;
  background: var(--wa-bubble-in);
  border-top-left-radius: 0;
}
.bubble .text { font-size: 0.94rem; line-height: 1.4; white-space: pre-wrap; }
.bubble .foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: rgba(233, 237, 239, 0.65);
  font-size: 0.7rem;
}
.bubble .state.ok { color: #53bdeb; }
.bubble .state.fail { color: #f15c6d; }
.bubble .state.wait { color: #eab308; }

.composer {
  background: #202c33;
  padding: 8px 12px 12px;
  border-top: 1px solid var(--wa-border);
}
.composer-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.composer-meta select {
  border: 0;
  background: #2a3942;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--wa-muted);
  max-width: 50%;
}
.composer-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.composer-row textarea {
  flex: 1;
  border: 0;
  border-radius: 12px;
  background: #2a3942;
  padding: 12px 14px;
  resize: none;
  max-height: 140px;
  outline: none;
  line-height: 1.4;
}
.send-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--wa-teal);
  color: #04140f;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
}
.send-btn:hover { background: #06c294; }
.send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 16px;
}
.modal-card {
  width: min(480px, 100%);
  background: var(--wa-panel);
  border: 1px solid var(--wa-border);
  border-radius: 14px;
  overflow: hidden;
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--wa-header);
}
.modal-head h3 { margin: 0; font-size: 1rem; }
.modal-body {
  padding: 16px;
  overflow-y: auto;
}
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--wa-muted);
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--wa-border);
  background: var(--wa-panel-2);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--wa-teal);
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--wa-panel-2);
  border: 1px solid var(--wa-border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  cursor: pointer;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}
.btn {
  border: 1px solid var(--wa-border);
  background: #2a3942;
  color: var(--wa-text);
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
}
.btn.primary {
  background: var(--wa-teal);
  border-color: transparent;
  color: #04140f;
  font-weight: 700;
  border-radius: 10px;
  padding: 9px 14px;
  margin: 0;
}
.btn.danger {
  background: rgba(241, 92, 109, 0.15);
  border-color: rgba(241, 92, 109, 0.4);
  color: #fecdd3;
}
.list-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--wa-border);
  font-size: 0.9rem;
}
.muted { color: var(--wa-muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; }
.warn-box {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #fde68a;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 50;
  display: grid;
  gap: 8px;
}
.toast-item {
  background: #1f2c34;
  border: 1px solid var(--wa-border);
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  font-size: 0.9rem;
  max-width: 90vw;
}
.toast-item.err { border-color: rgba(241, 92, 109, 0.5); }

/* Contact info sidebar */
.contact-sidebar {
  width: 320px;
  background: var(--wa-panel);
  border-left: 1px solid var(--wa-border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex-shrink: 0;
  animation: slideInRight 0.2s ease;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.contact-sidebar-header {
  padding: 14px 16px;
  background: var(--wa-header);
  border-bottom: 1px solid var(--wa-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.contact-sidebar-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.contact-sidebar-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-profile-card {
  text-align: center;
  background: var(--wa-panel-2);
  border-radius: 12px;
  padding: 20px 16px;
  border: 1px solid var(--wa-border);
}
.contact-profile-card .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wa-teal), #00735c);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
  margin: 0 auto 12px;
}
.contact-profile-card .name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
  word-break: break-all;
}
.contact-profile-card .phone {
  font-size: 0.82rem;
  color: var(--wa-muted);
  font-family: monospace;
}
.contact-sidebar-section {
  background: var(--wa-panel-2);
  border: 1px solid var(--wa-border);
  border-radius: 12px;
  padding: 14px;
}
.contact-sidebar-section h4 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--wa-teal);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.contact-sidebar-section p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--wa-text);
  word-break: break-word;
}
.contact-sidebar-section select {
  width: 100%;
  background: var(--wa-panel);
  border: 1px solid var(--wa-border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--wa-text);
  font-size: 0.85rem;
  outline: none;
}
.contact-sidebar-section select:focus {
  border-color: var(--wa-teal);
}
.contact-sidebar-section .sidebar-note-area {
  width: 100%;
  min-height: 70px;
  background: var(--wa-panel);
  border: 1px solid var(--wa-border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--wa-text);
  font-size: 0.85rem;
  resize: vertical;
  outline: none;
  margin-bottom: 8px;
}
.contact-sidebar-section .sidebar-note-area:focus {
  border-color: var(--wa-teal);
}

/* Tag colors and chips in header & list */
.folder-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  flex-shrink: 0;
}
.folder-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.folder-tag {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--wa-muted);
}
.header-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.header-tag {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  color: white;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.header-tag .remove-tag {
  cursor: pointer;
  opacity: 0.7;
  font-size: 0.7rem;
  padding-left: 2px;
}
.header-tag .remove-tag:hover {
  opacity: 1;
}

/* Quick Replies System */
.quick-replies-widget {
  position: relative;
  margin-right: 6px;
}
.quick-replies-menu {
  position: absolute;
  bottom: 120%;
  left: 0;
  width: 280px;
  background: var(--wa-panel);
  border: 1px solid var(--wa-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  max-height: 320px;
  z-index: 30;
  animation: popUp 0.15s ease;
}
@keyframes popUp {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.quick-replies-header {
  padding: 8px 12px;
  background: var(--wa-header);
  border-bottom: 1px solid var(--wa-border);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.quick-replies-header button {
  border: 0;
  background: transparent;
  color: var(--wa-teal);
  cursor: pointer;
  font-size: 0.75rem;
}
.quick-replies-list {
  overflow-y: auto;
  flex: 1;
}
.quick-reply-item {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.35;
  transition: background 0.15s;
  text-align: left;
}
.quick-reply-item:hover {
  background: var(--wa-hover);
}
.quick-reply-item .title {
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--wa-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-reply-item .content {
  color: var(--wa-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-replies-empty {
  padding: 24px 12px;
  color: var(--wa-muted);
  text-align: center;
  font-size: 0.8rem;
}

/* Me dropdown menu styles */
.me-menu-trigger {
  font-size: 1.25rem;
  color: var(--wa-muted);
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s;
  user-select: none;
}
.me-menu-trigger:hover {
  background: rgba(255,255,255,0.06);
  color: var(--wa-text);
}
.me-dropdown {
  position: absolute;
  top: 90%;
  right: 12px;
  width: 170px;
  background: var(--wa-panel);
  border: 1px solid var(--wa-border);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 6px 0;
  animation: popUp 0.15s ease;
}
.me-dropdown-item {
  padding: 10px 16px;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--wa-text);
  transition: background 0.15s;
  text-align: left;
}
.me-dropdown-item:hover {
  background: var(--wa-hover);
}

/* Folder creation button next to chips */
.folder-chip.add-btn {
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--wa-border);
  display: grid;
  place-items: center;
  padding: 6px 10px;
}
.folder-chip.add-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--wa-teal);
}

@media (max-width: 800px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: 100%; }
  .app.chat-open .sidebar { display: none; }
  .app:not(.chat-open) .chat-pane { display: none; }
  .app.chat-open .contact-sidebar { display: none; }
  .messages { padding: 12px 4%; }
  .composer-meta { flex-wrap: wrap; }
  .composer-meta select { max-width: 100%; flex: 1; }
}
