/* PULSE CALL - Ultra Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --bg-main: #07090e;
  --bg-secondary: #0d111d;
  --bg-card: rgba(15, 20, 32, 0.78);
  --bg-card-hover: rgba(22, 29, 46, 0.9);
  --bg-floating: rgba(13, 17, 29, 0.94);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.55);
  --border-glow: rgba(139, 92, 246, 0.35);

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-pink-glow: rgba(236, 72, 153, 0.35);

  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.35);
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.4);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Elevation */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Glow */
.bg-ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--primary) 0%, rgba(99, 102, 241, 0) 70%);
  top: -80px;
  left: -80px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-purple) 0%, rgba(139, 92, 246, 0) 70%);
  bottom: -100px;
  right: -80px;
  animation-duration: 25s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, rgba(6, 182, 212, 0) 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.18;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.06); }
  100% { transform: translate(-20px, 30px) scale(0.96); }
}

/* Base Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

/* ============================================================
   AUTH SECTION (Login, Register & Guest Join)
   ============================================================ */
.auth-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.auth-container {
  width: 100%;
  max-width: 480px;
}

.brand-header {
  text-align: center;
  margin-bottom: 22px;
}

.brand-logo-glow {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 28px var(--primary-glow);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 3px;
}

.auth-card {
  padding: 28px 22px;
  max-height: 90dvh;
  overflow-y: auto;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  background: rgba(13, 17, 29, 0.85);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.auth-tab-btn {
  padding: 9px 6px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.auth-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.input-group {
  margin-bottom: 14px;
}

.input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field-wrapper svg {
  position: absolute;
  left: 14px;
  color: var(--text-subtle);
  pointer-events: none;
}

.custom-input, .custom-select {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(13, 17, 29, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: all var(--transition-fast);
}

.custom-select {
  appearance: none;
  padding-right: 32px;
  cursor: pointer;
}

.custom-input:focus, .custom-select:focus {
  border-color: var(--border-focus);
  background: rgba(13, 17, 29, 0.98);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Female Listener Call Preference Selector */
.preference-selection-box {
  background: rgba(236, 72, 153, 0.08);
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.preference-title {
  font-size: 11px;
  font-weight: 700;
  color: #f472b6;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.preference-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.preference-option-btn {
  padding: 7px 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.preference-option-btn.active {
  background: var(--accent-pink);
  color: #ffffff;
  border-color: var(--accent-pink);
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--primary-glow);
}

.btn-block {
  width: 100%;
}

.demo-accounts-box {
  margin-top: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-subtle);
  border-radius: 14px;
}

.demo-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-subtle);
  font-weight: 700;
  margin-bottom: 8px;
}

.demo-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
  gap: 6px;
}

.demo-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.demo-chip:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--border-focus);
}

.chip-avatar-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
}

