/* ============================================
   ROLONOTE MOBILE PWA — STYLES v21.7.3
   ============================================
   Matches the Rolonote Chrome Extension design:
   • Animated shimmer top bars
   • Gradient brand name
   • Dashboard-style stat cards
   • Sidebar profile panel aesthetic
   • Premium dark/light themes
   • Label/tag chips system
   ============================================ */

/* ── CSS Custom Properties ── */
:root {
  /* Dark theme (default) */
  --bg-primary: #0a0b0e;
  --bg-secondary: rgba(24, 25, 26, 0.85);
  --bg-card: rgba(36, 37, 38, 0.6);
  --bg-card-active: rgba(46, 47, 48, 0.8);
  --bg-elevated: rgba(58, 59, 60, 0.4);
  --bg-input: rgba(46, 47, 48, 0.5);
  --bg-overlay: rgba(0, 0, 0, 0.8);
  --bg-sheet: #1c1d21;

  --text-primary: #f5f6f7;
  --text-secondary: #aab0b8;
  --text-tertiary: #6e767e;
  --text-inverse: #050505;

  --border-primary: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-focus: #2d88ff;

  --accent: #2d88ff;
  --accent-light: #5aa7ff;
  --accent-glow: rgba(45, 136, 255, 0.25);
  --accent-gradient: linear-gradient(135deg, #2d88ff, #4f46e5);
  --accent-gradient-warm: linear-gradient(135deg, #f59e0b, #f02849);
  --accent-gradient-green: linear-gradient(135deg, #10b981, #059669);
  --accent-gradient-wide: linear-gradient(90deg, #2d88ff, #4f46e5, #7c3aed, #a855f7, #4f46e5, #2d88ff);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #60a5fa;

  /* Status colors — 1:1 Desktop Parity */
  --status-new-contact: #2d88ff;
  --status-nurturing: #31a24c;
  --status-hot-lead: #f02849;
  --status-follow-up: #f7b928;
  --status-closed: #10b981;
  --status-client: #10b981;
  --status-vip: #a855f7;
  --status-warm: #fb923c;
  --status-cold: #94a3b8;
  --status-custom: #2d88ff;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glass: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(45, 136, 255, 0.3);

  --font: 'Inter', -apple-system, system-ui, sans-serif;

  --safe-top: env(safe-area-inset-top, 44px);
  --safe-bottom: env(safe-area-inset-bottom, 20px);
  --nav-height: 60px;
  --tab-height: 64px;
  --shimmer-height: 2px;
}

/* ── Bio / Scraped Details ── */
.detail-bio-section {
  padding: 16px;
  background: var(--bg-secondary);
  border-bottom: 12px solid var(--bg-primary);
}

.detail-bio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.detail-bio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0.6;
}

.detail-bio-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-bio-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  font-style: italic;
  opacity: 0.95;
}

.detail-mutuals-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-mutuals-icon {
  width: 28px;
  height: 28px;
  background: var(--bg-elevated);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.mob-tl-icon-box {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}


/* Light theme */
[data-theme="light"] {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f2f5;
  --bg-elevated: #f7f8fa;
  --bg-input: #f0f2f5;
  --bg-overlay: rgba(0, 0, 0, 0.4);
  --bg-sheet: #ffffff;

  --text-primary: #050505;
  --text-secondary: #65676b;
  --text-tertiary: #8a8d91;
  --text-inverse: #ffffff;

  --border-primary: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.04);

  --accent: #1877f2;
  --accent-light: #4599ff;
  --accent-glow: rgba(24, 119, 242, 0.12);
  --accent-gradient: linear-gradient(135deg, #1877f2, #4f46e5);
  --accent-gradient-warm: linear-gradient(135deg, #f59e0b, #f02849);
  --accent-gradient-green: linear-gradient(135deg, #10b981, #059669);
  --accent-gradient-wide: linear-gradient(90deg, #1877f2, #4f46e5, #7c3aed, #4f46e5, #1877f2);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.18);
  --shadow-glow: 0 2px 20px rgba(24, 119, 242, 0.2);
  --shadow-glass: 0 4px 12px rgba(0, 0, 0, 0.06);

  --border-glass: rgba(0, 0, 0, 0.1);
  --border-focus: #1877f2;
  --bg-card-active: rgba(0, 0, 0, 0.04);
}

/* ── Light Mode Overrides for Forms ── */
[data-theme="light"] .mob-input,
[data-theme="light"] .mob-textarea,
[data-theme="light"] .login-input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #050505;
}

[data-theme="light"] .mob-input:focus,
[data-theme="light"] .mob-textarea:focus,
[data-theme="light"] .login-input:focus {
  border-color: #1877f2;
}

[data-theme="light"] .mob-chip,
[data-theme="light"] .mob-reminder-chip {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #050505;
}

[data-theme="light"] .mob-chip.selected,
[data-theme="light"] .mob-reminder-chip.selected {
  background: rgba(24, 119, 242, 0.1);
  border-color: #1877f2;
  color: #1877f2;
}

[data-theme="light"] .status-opt {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #050505;
}

[data-theme="light"] .status-opt.active {
  background: rgba(24, 119, 242, 0.1);
  border-color: #1877f2;
  color: #1877f2;
}

[data-theme="light"] .mob-expand-btn {
  color: #050505;
}

[data-theme="light"] input[type="date"].mob-input {
  background: #ffffff;
  color: #050505;
}


/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  touch-action: pan-y;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}

input,
button,
textarea,
select {
  font-family: inherit;
  font-size: 16px;
  color: inherit;
  outline: none;
  border: none;
  background: none;
}

button {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Shimmer Top Bar (matches popup/dashboard) ── */
.rn-shimmer-bar {
  height: var(--shimmer-height);
  background: var(--accent-gradient-wide);
  background-size: 200% 100%;
  animation: shimmerBar 4s linear infinite;
  position: sticky;
  top: 0;
  z-index: 201;
  flex-shrink: 0;
}

@keyframes shimmerBar {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ── App Shell ── */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* ── View Management ── */
.view {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

.view.active {
  display: flex;
  animation: viewFadeIn 0.25s ease-out;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Navigation Bar ── */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-secondary);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
  padding-top: var(--safe-top);
  transition: all 0.3s ease;
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 16px;
}

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

.nav-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  animation: logoGlow 3s ease-in-out infinite alternate;
  flex-shrink: 0;
}

@keyframes logoGlow {
  0% {
    box-shadow: 0 2px 10px rgba(45, 136, 255, 0.3);
  }

  100% {
    box-shadow: 0 2px 20px rgba(45, 136, 255, 0.5), 0 0 30px rgba(79, 70, 229, 0.2);
  }
}

.nav-logo svg {
  width: 20px;
  height: 20px;
  stroke: white;
  fill: none;
}

/* Gradient brand name like popup */
.nav-title-gradient {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.6px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.nav-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.nav-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s;
  position: relative;
}

.nav-btn:active {
  transform: scale(0.9);
  background: var(--bg-card-hover);
}

.nav-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 14px;
  height: 14px;
  background: var(--danger);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--bg-secondary);
}

/* ── Search Bar ── */
.search-container {
  padding: 0 16px 12px;
  background: var(--bg-secondary);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 44px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-tertiary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  height: 100%;
  font-size: 15px;
  color: var(--text-primary);
}

.search-box input::placeholder {
  color: var(--text-tertiary);
}

.search-clear {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--text-tertiary);
  color: var(--bg-primary);
  font-size: 13px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-clear.visible {
  display: flex;
}

/* ── Sync Controls ── */
.sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  font-size: 13px;
  color: var(--text-tertiary);
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--success);
}

.sync-dot.syncing {
  background: var(--warning);
  animation: syncPulse 1s ease-in-out infinite;
}

.sync-dot.error {
  background: var(--danger);
}

@keyframes syncPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.sync-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.sync-btn:active {
  transform: scale(0.95);
}

/* ── Stats Bar (Vault header chips) ── */
.stats-bar {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.stats-bar::-webkit-scrollbar {
  display: none;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all 0.2s;
}

.stat-chip .stat-value {
  color: var(--text-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-chip.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}

.stat-chip.active .stat-value {
  color: var(--accent-light);
}

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 10px;
  overflow: visible;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

/* ── Count Display ── */
.count-display {
  padding: 0 16px 8px;
  font-size: 14px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ── Contact List ── */
.contact-list {
  flex: 1;
  padding: 0 0 calc(var(--tab-height) + var(--safe-bottom) + 16px);
}

.contact-section-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
}

/* ── Inbox Alert Cards (Unified) ── */
.inbox-alert-card {
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.inbox-alert-card:active {
  transform: scale(0.96) translateY(2px);
  filter: brightness(0.9);
}

.inbox-alert-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
  pointer-events: none;
}

[data-theme="light"] .inbox-alert-card {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.inbox-alert-card .contact-avatar {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.inbox-alert-card.reminder {
  --card-accent: #8b5cf6;
}

.inbox-alert-card.birthday {
  --card-accent: #f472b6;
}

.inbox-alert-card.gone-quiet {
  --card-accent: #f59e0b;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  color: var(--text-tertiary);
}

.empty-icon-box {
  width: 64px;
  height: 64px;
  background: var(--bg-secondary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-tertiary);
  opacity: 0.5;
}

.empty-icon-box svg {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  fill: none;
}

.empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-text {
  font-size: 14px;
  line-height: 1.5;
}

.contact-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin: 0 10px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.contact-item:active {
  transform: scale(0.975);
  background: var(--bg-card-active);
  box-shadow: none;
}

/* Status indicator ring - more modern than the side bar */
.contact-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  transition: background 0.3s ease;
}

.contact-item[data-status="hot-lead"] {
  border-left: 4px solid var(--status-hot-lead);
}

.contact-item[data-status="client"] {
  border-left: 4px solid var(--status-client);
}

.contact-item[data-status="nurturing"] {
  border-left: 4px solid var(--status-nurturing);
}

.contact-item[data-status="warm"] {
  border-left: 4px solid var(--status-warm);
}

.contact-item[data-status="new-contact"] {
  border-left: 4px solid var(--status-new-contact);
}

.contact-item[data-status="follow-up"] {
  border-left: 4px solid var(--status-follow-up);
}


.contact-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 18px;
  font-weight: 800;
  color: white;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-glass);
}

.contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.contact-item:active .contact-avatar img {
  transform: scale(1.1);
}

.contact-info {
  flex: 1;
  min-width: 0;
}

.contact-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.contact-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.contact-context {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.contact-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.selection-indicator {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--success);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  border: 2px solid var(--bg-card);
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.selection-indicator svg {
  width: 12px;
  height: 12px;
  stroke: white;
  stroke-width: 4;
}

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}


/* Status badges - matches dashboard/popup exactly */
.contact-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.contact-status-badge.new-contact {
  background: rgba(45, 136, 255, 0.12);
  color: #2d88ff;
  border-color: rgba(45, 136, 255, 0.2);
}

.contact-status-badge.nurturing {
  background: rgba(49, 162, 76, 0.12);
  color: #31a24c;
  border-color: rgba(49, 162, 76, 0.2);
}

.contact-status-badge.hot-lead {
  background: rgba(240, 40, 73, 0.12);
  color: #f02849;
  border-color: rgba(240, 40, 73, 0.2);
}

.contact-status-badge.follow-up {
  background: rgba(247, 185, 40, 0.12);
  color: #f7b928;
  border-color: rgba(247, 185, 40, 0.2);
}

.contact-status-badge.closed {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
}

.contact-status-badge.client {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
}

.contact-status-badge.vip {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.2);
}

.contact-status-badge.warm {
  background: rgba(251, 146, 60, 0.12);
  color: #fb923c;
  border-color: rgba(251, 146, 60, 0.2);
}

.contact-status-badge.cold {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.2);
}

