/* AURA GROUP - KNOCK (knock.at)
 * Native Mobile Web Dialer - Ultra-Glossy Crystal Glass Stylesheet
 * 100% Pink-Free & Anti-Glare: Hyper-Polished Liquid Glass, Refractive Specular Sheens & Smooth Slate Grey Typography
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

html, body {
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Lock viewport to phone frame */
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

:root {
  /* Default Dark Mode Custom Properties */
  --bg-body: #04060a;
  --bg-gradient-1: rgba(2, 132, 199, 0.18);
  --bg-gradient-2: rgba(6, 182, 212, 0.12);
  --bg-gradient-3: rgba(14, 165, 233, 0.06);
  
  --color-text-primary: #ffffff;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  
  --bg-container: rgba(15, 23, 42, 0.4);
  --border-container: rgba(255, 255, 255, 0.06);
  --border-divider: rgba(255, 255, 255, 0.05);
  
  --bg-row-hover: rgba(255, 255, 255, 0.04);
  --bg-row-expanded: rgba(255, 255, 255, 0.02);
  --bg-drawer: rgba(0, 0, 0, 0.35);
  
  --bg-bottom-bar: rgba(15, 23, 42, 0.96);
  --border-bottom-bar: rgba(255, 255, 255, 0.08);
  --color-nav-inactive: #94a3b8;
  --bg-nav-active-pill: rgba(56, 189, 248, 0.14);
  
  --bg-keypad-btn: #181d28;
  --bg-keypad-btn-active: #313a4d;
  --color-keypad-text: #ffffff;
  --color-keypad-subtext: #94a3b8;
  
  --bg-dropdown: #1e293b;
  --border-dropdown: rgba(255, 255, 255, 0.15);

  --bg-card: linear-gradient(145deg, rgba(18, 28, 54, 0.85) 0%, rgba(12, 18, 36, 0.9) 60%, rgba(7, 10, 20, 0.95) 100%);
  --border-card: rgba(56, 189, 248, 0.35);
  --bg-url: rgba(255, 255, 255, 0.04);
  --border-url: rgba(255, 255, 255, 0.08);
  --color-input: #94a3b8;
  --color-input-focus: #cbd5e1;

  --bg-qwerty-card: #11141b;
  --bg-qwerty-key: #252a36;
  --color-qwerty-key: #f1f5f9;
  --bg-qwerty-func: #1b1f28;
  --color-qwerty-func: #94a3b8;
}

@media (prefers-color-scheme: light) {
  :root {
    /* Light Mode Custom Properties */
    --bg-body: #f8fafc;
    --bg-gradient-1: rgba(2, 132, 199, 0.07);
    --bg-gradient-2: rgba(6, 182, 212, 0.05);
    --bg-gradient-3: rgba(14, 165, 233, 0.03);
    
    --color-text-primary: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #64748b;
    
    --bg-container: rgba(255, 255, 255, 0.75);
    --border-container: rgba(15, 23, 42, 0.08);
    --border-divider: rgba(0, 0, 0, 0.06);
    
    --bg-row-hover: rgba(0, 0, 0, 0.03);
    --bg-row-expanded: rgba(0, 0, 0, 0.015);
    --bg-drawer: rgba(0, 0, 0, 0.04);
    
    --bg-bottom-bar: rgba(255, 255, 255, 0.96);
    --border-bottom-bar: rgba(0, 0, 0, 0.08);
    --color-nav-inactive: #64748b;
    --bg-nav-active-pill: rgba(2, 132, 199, 0.1);
    
    --bg-keypad-btn: #e2e8f0;
    --bg-keypad-btn-active: #cbd5e1;
    --color-keypad-text: #0f172a;
    --color-keypad-subtext: #64748b;
    
    --bg-dropdown: #ffffff;
    --border-dropdown: rgba(0, 0, 0, 0.12);

    --bg-card: linear-gradient(145deg, rgba(255, 255, 255, 0.85) 0%, rgba(241, 245, 249, 0.9) 60%, rgba(226, 232, 240, 0.95) 100%);
    --border-card: rgba(2, 132, 199, 0.25);
    --bg-url: rgba(0, 0, 0, 0.04);
    --border-url: rgba(0, 0, 0, 0.08);
    --color-input: #0f172a;
    --color-input-focus: #0284c7;

    --bg-qwerty-card: #f1f5f9;
    --bg-qwerty-key: #ffffff;
    --color-qwerty-key: #0f172a;
    --bg-qwerty-func: #cbd5e1;
    --color-qwerty-func: #475569;
  }
}

body {
  background-color: var(--bg-body);
  background-image: 
    radial-gradient(circle at 20% 12%, var(--bg-gradient-1) 0px, transparent 42%),
    radial-gradient(circle at 80% 88%, var(--bg-gradient-2) 0px, transparent 45%),
    radial-gradient(circle at 50% 50%, var(--bg-gradient-3) 0px, transparent 65%);
  background-attachment: fixed;
  color: var(--color-text-secondary);
  font-family: var(--font-main);
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Master Centered App Layout Container */
.app-layout-container {
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 100%;
  height: 100dvh;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background-color: var(--bg-body);
  background-image: 
    radial-gradient(circle at 20% 12%, var(--bg-gradient-1) 0px, transparent 42%),
    radial-gradient(circle at 80% 88%, var(--bg-gradient-2) 0px, transparent 45%),
    radial-gradient(circle at 50% 50%, var(--bg-gradient-3) 0px, transparent 65%);
}

/* Edge-to-Edge Native Screen Container (Invisible Frame) */
.phone-frame-wrapper {
  width: 100%;
  max-width: 480px;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: flex;
  flex-direction: column;
  padding-top: max(env(safe-area-inset-top, 0px), 38px);
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 14px);
  padding-left: max(env(safe-area-inset-left, 0px), 16px);
  padding-right: max(env(safe-area-inset-right, 0px), 16px);
  box-shadow: none;
  border: none;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Top Edge Crystal Reflection (Disabled for clean native look) */
.phone-frame-wrapper::before {
  display: none;
}

/* ======================================================
   1. TOP APP HEADER
   ====================================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
  margin-bottom: clamp(8px, 1.4vh, 12px);
  flex-shrink: 0;
  width: 100%;
}

.app-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 6px 18px rgba(2, 132, 199, 0.4),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.55),
    inset 0 -1px 1px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.app-brand-logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
}

.logo-k {
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 800;
  color: #f1f5f9;
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.app-brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-secondary);
}

.brand-sub {
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.app-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 100;
  pointer-events: auto; /* Ensure clickable */
}

.btn-online-toggle {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.12) 100%);
  border: 1px solid rgba(52, 211, 153, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 9999px;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #34d399;
  box-shadow: 
    0 4px 14px rgba(16, 185, 129, 0.25),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.35);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-online-toggle:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-online-toggle.offline {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.22) 0%, rgba(185, 28, 28, 0.12) 100%);
  border-color: rgba(248, 113, 113, 0.45);
  color: #f87171;
}