.chip-aarav { background: linear-gradient(135deg, #6366f1, #a855f7); }
.chip-priya { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.chip-rohan { background: linear-gradient(135deg, #10b981, #06b6d4); }
.chip-ananya { background: linear-gradient(135deg, #8b5cf6, #ec4899); }

/* ============================================================
   MAIN APP HEADER & NAVIGATION (SLEEK & MOBILE-FIRST)
   ============================================================ */
.app-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 18, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header-logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--primary-glow);
  flex-shrink: 0;
}

.header-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header-app-name {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
  background: linear-gradient(135deg, #ffffff 40%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-sub-tag {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-device-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  color: #c7d2fe;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-device-pill:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-device-pill.perm-all-allowed {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.device-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
}

.btn-device-pill.perm-all-allowed .device-status-dot {
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
}

.header-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 3px 12px 3px 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-user-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.header-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.header-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(99, 102, 241, 0.6);
}

.header-avatar-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  border: 1.5px solid #070a12;
  box-shadow: 0 0 6px var(--success-glow);
}

.header-user-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.header-name-text {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-role-text {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-header-icon:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
}

/* ============================================================
   DASHBOARD CONTROLS & TABS
   ============================================================ */
.app-content {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
}

.dashboard-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-nav {
  display: flex;
  gap: 6px;
  background: rgba(13, 17, 29, 0.75);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.tab-badge {
  font-size: 10px;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

.search-box {
  position: relative;
  min-width: 220px;
  flex-grow: 1;
  max-width: 360px;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  background: rgba(13, 17, 29, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 12px;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--border-focus);
  background: rgba(13, 17, 29, 0.95);
}

/* ============================================================
   ULTRA-PREMIUM REDESIGNED USER CARDS
   ============================================================ */
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}

.user-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(150deg, rgba(17, 24, 39, 0.75) 0%, rgba(11, 15, 26, 0.9) 100%);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.user-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background var(--transition-normal);
}

.user-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.user-card:hover::before {
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
}

.user-card-self {
  border-color: rgba(99, 102, 241, 0.35);
  background: linear-gradient(150deg, rgba(23, 29, 50, 0.8) 0%, rgba(13, 17, 30, 0.92) 100%);
}

.user-card-self::before {
  background: linear-gradient(90deg, var(--primary), var(--accent-purple));
}

.user-card-listener {
  border-color: rgba(236, 72, 153, 0.2);
}

.user-card-listener:hover::before {
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple));
}

.user-card-busy {
  border-color: rgba(239, 68, 68, 0.25);
  opacity: 0.9;
}

/* User Card Top Row */
.uc-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.uc-avatar-wrap {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.uc-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  background: #111625;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  object-fit: cover;
}

.uc-avatar-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #0b0f1a;
}

.uc-avatar-status.status-online {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
}

.uc-avatar-status.status-busy {
  background-color: var(--danger);
  box-shadow: 0 0 8px var(--danger-glow);
}

.uc-avatar-status.status-offline {
  background-color: var(--text-subtle);
}

.uc-info-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.uc-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.uc-name-title {
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.uc-pill-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: 8px;
  line-height: 1.2;
}

.uc-pill-self {
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.uc-pill-listener {
  background: rgba(236, 72, 153, 0.18);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
}

.uc-pill-caller {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.uc-tags-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.uc-tag-item {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.uc-status-box {
  flex-shrink: 0;
}

.uc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.2px;
}

.uc-status-pill.status-online {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.uc-status-pill.status-busy {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.uc-status-pill.status-offline {
  background: rgba(100, 116, 139, 0.14);
  color: var(--text-subtle);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.uc-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.uc-status-pill.status-online .uc-status-dot {
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* User Card Bio Box */
.uc-bio-box {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.uc-bio-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Calling mode hint badge */
.uc-mode-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 8px;
  width: fit-content;
}

.mode-audio-hint {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.mode-video-hint {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.25);
}

/* Action Buttons Row */
.uc-actions-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.uc-btn-self {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.uc-btn-self:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.uc-btn-busy {
  width: 100%;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  border: 1px dashed rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: not-allowed;
}

.uc-btn-audio {
  flex: 1;
  padding: 10px 12px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.32);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.uc-btn-audio:hover {
  background: var(--accent-cyan);
  color: #000000;
  box-shadow: 0 0 16px var(--accent-cyan-glow);
  transform: translateY(-1px);
}

.uc-btn-video {
  flex: 1;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
  color: #ffffff;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all var(--transition-fast);
}

.uc-btn-video:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.uc-btn-audio-solo {
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.9) 0%, rgba(59, 130, 246, 0.9) 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-cyan-glow);
  transition: all var(--transition-fast);
}

.uc-btn-audio-solo:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.5);
}

.uc-btn-video-solo {
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-pink-glow);
  transition: all var(--transition-fast);
}

.uc-btn-video-solo:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(236, 72, 153, 0.5);
}

.uc-btn-offline {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.uc-btn-offline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

/* Call History */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.history-name {
  font-size: 14px;
  font-weight: 700;
}

.history-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.history-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-time {
  font-size: 11px;
  color: var(--text-subtle);
}

.text-green { color: var(--success); }
.text-yellow { color: var(--warning); }
.text-red { color: var(--danger); }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 50px 16px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 4px;
}

/* ============================================================
   CALL OVERLAYS & MODALS
   ============================================================ */
.call-modal-backdrop, .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 7, 12, 0.88);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.call-modal-card {
  width: 100%;
  max-width: 380px;
  max-height: 92dvh;
  overflow-y: auto;
  text-align: center;
  padding: 30px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pulse-rings-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  animation: rippleRing 2.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.ring-2 { animation-delay: 0.7s; border-color: var(--accent-cyan); }
.ring-3 { animation-delay: 1.4s; border-color: var(--accent-purple); }

@keyframes rippleRing {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.1); opacity: 0; }
}

.modal-avatar-lg {
  position: relative;
  z-index: 2;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 3px solid #ffffff;
  box-shadow: 0 0 25px var(--primary-glow);
}

.modal-caller-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-call-status {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.modal-actions-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  flex-shrink: 0;
}

.btn-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-spring);
}

