/* ═══════════════════════════════════════════════════════════════════════════
   LinxyConnect — Stylesheet v1.0
   Brand: Navy (#2B3A52), Tan/Gold (#C4A882), Teal (#2C6E6A)
   Fonts: Montserrat (display), DM Sans (body)
═══════════════════════════════════════════════════════════════════════════ */

:root {
  --navy: #2B3A52;
  --navy-dark: #1E2C40;
  --navy-mid: #364A66;
  --navy-soft: rgba(43,58,82,0.06);

  --tan: #C4A882;
  --tan-dark: #A88E68;
  --tan-light: #F5EFE6;
  --tan-xlight: #FAF6F0;
  --tan-glow: rgba(196,168,130,0.15);

  --teal: #2C6E6A;
  --teal-dark: #245C58;
  --teal-light: #347E7A;

  --black: #111318;
  --white: #FFFFFF;

  --bg: #F6F5F3;
  --card: #FFFFFF;
  --border: #E8E6E1;
  --border-soft: #F0EEEA;

  --text: #1A1D23;
  --text-secondary: #6B7080;
  --text-tertiary: #9CA3AF;
  --text-inverse: #FFFFFF;

  --green: #10B981;
  --green-soft: #ECFDF5;
  --amber: #F59E0B;
  --red: #E8423A;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);

  --font-display: 'Montserrat', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --sidebar-w: 340px;
  --detail-w: 300px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════
   SHARED COMPONENTS
═══════════════════════════════════════════════ */

/* Brand name */
.lxc-brand-primary {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--black);
}
.lxc-brand-secondary {
  font-family: var(--font-display);
  font-weight: 700;
  color: #4A5568;
}

/* Buttons */
.lxc-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}
.lxc-btn-primary:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(43,58,82,0.25);
}

.lxc-btn-full { width: 100%; }

.lxc-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.lxc-btn-secondary:hover {
  border-color: var(--tan);
  background: var(--tan-xlight);
}

.lxc-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.lxc-btn-outline:hover {
  border-color: var(--tan);
  background: var(--tan-xlight);
}

/* Icon buttons */
.lxc-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.lxc-icon-btn:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* Spinner */
.lxc-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: lxcSpin 0.8s linear infinite;
  margin: 0 auto 12px;
}
.lxc-spinner-sm {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--tan);
  border-radius: 50%;
  animation: lxcSpin 0.8s linear infinite;
}
@keyframes lxcSpin { to { transform: rotate(360deg); } }

/* Encryption badges */
.lxc-encryption-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--green-soft);
  border-radius: 20px;
  font-size: 11px;
  color: #059669;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════ */
.lxc-login-body {
  overflow: auto;
  height: auto;
  min-height: 100vh;
}

.lxc-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(160deg, #F9F8F6 0%, #F0EDE8 40%, #E8E4DD 100%);
  position: relative;
}
.lxc-login-wrapper::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,168,130,0.12) 0%, transparent 70%);
}

.lxc-login-card {
  position: relative;
  z-index: 2;
  background: var(--white);
  border-radius: 24px;
  padding: 48px 40px;
  width: 420px;
  max-width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: lxcCardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes lxcCardIn {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lxc-login-logo { margin-bottom: 8px; }
.lxc-logo-img { display: inline-block; }

.lxc-login-brand {
  margin-bottom: 4px;
  font-size: 28px;
}
.lxc-login-brand .lxc-brand-primary { font-size: 28px; }
.lxc-login-brand .lxc-brand-secondary { font-size: 24px; }

.lxc-login-tagline {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-weight: 400;
}
.lxc-login-tagline em {
  font-style: normal;
  color: var(--navy);
  font-weight: 600;
}

.lxc-login-section { margin-bottom: 8px; }
.lxc-login-status-text {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}
.lxc-text-success { color: #059669; }
.lxc-text-error { color: var(--red); }

/* QR Zone */
.lxc-qr-zone {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.lxc-qr-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  min-width: 200px;
}
.lxc-qr-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Divider */
.lxc-login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--text-tertiary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}
.lxc-login-divider::before,
.lxc-login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Code display */
.lxc-code-display {
  margin-bottom: 20px;
}
.lxc-code-value {
  display: block;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--navy);
  margin-bottom: 6px;
}
.lxc-code-hint {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Status */
.lxc-login-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.lxc-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--tan);
  border-radius: 50%;
  animation: lxcPulse 1.5s ease infinite;
}
@keyframes lxcPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Success icon */
.lxc-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: #059669;
}
.lxc-success-icon-lg {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

/* Encryption badge */
.lxc-encryption-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 8px 16px;
  background: var(--green-soft);
  border-radius: 20px;
  font-size: 12px;
  color: #059669;
  font-weight: 600;
}

