/* PromotePod Modern Theme & Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand Color Schema */
  --nt-primary: #334155;          /* Primary (Dominant): Slate Charcoal */
  --nt-primary-dark: #1E293B;     /* Deep Slate for high-contrast accents */
  --nt-secondary: #2563EB;        /* Secondary (Action): Cobalt Blue */
  --nt-secondary-hover: #1D4ED8;  /* Cobalt Blue Hover */
  --nt-accent: #059669;           /* Accent (Success): Mint / Emerald */
  --nt-accent-bg: #ECFDF5;        /* Mint / Emerald Light Tint */
  --nt-accent-border: #A7F3D0;    /* Mint / Emerald Border */
  --nt-warning: #D97706;          /* Amber Warning */
  --nt-danger: #DC2626;           /* Crimson Alert */
  --nt-slate: #334155;            /* Slate Charcoal */
  --nt-border: #E2E8F0;           /* Clean Border */
  --nt-border-subtle: #CBD5E1;    /* Mid-tone Border */
  --nt-bg: #F1F5F9;               /* Neutral: Ice Gray */
  --nt-card-bg: #FFFFFF;          /* Neutral: Pure White */
  --nt-text-main: #0F172A;        /* High-contrast Text */
  --nt-text-muted: #64748B;       /* Secondary Muted Text */
  --nt-radius-sm: 6px;
  --nt-radius-md: 10px;
  --nt-radius-lg: 12px;
  --nt-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  --nt-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  
  /* Bootstrap Variable Alignments */
  --bs-primary: #2563EB;
  --bs-primary-rgb: 37, 99, 235;
  --bs-success: #059669;
  --bs-success-rgb: 5, 150, 105;
  --bs-body-bg: #F1F5F9;
  --bs-body-color: #0F172A;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--nt-bg);
  color: var(--nt-text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar & Brand Header - Deep Dark Slate / Midnight Charcoal */
.navbar-nudge, .navbar-promotepod {
  background: #0F172A;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem 1.5rem;
}

.navbar-brand-nudge, .navbar-brand-promotepod {
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.3px;
  color: #F8FAFC !important;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-logo-img {
  width: 32px;
  height: 32px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.35));
}

.navbar-brand-nudge:hover .brand-logo-img,
.navbar-brand-promotepod:hover .brand-logo-img {
  transform: rotate(15deg) scale(1.1);
}

