/* ============================================================
   ArchEdTech — Bootstrap 5 theme layer
   Loaded AFTER Bootstrap + Bootstrap Icons so these rules win.
   Provides the unified design system: light slate background,
   rounded cards, soft shadows, tinted icon badges, avatar
   initials, blurred paywall, chat bubbles, and legacy hooks.
   ============================================================ */

:root {
  --arch-brand: var(--brand, #4f46e5);
  --arch-brand-dark: var(--brand-dark, #4338ca);
  --arch-brand-soft: var(--brand-soft, #eef2ff);
  --arch-accent: var(--accent, #10b981);
  --arch-bg: var(--bg, #f8fafc);
  --arch-line: var(--line, #e2e8f0);
  --arch-ink: var(--ink, #0f172a);
  --arch-radius: var(--radius, 14px);
  --arch-radius-sm: var(--radius-sm, 10px);
}

body {
  background-color: var(--arch-bg);
  color: var(--arch-ink);
}

/* ---------- Brand mark ---------- */
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--arch-brand), var(--arch-accent));
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
}

/* ---------- Topbar / navbar ---------- */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--arch-line);
}
.navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--arch-ink);
}
.navbar .navbar-brand:hover {
  color: var(--arch-ink);
}
.navbar .nav-link {
  font-size: 0.95rem;
  color: #475569;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}
.navbar .nav-link:hover {
  color: var(--arch-ink);
  background: var(--arch-bg);
}
.navbar .nav-link.active {
  color: var(--arch-brand);
  font-weight: 600;
  background: #eef2ff;
}
.navbar .navbar-toggler {
  border: 0;
  color: var(--arch-ink);
}
.navbar .form-control-sm {
  border-radius: 0.5rem;
  border-color: var(--arch-line);
}

/* ---------- Avatar initials ---------- */
.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--arch-brand), var(--arch-accent));
  flex: 0 0 auto;
  text-transform: uppercase;
}
.avatar-circle.lg {
  width: 56px;
  height: 56px;
  font-size: 1.25rem;
}
.avatar-circle.sm {
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
}
.avatar-circle.tint-brand { background: var(--arch-brand); }
.avatar-circle.tint-info { background: #0ea5e9; }
.avatar-circle.tint-success { background: var(--arch-accent); }
.avatar-circle.tint-warning { background: #f59e0b; }
.avatar-circle.tint-danger { background: #dc2626; }
.avatar-circle.tint-secondary { background: #475569; }

/* ---------- Card polish ---------- */
.card {
  border-radius: var(--arch-radius);
  border-color: var(--arch-line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.card .card-header {
  background: transparent;
  border-bottom: none;
}
.card-title {
  margin-bottom: 0.5rem;
  font-weight: 700;
}

/* ---------- Metric / stat cards ---------- */
.stat-card {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  height: 100%;
}
.stat-card:hover {
  box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.stat-card .stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- Interactive navigation cards ---------- */
.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1.25rem 1rem;
  color: var(--arch-ink);
  text-decoration: none;
  height: 100%;
  transition: all 0.15s ease;
  border-radius: var(--arch-radius);
}
.nav-card:hover {
  text-decoration: none;
  color: var(--arch-ink);
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.08);
  border-color: #c7d2fe;
}
.nav-card i {
  font-size: 1.9rem;
}

/* ---------- Data tables ---------- */
.table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bs-secondary-color);
  background: #f8f9fb;
  border-bottom-width: 1px;
  white-space: nowrap;
}
.table > :not(:first-child) {
  border-top-color: var(--arch-line);
}

/* ---------- Paywall blur / unmask ---------- */
.blur-wrap {
  position: relative;
}
.blur-content {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}
.blur-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(244, 246, 249, 0.55);
  border-radius: inherit;
  text-align: center;
  padding: 1rem;
}

/* ---------- Chat window ---------- */
.chat-box {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 440px;
  overflow-y: auto;
  padding: 1rem;
  background: #f8f9fb;
  border: 1px solid var(--arch-line);
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}
.chat-row {
  display: flex;
}
.chat-row.chat-right {
  justify-content: flex-end;
}
.chat-row.chat-left {
  justify-content: flex-start;
}
.chat-bubble {
  max-width: 76%;
  padding: 0.6rem 0.9rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--arch-line);
}
.chat-row.chat-right .chat-bubble {
  background: var(--arch-brand);
  color: #fff;
  border-color: var(--arch-brand);
}
.chat-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--arch-brand-dark);
  margin-bottom: 2px;
}
.chat-row.chat-right .chat-name {
  color: #c7d2fe;
}
.chat-body {
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-time {
  font-size: 0.72rem;
  opacity: 0.75;
  margin-top: 4px;
}
.chat-row.chat-right .chat-time {
  color: rgba(255, 255, 255, 0.85);
}
.chat-system {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0.25rem 0;
}
.chat-system-bubble {
  max-width: 82%;
  padding: 0.35rem 0.8rem;
  border-radius: 1rem;
  background: var(--arch-brand-soft);
  color: var(--arch-brand-dark);
  border: 1px dashed var(--arch-line);
  font-size: 0.8rem;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-system-time {
  font-size: 0.68rem;
  opacity: 0.6;
}

/* ---------- Availability slot chips ---------- */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.625rem;
}
.slot-day {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.625rem;
  background: #f8f9fb;
  border-radius: 0.5rem;
}
.slot-chip {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
  background: var(--arch-brand);
  color: #fff;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Legacy compatibility (non-refactored pages) ---------- */
.video-wrap {
  position: relative;
  padding-top: 56.25%;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f8f9fb;
  margin-bottom: 0.5rem;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.btn-outline {
  border: 1px solid var(--arch-line);
  color: var(--arch-ink);
  background: #fff;
}
.btn-outline:hover {
  border-color: var(--arch-brand);
  color: var(--arch-brand);
}
.btn-ghost {
  color: var(--arch-ink);
  background: transparent;
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--arch-bg);
  color: var(--arch-ink);
}

/* ---------- Shared page helpers ---------- */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.page-head h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.page-head-center {
  justify-content: center;
  text-align: center;
}

/* ---------- Site footer (consistent on every page) ---------- */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--arch-line);
  color: #475569;
  font-size: 0.9rem;
}
.site-footer .footer-copy {
  color: var(--arch-ink);
  font-weight: 600;
}
.site-footer .footer-tagline {
  color: #334155;
  font-weight: 700;
  font-size: 1.05rem;
}
.site-footer .footer-links a {
  color: #475569;
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}
.site-footer .footer-links a:hover {
  color: var(--arch-primary);
  text-decoration: underline;
}
.site-footer .footer-contact a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(100,116,139,.35);
}
.site-footer .footer-contact a:hover {
  color: var(--arch-primary);
  text-decoration-color: var(--arch-primary);
}
.muted {
  color: var(--bs-secondary-color);
}
.mt {
  margin-top: 1rem;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

/* Small helper to keep action forms inline in cards */
.form-inline-block {
  display: inline-block;
}

/* ============================================================
   Dashboard sidebar + topbar layout (all logged-in pages)
   ============================================================ */

/* ---------- Sidebar ---------- */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background-color: #fff;
  border-right: 1px solid var(--arch-line);
  color: var(--arch-ink);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .nav-link,
.sidebar-dark .nav-link {
  color: #475569;
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 4px;
  padding: 10px 16px;
}
.sidebar .nav-link:hover,
.sidebar-dark .nav-link:hover {
  color: var(--arch-ink);
  background-color: var(--arch-bg);
}
.sidebar .nav-link.active,
.sidebar-dark .nav-link.active {
  color: var(--arch-brand);
  font-weight: 600;
  background-color: #eef2ff;
}
.sidebar-dark {
  background-color: #fff;
  color: var(--arch-ink);
}
.sidebar-dark .offcanvas-body .nav-pills {
  gap: 2px;
}

/* ---------- Sidebar section labels ---------- */
.sidebar .sidebar-section {
  pointer-events: none;
}
.sidebar .sidebar-section-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0 16px;
  margin-bottom: 2px;
}
body.sidebar-collapsed .sidebar .sidebar-section-label {
  display: none;
}