.online-indicator-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #34d399;
  animation: pulseGreen 2s infinite ease-in-out;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.btn-online-toggle.offline .online-indicator-dot {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: none;
}

.btn-header-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--color-text-primary);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

.btn-header-icon:hover {
  background: var(--bg-row-hover);
  color: var(--color-text-primary);
  transform: translateY(-1px) scale(1.04);
}

/* ======================================================
   2. DIGITAL CALLING PASS (Apple Wallet Card)
   ====================================================== */
.calling-pass-card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-card);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  padding: clamp(8px,1.4vh,12px) clamp(10px,2.5vw,14px);
  display: flex;
  flex-direction: column;
  gap: clamp(4px,0.8vh,8px);
  width: 100%;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

.calling-pass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* Streamlined compact pass when on Keypad mode so full dialer fits on any phone */
.phone-frame-wrapper.keypad-active .calling-pass-card {
  padding: 6px 12px;
  gap: 0;
  margin-bottom: 6px;
  border-radius: 14px;
}

.phone-frame-wrapper.keypad-active .calling-pass-card .pass-top-row,
.phone-frame-wrapper.keypad-active .calling-pass-card .pass-actions-strip {
  display: none;
}

.calling-pass-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 
    0 24px 60px -10px rgba(0, 0, 0, 0.85),
    0 0 45px rgba(2, 132, 199, 0.32),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

/* Glare effect removed */

.pass-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pass-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-main);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #64748b;
  text-transform: uppercase;
}

.pass-badge-green {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #22c55e;
  padding: 3px 8px;
  border-radius: 6px;
}

.pass-badge-green .pass-badge-dot {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

@media (prefers-color-scheme: light) {
  .pass-badge-green {
    background: rgba(22, 163, 74, 0.12);
    border: 1px solid rgba(22, 163, 74, 0.3);
    color: #15803d;
  }
  .pass-badge-green .pass-badge-dot {
    background: #15803d;
    box-shadow: none;
  }
}

.pass-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.pass-chip-icon {
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--bg-url);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-url);
}

.pass-main-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.pass-url-display {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 0;
  max-width: calc(100% - 105px);
  background: var(--bg-url);
  border: 1px solid var(--border-url);
  border-radius: 9999px;
  padding: 5px 10px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.pass-url-display:hover {
  background: var(--bg-row-hover);
  border-color: rgba(56, 189, 248, 0.3);
}

.pass-url-prefix {
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.pass-handle-input {
  background: transparent;
  border: none;
  color: var(--color-input);
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  outline: none;
  padding: 0 2px;
  margin: 0;
  min-width: 40px;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  vertical-align: baseline;
  transition: all 0.2s ease;
}

.pass-handle-input:focus {
  max-width: 130px;
  color: var(--color-input-focus);
}

.btn-handle-random {
  background: transparent;
  border: none;
  font-size: 13px;
  cursor: pointer;
  padding: 2px;
  margin-left: 2px;
  color: #64748b;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-handle-random:hover {
  transform: rotate(45deg) scale(1.2);
  color: #38bdf8;
}

.btn-handle-random:active {
  transform: scale(0.9);
}

.btn-pass-copy {
  background: var(--bg-url);
  color: var(--color-text-secondary);
  border: 1px solid var(--border-url);
  border-radius: 9999px;
  padding: 6px 14px;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-pass-copy:hover {
  background: var(--bg-row-hover);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--color-text-primary);
  box-shadow: none;
  transform: none;
}

.btn-pass-copy:active {
  transform: scale(0.96);
}

.pass-actions-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid var(--border-divider);
}

.pass-action-chip {
  flex: 1;
  min-width: 0;
  background: var(--bg-url);
  border: 1px solid var(--border-url);
  border-radius: 9999px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--color-text-secondary);
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.pass-action-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pass-action-chip:hover {
  background: var(--bg-row-hover);
  border-color: var(--border-card);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

.pass-action-chip:active {
  transform: scale(0.96);
  background: var(--bg-row-expanded);
}

#hero-creator-mode .pass-actions-strip {
  gap: 5px;
}

#hero-creator-mode .pass-action-chip {
  padding: 6px 6px;
  font-size: 10px;
}

/* ======================================================
   3. SEGMENTED NAVIGATION CONTROLLER (Clean Android Style - Matching Section B)
   ====================================================== */
.segmented-control {
  display: flex;
  background: rgba(28, 28, 30, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
  width: 100%;
  margin-bottom: clamp(6px, 1.2vh, 10px);
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.segment-btn {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-family: var(--font-main);
  font-size: clamp(10.5px, 2.8vw, 12px);
  font-weight: 600;
  padding: clamp(6px, 1vh, 8px) 6px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.segment-btn:hover {
  color: #f1f5f9;
}

.segment-btn.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ======================================================
   4. TAB CONTENTS & CONTACT LISTS
   ====================================================== */
.tab-content-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: none;
}

.phone-frame-wrapper.keypad-active .tab-content-container {
  overflow: hidden; /* Keypad view stays 100% within phone screen with no scrollbars */
}

.tab-pane {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  animation: fadeInPane 0.22s ease-out;
}

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

.contacts-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.group-header-label {
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-left: 2px;
}

.group-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.btn-clear-contacts {
  background: transparent;
  border: none;
  color: #64748b;
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-clear-contacts:hover {
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
}

/* Polished Liquid Glass Contact Card */
.contact-card-row {
  background: linear-gradient(145deg, rgba(20, 28, 52, 0.8) 0%, rgba(11, 16, 32, 0.88) 100%);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.4),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.25),
    inset 0 -1px 1px rgba(0, 0, 0, 0.4);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.contact-card-row:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1.5px);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(2, 132, 199, 0.2),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.35);
}

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

.contact-initials-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 
    0 3px 10px rgba(0, 0, 0, 0.45),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.45),
    inset 0 -1px 1px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}

