@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  /* Crisp Minimalist Light Slate Glass Tokens */
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --label-hint: #94a3b8;
  
  /* Luminous Frosted White Glass Surfaces */
  --glass-card-bg: rgba(255, 255, 255, 0.35);
  --glass-card-border: 1px solid rgba(255, 255, 255, 0.9);
  
  /* Charcoal Button */
  --charcoal-btn: #2d3748;
  --charcoal-btn-hover: #1a202c;
  
  --primary: #0284c7;
  --danger: #ef4444;
  --success: #10b981;
  /* Crisp Minimalist Light Slate Glass Tokens */
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --label-hint: #94a3b8;
  
  /* Luminous Frosted White Glass Surfaces */
  --glass-card-bg: rgba(255, 255, 255, 0.35);
  --glass-card-border: 1px solid rgba(255, 255, 255, 0.9);
  
  /* Charcoal Button */
  --charcoal-btn: #2d3748;
  --charcoal-btn-hover: #1a202c;
  
  --primary: #0284c7;
  --danger: #ef4444;
  --success: #10b981;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #0f172a;
  background: #eef2f6;
  -webkit-font-smoothing: antialiased;
}

button, input {
  font: inherit;
}

input {
  background: transparent;
  color: #0f172a;
  border: 0;
  outline: none;
}

button {
  cursor: pointer;
  border: 0;
  background: transparent;
}

.hidden {
  display: none !important;
}

/* ── Shell (Soft Slate Canvas with Organic Subtle Radial Glows) ─ */

.shell {
  height: 100vh;
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 20% 15%, rgba(186, 230, 253, 0.6) 0%, transparent 45%),
    radial-gradient(circle at 80% 25%, rgba(224, 231, 255, 0.65) 0%, transparent 45%),
    radial-gradient(circle at 75% 75%, rgba(199, 210, 254, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 25% 85%, rgba(219, 234, 254, 0.5) 0%, transparent 45%),
    linear-gradient(135deg, #e4ecf7 0%, #edf2f7 50%, #dfe7f1 100%);
}

/* ── Auth Screen Layout ─────────────────────────────────────── */

.auth-layout {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  padding: 40px 8vw;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  justify-content: center;
  gap: 6vw;
  background: transparent;
  overflow-y: auto;
  overflow-x: hidden;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-ambient-orb-1,
.auth-ambient-orb-2 {
  display: none;
}

.brand-panel {
  position: relative;
  z-index: 2;
  padding: 20px 0;
  animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.brand-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-top: 1px solid #ffffff;
  border-radius: 999px;
  color: #475569;
  font: 700 11px/1 "DM Mono", monospace;
  letter-spacing: 1.5px;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05), inset 0 1px 1px #ffffff;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.brand-badge-pill .badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0ea5e9;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.5);
  animation: livePulse 2s infinite;
}

.brand-panel h1 {
  max-width: 600px;
  margin: 0 0 16px;
  font-size: clamp(38px, 4.5vw, 58px);
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: #0f172a;
  font-weight: 800;
}

.brand-panel p {
  max-width: 460px;
  color: #475569;
  line-height: 1.7;
  font-size: 16px;
  margin: 0 0 28px;
}

.brand-feature-card {
  position: relative;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-top: 1px solid #ffffff;
  border-radius: 30px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.06), inset 0 1px 2px #ffffff;
  animation: floatBrandCard 5s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.09), inset 0 1px 2px #ffffff;
}

@keyframes floatBrandCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.bfc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bfc-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bfc-user strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
}

.bfc-user small {
  font-size: 11.5px;
  color: #64748b;
}

.bfc-tag {
  font: 700 9.5px "DM Mono", monospace;
  letter-spacing: 1px;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 12px;
  border-radius: 999px;
}

.bfc-preview-msg {
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  background: rgba(255, 255, 255, 0.25);
  padding: 14px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  margin-bottom: 14px;
  font-style: italic;
}

.bfc-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

/* ── EXACT WHITE FROSTED GLASS AUTH CARD FROM SCREENSHOT ────── */