/* ---------- Topbar ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--arch-line);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  z-index: 1020;
}
.topbar h4 {
  font-size: 1.15rem;
  color: var(--arch-ink);
}

/* ---------- Collapsible sidebar ---------- */
.sidebar {
  transition: width 0.2s ease;
}
.sidebar .nav-link {
  white-space: nowrap;
}
.sidebar .sidebar-label {
  transition: opacity 0.15s ease;
}
body.sidebar-collapsed .sidebar {
  width: 76px;
}
body.sidebar-collapsed .sidebar .sidebar-label,
body.sidebar-collapsed .sidebar .brand-name {
  display: none;
}
body.sidebar-collapsed .sidebar .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}
body.sidebar-collapsed .sidebar .nav-link i {
  font-size: 1.15rem;
  margin-right: 0 !important;
}
body.sidebar-collapsed .sidebar .sidebar-badge {
  display: none;
}
body.sidebar-collapsed .sidebar .sidebar-brand {
  justify-content: center;
  padding: 0 !important;
}
body.sidebar-collapsed .sidebar .brand-name {
  display: none;
}

/* ---------- Metric cards ---------- */
.metric-card {
  border: none;
  border-radius: var(--arch-radius);
  transition: transform 0.2s, box-shadow 0.2s;
}
.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05) !important;
}