.contact-status-badge.custom {
  background: var(--accent-glow);
  color: var(--accent-light);
  border-color: rgba(45, 136, 255, 0.3);
}

.contact-status-badge.lead {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

.contact-status-badge.prospect {
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
}

.contact-status-badge.personal {
  background: rgba(192, 132, 252, 0.12);
  color: #c084fc;
}

.contact-status-badge.archived {
  background: rgba(107, 114, 128, 0.12);
  color: #6b7280;
}

.contact-chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.contact-chevron svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Contact Detail View — Sidebar Profile Style ── */
.detail-view {
  background: var(--bg-primary);
}

.detail-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  padding-top: var(--safe-top);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.detail-nav-inner {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  padding: 0 8px;
}

.detail-back {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
}

.detail-back svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-back:active {
  opacity: 0.6;
}

.detail-nav-title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

.detail-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 32px);
  overscroll-behavior-x: none;
}

/* ── Profile Hero (Sidebar-style) ── */
.detail-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  position: relative;
  overflow: hidden;
}

/* Subtle gradient glow behind avatar */
.detail-hero::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: var(--accent-gradient);
  opacity: 0.06;
  filter: blur(40px);
  border-radius: 50%;
  pointer-events: none;
}

.detail-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 30px;
  font-weight: 700;
  color: white;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(45, 136, 255, 0.25);
  animation: logoGlow 3s ease-in-out infinite alternate;
}

.detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.detail-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-align: center;
  margin-bottom: 3px;
}

.detail-handle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

/* Status badge in detail — large version */
.detail-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
  margin-bottom: 12px;
}

/* Quick action pills (like sidebar profile) */
.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.detail-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
  cursor: pointer;
}

.detail-action-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-action-btn:active {
  background: var(--bg-card-hover);
  transform: scale(0.96);
}

.detail-action-btn.primary {
  background: var(--accent-glow);
  border-color: rgba(45, 136, 255, 0.3);
  color: var(--accent-light);
}

/* ── Intelligence Metrics Row (Sidebar profile stats) ── */
.detail-intel-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-primary);
  border-top: 1px solid var(--border-primary);
  border-bottom: 1px solid var(--border-primary);
}

.detail-intel-card {
  background: var(--bg-secondary);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.detail-intel-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.detail-intel-value.accent {
  color: var(--accent);
}

.detail-intel-value.success {
  color: var(--success);
}

.detail-intel-value.warning {
  color: var(--warning);
}

.detail-intel-value.danger {
  color: var(--danger);
}

.detail-intel-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

/* ── Detail Section Layout ── */
.detail-section {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.detail-section-title svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Info Cards Grid */
.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.detail-info-card {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
}

.detail-info-label {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: 3px;
}

.detail-info-value {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
  word-break: break-word;
}

.detail-info-card.full {
  grid-column: 1 / -1;
}

/* Notes */
.detail-notes {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 13px;
}

/* ── Labels / Tags System (matches dashboard) ── */
.detail-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.label-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
}

/* Label color palette */
.label-chip[data-color="blue"] {
  background: rgba(45, 136, 255, 0.1);
  color: #5aa7ff;
  border-color: rgba(45, 136, 255, 0.25);
}

.label-chip[data-color="purple"] {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.25);
}

.label-chip[data-color="green"] {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

.label-chip[data-color="amber"] {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.25);
}

.label-chip[data-color="red"] {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.label-chip[data-color="gray"] {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.25);
}

.label-chip {
  background: var(--accent-glow);
  color: var(--accent-light);
  border-color: rgba(45, 136, 255, 0.25);
}

/* Label Editor in modal */
.label-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.label-editor-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.label-editor-chip.active {
  background: var(--accent-glow);
  border-color: rgba(45, 136, 255, 0.4);
  color: var(--accent-light);
}

.label-editor-chip:active {
  transform: scale(0.95);
}

/* ── Facebook Link Button ── */
.detail-fb-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: rgba(24, 119, 242, 0.1);
  border: 1px solid rgba(24, 119, 242, 0.2);
  color: #4599ff;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.detail-fb-link:active {
  transform: scale(0.95);
  opacity: 0.7;
}

.detail-fb-link svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Timeline ── */
.detail-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-event {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}

.timeline-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20px;
  flex-shrink: 0;
}

.timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 4px;
}

.timeline-line {
  flex: 1;
  width: 2px;
  background: var(--border-primary);
  margin-top: 4px;
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-primary);
}

.timeline-date {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ── Highlight Items ── */
.detail-highlights {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.highlight-item {
  padding: 11px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  border-left: 3px solid var(--accent);
  margin-bottom: 8px;
}

.highlight-date {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.meeting-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(45, 136, 255, 0.1);
  border: 1px solid rgba(45, 136, 255, 0.2);
  border-radius: var(--radius-md);
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 500;
  word-break: break-all;
}

.detail-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud-chip {
  padding: 4px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--text-secondary);
}

/* ── Profile Intelligence Grid (new premium layout) ── */
.detail-intel-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-primary);
}

.detail-intel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
}

.detail-intel-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-intel-item-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-intel-item-body {
  flex: 1;
  min-width: 0;
}

.detail-intel-item-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: 1px;
}

.detail-intel-item-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  word-break: break-word;
}

/* ── Meeting Link Card (new premium layout) ── */
.detail-meeting-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: rgba(45, 136, 255, 0.06);
  border: 1px solid rgba(45, 136, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  word-break: break-all;
}