.auth-card {
  position: relative;
  z-index: 2;
  max-width: 440px;
  width: 100%;
  margin: auto;
  padding: 44px 38px 38px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(40px) saturate(190%);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  border-left: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 36px;
  box-shadow: 0 35px 80px rgba(15, 23, 42, 0.08), 0 12px 30px rgba(15, 23, 42, 0.04), inset 0 1px 2px #ffffff;
  animation: cardCrossFade 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.auth-card:hover {
  box-shadow: 0 40px 90px rgba(15, 23, 42, 0.1), inset 0 1px 2px #ffffff;
}

.card-kicker {
  color: #94a3b8;
  font: 800 10.5px "DM Mono", monospace;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 4px 0 8px;
  font-size: 29px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.8px;
}

.auth-card .muted {
  color: #64748b;
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 7px;
}

.form-label .label-hint {
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 400;
}

/* Inset Soft White Input */
.form-input {
  width: 100%;
  padding: 13px 18px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.form-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06), inset 0 1px 3px rgba(0, 0, 0, 0.02);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: #94a3b8;
}

.input-with-action {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.input-with-action .form-input {
  flex: 1;
}

/* Frosted White Action Pill (Send OTP Button) */
.button-action {
  padding: 0 20px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-top: 1px solid #ffffff;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05), inset 0 1px 1px #ffffff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button-action:hover:not(:disabled) {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.button-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-actions {
  margin-top: 26px;
}

/* Charcoal Pill Primary Button (Exact Match to Screenshot) */
.button-primary {
  width: 100%;
  padding: 14px 24px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 999px;
  color: #ffffff;
  background: #2d3748;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.button-primary:hover {
  background: #1a202c;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.3);
}

.button-primary:active {
  transform: translateY(0) scale(0.98);
}

.status-msg {
  margin: 14px 0;
  padding: 12px 16px;
  font-size: 12.5px;
  border-radius: 16px;
  line-height: 1.5;
  animation: statusPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.status-success {
  color: #0369a1;
  background: rgba(224, 242, 254, 0.85);
  border: 1px solid #bae6fd;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.08);
}

.error {
  margin: 14px 0 0;
  padding: 12px 16px;
  color: #b91c1c;
  font-size: 12.5px;
  border-radius: 16px;
  background: rgba(254, 242, 242, 0.85);
  border: 1px solid #fecaca;
  line-height: 1.45;
  animation: statusPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.error:empty {
  display: none;
}

.auth-switch {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
}

.link-button {
  background: transparent;
  border: 0;
  padding: 0;
  color: #0284c7;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.link-button:hover {
  color: #0369a1;
  transform: translateY(-1px);
}

/* ── App Layout (Translucent Frosted White Workspace) ───────── */

.app-layout {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 360px 1fr;
  background: transparent;
}

/* Frosted White Glass Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 20px 16px 16px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, 0.85);
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100%;
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.wordmark {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #0f172a;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: #2d3748;
  border-radius: 12px;
  font: 800 14px "DM Mono", monospace;
  animation: logoPop 0.6s ease both;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.wordmark:hover .logo {
  transform: rotate(-8deg) scale(1.1);
}

.brand-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #475569;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  font-size: 15px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.icon-button:hover {
  color: #0f172a;
  background: #ffffff;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.sidebar-heading .eyebrow {
  color: #64748b;
  font: 700 11px "DM Mono", monospace;
  letter-spacing: 1.5px;
}

.online-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  animation: livePulse 1.8s ease-in-out infinite;
}

/* Frosted White Glass Capsule Search */
.search {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0 16px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.search:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.search:focus-within {
  background: #ffffff;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.05);
}

.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.search:focus-within .search-icon {
  color: #0f172a;
  transform: scale(1.1);
}

.search input {
  flex: 1;
  width: 100%;
  margin: 0;
  padding: 12px 0;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #0f172a !important;
  font-size: 13.5px;
  font-family: inherit;
}

.search input::placeholder {
  color: #94a3b8;
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  margin: 4px 0;
}

.user-row {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  text-align: left;
  color: #0f172a;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 18px;
  cursor: pointer;
  opacity: 0;
  animation: slideInLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-row:nth-child(1) { animation-delay: 0.03s; }
.user-row:nth-child(2) { animation-delay: 0.06s; }
.user-row:nth-child(3) { animation-delay: 0.09s; }
.user-row:nth-child(4) { animation-delay: 0.12s; }
.user-row:nth-child(5) { animation-delay: 0.15s; }
.user-row:nth-child(n+6) { animation-delay: 0.18s; }

.user-row:hover {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(255, 255, 255, 0.95);
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.user-row.active {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 1);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.user-row.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 4px;
  background: #2d3748;
  border-radius: 0 4px 4px 0;
}

.user-row .avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2d3748;
  color: #ffffff;
  font-weight: 800;
  font-size: 13.5px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease;
}

.user-row:hover .avatar {
  transform: scale(1.06);
}

.user-row strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.user-row small {
  color: #64748b;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.empty {
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.6;
  padding: 16px;
  text-align: center;
}

/* Frosted White Glass Profile Card */
.tutor-card {
  position: relative;
  flex-shrink: 0;
  margin-top: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-top: 1px solid #ffffff;
  border-radius: 26px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05), inset 0 1px 1px #ffffff;
  animation: floatCard 6s ease-in-out infinite;
  transition: all 0.25s ease;
}

.tutor-card:hover {
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.tutor-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tutor-card .eyebrow {
  color: #64748b;
  font: 700 10px "DM Mono", monospace;
  letter-spacing: 1.2px;
}

.online-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tutor-body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 12px;
}

.tutor-avatar-badge {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: #2d3748;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.tutor-details {
  min-width: 0;
  flex: 1;
}

.tutor-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #94a3b8;
}

.tutor-name {
  margin: 1px 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.2;
  color: #0f172a;
  text-transform: capitalize;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tutor-email {
  margin: 0;
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tutor-card-footer {
  padding-top: 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.7);
}

.badge-status {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

/* ── Conversation Stage ─────────────────────────────────────── */

.conversation {
  position: relative;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

.conversation-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  width: 90%;
  max-width: 580px;
  text-align: center;
  animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
  z-index: 2;
}

.empty-ambient-glow {
  display: none;
}

/* Frosted White Glass Empty Card */
.empty-card {
  position: relative;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(40px) saturate(190%);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  border-left: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 36px;
  padding: 44px 38px 38px;
  box-shadow: 0 35px 80px rgba(15, 23, 42, 0.08), inset 0 1px 2px #ffffff;
}

.empty-hero-orb {
  position: relative;
  width: 78px;
  height: 78px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ffffff;
  border-radius: 26px;
  color: #0f172a;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08), inset 0 1px 2px #ffffff;
  animation: heroFloat 4s ease-in-out infinite;
}

.orb-sparkle {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 18px;
  color: #f59e0b;
  animation: spark 3s ease-in-out infinite;
}

.empty-badge {
  display: inline-block;
  font: 700 11px/1 "DM Mono", monospace;
  letter-spacing: 1.6px;
  color: #475569;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.95);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.empty-card h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #0f172a;
  margin: 0 0 12px;
}

.empty-card p {
  color: #64748b;
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0 auto 28px;
  max-width: 440px;
}

/* ── 4 Frosted White Glass Action Containers (2x2 Grid) ─────── */

.empty-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}

.empty-feature-item {
  position: relative;
  padding: 22px 24px;
  min-height: 130px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-top: 1px solid #ffffff;
  border-radius: 28px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05), inset 0 1px 2px #ffffff;
}

.empty-feature-item:hover {
  background: #ffffff;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.09), inset 0 1px 2px #ffffff;
}

.empty-feature-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.empty-feature-top .feat-icon {
  font-size: 22px;
}

.empty-feature-top strong {
  font-size: 16.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.empty-feature-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

.empty-feature-bottom span {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.empty-feature-bottom .feat-arrow {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  transition: transform 0.2s ease;
}

.empty-feature-item:hover .feat-arrow {
  transform: translate(3px, -3px);
}

.empty-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px dashed #cbd5e1;
  border-radius: 999px;
  font-size: 12px;
  color: #475569;
}

.full-height {
  height: 100%;
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Frosted White Glass Header */
.conversation-header {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  min-height: 72px;
  height: auto;
  padding: 14px 28px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.conversation-person-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.person-avatar-wrap {
  position: relative;
}

.conversation-header .person-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2d3748;
  color: #ffffff;
  font: 700 14px "DM Mono", monospace;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  display: grid;
  place-items: center;
}

.status-pulse-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  animation: livePulse 2s infinite;
}

.conversation-meta {
  flex: 1;
  min-width: 0;
}

.conversation-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-transform: capitalize;
}

.connection-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: livePulse 1.8s infinite;
}

.conversation-header p {
  margin: 0;
  color: #64748b;
  font: 600 11px "DM Mono", monospace;
  letter-spacing: 0.2px;
}

.conversation-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Frosted White Glass Call Buttons ──────────────────────── */

.call-btn {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  border-top: 1px solid #ffffff !important;
  color: #1e293b !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05), inset 0 1px 1px #ffffff;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.call-btn:hover {
  background: #ffffff !important;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.call-btn svg {
  transition: transform 0.25s ease;
}

.call-btn:hover svg {
  transform: scale(1.15);
}

.video-call-btn svg {
  animation: iconWiggle 4s ease-in-out infinite;
}

@keyframes iconWiggle {
  0%, 90%, 100% { transform: scale(1); }
  93% { transform: scale(1.18) rotate(6deg); }
  96% { transform: scale(1.18) rotate(-6deg); }
}

.call-btn.in-call,
.chat-call-btn.in-call {
  color: #ffffff !important;
  background: #ef4444 !important;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
}

/* ── Messages & Frosted White Glass Bubbles ─────────────────── */

.messages {
  flex: 1;
  min-height: 0;
  padding: 24px 32px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.message {
  max-width: min(580px, 82%);
  align-self: flex-start;
  animation: messageSpring 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.message.mine {
  align-self: flex-end;
}

.bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.mine .bubble-row {
  justify-content: flex-end;
}

.person-avatar.mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.95);
  font: 700 11px "DM Mono", monospace;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

/* Incoming message: Clean iOS Frosted Glass Speech Bubble */
.bubble {
  position: relative;
  display: inline-block;
  padding: 12px 18px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-top: 1px solid #ffffff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.45;
  border-radius: 20px 20px 20px 6px;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04), inset 0 1px 1px #ffffff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bubble:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

/* Outgoing message: Clean iOS Dark Slate Glass Speech Bubble */
.mine .bubble {
  color: #ffffff;
  background: rgba(45, 55, 72, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px 20px 6px 20px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.45;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.mine .bubble:hover {
  background: rgba(45, 55, 72, 0.9);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
}

.message time {
  display: block;
  margin-top: 5px;
  padding: 0 4px;
  color: #64748b;
  font: 600 11px "DM Mono", monospace;
  letter-spacing: 0.3px;
}

.mine time {
  text-align: right;
  color: #94a3b8;
}

.delivered-tick {
  font-size: 10px;
  margin-left: 4px;
  color: #0284c7;
  letter-spacing: -2px;
}

.mine .delivered-tick {
  color: #ffffff;
  opacity: 0.9;
  font-weight: bold;
}

/* ── Floating Frosted White Glass Composer ──────────────────── */

.composer {
  margin: 10px 28px 22px;
  padding: 6px 8px 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-top: 1px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08), inset 0 1px 2px #ffffff;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: composerIn 0.4s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.composer:focus-within {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12), 0 0 0 3px rgba(15, 23, 42, 0.05);
  transform: translateY(-2px);
}

.composer-actions-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.emoji-toggle-btn,
.chat-voice-btn,
.chat-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.95);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.emoji-toggle-btn {
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.emoji-toggle-btn:hover,
.chat-voice-btn:hover,
.chat-call-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-1px) scale(1.08);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.chat-voice-btn:hover,
.chat-call-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-1px) scale(1.08);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.chat-voice-btn svg,
.chat-call-btn svg {
  transition: transform 0.2s ease;
}

.chat-voice-btn:hover svg,
.chat-call-btn:hover svg {
  transform: scale(1.15);
}

.emoji-picker-panel {
  position: absolute;
  right: 24px;
  bottom: 72px;
  z-index: 30;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.25);
  padding: 10px;
  width: min(320px, calc(100vw - 40px));
}