/* Footer */
.lxc-login-footer {
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.7;
}
.lxc-login-footer a {
  color: var(--tan-dark);
  text-decoration: none;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════
   INVITE PAGE
═══════════════════════════════════════════════ */
.lxc-invite-card {
  position: relative;
  z-index: 2;
  background: var(--white);
  border-radius: 24px;
  padding: 48px 40px;
  width: 420px;
  max-width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: lxcCardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.lxc-invite-from-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-tertiary);
  font-weight: 600;
  margin-bottom: 20px;
}
.lxc-invite-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  color: var(--white);
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(43,58,82,0.20);
}
.lxc-invite-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 4px;
}
.lxc-invite-handle {
  font-size: 14px;
  color: var(--tan-dark);
  font-weight: 500;
  margin-bottom: 24px;
}
.lxc-invite-message {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Note field */
.lxc-invite-note-field {
  text-align: left;
  margin-bottom: 24px;
}
.lxc-invite-note-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.lxc-invite-note-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lxc-invite-note-field textarea:focus {
  border-color: var(--tan);
  box-shadow: 0 0 0 3px var(--tan-glow);
}

/* Security note */
.lxc-invite-security-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--green-soft);
  border-radius: 12px;
  text-align: left;
}
.lxc-invite-security-note svg { flex-shrink: 0; color: #059669; margin-top: 1px; }
.lxc-invite-security-note p { font-size: 12px; color: #065F46; line-height: 1.6; font-weight: 500; }

/* No account / get app */
.lxc-invite-no-account {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.lxc-invite-no-account p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* Powered by */
.lxc-invite-powered {
  margin-top: 28px;
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}
.lxc-invite-powered strong {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--black);
}

/* Sent confirmation */
.lxc-sent-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--text);
  margin-bottom: 8px;
}
.lxc-sent-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}
.lxc-sent-desc strong { color: var(--navy); font-weight: 700; }
.lxc-sent-steps {
  text-align: left;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
}
.lxc-sent-steps h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}
.lxc-sent-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}
.lxc-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tan-light);
  color: var(--tan-dark);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lxc-sent-step p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.lxc-sent-step p strong { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════════
   APP SHELL — Three-Panel Layout
═══════════════════════════════════════════════ */
.lxc-app-body { overflow: hidden; }

.lxc-app {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* ── Sidebar ── */
.lxc-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.lxc-sidebar-header { padding: 20px 20px 0; flex-shrink: 0; }
.lxc-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.lxc-sidebar-brand-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lxc-sb-name { font-size: 18px; }
.lxc-sb-name .lxc-brand-primary { font-size: 18px; }
.lxc-sb-name .lxc-brand-secondary { font-size: 15px; }
.lxc-sidebar-actions { display: flex; gap: 6px; }

/* Search */
.lxc-search-bar {
  position: relative;
  margin-bottom: 16px;
}
.lxc-search-bar input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: all 0.2s;
}
.lxc-search-bar input:focus {
  border-color: var(--tan);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--tan-glow);
}
.lxc-search-bar input::placeholder { color: var(--text-tertiary); }
.lxc-search-bar svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
}

/* Tabs */
.lxc-sidebar-tabs {
  display: flex;
  gap: 2px;
  padding: 0 20px;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.lxc-tab {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-body);
}
.lxc-tab.active { color: var(--navy); border-bottom-color: var(--tan); }
.lxc-tab:hover:not(.active) { color: var(--text-secondary); }
.lxc-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--tan);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  margin-left: 3px;
  vertical-align: middle;
}