.detail-meeting-link-card:active {
  transform: scale(0.98);
  opacity: 0.8;
}

.detail-meeting-link-card svg {
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
}

/* ── Tag Chips (new standalone styling) ── */
.detail-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-tag-chip {
  background: rgba(45, 136, 255, 0.1);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(45, 136, 255, 0.15);
}

/* ── Login View ── */
.login-view {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-primary);
  width: 100%;
}

.login-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-glow);
  animation: loginLogoGlow 3s ease-in-out infinite alternate;
}

@keyframes loginLogoGlow {
  0% {
    box-shadow: 0 4px 20px rgba(45, 136, 255, 0.3);
  }

  100% {
    box-shadow: 0 4px 30px rgba(45, 136, 255, 0.5), 0 0 40px rgba(79, 70, 229, 0.2);
  }
}

.login-logo svg {
  width: 40px;
  height: 40px;
  stroke: white;
  fill: none;
}

.login-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.login-form {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
  transition: all 0.2s;
}

.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.login-input::placeholder {
  color: var(--text-tertiary);
}

.login-btn {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: white;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border: none;
  box-shadow: 0 2px 10px rgba(45, 136, 255, 0.3);
  position: relative;
  overflow: hidden;
}

/* Shimmer on login button */
.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.4s ease;
}

.login-btn:hover::before {
  left: 120%;
}

.login-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-error {
  font-size: 13px;
  color: var(--danger);
  text-align: center;
  display: none;
  line-height: 1.4;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: var(--radius-md);
}

.login-error.visible {
  display: block;
}

.forgot-password {
  align-self: flex-end;
  font-size: 13px;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  margin-top: -4px;
  margin-bottom: 4px;
  cursor: pointer;
}

.forgot-password:hover {
  text-decoration: underline;
}

.login-footer {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.5;
}

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  text-align: center;
  flex: 1;
}

.empty-icon-box {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(45, 136, 255, 0.25);
  animation: emptyLogoGlow 3s ease-in-out infinite alternate;
}

.empty-icon-box svg {
  width: 44px;
  height: 44px;
  stroke: white;
  fill: none;
}

@keyframes emptyLogoGlow {
  0% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(45, 136, 255, 0.2);
  }

  100% {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(45, 136, 255, 0.4), 0 0 20px rgba(79, 70, 229, 0.2);
  }
}

.empty-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 280px;
}

/* ── Loading State ── */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  flex: 1;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-primary);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 16px;
}

.loading-text {
  font-size: 14px;
  color: var(--text-secondary);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 11px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── iOS Install Prompt ── */
.install-prompt {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-primary);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
  z-index: 900;
  display: none;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.install-prompt-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.install-prompt-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.install-prompt-logo svg {
  width: 24px;
  height: 24px;
  stroke: white;
  fill: none;
}

.install-prompt-text {
  flex: 1;
}

.install-prompt-title {
  font-size: 14px;
  font-weight: 700;
}

.install-prompt-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.install-prompt-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-tertiary);
  font-size: 16px;
}

/* ── Settings View ── */
.settings-section {
  padding: 20px 16px;
}

.settings-group {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.settings-group-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-tertiary);
  padding: 0 4px 8px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.15s;
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item:active {
  background: var(--bg-card-hover);
}

.settings-item-info {
  flex: 1;
}

.settings-item-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 1px;
}

.settings-item-desc {
  font-size: 14px;
  color: var(--text-tertiary);
}

.settings-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-secondary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.settings-footer {
  text-align: center;
  padding: 20px 0;
}

.settings-version {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

/* ── Scroll Container ── */
.scroll-container {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 16px);
  scrollbar-width: none;
  overflow-x: hidden;
  width: 100%;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

/* ── Bottom Tab Bar ── */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tab-height) + var(--safe-bottom));
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: calc(var(--safe-bottom) + 8px);
  z-index: 1000;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  position: relative;
}

.tab-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.tab-item.active {
  color: var(--accent);
}

.tab-item.active svg {
  transform: translateY(-2px);
  stroke: var(--accent);
}

.tab-badge {
  position: absolute;
  top: 8px;
  right: calc(50% - 14px);
  min-width: 14px;
  height: 14px;
  background: var(--danger);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--bg-secondary);
}

/* ── Dashboard / Home View ── */
/* Dashboard stat scroll */
.stat-scroll {
  display: flex;
  gap: 12px;
  padding: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 24px;
  /* Prevent clipping of shadow/bottom border */
}

.stat-scroll::after {
  content: '';
  flex: 0 0 4px;
  /* Extra space at the end */
}

.stat-scroll::-webkit-scrollbar {
  display: none;
}

/* Stat cards matching extension dashboard */
.stat-card {
  flex: 0 0 130px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: 14px 14px 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.25s;
}

.stat-card:active {
  transform: scale(0.97);
}

.stat-card.s-total::before {
  background: var(--accent-gradient);
}