.emoji-picker-panel.hidden {
  display: none;
}

emoji-picker {
  width: 100%;
  height: 360px;
  --background: rgba(15, 23, 42, 0.94);
  --border-color: rgba(148, 163, 184, 0.22);
  --button-hover-background: rgba(148, 163, 184, 0.12);
  --button-active-background: rgba(96, 165, 250, 0.18);
  --text-color: #f8fafc;
}

.composer {
  position: relative;
}

.composer input {
  flex: 1;
  min-width: 0;
  margin: 0;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #0f172a !important;
  padding: 10px 12px;
  font-size: 14.5px;
  font-family: inherit;
}

.composer input::placeholder {
  color: #94a3b8;
}

.send-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: #2d3748;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.send-button:hover:not(:disabled) {
  transform: scale(1.1) translateY(-1px);
  background: #1a202c;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

.send-button:active:not(:disabled) {
  transform: scale(0.95);
}

.send-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.voice-global.recording,
.chat-voice-btn.recording {
  background: #ef4444 !important;
  color: #ffffff !important;
  animation: pulse 1.2s infinite;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 0 0 10px transparent; }
}

.voice-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(32px);
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
  z-index: 999;
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.3px;
  animation: toastIn 0.28s ease both;
}

/* ── Voice Assistant Modal (Frosted White Glass) ────────────── */

