/**
 * Loyal Ladies Portal - Dashboard Modern Theme
 * Phase 2: Dashboard Cards, Stats & Components
 * Version: 2.2.0 - Fixed Bootstrap 3 compatibility
 * 
 * IMPORTANT: This CSS only adds visual enhancements
 * It does NOT override Bootstrap's grid system
 */

/* ============================================
   WELCOME BOARD / JUMBOTRON
   ============================================ */
.jumbotron {
  background: var(--white) !important;
  border-radius: var(--radius-lg) !important;
  padding: 0 !important;
  box-shadow: var(--shadow-lg);
  margin-bottom: 25px;
  overflow: hidden;
  border: none;
}

.jumbotron .row.dashboard {
  margin: 0;
}

.jumbotron .row.dashboard > div[class*="col-"] {
  padding: 25px;
}

/* Left column - Green gradient (on desktop md-6 will be side by side) */
.jumbotron .row.dashboard > div[class*="col-"]:first-child {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
}

/* Right column */
.jumbotron .row.dashboard > div[class*="col-"]:last-child {
  background: var(--white);
}

.dashboard .welcome h1 {
  font-size: 1.6rem !important;
  font-weight: 700;
  color: var(--white) !important;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.dashboard .welcome p {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Likes & Points Section */
.likes-points-section {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg) !important;
  padding: 15px 20px !important;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.likes-points-section .likes-section,
.likes-points-section .points-section {
  color: var(--white) !important;
  font-size: 1rem;
  margin-bottom: 8px;
}

.likes-points-section b {
  color: var(--accent) !important;
  font-weight: 700;
}

/* Community Highlights Card */
.top-performance-card {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg) !important;
  padding: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.top-performance-card h4 {
  color: var(--white) !important;
  font-size: 1.2rem !important;
  font-weight: 600;
  margin-bottom: 5px !important;
}

.top-performance-card p {
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 1.1rem !important;
}

.top-performance-card .top-member,
.top-performance-card .top-group {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 15px;
  margin-bottom: 12px !important;
}

.top-performance-card .top-group {
  margin-bottom: 0 !important;
}

.top-performance-card .top-member img {
  border-color: var(--accent) !important;
}

.top-performance-card .top-member div,
.top-performance-card .top-group div {
  color: var(--white) !important;
}

.top-performance-card .top-group .fa-users {
  color: var(--accent) !important;
}

/* Referral Section */
.referral-section {
  background: var(--gray-50) !important;
  border: 1px solid var(--gray-200) !important;
  border-radius: var(--radius-lg) !important;
  padding: 20px !important;
  margin-bottom: 20px;
}

.referral-section strong {
  color: var(--gray-700);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.referral-section p {
  color: var(--gray-600) !important;
  font-size: 1rem !important;
  background: var(--white);
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  margin: 8px 0 15px !important;
  font-family: monospace;
}

.referral-section .share-icons a,
.referral-section .share-icons button {
  transition: transform var(--transition);
}

.referral-section .share-icons a:hover,
.referral-section .share-icons button:hover {
  transform: scale(1.15);
}

/* Daily Quote Card */
.daily-quote-card {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%) !important;
  border: 1px solid var(--gray-200) !important;
  border-radius: var(--radius-lg) !important;
  padding: 20px !important;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  box-shadow: var(--shadow-sm) !important;
}

.daily-quote-card .quote-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: var(--primary-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.daily-quote-card .quote-icon i {
  font-size: 1.3rem !important;
  color: var(--primary) !important;
}

.daily-quote-card .quote-text {
  flex: 1;
}

.daily-quote-card .quote-text strong {
  color: var(--gray-600);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.daily-quote-card .quote-text p {
  color: var(--gray-700) !important;
  font-size: 1.1rem !important;
  font-style: italic;
  line-height: 1.6;
  margin: 0px !important;
}

/* ============================================
   STAT TILES - TOP ROW (tile_stats_count)
   ============================================ */
.tile_stats_count {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 18px 15px;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.tile_stats_count:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.tile_stats_count .count_top {
  color: var(--gray-500);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 5px;
}

.tile_stats_count .count_top i {
  margin-right: 4px;
  color: var(--primary);
}

.tile_stats_count .count {
  font-size: 1.6rem !important;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.2;
  margin-bottom: 4px;
}

.tile_stats_count .count a {
  color: inherit;
  text-decoration: none;
}

.tile_stats_count .count a:hover {
  color: var(--primary);
}

.tile_stats_count .count_bottom {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.tile_stats_count .count_bottom i {
  font-style: normal;
}

.tile_stats_count .count_bottom i.red {
  color: var(--danger) !important;
}

.tile_stats_count .count_bottom i.green {
  color: var(--success) !important;
}

.tile_stats_count .count_bottom i.blue {
  color: var(--info) !important;
}

/* Different color borders for variety - using nth-child for tiles inside tile_count */
.tile_count .col-md-2:nth-child(2) .tile_stats_count {
  border-left-color: var(--warning);
}
.tile_count .col-md-2:nth-child(2) .tile_stats_count .count_top i {
  color: var(--warning);
}

.tile_count .col-md-2:nth-child(3) .tile_stats_count {
  border-left-color: var(--danger);
}
.tile_count .col-md-2:nth-child(3) .tile_stats_count .count_top i {
  color: var(--danger);
}

.tile_count .col-md-2:nth-child(4) .tile_stats_count {
  border-left-color: var(--info);
}
.tile_count .col-md-2:nth-child(4) .tile_stats_count .count_top i {
  color: var(--info);
}

.tile_count .col-md-2:nth-child(5) .tile_stats_count {
  border-left-color: var(--success);
}
.tile_count .col-md-2:nth-child(5) .tile_stats_count .count_top i {
  color: var(--success);
}

.tile_count .col-md-2:nth-child(6) .tile_stats_count {
  border-left-color: #25D366;
}
.tile_count .col-md-2:nth-child(6) .tile_stats_count .count_top i {
  color: #25D366;
}

/* ============================================
   ONLINE USERS SECTION
   ============================================ */
#online-users-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#online-users-list li {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: var(--gray-50);
  border-radius: var(--radius);
  margin-bottom: 6px;
  transition: all var(--transition);
}

#online-users-list li:hover {
  background: var(--primary-light);
}

#online-users-list li img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-right: 10px;
  border: 2px solid var(--success);
}

#online-icon {
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================
   ACTIVITIES SECTION
   ============================================ */
.x_leaders .byline {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.x_leaders .excerpt {
  font-size: 0.95rem;
  color: var(--gray-600);
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: var(--radius);
  margin-bottom: 10px;
  border-left: 3px solid var(--primary);
}

.x_leaders .excerpt span {
  color: var(--gray-400);
  font-size: 0.85rem;
}

/* ============================================
   CHARTS CONTAINER
   ============================================ */
#chart1,
#graph_bar,
#graph_donut,
#education_chart {
  min-height: 280px;
}

/* Morris.js Chart Styling */
.morris-hover {
  background: var(--gray-800) !important;
  color: var(--white) !important;
  border-radius: var(--radius) !important;
  padding: 10px 15px !important;
  border: none !important;
  box-shadow: var(--shadow-lg) !important;
}

/* ============================================
   MARKETPLACE / TIMELINE
   ============================================ */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline > li {
  padding-bottom: 15px;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 15px;
}

.timeline > li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.timeline .block {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  *padding: 15px;
  transition: all var(--transition);
}

.timeline .block:hover {
  background: var(--white);
  box-shadow: var(--shadow);
}

.timeline .tags {
  margin-bottom: 10px;
}

.timeline .tag {
  display: inline-block;
  background: var(--primary);
  color: var(--white) !important;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.timeline .tag:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.tag:after {
    content: " ";
    height: 30px;
    width: 0;
    position: absolute;
    left: 100%;
    top: 0;
    margin: 0;
    pointer-events: none;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 11px solid var(--primary) !important;
}

.timeline .block_content h2.title {
  font-size: 1.1rem !important;
  font-weight: 600;
  margin: 0 0 8px;
}

.timeline .block_content h2.title a {
  color: var(--gray-800);
  text-decoration: none;
}

.timeline .block_content h2.title a:hover {
  color: var(--primary);
}

.timeline .byline {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.timeline .byline a {
  color: var(--primary);
  font-weight: 500;
}

.timeline .excerpt {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0;
}

.timeline .excerpt a {
  color: var(--primary);
  font-weight: 600;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 991px) {
  .jumbotron .row.dashboard > div[class*="col-"] {
    padding: 20px;
  }
  
  .dashboard .welcome h1 {
    font-size: 1.4rem !important;
  }
}

@media (max-width: 767px) {
  .tile_stats_count {
    padding: 15px 12px;
    margin-bottom: 10px;
  }
  
  .tile_stats_count .count {
    font-size: 1.5rem !important;
  }
  
  .tile_stats_count .count_top {
    font-size: 0.8rem;
  }
  
  .jumbotron .row.dashboard > div[class*="col-"] {
    padding: 15px;
  }
  
  .dashboard .welcome h1 {
    font-size: 1.5rem !important;
  }
  
  .daily-quote-card {
    flex-direction: column;
    text-align: center;
  }
  
  .daily-quote-card .quote-icon {
    margin: 0 auto 15px;
  }
  
  .timeline .block {
    padding: 12px;
  }
  
  .timeline .block_content h2.title {
    font-size: 1rem !important;
  }
}

@media (max-width: 480px) {
  .tile_stats_count .count_top {
    font-size: 0.75rem;
  }
  
  .tile_stats_count .count {
    font-size: 1.3rem !important;
  }
}
