/* =============================================
   KNOWTHEM — PAGE STYLES
   ============================================= */

/* =============================================
   LANDING PAGE
   ============================================= */
.landing-body { background: var(--bg-primary); }

/* ── Glassmorphic bottom scroll-fade ──────────────────────────────────
   A fixed 80px frosted-glass gradient at the viewport bottom.
   As the user scrolls, content dissolves into the background rather
   than hard-cutting at the screen edge — the "fading continuity" effect.
   pointer-events:none means it never blocks clicks underneath.
   ───────────────────────────────────────────────────────────────────── */
.kt-scroll-fade {
  pointer-events: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 9;
  /* Gradient from bg colour → transparent, upward */
  background: linear-gradient(to top, var(--bg-primary) 0%, transparent 100%);
  /* Frosted glass over scrolling text */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  /* Mask fades the blur itself so the top edge is invisible */
  -webkit-mask-image: linear-gradient(to top, black 40%, transparent 100%);
  mask-image: linear-gradient(to top, black 40%, transparent 100%);
  /* Only visible on landing/public pages */
  display: none;
}
.landing-body .kt-scroll-fade { display: block; }

/* Hide when user has scrolled to the very bottom (near footer) */
.kt-scroll-fade.at-bottom { opacity: 0; transition: opacity 0.3s ease; }

/* ── Smooth anchor scroll-offset ─────────────────────────────────────
   Prevents sticky nav (≈72px tall) from overlapping anchor targets.
   Matches the reference's scroll-margin-top:120px pattern.
   ───────────────────────────────────────────────────────────────────── */
.landing-body h2[id],
.landing-body h3[id],
.landing-body h4[id] {
  scroll-margin-top: 96px;
}

.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 60px;
  background: rgba(250,250,248,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.landing-nav-logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.landing-nav-links { display: flex; align-items: center; gap: var(--sp-6); }
.landing-nav-links a { font-size: var(--text-sm); color: var(--text-secondary); transition: color var(--dur-fast); }
.landing-nav-links a:hover { color: var(--text-primary); }
.landing-nav-actions { display: flex; gap: var(--sp-3); }

/* Hero */
.hero {
  text-align: center;
  padding: 100px 24px 80px;
  max-width: 780px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); color: var(--accent);
  padding: 6px 16px; border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 600;
  margin-bottom: var(--sp-5);
}
.hero h1 { font-size: clamp(32px, 6vw, 52px); font-weight: 800; line-height: 1.1; margin-bottom: var(--sp-5); }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 18px; color: var(--text-secondary); max-width: 540px; margin: 0 auto var(--sp-8); line-height: 1.7; }
.hero-actions { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }

/* Preview */
.hero-preview {
  max-width: 1100px; margin: 0 auto 80px;
  padding: 0 24px;
}
.hero-preview-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 8px 60px rgba(0,0,0,0.08);
  overflow: hidden;
}
.hero-preview-bar {
  background: var(--bg-secondary);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff5f57; } .dot-yellow { background: #ffbd2e; } .dot-green { background: #28c840; }

/* Responsive mockup: desktop by default, mobile on small screens */
.preview-desktop { display: grid; }
.preview-mobile  { display: none; }

@media (max-width: 768px) {
  .hero-preview { max-width: 100%; padding: 0 16px; margin-bottom: 48px; }
  .preview-desktop { display: none !important; }
  .preview-mobile  { display: block !important; }
}

/* Features */
.features { padding: 80px 60px; background: var(--bg-secondary); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); max-width: 1100px; margin: var(--sp-8) auto 0; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-4);
  background: var(--accent-soft); color: var(--accent);
}
.feature-card h3 { font-size: var(--text-base); font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.feature-card p { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; }

/* How it works */
.how-it-works { padding: 80px 60px; max-width: 1100px; margin: 0 auto; text-align: center; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); margin-top: var(--sp-8); position: relative; }

/* Dashed connector line between steps — desktop only */
.steps::before {
  content: '';
  position: absolute;
  top: 40px; /* vertically centered with the step-num circles */
  left: calc(16.666% + 20px); /* start after centre of step 1's circle */
  right: calc(16.666% + 20px); /* end before centre of step 3's circle */
  height: 2px;
  border-top: 2px dashed var(--border);
  z-index: 0;
}

/* Forward arrow heads sitting on the connector */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 31px; /* aligns with step-num centre */
  right: calc(-1 * var(--sp-6) / 2 - 6px);
  width: 10px; height: 10px;
  border-top: 2px solid var(--border);
  border-right: 2px solid var(--border);
  transform: rotate(45deg);
  z-index: 1;
  background: var(--bg-primary);
}