.vmodal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fade 0.2s ease both;
}

.vmodal-box {
  position: relative;
  width: 420px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-top: 1px solid #ffffff;
  box-shadow: 0 35px 90px rgba(15, 23, 42, 0.15), inset 0 1px 2px #ffffff;
  overflow: hidden;
  animation: popIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.vmodal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  color: #475569;
  transition: background 0.15s, transform 0.15s;
  z-index: 2;
}

.vmodal-close:hover {
  background: #ffffff;
  color: #0f172a;
  transform: rotate(90deg);
}

.vsteps-indicator {
  display: flex;
  align-items: center;
  padding: 24px 32px 0;
  gap: 0;
}

.vstep-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(241, 245, 249, 0.9);
  color: #64748b;
  font: 700 11px "DM Mono", monospace;
  flex-shrink: 0;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}

.vstep-dot.active {
  background: #2d3748;
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.vstep-dot.done {
  background: #10b981;
  color: #ffffff;
}

.vstep-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  transition: background 0.3s;
}

.vstep-line.active {
  background: #2d3748;
}

.vstep {
  padding: 24px 32px 32px;
  animation: fadeUp 0.28s ease both;
}

.vstep-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.vstep-hint {
  margin: 0 0 24px;
  font-size: 12.5px;
  color: #64748b;
}