.contact-initials-avatar.avatar-blue {
  background: linear-gradient(145deg, #0284c7 0%, #1e40af 100%);
  border: 1px solid rgba(56, 189, 248, 0.5);
}

.contact-initials-avatar.avatar-cyan {
  background: linear-gradient(145deg, #0891b2 0%, #0369a1 100%);
  border: 1px solid rgba(34, 211, 238, 0.5);
}

.contact-initials-avatar.avatar-emerald {
  background: linear-gradient(145deg, #059669 0%, #047857 100%);
  border: 1px solid rgba(52, 211, 153, 0.5);
}

.contact-initials-avatar.avatar-amber {
  background: linear-gradient(145deg, #d97706 0%, #b45309 100%);
  border: 1px solid rgba(251, 191, 36, 0.5);
}

.contact-status-online {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8.5px;
  height: 8.5px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid #0a0e1a;
  box-shadow: 0 0 6px #10b981;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.contact-name {
  font-family: var(--font-main);
  font-size: 14.5px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-subtitle {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-subtitle-phone {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-action-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-action-pill {
  padding: 7px 13px;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  border: none;
}

.btn-pill-audio {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #94a3b8;
  box-shadow: 
    0 3px 10px rgba(0, 0, 0, 0.3),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.3);
}

.btn-pill-audio:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 100%);
  color: #cbd5e1;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.btn-pill-video {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #f1f5f9;
  box-shadow: 
    0 4px 16px rgba(2, 132, 199, 0.45),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.6),
    inset 0 -1px 1px rgba(0, 0, 0, 0.35);
}

.btn-pill-video:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 
    0 6px 22px rgba(2, 132, 199, 0.65),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 50%, #0284c7 100%);
}

.dynamic-contacts-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

/* ======================================================
   TAB 2: SEARCH & ALL CONTACTS
   ====================================================== */
.search-bar-wrap {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 20px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  box-shadow: 
    0 6px 22px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px #ffffff;
  transition: all 0.22s ease;
}

.search-bar-wrap:focus-within {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 0 0 2px #38bdf8;
}

.search-glass-icon {
  font-size: 13.5px;
  color: #64748b;
}

.search-input-field {
  background: transparent;
  border: none;
  color: #0f172a;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  outline: none;
}

.search-input-field::placeholder {
  color: #64748b;
  font-size: 12.5px;
}

.btn-search-clear {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
}

.search-dial-banner {
  background: linear-gradient(145deg, rgba(18, 28, 54, 0.95) 0%, rgba(10, 15, 30, 0.96) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 18px;
  padding: 13px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.phonebook-tools-bar {
  display: flex;
  gap: 8px;
  width: 100%;
}

.btn-tool-tile {
  flex: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 10px 12px;
  color: #64748b;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.btn-tool-tile:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.06) 100%);
  color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), inset 0 1px 1.5px rgba(255, 255, 255, 0.3);
}

/* ======================================================
   TAB 3: INTERACTIVE GLOWING KEYPAD (Crystal Glass Beads)
   ====================================================== */
#tab-keypad {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  gap: 0;
  padding: 0;
}

/* Keypad display styles are consolidated in the Android Native Keypad section */

.keypad-ussd-preview-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  padding: clamp(3px, 0.6vh, 5px) 8px;
  margin-bottom: clamp(4px, 0.8vh, 6px);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.keypad-ussd-preview-pill:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: #10b981;
  transform: translateY(-1px);
}

.ussd-pill-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.ussd-pill-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(9.5px, 2.4vw, 11px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.ussd-pill-tag {
  font-size: 8.5px;
  font-weight: 700;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.2);
  padding: 2px 5px;
  border-radius: 5px;
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(3px, 0.8vh, 6px);
  width: 100%;
  max-width: 275px;
  margin: 0 auto clamp(3px, 0.8vh, 6px) auto;
  flex-shrink: 0;
}

.keypad-btn {
  width: clamp(42px, 11.5vw, 54px);
  height: clamp(42px, 11.5vw, 54px);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 60%, rgba(0, 0, 0, 0.2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 auto;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.35),
    inset 0 -1px 1px rgba(0, 0, 0, 0.4);
  user-select: none;
  -webkit-user-select: none;
}

.keypad-btn:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.08) 60%, rgba(0, 0, 0, 0.15) 100%);
  border-color: rgba(56, 189, 248, 0.5);
  transform: scale(1.06);
  box-shadow: 
    0 6px 18px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(2, 132, 199, 0.2),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
}

.keypad-btn:active {
  transform: scale(0.92);
  background: rgba(2, 132, 199, 0.3);
}

.key-digit {
  font-family: var(--font-main);
  font-size: clamp(15px, 3.8vw, 19px);
  font-weight: 700;
  color: #94a3b8;
  line-height: 1;
}

.key-letters {
  font-family: var(--font-main);
  font-size: 7px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.1em;
  margin-top: 1px;
  line-height: 1;
}

.keypad-call-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(10px, 3vw, 16px);
  width: 100%;
  margin-top: auto;
  padding-bottom: 2px;
  flex-shrink: 0;
}

.btn-keypad-call {
  width: clamp(44px, 11.5vw, 50px);
  height: clamp(44px, 11.5vw, 50px);
  border-radius: 50%;
  background: linear-gradient(180deg, #34d399 0%, #10b981 50%, #059669 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 
    0 6px 18px rgba(16, 185, 129, 0.5),
    inset 0 2px 2px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(0, 0, 0, 0.4);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  gap: 1px;
}

.btn-keypad-call span {
  font-size: clamp(14px, 3.5vw, 17px);
  line-height: 1;
}

.btn-keypad-call small {
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.95;
}

.btn-keypad-call:hover {
  transform: scale(1.07);
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.7), inset 0 2px 3px rgba(255, 255, 255, 0.7);
}

.btn-keypad-ussd {
  background: linear-gradient(180deg, #10b981 0%, #047857 50%, #064e3b 100%);
  border-color: #34d399;
  box-shadow: 
    0 6px 18px rgba(16, 185, 129, 0.6),
    0 0 12px rgba(52, 211, 153, 0.3),
    inset 0 2px 2px rgba(255, 255, 255, 0.6);
  position: relative;
}

.btn-keypad-ussd:hover {
  background: linear-gradient(180deg, #34d399 0%, #10b981 50%, #047857 100%);
  box-shadow: 0 10px 26px rgba(52, 211, 153, 0.8), inset 0 2px 3px rgba(255, 255, 255, 0.8);
}

.btn-keypad-video {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 50%, #0369a1 100%);
  color: #f8fafc;
  box-shadow: 
    0 6px 18px rgba(2, 132, 199, 0.5),
    inset 0 2px 2px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(0, 0, 0, 0.4);
}

.btn-keypad-video:hover {
  box-shadow: 0 10px 26px rgba(2, 132, 199, 0.7), inset 0 2px 3px rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, #7dd3fc 0%, #38bdf8 50%, #0284c7 100%);
}

/* ======================================================
   5. LIVE INCOMING CALL MODAL OVERLAY (Inside Phone Frame)
   ====================================================== */
.incoming-call-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.9);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  border-radius: inherit;
  transition: opacity 0.25s ease;
}

.incoming-call-backdrop.open {
  display: flex !important;
  opacity: 1 !important;
}

.incoming-call-card {
  background: linear-gradient(145deg, rgba(18, 28, 54, 0.96) 0%, rgba(10, 14, 28, 0.98) 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 30px;
  padding: 30px 22px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.98),
    0 0 50px rgba(2, 132, 199, 0.35),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.4);
  animation: callPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #94a3b8;
  position: relative;
  overflow: hidden;
}