.step { padding: var(--sp-6); position: relative; z-index: 1; }
.step-num {
  width: 40px; height: 40px; border-radius: var(--radius-pill);
  background: var(--accent); color: #fff;
  font-size: var(--text-base); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-4);
  position: relative; z-index: 2;
  box-shadow: 0 0 0 6px var(--bg-primary); /* punch-out so the dashed line doesn't cross the circle */
}
.step h3 { font-size: var(--text-base); font-weight: 600; margin-bottom: 8px; }
.step p { font-size: var(--text-sm); color: var(--text-secondary); }

/* Social Proof */
.social-proof { background: var(--bg-secondary); padding: 60px; text-align: center; }
.social-proof-quote {
  font-size: var(--text-xl); font-weight: 300; color: var(--text-primary);
  max-width: 600px; margin: 0 auto var(--sp-5); font-style: italic; line-height: 1.6;
}
.social-proof-author { font-size: var(--text-sm); color: var(--text-muted); font-weight: 500; }

/* Footer */
.landing-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-8) 60px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-sidebar);
}
.landing-footer p { font-size: var(--text-sm); color: var(--text-muted); }
.footer-links { display: flex; gap: var(--sp-5); }
.footer-links a { font-size: var(--text-sm); color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

/* Section center */
.section-center { text-align: center; }
.section-center h2 { font-size: 32px; font-weight: 800; margin-bottom: var(--sp-3); }
.section-center p { font-size: var(--text-base); color: var(--text-secondary); }

/* =============================================
   AUTH PAGES
   ============================================= */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  background: linear-gradient(160deg, var(--accent-soft) 0%, #e0eed9 40%, #cce3c2 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--sp-12);
  text-align: center;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234F6F52' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.auth-left-logo { display: flex; align-items: center; gap: var(--sp-2); font-size: 24px; font-weight: 800; color: var(--accent); margin-bottom: var(--sp-8); position: relative; }
.auth-tagline { font-size: 28px; font-weight: 700; color: var(--accent); line-height: 1.3; margin-bottom: var(--sp-3); position: relative; }
.auth-sub { font-size: var(--text-base); color: var(--text-secondary); position: relative; }

.auth-left-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.auth-right {
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-12);
  background: var(--bg-primary);
}

.auth-card {
  width: 100%; max-width: 420px;
}
.auth-card-title { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.auth-card-subtitle { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--sp-6); }

.auth-form { display: flex; flex-direction: column; gap: var(--sp-4); }

.auth-divider {
  display: flex; align-items: center; gap: var(--sp-3);
  margin: var(--sp-2) 0;
}
.auth-divider::before,.auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-divider span { font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap; }

.oauth-btn {
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-3);
  padding: 12px var(--sp-5);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--bg-card);
  font-size: var(--text-sm); font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease);
  color: var(--text-primary);
}
.oauth-btn:hover { border-color: var(--border-focus); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.oauth-btn:active { transform: scale(0.98); }

.auth-footer-text { text-align: center; font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--sp-4); }
.auth-footer-text a { color: var(--accent); font-weight: 600; }

.password-strength { margin-top: 6px; }
.strength-bar { height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; }
.strength-fill { height: 100%; border-radius: 2px; transition: width 0.4s var(--ease), background 0.4s; }
.strength-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* =============================================
   DASHBOARD
   ============================================= */
.greeting-section { margin-bottom: var(--sp-6); }
.greeting-title { font-size: 26px; font-weight: 700; }
.greeting-sub { font-size: var(--text-sm); color: var(--text-secondary); margin-top: 4px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.recently-added-scroll {
  display: flex; gap: var(--sp-4); overflow-x: auto;
  padding-bottom: var(--sp-2); scroll-snap-type: x mandatory;
}
.recently-added-scroll::-webkit-scrollbar { height: 0; }

.recent-person-card {
  flex-shrink: 0; width: 150px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-4);
  text-align: center; cursor: pointer; scroll-snap-align: start;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.recent-person-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.recent-person-card .avatar { margin: 0 auto var(--sp-3); }
.recent-person-card .name { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.recent-person-card .relation { font-size: var(--text-xs); color: var(--text-muted); }
.recent-person-card .time { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

.dashboard-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--sp-6);
}

.people-table-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.people-table-header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
}
.people-table-filters { display: flex; gap: var(--sp-2); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.people-table-filters::-webkit-scrollbar { display: none; }

/* =============================================
   ANALYTICS PAGE
   ============================================= */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}

/* =============================================
   RELATIONSHIP STRENGTH SECTION
   ============================================= */