/* Compact admin metric cards: smaller, equal-height, single row */
.admin-metrics .card-body {
  padding: 0.5rem 0.75rem;
}
.admin-metrics .icon-shape {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 0.95rem;
}
.admin-metrics .stat-num {
  font-size: 1.05rem;
  line-height: 1.1;
}
.admin-metrics .text-secondary.small {
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Icon shapes ---------- */
.icon-shape {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex: 0 0 auto;
}

/* ---------- Table card ---------- */
.table-card {
  border: none;
  border-radius: 12px;
}

/* ---------- Light avatar variant (dashboard tables / topbar) ---------- */
.avatar-circle.light {
  background: #e2e8f0;
  color: #475569;
}

/* ---------- Table header styling ---------- */
.table-card .table > thead th {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
.table-card .table > thead th a {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.table-card .table > thead th a:hover {
  color: var(--arch-brand);
}

/* ---------- Dashboard cards ---------- */
.dashboard-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dashboard-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ---------- Metric icon badges ---------- */
.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex: 0 0 auto;
}

/* ---------- Paywall alert banner ---------- */
.paywall-alert {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--arch-radius);
}

/* ---------- Empty state container ---------- */
.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  background-color: #fafafa;
  border: 2px dashed #e2e8f0;
  border-radius: var(--arch-radius);
}

/* ---------- Indigo primary button ---------- */
.btn-primary-indigo {
  background-color: var(--arch-brand);
  border-color: var(--arch-brand);
  color: #ffffff;
}
.btn-primary-indigo:hover {
  background-color: var(--arch-brand-dark);
  border-color: var(--arch-brand-dark);
  color: #ffffff;
}

/* ---------- Service mode badge ---------- */
.mode-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- Collapsible post body (read more) ---------- */
.post-collapsible {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Admin contact inbox ---------- */
.min-w-0 {
  min-width: 0;
}
.cm-item {
  border: 0;
  border-bottom: 1px solid var(--arch-line);
  border-radius: 0 !important;
  text-align: left;
}
.cm-item:last-child {
  border-bottom: 0;
}
.cm-item.cm-unread {
  background: #eef2ff;
}
.cm-item.cm-unread:hover,
.cm-item.cm-unread:focus-visible {
  background: #e4e7fb;
}
.cm-item .cm-subject {
  color: var(--arch-ink);
}
.cm-item.cm-unread .cm-subject {
  font-weight: 700;
}
.cm-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--arch-brand);
  flex: 0 0 auto;
}
.cm-panel {
  border-bottom: 1px solid var(--arch-line);
  background: var(--arch-bg);
}
.cm-message {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #334155;
}

.post-body strong { color: #1e293b; }
.post-body p { margin-bottom: 0.5rem; }
.post-body ul { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.post-body li { margin-bottom: 0.25rem; }
.post-body code {
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.88em;
  color: #be185d;
}

/* ============================================================
   Shared design system: public pages (landing + pricing)
   ============================================================ */

/* Landing hero */
.hero-section {
  background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.08), transparent 40%),
              radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.06), transparent 40%);
  padding: 70px 0 60px;
}