.vstep-status {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: #64748b;
  min-height: 18px;
  text-align: center;
}

.vmic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.vmic-orb {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #2d3748;
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.vmic-orb:hover {
  transform: scale(1.08);
  background: #1a202c;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.25);
}

.vmic-orb.recording {
  background: #ef4444;
  color: #fff;
  animation: mic-pulse 1.2s infinite;
}

@keyframes mic-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70% { box-shadow: 0 0 0 20px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.vwaves {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  opacity: 0;
  transition: opacity 0.3s;
}

.vwaves.active {
  opacity: 1;
}

.vwaves span {
  display: block;
  width: 3.5px;
  border-radius: 3px;
  background: #2d3748;
  animation: wave 1s ease-in-out infinite;
}

.vwaves span:nth-child(1) { height: 8px; animation-delay: 0s; }
.vwaves span:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.vwaves span:nth-child(3) { height: 22px; animation-delay: 0.2s; }
.vwaves span:nth-child(4) { height: 16px; animation-delay: 0.3s; }
.vwaves span:nth-child(5) { height: 8px; animation-delay: 0.4s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

.vuser-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.vuser-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  color: #0f172a;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.vuser-row:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transform: translateX(4px);
}

.vuser-info {
  display: flex;
  flex-direction: column;
}

.vuser-info strong {
  font-size: 13.5px;
  color: #0f172a;
}

.vuser-info small {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

.vback-btn {
  font-size: 11.5px;
  color: #64748b;
  background: transparent;
  padding: 4px 0;
  text-decoration: underline;
}

.vback-btn:hover {
  color: #0f172a;
}

.vpreview-card {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 20px;
}

.vpreview-to {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.vpreview-to strong {
  color: #0f172a;
}

.vpreview-msg {
  font-size: 14px;
  color: #0f172a;
  line-height: 1.5;
  font-weight: 500;
}

.vmodal-actions {
  display: flex;
  gap: 10px;
}

.vbtn-confirm,
.vbtn-retry {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 16px;
  transition: transform 0.15s, background 0.15s;
}

.vbtn-confirm:hover,
.vbtn-retry:hover {
  transform: translateY(-1px);
}

.vbtn-confirm {
  background: #2d3748;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.vbtn-retry {
  background: rgba(255, 255, 255, 0.25);
  color: #475569;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* ── WebRTC Video Stage ────────────────────────────────────── */

.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  animation: fade 0.2s ease both;
}

.video-stage {
  position: relative;
  width: min(980px, 94vw);
  background: #0f172a;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  box-shadow: 0 35px 90px rgba(15, 23, 42, 0.4);
}

.video-stage video#remoteVideo {
  width: 100%;
  height: min(72vh, 580px);
  object-fit: cover;
  display: block;
  background: #090a0f;
}

.video-placeholder {
  position: absolute;
  inset: 0 0 76px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: #1e293b;
  color: #ffffff;
}

.video-placeholder.hidden {
  display: none;
}

.person-avatar.call-avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 12px;
  font-size: 24px;
  background: #334155;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
}

#callStatusText {
  margin: 0;
  font: 500 13.5px "DM Mono", monospace;
  letter-spacing: 0.4px;
  color: #ffffff;
}

.video-overlay-top {
  position: absolute;
  top: 18px;
  left: 20px;
  padding: 8px 16px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(16px);
}

.video-pip {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 172px;
  overflow: hidden;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: #090b10;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.video-pip video {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  transform: scaleX(-1);
}

.video-pip video.unmirrored {
  transform: none;
}

.video-pip span {
  display: block;
  padding: 5px 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  font-size: 10.5px;
  letter-spacing: 0.4px;
}

.video-controls {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 16px 20px;
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  background: #334155;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  transition: transform 0.15s, background 0.15s;
}

.vc-btn.active {
  color: #fff;
  background: #475569;
}

.vc-btn:hover {
  transform: translateY(-2px);
  background: #475569;
}

.vc-btn-end {
  background: #ef4444 !important;
  color: #fff !important;
}

.vc-btn-accept {
  background: #10b981 !important;
  color: #fff !important;
}

.vc-btn-reject {
  background: #ef4444 !important;
  color: #fff !important;
}

/* Incoming Call Prompt Modal */
.incoming-call {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  animation: fade 0.2s ease both;
}

.incoming-card {
  width: 360px;
  padding: 34px 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-top: 1px solid #ffffff;
  border-radius: 36px;
  box-shadow: 0 35px 90px rgba(15, 23, 42, 0.15), inset 0 1px 2px #ffffff;
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.incoming-label {
  margin: 0 0 16px;
  color: #64748b;
  font: 700 11px "DM Mono", monospace;
  letter-spacing: 1.5px;
}

.incoming-card h3 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #0f172a;
}

.incoming-hint {
  margin: 0 0 24px;
  color: #64748b;
  font-size: 13px;
}

.incoming-actions {
  display: flex;
  gap: 12px;
}

.incoming-actions .vc-btn {
  flex: 1;
  justify-content: center;
  padding: 13px;
}

/* ── Summary Email Recipient Selection Modal ───────────────── */

.summary-email-card {
  padding: 34px 30px 28px;
}

.summary-email-card h2 {
  margin: 4px 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.summary-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.summary-option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.summary-option-item:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.summary-option-item input[type="radio"] {
  margin-top: 3px;
  accent-color: #2d3748;
  cursor: pointer;
}

.summary-option-item .opt-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: left;
}

.summary-option-item strong {
  font-size: 14px;
  color: #0f172a;
}

.summary-option-item small {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* ── Keyframes ─────────────────────────────────────────────── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes cardCrossFade {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-animate {
  animation: cardCrossFade 0.36s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes messageSpring {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.008);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes livePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(14, 165, 233, 0);
    transform: scale(1.08);
  }
}

@keyframes heroFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1.5deg);
  }
}