/* Section wrapper — sits between analytics-grid and tag card */
.strength-section {
  margin-top: 20px;
}
.strength-section .section-header {
  align-items: flex-start;
  margin-bottom: var(--sp-4);
}
.strength-section .section-header > div > p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Chip filter row ── */
.strength-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.strength-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.strength-chip:hover {
  background: var(--chip-bg, var(--accent-soft));
  color: var(--chip-color, var(--accent));
  border-color: var(--chip-color, var(--accent));
  transform: translateY(-1px);
}
.strength-chip.active {
  background: var(--chip-bg, var(--accent-soft));
  color: var(--chip-color, var(--accent));
  border-color: var(--chip-color, var(--accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--chip-color, var(--accent)) 14%, transparent);
}
.strength-chip.active:hover { transform: none; }
.strength-chip-count {
  opacity: 0.75;
  font-weight: 700;
  font-size: 11px;
}

/* ── Card grid ── */
/* auto-fill: 6 cols on wide desktop, shrinks naturally */
.strength-people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

/* ── Individual card ── */
.strength-person-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition:
    transform var(--dur-base) var(--ease),
    box-shadow var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease);
}
.strength-person-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}
.strength-person-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

/* ── Strength bar ── */
.strength-bar-track {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-secondary);
  overflow: hidden;
  margin-top: 12px;
}
.strength-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.7s var(--ease);
}

/* ── See more CTA ── */
.strength-see-more {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.strength-see-more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: color var(--dur-fast), gap var(--dur-fast);
}
.strength-see-more-link:hover {
  color: var(--accent-hover);
  gap: 8px;
}

/* ── Empty state ── */
.strength-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.action-menu {
  position: relative;
}
.action-menu-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  min-width: 160px; z-index: 50;
  overflow: hidden;
  animation: fade-in var(--dur-fast) var(--ease);
}
.action-menu-dropdown button {
  display: flex; align-items: center; gap: var(--sp-2);
  width: 100%; padding: 10px var(--sp-4);
  font-size: var(--text-sm); color: var(--text-primary);
  background: transparent; border: none; cursor: pointer;
  transition: background var(--dur-fast);
  text-align: left;
}
.action-menu-dropdown button:hover { background: var(--bg-secondary); }
.action-menu-dropdown button.danger { color: var(--danger); }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border);
  font-size: var(--text-sm); color: var(--text-secondary);
}
.pagination-pages { display: flex; gap: var(--sp-1); }
.page-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm); cursor: pointer;
  background: transparent; border: 1px solid transparent;
  transition: all var(--dur-fast);
  color: var(--text-secondary);
}
.page-btn:hover { background: var(--bg-secondary); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* =============================================
   PEOPLE PAGE
   ============================================= */
.people-controls {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}
.people-controls .search-bar { flex: 1; min-width: 200px; }
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.view-btn {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer; color: var(--text-muted);
  transition: all var(--dur-fast);
}
.view-btn.active { background: var(--accent-soft); color: var(--accent); }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4); }

/* =============================================
   PERSON DETAIL PAGE
   ============================================= */
.person-detail-hero {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-6);
  display: flex; gap: var(--sp-6); align-items: flex-start;
  margin-bottom: var(--sp-6);
}
.person-detail-info { flex: 1; }
.person-detail-name { font-size: 24px; font-weight: 700; color: var(--text-primary); }
.person-detail-relation { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--sp-3); }
.person-detail-tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.person-detail-notes {
  background: var(--accent-soft); border-radius: var(--radius-md);
  padding: var(--sp-4); font-size: var(--text-sm); line-height: 1.7;
  color: var(--text-primary); position: relative;
}
.person-detail-notes::before { content: '\201C'; font-size: 36px; color: var(--accent); position: absolute; top: 4px; left: 12px; line-height: 1; }
.person-detail-notes p { padding-left: 20px; }

.person-detail-contact { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-4); }
.contact-row { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--text-sm); text-decoration: none; color: var(--text-secondary); transition: color var(--dur-fast); }
.contact-row:hover { color: var(--accent); }
.contact-row svg { color: var(--accent); flex-shrink: 0; }

/* Desktop-only Profile layout overrides */
@media (min-width: 769px) {
  .person-desktop-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--sp-6);
    align-items: start;
  }
  .person-main-col { min-width: 0; }
  .person-side-col {
    display: flex; flex-direction: column; gap: var(--sp-6);
  }
  .person-detail-contact {
    flex-direction: row; flex-wrap: wrap; gap: 32px;
    padding-top: var(--sp-5); margin-top: var(--sp-5);
    border-top: 1px solid var(--border);
  }
  .contact-row { font-size: 14px; font-weight: 500; }
}