/* ---------- Landing page: mobile-first overrides ---------- */
@media (max-width: 575.98px) {
  /* Navbar */
  .landing-nav .navbar-brand { font-size: 1.1rem; }
  .landing-nav .navbar-brand img { max-height: 30px !important; }
  .landing-nav .navbar-nav .nav-link { font-size: 0.88rem; padding: 0.45rem 0.6rem; }
  .landing-nav .btn { font-size: 0.82rem; padding: 0.35rem 0.75rem; }

  /* Hero */
  .hero-section { padding: 32px 0 24px; }
  .hero-section h1.display-5 { font-size: 1.6rem; line-height: 1.25; }
  .hero-section .fs-5 { font-size: 0.95rem !important; }
  .hero-section .btn-lg { font-size: 0.88rem; padding: 0.6rem 1.2rem; }
  .hero-section .carousel-item img { height: 220px !important; }

  /* Section padding reduction */
  .landing-section { padding-top: 2rem !important; padding-bottom: 2rem !important; }

  /* Cards */
  .custom-card { padding: 20px 16px; border-radius: 16px; }
  .icon-box { width: 40px; height: 40px; font-size: 1.1rem; }

  /* CTA banner */
  .cta-banner h2 { font-size: 1.3rem !important; }
  .cta-banner p { font-size: 0.88rem !important; }
  .cta-banner .btn-lg { font-size: 0.88rem !important; padding: 0.6rem 1.5rem !important; }

  /* Footer */
  footer > .container-fluid > .d-flex.flex-wrap { flex-direction: column !important; align-items: center !important; text-align: center !important; gap: 0.6rem !important; }
  footer .footer-tagline { font-size: 0.95rem; }
  footer .footer-links { justify-content: center !important; gap: 0.75rem !important; }
  footer .footer-links a { font-size: 0.78rem; }
  footer .text-end { text-align: center !important; }
  footer .footer-copy { font-size: 0.78rem; }
  footer .footer-contact { flex-direction: column !important; align-items: center !important; gap: 0.4rem !important; }

  /* Marquee */
  .marquee-item { font-size: 0.82rem; }

  /* Pricing page */
  .pricing-wrap { padding: 20px 0 36px !important; }
  .pricing-header h1 { font-size: 1.5rem !important; }
  .pricing-header .lead { font-size: 0.88rem !important; }
  .role-pill { font-size: 0.8rem !important; padding: 8px 14px !important; }
  .plan-card { padding: 20px 16px !important; border-radius: 14px !important; }
  .plan-card .price-val { font-size: 1.7rem !important; }
  .plan-card .plan-btn { font-size: 0.85rem !important; padding: 10px 14px !important; }
  .trust-note { font-size: 0.78rem !important; padding: 12px 14px !important; display: flex !important; border-radius: 14px !important; gap: 8px !important; }
  .trust-note i { font-size: 0.95rem !important; }
  .pricing-faq-accordion .accordion-button { font-size: 0.88rem !important; }
  .pricing-faq-accordion .accordion-body { font-size: 0.82rem !important; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
  .hero-section { padding: 56px 0 48px; }
  .hero-section h1.display-5 { font-size: 2rem; }
}
.tagline-badge {
  background: var(--arch-brand-soft);
  color: var(--arch-brand);
  border: 1px solid #c7d2fe;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  border-radius: 50rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Feature / role cards */
.custom-card {
  background: #fff;
  border: 1px solid var(--arch-line);
  border-radius: 20px;
  padding: 28px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.custom-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.08);
}
.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

/* Landing search card */
.search-filter-card {
  background: #fff;
  border: 1px solid var(--arch-line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.05);
}

/* Brand buttons */
.btn-brand-primary {
  background-color: var(--arch-brand);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  padding: 12px 24px;
  transition: all 0.2s ease;
}
.btn-brand-primary:hover {
  background-color: var(--arch-brand-dark);
  color: #fff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}
.btn-brand-outline {
  background-color: #fff;
  color: var(--arch-ink);
  border: 1px solid var(--arch-line);
  border-radius: 12px;
  font-weight: 700;
  padding: 12px 24px;
  transition: all 0.2s ease;
}
.btn-brand-outline:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--arch-ink);
}