@keyframes floatCard {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes spark {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.22) rotate(14deg);
  }
}

@keyframes logoPop {
  from {
    transform: scale(0.6) rotate(-12deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

@keyframes composerIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes statusPop {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Responsive Adaptations ────────────────────────────────── */

@media (max-width: 760px) {
  .shell {
    padding: 0;
  }

  .auth-layout {
    display: block;
    min-height: 100vh;
    padding: 24px 16px;
  }

  .brand-panel {
    padding: 12px 0 28px;
  }

  .brand-panel h1 {
    font-size: 40px;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .app-layout {
    height: 100vh;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    max-height: 42%;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  }

  .tutor-card {
    display: none;
  }

  .user-list {
    display: flex;
    overflow: auto;
  }

  .user-row {
    min-width: 180px;
  }

  .conversation {
    height: 58%;
  }

  .messages {
    padding: 16px;
  }

  .conversation-header {
    padding: 0 16px;
  }

  .composer {
    margin: 8px 12px 14px;
  }
}

@media (max-height: 720px) {
  .shell {
    padding: 0;
  }

  .app-layout {
    height: 100vh;
    min-height: 0;
  }

  .auth-layout {
    min-height: 100vh;
    padding: 24px 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   LiveKit SFU Group Call Styles
   ═══════════════════════════════════════════════════════════════════ */

/* Group Call button in the conversation header */
.group-call-btn {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15)) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
  color: #6366f1 !important;
}

.group-call-btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25)) !important;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2) !important;
}

.group-call-btn svg {
  stroke: #6366f1;
}

/* ── LiveKit Stage Header ──────────────────────────────────────── */

.lk-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lk-room-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lk-room-icon {
  font-size: 16px;
}

.lk-room-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.3px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lk-participant-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.lk-call-timer {
  font: 500 13px "DM Mono", monospace;
  color: #94a3b8;
  letter-spacing: 1px;
}

/* ── LiveKit Video Grid ────────────────────────────────────────── */

.video-stage {
  position: relative;
  width: min(1100px, 96vw);
  background: #0d1117;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(15, 23, 42, 0.5);
  display: flex;
  flex-direction: column;
  max-height: 94vh;
}

.lk-video-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 6px;
  padding: 12px;
  background: #090b10;
  overflow: hidden;
}