/* ─── Tablet: 769px–1024px — person profile single-column stack ─── */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Stack main + sidebar vertically instead of side-by-side */
  .person-desktop-grid {
    grid-template-columns: 1fr;
  }

  /* Sidebar cards appear below main content */
  .person-side-col {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--sp-4);
    margin-top: 0;
  }
  /* Each sidebar card takes at least half width, grows to fill */
  .person-side-col > .card {
    flex: 1 1 280px;
    min-width: 280px;
  }

  /* Hero: allow a bit less padding to breathe */
  .person-detail-hero {
    padding: var(--sp-4) var(--sp-5);
  }

  /* Action buttons: wrap to 2 rows if needed */
  .person-actions-desktop {
    max-width: 220px !important;
    gap: 5px;
  }

  /* Metadata stats: 2×2 grid instead of 4-col row */
  #metadata-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Hero row: allow wrap so buttons don't clip the name */
  .person-hero-row {
    flex-wrap: wrap !important;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .person-side-col { display: flex; flex-direction: column; gap: var(--sp-4); margin-top: var(--sp-6); }
  /* Hide the About card on mobile as info is already in the hero */
  .person-side-col > .card:nth-child(2) { display: none; }
}

/* About Sarah list in sidebar */
.about-list { display: flex; flex-direction: column; gap: 12px; }
.about-row { display: flex; align-items: flex-start; font-size: 13px; }
.about-row > svg { color: var(--text-muted); margin-right: 8px; flex-shrink: 0; margin-top: 2px; }
.about-row > span { color: var(--text-secondary); width: 80px; flex-shrink: 0; }
.about-val { color: var(--text-primary); font-weight: 500; text-align: right; flex: 1; word-break: break-word; }

/* Avatar wrapper & overlay */
.person-avatar-wrap {
  position: relative; flex-shrink: 0; cursor: pointer;
}
.person-avatar-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.person-fav-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--bg-card); color: var(--warning);
  border-radius: 50%; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border: 2px solid var(--bg-card);
}
.person-fav-badge svg { fill: var(--warning); color: var(--warning); }

/* Hero top row: identity + actions */
/* Hero row: identity left, desktop-actions right */
.person-hero-row {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px; flex-wrap: nowrap;
}
.person-hero-identity { min-width: 0; flex: 1; }

/* Desktop action buttons — visible on desktop, hidden on mobile */
.person-actions-desktop {
  display: flex; gap: 6px; flex-wrap: wrap;
  flex-shrink: 0; align-items: flex-start;
  max-width: 260px; justify-content: flex-end;
}

/* Mobile-only button groups — hidden on desktop */
.pmg { display: none; }

/* person-detail-grid is no longer used — interactions are full-width */
.person-detail-grid { display: block; }