.brand-gradient-text {
  background: linear-gradient(135deg, #818CF8 0%, #38BDF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.nav-link-nudge {
  color: #94A3B8 !important;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.nav-link-nudge:hover,
.nav-link-nudge:focus,
.nav-link-nudge.active {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none !important;
}

.navbar-nudge a,
.navbar-nudge .nav-link,
.navbar-nudge .nav-item a {
  text-decoration: none !important;
}

/* Cards & Layout */
.card-nudge {
  background: var(--nt-card-bg);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md);
  box-shadow: var(--nt-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-nudge:hover {
  box-shadow: var(--nt-shadow-lg);
}

.card-header-clean {
  background: transparent;
  border-bottom: 1px solid var(--nt-border);
  padding: 1rem 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Hero / Header banner - Slate Charcoal Dominant */
.page-hero {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  color: #FFFFFF;
  padding: 2rem;
  border-radius: var(--nt-radius-lg);
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--nt-shadow);
}

/* Button Theming - Cobalt Blue Action & Slate Charcoal Grounding */
.btn-primary {
  background-color: var(--nt-secondary) !important;
  border-color: var(--nt-secondary) !important;
  color: #FFFFFF !important;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--nt-secondary-hover) !important;
  border-color: var(--nt-secondary-hover) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-outline-primary {
  color: var(--nt-secondary) !important;
  border-color: var(--nt-secondary) !important;
  font-weight: 600;
}

.btn-outline-primary:hover {
  background-color: var(--nt-secondary) !important;
  border-color: var(--nt-secondary) !important;
  color: #FFFFFF !important;
}

.btn-dark {
  background-color: var(--nt-primary) !important;
  border-color: var(--nt-primary) !important;
  color: #FFFFFF !important;
  font-weight: 600;
}

.btn-dark:hover {
  background-color: var(--nt-primary-dark) !important;
  border-color: var(--nt-primary-dark) !important;
  color: #FFFFFF !important;
}

.btn-outline-dark {
  color: var(--nt-primary) !important;
  border-color: var(--nt-border-subtle) !important;
  font-weight: 600;
}

.btn-outline-dark:hover {
  background-color: var(--nt-primary) !important;
  border-color: var(--nt-primary) !important;
  color: #FFFFFF !important;
}

/* Text and Utility Overrides */
.text-primary {
  color: var(--nt-secondary) !important;
}

.bg-primary:not([class*="bg-opacity"]) {
  background-color: var(--nt-secondary) !important;
}

.border-primary {
  border-color: var(--nt-secondary) !important;
}

.text-success {
  color: var(--nt-accent) !important;
}

.bg-success:not([class*="bg-opacity"]) {
  background-color: var(--nt-accent) !important;
}

.border-success {
  border-color: var(--nt-accent) !important;
}

/* Clean, Muted Avatars & Name Icons */
.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nt-bg) !important;
  color: var(--nt-primary) !important;
  border: 1px solid var(--nt-border-subtle) !important;
  font-weight: 600;
  font-size: 0.78rem;
  flex-shrink: 0;
  box-shadow: none !important;
}

.avatar-circle-lg {
  width: 48px;
  height: 48px;
  font-size: 1.1rem;
}

.avatar-circle-sm {
  width: 24px;
  height: 24px;
  font-size: 0.68rem;
}

/* Status Badges - Emerald/Mint Accent for Completed Success */
.badge-status {
  padding: 0.25em 0.55em;
  font-weight: 600;
  font-size: 0.72rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-transform: capitalize;
}

.badge-status-completed {
  background-color: var(--nt-accent-bg);
  color: var(--nt-accent);
  border: 1px solid var(--nt-accent-border);
}

.badge-status-scheduled {
  background-color: #F8FAFC;
  color: var(--nt-primary);
  border: 1px solid var(--nt-border);
}

.badge-status-due_soon, .badge-status-due-soon {
  background-color: #FEFCE8;
  color: #B45309;
  border: 1px solid #FEF08A;
}

.badge-status-overdue, .badge-status-missed {
  background-color: #FEF2F2;
  color: var(--nt-danger);
  border: 1px solid #FECACA;
}

.badge-status-not_completed, .badge-status-not-completed {
  background-color: #F1F5F9;
  color: #64748B;
  border: 1px solid #CBD5E1;
}

/* Muted Tiers */
.badge-tier {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #FFFFFF;
  color: var(--nt-primary);
  border: 1px solid var(--nt-border);
}

.badge-elite, .badge-reliable, .badge-attention, .badge-nudge, .badge-risk {
  background: #FFFFFF;
  color: var(--nt-primary);
  border: 1px solid var(--nt-border);
}

/* Platform Badge */
.badge-platform {
  background: #F8FAFC;
  color: #475569;
  border: 1px solid #E2E8F0;
  font-weight: 500;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* 2D Matrix Table Grid */
.matrix-container {
  overflow-x: auto;
  background: #FFFFFF;
  border-radius: var(--nt-radius-md);
  box-shadow: var(--nt-shadow);
  border: 1px solid var(--nt-border);
}

.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
}

.matrix-table th {
  background: #F1F5F9;
  color: #475569;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.9rem 0.75rem;
  border-bottom: 2px solid var(--nt-border);
  border-right: 1px solid var(--nt-border);
  text-align: center;
  vertical-align: middle;
}

.matrix-table th.matrix-sticky-corner {
  position: sticky;
  left: 0;
  z-index: 10;
  background: #E2E8F0;
  text-align: left;
  min-width: 180px;
}

.matrix-table td.matrix-sticky-promoter {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #FFFFFF;
  font-weight: 600;
  border-right: 2px solid var(--nt-border);
  border-bottom: 1px solid var(--nt-border);
  padding: 0.75rem 1rem;
}

.matrix-table td.matrix-cell {
  border-bottom: 1px solid var(--nt-border);
  border-right: 1px solid var(--nt-border);
  padding: 0.5rem;
  text-align: center;
  vertical-align: middle;
  min-width: 110px;
  height: 80px;
  transition: background 0.15s ease;
}

.matrix-cell-clickable {
  cursor: pointer;
}

.matrix-cell-clickable:hover {
  background-color: #F8FAFC !important;
  box-shadow: inset 0 0 0 2px var(--nt-primary);
}

.matrix-cell-self {
  background: repeating-linear-gradient(
    45deg,
    #F1F5F9,
    #F1F5F9 8px,
    #E2E8F0 8px,
    #E2E8F0 16px
  );
  color: #94A3B8;
  font-size: 0.75rem;
  font-weight: 600;
}

.matrix-card-chip {
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
  justify-content: center;
}

.matrix-card-completed {
  background: var(--nt-accent-bg);
  border-color: var(--nt-accent-border);
  color: var(--nt-accent);
}

.matrix-card-due_soon {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: var(--nt-secondary);
}

.matrix-card-overdue {
  background: #FEF2F2;
  border-color: #FECACA;
  color: var(--nt-danger);
}

.matrix-card-not_completed {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #64748B;
  opacity: 0.85;
}

/* Timeline Cards */
.timeline-round-header {
  background: var(--nt-bg);
  border-left: 4px solid var(--nt-primary);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nudge-timeline-card, .promotion-timeline-card {
  border: 1px solid var(--nt-border);
  border-radius: 12px;
  padding: 1rem;
  background: #FFFFFF;
  margin-bottom: 0.85rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nudge-timeline-card:hover, .promotion-timeline-card:hover {
  box-shadow: var(--nt-shadow);
  border-color: var(--nt-border-subtle);
}

/* Reciprocity Meter & Badges */
.reciprocity-pill, .badge-giver, .badge-balanced, .badge-taker {
  font-weight: 600;
  font-size: 0.76rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
}

.reciprocity-positive, .badge-giver {
  background: var(--nt-accent-bg);
  color: var(--nt-accent);
  border: 1px solid var(--nt-accent-border);
}

.reciprocity-balanced, .badge-balanced {
  background: #FFFFFF;
  color: var(--nt-primary);
  border: 1px solid var(--nt-border);
}

.reciprocity-negative, .badge-taker {
  background: #FEF2F2;
  color: var(--nt-danger);
  border: 1px solid #FECACA;
}

.reciprocity-pill-lg {
  font-size: 0.95rem !important;
  padding: 0.55rem 1.25rem !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Opacity utilities used across status badges */
.bg-opacity-10 {
  --bs-bg-opacity: 0.1 !important;
}

.bg-opacity-15 {
  --bs-bg-opacity: 0.15 !important;
}

.bg-opacity-20 {
  --bs-bg-opacity: 0.2 !important;
}

/* Footer - Slate Charcoal */
.footer-nudge, .footer-referralpod {
  margin-top: auto;
  background: #0F172A;
  color: #94A3B8;
  padding: 2.2rem 0;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ReferralPod Specific Utilities */
.badge-seat {
  background-color: #F1F5F9;
  color: #0F172A;
  border: 1px solid #CBD5E1;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-open-seat {
  background-color: #FFFFFF;
  color: #475569;
  border: 1.5px dashed #94A3B8;
  font-weight: 600;
  font-size: 0.76rem;
  padding: 0.3rem 0.6rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.badge-open-seat:hover {
  background-color: #ECFDF5;
  color: #047857;
  border-color: #10B981;
  transform: translateY(-1px);
}

.card-pod {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--nt-border);
}

.card-pod:hover {
  transform: translateY(-2px);
  box-shadow: var(--nt-shadow-lg) !important;
}

.card-referral {
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md);
  transition: all 0.2s ease;
}

.card-referral:hover {
  box-shadow: var(--nt-shadow);
  border-color: var(--nt-border-subtle);
}

.stat-hero-number {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #047857;
}

.brand-gradient-emerald {
  background: linear-gradient(135deg, #10B981 0%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* In-App Left-Hand Sidebar Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--nt-bg);
}

/* Base styles shared across mobile & desktop for in-app sidebar */
.app-sidebar {
  background-color: #0F172A !important;
  color: #F8FAFC !important;
  --bs-offcanvas-bg: #0F172A !important;
  --bs-offcanvas-color: #F8FAFC !important;
  --bs-offcanvas-zindex: 1060 !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop static/sticky sidebar (>= 992px) */
@media (min-width: 992px) {
  .app-sidebar,
  .app-sidebar.offcanvas-lg {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    transform: none !important;
    visibility: visible !important;
    z-index: 1000 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
}

.app-sidebar-header {
  padding: 1.15rem 1.25rem 0.95rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-pod-selector {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-pod-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  color: #FFFFFF !important;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.sidebar-pod-btn:hover, .sidebar-pod-btn:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF !important;
}

.app-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.app-sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.app-sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar-section-title {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94A3B8;
  margin: 1.15rem 0.5rem 0.35rem 0.5rem;
}

.sidebar-section-title:first-of-type {
  margin-top: 0.2rem;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  color: #CBD5E1 !important;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 7px;
  text-decoration: none !important;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.sidebar-nav-link i.nav-icon {
  width: 22px;
  font-size: 0.95rem;
  text-align: center;
  color: #94A3B8;
  transition: color 0.15s ease;
  margin-right: 0.5rem;
}

.sidebar-nav-link:hover {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav-link:hover i.nav-icon {
  color: #38BDF8;
}

.sidebar-nav-link.active {
  color: #34D399 !important;
  background: rgba(16, 185, 129, 0.14);
  font-weight: 600;
  border-left: 3px solid #10B981;
}

.sidebar-nav-link.active i.nav-icon {
  color: #10B981;
}

.sidebar-cta {
  margin: 0.4rem 0.25rem 0.85rem 0.25rem;
}

.btn-sidebar-cta {
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.btn-sidebar-cta:hover {
  background: linear-gradient(135deg, #047857 0%, #065F46 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.35);
}

.app-sidebar-footer {
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.95);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 0.35rem 0.5rem;
  color: #F8FAFC;
  border-radius: 8px;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sidebar-user-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.app-main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--nt-bg);
}

.app-topbar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--nt-border);
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  position: sticky;
  top: 0;
  z-index: 1020;
}

@media (max-width: 991.98px) {
  .app-topbar {
    background-color: #0F172A !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 0.5rem 1rem;
    min-height: 54px;
    position: sticky;
    top: 0;
    z-index: 1020;
  }

  .mobile-topbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    pointer-events: auto;
    z-index: 1;
  }

  .mobile-topbar-brand .navbar-brand-promotepod {
    font-size: 1.15rem;
  }

  .app-sidebar.offcanvas-lg {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 280px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    z-index: 1060 !important; /* STRICTLY HIGHER than Bootstrap's .offcanvas-backdrop (1040) */
    background-color: #0F172A !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5) !important;
  }

  /* When closed, hide off-screen with visibility hidden so it cannot intercept clicks */
  .app-sidebar.offcanvas-lg:not(.show) {
    transform: translateX(-100%) !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* When open, ensure full visibility and high stacking index over backdrop */
  .app-sidebar.offcanvas-lg.show {
    transform: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 1060 !important;
  }
}