@keyframes callPop {
  0% { transform: scale(0.9) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.incoming-caller-avatar-ring {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.incoming-initials-display {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  background: linear-gradient(145deg, #0284c7 0%, #0369a1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  font-size: 27px;
  font-weight: 700;
  color: #f8fafc;
  position: relative;
  z-index: 2;
  box-shadow: 
    0 0 30px rgba(2, 132, 199, 0.55),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.45);
}

.incoming-ring-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  animation: ringPulse 1.8s infinite ease-out;
  z-index: 1;
}

@keyframes ringPulse {
  0% { transform: scale(0.95); opacity: 1; border-color: #38bdf8; }
  100% { transform: scale(1.4); opacity: 0; border-color: #0284c7; }
}

.incoming-call-tag {
  font-family: var(--font-main);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.incoming-caller-name {
  font-family: var(--font-main);
  font-size: 21px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.incoming-caller-handle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #64748b;
  margin-bottom: 22px;
}

.incoming-call-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-accept-call {
  flex: 1;
  background: linear-gradient(180deg, #34d399 0%, #10b981 50%, #059669 100%);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  padding: 13px 10px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 
    0 6px 20px rgba(16, 185, 129, 0.45),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.22s ease;
}

.btn-accept-call:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.65);
}

.btn-accept-video {
  flex: 1;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 50%, #0369a1 100%);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  padding: 13px 10px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 
    0 6px 20px rgba(2, 132, 199, 0.45),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.22s ease;
}

.btn-accept-video:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.65);
  background: linear-gradient(180deg, #7dd3fc 0%, #38bdf8 50%, #0284c7 100%);
}

.btn-decline-call {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.25) 0%, rgba(185, 28, 28, 0.15) 100%);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #f87171;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.btn-decline-call:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #f8fafc;
  transform: scale(1.06);
}

/* ======================================================
   6. ACTIVE IN-CALL FULLSCREEN STAGE (100% PHONE FRAME IS VIDEO)
   ====================================================== */
.active-call-fullscreen-overlay {
  position: absolute;
  inset: 0;
  background: #05070f;
  z-index: 5000;
  display: none;
  flex-direction: column;
  color: #94a3b8;
  border-radius: inherit;
  overflow: hidden;
}

.active-call-fullscreen-overlay.open {
  display: flex !important;
}

.active-call-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 26px 20px;
  background: linear-gradient(180deg, rgba(5, 7, 15, 0.9) 0%, rgba(5, 7, 15, 0.4) 60%, transparent 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.active-call-timer-pill {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.15) 100%);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #34d399;
  border-radius: 9999px;
  padding: 5px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 
    0 0 16px rgba(16, 185, 129, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.active-call-stage-body {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #0f1934 0%, #04060d 100%);
  z-index: 1;
}

.active-remote-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  z-index: 2;
  border-radius: inherit;
}

.active-remote-video.visible {
  display: block !important;
}

.active-call-audio-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 3;
}

.incall-audio-initials-ring {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: linear-gradient(145deg, #0284c7 0%, #1d4ed8 100%);
  border: 2.5px solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: #f8fafc;
  box-shadow: 
    0 0 50px rgba(2, 132, 199, 0.6),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
  animation: floatPulse 3s infinite ease-in-out;
}

@keyframes floatPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.02); }
}

.active-pip-local-video {
  position: absolute;
  bottom: 90px;
  right: 18px;
  width: 98px;
  height: 140px;
  border-radius: 18px;
  border: 2px solid #38bdf8;
  object-fit: cover;
  background: #020617;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(6, 182, 212, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  z-index: 20;
  display: none;
}

.active-pip-local-video.visible {
  display: block !important;
}

.active-call-bottom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 24px 20px 30px 20px;
  background: linear-gradient(0deg, rgba(5, 7, 15, 0.94) 0%, rgba(5, 7, 15, 0.5) 60%, transparent 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.btn-call-ctrl {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #94a3b8;
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.4),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.3);
  transition: all 0.22s ease;
}

.btn-call-ctrl:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.06) 100%);
  color: #cbd5e1;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), inset 0 2px 2px rgba(255, 255, 255, 0.4);
}

.btn-call-ctrl.muted {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(185, 28, 28, 0.2) 100%);
  border-color: #ef4444;
  color: #fca5a5;
}

.btn-call-hangup {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 
    0 8px 28px rgba(239, 68, 68, 0.7),
    inset 0 2px 2px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(0, 0, 0, 0.4);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-call-hangup:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 12px 35px rgba(239, 68, 68, 0.85), inset 0 2px 3px rgba(255, 255, 255, 0.7);
}

/* Floating Toast Message (Liquid Glass Pill) */
.toast-container {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: 90%;
}

.toast-message {
  background: linear-gradient(145deg, rgba(18, 28, 54, 0.96) 0%, rgba(10, 14, 28, 0.98) 100%);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #94a3b8;
  padding: 10px 20px;
  border-radius: 9999px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 
    0 12px 35px rgba(0, 0, 0, 0.85),
    0 0 25px rgba(2, 132, 199, 0.3),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: toastSlideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to { opacity: 1; transform: translateY(0); }
}

/* Live Audio Visualizer */
.audio-vu-meter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 24px;
  margin-top: 10px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.08) 100%);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 9999px;
}

.vu-bar {
  width: 3px;
  height: 6px;
  background: #10b981;
  border-radius: 2px;
  transition: all 0.08s ease;
}

.audio-vu-meter.active .vu-bar:nth-child(1) { animation: vuPulse 0.4s infinite ease-in-out alternate; }
.audio-vu-meter.active .vu-bar:nth-child(2) { animation: vuPulse 0.3s infinite ease-in-out alternate 0.1s; }
.audio-vu-meter.active .vu-bar:nth-child(3) { animation: vuPulse 0.5s infinite ease-in-out alternate 0.05s; }
.audio-vu-meter.active .vu-bar:nth-child(4) { animation: vuPulse 0.35s infinite ease-in-out alternate 0.15s; }
.audio-vu-meter.active .vu-bar:nth-child(5) { animation: vuPulse 0.45s infinite ease-in-out alternate 0.08s; }