.stat-card.s-active::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.stat-card.s-overdue::before {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.stat-card.s-health::before {
  background: linear-gradient(90deg, #10b981, #2d88ff);
}

.stat-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.stat-card-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.s-total .stat-card-icon {
  background: rgba(45, 136, 255, 0.12);
}

.s-total .stat-card-icon svg {
  stroke: var(--accent);
}

.s-active .stat-card-icon {
  background: rgba(16, 185, 129, 0.12);
}

.s-active .stat-card-icon svg {
  stroke: #10b981;
}

.s-overdue .stat-card-icon {
  background: rgba(239, 68, 68, 0.12);
}

.s-overdue .stat-card-icon svg {
  stroke: #ef4444;
}

.s-health .stat-card-icon {
  background: rgba(16, 185, 129, 0.1);
}

.s-health .stat-card-icon svg {
  stroke: #10b981;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2px;
  animation: statPop 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes statPop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.s-total .stat-value {
  color: var(--accent);
}

.s-active .stat-value {
  color: #10b981;
}

.s-overdue .stat-value {
  color: #ef4444;
}

.s-health .stat-value {
  color: #10b981;
}

.stat-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Dashboard Sections ── */
.dash-section {
  padding: 0 16px 16px;
  animation: fadeIn 0.4s ease-out;
}

.dash-section-title {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.dash-section-title svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Birthday Carousel (matches extension warm gradient) ── */
.birthday-section {
  margin: 0 16px 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 16px 16px 12px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.birthday-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #f97316, #ef4444);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.birthday-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.birthday-header .icon-section {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #d97706;
  /* darker amber for light mode readability */
}

[data-theme="dark"] .birthday-header .icon-section {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.birthday-header h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.birthday-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.birthday-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-glass);
  border-left: 3px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.birthday-card:active {
  background: var(--bg-card-active, var(--bg-elevated));
  transform: scale(0.98);
}

.birthday-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, #f59e0b, #f97316);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
}

.birthday-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.birthday-info {
  min-width: 0;
  flex: 1;
}

.birthday-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.birthday-date {
  font-size: 14px;
  font-weight: 600;
  color: #f59e0b;
  margin-top: 2px;
}

[data-theme="light"] .birthday-section {
  background: #fff;
  border-color: rgba(245, 158, 11, 0.2);
}

[data-theme="light"] .birthday-card {
  background: #fefce8;
  border-color: rgba(245, 158, 11, 0.2);
  border-left-color: #f59e0b;
}

/* ── Health Gauge Card ── */
.health-card {
  margin: 0 16px 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.health-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #2d88ff);
}

.health-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.health-percent {
  font-size: 34px;
  font-weight: 800;
  color: var(--success);
}

.health-title {
  font-size: 15px;
  font-weight: 700;
}

.health-desc {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.health-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--border-primary);
  border-radius: 3px;
  overflow: hidden;
}

.health-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #2d88ff);
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Priority Items ── */
.priority-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s;
}

.priority-item:active {
  background: var(--bg-card-hover);
  transform: scale(0.99);
}

.priority-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.priority-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.priority-content {
  flex: 1;
  min-width: 0;
}

.priority-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.priority-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── Activity Feed (Premium Series) ── */
.activity-list {
  display: flex;
  flex-direction: column;
  padding: 8px 14px 40px;
  gap: 12px;
}

.activity-date-header {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 14px;
  margin-bottom: 2px;
  padding-left: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.activity-date-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.activity-item:active {
  transform: scale(0.97);
  background: var(--bg-card);
  box-shadow: none;
}

/* Glassy accent for cards */
.activity-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-gradient);
  opacity: 0.15;
}

.activity-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: white;
  flex-shrink: 0;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.activity-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.activity-type-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 5;
  border: 2px solid var(--bg-secondary);
}

.activity-type-badge svg {
  width: 11px;
  height: 11px;
  stroke: white;
  fill: none;
  stroke-width: 3;
}

.activity-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.activity-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.activity-text {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-indicator {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.activity-type-badge svg rect,
.activity-type-badge svg path,
.activity-type-badge svg polyline,
.activity-type-badge svg circle,
.activity-type-badge svg polygon {
  stroke: white;
}

.activity-body {
  flex: 1;
  min-width: 0;
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

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

.activity-time {
  font-size: 13px;
  color: var(--text-tertiary);
}

.activity-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}


/* ── FAB — Quick Add Contact ── */
.fab-add {
  position: fixed;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 20px);
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--accent-gradient);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow:
    0 4px 16px rgba(45, 136, 255, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: fabEntrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.fab-add svg {
  width: 26px;
  height: 26px;
  stroke: white;
  fill: none;
  transition: transform 0.2s ease;
}

.fab-add:active {
  transform: scale(0.9);
  box-shadow: 0 2px 8px rgba(45, 136, 255, 0.4);
}

.fab-add:active svg {
  transform: rotate(90deg);
}

@keyframes fabEntrance {
  0% {
    transform: scale(0) rotate(-90deg);
    opacity: 0;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Subtle glow pulse on FAB */
.fab-add::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 20px;
  background: var(--accent-gradient);
  opacity: 0;
  z-index: -1;
  animation: fabGlow 3s ease-in-out infinite alternate;
}

@keyframes fabGlow {
  0% {
    opacity: 0;
    transform: scale(1);
  }

  100% {
    opacity: 0.25;
    transform: scale(1.08);
  }
}

/* ── Modal & Forms ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.25s ease-out;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-y;
}

.modal-sheet {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-sheet);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 1px solid var(--border-primary);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.modal-handle-bar {
  width: 36px;
  height: 4px;
  background: var(--border-primary);
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-primary);
  flex-shrink: 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: none;
  font-size: 15px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.modal-save {
  background: none;
  font-size: 15px;
  color: var(--accent);
  font-weight: 700;
}

.modal-save:active,
.modal-close:active {
  opacity: 0.6;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: calc(40px + var(--safe-bottom));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-tertiary);
  letter-spacing: 0.6px;
  padding-left: 2px;
}

.form-textarea {
  width: 100%;
  min-height: 90px;
  padding: 11px 13px;
  background: var(--bg-input);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.5;
  outline: none;
  resize: none;
  transition: border-color 0.2s;
}

.form-textarea:focus {
  border-color: var(--accent);
}

/* ── Status Selector Grid ── */
.status-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.status-opt {
  padding: 11px 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
  transition: all 0.15s;
  cursor: pointer;
}

.status-opt.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent-light);
}

.status-opt:active {
  transform: scale(0.95);
}

/* ── Vault Filter Chips (full-width style) ── */
.filter-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 0 8px;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  padding: 6px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-chip.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(45, 136, 255, 0.3);
}