/* 1 participant */
.lk-video-grid[data-count="1"] {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

/* 2 participants */
.lk-video-grid[data-count="2"] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
}

/* 3 participants */
.lk-video-grid[data-count="3"] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.lk-video-grid[data-count="3"] .lk-tile:first-child {
  grid-column: 1 / -1;
}

/* 4 participants */
.lk-video-grid[data-count="4"] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

/* 5-6 participants */
.lk-video-grid[data-count="5"],
.lk-video-grid[data-count="6"] {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr;
}

/* 7+ participants */
.lk-video-grid[data-count="many"] {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(auto-fill, 1fr);
}

/* Empty grid placeholder */
.lk-video-grid:empty::before {
  content: "Waiting for participants to join…";
  grid-column: 1;
  display: grid;
  place-content: center;
  min-height: 340px;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
}

/* ── Participant Tile ──────────────────────────────────────────── */

.lk-tile {
  position: relative;
  background: #12181f;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lk-tile.speaking {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25), inset 0 0 30px rgba(16, 185, 129, 0.07);
}

.lk-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scaleX(-1);
}

.lk-tile video.unmirrored {
  transform: none;
}

.lk-tile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  user-select: none;
  flex-shrink: 0;
}

.lk-tile-label {
  position: absolute;
  bottom: 10px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
}