.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: flex; gap: var(--sp-3); padding: var(--sp-3) 0;
  border-left: 2px solid var(--border);
  padding-left: var(--sp-4); margin-left: 8px; position: relative;
}
.timeline-item::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-card);
  position: absolute; left: -6px; top: 16px;
}
.timeline-title { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.timeline-meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.timeline-body { font-size: var(--text-sm); color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }

/* =============================================
   INTERACTION CARDS (interactions page)
   ============================================= */
.int-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 20px; margin-bottom: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer; overflow: hidden;
}
.int-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.int-card-body { flex: 1; min-width: 0; }
.int-card-top {
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.int-card-title { font-weight: 600; color: var(--text-primary); word-break: break-word; }
.int-card-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.int-card-meta { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.int-type-badge {
  display: inline-block; margin-left: 8px; padding: 2px 8px;
  border-radius: 99px; font-size: 11px; font-weight: 600;
}
.int-card-body-text { font-size: 13px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; word-break: break-word; }
.int-card-actions { display: flex; gap: 4px; flex-shrink: 0; align-self: flex-start; }

/* Mobile more-menu dropdown */
.mobile-person-menu {
  position: absolute; right: 8px; top: 56px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  z-index: 200; min-width: 180px; overflow: hidden;
  animation: fade-in var(--dur-fast) var(--ease);
}
.mobile-person-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 16px;
  font-size: var(--text-sm); color: var(--text-primary);
  background: transparent; border: none; cursor: pointer;
  transition: background var(--dur-fast);
}
.mobile-person-menu button:hover { background: var(--bg-secondary); }
.mobile-person-menu button.danger { color: var(--danger); }
.mobile-person-menu hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* =============================================
   REMINDERS PAGE
   ============================================= */
.reminder-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.reminder-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-4) var(--sp-5);
  display: flex; align-items: center; gap: var(--sp-4);
  transition: transform var(--dur-base), box-shadow var(--dur-base);
}
.reminder-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.reminder-card.completed { opacity: 0.5; }
.reminder-card.completed .reminder-title { text-decoration: line-through; }
.reminder-icon-wrap {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.reminder-title { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.reminder-meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.reminder-date { margin-left: auto; text-align: right; flex-shrink: 0; }
.reminder-date-day { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.reminder-date-time { font-size: var(--text-xs); color: var(--text-muted); }
.reminder-date.urgent .reminder-date-day { color: var(--danger); }
.reminder-date.soon .reminder-date-day { color: var(--warning); }

/* =============================================
   PROFILE PAGE
   ============================================= */
.profile-header {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-6);
  display: flex; gap: var(--sp-6); align-items: center;
  margin-bottom: var(--sp-6);
}
.profile-avatar-wrap { position: relative; }
.avatar-edit-btn {
  position: absolute; bottom: 2px; right: 2px;
  width: 28px; height: 28px; border-radius: var(--radius-pill);
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 2px solid var(--bg-card);
}
.profile-name { font-size: 22px; font-weight: 700; }
.profile-username { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }
.profile-email { font-size: var(--text-sm); color: var(--text-secondary); margin-top: 4px; }

.profile-menu-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.profile-menu-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 14px var(--sp-5); border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 500; color: var(--text-primary);
  background: var(--bg-card); border: 1px solid var(--border);
  cursor: pointer; transition: all var(--dur-fast);
}
.profile-menu-item:hover { background: var(--bg-secondary); }
.profile-menu-item svg:last-child { margin-left: auto; color: var(--text-muted); }
.profile-menu-item.danger { color: var(--danger); }

/* =============================================
   SEARCH RESULTS
   ============================================= */
.search-results-section { margin-bottom: var(--sp-6); }
.search-results-label { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: var(--sp-3); }
.search-result-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 12px var(--sp-4); border-radius: var(--radius-md);
  cursor: pointer; transition: background var(--dur-fast);
  overflow: hidden;
}
.search-result-item:hover { background: var(--bg-secondary); }
.search-result-name { font-size: var(--text-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-meta { font-size: var(--text-xs); color: var(--text-secondary); }

/* ─── Search page hero bar ─── */
.search-page-hero {
  margin-bottom: var(--sp-6);
}
.search-hero-bar {
  height: 52px; padding: 0 20px;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--sp-3);
}
.search-hero-bar input { font-size: var(--text-base); }
.search-hero-hint { font-size: var(--text-sm); color: var(--text-muted); text-align: center; }

/* Desktop: hero bar hidden (topbar has search); mobile: hero bar visible */
@media (min-width: 769px) {
  .search-page-hero { display: none; }
}

/* Search desktop empty state */
.search-desktop-empty {
  text-align: center;
  padding: 60px 20px;
}
/* On mobile: desktop empty state hidden; hero bar serves as the landing state */
@media (max-width: 768px) {
  .search-desktop-empty { display: none !important; }
}

/* =============================================
   RESPONSIVE OVERRIDES
   ============================================= */

/* ─── Dashboard table: actions wrapper ─── */
.people-table-actions {
  display: flex;
  gap: var(--sp-2);
  margin-left: auto;
  align-items: center;
  flex-shrink: 0;
}

.dash-people-search {
  min-width: 160px;
}

/* ─── Responsive column hiding ─── */
/* hide-sm: hidden at ≤ 700px | hide-xs: hidden at ≤ 480px */

/* ─── Large desktop ─── */
@media (min-width: 1441px) {
  .page-content { max-width: 1600px; margin: 0 auto; }
}

/* ─── 1280px — dashboard side panel collapses ─── */
@media (max-width: 1280px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-main-grid { grid-template-columns: 1fr; }
  /* Strength: 3-col on mid-large desktop */
  .strength-people-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── 1024px — right panel hidden (layout.css), features 2-col ─── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .person-detail-grid { grid-template-columns: 1fr; }
  .auth-shell { display: flex; flex-direction: column; min-height: 100vh; background: linear-gradient(160deg, var(--accent-soft) 0%, #e0eed9 40%, #cce3c2 100%); position: relative; }
  .auth-shell::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234F6F52' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); z-index: 0; }
  .auth-left { display: flex !important; background: transparent; padding: 40px 24px 20px 24px; z-index: 1; }
  .auth-left::before { display: none; }
  .auth-left-logo { flex-direction: column !important; margin-bottom: 16px; }
  .auth-left-logo span { margin-left: 0 !important; margin-top: 8px; }
  .auth-right { background: transparent; padding: 0 24px 40px 24px; min-height: auto; align-items: center; flex-direction: column; z-index: 1; display: flex; justify-content: center; width: 100%; }
  .auth-card { background: #fff; padding: 32px 24px; border-radius: 24px; box-shadow: 0 12px 40px rgba(0,0,0,0.08); width: 100%; max-width: 400px; }
  .hide-mobile { display: none !important; }
  .show-mobile { display: flex !important; }
  .auth-feature-list { display: none !important; }
  .landing-nav { padding: 16px 24px; }
  .landing-nav-links { display: none; }
  .features { padding: 60px 24px; }
  .how-it-works { padding: 60px 24px; }
  .landing-footer { padding: var(--sp-6) 24px; flex-direction: column; gap: var(--sp-4); text-align: center; }
  .footer-links { justify-content: center; }
  /* Strength: 2-col on tablet */
  .strength-people-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── 860px — hide Work + College filter tabs ─── */
@media (max-width: 860px) {
  .people-table-filters [data-priority="4"],
  .people-table-filters [data-priority="5"] { display: none; }
}

/* ─── 768px — mobile layout kicks in (layout.css) ─── */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
  .hero { padding: 60px 20px 40px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .steps { grid-template-columns: 1fr; }
  .steps::before, .step:not(:last-child)::after { display: none; }
  .person-detail-hero { flex-direction: column; align-items: center; text-align: center; padding: var(--sp-4); }
  .person-detail-info { width: 100%; }
  .person-detail-contact { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; margin-top: 16px; }

  /* Center avatar on mobile */
  .person-avatar-wrap { margin: 0 auto; }
  .person-detail-tags { justify-content: center; }
  .person-hero-row { flex-direction: column; align-items: center; }
  .person-hero-identity { text-align: center; width: 100%; }

  /* Hide desktop actions, show mobile groups */
  .person-actions-desktop { display: none; }

  /* pmg-1: Log + Remind — 2-col grid */
  .pmg-1 {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px; margin-top: 12px; width: 100%;
  }
  .pmg-1 .btn { justify-content: center; }

  /* pmg-2: Favorite — full width */
  .pmg-2 { display: block; margin-top: 8px; width: 100%; }
  .pmg-2 .btn { width: 100%; justify-content: center; }

  /* pmg-3: Edit + Delete — after details, single row */
  .pmg-3 {
    display: flex; gap: 8px; margin-top: 16px; width: 100%;
  }
  .pmg-3 .btn { flex: 1; justify-content: center; }

  /* Interaction cards — compact on mobile */
  .int-card { padding: 12px; gap: 10px; }
  .int-card-icon { width: 34px; height: 34px; }
  .int-card-date { font-size: 11px; }
  .int-type-badge { display: none; }  /* hide badge on very small cards */

  /* Filter tabs — scrollable */
  #type-filter, #tag-filters { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
  #type-filter::-webkit-scrollbar, #tag-filters::-webkit-scrollbar { display: none; }
  #type-filter .tab, #tag-filters .tab { white-space: nowrap; }

  .people-grid { grid-template-columns: repeat(2, 1fr); }
  #metadata-stats { grid-template-columns: repeat(2, 1fr) !important; }
  .profile-header { flex-direction: column; text-align: center; }
  .landing-nav-actions .btn-ghost { display: none; }

  /* Dashboard table header: wrap to two rows and center */
  .people-table-header {
    flex-direction: column;
    align-items: center;
    row-gap: 12px;
    padding: var(--sp-4) var(--sp-4);
    text-align: center;
  }
  .people-table-filters { 
    width: auto;
    max-width: 100%;
    justify-content: center; 
    flex-wrap: wrap;
    overflow: visible;
    position: relative; 
    z-index: 10; 
    margin: 0 auto;
  }
  .people-table-actions { width: 100%; justify-content: center; }
  .people-table-actions .dash-people-search { flex: 1; min-width: 0; }
  .people-table-header .section-title { width: 100%; text-align: center; }

  .greeting-title { font-size: 22px; }
  .recent-person-card { width: 130px; }

  /* Strength: 1-col on mobile, chips scroll horizontally */
  .strength-people-grid { grid-template-columns: 1fr; }
  .strength-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .strength-chips::-webkit-scrollbar { display: none; }
  .strength-section .section-header { flex-direction: row; align-items: flex-start; }
  .strength-section .section-header .section-link { white-space: nowrap; margin-left: var(--sp-3); flex-shrink: 0; }
  .strength-person-card { padding: 14px; }
}



/* =============================================
   EDIT REMINDER MODAL FOOTER
   ============================================= */
.edit-reminder-footer {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
}
.edit-reminder-footer .danger { grid-column: 1; }
.edit-reminder-footer .btn-secondary:not(.danger) { grid-column: 3; }
.edit-reminder-footer .btn-primary { grid-column: 4; justify-content: center; }

/* ─── 700px — hide Last Interaction + Tags columns ─── */
@media (max-width: 700px) {
  .hide-sm { display: none !important; }
}

/* ─── 640px ─── */
@media (max-width: 640px) {
  /* Compact search bar in table header */
  .dash-people-search { min-width: 0; }
  /* Strength: reduce chip padding slightly */
  .strength-chip { padding: 4px 10px; font-size: 11px; }
}

/* ─── 480px — single-column for small phones ─── */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .people-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .profile-header { flex-direction: column; text-align: center; }
  #metadata-stats { grid-template-columns: repeat(2, 1fr) !important; }
  .person-detail-hero { padding: var(--sp-4); }
  .hero h1 { font-size: clamp(26px, 8vw, 38px); }
  .hero p { font-size: var(--text-base); }
  .section-center h2 { font-size: 24px; }

  .auth-left { padding: 40px 16px 20px 16px; }
  .auth-right { padding: 0 16px 40px 16px; }
  .auth-card { padding: 24px 20px; }



  /* Edit Reminder Modal overrides */
  .edit-reminder-footer {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    row-gap: 12px;
  }
  .edit-reminder-footer .btn-primary { grid-column: 1 / -1; grid-row: 1; }
  .edit-reminder-footer .danger { grid-column: 1; grid-row: 2; }
  .edit-reminder-footer .btn-secondary:not(.danger) { grid-column: 2; grid-row: 2; }

  /* Hide Relation column too */
  .hide-xs { display: none !important; }
  #people-table { min-width: 100% !important; }

  /* Table header: stack search under title row */
  .people-table-actions { flex-wrap: wrap; }
  .people-table-actions .dash-people-search { display: none; }
  .people-table-actions .btn { width: 100%; justify-content: center; }

  .greeting-title { font-size: 20px; }
  .greeting-sub { font-size: 12px; }
  .recent-person-card { width: 120px; }
  .pagination { flex-direction: column; gap: var(--sp-2); text-align: center; }

  /* Strength: tighter card padding on small phones */
  .strength-person-card { padding: 12px; border-radius: var(--radius-md); }
  .strength-bar-track { margin-top: 10px; }
  .strength-section { padding: var(--sp-4); }
}

/* ─── 375px — very small phones ─── */
@media (max-width: 375px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .page-content { padding: 10px; padding-bottom: calc(var(--nav-h-mobile) + 24px); }
  .people-table-header { padding: var(--sp-3); }
  .greeting-title { font-size: 18px; }
  /* Strength: even tighter at 375px */
  .strength-person-card { padding: 10px; }
  .strength-chip { padding: 4px 9px; font-size: 11px; }
  .strength-section { padding: var(--sp-3); }
  .strength-people-grid { gap: 8px; }
}



/* =============================================
   METADATA STATS (Person Detail)
   ============================================= */
.meta-stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  text-align: center;
}
.meta-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}
.meta-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Interaction icon box */
.interaction-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Card size variant */
.card-sm { padding: var(--sp-4); }

/* Person card position fix */
.person-card { position: relative; }

/* =============================================
   SEARCH PAGE REDESIGN
   ============================================= */
.search-hero-unified {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 760px;
  margin: var(--sp-6) auto;
  text-align: center;
  transition: all var(--dur-normal) var(--ease);
}
.search-hero-unified.active-hero {
  margin: 0 0 var(--sp-4) 0;
  max-width: 100%;
  align-items: stretch;
}
.search-hero-unified.active-hero .search-hero-bar {
  max-width: 100%;
  margin-bottom: 0;
  border-color: var(--border-focus);
}

.active-search-tabs {
  display: flex; gap: var(--sp-6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-4);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.active-search-tabs::-webkit-scrollbar {
  display: none;
}
.active-tab {
  background: transparent; border: none;
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  padding: 0 0 12px 0; cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap; transition: color var(--dur-fast);
}
.active-tab:hover { color: var(--text-primary); }
.active-tab.current {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.active-search-filters {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.active-search-filters .btn.active {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}

.people-list-view {
  display: flex; flex-direction: column; gap: var(--sp-3);
}

.search-results-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-4);
  margin-top: var(--sp-4);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
.search-results-footer a {
  text-decoration: none;
  transition: color var(--dur-fast);
}
.search-results-footer a:hover {
  color: var(--accent-hover) !important;
}

.search-hero-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-4);
}
.search-hero-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.search-hero-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--sp-6);
}
.search-hero-bar {
  width: 100%;
  max-width: 600px;
  height: 52px;
  padding: 0 var(--sp-4);
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--accent); /* mockup has a green border on the search bar */
  border-radius: var(--radius-pill);
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: box-shadow var(--dur-fast) var(--ease);
}
.search-hero-bar:focus-within {
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-hero-bar input {
  flex: 1; min-width: 0;
  border: none; background: transparent; outline: none;
  font-size: 15px; color: var(--text-primary);
}
.search-hero-bar .shortcut-key {
  font-size: 10px; background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 6px; color: var(--text-muted);
  flex-shrink: 0;
}
.search-filters {
  display: flex; gap: var(--sp-3); flex-wrap: wrap; justify-content: center;
  margin-bottom: var(--sp-8);
  width: 100%;
}
.search-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: all var(--dur-fast) var(--ease);
}
.search-pill:hover { border-color: var(--border-focus); color: var(--text-primary); }
.search-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.search-pill.active svg { color: #fff; }
.search-pill-clear {
  background: transparent; border: none; font-size: 13px; font-weight: 600;
  color: var(--accent); cursor: pointer; padding: 8px 4px;
}
.search-pill-clear:hover { text-decoration: underline; }

.search-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  width: 100%;
  text-align: left;
  margin-bottom: var(--sp-6);
}
.search-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex; flex-direction: column;
}
.search-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-4);
}
.search-card-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.search-card-action {
  background: transparent; border: none;
  font-size: 12px; font-weight: 600; color: var(--accent);
  cursor: pointer;
}
.search-card-action:hover { text-decoration: underline; }
.search-recent-list {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.search-recent-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 99px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all var(--dur-fast) var(--ease);
}
.search-recent-item:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}
.recent-text {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  cursor: pointer;
}
.recent-text i { color: var(--text-muted); }
.recent-remove {
  background: transparent; border: none; color: var(--text-muted); cursor: pointer;
  padding: 2px; border-radius: 50%; display: flex; align-items: center;
  transition: all var(--dur-fast);
}
.recent-remove:hover { color: var(--danger); background: rgba(255,59,48,0.1); }