@keyframes vuPulse {
  0% { height: 4px; background: #10b981; }
  100% { height: 16px; background: #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, 0.9); }
}

/* ======================================================
   AVAILABILITY & OFFICE HOURS MODAL
   ====================================================== */
.availability-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 15, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.availability-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(2, 132, 199, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  padding: 22px;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-wrap h3 {
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}

.modal-close-btn {
  background: var(--bg-url);
  border: 1px solid var(--border-url);
  color: var(--color-text-secondary);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.availability-status-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #38bdf8;
}

.availability-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.avail-mode-tab {
  background: var(--bg-url);
  border: 1px solid var(--border-url);
  border-radius: 12px;
  padding: 10px 8px;
  color: var(--color-text-secondary);
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.avail-mode-tab:hover {
  background: var(--bg-row-hover);
  color: var(--color-text-primary);
}

.avail-mode-tab.active {
  background: var(--bg-nav-active-pill);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.avail-section {
  background: var(--bg-drawer);
  border: 1px solid var(--border-container);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.avail-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.time-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.time-input-wrap span {
  font-size: 10.5px;
  color: var(--color-text-secondary);
}

.avail-time-input {
  background: var(--bg-url);
  border: 1px solid var(--border-url);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--color-text-primary);
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
}

.avail-time-input:focus {
  border-color: #38bdf8;
}

.time-separator {
  color: var(--color-text-muted);
  font-size: 12px;
  margin-top: 16px;
}

.days-chips-row {
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.day-chip {
  flex: 1;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-url);
  border: 1px solid var(--border-url);
  color: var(--color-text-secondary);
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.day-chip.active {
  background: var(--bg-nav-active-pill);
  border-color: #38bdf8;
  color: #38bdf8;
}

.quick-timer-chips {
  display: flex;
  gap: 8px;
}

.quick-chip {
  flex: 1;
  padding: 8px 4px;
  border-radius: 10px;
  background: var(--bg-url);
  border: 1px solid var(--border-url);
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-chip.active {
  background: var(--bg-nav-active-pill);
  border-color: #38bdf8;
  color: #38bdf8;
}

.btn-save-availability {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #fff;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.btn-save-availability:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

.social-share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.social-share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-url);
}

.social-icon-box {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-share-btn.share-whatsapp {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}
.social-share-btn.share-whatsapp:hover {
  background: rgba(34, 197, 94, 0.2);
}

.social-share-btn.share-facebook {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}
.social-share-btn.share-facebook:hover {
  background: rgba(59, 130, 246, 0.2);
}

.social-share-btn.share-x {
  background: var(--bg-url);
  color: var(--color-text-primary);
  border-color: var(--border-url);
}
.social-share-btn.share-x:hover {
  background: var(--bg-row-hover);
}

.social-share-btn.share-instagram {
  background: rgba(236, 72, 153, 0.1);
  color: #ec4899;
  border-color: rgba(236, 72, 153, 0.3);
}
.social-share-btn.share-instagram:hover {
  background: rgba(236, 72, 153, 0.2);
}

.social-share-btn.share-tiktok {
  background: rgba(14, 165, 233, 0.1);
  color: #0ea5e9;
  border-color: rgba(14, 165, 233, 0.3);
}
.social-share-btn.share-tiktok:hover {
  background: rgba(14, 165, 233, 0.2);
}

.social-share-btn.share-copy {
  background: var(--bg-keypad-btn);
  color: var(--color-text-secondary);
  border-color: var(--border-container);
}
.social-share-btn.share-copy:hover {
  background: var(--bg-keypad-btn-active);
  color: var(--color-text-primary);
}



/* Ensure per‑link action buttons are on top and receive pointer events */
.link-item .btn-link-paid,
.link-item .btn-link-share,
.link-item .btn-link-schedule,
.link-item .btn-link-delete {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

/* Per‑link action buttons styling (matching btn-header-icon style) */
.btn-link-paid,
.btn-link-share,
.btn-link-schedule,
.btn-link-delete {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #94a3b8;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
  line-height: 1;
}

.btn-link-paid {
  font-family: var(--font-main, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.5px;
}

.btn-link-paid:hover,
.btn-link-share:hover,
.btn-link-schedule:hover,
.btn-link-delete:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 100%);
  color: #cbd5e1;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), inset 0 1px 1.5px rgba(255, 255, 255, 0.45);
}

/* Ensure top‑link action buttons receive pointer events */
.top-link-actions {
  pointer-events: auto;
  display: flex;
  gap: 0.5rem;
}

.top-link-actions button:hover {
  opacity: 0.9;
}

/* Inline + Create Link Button */
.btn-create-link-inline {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--color-text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.18s ease;
  padding: 0;
  margin: 0;
  line-height: 1;
}

.btn-create-link-inline:hover {
  background: var(--bg-row-hover);
  color: var(--color-text-primary);
  transform: scale(1.08);
}

/* ─── Knock Handles Tab ─── */
.top-links-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}

.top-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  min-width: 0;
  gap: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.top-link-card:hover {
  background: var(--bg-row-hover);
  border-color: rgba(56, 189, 248, 0.5);
}

.top-link-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.top-link-card-text {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.top-link-card-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.link-prefix {
  color: var(--color-text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  font-family: var(--font-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.link-suffix-input {
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed rgba(2, 132, 199, 0.45);
  color: var(--color-text-primary);
  font-size: 13.5px;
  font-family: var(--font-main);
  font-weight: 700;
  padding: 1px 4px;
  min-width: 70px;
  width: auto;
  max-width: 140px;
  flex-shrink: 0;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.link-suffix-input:hover {
  border-bottom-color: rgba(2, 132, 199, 0.8);
}

.link-suffix-input:focus {
  border-bottom: 1.5px solid var(--color-accent, #0284c7);
  background: rgba(56, 189, 248, 0.12);
  border-radius: 4px 4px 0 0;
  color: var(--color-text-primary);
}

.top-link-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.top-link-actions button {
  background: var(--bg-row-hover);
  border: 1px solid var(--border-card);
  color: var(--color-text-primary);
  border-radius: 8px;
  padding: 6px 7px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s ease, transform 0.15s ease;
}

.top-link-actions button:hover {
  background: var(--bg-card);
  transform: scale(1.08);
}

/* Segment‑btn: slightly smaller font so 4 tabs fit */
.segmented-control .segment-btn {
  font-size: 11px;
  gap: 3px;
  padding: 7px 0;
}

/* --- AUTH GATE --- */
.auth-gate-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(6, 7, 10, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 24px; transition: opacity 0.4s ease, visibility 0.4s ease; }
.auth-gate-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.auth-card { width: 100%; max-width: 360px; background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }
.auth-logo-wrap { width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3); }
.auth-logo { font-size: 32px; font-weight: 800; color: #fff; font-family: 'Plus Jakarta Sans', sans-serif; }
.auth-title { font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 8px; text-align: center; }
.auth-subtitle { font-size: 14px; color: #94a3b8; text-align: center; margin-bottom: 32px; line-height: 1.5; }
.auth-form-group { width: 100%; margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.auth-label { font-size: 13px; font-weight: 600; color: #cbd5e1; text-transform: uppercase; letter-spacing: 0.5px; }
.auth-input { width: 100%; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 14px 16px; font-size: 16px; color: #fff; outline: none; transition: all 0.2s ease; font-family: inherit; }
.auth-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); background: rgba(0, 0, 0, 0.3); }
.auth-input::placeholder { color: #475569; }
.btn-auth-submit { width: 100%; background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: #fff; border: none; border-radius: 12px; padding: 16px; font-size: 16px; font-weight: 700; margin-top: 12px; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3); }
.btn-auth-submit:active { transform: scale(0.98); }


/* ======================================================
   ADVANCED FEATURES: RECENTS, IN-CALL CHAT & POST-CALL
   ====================================================== */

/* Contacts Sub Toggle (Directory / Recents) */
.contacts-sub-toggle-bar {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 12px;
  gap: 4px;
}

.sub-toggle-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 8px 12px;
  border-radius: 9px;
  font-family: var(--font-main, 'Plus Jakarta Sans', sans-serif);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sub-toggle-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Recents Filters */
.recents-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.recents-filter-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 4px 10px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.recents-filter-chip.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Recents Cards */
.recents-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-call-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(20, 26, 46, 0.6) 0%, rgba(12, 17, 34, 0.7) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.recent-call-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(20, 26, 46, 0.85);
}

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

.recent-call-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.recent-call-icon-wrap.incoming {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.recent-call-icon-wrap.missed {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.recent-call-icon-wrap.paid {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.recent-call-info {
  display: flex;
  flex-direction: column;
}

.recent-call-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.recent-call-meta {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.recent-call-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-recent-redial {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-recent-redial:hover {
  background: #10b981;
  color: #fff;
}

.btn-recent-wa {
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.25);
  color: #25d366;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-recent-wa:hover {
  background: #25d366;
  color: #fff;
}

/* In-Call Ephemeral Chat Drawer */
.incall-chat-drawer {
  position: absolute;
  bottom: 90px;
  left: 12px;
  right: 12px;
  height: 240px;
  background: rgba(10, 14, 28, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.incall-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-chat-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
}

.incall-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.incall-chat-empty {
  font-size: 11px;
  color: #64748b;
  text-align: center;
  margin-top: 30px;
  padding: 0 16px;
  line-height: 1.4;
}

.chat-bubble {
  max-width: 80%;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.chat-bubble.mine {
  align-self: flex-end;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.chat-bubble.theirs {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border-bottom-left-radius: 2px;
}

.incall-chat-input-wrap {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.incall-chat-input-wrap input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  outline: none;
}

.btn-send-chat {
  background: #38bdf8;
  color: #04101e;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Post Call Summary Modal (Host) */
.post-call-summary-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-call-summary-card {
  width: 86%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.post-call-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.post-stat-box {
  background: var(--bg-url);
  border: 1px solid var(--border-url);
  border-radius: 12px;
  padding: 10px 8px;
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  display: block;
}

.stat-val {
  font-size: 15px;
  font-weight: 800;
  color: #38bdf8;
  margin-top: 2px;
  display: block;
}

.btn-close-summary {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}


/* Host Presence & Dead-Air Check */
.host-presence-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.host-presence-card {
  width: 88%;
  background: linear-gradient(180deg, #1e1b2e 0%, #0d0e17 100%);
  border: 2px solid #ef4444;
  border-radius: 20px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
  animation: presencePulse 1.5s infinite alternate;
}

@keyframes presencePulse {
  0% { transform: scale(0.98); box-shadow: 0 0 20px rgba(239, 68, 68, 0.3); }
  100% { transform: scale(1.02); box-shadow: 0 0 40px rgba(239, 68, 68, 0.7); }
}

.presence-countdown-pill {
  display: inline-block;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.btn-confirm-presence {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ========================================================
   📱 PHONEBOOK SYNC & DEFAULT CALLER STYLES
   ======================================================== */
.subtab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

.btn-tool-primary {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.25) 0%, rgba(3, 105, 161, 0.15) 100%) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
}

.phone-contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.phone-contact-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.phone-number-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
}

.phone-number-digits {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.phone-type-badge {
  font-size: 9px;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.phone-action-btns {
  display: flex;
  gap: 5px;
}

.contact-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.contact-action-btn:hover {
  transform: scale(1.05);
}

.contact-action-btn.btn-ussd {
  background: linear-gradient(135deg, #008751 0%, #005a36 100%);
  color: #fff;
}

.contact-action-btn.btn-tel {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.contact-action-btn.btn-whatsapp {
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.4);
  color: #25d366;
}

/* ========================================================
   🤖 ANDROID MATERIAL PHONEBOOK PRESENTATION
   ======================================================== */
.android-phonebook-container {
  position: relative;
  width: 100%;
}

.android-letter-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-accent, #38bdf8);
  letter-spacing: 0.06em;
  margin: 8px 0 4px 4px;
  text-transform: uppercase;
}

.android-letter-header:first-of-type,
.android-phonebook-container > .android-letter-header:first-child,
#phonebook-contacts-list > .android-letter-header:first-child {
  margin-top: 2px;
}

.android-letter-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.2) 0%, transparent 100%);
}

.android-contacts-container {
  display: flex;
  flex-direction: column;
  gap: 0px;
  background: var(--bg-container);
  border-radius: 18px;
  border: 1px solid var(--border-container);
  overflow: hidden;
  margin-bottom: 12px;
}

.android-contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-divider);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.android-contact-row:hover {
  background: var(--bg-row-hover);
}

.android-contact-row:last-child {
  border-bottom: none;
}

.android-contact-row.expanded {
  background: var(--bg-row-expanded);
}

.contact-quick-actions {
  display: none;
  padding: 8px 16px 10px 16px;
  background: var(--bg-row-hover);
  border-bottom: 1px solid var(--border-divider);
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  animation: slideDownFade 0.2s ease-out;
}

.android-contact-row.expanded + .contact-quick-actions {
  display: flex;
}

.android-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: none;
}

.android-avatar.avatar-blue, .avatar-blue { background: rgba(2, 132, 199, 0.12); color: #0284c7; border: 1px solid rgba(2, 132, 199, 0.22); }
.android-avatar.avatar-cyan, .avatar-cyan { background: rgba(8, 145, 178, 0.12); color: #0891b2; border: 1px solid rgba(8, 145, 178, 0.22); }
.android-avatar.avatar-amber, .avatar-amber { background: rgba(217, 119, 6, 0.12); color: #d97706; border: 1px solid rgba(217, 119, 6, 0.22); }
.android-avatar.avatar-rose, .avatar-rose { background: rgba(225, 29, 72, 0.12); color: #e11d48; border: 1px solid rgba(225, 29, 72, 0.22); }
.android-avatar.avatar-emerald, .avatar-emerald { background: rgba(5, 150, 105, 0.12); color: #059669; border: 1px solid rgba(5, 150, 105, 0.22); }
.android-avatar.avatar-purple, .avatar-purple { background: rgba(147, 51, 234, 0.12); color: #9333ea; border: 1px solid rgba(147, 51, 234, 0.22); }
.android-avatar.avatar-teal, .avatar-teal { background: rgba(13, 148, 136, 0.12); color: #0d9488; border: 1px solid rgba(13, 148, 136, 0.22); }

@media (prefers-color-scheme: dark) {
  .android-avatar.avatar-blue, .avatar-blue { background: rgba(56, 189, 248, 0.14); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.25); }
  .android-avatar.avatar-cyan, .avatar-cyan { background: rgba(34, 211, 238, 0.14); color: #22d3ee; border: 1px solid rgba(34, 211, 238, 0.25); }
  .android-avatar.avatar-amber, .avatar-amber { background: rgba(251, 191, 36, 0.14); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.25); }
  .android-avatar.avatar-rose, .avatar-rose { background: rgba(251, 113, 133, 0.14); color: #fb7185; border: 1px solid rgba(251, 113, 133, 0.25); }
  .android-avatar.avatar-emerald, .avatar-emerald { background: rgba(52, 211, 153, 0.14); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.25); }
  .android-avatar.avatar-purple, .avatar-purple { background: rgba(192, 132, 252, 0.14); color: #c084fc; border: 1px solid rgba(192, 132, 252, 0.25); }
  .android-avatar.avatar-teal, .avatar-teal { background: rgba(45, 212, 191, 0.14); color: #2dd4bf; border: 1px solid rgba(45, 212, 191, 0.25); }
}

.btn-contact-quick-call {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.btn-contact-quick-call:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  transform: scale(1.05);
}

.btn-contact-quick-call:active {
  transform: scale(0.95);
}

.android-contact-info {
  flex: 1;
  min-width: 0;
  margin-left: 12px;
  text-align: left;
}

.android-contact-name {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}

.android-contact-subtitle {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.android-type-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #64748b;
}

.android-actions-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-contact-quick-call {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.btn-contact-quick-call:hover {
  background: #16a34a;
  transform: scale(1.08);
}

.btn-contact-quick-call:active {
  transform: scale(0.92);
  background: #15803d;
}

/* Section B Style: Clean, Subtle, Standard Android Translucent Pill Buttons */
.btn-android-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-android-action:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-android-action:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.24);
}

.btn-android-action svg {
  display: block;
  stroke: currentColor;
  transition: transform 0.15s ease;
}

.btn-android-action.btn-ussd {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.btn-android-action.btn-ussd:hover {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.5);
  color: #ffffff;
}

.btn-android-action.btn-call,
.btn-android-action.btn-video {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* ========================================================
   👑 DUAL-PERSONA SWITCHER (FREE ANONYMOUS vs CREATOR STUDIO)
   ======================================================== */
.persona-mode-bar {
  display: flex;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 4px;
  margin: 10px 14px 14px 14px;
  gap: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.persona-switch-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.persona-switch-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.persona-switch-btn.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.35) 0%, rgba(3, 105, 161, 0.2) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
}

.persona-switch-btn[data-action="set-persona-creator"].active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.2) 100%);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.creator-promo-card {
  margin: 18px 14px 10px 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.creator-promo-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.creator-promo-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 6px;
}

.creator-promo-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.creator-promo-desc {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.4;
  margin-bottom: 10px;
}

.btn-creator-promo-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

/* ========================================================
   📱 AUTHENTIC ANDROID / SAMSUNG PHONE DIALER & RECENTS
   ======================================================== */
#tab-calls {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 520px;
  padding-bottom: 75px; /* Leave space for floating pill bar */
}

.calls-subview {
  width: 100%;
}

.calls-top-tools-wrap {
  margin-bottom: 4px;
}

/* Android Recents Native Header Icons */
.android-recents-header-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 4px 4px 4px;
  width: 100%;
  box-sizing: border-box;
}

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

.btn-recents-hdr-icon {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: 6px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-recents-hdr-icon:hover {
  color: var(--color-text-primary);
  background: var(--bg-row-hover);
}

/* Android Recents Call Log Container */
.android-recents-container {
  display: flex;
  flex-direction: column;
  gap: 0px;
  background: var(--bg-container);
  border-radius: 18px;
  border: 1px solid var(--border-container);
  overflow: hidden;
}

.android-recents-group-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-secondary);
  padding: 14px 16px 8px 16px;
  letter-spacing: 0.2px;
}

.android-recent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-divider);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.android-recent-row:hover {
  background: var(--bg-row-hover);
}

.android-recent-row:last-child {
  border-bottom: none;
}

.recent-left-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.recent-dir-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}

.recent-dir-icon.outgoing {
  color: #22c55e; /* Green ↗ */
}

.recent-dir-icon.incoming {
  color: #38bdf8; /* Blue ↙ */
}

.recent-dir-icon.missed {
  color: #ef4444; /* Red ↙ */
}

.recent-title-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.recent-name-number {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-name-number.missed-text {
  color: #fca5a5;
}

.recent-sub-detail {
  font-size: 11px;
  color: #64748b;
}

.recent-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.recent-missed-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
}

.recent-timestamp {
  font-size: 12.5px;
  color: #94a3b8;
  font-weight: 500;
}

/* Expanded Action Tray on Tapping Recents Row */
.recent-quick-actions {
  display: none;
  padding: 8px 16px 10px 16px;
  background: var(--bg-row-hover);
  border-bottom: 1px solid var(--border-divider);
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  animation: slideDownFade 0.2s ease-out;
}

.android-recent-row.expanded + .recent-quick-actions {
  display: flex;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-android-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--color-text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}

.btn-android-action .action-svg {
  flex-shrink: 0;
}

.btn-android-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.btn-android-action:active {
  transform: scale(0.96);
}

/* Specific button styles */
.btn-android-action.btn-ussd {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.35);
  color: #059669;
}

.btn-android-action.btn-call {
  background: var(--bg-card);
  border-color: var(--border-card);
  color: var(--color-text-primary);
}

.btn-android-action.btn-video {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.25);
  color: var(--color-accent, #0284c7);
}

@media (prefers-color-scheme: dark) {
  .btn-android-action.btn-ussd {
    background: rgba(52, 211, 153, 0.14);
    border-color: rgba(52, 211, 153, 0.35);
    color: #34d399;
  }
  .btn-android-action.btn-video {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
  }
}

/* ========================================================
   📱 NATIVE ANDROID / SAMSUNG KEYPAD & CALL ACTIONS
   ======================================================== */
/* ========================================================
   📱 NATIVE ANDROID / SAMSUNG KEYPAD (100% RIGID - NO SCROLL)
   ======================================================== */
#calls-subpane-keypad {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 4px 6px 8px 6px;
  box-sizing: border-box;
  overflow: hidden !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  position: relative;
}

#calls-subpane-keypad[style*="display: flex"],
#calls-subpane-keypad[style*="display: block"] {
  display: flex !important;
  flex-direction: column !important;
}

.keypad-top-meta {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  margin-bottom: 2px;
}

.btn-keypad-add-contact {
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: #0284c7;
  border-radius: 9999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-keypad-add-contact:hover {
  background: rgba(2, 132, 199, 0.18);
  transform: scale(1.02);
}

.keypad-display-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  position: relative;
  height: 48px;
  margin: 0 auto 8px auto;
  padding: 0 10px;
  touch-action: none !important;
  box-sizing: border-box;
}

.keypad-number-display {
  width: 100%;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: clamp(24px, 5.5vw, 30px);
  font-weight: 500;
  color: var(--color-text-primary);
  text-align: center;
  letter-spacing: 1.5px;
  outline: none;
  font-family: var(--font-main);
  caret-color: #38bdf8;
  padding: 0 36px 0 36px;
}

.keypad-number-display::placeholder {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0px;
}

.btn-keypad-backspace {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.btn-keypad-backspace:hover {
  color: var(--color-text-primary);
  background: var(--bg-row-hover);
}

.btn-keypad-backspace:active {
  transform: translateY(-50%) scale(0.9);
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 20px;
  width: 100%;
  max-width: 310px;
  margin: 0 auto;
  place-items: center;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.keypad-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-keypad-btn);
  border: 1px solid var(--border-container);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1), background 0.1s ease;
  user-select: none !important;
  -webkit-user-select: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation !important;
}

.keypad-btn:hover {
  background: var(--bg-keypad-btn-active);
}

.keypad-btn:active {
  background: var(--bg-keypad-btn-active);
  transform: scale(0.92);
}

.keypad-btn .key-digit {
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
  color: var(--color-keypad-text);
}

.keypad-btn .key-letters {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--color-keypad-subtext);
  margin-top: 2px;
  line-height: 1;
  text-transform: uppercase;
}

/* Single Centered Circular Android Green Call Button */
.keypad-call-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 310px;
  margin: 12px auto 6px auto;
}

.btn-dial-primary-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-dial-primary-circle:hover {
  background: #16a34a;
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(34, 197, 94, 0.5);
}

.btn-dial-primary-circle:active {
  transform: scale(0.93);
  background: #15803d;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.5);
}

/* 📱 FIXED ANDROID / SAMSUNG BOTTOM PILL BAR (SAFE FROM 3-BUTTON NAV) */
#tab-calls {
  padding-bottom: calc(max(env(safe-area-inset-bottom, 0px), 24px) + 76px);
}

.android-phone-pill-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  transform: none;
  width: 100%;
  background: var(--bg-bottom-bar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-bottom-bar);
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
  padding: 8px 0 calc(max(env(safe-area-inset-bottom, 0px), 8px));
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  z-index: 500;
  pointer-events: auto;
  box-sizing: border-box;
}

.android-phone-pill-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 0;
  min-width: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.android-phone-pill-btn:hover {
  color: #fff;
}

.android-phone-pill-btn.active {
  color: #38bdf8;
  box-shadow: none;
  background: transparent;
}

.android-phone-pill-btn .pill-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 32px;
  border-radius: 16px;
  background: transparent;
  transition: background-color 0.15s ease;
}

.android-phone-pill-btn.active .pill-icon-wrap {
  background: rgba(56, 189, 248, 0.14);
}

.android-phone-pill-btn .pill-svg {
  display: block;
  width: 22px;
  height: 22px;
  color: #94a3b8;
  transition: color 0.15s ease, transform 0.15s ease;
}

.android-phone-pill-btn.active .pill-svg {
  color: #38bdf8;
  transform: scale(1.05);
}

.android-phone-pill-btn .pill-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.android-phone-pill-btn.active .pill-label {
  font-weight: 700;
  color: #38bdf8;
}

/* ======================================================
   📱 SAMSUNG / ANDROID INTERACTIVE SEARCH SCREEN & KEYBOARD
   ====================================================== */
.calls-subview {
  width: 100%;
  box-sizing: border-box;
}

#calls-subpane-search {
  display: none;
  flex-direction: column !important;
  width: 100% !important;
  box-sizing: border-box;
  gap: 6px;
}

#calls-subpane-search[style*="display: flex"],
#calls-subpane-search[style*="display: block"] {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

.android-search-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px 10px 6px;
  border-bottom: 1px solid var(--border-divider);
  margin-bottom: 6px;
}

.btn-search-back {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-search-back:hover {
  background: var(--bg-row-hover);
  color: var(--color-text-primary);
}

.search-filters-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.search-filters-pill:hover {
  color: var(--color-text-primary);
  background: var(--bg-row-hover);
}

.search-results-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 8px 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.search-count-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.android-search-results-list {
  display: flex;
  flex-direction: column;
  background: var(--bg-container);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--border-container);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.search-contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-divider);
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-contact-card:last-child {
  border-bottom: none;
}

.search-contact-card:hover {
  background: var(--bg-row-hover);
}

.search-contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.search-contact-avatar.color-blue { background: #38bdf8; }
.search-contact-avatar.color-cyan { background: #06b6d4; }
.search-contact-avatar.color-amber { background: #f59e0b; }
.search-contact-avatar.color-purple { background: #a855f7; }
.search-contact-avatar.color-emerald { background: #10b981; }
.search-contact-avatar.color-rose { background: #f43f5e; }
.search-contact-avatar.color-teal { background: #14b8a6; }

.search-contact-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.search-contact-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-matched-text {
  color: #38bdf8;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.search-contact-sub {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* Floating Search Input Capsule Above Keyboard */
.android-search-capsule-wrap {
  margin-top: auto;
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
}

.android-search-capsule {
  width: 100%;
  background: var(--bg-keypad-btn);
  border: 1px solid var(--border-container);
  border-radius: 9999px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.search-capsule-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  letter-spacing: 0.2px;
}

.search-capsule-cursor {
  color: #38bdf8;
  font-weight: 300;
  animation: blinkCursor 1s infinite;
  margin-left: 1px;
  margin-right: auto;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.btn-capsule-clear {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #94a3b8;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-capsule-clear:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Samsung / Android Interactive On-Screen QWERTY Keyboard */
.samsung-keyboard-card {
  background: var(--bg-qwerty-card);
  border: 1px solid var(--border-container);
  border-radius: 18px;
  padding: 8px 6px 12px 6px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
  user-select: none;
}

.keyboard-suggestions-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 4px 6px 8px 6px;
  border-bottom: 1px solid var(--border-divider);
  margin-bottom: 6px;
}

.kb-sugg-chip {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.kb-sugg-chip:hover {
  background: var(--bg-row-hover);
  color: var(--color-text-primary);
}

.kb-sugg-more {
  color: var(--color-text-muted);
  font-size: 14px;
  letter-spacing: 2px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 5px;
}

.keyboard-row.row-indent {
  padding: 0 12px;
}

.kb-key {
  background: var(--bg-qwerty-key);
  border: none;
  border-radius: 6px;
  color: var(--color-qwerty-key);
  font-size: 16px;
  font-weight: 500;
  height: 38px;
  min-width: 24px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1.5px 2px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.kb-key:hover {
  filter: brightness(0.9);
}

.kb-key:active {
  background: #3b82f6;
  color: #ffffff;
  transform: scale(0.94);
}

.kb-key-shift, .kb-key-backspace {
  background: var(--bg-qwerty-func);
  flex: 1.4;
  font-size: 15px;
  color: var(--color-qwerty-func);
}

.kb-key-shift.active {
  background: #3b82f6;
  color: #fff;
}

.kb-key-fn {
  background: var(--bg-qwerty-func);
  flex: 1.2;
  font-size: 12.5px;
  color: var(--color-qwerty-func);
}

.kb-key-space {
  background: var(--bg-qwerty-key);
  flex: 4.2;
  font-size: 12.5px;
  color: var(--color-qwerty-func);
}

.kb-key-search {
  background: var(--bg-qwerty-func);
  color: #38bdf8;
  flex: 1.2;
}

.kb-key-search:active {
  background: #0284c7;
  color: #fff;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}