.lk-tile-muted {
  color: #ef4444;
  font-size: 12px;
}

.lk-tile-screen-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 3px 9px;
  background: rgba(99, 102, 241, 0.85);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
}

/* ── Self PiP ──────────────────────────────────────────────────── */

.lk-self-pip {
  position: absolute;
  top: 70px;
  right: 16px;
  width: 160px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: #0d1117;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  z-index: 20;
  transition: opacity 0.2s;
}

.lk-self-pip video {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
  transform: scaleX(-1);
}

.lk-pip-label {
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.75);
  font-size: 10.5px;
  font-weight: 600;
  color: #f1f5f9;
  text-align: center;
  letter-spacing: 0.3px;
}

.lk-pip-avatar {
  width: 100%;
  height: 110px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #a5b4fc;
}

.lk-pip-avatar.hidden {
  display: none;
}

/* ── Controls bar ──────────────────────────────────────────────── */

.lk-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#screenShareBtn.sharing {
  background: #6366f1 !important;
  color: #fff !important;
  border-color: #6366f1 !important;
}

/* ── Group Call Setup Modal ────────────────────────────────────── */

.group-call-setup-card {
  width: 480px;
  max-width: 96vw;
}

.group-call-user-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gc-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.gc-user-item:hover {
  background: rgba(99, 102, 241, 0.07);
}

.gc-user-item.selected {
  background: rgba(99, 102, 241, 0.12);
  outline: 1px solid rgba(99, 102, 241, 0.3);
}

.gc-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gc-user-name {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
}

.gc-user-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #6366f1;
  transition: background 0.15s, border-color 0.15s;
}

.gc-user-item.selected .gc-user-check {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}

/* Action Popover Menu */
.action-popover-menu {
  position: absolute;
  width: 230px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.06);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: popIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.action-popover-menu.hidden {
  display: none !important;
}

.popover-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}

.popover-item:hover {
  background: rgba(2, 132, 199, 0.09);
  transform: translateX(2px);
}

.popover-item.danger:hover {
  background: rgba(239, 68, 68, 0.09);
}

.popover-item .item-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  font-size: 15px;
  flex-shrink: 0;
}

.popover-item.danger .item-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.popover-item strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.popover-item small {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

/* WhatsApp-style Create Group Modal */
.group-create-card {
  width: 440px;
  max-width: 92vw;
  padding: 28px 24px;
}

.group-badge {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.group-msg-sender {
  font-size: 11.5px;
  font-weight: 700;
  color: #0284c7;
  margin-bottom: 3px;
  display: block;
}

.group-avatar-icon {
  background: linear-gradient(135deg, #0284c7, #6366f1) !important;
  color: #fff !important;
}
/* Group Summary Styles */
.gs-section {
    margin-bottom: 12px;
}
.gs-section-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-text);
}
.gs-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-muted);
}
.gs-list {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-muted);
}
.gs-actions li {
    font-weight: 500;
}
.gs-transcript {
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    background: var(--color-bg);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
}
.gs-details {
    margin-top: 10px;
}
.gs-details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-primary);
}

/* ── WhatsApp-style End-to-End Encryption (E2EE) Badges & Banners ── */

.e2ee-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.28);
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.3px;
    user-select: none;
}

.e2ee-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 460px;
    margin: 12px auto 8px;
    padding: 8px 16px;
    background: rgba(254, 249, 231, 0.9);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 12px;
    color: #854d0e;
    font-size: 11.5px;
    font-weight: 500;
    text-align: center;
    line-height: 1.45;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(8px);
    user-select: none;
    align-self: center;
}

.e2ee-banner-icon {
    font-size: 13px;
    flex-shrink: 0;
}

