/**
 * ELMS / DIT theme for Discipleship (Student Portal & Admin Discipleship)
 * Bootstrap 5 · Mobile-responsive · Design tokens from spec
 */
:root {
  /* Sidebar */
  --sidebar-bg: #2c3e50;
  --sidebar-text: #ecf0f1;
  --sidebar-hover-bg: #34495e;
  --sidebar-active-bg: #1abc9c;
  --sidebar-width: 260px;

  /* Primary Accent (links, borders, buttons) */
  --accent: #17a2b8;
  --accent-hover: #138496;
  --accent-light: #d1ecf1;

  /* Notification Badge */
  --badge-bg: #dc3545;

  /* Content Area */
  --content-bg: #f8f9fa;
  --card-bg: #ffffff;
  --card-border-top: 3px solid var(--accent);

  /* Text */
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;

  /* Status colours */
  --status-active: #28a745;
  --status-expired: #dc3545;
  --status-locked: #6c757d;
  --status-completed: #17a2b8;

  /* Footer */
  --footer-bg: #2c3e50;
  --footer-text: #adb5bd;
}

/* Card base – white, 3px teal top border, 8px radius */
.elms-card,
.student-portal .student-card.card,
.admin-discipleship .card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: none;
  border-top: var(--card-border-top);
}
.student-portal .student-card.card { border-top: var(--card-border-top); }

/* Admin discipleship breadcrumb */
.admin-discipleship .disc-breadcrumb { font-size: 13px; margin-bottom: 1rem; }
.admin-discipleship .disc-breadcrumb .breadcrumb-item + .breadcrumb-item::before { opacity: 0.7; }

/* Card with notification badge */
.elms-card-badge {
  position: relative;
}
.elms-card-badge .elms-badge-count {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
  background: var(--badge-bg);
  color: #fff;
  border-radius: 11px;
}

/* Status badges */
.badge-status-active { background: var(--status-active); color: #fff; }
.badge-status-expired,
.badge-status-overdue { background: var(--status-expired); color: #fff; }
.badge-status-locked { background: var(--status-locked); color: #fff; }
.badge-status-completed { background: var(--status-completed); color: #fff; }
.badge-status-pending { background: #fd7e14; color: #fff; }

/* Progress bar – teal */
.elms-progress-bar {
  height: 8px;
  background: var(--accent-light);
  border-radius: 4px;
  overflow: hidden;
}
.elms-progress-bar .progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.elms-progress-label { font-size: 13px; color: var(--text-secondary); }

/* Breadcrumb – right-aligned */
.elms-breadcrumb-wrap { padding: 0.5rem 0; }
.elms-breadcrumb-wrap .breadcrumb { margin: 0; font-size: 13px; }
.elms-breadcrumb-wrap .breadcrumb-item.active { color: var(--text-secondary); }

/* Buttons – accent */
.btn-elms-accent {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  padding: 0.5rem 1rem;
}
.btn-elms-accent:hover { background: var(--accent-hover); color: #fff; }
.btn-outline-elms { border-color: var(--accent); color: var(--accent); }
.btn-outline-elms:hover { background: var(--accent); color: #fff; }

/* Module status icons */
.module-status-passed { color: var(--status-active); }
.module-status-unlocked { color: var(--accent); }
.module-status-locked { color: var(--status-locked); }

/* Quiz results – score gauge placeholder */
.elms-score-gauge {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.elms-score-gauge.fail { background: #f8d7da; color: var(--status-expired); }

/* Certificate card */
.elms-certificate-card {
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff 0%, var(--accent-light) 100%);
  padding: 2rem;
  max-width: 560px;
  margin: 0 auto;
}

/* Sidebar layout (student portal) */
.student-portal.elms-sidebar-layout {
  display: flex;
  min-height: 100vh;
}
.student-portal .elms-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  flex-shrink: 0;
}
.student-portal .elms-sidebar .nav-link {
  color: var(--sidebar-text);
  padding: 0.65rem 1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.student-portal .elms-sidebar .nav-link:hover {
  background: var(--sidebar-hover-bg);
  color: #fff;
}
.student-portal .elms-sidebar .nav-link.active {
  background: var(--sidebar-active-bg);
  color: #fff;
}
.student-portal .elms-main-wrap {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--content-bg);
}
.student-portal .elms-topbar {
  background: var(--card-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.student-portal .elms-content {
  padding: 20px 24px;
  flex: 1;
}
.student-portal footer { margin-left: var(--sidebar-width); }
@media (max-width: 991.98px) {
  .student-portal .elms-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .student-portal .elms-sidebar.show { transform: translateX(0); }
  .student-portal .elms-main-wrap { margin-left: 0; }
  .student-portal footer { margin-left: 0; }
  .student-portal .elms-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    display: none;
  }
  .student-portal .elms-sidebar-overlay.show { display: block; }
}

/* Touch targets */
@media (max-width: 767.98px) {
  .student-portal .btn,
  .student-portal .nav-link,
  .student-portal .form-control { min-height: 44px; }
}