.filter-chip:active {
  transform: scale(0.95);
}

/* ── A-Z Scrubber ── */
.az-scrubber {
  position: fixed;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  z-index: 100;
  background: rgba(36, 37, 38, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 4px 3px;
  border-radius: 14px;
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 260px);
  max-height: calc(100dvh - 260px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.az-scrubber::-webkit-scrollbar {
  display: none;
}

[data-theme="light"] .az-scrubber {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.05);
}

.az-letter {
  font-size: 8px;
  font-weight: 800;
  color: var(--text-tertiary);
  width: 14px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
  border-radius: 4px;
  flex-shrink: 0;
}

.az-letter:active {
  color: var(--accent);
  background: var(--accent-glow);
  transform: scale(1.3);
}

/* ── Animation ── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Empty focus card ── */
.empty-focus {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
  padding: 28px 16px;
  border: 1px dashed var(--border-primary);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

/* ── Responsive ── */
@media (min-width: 768px) {
  .login-form {
    max-width: 380px;
  }

  .contact-list {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }

  .detail-scroll {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }
}

/* ── Pull to Refresh ── */
.ptr-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0;
  overflow: hidden;
  transition: height 0.2s;
}

.ptr-indicator.active {
  height: 50px;
}

.ptr-indicator .loading-spinner {
  width: 24px;
  height: 24px;
  margin-bottom: 0;
}

/* ── Gone Quiet section (home) ── */
.contact-list-flat {
  padding: 0;
}

/* ── SVG Icon Styling (lucide-style) ── */
.icon-inline {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.chip-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 5px;
  font-size: 1.1em;
  line-height: 1;
}

.icon-section {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--accent-gradient-warm);
  color: white;
  border-radius: 10px;
  margin-right: 8px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.icon-section svg {
  width: 20px;
  height: 20px;
  stroke: white;
  stroke-width: 2.2;
}

.empty-focus-icon {
  background: var(--accent-gradient-green);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
  animation: logoGlow 3s ease-in-out infinite alternate;
}

.empty-focus-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 3;
}

/* ── Label Chips refactor ── */
.label-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  margin-right: 6px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.label-chip[data-color="purple"] {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.label-chip[data-color="blue"] {
  background: rgba(37, 99, 235, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.label-chip[data-color="green"] {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.label-chip[data-color="amber"] {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.label-chip[data-color="red"] {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.label-editor-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
  cursor: pointer;
}

.label-editor-chip.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ── Contact Card Micro-Tags (work, location, etc.) ── */
.contact-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.contact-detail-tag {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px 6px;
  line-height: 1.3;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-detail-tag svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Contact Card Activity Indicator ── */
.contact-activity {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-top: 3px;
}

.contact-activity svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.contact-activity.active {
  color: var(--success);
}

.contact-activity.quiet {
  color: var(--warning);
}

/* ── Contact Card Birthday Proximity ── */
.contact-birthday {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}

.contact-birthday svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ── Tag Chips in Contact List ── */
.contact-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}

.contact-tag-chip {
  font-size: 13px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(45, 136, 255, 0.08);
  color: var(--accent-light);
  border: 1px solid rgba(45, 136, 255, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── Tag Filter Row ── */
.tag-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 0 8px;
}

.tag-filter-row::-webkit-scrollbar {
  display: none;
}

.tag-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-primary);
  background: var(--bg-card);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}

.tag-filter-chip.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}

.tag-filter-count {
  font-size: 13px;
  opacity: 0.7;
}

/* ── Activity Filter Row ── */
.activity-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 0 8px;
  align-items: center;
}

.activity-filter-row::-webkit-scrollbar {
  display: none;
}

.activity-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-primary);
  background: var(--bg-card);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}

.activity-filter-chip.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ── Detail View: Profile Details Grid (expanded for arrays) ── */
.detail-info-value-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-info-value-item {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

/* ── Detail View: Mutual Friends ── */
.detail-mutual-friends {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.detail-mutual-friends svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-tertiary);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* ── Detail View: Free-text Tags ── */
.detail-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: rgba(45, 136, 255, 0.08);
  color: var(--accent-light);
  border: 1px solid rgba(45, 136, 255, 0.15);
}

/* ── Detail View: Notes with links ── */
.detail-notes a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Detail View: Websites list ── */
.detail-website-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--accent-light);
  text-decoration: none;
  word-break: break-all;
}

.detail-website-link svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}



/* ── Sort Dropdown ── */
.sort-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 24px 4px 8px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238a8d91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

/* label-chip gray for free-text tags */
.label-chip[data-color="gray"] {
  background: rgba(138, 141, 145, 0.12);
  color: var(--text-secondary);
  border: 1px solid rgba(138, 141, 145, 0.2);
}

/* ══════════════════════════════════════════════════
   MOBILE DETAIL VIEW — Sidebar Replica Styles
   ══════════════════════════════════════════════════ */

/* Profile Card — Ultra Premium Hero */
.mob-profile-card {
  padding: 28px 16px 20px;
  position: relative;
  overflow: hidden;
  transition: opacity 0.15s;
}

.mob-profile-card:active {
  opacity: 0.85;
}

.mob-profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mob-avatar-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(var(--ring-color, var(--accent)) 0deg,
      color-mix(in srgb, var(--ring-color, var(--accent)) 60%, transparent) 120deg,
      var(--ring-color, var(--accent)) 240deg,
      color-mix(in srgb, var(--ring-color, var(--accent)) 60%, transparent) 360deg);
  box-shadow: 0 0 20px color-mix(in srgb, var(--ring-color, var(--accent)) 30%, transparent);
  flex-shrink: 0;
  animation: ringPulse 4s ease-in-out infinite;
}