/* Conversation list */
.lxc-conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.lxc-conv-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Conversation items */
.lxc-conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.lxc-conv-item:hover { background: var(--bg); }
.lxc-conv-item.active { background: #F0F7F7; }
.lxc-conv-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 28px;
  background: var(--teal);
  border-radius: 0 3px 3px 0;
}

/* Avatars */
.lxc-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  flex-shrink: 0;
  position: relative;
}
.lxc-avatar.brand { border-radius: 14px; }
.lxc-avatar-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--green);
  border: 2.5px solid var(--white);
  border-radius: 50%;
}

.lxc-conv-info { flex: 1; min-width: 0; }
.lxc-conv-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}
.lxc-conv-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lxc-conv-time {
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  font-weight: 500;
}
.lxc-conv-preview {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lxc-conv-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--tan);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  flex-shrink: 0;
}
.lxc-conv-encrypted {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--green);
  font-weight: 600;
  margin-top: 3px;
}

/* ── Chat Panel ── */
.lxc-chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  min-width: 0;
}

/* Empty state */
.lxc-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px;
}
.lxc-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--tan-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--tan);
}
.lxc-empty-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--navy);
}
.lxc-empty-desc {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 300px;
  line-height: 1.6;
}

/* Active chat container */
.lxc-active-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Chat header */
.lxc-chat-header {
  padding: 14px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.lxc-chat-header-left { display: flex; align-items: center; gap: 12px; }
.lxc-back-btn {
  display: none; /* shown on mobile */
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-secondary);
}
.lxc-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
}
.lxc-chat-avatar.brand { border-radius: 12px; }
.lxc-chat-name { font-weight: 700; font-size: 15px; color: var(--text); }
.lxc-chat-status {
  font-size: 12px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}
.lxc-chat-status::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
}
.lxc-chat-header-right { display: flex; align-items: center; gap: 6px; }

/* Messages */
.lxc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Message groups */
.lxc-msg-group {
  display: flex;
  gap: 10px;
  max-width: 70%;
  margin-bottom: 8px;
}
.lxc-msg-group.out { align-self: flex-end; flex-direction: row-reverse; }
.lxc-msg-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
  align-self: flex-end;
}
.lxc-msg-group.out .lxc-msg-av { display: none; }
.lxc-msg-content { display: flex; flex-direction: column; gap: 3px; }
.lxc-msg-bubble {
  padding: 11px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}
.lxc-msg-group:not(.out) .lxc-msg-bubble {
  background: var(--white);
  color: var(--text);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-sm);
}
.lxc-msg-group.out .lxc-msg-bubble {
  background: var(--teal);
  color: var(--text-inverse);
  border-bottom-right-radius: 6px;
}
.lxc-msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}
.lxc-msg-group.out .lxc-msg-meta { justify-content: flex-end; }
.lxc-msg-time { font-size: 11px; color: var(--text-tertiary); font-weight: 500; }

/* Date divider */
.lxc-msg-date {
  text-align: center;
  margin: 20px 0 16px;
}
.lxc-msg-date span {
  display: inline-block;
  padding: 4px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Typing indicator */
.lxc-typing {
  padding: 8px 24px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.lxc-typing-dots { display: flex; gap: 3px; }
.lxc-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
  animation: lxcTypingDot 1.4s ease infinite;
}
.lxc-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.lxc-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes lxcTypingDot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

/* Composer */
.lxc-composer {
  padding: 14px 24px 18px;
  background: var(--white);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.lxc-composer-inner {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 6px 6px 6px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lxc-composer-inner:focus-within {
  border-color: var(--tan);
  box-shadow: 0 0 0 3px var(--tan-glow);
}
.lxc-composer-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-bottom: 4px;
}
.lxc-comp-tool {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: all 0.15s;
}
.lxc-comp-tool:hover { color: var(--navy); background: var(--white); }
.lxc-comp-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text);
  background: transparent;
  resize: none;
  padding: 8px 0;
  min-height: 20px;
  max-height: 100px;
  line-height: 1.4;
}
.lxc-comp-input::placeholder { color: var(--text-tertiary); }
.lxc-comp-send {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  background: var(--teal);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.lxc-comp-send:hover { background: var(--teal-dark); transform: scale(1.05); }
.lxc-composer-lee {
  padding: 6px 16px 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--green);
  font-weight: 500;
}