.btn-circle svg {
  width: 24px;
  height: 24px;
}

.btn-call-accept {
  background: var(--success);
  color: #ffffff;
  box-shadow: 0 0 25px var(--success-glow);
  animation: pulseAccept 1.5s infinite;
}

@keyframes pulseAccept {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.btn-call-reject {
  background: var(--danger);
  color: #ffffff;
  box-shadow: 0 0 25px var(--danger-glow);
}

/* ============================================================
   ACTIVE IN-CALL SCREEN
   ============================================================ */
.active-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #07090e;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.active-call-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.9) 0%, rgba(7, 9, 14, 0) 100%);
}

.peer-badge-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.active-peer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
}

.active-peer-details h3 {
  font-size: 14px;
  font-weight: 700;
}

.call-timer {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--accent-cyan);
  font-weight: 600;
}

.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.dot-green { background: var(--success); box-shadow: 0 0 6px var(--success); }
.dot-yellow { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.dot-red { background: var(--danger); box-shadow: 0 0 6px var(--danger); }

.active-call-viewport {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #080b12;
}

.remote-video-elem {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.audio-visualizer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.audio-remote-avatar-glow {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: 0 0 35px var(--primary-glow);
}

.audio-waveform-bars {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 48px;
}

.waveform-bar {
  width: 5px;
  height: 6px;
  background: linear-gradient(180deg, var(--accent-cyan) 0%, var(--primary) 100%);
  border-radius: 4px;
  transition: height 0.08s ease;
}

.local-pip-container {
  position: absolute;
  bottom: 95px;
  right: 18px;
  width: 130px;
  height: 90px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-lg);
  background: #0a0d14;
  z-index: 30;
}

.local-video-elem {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.local-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #141a29;
  color: var(--text-muted);
  font-size: 11px;
}

.active-call-dock {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--bg-floating);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.dock-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dock-btn svg {
  width: 18px;
  height: 18px;
}

.btn-control-danger {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.5);
}

.btn-control-active {
  background: rgba(99, 102, 241, 0.3);
  color: var(--accent-cyan);
  border-color: var(--border-focus);
}

.dock-btn-hangup {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--danger);
  color: #ffffff;
  border: none;
  box-shadow: 0 0 20px var(--danger-glow);
}

.profile-modal-card, .permission-modal-card {
  width: 100%;
  max-width: 460px;
  max-height: 92dvh;
  overflow-y: auto;
  padding: 24px 20px;
}