.search-tags-list {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.tag-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 99px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  transition: all var(--dur-fast) var(--ease);
}
.tag-pill:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transform: translateY(-1px);
  color: var(--accent);
}

.search-tips-card {
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex; align-items: flex-start; gap: var(--sp-4);
  width: 100%; text-align: left;
}
.tips-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.tips-content h4 { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.tips-content p { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }

@media (max-width: 768px) {
  .search-hero-title { font-size: 22px; }
  .search-hero-subtitle { font-size: 13px; }
  .search-grid-2 { grid-template-columns: 1fr; gap: var(--sp-4); }
  .search-hero-unified { margin: var(--sp-4) auto; }
}

/* =============================================
   INTEGRATIONS SECTION (Profile Page)
   ============================================= */

.integrations-section {
  margin-top: var(--sp-5);
}

.integrations-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
  padding: 0 2px;
}

.integration-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transition: box-shadow var(--dur-base) var(--ease);
  min-height: 80px;
}

.integration-card:hover {
  box-shadow: var(--shadow-md);
}

.integration-icon-wrap {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: #f0f4ff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(26, 115, 232, 0.12);
}

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

.integration-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.integration-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.integration-status-dot.connected    { background: var(--success); }
.integration-status-dot.disconnected { background: var(--text-muted); }

