/* Modern Dashboard Styling */
:root {
    /* Align palette with LET futuristic blue theme */
    --primary: #2563eb;
    --primary-light: #e0f2fe;
    --secondary: #6c757d;
    --success: #198754;
    --info: #0dcaf0;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --pro-color: #9055fd;
    --new-color: #20c997;
    --accent-color: #22d3ee;
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 5px 10px rgba(0,0,0,0.05);
    --transition: all 0.2s ease;
}

body {
    font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    background:
        radial-gradient(circle at top left, rgba(56,189,248,0.25), transparent 55%),
        radial-gradient(circle at bottom right, rgba(37,99,235,0.25), transparent 60%),
        linear-gradient(180deg, #f9fafb 0%, #eff6ff 100%);
    color: #0f172a;
    line-height: 1.6;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Enhanced Section Header Styling */
.section-header {
    margin: 3rem 0 1.5rem 0;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
    color: var(--gray-800);
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section-header:hover::before {
    opacity: 1;
}

.section-header i {
    font-size: 1.25rem;
    color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
}

/* Section-specific header colors */
.section-Exams {
    border-left-color: #4361ee;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.section-ExamAnalysis {
    border-left-color: #20c997;
    background: linear-gradient(135deg, #e6fcf5 0%, #d3f9d8 100%);
}

.section-Progress {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff9db 0%, #fff3bf 100%);
}

.section-EngageRewards {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #ffe3e3 0%, #ffc9c9 100%);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* Card Styling */
.card-wrap {
    transition: var(--transition);
}

.card-hover {
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

.card-hover:active {
    transform: translateY(-1px);
}

.card-hover.disabled {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.card-hover.disabled:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
    border-color: var(--gray-300);
}

/* Icon Styling */
.icon-wrap {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.card-accent .icon-wrap {
    background: rgba(67, 97, 238, 0.1);
    color: var(--accent-color);
}

/* Badge Styling */
.card-badges {
    position: absolute;
    top: -6px;
    right: 12px;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
}

.chip {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.chip-pro {
    background: var(--pro-color);
    color: white;
}

.chip-new {
    background: var(--new-color);
    color: white;
}

/* Text Styling */
.card-title {
    color: var(--gray-800);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card-desc {
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Section Specific Colors */
.section-Exams .icon-wrap {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.section-ExamAnalysis .icon-wrap {
    background: rgba(32, 201, 151, 0.1);
    color: var(--new-color);
}

.section-Progress .icon-wrap {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

.section-EngageRewards .icon-wrap {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-container {
        padding: 1rem;
    }
    
    .section-header {
        font-size: 1.25rem;
        margin: 2rem 0 1rem 0;
        padding: 0.75rem 1rem;
    }
}

/* Focus and Accessibility Improvements */
.ep-card-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--border-radius);
}

.ep-card-link.disabled:focus {
    outline: 2px solid var(--gray-400);
}

/* Animation for new elements */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-wrap {
    animation: fadeIn 0.4s ease forwards;
}

/* Stagger animations for cards */
.cards-grid .card-wrap:nth-child(1) { animation-delay: 0.05s; }
.cards-grid .card-wrap:nth-child(2) { animation-delay: 0.1s; }
.cards-grid .card-wrap:nth-child(3) { animation-delay: 0.15s; }
.cards-grid .card-wrap:nth-child(4) { animation-delay: 0.2s; }
.cards-grid .card-wrap:nth-child(5) { animation-delay: 0.25s; }
.cards-grid .card-wrap:nth-child(6) { animation-delay: 0.3s; }
.cards-grid .card-wrap:nth-child(7) { animation-delay: 0.35s; }
.cards-grid .card-wrap:nth-child(8) { animation-delay: 0.4s; }
.cards-grid .card-wrap:nth-child(9) { animation-delay: 0.45s; }
.cards-grid .card-wrap:nth-child(10) { animation-delay: 0.5s; }


/* NAVIGATION / HEADER – LET blue */

    .navbar-custom { background: rgba(15,23,42,0.9); }
    .navbar-brand-custom,
    .navbar-toggler-icon-custom,
    .navbar-custom .nav-link { color: #e5f0ff !important; }

    .page-header {
      background: linear-gradient(135deg,#1d4ed8,#22d3ee);
      color:#f9fafb;
    }

    .btn-maroon {
      background: linear-gradient(135deg,#2563eb,#22d3ee);
      color:#0f172a;
      border-color: transparent;
    }
    .btn-outline-maroon {
      border-color:#2563eb;
      color:#2563eb;
    }
    .btn-outline-maroon:hover {
      background: linear-gradient(135deg,#2563eb,#22d3ee);
      color:#0f172a;
      border-color: transparent;
    }

    .dash-card {
      background:#fff;
      border:1px solid #e2e8f0;
      border-radius:14px;
    }
    .dash-icon {
      width:42px; height:42px;
      border-radius:50%;
      display:grid; place-items:center;
      background:#e0f2fe;
      color:#2563eb;
      font-size:18px;
    }
    .badge-soft { background:#e2e8f0; color:#1e293b; }
    .headline .accent {
      background:linear-gradient(120deg,#bfdbfe,#e0f2fe);
      -webkit-background-clip:text;
      color:transparent;
    }
    .dashboard-title { font-weight:700; font-size:1.1rem; }
    .section-title { font-weight:800; font-size:1.05rem; color:#2563eb; }
    .desc-trunc { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.7em; }


/*BTN*/

  .btn-initial {
    width: 40px; height: 40px; padding: 0; border: 0;
    background: var(--brand-maroon, #6c2a2a); color: #fff;
    font-weight: 700; outline: none;
    transition: box-shadow .15s ease, transform .05s ease-in-out;
  }
  .btn-initial:hover,
  .btn-initial:focus-visible {
    box-shadow:
      0 0 0 3px var(--bs-body-bg, #fff),
      0 0 0 5px var(--brand-maroon, #6c2a2a);
  }
  .btn-initial:active { transform: scale(.98); }

  .avatar-initial { display: inline-block; line-height: 40px; font-size: 1rem; }
  .avatar-pill {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--brand-maroon, #6c2a2a); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
  }
  @media (min-width: 992px) {
    .btn-initial { width: 36px; height: 36px; }
    .avatar-initial { line-height: 36px; font-size: .95rem; }
  }



  /* ===== Dashboard Section with Left Border ===== */
.dashboard-section {
  position: relative;
  border-left: 4px solid #2563eb; /* LET blue vertical marker */
  background: #fff;
  border-radius: 0.5rem;
  padding-bottom: 1rem; /* space after cards */
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* give space between groups */
.dashboard-section + .dashboard-section {
  margin-top: 1.5rem;
}

/* header stays visually separate, not part of the border */
.dashboard-section > .d-flex.align-items-center.justify-content-between.mb-3 {
  margin: 0;
  padding: .9rem 1rem;
  background: #eff6ff;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  border-bottom: 1px dashed #dbeafe; /* subtle divider */
}

/* section title styling */
.dashboard-section .dashboard-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #2563eb; /* LET blue accent */
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* body padding for cards */
.dashboard-section > .row.g-3 {
  padding: 1rem 1rem 0 1rem;
}

/* optional hover highlight: slightly deepen border color */
.dashboard-section:hover {
  border-left-color: #1d4ed8;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
