/* FirstLab Enhanced - Modern Components */

/* =============================================================
   TOAST NOTIFICATIONS
   ============================================================= */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  width: calc(100vw - 40px);
}

.toast {
  background: var(--white, #FFFFFF);
  border-radius: var(--r-lg, 12px);
  padding: var(--sp-md, 16px) var(--sp-lg, 24px);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border, #E5DEFF);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm, 8px);
  animation: toastSlideIn 0.3s ease-out;
  transform: translateX(100%);
  opacity: 0;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  animation: toastSlideOut 0.3s ease-out forwards;
}

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: var(--ink, #1F2454);
  margin-bottom: 2px;
  font-size: var(--text-sm, 0.875rem);
}

.toast-message {
  color: var(--muted, #68709C);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.5;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--muted, #68709C);
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--ink, #1F2454);
}

/* Toast Variants */
.toast-success .toast-icon {
  color: var(--success, #2EB67D);
}

.toast-error .toast-icon {
  color: var(--error, #EF4444);
}

.toast-warning .toast-icon {
  color: var(--warning, #F59E0B);
}

.toast-info .toast-icon {
  color: var(--violet, #6C4CF1);
}

/* =============================================================
   OPPORTUNITY CARDS
   ============================================================= */
.opportunity-card {
  background: var(--white, #FFFFFF);
  border: 1px solid var(--border, #E5DEFF);
  border-radius: var(--r-xl, 16px);
  padding: var(--sp-lg, 24px);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.opportunity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--violet, #6C4CF1);
}

.opportunity-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-card-green);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.opportunity-card:hover::before {
  opacity: 1;
}

.opp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--sp-md, 16px);
}

.opp-title {
  font-size: var(--text-lg, 1.125rem);
  font-weight: 600;
  color: var(--ink, #1F2454);
  margin-bottom: var(--sp-xs, 4px);
  line-height: 1.4;
}

.opp-org {
  font-size: var(--text-sm, 0.875rem);
  color: var(--muted, #68709C);
  font-weight: 500;
}

.opp-badge {
  background: var(--mist, #F3EEFF);
  color: var(--violet, #6C4CF1);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--r-sm, 8px);
  white-space: nowrap;
}

.opp-description {
  color: var(--muted, #68709C);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.6;
  margin-bottom: var(--sp-md, 16px);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.opp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs, 4px);
  margin-bottom: var(--sp-md, 16px);
}

.opp-tag {
  background: var(--surface, #FAFBFF);
  color: var(--muted, #68709C);
  font-size: var(--text-xs, 0.75rem);
  padding: 4px 8px;
  border-radius: var(--r-sm, 8px);
  border: 1px solid var(--border, #E5DEFF);
}

.opp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-md, 16px);
  border-top: 1px solid var(--border, #E5DEFF);
}

.opp-location {
  display: flex;
  align-items: center;
  gap: var(--sp-xs, 4px);
  color: var(--muted, #68709C);
  font-size: var(--text-sm, 0.875rem);
}

.opp-deadline {
  color: var(--error, #EF4444);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 500;
}

.opp-deadline.safe {
  color: var(--success, #2EB67D);
}

.opp-deadline.warning {
  color: var(--warning, #F59E0B);
}

/* =============================================================
   GRANT CARDS
   ============================================================= */
.grant-card {
  background: var(--white, #FFFFFF);
  border: 1px solid var(--border, #E5DEFF);
  border-radius: var(--r-xl, 16px);
  padding: var(--sp-lg, 24px);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.grant-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--forest, #1B4332);
}

.grant-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--forest, #1B4332);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.grant-card:hover::before {
  opacity: 1;
}

.grant-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--sp-md, 16px);
}

.grant-title {
  font-size: var(--text-lg, 1.125rem);
  font-weight: 600;
  color: var(--ink, #1F2454);
  margin-bottom: var(--sp-xs, 4px);
  line-height: 1.4;
}

.grant-amount {
  font-size: var(--text-xl, 1.25rem);
  font-weight: 700;
  color: var(--forest, #1B4332);
  margin-bottom: var(--sp-xs, 4px);
}

.grant-type {
  font-size: var(--text-sm, 0.875rem);
  color: var(--muted, #68709C);
  font-weight: 500;
}

.grant-description {
  color: var(--muted, #68709C);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.6;
  margin-bottom: var(--sp-md, 16px);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grant-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs, 4px);
  margin-bottom: var(--sp-md, 16px);
}

.grant-tag {
  background: var(--light-green, #E6F3F5);
  color: var(--forest, #1B4332);
  font-size: var(--text-xs, 0.75rem);
  padding: 4px 8px;
  border-radius: var(--r-sm, 8px);
  border: 1px solid var(--mint, #A8DADC);
}

.grant-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-md, 16px);
  border-top: 1px solid var(--border, #E5DEFF);
}

.grant-provider {
  display: flex;
  align-items: center;
  gap: var(--sp-xs, 4px);
  color: var(--muted, #68709C);
  font-size: var(--text-sm, 0.875rem);
}

.grant-deadline {
  color: var(--error, #EF4444);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 500;
}

.grant-deadline.safe {
  color: var(--success, #2EB67D);
}

.grant-deadline.warning {
  color: var(--warning, #F59E0B);
}

/* =============================================================
   MENTOR CARDS
   ============================================================= */
.mentor-card {
  background: var(--white, #FFFFFF);
  border: 1px solid var(--border, #E5DEFF);
  border-radius: var(--r-xl, 16px);
  padding: var(--sp-lg, 24px);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.mentor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--violet, #6C4CF1);
}

.mentor-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-card);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mentor-card:hover::before {
  opacity: 1;
}

.mentor-header {
  display: flex;
  align-items: center;
  gap: var(--sp-md, 16px);
  margin-bottom: var(--sp-md, 16px);
}

.mentor-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--r-full, 9999px);
  background: var(--grad-logo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white, #FFFFFF);
  flex-shrink: 0;
}

.mentor-info {
  flex: 1;
}

.mentor-name {
  font-size: var(--text-lg, 1.125rem);
  font-weight: 600;
  color: var(--ink, #1F2454);
  margin-bottom: var(--sp-xs, 4px);
}

.mentor-title {
  font-size: var(--text-sm, 0.875rem);
  color: var(--muted, #68709C);
  font-weight: 500;
}

.mentor-bio {
  color: var(--muted, #68709C);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.6;
  margin-bottom: var(--sp-md, 16px);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mentor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs, 4px);
  margin-bottom: var(--sp-md, 16px);
}

.mentor-tag {
  background: var(--mist, #F3EEFF);
  color: var(--violet, #6C4CF1);
  font-size: var(--text-xs, 0.75rem);
  padding: 4px 8px;
  border-radius: var(--r-sm, 8px);
  font-weight: 500;
}

.mentor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-md, 16px);
  border-top: 1px solid var(--border, #E5DEFF);
}

.mentor-stats {
  display: flex;
  gap: var(--sp-md, 16px);
}

.mentor-stat {
  text-align: center;
}

.mentor-stat-number {
  display: block;
  font-size: var(--text-lg, 1.125rem);
  font-weight: 700;
  color: var(--ink, #1F2454);
  line-height: 1;
}

.mentor-stat-label {
  font-size: var(--text-xs, 0.75rem);
  color: var(--muted, #68709C);
}

.connect-btn {
  background: var(--grad-card);
  color: var(--white, #FFFFFF);
  border: none;
  border-radius: var(--r-md, 12px);
  padding: var(--sp-sm, 8px) var(--sp-md, 16px);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.connect-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* =============================================================
   FILTER PANEL
   ============================================================= */
.filter-panel {
  background: var(--white, #FFFFFF);
  border: 1px solid var(--border, #E5DEFF);
  border-radius: var(--r-lg, 12px);
  padding: var(--sp-lg, 24px);
  margin-bottom: var(--sp-lg, 24px);
  display: none;
}

.filter-panel.show {
  display: block;
}

.filter-group {
  margin-bottom: var(--sp-md, 16px);
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  display: block;
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  color: var(--ink, #1F2454);
  margin-bottom: var(--sp-sm, 8px);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs, 4px);
}

.filter-chip {
  background: var(--surface, #FAFBFF);
  color: var(--muted, #68709C);
  border: 1px solid var(--border, #E5DEFF);
  border-radius: var(--r-md, 12px);
  padding: var(--sp-xs, 4px) var(--sp-sm, 8px);
  font-size: var(--text-xs, 0.75rem);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: var(--mist, #F3EEFF);
  color: var(--violet, #6C4CF1);
}

.filter-chip.active {
  background: var(--violet, #6C4CF1);
  color: var(--white, #FFFFFF);
  border-color: var(--violet, #6C4CF1);
}

/* =============================================================
   GRIDS
   ============================================================= */
.opportunities-grid,
.grants-grid,
.mentors-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg, 24px);
  margin-bottom: var(--sp-xl, 32px);
}

/* =============================================================
   RESPONSIVE GRIDS
   ============================================================= */
@media (min-width: 768px) {
  .opportunities-grid,
  .grants-grid,
  .mentors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .opportunities-grid,
  .grants-grid,
  .mentors-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =============================================================
   LOADING STATES
   ============================================================= */
.loading {
  text-align: center;
  padding: var(--sp-2xl, 48px);
  color: var(--muted, #68709C);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border, #E5DEFF);
  border-top: 3px solid var(--violet, #6C4CF1);
  border-radius: var(--r-full, 9999px);
  animation: spin 1s linear infinite;
  margin: 0 auto var(--sp-md, 16px);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =============================================================
   EMPTY STATES
   ============================================================= */
.empty-state {
  text-align: center;
  padding: var(--sp-2xl, 48px);
  color: var(--muted, #68709C);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-md, 16px);
  opacity: 0.5;
}

.empty-title {
  font-size: var(--text-lg, 1.125rem);
  font-weight: 600;
  color: var(--ink, #1F2454);
  margin-bottom: var(--sp-sm, 8px);
}

.empty-description {
  font-size: var(--text-sm, 0.875rem);
  margin-bottom: var(--sp-lg, 24px);
}

/* =============================================================
   PRICING SECTION - FREE ACCESS
   ============================================================= */
.pricing-section {
  margin: var(--sp-2xl, 48px) 0;
  text-align: center;
}

.pricing-header {
  margin-bottom: var(--sp-xl, 32px);
}

.pricing-subtitle {
  font-size: var(--text-lg, 1.125rem);
  color: var(--muted, #68709C);
  margin-top: var(--sp-md, 16px);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-card {
  background: var(--white, #FFFFFF);
  border: 2px solid var(--border, #E5DEFF);
  border-radius: var(--r-2xl, 24px);
  padding: var(--sp-2xl, 48px);
  max-width: 400px;
  margin: 0 auto var(--sp-xl, 32px);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--grad-logo-green);
}

.pricing-card.free-plan {
  border-color: var(--forest, #1B4332);
  background: linear-gradient(135deg, var(--white, #FFFFFF) 0%, var(--light-green, #E6F3F5) 100%);
}

.plan-header {
  margin-bottom: var(--sp-xl, 32px);
}

.plan-name {
  font-size: var(--text-2xl, 1.5rem);
  font-weight: 700;
  color: var(--forest, #1B4332);
  margin-bottom: var(--sp-md, 16px);
  font-family: 'Space Grotesk', sans-serif;
}

.plan-price {
  font-size: var(--text-4xl, 2.25rem);
  font-weight: 800;
  color: var(--forest, #1B4332);
  line-height: 1;
}

.plan-period {
  font-size: var(--text-sm, 0.875rem);
  color: var(--muted, #68709C);
  margin-top: var(--sp-xs, 4px);
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-xl, 32px);
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm, 8px);
  margin-bottom: var(--sp-md, 16px);
  font-size: var(--text-base, 1rem);
  color: var(--ink, #1F2454);
}

.feature-item::before {
  content: '✓';
  color: var(--forest, #1B4332);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.free-benefits {
  background: var(--surface, #FAFBFF);
  border-radius: var(--r-lg, 12px);
  padding: var(--sp-xl, 32px);
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid var(--border, #E5DEFF);
}

.free-benefits h4 {
  font-size: var(--text-lg, 1.125rem);
  font-weight: 600;
  color: var(--forest, #1B4332);
  margin-bottom: var(--sp-sm, 8px);
}

.free-benefits p {
  color: var(--muted, #68709C);
  line-height: 1.6;
}

/* Responsive pricing */
@media (max-width: 768px) {
  .pricing-card {
    padding: var(--sp-xl, 32px) var(--sp-lg, 24px);
    margin: 0 var(--sp-md, 16px) var(--sp-lg, 24px);
  }
  
  .plan-price {
    font-size: var(--text-3xl, 1.875rem);
  }
  
  .free-benefits {
    margin: 0 var(--sp-md, 16px);
  }
}

/* FREE FEATURES SECTION */
.free-features-section {
  padding: var(--sp-2xl) var(--sp-lg);
  background: linear-gradient(135deg, var(--mist) 0%, var(--mint) 100%);
  border-radius: var(--r-lg);
  margin: var(--sp-xl) 0;
}

.free-features-section .section-header {
  text-align: center;
  margin-bottom: var(--sp-xl);
}

.free-features-section .section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--forest);
  margin-bottom: var(--sp-sm);
}

.free-features-section .section-subtitle {
  font-size: var(--text-lg);
  color: var(--sage);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

.free-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-lg);
  margin: var(--sp-xl) 0;
}

.free-feature-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.free-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--forest);
}

.free-feature-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-md);
  display: block;
}

.free-feature-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--sp-sm);
}

.free-feature-desc {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: var(--sp-lg);
  font-size: var(--text-sm);
}

.free-feature-badge {
  display: inline-block;
  background: var(--forest);
  color: var(--white);
  padding: var(--sp-xs) var(--sp-md);
  border-radius: var(--r-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.free-cta {
  text-align: center;
  margin-top: var(--sp-xl);
}

.free-disclaimer {
  margin-top: var(--sp-md);
  color: var(--sage);
  font-size: var(--text-sm);
  font-style: italic;
}

/* HEADER RIGHT SECTION */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  min-width: 0;
}

.user-account-btn {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.user-greeting {
  color: var(--forest);
  font-weight: 500;
  font-size: var(--text-sm);
}

/* ABOUT SECTION WITH NITR ATTRIBUTION */
.about-section {
  padding: var(--sp-2xl) var(--sp-lg);
  background: linear-gradient(135deg, var(--mist) 0%, var(--mint) 100%);
  border-radius: var(--r-lg);
  margin: var(--sp-xl) 0;
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-2xl);
  align-items: start;
}

.about-text .section-title {
  color: var(--forest);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--sp-md);
}

.about-description {
  font-size: var(--text-lg);
  color: var(--sage);
  line-height: 1.7;
  margin-bottom: var(--sp-lg);
}

.mission-box {
  background: var(--white);
  padding: var(--sp-lg);
  border-radius: var(--r-md);
  border-left: 4px solid var(--forest);
  margin-bottom: var(--sp-lg);
}

.mission-box h3 {
  color: var(--forest);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}

.mission-box p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.funding-attribution {
  background: var(--white);
  padding: var(--sp-lg);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}

.funding-attribution h3 {
  color: var(--forest);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--sp-md);
}

.nitr-title-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-sm);
}

.nitr-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--white);
}

.nitr-info h4 {
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: 600;
  margin-bottom: 0;
}

.nitr-info p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: var(--sp-md);
}

.nitr-link {
  display: inline-flex;
  align-items: center;
  color: var(--forest);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nitr-link:hover {
  color: var(--forest-dark);
  text-decoration: underline;
}

/* GLOBAL FOOTER DISCLAIMER */
.site-disclaimer {
  margin-top: var(--sp-xl);
  padding: 0 var(--sp-lg) var(--sp-xl);
}

.site-disclaimer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-md) var(--sp-lg);
}

.site-disclaimer-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.site-disclaimer-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.site-disclaimer-link {
  color: var(--forest);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-disclaimer-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .site-disclaimer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-disclaimer-link {
    white-space: normal;
  }
}

/* AUTHENTICATION MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 54, 0.55);
  backdrop-filter: blur(2px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  width: 100%;
}

.auth-modal {
  max-width: 500px;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}

.auth-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-lg);
  border-bottom: 1px solid var(--border);
}

.auth-modal .modal-header h2 {
  color: var(--forest);
  font-size: var(--text-xl);
  font-weight: 600;
}

.auth-modal .modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  padding: var(--sp-xs);
}

.auth-modal .modal-body {
  padding: var(--sp-lg);
}

.auth-modal .modal-body p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: var(--sp-lg);
}

.form-group {
  margin-bottom: var(--sp-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--sp-xs);
  color: var(--ink);
  font-weight: 500;
  font-size: var(--text-sm);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: var(--sp-sm) var(--sp-md);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(28, 67, 50, 0.1);
}

.form-actions {
  display: flex;
  gap: var(--sp-sm);
  margin-top: var(--sp-lg);
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
  flex: 1;
  text-align: center;
}

.auth-benefits {
  margin-top: var(--sp-xl);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--border);
}

.auth-benefits h4 {
  color: var(--forest);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}

.auth-benefits ul {
  list-style: none;
  padding: 0;
}

.auth-benefits li {
  padding: var(--sp-xs) 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.user-greeting {
  color: var(--forest);
  font-weight: 500;
  font-size: var(--text-sm);
}

/* AI WRITER USAGE COUNTER */
.ai-usage-counter {
  margin: var(--sp-sm) 0;
  padding: var(--sp-xs) var(--sp-sm);
  background: var(--mint);
  border-radius: var(--r-sm);
  text-align: center;
}

.ai-usage-counter small {
  color: var(--forest);
  font-weight: 500;
}

/* =============================================================
   PIPELINE SYSTEM - FREE ACCESS
   ============================================================= */
.pipeline-content {
  max-width: 800px;
  margin: 0 auto;
}

.pipeline-summary {
  background: var(--white, #FFFFFF);
  border-radius: var(--r-xl, 16px);
  padding: var(--sp-xl, 32px);
  margin-bottom: var(--sp-xl, 32px);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border, #E5DEFF);
}

.pipeline-summary h3 {
  font-size: var(--text-xl, 1.25rem);
  font-weight: 600;
  color: var(--ink, #1F2454);
  margin-bottom: var(--sp-lg, 24px);
}

.pipeline-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg, 24px);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: var(--text-2xl, 1.5rem);
  font-weight: 800;
  color: var(--forest, #1B4332);
  line-height: 1;
}

.stat-label {
  font-size: var(--text-sm, 0.875rem);
  color: var(--muted, #68709C);
  margin-top: var(--sp-xs, 4px);
}

.pipeline-section {
  margin-bottom: var(--sp-xl, 32px);
}

.pipeline-section h4 {
  font-size: var(--text-lg, 1.125rem);
  font-weight: 600;
  color: var(--ink, #1F2454);
  margin-bottom: var(--sp-md, 16px);
}

.pipeline-items {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md, 16px);
}

.pipeline-item {
  background: var(--white, #FFFFFF);
  border: 1px solid var(--border, #E5DEFF);
  border-radius: var(--r-lg, 12px);
  padding: var(--sp-md, 16px);
  display: flex;
  align-items: center;
  gap: var(--sp-md, 16px);
  transition: all 0.2s ease;
}

.pipeline-item:hover {
  border-color: var(--violet, #6C4CF1);
  transform: translateY(-1px);
}

.item-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.item-content {
  flex: 1;
}

.item-title {
  font-weight: 600;
  color: var(--ink, #1F2454);
  margin-bottom: var(--sp-xs, 4px);
}

.item-date {
  font-size: var(--text-xs, 0.75rem);
  color: var(--muted, #68709C);
}

.item-action {
  background: var(--grad-logo);
  color: var(--white, #FFFFFF);
  border: none;
  border-radius: var(--r-md, 12px);
  padding: var(--sp-sm, 8px) var(--sp-md, 16px);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.item-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.opp-pipeline-indicator {
  text-align: center;
  margin-top: var(--sp-sm, 8px);
  opacity: 0.7;
}

.opp-pipeline-indicator small {
  font-size: var(--text-xs, 0.75rem);
  color: var(--violet, #6C4CF1);
}

.empty-actions {
  display: flex;
  gap: var(--sp-md, 16px);
  justify-content: center;
  margin-top: var(--sp-lg, 24px);
  flex-wrap: wrap;
}

/* AI Writer Enhancements */
.ai-input-area {
  margin-bottom: var(--sp-lg, 24px);
}

#ai-prompt {
  width: 100%;
  min-height: 120px;
  padding: var(--sp-md, 16px);
  border: 2px solid var(--border, #E5DEFF);
  border-radius: var(--r-lg, 12px);
  font-size: var(--text-base, 1rem);
  font-family: inherit;
  resize: vertical;
  margin-bottom: var(--sp-md, 16px);
}

#ai-prompt:focus {
  outline: none;
  border-color: var(--violet, #6C4CF1);
  box-shadow: 0 0 0 3px rgba(108, 76, 241, 0.1);
}

.ai-content-text {
  background: var(--surface, #FAFBFF);
  border: 1px solid var(--border, #E5DEFF);
  border-radius: var(--r-md, 12px);
  padding: var(--sp-lg, 24px);
  margin: var(--sp-md, 16px) 0;
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.6;
  color: var(--ink, #1F2454);
  white-space: pre-wrap;
}

.ai-pipeline-note {
  text-align: center;
  margin-top: var(--sp-md, 16px);
  opacity: 0.8;
}
@keyframes toastSlideIn {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Fade in animation for cards */
.opportunity-card,
.grant-card,
.mentor-card {
  animation: fadeInUp 0.4s ease-out;
}

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

/* =============================================================
   PROFESSIONAL RESOURCE EXPLORER UPGRADE (PALETTE PRESERVED)
   ============================================================= */
#filter-panel,
#grants-tabs {
  display: block;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(243,238,255,0.55));
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(31, 36, 84, 0.06);
}

.resource-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-tab {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}

.resource-tab:hover {
  border-color: var(--violet);
  color: var(--violet);
}

.resource-tab.active {
  background: var(--grad-logo-green);
  color: var(--white);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.resource-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 6px 24px rgba(31,36,84,.07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  border-color: var(--lavender);
  box-shadow: 0 14px 32px rgba(31,36,84,.10);
}

.resource-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.resource-title {
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--ink);
}

.resource-meta-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.resource-org {
  color: var(--forest);
  font-weight: 600;
  margin-bottom: 10px;
}

.resource-meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .86rem;
  margin-bottom: 6px;
}

.resource-description {
  color: var(--muted);
  line-height: 1.65;
  margin: 12px 0;
  font-size: .92rem;
}

.resource-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.resource-badge {
  background: var(--mist);
  color: var(--violet-dark);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 600;
}

.resource-actions {
  margin-top: 8px;
}

.screen-title {
  letter-spacing: -0.02em;
}

.nav-icon {
  display: none;
}

.quick-action-icon,
.free-feature-icon,
.hero-card-icon,
.logo-icon {
  filter: saturate(0.6);
}

.logo-icon {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .02em;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.brand-mark-crest {
  object-position: center;
  transform: none;
  filter: saturate(1.02) contrast(1.01);
}

.brand-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}

.brand-inline-compact {
  gap: 5px;
}

.brand-inline-mark {
  width: 1.05em;
  height: 1.05em;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-inline-on-button {
  gap: 8px;
}

.brand-inline-on-button .brand-inline-mark {
  width: 1.1em;
  height: 1.1em;
}

.profile-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.pipelines-section {
  margin-bottom: var(--sp-2xl, 48px);
}

.pipelines-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.pipeline-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.pipeline-title {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.pipeline-audience {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.pipeline-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.pipeline-step-label {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--violet-dark);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
}

.pipeline-step-link {
  color: var(--forest);
  font-weight: 600;
  text-decoration: none;
}

.pipeline-step-link:hover {
  text-decoration: underline;
}

.panel-highlight {
  animation: panelPulse 0.9s ease;
}

@keyframes panelPulse {
  0% { box-shadow: 0 0 0 0 rgba(108, 76, 241, 0.25); }
  100% { box-shadow: 0 0 0 12px rgba(108, 76, 241, 0); }
}

@media (min-width: 768px) {
  .pipelines-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .youtube-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

.recommended-week-section {
  margin-bottom: var(--sp-2xl, 48px);
}

.recommended-week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.recommended-week-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.recommended-card {
  background: linear-gradient(180deg, #fff, #f8fbff);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.recommended-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.recommended-kind {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--white);
}

.recommended-title {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
}

.recommended-org,
.recommended-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.recommended-actions {
  margin-top: 8px;
}

.youtube-section {
  margin-bottom: var(--sp-2xl, 48px);
}

.youtube-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.youtube-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.youtube-card.featured {
  border-color: rgba(108, 76, 241, 0.4);
  background: linear-gradient(180deg, #ffffff, #f7f4ff);
}

.youtube-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(108, 76, 241, 0.3);
  color: var(--violet-dark);
  background: var(--mist);
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.youtube-title {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.youtube-title-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.youtube-channel-logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(108, 76, 241, 0.45);
  box-shadow: 0 4px 10px rgba(26, 31, 78, 0.18);
  background: #fff;
}

.youtube-channel-logo-wide {
  width: 52px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  padding: 2px;
}

.youtube-desc {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.youtube-link {
  color: var(--forest);
  font-weight: 600;
  text-decoration: none;
}

.youtube-link:hover {
  text-decoration: underline;
}

.install-app-btn {
  background: var(--mist);
  border-color: rgba(108, 76, 241, 0.32);
}

.install-app-btn .btn-icon {
  font-size: 1rem;
}

.deadline-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.deadline-urgent {
  color: #8B1D1D;
  background: #FEE2E2;
  border-color: #FECACA;
}

.deadline-soon {
  color: #92400E;
  background: #FEF3C7;
  border-color: #FDE68A;
}

.deadline-open {
  color: #14532D;
  background: #DCFCE7;
  border-color: #BBF7D0;
}

.deadline-neutral {
  color: var(--violet-dark);
  background: var(--mist);
  border-color: var(--border);
}

.deadline-closed {
  color: #374151;
  background: #E5E7EB;
  border-color: #D1D5DB;
}

.pipeline-progress-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pipeline-progress-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.pipeline-stage-select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
}

.pipeline-tracker-summary {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, #fff, #f8f7ff);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.pipeline-summary-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1rem;
}

.pipeline-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pipeline-summary-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.pipeline-summary-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--forest);
}

.pipeline-summary-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.strategy-form {
  margin-top: 14px;
}

.strategy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.recommendation-card {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #f8fffb);
}

.recommendation-card h3 {
  margin: 0 0 6px;
  color: var(--ink);
}

.recommendation-title {
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 4px;
}

.profile-metrics {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-metric {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  background: var(--white);
}

.profile-metric span {
  display: block;
  font-size: 1.15rem;
  color: var(--violet-dark);
  font-weight: 800;
}

.profile-metric small {
  color: var(--muted);
  font-size: 0.72rem;
}

@media (min-width: 768px) {
  .recommended-week-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .strategy-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}