.integration-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

.integration-desc.connected-desc {
  color: var(--success);
  font-weight: 500;
}

.integration-actions {
  flex-shrink: 0;
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}

/* Skeleton loader for integration card */
.integration-card.loading .integration-name,
.integration-card.loading .integration-desc {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, #eef0ec 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
  color: transparent;
  user-select: none;
}

@media (max-width: 480px) {
  .integration-card {
    flex-wrap: wrap;
    gap: var(--sp-3);
  }
  .integration-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* =============================================
   NEW GCAL MODAL REDESIGN
   ============================================= */
.gcal-modal-content {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.gcal-header-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
}
.gcal-icon {
  width: 56px;
  height: 56px;
  background: #f8f9fa;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.gcal-header-info {
  flex: 1;
}
.gcal-title-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: 6px;
}
.gcal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.gcal-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
}
.gcal-badge.connected {
  background: #dcfce7;
  color: #166534;
}
.gcal-badge.disconnected {
  background: var(--bg-secondary);
  color: var(--text-muted);
}
.gcal-subtext {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.gcal-subtext.success {
  color: #166534;
  display: flex;
  align-items: center;
  gap: 4px;
}
.gcal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.gcal-box-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.gcal-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.gcal-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
}
.gcal-row-icon.success {
  color: #166534;
  border-color: #dcfce7;
}
.gcal-row-content {
  flex: 1;
  min-width: 0;
}
.gcal-row-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.gcal-row-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gcal-link-btn {
  background: none;
  border: none;
  color: #1A73E8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.gcal-link-btn:hover {
  text-decoration: underline;
}
.gcal-sync-btn-round {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s;
  flex-shrink: 0;
}
.gcal-sync-btn-round:hover {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.gcal-btn-main {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.gcal-btn-main.green {
  background: #355E3B; /* Dark green */
  color: white;
}
.gcal-btn-main.green:hover {
  background: #2A4A2F;
}
.gcal-btn-main.blue {
  background: #3b82f6; /* Blue */
  color: white;
}
.gcal-btn-main.blue:hover {
  background: #2563eb;
}
.gcal-footer-text {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.5;
}
/* Features List for disconnected state */
.gcal-features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.gcal-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}
.gcal-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eff6ff; /* light blue */
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gcal-feature-content h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.gcal-feature-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.gcal-divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-1) 0;
}

@media (max-width: 480px) {
  .gcal-header-row { flex-direction: column; align-items: center; text-align: center; }
  .gcal-title-row { justify-content: center; flex-wrap: wrap; }
  .gcal-subtext.success { justify-content: center; }
  .gcal-row { flex-direction: column; text-align: center; }
  .gcal-row-icon { margin: 0 auto; }
}