/* ── Detail Panel ── */
.lxc-detail-panel {
  width: var(--detail-w);
  min-width: var(--detail-w);
  background: var(--white);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Detail invite section */
.lxc-detail-invite {
  padding: 20px 24px;
  background: var(--tan-xlight);
  border-top: 1px solid var(--border-soft);
  text-align: center;
  margin-top: auto;
}
.lxc-invite-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 8px;
}
.lxc-invite-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.lxc-invite-link-text {
  flex: 1;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--navy);
  font-weight: 500;
}
.lxc-invite-copy-btn {
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  border: none;
  background: var(--navy);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}
.lxc-invite-copy-btn:hover { background: var(--navy-dark); }
.lxc-invite-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .lxc-detail-panel { display: none !important; }
}
@media (max-width: 768px) {
  .lxc-sidebar { width: 100%; min-width: 100%; }
  .lxc-chat-panel { display: none; position: fixed; inset: 0; z-index: 100; }
  .lxc-chat-panel.active { display: flex; }
  .lxc-back-btn { display: flex; }
  .lxc-login-card,
  .lxc-invite-card { padding: 36px 24px; }
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════ */
@keyframes lxcSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.lxc-conv-item { animation: lxcSlideUp 0.3s ease both; }
.lxc-conv-item:nth-child(1) { animation-delay: 0.03s; }
.lxc-conv-item:nth-child(2) { animation-delay: 0.06s; }
.lxc-conv-item:nth-child(3) { animation-delay: 0.09s; }
.lxc-conv-item:nth-child(4) { animation-delay: 0.12s; }
.lxc-conv-item:nth-child(5) { animation-delay: 0.15s; }

/* ═══════════════════════════════════════════════
   EMOJI PICKER
═══════════════════════════════════════════════ */
.lxc-emoji-picker {
  position: absolute;
  bottom: 100%;
  left: 16px;
  margin-bottom: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  width: 360px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.lxc-emoji-item {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s;
}
.lxc-emoji-item:hover {
  background: var(--bg);
  transform: scale(1.15);
}

/* ═══════════════════════════════════════════════
   MEDIA IN MESSAGES
═══════════════════════════════════════════════ */
.lxc-msg-bubble img {
  max-width: 280px;
  max-height: 300px;
  border-radius: 12px;
  display: block;
  cursor: pointer;
}
.lxc-msg-bubble audio {
  max-width: 250px;
  display: block;
}
.lxc-msg-bubble video {
  max-width: 280px;
  border-radius: 12px;
  display: block;
}
.lxc-msg-group.out .lxc-msg-bubble img,
.lxc-msg-group.out .lxc-msg-bubble video {
  margin-left: auto;
}
/* Logo | Product divider */
.lxc-sb-divider {
  color: var(--text-secondary);
  font-weight: 300;
  font-size: 20px;
  margin: 0 -1px;
  opacity: 0.5;
}

/* Emoji-only messages — no bubble, large text */
.lxc-msg-bubble.lxc-msg-emoji {
  background: transparent !important;
  box-shadow: none !important;
  padding: 4px 2px;
  font-size: 36px;
  line-height: 1.3;
}
.lxc-msg-group.out .lxc-msg-bubble.lxc-msg-emoji {
  background: transparent !important;
}
/* User menu dropdown */
.lxc-user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 4px;
  min-width: 140px;
  z-index: 200;
  animation: lxcSlideUp 0.15s ease;
}
.lxc-menu-item {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.lxc-menu-item:hover {
  background: var(--bg);
  color: var(--red);
}
/* QR code tappable link for same-device login */
.lxc-qr-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.lxc-qr-link:hover .lxc-qr-container {
  box-shadow: 0 0 0 3px var(--tan-glow);
  border-radius: 12px;
}