/* =========================================================
   Course (NCEA Year 1–13) page styles
   ========================================================= */

:root {
  --c-primary: #2b57f2;
  --c-success: #1eb980;
  --c-purple:  #8c6df2;
  --c-amber:   #f2a100;
  --c-text:    #1f2a44;
  --c-muted:   #6c7a93;
  --c-border:  #e6eaf2;
  --c-bg:      #f6f8fc;
  --c-card:    #ffffff;
  --c-soft:    #f0f4ff;
  --radius:    14px;
  --shadow:    0 4px 18px rgba(20, 30, 60, 0.06);
}

.main-box {
  background: var(--c-bg);
  min-height: 100vh;
  color: var(--c-text);
}

/* ---------- Mobile header ---------- */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 1030;
}

@media (max-width: 767.98px) {
  .mobile-header { display: flex; }
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: #fff;
  border-right: 1px solid var(--c-border);
  min-height: 100vh;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 14px;
}

.phase-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin: 14px 6px 6px;
}

.sidebar .nav-pills {
  --bs-nav-pills-link-active-color: var(--c-primary);
  --bs-nav-pills-link-active-bg: #eef3ff;
  --bs-nav-link-color: var(--c-text);
  --bs-nav-link-hover-color: var(--c-text);
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--c-text);
  background: transparent;
  border: 1px solid transparent;
  margin-bottom: 4px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.sidebar .nav-link:hover {
  background: var(--c-soft);
}

.sidebar .nav-pills .nav-link.active {
  border-color: #c7d4ff;
  box-shadow: 0 1px 0 rgba(43, 87, 242, 0.04);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  color: var(--bs-nav-pills-link-active-bg) !important;
}

.yr-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e6ecff;
  color: var(--c-primary);
  font-weight: 700;
  font-size: 14px;
  flex: 0 0 34px;
  transition: background 0.15s, color 0.15s;
}

.sidebar .nav-link.active .yr-num {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(43, 87, 242, 0.35);
}

.head-bottom p {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  color: var(--c-text);
}

.sidebar .nav-link.active .head-bottom p {
  color: var(--c-primary);
}

.head-bottom span {
  font-size: 11px;
  color: var(--c-muted);
  display: block;
  margin-top: 2px;
}

/* ---------- Mobile sidebar drawer ---------- */
@media (max-width: 767.98px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }
  .sidebar.show { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1040;
    display: none;
  }
  .sidebar-overlay.show { display: block; }
}

/* ---------- Main content area ---------- */
.tab-content-area {
  padding: 24px 28px 60px;
}

@media (max-width: 575.98px) {
  .tab-content-area { padding: 16px; }
}

.main-heading h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--c-text);
  line-height: 1.35;
}

/* ---------- Content header ---------- */
.content-header {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.content-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 6px 0 10px;
  color: var(--c-text);
}

.hstat {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hstat .val {
  font-weight: 700;
  font-size: 14px;
  color: var(--c-primary);
}

.hstat .lbl {
  font-size: 11px;
  color: var(--c-muted);
}

/* ---------- Premium / focus cards ---------- */
.premium-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  height: 100%;
}

.card-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 12px;
}

.premium-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--c-border);
}

.premium-item:last-child { border-bottom: none; }

.premium-item .item-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.premium-item .item-head p {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text);
}

.circle-bot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.item-bot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--c-muted);
}

.item-rounded-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--c-soft);
  color: var(--c-primary);
  font-size: 11px;
  font-weight: 600;
}

/* ---------- Focus list ---------- */
.list-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--c-border);
}

.list-item:last-child { border-bottom: none; }

.list-item .dot {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 8px;
}

.focus-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}

.focus-item span:last-child {
  color: var(--c-muted);
  font-size: 13px;
}

/* ---------- Progress / credit panel ---------- */
.progress-item,
.progress-container {
  margin: 14px 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.progress-header .label-name { color: var(--c-text); font-weight: 500; }
.progress-header .value-number { font-weight: 700; }

.progress-bar {
  height: 8px;
  background: var(--c-soft);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--c-primary);
  border-radius: 999px;
  transition: width 0.4s ease;
}