@keyframes ringPulse {

  0%,
  100% {
    box-shadow: 0 0 16px color-mix(in srgb, var(--ring-color, var(--accent)) 25%, transparent);
  }

  50% {
    box-shadow: 0 0 28px color-mix(in srgb, var(--ring-color, var(--accent)) 40%, transparent);
  }
}

.mob-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 3px solid var(--bg-primary);
}

.mob-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  border-radius: 50%;
}

.mob-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.5px;
}

.mob-profile-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 10px;
  text-align: center;
  letter-spacing: -0.3px;
}

.mob-profile-handle {
  font-size: 14px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-align: center;
}

.mob-profile-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.mob-profile-status {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 99px;
  letter-spacing: 0.2px;
}

.mob-profile-noted {
  margin-top: 2px;
  text-align: center;
}

.mob-profile-noted>div {
  justify-content: center;
}

.mob-profile-tap-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.6;
  letter-spacing: 0.2px;
}

.mob-profile-tap-hint svg {
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

.mob-avatar {
  position: relative;
  flex-shrink: 0;
}

/* Smart Brief */
.mob-smart-brief {
  background: var(--bg-card);
  border-radius: 14px;
  margin: 0 12px 8px;
  padding: 14px 16px;
  border: 1px solid var(--border-glass);
}

.mob-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.mob-brief-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mob-brief-item {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.mob-brief-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  color: var(--accent);
  opacity: 0.8;
}

.mob-brief-icon svg {
  stroke: currentColor;
}

.mob-brief-label {
  color: var(--text-tertiary);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.mob-brief-value {
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
}


/* Collapsible Sections */
.mob-section {}

.mob-expand-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}

.mob-expand-btn:active {
  background: var(--bg-card-hover);
}

.mob-expand-btn svg {
  flex-shrink: 0;
}

.mob-expand-icon {
  font-size: 18px;
  font-weight: 300;
  color: var(--text-tertiary);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.mob-expand-body {
  padding: 0 16px 16px;
}

/* Chips */
.mob-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.mob-chip {
  padding: 8px 14px;
  border-radius: 99px;
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.mob-chip:active,
.mob-chip.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.mob-chip-custom {
  border-style: dashed;
}

/* Status Grid */
.mob-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mob-status-grid .status-opt {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.mob-status-grid .status-opt:active,
.mob-status-grid .status-opt.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Inputs */
.mob-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  margin-top: 6px;
  transition: border-color .2s;
}

.mob-input:focus {
  border-color: var(--accent);
}

/* Textarea */
.mob-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.5;
  transition: border-color .2s;
}

.mob-textarea:focus {
  border-color: var(--accent);
}

/* Notes field-level save button */
.mob-save-field-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Timeline */
.mob-tl-log-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.mob-tl-log-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all .15s;
}

.mob-tl-log-btn:active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.mob-tl-log-btn svg {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mob-timeline-list {
  position: relative;
  padding: 4px 4px 12px 16px;
  margin-left: 6px;
}

.mob-timeline-list::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(to bottom, var(--border-glass), transparent);
  border-radius: 1px;
}

.mob-tl-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 6px;
  position: relative;
}

.mob-tl-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  margin-top: 5px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 3px var(--bg-card);
  background: var(--accent);
  flex-shrink: 0;
}

.mob-tl-content {
  flex: 1;
  min-width: 0;
}

.mob-tl-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mob-tl-icon {
  display: flex;
  align-items: center;
  color: var(--text-tertiary);
}

.mob-tl-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

.mob-tl-date {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 1px;
}

/* Highlights */
.mob-hl-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  margin-bottom: 6px;
}

.mob-hl-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.mob-hl-date {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Reminder chips */
.mob-reminder-chip {
  padding: 8px 14px;
  border-radius: 99px;
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all .15s;
}

.mob-reminder-chip:active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Footer: Save + Delete */
.mob-footer {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--border-glass);
  margin-top: 8px;
}

.mob-save-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 16px rgba(8, 102, 255, 0.25);
  transition: opacity .15s;
}

.mob-save-btn:disabled {
  opacity: 0.6;
}