.permission-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 18px;
  border-color: rgba(99, 102, 241, 0.35);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  gap: 10px;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.banner-icon-pulse {
  font-size: 20px;
  background: rgba(255, 255, 255, 0.06);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.banner-info h4 { font-size: 13px; font-weight: 700; }
.banner-info p { font-size: 11px; color: var(--text-muted); }

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-card {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(13, 17, 29, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
}

.toast-success { border-color: rgba(16, 185, 129, 0.4); }
.toast-warning { border-color: rgba(245, 158, 11, 0.5); }
.toast-error { border-color: rgba(239, 68, 68, 0.5); }
.toast-info { border-color: rgba(99, 102, 241, 0.4); }

.animate-modal-pop {
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}

.animate-toast-in {
  animation: toastIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastIn {
  0% { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.animate-toast-out {
  animation: toastOut 0.25s ease-in forwards;
}

@keyframes toastOut {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES (MOBILE <= 768px)
   ============================================================ */
@media (max-width: 768px) {
  .app-header {
    padding: 8px 12px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
  .header-left {
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
  }
  .header-logo-badge {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .header-app-name {
    font-size: 14.5px;
    letter-spacing: -0.2px;
  }
  .hide-on-mobile {
    display: none !important;
  }
  .header-right {
    gap: 6px;
    flex-shrink: 0;
  }
  .btn-device-pill {
    padding: 0 8px;
    height: 32px;
    gap: 4px;
    font-size: 11px;
  }
  .header-user-btn {
    padding: 2px;
    height: 32px;
    width: 32px;
    justify-content: center;
    border-radius: 50%;
  }
  .header-avatar-wrap {
    width: 26px;
    height: 26px;
  }
  .btn-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .app-content {
    padding: 10px 10px 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .dashboard-control-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
  }
  .tab-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 4px;
    padding: 3px;
    box-sizing: border-box;
  }
  .tab-btn {
    padding: 7px 4px;
    font-size: 11px;
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
    gap: 4px;
  }
  .search-box {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .search-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 11.5px;
  }
  .user-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }
  .user-card {
    padding: 12px 14px;
    border-radius: 16px;
    gap: 9px;
    width: 100%;
    box-sizing: border-box;
  }
  .uc-header-row {
    gap: 8px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .uc-avatar-wrap {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
  .uc-avatar-img {
    border-radius: 12px;
  }
  .uc-info-col {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .uc-name-row {
    gap: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  .uc-name-title {
    font-size: 14px;
    max-width: 100px;
  }
  .uc-pill-tag {
    font-size: 9.5px;
    padding: 1px 5px;
  }
  .uc-tags-row {
    gap: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  .uc-tag-item {
    font-size: 10.5px;
  }
  .uc-status-box {
    flex-shrink: 0;
  }
  .uc-status-pill {
    padding: 2.5px 6px;
    font-size: 9.5px;
  }
  .uc-bio-box {
    padding: 6px 10px;
  }
  .uc-bio-text {
    font-size: 11px;
  }
  .uc-mode-hint {
    font-size: 10px;
    padding: 2.5px 7px;
  }
  .uc-actions-row {
    display: flex;
    gap: 6px;
    width: 100%;
  }
  .uc-btn-audio, .uc-btn-video {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 6px;
    font-size: 11px;
    white-space: nowrap;
    justify-content: center;
  }
  .uc-btn-audio-solo, .uc-btn-video-solo, .uc-btn-self, .uc-btn-busy, .uc-btn-offline {
    width: 100%;
    padding: 8px 10px;
    font-size: 11px;
    justify-content: center;
  }

  .permission-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .call-modal-backdrop, .modal-backdrop {
    padding: 12px;
  }
  .call-modal-card {
    padding: 22px 16px;
    max-width: 95vw;
  }
  .pulse-rings-wrapper {
    width: 76px;
    height: 76px;
    margin-bottom: 12px;
  }
  .modal-avatar-lg {
    width: 64px;
    height: 64px;
  }
  .modal-caller-name {
    font-size: 18px;
  }
  .modal-call-status {
    margin-bottom: 16px;
    font-size: 12px;
  }
  .modal-actions-row {
    gap: 16px;
  }
  .btn-circle {
    width: 50px;
    height: 50px;
  }

  .local-pip-container {
    width: 105px;
    height: 72px;
    bottom: 82px;
    right: 12px;
  }
  .active-call-dock {
    bottom: 12px;
    padding: 6px 12px;
    gap: 8px;
    width: calc(100% - 24px);
    max-width: 320px;
    justify-content: space-around;
  }
  .dock-btn {
    width: 40px;
    height: 40px;
  }
  .dock-btn-hangup {
    width: 46px;
    height: 46px;
  }
  .perm-device-grid {
    grid-template-columns: 1fr;
  }
}