/* How-it-works step numbers */
.step-num-blue {
  background-color: var(--arch-brand);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.step-num-green {
  background-color: var(--arch-accent);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Live feed badge */
.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--arch-accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Pricing page */
.pricing-wrap { padding: 36px 0 56px; }
.pricing-header { text-align: center; max-width: 680px; margin: 0 auto 32px; }
.pricing-header h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.pricing-header .lead { color: #475569; font-size: 1rem; margin-bottom: 24px; max-width: 540px; margin-left: auto; margin-right: auto; }

.role-toggle {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 50rem;
  padding: 5px;
  display: inline-flex;
  gap: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
  justify-content: center;
}
.role-pill {
  border: none;
  background: transparent;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
  border-radius: 50rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.role-pill:hover { color: #0f172a; background: #f1f5f9; }
.role-pill.active {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.plan-cards { display: grid; grid-template-columns: 1fr; gap: 20px; justify-content: center; align-items: stretch; }
@media (min-width: 640px) { .plan-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .plan-cards { grid-template-columns: repeat(4, 1fr); gap: 18px; } }

.plan-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}
.plan-card.popular {
  border: 2px solid #4f46e5;
  box-shadow: 0 12px 28px -6px rgba(79, 70, 229, 0.15);
}
.plan-card .card-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.plan-card .card-desc { color: #475569; font-size: 0.82rem; margin-bottom: 16px; min-height: 36px; }
.plan-card .price-row { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.plan-card .price-val { font-size: 2.2rem; font-weight: 800; color: #0f172a; line-height: 1; }
.plan-card .price-unit { color: #475569; font-size: 0.82rem; font-weight: 500; }
.plan-card .price-savings { color: #059669; font-size: 0.82rem; font-weight: 700; min-height: 20px; margin-bottom: 4px; }
.plan-card .divider { border: 0; border-top: 1px solid #e2e8f0; margin: 16px 0; }
.plan-card .feature-list { list-style: none; padding: 0; margin: 0 0 20px; flex-grow: 1; text-align: left; }
.plan-card .feature-list li {
  font-size: 0.85rem;
  color: #475569;
  padding: 6px 0 6px 24px;
  position: relative;
}
.plan-card .feature-list li::before {
  content: "\f26a";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  color: #10b981;
  font-size: 0.95rem;
  top: 6px;
}
.plan-card .plan-btn {
  border-radius: 12px;
  font-weight: 700;
  padding: 12px 16px;
  font-size: 0.92rem;
  width: 100%;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
  display: block;
}
.plan-card .plan-btn:hover { text-decoration: none; }
.plan-card .plan-btn-outline {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}
.plan-card .plan-btn-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}
.plan-card .plan-btn-primary { background: #4f46e5; border: none; color: #fff; }
.plan-card .plan-btn-primary:hover { background: #4338ca; color: #fff; }
.plan-card .plan-btn.disabled,
.plan-card .plan-btn[data-notactive] {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  pointer-events: auto;
}

.plan-card .disabled-btn { cursor: not-allowed; }

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 4px 14px;
  border-radius: 50rem;
  white-space: nowrap;
}
.plan-badge-best { background: linear-gradient(135deg, #4f46e5, #0ea5e9); color: #fff; }
.plan-badge-save { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }

.trust-note {
  display: inline-flex;  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 50rem;
  padding: 10px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  font-size: 0.85rem;
  color: #475569;
}
.trust-note i { color: #4f46e5; font-size: 1.1rem; }

/* ============================================================
   App chrome: user dropdown, toasts, confirm modal, helpers
   ============================================================ */

/* Topbar user dropdown */
.topbar-user-btn {
  border: 1px solid var(--arch-line);
  border-radius: 50rem;
  padding: 4px 10px 4px 4px;
  background: #fff;
  color: var(--arch-ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.topbar-user-btn:hover {
  border-color: var(--arch-brand);
  background: var(--arch-brand-soft);
}
.topbar-user-btn::after { display: none; }

/* Global toast host */
#arch-toasts { z-index: 2000; }

/* Confirm modal */
#arch-confirm-modal .modal-footer { border-top: 1px solid var(--arch-line); }
#arch-confirm-modal .modal-header { border-bottom: 1px solid var(--arch-line); }

/* Password visibility toggle */
.js-pw-toggle { min-height: auto; }
.input-group > .js-pw-toggle { border-top-right-radius: var(--arch-radius-sm); border-bottom-right-radius: var(--arch-radius-sm); }

/* Directory show-more */
#dir-showmore { border-radius: 50rem; padding: 0.5rem 1.4rem; }

/* Chat live indicator */
.chat-live-indicator {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--arch-accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chat-live-indicator i { font-size: 0.55rem; }
.chat-live-indicator.polling i { animation: chatBlink 1.6s ease-in-out infinite; }
@keyframes chatBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