.mob-save-btn svg {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mob-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mob-delete-btn svg {
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Stat Executive Cards (1:1 Desktop Parity) ── */
.home-stats {
  padding: 8px 16px 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border-primary);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 86px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.stat-card:active {
  transform: scale(0.96);
  background: var(--bg-card-hover);
}

.stat-card .stat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-card .stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card .stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Stat Variants & Urgency */
.stat-total .stat-icon {
  background: rgba(45, 136, 255, 0.12);
  color: #2d88ff;
}

.stat-active .stat-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.stat-quiet .stat-icon {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.stat-birthday .stat-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.stat-overdue .stat-icon {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.stat-card.urgency-high {
  border-color: rgba(239, 68, 68, 0.25);
  background: linear-gradient(135deg, var(--bg-card), rgba(239, 68, 68, 0.04));
}

.stat-card.urgency-high .stat-value {
  color: #ff4d4d;
}

.stat-card.urgency-med {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(135deg, var(--bg-card), rgba(245, 158, 11, 0.04));
}

/* Relationship Health Bar */
.health-container {
  padding: 0 16px 20px;
}

.health-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-sm);
}

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

.health-title {
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.health-percentage {
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.health-bar-bg {
  height: 10px;
  background: var(--bg-elevated);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.health-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.5s ease;
}

/* ── Selection Mode & Bulk UI ── */
.contact-item.selection-mode {
  padding-left: 56px;
  position: relative;
}

.contact-checkbox {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.check-box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: var(--bg-primary);
}

.check-box.checked {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.contact-item.selected {
  background: var(--accent-glow);
}

.bulk-action-bar {
  position: fixed;
  bottom: calc(var(--tab-height) + 16px + var(--safe-bottom));
  left: 16px;
  right: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 24px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), var(--shadow-sm);
  z-index: 1000;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.bulk-action-bar.visible {
  transform: translateY(0);
}

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

.bulk-count {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}


/* ── Detail View Intelligence Refinement (1:1 Desktop Parity) ── */
.mob-quiet-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px dashed rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mob-quiet-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mob-quiet-text {
  display: flex;
  flex-direction: column;
}

.mob-quiet-text b {
  font-size: 13px;
  font-weight: 800;
  color: #ef4444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mob-quiet-text span {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.mob-brief-item.urgent .mob-brief-value {
  color: #ef4444;
  font-weight: 800;
  background: rgba(239, 68, 68, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.mob-brief-item.urgent .mob-brief-label {
  color: #ef4444;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════
   EXECUTIVE DAILY BRIEF — 1:1 Desktop Parity
   ══════════════════════════════════════════════════ */

.daily-brief {
  margin: 12px 16px 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.3s ease-out;
  position: relative;
}

.daily-brief::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2d88ff, #4f46e5, #7c3aed);
}

.brief-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.brief-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.brief-icon-wrap svg {
  stroke: white;
}

.brief-title-block {
  flex: 1;
  min-width: 0;
}

.brief-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.8px;
}

.brief-date {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ── Expanded Brief Sections (Desktop parity) ── */
.digest-section {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
}

.digest-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

/* Collapsible sub-section toggle (People in Motion, Top Engaged, Data Completeness) */
.digest-collapsible {
  padding-top: 0;
  padding-bottom: 0;
}

.digest-sub-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  background: none;
  border: none;
  border-top: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}

.digest-sub-toggle:active {
  opacity: 0.7;
}

.brief-sub-icon {
  font-size: 17px;
  font-weight: 300;
  color: var(--text-tertiary);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.digest-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.digest-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.digest-stat:active {
  transform: scale(0.92);
  background: var(--bg-card-active);
  border-color: var(--accent-light);
}

.digest-stat-value {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.digest-stat-label {
  font-size: 14px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.digest-completeness {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.digest-complete-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.digest-complete-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.digest-complete-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease-out;
}

.digest-complete-text {
  font-size: 14px;
  color: var(--text-tertiary);
}

.digest-greeting {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.digest-greeting-text {
  flex: 1;
}

.digest-greeting-hello {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.digest-greeting-summary {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.digest-health {
  width: 85px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.digest-health-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: conic-gradient(var(--health-color) var(--health-pct), var(--bg-elevated) 0);
  padding: 3px;
}

.digest-health-ring::after {
  content: '';
  position: absolute;
  inset: 5px;
  background: var(--bg-card);
  border-radius: 50%;
}

.digest-health-score {
  position: relative;
  z-index: 1;
  font-size: 16px;
  font-weight: 900;
  color: var(--text-primary);
}

.digest-health-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 1px;
  font-weight: 500;
  text-align: center;
}

.brief-toggle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.brief-toggle svg {
  stroke: currentColor;
  fill: none;
}

.brief-toggle:active {
  opacity: 0.6;
}

.brief-body {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
  overflow: hidden;
  max-height: 2000px;
  opacity: 1;
  transition: max-height 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
}

.brief-body.brief-collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

.brief-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border-subtle);
}

.brief-item:last-child {
  border-bottom: none;
}

.brief-item:active {
  background: var(--bg-card-hover);
}

.brief-item-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.brief-item-text {
  flex: 1;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.brief-item-text b {
  color: var(--text-primary);
  font-weight: 700;
}

.brief-more {
  padding: 8px 16px 16px;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  text-align: center;
}

/* ══════════════════════════════════════════════════
   SPOTLIGHT FILTER BAR — 1:1 Desktop Parity
   ══════════════════════════════════════════════════ */

.spotlight-filter-bar {
  padding: 10px 16px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.spotlight-label {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spotlight-label::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #f59e0b, #f02849);
  border-radius: 3px;
  flex-shrink: 0;
}

.spotlight-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.spotlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border-glass);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.spotlight-chip:active {
  transform: scale(0.96);
}

.spotlight-chip.active {
  background: var(--chip-color, var(--accent));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.spotlight-chip-count {
  background: rgba(0, 0, 0, 0.2);
  color: white;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.spotlight-chip.active .spotlight-chip-count {
  background: rgba(255, 255, 255, 0.25);
}

/* ══════════════════════════════════════════════════
   QUICK ACTION PILLS (Detail Profile Card)
   ══════════════════════════════════════════════════ */

.mob-quick-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.mob-quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  color: var(--accent-light);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.mob-quick-action-btn:active {
  transform: scale(0.96);
  opacity: 0.8;
}

.mob-quick-action-btn svg {
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}


.mob-quick-action-meeting {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.06);
}

/* ── Add Contact Modal: tighter section spacing ───────────────────────── */
#modal-add .mob-section {}

#modal-add .mob-expand-btn {
  padding: 11px 16px;
  /* reduced from 14px */
}

#modal-add .mob-expand-body {
  padding: 0 16px 12px;
  /* reduced bottom */
}

/* ── Avatar circle in Add Contact modal ──────────────────────────────── */
.add-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0 16px;
}

.add-avatar-circle {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px dashed var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}

.add-avatar-circle:active {
  transform: scale(0.94);
}

.add-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.add-avatar-initials {
  font-size: 28px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  pointer-events: none;
  user-select: none;
}

.add-avatar-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-tertiary);
}

.add-avatar-placeholder svg {
  opacity: 0.6;
}

.add-avatar-hint {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-top: 7px;
  letter-spacing: 0.1px;
}

/* ── iOS/Safari WebKit AutoFill Override ──
   Prevents Safari from overriding inputs with bright yellow in dark mode.
   Uses a 1000px inset box-shadow trick to force our background color. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--bg-input) inset !important;
  caret-color: var(--text-primary);
}