/* ============================================================
   Inbox v2 — literal WhatsTeam spec (UI_SPEC.md)
   ============================================================ */
.v2-shell { height: 100vh; background: var(--slate-900); box-sizing: border-box; }
.v2-window {
  height: 100%;
  background: var(--bg);
  border-radius: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 60px 240px 340px 1fr 290px;
  box-shadow: none;
}

/* -------- Col 2: filter sidebar (240px, slate-50) -------- */
.v2-filters {
  background: #f8fafc;
  border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.v2-filters-head {
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.v2-filters-head .t { font-size: 13px; font-weight: 600; color: var(--slate-900, #0f172a); letter-spacing: -0.01em; }
.v2-filters-head .new-chat {
  width: 26px; height: 26px; border-radius: 7px;
  background: #22c55e; color: white; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.v2-filters-head .new-chat:hover { background: #16a34a; }

.v2-filters-scroll { flex: 1; overflow-y: auto; padding: 4px 0 8px; }
.v2-filters-scroll::-webkit-scrollbar { width: 6px; }
.v2-filters-scroll::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.1); border-radius: 3px; }

.v2-fsec { padding: 4px 0 2px; }
.v2-fsec-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 6px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: #64748b;
  cursor: pointer;
}
.v2-fsec-head .caret { font-size: 9px; color: #94a3b8; transition: transform 150ms; }
.v2-fsec.collapsed .v2-fsec-head .caret { transform: rotate(-90deg); }
.v2-fsec-head .add {
  width: 18px; height: 18px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #94a3b8; cursor: pointer; font-size: 10px;
  background: transparent; border: 0;
}
.v2-fsec-head .add:hover { background: #e2e8f0; color: #334155; }
.v2-fsec-head .right { display: inline-flex; align-items: center; gap: 2px; }
.v2-fsec-body { padding: 0 8px; }
.v2-fsec.collapsed .v2-fsec-body { display: none; }

.v2-fitem {
  display: flex; align-items: center; gap: 10px;
  height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  position: relative;
  margin-bottom: 1px;
}
.v2-fitem:hover { background: #f1f5f9; color: #0f172a; }
.v2-fitem i.fitem-ico { width: 14px; font-size: 12px; color: #64748b; text-align: center; flex-shrink: 0; }
.v2-fitem .fitem-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.v2-fitem .fitem-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.v2-fitem .fitem-badge {
  background: #e2e8f0; color: #475569;
  font-size: 10px; font-weight: 600;
  padding: 1px 6px; border-radius: 10px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.v2-fitem.has-unread .fitem-badge { background: #dcfce7; color: #15803d; }
.v2-fitem.active {
  background: #ecfdf5;
  color: #065f46;
  font-weight: 600;
}
.v2-fitem.active i.fitem-ico { color: #059669; }
.v2-fitem.active::before {
  content: '';
  position: absolute; left: -2px; top: 4px; bottom: 4px;
  width: 2px; border-radius: 2px;
  background: #22c55e;
}
.v2-fitem.active .fitem-badge { background: #a7f3d0; color: #065f46; }

.v2-fsec-empty {
  padding: 6px 18px 10px;
  font-size: 11px; color: #94a3b8;
  line-height: 1.5;
}
.v2-fsec-empty .link { color: #059669; font-weight: 500; cursor: pointer; }

.v2-filters-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 6px 8px 8px;
  flex-shrink: 0;
  background: #f8fafc;
}
.v2-filters-footer .v2-fitem { font-size: 12px; color: #64748b; }
.v2-filters-footer .v2-fitem i.fitem-ico { color: #94a3b8; }
.v2-filters-footer .v2-fitem:hover { color: #0f172a; }

/* -------- Col 1: nav rail (60px, dark) -------- */
.v2-rail {
  background: #0b1220;
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0 12px;
  border-right: 1px solid rgba(255,255,255,0.06);
  gap: 2px;
}
.v2-rail .ws-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: white; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  margin-bottom: 4px;
}
.v2-rail .ws-av .status-dot { position: absolute; bottom: -1px; right: -1px; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; border: 2px solid #0b1220; }
.v2-rail .status-msg { font-size: 9px; color: rgba(255,255,255,0.4); text-align: center; margin: 0 6px 8px; line-height: 1.2; cursor: pointer; }
.v2-rail-btn {
  width: 40px; height: 40px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.55);
  background: transparent; border: 0; cursor: pointer;
  position: relative;
}
.v2-rail-btn svg, .v2-rail-btn i { width: 16px; height: 16px; font-size: 15px; }
.v2-rail-btn:hover { background: rgba(255,255,255,0.06); color: white; }
.v2-rail-btn.active { background: rgba(34,197,94,0.14); color: #4ade80; }
.v2-rail-btn .badge-red { position: absolute; top: 4px; right: 4px; min-width: 14px; height: 14px; padding: 0 4px; border-radius: 7px; background: #ef4444; color: white; font-size: 9px; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 1.5px solid #0b1220; }
.v2-rail-btn .badge-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; border: 2px solid #0b1220; }
.v2-rail-spacer { flex: 1; }
.v2-rail-btn.quick { background: #22c55e; color: white; }
.v2-rail-btn.quick:hover { background: #16a34a; }

/* -------- Col 3: chat list (340px) -------- */
.v2-list { display: flex; flex-direction: column; border-right: 1px solid var(--border-subtle); background: var(--bg); min-height: 0; }

/* Active Number Pill (replaces workspace header) */
.v2-numpill {
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 12px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.v2-numpill:hover { background: #f8fafc; }
.v2-numpill.open { background: #f1f5f9; }
.v2-numpill .np-av {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; background: #e2e8f0; color: #334155;
  flex-shrink: 0; position: relative;
  font-weight: 600;
}
.v2-numpill .np-av .status-dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--bg);
}
.v2-numpill .np-av .status-dot.connected { background: #22c55e; }
.v2-numpill .np-av .status-dot.syncing   { background: #f59e0b; }
.v2-numpill .np-av .status-dot.disconnected { background: #ef4444; }
.v2-numpill .np-text { flex: 1; min-width: 0; }
.v2-numpill .np-phone {
  font-size: 13px; font-weight: 500; color: #0f172a;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.v2-numpill .np-sub {
  font-size: 11px; color: #64748b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v2-numpill .np-sub .unread-dot { color: #22c55e; font-weight: 600; }
.v2-numpill .np-caret {
  font-size: 10px; color: #94a3b8;
  transition: transform 150ms;
  flex-shrink: 0;
}
.v2-numpill.open .np-caret { transform: rotate(180deg); }
.v2-numpill .np-others {
  background: #e2e8f0; color: #475569;
  font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: 10px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.v2-numpill .np-kbd {
  font-family: var(--font-mono); font-size: 10px;
  color: #94a3b8; background: #f1f5f9;
  border: 1px solid #e2e8f0; border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 120ms;
}
.v2-numpill:hover .np-kbd { opacity: 1; }

/* Numbers Popover */
.v2-numpop {
  position: fixed;
  width: 360px; max-height: 480px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.12), 0 2px 8px rgba(15,23,42,0.06);
  z-index: 200;
  display: flex; flex-direction: column;
  overflow: hidden;
  /* animation removed — was causing opacity:0 flicker */
}
@keyframes v2-pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.v2-numpop-head {
  height: 44px; padding: 0 12px;
  display: flex; align-items: center; gap: 8px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.v2-numpop-head i { color: #94a3b8; font-size: 12px; }
.v2-numpop-head input {
  flex: 1; border: 0; background: transparent; outline: 0;
  font-size: 13px; color: #0f172a;
}
.v2-numpop-head input::placeholder { color: #94a3b8; }
.v2-numpop-head .kbd {
  font-family: var(--font-mono); font-size: 10px;
  color: #64748b; background: white;
  border: 1px solid #e2e8f0; border-radius: 4px;
  padding: 1px 5px;
}

.v2-numpop-list { flex: 1; overflow-y: auto; padding: 4px 0; }
.v2-numpop-list::-webkit-scrollbar { width: 6px; }
.v2-numpop-list::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.1); border-radius: 3px; }

.v2-numrow {
  display: grid;
  grid-template-columns: 18px 32px 1fr auto auto;
  gap: 8px; align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  position: relative;
}
.v2-numrow:hover { background: #f8fafc; }
.v2-numrow.active { background: #ecfdf5; }
.v2-numrow.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 2px; background: #059669; border-radius: 2px;
}
.v2-numrow.muted { opacity: 0.6; }
.v2-numrow .check {
  color: #059669; font-size: 11px;
  visibility: hidden;
}
.v2-numrow.active .check { visibility: visible; }
.v2-numrow .av {
  width: 28px; height: 28px; border-radius: 50%;
  background: #e2e8f0; color: #334155;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; position: relative;
  font-weight: 600;
}
.v2-numrow .av .status-dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid white;
}
.v2-numrow .av .status-dot.connected { background: #22c55e; }
.v2-numrow .av .status-dot.syncing { background: #f59e0b; }
.v2-numrow .av .status-dot.disconnected { background: #ef4444; }
.v2-numrow .meta { min-width: 0; }
.v2-numrow .phone {
  font-family: var(--font-mono); font-size: 13px;
  font-weight: 500; color: #0f172a;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v2-numrow.active .phone { color: #065f46; }
.v2-numrow .phone .mute-ico { color: #94a3b8; font-size: 9px; }
.v2-numrow .sub {
  font-size: 11px; color: #64748b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v2-numrow .unread {
  background: #e2e8f0; color: #475569;
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 10px;
  font-variant-numeric: tabular-nums;
  min-width: 18px; text-align: center;
}
.v2-numrow.active .unread { background: #22c55e; color: white; }
.v2-numrow .kbd {
  font-family: var(--font-mono); font-size: 10px;
  color: #94a3b8; background: #f8fafc;
  border: 1px solid #e2e8f0; border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}
.v2-numrow.special {
  background: white;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
.v2-numrow.special .av { background: #ecfdf5; color: #059669; }

.v2-numpop-footer {
  border-top: 1px solid #e2e8f0;
  padding: 4px 0;
  flex-shrink: 0;
  background: white;
}
.v2-numpop-footer .v2-numrow-simple {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  font-size: 12px; color: #334155;
  cursor: pointer;
}
.v2-numpop-footer .v2-numrow-simple i {
  width: 14px; color: #64748b; font-size: 12px; text-align: center;
}
.v2-numpop-footer .v2-numrow-simple:hover { background: #f8fafc; color: #0f172a; }

/* Command Palette */
.v2-cmdk-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 88px;
}
@keyframes v2-fade { from { opacity: 0 } to { opacity: 1 } }
.v2-cmdk {
  width: 560px; max-height: 520px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(15,23,42,0.25);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.v2-cmdk-head {
  height: 56px; padding: 0 16px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.v2-cmdk-head i.search { color: #94a3b8; font-size: 14px; }
.v2-cmdk-head input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 15px; color: #0f172a;
}
.v2-cmdk-head input::placeholder { color: #94a3b8; }
.v2-cmdk-head .kbd {
  font-family: var(--font-mono); font-size: 11px;
  color: #64748b; background: #f1f5f9;
  border: 1px solid #e2e8f0; border-radius: 4px;
  padding: 2px 6px;
}
.v2-cmdk-body { flex: 1; overflow-y: auto; padding: 8px 0 12px; }
.v2-cmdk-cat-head {
  font-size: 11px; font-weight: 600;
  color: #64748b;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 10px 16px 4px;
}
.v2-cmdk-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  cursor: pointer;
  position: relative;
}
.v2-cmdk-row:hover,
.v2-cmdk-row.sel {
  background: #f1f5f9;
}
.v2-cmdk-row.sel::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 2px; background: #059669; border-radius: 2px;
}
.v2-cmdk-row .ico {
  width: 18px; color: #64748b; font-size: 14px;
  text-align: center;
}
.v2-cmdk-row .label { flex: 1; font-size: 14px; color: #0f172a; }
.v2-cmdk-row .label .phone { font-family: var(--font-mono); font-weight: 500; }
.v2-cmdk-row .label .dim { color: #64748b; font-weight: 400; }
.v2-cmdk-row .kbd {
  font-family: var(--font-mono); font-size: 11px;
  color: #64748b; background: #f8fafc;
  border: 1px solid #e2e8f0; border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* Number chip on chat items ("All Numbers" view) */
.v2-chat .numchip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: #64748b;
  font-family: var(--font-mono); font-weight: 500;
  flex-shrink: 0;
}
.v2-chat .numchip .nav {
  width: 14px; height: 14px; border-radius: 50%;
  background: #e2e8f0; color: #334155;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px;
  font-weight: 600;
}

/* Tweaks panel */
.v2-tweaks {
  position: fixed; bottom: 16px; right: 16px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.12);
  padding: 10px 12px;
  z-index: 80;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px;
  min-width: 220px;
}
.v2-tweaks .t-title { font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.v2-tweaks .t-row { display: flex; align-items: center; gap: 8px; }
.v2-tweaks .t-row label { color: #334155; cursor: pointer; flex: 1; }
.v2-tweaks .t-row input { margin: 0; }

/* -------- Col 3: chat list (340px) — old rules kept below -------- */
.v2-list-legacy-gone {}

/* Horizontal tabs */
.v2-tabs { display: flex; gap: 2px; padding: 8px 10px 0; overflow-x: auto; border-bottom: 1px solid var(--border-subtle); scrollbar-width: none; }
.v2-tabs::-webkit-scrollbar { display: none; }
.v2-tab { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; font-size: 12px; color: var(--fg-muted); border-radius: 6px 6px 0 0; cursor: pointer; white-space: nowrap; position: relative; margin-bottom: -1px; border: 1px solid transparent; border-bottom: 0; }
.v2-tab:hover { color: var(--fg); }
.v2-tab.active { color: var(--fg); font-weight: 500; background: var(--bg); border-color: var(--border-subtle); }
.v2-tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--bg); }
.v2-tab .tcount { font-family: var(--font-mono); font-size: 10px; background: var(--bg-muted); color: var(--fg-muted); padding: 1px 5px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.v2-tab.active .tcount { background: var(--green-500); color: white; }

.v2-filter-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--border-subtle); }
.v2-filter-drop { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--fg-muted); padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.v2-filter-drop:hover { background: var(--bg-muted); color: var(--fg); }
.v2-filter-drop svg { width: 12px; height: 12px; }

.v2-search { margin: 8px 14px 8px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); font-size: 12px; color: var(--fg-muted); }
.v2-search svg { width: 13px; height: 13px; color: var(--fg-faint); }
.v2-search .kbd { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--fg-faint); border: 1px solid var(--border-subtle); border-radius: 4px; padding: 1px 5px; }

/* Chat list items — 74.3px height */
.v2-chats { flex: 1; overflow-y: auto; }
.v2-chat {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer; position: relative;
  min-height: 74px;
}
.v2-chat:hover { background: var(--bg-subtle); }
.v2-chat.active { background: #f0fdf4; }
.v2-chat.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.v2-chat .avwrap { position: relative; width: 44px; height: 44px; }
.v2-chat .av { width: 44px; height: 44px; border-radius: 50%; color: white; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.v2-chat .state-ico { position: absolute; bottom: -2px; right: -2px; width: 18px; height: 18px; border-radius: 50%; background: white; border: 2px solid white; display: flex; align-items: center; justify-content: center; font-size: 9px; }
.v2-chat .state-ico.resolved { color: #22c55e; }
.v2-chat .state-ico.pending { color: #f59e0b; }
.v2-chat .state-ico.active-s { color: #3b82f6; background: #dbeafe; }
.v2-chat .body { min-width: 0; }
.v2-chat .row1 { display: flex; align-items: center; gap: 6px; }
.v2-chat .name { font-size: 13px; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.v2-chat .flags { display: inline-flex; gap: 4px; color: var(--amber-500); font-size: 10px; }
.v2-chat .flags .mute { color: var(--fg-subtle); }
.v2-chat .time { font-size: 11px; color: var(--fg-faint); font-family: var(--font-mono); white-space: nowrap; flex-shrink: 0; }
.v2-chat .row2 { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.v2-chat .tick { color: var(--fg-faint); font-size: 11px; flex-shrink: 0; font-family: var(--font-mono); }
.v2-chat .tick.read { color: #3b82f6; }
.v2-chat .tick.err { color: #ef4444; }
.v2-chat .preview { font-size: 12px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.v2-chat .preview .mtype { color: var(--fg-subtle); font-style: italic; }
.v2-chat .preview .typing { color: #22c55e; font-weight: 500; }
.v2-chat .unread { background: #3b82f6; color: white; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 10px; font-variant-numeric: tabular-nums; min-width: 18px; text-align: center; flex-shrink: 0; }
.v2-chat .label-chips { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.v2-chip-label { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--fg-muted); background: var(--bg-muted); padding: 1px 6px; border-radius: 999px; }
.v2-chip-label .dot { width: 6px; height: 6px; border-radius: 50%; }

/* -------- Col 3: conversation -------- */
.v2-conv { display: flex; flex-direction: column; background: var(--bg); min-width: 0; overflow: hidden; }
.v2-conv-head { padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-subtle); height: 56px; gap: 12px; }
.v2-conv-head .who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; cursor: pointer; }
.v2-conv-head .av { width: 32px; height: 32px; border-radius: 50%; color: white; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.v2-conv-head .text { min-width: 0; }
.v2-conv-head .n { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-conv-head .sub { font-size: 11px; color: var(--fg-subtle); }
.v2-conv-head .acts { display: flex; gap: 4px; align-items: center; }
.v2-btn-resolve { display: inline-flex; align-items: center; gap: 6px; background: #22c55e; color: white; border: 0; border-radius: 7px; padding: 6px 12px; font-size: 12px; font-weight: 500; cursor: pointer; }
.v2-btn-resolve:hover { background: #16a34a; }
.v2-btn-resolve.split { padding-right: 6px; }
.v2-btn-resolve-caret { background: rgba(255,255,255,0.2); border-radius: 4px; padding: 2px 4px; margin-left: 2px; }
.v2-icon-btn { width: 32px; height: 32px; border-radius: 7px; background: transparent; border: 0; color: var(--fg-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.v2-icon-btn:hover { background: var(--bg-muted); color: var(--fg); }
.v2-icon-btn svg, .v2-icon-btn i { width: 15px; height: 15px; font-size: 14px; }

.v2-banner { margin: 8px 16px 0; padding: 8px 12px; border-radius: 8px; font-size: 12px; background: #eff6ff; color: #1e40af; border: 1px solid #dbeafe; display: flex; align-items: center; gap: 8px; }
.v2-banner.warn { background: #fef3c7; color: #78350f; border-color: #fde68a; }
.v2-banner.success { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }

.v2-stream { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.v2-sys { align-self: center; background: var(--bg-muted); color: var(--fg-muted); font-size: 11px; padding: 4px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.v2-sys i, .v2-sys svg { font-size: 10px; width: 10px; height: 10px; color: var(--fg-subtle); }

.v2-msg { max-width: 560px; display: flex; flex-direction: column; gap: 3px; }
.v2-msg.in { align-self: flex-start; }
.v2-msg.out { align-self: flex-end; align-items: flex-end; }
.v2-msg .sender { font-size: 11px; color: var(--fg-subtle); padding: 0 12px; display: flex; align-items: center; gap: 6px; }
.v2-msg .sender .av-xs { width: 16px; height: 16px; border-radius: 50%; color: white; font-size: 8px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.v2-bubble { padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; background: var(--bg-muted); color: var(--fg); position: relative; }
.v2-bubble.out { background: #dcfce7; color: #052e16; }
.v2-bubble.note { display: block; gap: 0; background: #fef9c3; color: #78350f; border: 1px solid #fde68a; max-width: none; }
.v2-bubble .note-label { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; color: #b45309; margin-bottom: 6px; white-space: nowrap; width: fit-content; max-width: 100%; }
.v2-bubble .meta { font-size: 10px; color: var(--fg-faint); margin-top: 3px; display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-family: var(--font-mono); }
.v2-bubble.out .meta { color: #16a34a; }
.v2-bubble .meta .tick { color: #3b82f6; }
.v2-bubble .forwarded { font-size: 10px; color: var(--fg-subtle); display: inline-flex; align-items: center; gap: 3px; margin-bottom: 4px; }
.v2-bubble .quote { background: rgba(0,0,0,0.06); border-left: 3px solid var(--accent); padding: 5px 8px; border-radius: 6px; margin-bottom: 6px; font-size: 12px; color: var(--fg-muted); }
.v2-bubble .quote .qa { font-weight: 600; color: var(--fg); font-size: 11px; }
.v2-bubble.out .quote { background: rgba(16,94,58,0.1); border-left-color: #065f46; }
.v2-bubble .audio-player { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.v2-bubble .audio-player .play { width: 28px; height: 28px; border-radius: 50%; background: white; color: var(--fg); display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.v2-bubble .audio-player .bar { flex: 1; height: 3px; background: rgba(0,0,0,0.1); border-radius: 2px; position: relative; }
.v2-bubble .audio-player .bar::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 35%; background: var(--fg); border-radius: 2px; }
.v2-bubble .audio-player .dur { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); }

.v2-reactions { display: inline-flex; gap: 4px; margin-top: 2px; }
.v2-reaction { font-size: 11px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; font-family: var(--font-mono); }

/* Composer */
.v2-composer { border-top: 1px solid var(--border-subtle); background: var(--bg); }
.v2-composer-tabs { display: flex; gap: 2px; padding: 8px 16px 0; border-bottom: 1px solid var(--border-subtle); }
.v2-ctab { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; font-size: 12px; color: var(--fg-muted); border-radius: 6px 6px 0 0; cursor: pointer; margin-bottom: -1px; border: 1px solid transparent; border-bottom: 0; }
.v2-ctab:hover { color: var(--fg); }
.v2-ctab.active { color: var(--fg); font-weight: 500; background: var(--bg); border-color: var(--border-subtle); }
.v2-ctab .cc { background: var(--bg-muted); color: var(--fg-muted); font-size: 10px; padding: 1px 5px; border-radius: 6px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.v2-composer-box { padding: 10px 16px 14px; }
.v2-reply-banner { background: var(--bg-subtle); border-left: 3px solid var(--accent); border-radius: 6px; padding: 6px 10px; margin-bottom: 8px; font-size: 12px; color: var(--fg-muted); display: flex; align-items: center; gap: 8px; }
.v2-reply-banner .qa { font-weight: 600; color: var(--fg); }
.v2-reply-banner .dismiss { margin-left: auto; cursor: pointer; color: var(--fg-faint); }

.v2-composer-input { min-height: 36px; font-size: 13px; color: var(--fg); outline: none; padding: 8px 0; }
.v2-composer-input:empty::before { content: attr(data-placeholder); color: var(--fg-faint); }

.v2-composer-actions { display: flex; align-items: center; gap: 2px; padding-top: 8px; border-top: 1px solid var(--border-subtle); }
.v2-composer-actions .spacer { flex: 1; }
.v2-composer-actions .btn-record { color: #ef4444; }
.v2-composer-actions .hint { font-size: 10px; color: var(--fg-faint); font-family: var(--font-mono); margin-right: 8px; white-space: nowrap; }
.v2-composer-actions .hint kbd { background: var(--bg-muted); border: 1px solid var(--border-subtle); border-radius: 4px; padding: 1px 5px; }
.v2-composer-actions .send { display: inline-flex; align-items: center; gap: 6px; background: #22c55e; color: white; border: 0; padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 500; cursor: pointer; }
.v2-composer-actions .send:hover { background: #16a34a; }
.v2-composer-actions .sep { width: 1px; height: 16px; background: var(--border-subtle); margin: 0 4px; }
.v2-composer-actions .ai-btn { display: inline-flex; align-items: center; gap: 4px; background: transparent; border: 1px solid var(--border); color: var(--fg-muted); padding: 4px 8px; border-radius: 6px; font-size: 11px; cursor: pointer; }
.v2-composer-actions .ai-btn:hover { background: var(--bg-muted); color: var(--fg); }

.v2-composer-more { position: relative; display: inline-flex; }
.v2-composer-dropup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14), 0 4px 10px rgba(15, 23, 42, 0.06);
  padding: 6px;
  z-index: 30;
  display: flex;
  flex-direction: column;
}
.v2-dropup-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--fg);
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
}
.v2-dropup-item i { width: 14px; color: var(--fg-muted); text-align: center; }
.v2-dropup-item:hover { background: var(--bg-muted); }
.v2-dropup-item:hover i { color: var(--fg); }
.v2-dropup-sep { height: 1px; background: var(--border-subtle); margin: 4px 2px; }

/* -------- Col 4: customer profile (accordion) -------- */
.v2-cp { border-left: 1px solid var(--border-subtle); background: var(--bg); display: flex; flex-direction: column; overflow: hidden; }
.v2-cp-head { padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-subtle); height: 56px; }
.v2-cp-head .t { font-size: 13px; font-weight: 600; }
.v2-cp-scroll { flex: 1; overflow-y: auto; }
.v2-cp-hero { padding: 20px 16px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; border-bottom: 1px solid var(--border-subtle); }
.v2-cp-hero .av { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, #fde68a, #f59e0b); color: white; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; }
.v2-cp-hero .n { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-top: 10px; }
.v2-cp-hero .phone { font-size: 12px; color: var(--fg-muted); margin-top: 2px; font-family: var(--font-mono); display: inline-flex; align-items: center; gap: 6px; }
.v2-cp-hero .phone .copy { color: var(--fg-faint); cursor: pointer; font-size: 10px; }
.v2-cp-hero .phone-lock { font-size: 11px; color: var(--fg-subtle); margin-top: 4px; display: inline-flex; align-items: center; gap: 5px; }
.v2-cp-hero .edit-btn { margin-top: 12px; background: #22c55e; color: white; border: 0; padding: 6px 14px; border-radius: 7px; font-size: 12px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.v2-cp-hero .edit-btn:hover { background: #16a34a; }

.v2-acc { border-bottom: 1px solid var(--border-subtle); }
.v2-acc-head { padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.v2-acc-head .t { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-subtle); }
.v2-acc-head .caret { color: var(--fg-faint); transition: transform 150ms; }
.v2-acc.open .v2-acc-head .caret { transform: rotate(90deg); }
.v2-acc-body { padding: 0 16px 14px; display: none; }
.v2-acc.open .v2-acc-body { display: block; }
.v2-acc-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; gap: 12px; }
.v2-acc-row .k { color: var(--fg-subtle); display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }
.v2-acc-row .k i, .v2-acc-row .k svg { font-size: 10px; width: 10px; color: var(--fg-faint); }
.v2-acc-row .v { color: var(--fg); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; display: inline-flex; align-items: center; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }
.v2-acc-row .v .tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.v2-acc-row .v .tag.active { background: #dbeafe; color: #1e40af; }
.v2-acc-row .v .tag.pending { background: #fef3c7; color: #92400e; }
.v2-acc-row .v .tag.resolved { background: #d1fae5; color: #065f46; }
.v2-acc-row .v .dot { width: 6px; height: 6px; border-radius: 50%; }
.v2-acc-row .v .av-xs { width: 16px; height: 16px; border-radius: 50%; color: white; font-size: 8px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }

.v2-labels-list { display: flex; flex-wrap: wrap; gap: 4px; }
.v2-label-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--fg); background: var(--bg-muted); padding: 2px 8px; border-radius: 999px; }
.v2-label-chip .dot { width: 7px; height: 7px; border-radius: 50%; }

.v2-notes-ta { width: 100%; min-height: 100px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 12px; color: var(--fg); resize: vertical; background: var(--bg); box-sizing: border-box; }
.v2-notes-ta:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.v2-notes-meta { font-size: 10px; color: var(--fg-faint); margin-top: 4px; }

.v2-coming-soon { font-size: 9px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-faint); background: var(--bg-muted); padding: 1px 6px; border-radius: 4px; margin-left: 6px; }

/* ============================================================
   Interactivity: chat list empty state, assign popover,
   labels picker, removable chips
   ============================================================ */

/* Chat list empty state */
.v2-chats-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--fg-subtle);
}
.v2-chats-empty i { font-size: 28px; color: var(--fg-faint); margin-bottom: 10px; }
.v2-chats-empty .t { font-size: 13px; font-weight: 600; color: var(--fg); }
.v2-chats-empty .s { font-size: 12px; color: var(--fg-muted); margin-top: 4px; }

/* Allow popovers to escape accordion rows */
.v2-acc-row .v { overflow: visible; position: relative; }

/* Chat list items are clickable */
.v2-chat { cursor: pointer; }

/* Assign trigger button */
.v2-assign-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 2px 6px 2px 3px;
  font: inherit;
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.v2-assign-trigger:hover { background: var(--bg-subtle); border-color: var(--border-subtle); }

.v2-assign-empty {
  background: var(--bg-muted) !important;
  color: var(--fg-faint) !important;
}
.v2-assign-empty i { font-size: 8px; }

/* Assign popover */
.v2-assign-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.12), 0 2px 8px rgba(15,23,42,0.06);
  padding: 6px;
  z-index: 20;
  text-align: left;
}
.v2-assign-pop--head { right: auto; left: 0; min-width: 220px; }

/* Conv-header assign pill */
.v2-head-assign-wrap { position: relative; }
.v2-head-assign {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px 0 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  max-width: 180px;
  transition: background .12s, border-color .12s;
}
.v2-head-assign:hover { background: var(--bg-subtle); border-color: var(--border-strong, #cbd5e1); }
.v2-head-assign .av-xs {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: white;
  font-size: 9px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.v2-head-assign .label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 120px;
}
.v2-head-assign .label.muted { color: var(--fg-subtle); }
.v2-head-assign .caret { font-size: 9px; opacity: .5; margin-left: auto; flex-shrink: 0; }
.v2-assign-head {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-faint);
  padding: 4px 8px 6px;
}
.v2-assign-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  color: var(--fg);
}
.v2-assign-row:hover { background: var(--bg-subtle); }
.v2-assign-row.active { background: #f0fdf4; color: #065f46; }
.v2-assign-row .av-xs { width: 20px; height: 20px; border-radius: 50%; color: white; font-size: 9px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.v2-assign-row .name { flex: 1; text-align: left; }
.v2-assign-row .check { color: #22c55e; font-size: 10px; }
.v2-assign-sep { height: 1px; background: var(--border-subtle); margin: 4px 6px; }

/* Removable label chip */
.v2-label-chip.removable { padding-right: 4px; }
.v2-label-remove {
  background: transparent;
  border: 0;
  color: var(--fg-faint);
  cursor: pointer;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  padding: 0;
  margin-left: 2px;
  transition: background .12s, color .12s;
}
.v2-label-remove:hover { background: rgba(239,68,68,0.12); color: #ef4444; }

.v2-labels-empty {
  font-size: 11px;
  color: var(--fg-faint);
  font-style: italic;
  padding: 2px 0;
}

/* Label picker popover */
.v2-label-picker {
  margin-top: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(15,23,42,0.08);
  padding: 6px;
}
.v2-picker-head {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-faint);
  padding: 4px 8px 6px;
}
.v2-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  color: var(--fg);
}
.v2-picker-row:hover { background: var(--bg-subtle); }
.v2-picker-row.active { background: #f0fdf4; color: #065f46; }
.v2-picker-row .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.v2-picker-row .name { flex: 1; }
.v2-picker-row .check { color: #22c55e; font-size: 10px; }

/* ============================================================
   Thread empty state — 24h WhatsApp window closed
   Shown when activeChat.messages is empty (needs a template to start).
   ============================================================ */
.v2-empty-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  color: var(--fg-subtle);
}
.v2-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #94a3b8;
  font-size: 22px;
}
.v2-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.v2-empty-sub {
  font-size: 12px;
  line-height: 1.55;
  color: var(--fg-subtle);
  max-width: 360px;
  margin-bottom: 20px;
}
.v2-empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: #22c55e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.v2-empty-cta:hover { background: #16a34a; }
.v2-empty-cta i { font-size: 12px; }

/* ============================================================
   WABA Templates lateral panel — full-viewport floating overlay.
   Slides in from the right edge of the screen, sits above the entire
   inbox layout (including the profile panel).
   ============================================================ */
.v2-tpl-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1000;
  animation: v2-tpl-fade 0.15s ease-out;
}
.v2-tpl-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 520px;
  max-width: calc(100vw - 48px);
  background: white;
  border-left: 1px solid var(--border-subtle);
  box-shadow: -20px 0 48px rgba(15, 23, 42, 0.18);
  z-index: 1001;
  display: flex;
  flex-direction: column;
}
@keyframes v2-tpl-fade { from { opacity: 0; } to { opacity: 1; } }
.v2-tpl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.v2-tpl-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.v2-tpl-title i { color: #22c55e; }
.v2-tpl-count {
  background: #f1f5f9;
  color: var(--fg-subtle);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 4px;
}
.v2-tpl-sub {
  padding: 8px 16px 12px;
  font-size: 11px;
  color: var(--fg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.v2-tpl-sub strong { color: var(--fg); font-weight: 600; }
.v2-tpl-search {
  position: relative;
  padding: 12px 16px 8px;
  flex-shrink: 0;
}
.v2-tpl-search i {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-subtle);
  font-size: 11px;
  pointer-events: none;
}
.v2-tpl-search input {
  width: 100%;
  padding: 8px 12px 8px 30px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  outline: none;
  font-family: inherit;
  color: var(--fg);
  transition: border-color 0.15s, background 0.15s;
}
.v2-tpl-search input:focus {
  border-color: #22c55e;
  background: white;
}
.v2-tpl-cats {
  display: flex;
  gap: 6px;
  padding: 4px 16px 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.v2-tpl-cat {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
  background: white;
  color: var(--fg-subtle);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.v2-tpl-cat:hover { background: #f8fafc; }
.v2-tpl-cat.active {
  background: #f0fdf4;
  border-width: 1px;
  font-weight: 600;
}
.v2-tpl-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v2-tpl-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--fg-subtle);
  font-size: 12px;
}
.v2-tpl-empty i {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
  color: #cbd5e1;
}
.v2-tpl-card {
  padding: 12px;
  background: white;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.v2-tpl-card:hover {
  border-color: #22c55e;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
  transform: translateY(-1px);
}
.v2-tpl-card:hover .v2-tpl-send { opacity: 1; transform: translateX(0); }
.v2-tpl-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}
.v2-tpl-name {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono, ui-monospace, monospace);
  color: var(--fg);
  letter-spacing: -0.005em;
}
.v2-tpl-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.v2-tpl-body {
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.v2-tpl-card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: var(--fg-subtle);
}
.v2-tpl-lang,
.v2-tpl-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.v2-tpl-status i { color: #22c55e; }
.v2-tpl-send {
  margin-left: auto;
  color: #22c55e;
  font-weight: 600;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
}
