/* ── Course hero banner ─────────────────────────── */
.cov-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 65%, var(--primary-light) 100%);
  padding: 1.75rem 0;
  position: relative;
  overflow: hidden;
}

.cov-banner::after {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}

.cov-banner-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.cov-banner-icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.cov-banner-body { flex: 1; min-width: 0; }

.cov-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.cov-code {
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: .75rem; font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  letter-spacing: .5px;
  border: 1px solid rgba(255,255,255,.25);
}

.cov-credits, .cov-faculty {
  font-size: .78rem;
  color: rgba(255,255,255,.72);
}

.cov-credits::before { content: '·'; margin-right: 10px; }

.cov-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px;
  line-height: 1.25;
}

.cov-title-en {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  margin-bottom: .75rem;
  font-style: italic;
}

.cov-meta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.cov-meta-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  color: rgba(255,255,255,.8);
}

.cov-meta-chip svg { flex-shrink: 0; opacity: .85; }


/* ── Content area ────────────────────────────────── */
.cov-content { padding: 1.5rem 0 3rem; }


/* ── Group section label ─────────────────────────── */
.cov-group-section { margin-bottom: 1rem; }

.cov-section-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .45px;
  margin-bottom: .55rem;
}


/* ── Group tabs ──────────────────────────────────── */
.cov-group-tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.cov-gtab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: .5rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  background: #fff;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: inherit;
  transition: all .18s;
  min-height: 40px;
}

.cov-gtab:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.cov-gtab.active {
  background: var(--blue-light);
  border-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.cov-gtab-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cov-dot-open   { background: var(--success); }
.cov-dot-closed { background: var(--danger); }

.cov-gtab-slots {
  font-size: .72rem;
  color: var(--success);
  font-weight: 600;
  background: var(--success-bg);
  padding: 1px 7px;
  border-radius: 10px;
}

.cov-slots-full {
  color: var(--danger) !important;
  background: var(--danger-bg) !important;
}


/* ── Group info bar ──────────────────────────────── */
.cov-group-bar {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.cov-gbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: .85rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--surface-2);
}

.cov-gbar-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.cov-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
}

.cov-badge-open {
  background: var(--success-bg);
  color: var(--success);
}

.cov-badge-closed {
  background: var(--danger-bg);
  color: var(--danger);
}

.cov-gbar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
}

.cov-gbar-item { display: flex; flex-direction: column; gap: 3px; }

.cov-gbar-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.cov-gbar-value {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
}

/* Enrollment bar */
.cov-enroll-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.cov-enroll-track {
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
}

.cov-enroll-fill {
  height: 100%;
  border-radius: 6px;
  background: var(--primary);
  transition: width .5s ease;
}

.cov-enroll-fill.full { background: var(--danger); }
.cov-enroll-fill.near-full { background: var(--warn); }

.cov-enroll-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 36px;
  text-align: right;
}


/* ── Accordion ───────────────────────────────────── */
.cov-accordion {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.cov-acc-item {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color .18s;
}

.cov-acc-item.open { border-color: var(--primary-light); }

.cov-acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: .9rem 1.1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background .15s;
}

.cov-acc-btn:hover { background: var(--surface); }
.cov-acc-item.open .cov-acc-btn { background: var(--blue-light); }

.cov-acc-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .18s;
}

.cov-acc-item.open .cov-acc-icon { background: rgba(10,92,143,.15); }

.cov-acc-icon svg {
  width: 16px; height: 16px;
  stroke: var(--primary);
  flex-shrink: 0;
}

.cov-acc-title {
  flex: 1;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text);
}

.cov-acc-chevron {
  width: 18px; height: 18px;
  stroke: var(--text-muted);
  flex-shrink: 0;
  transition: transform .22s;
}

.cov-acc-item.open .cov-acc-chevron { transform: rotate(180deg); }

.cov-acc-body {
  display: none;
  padding: .25rem 1.1rem 1.1rem;
  border-top: 1px solid var(--surface-2);
}

.cov-acc-body.open { display: block; }


/* ── Accordion body content ──────────────────────── */

/* About */
.cov-about-text {
  font-size: .88rem;
  line-height: 1.8;
  color: var(--text);
  padding-top: .75rem;
}

/* Objectives */
.cov-obj-list {
  list-style: none;
  padding: .75rem 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.cov-obj-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .86rem;
  color: var(--text);
  line-height: 1.65;
}

.cov-obj-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--primary-dark);
  font-size: .72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Grade criteria */
.cov-grade-list {
  padding-top: .75rem;
  display: flex;
  flex-direction: column;
  gap: .95rem;
}

.cov-grade-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.cov-grade-label { font-size: .86rem; color: var(--text); font-weight: 500; }

.cov-grade-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.cov-grade-track {
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
}

.cov-grade-fill {
  height: 100%;
  border-radius: 6px;
  background: var(--primary);
  transition: width .5s ease;
}

.cov-grade-pct {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 34px;
  text-align: right;
}

.cov-grade-sub {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 3px;
  padding-left: 2px;
  grid-column: 1 / -1;
}

.cov-grade-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding-top: .75rem;
  margin-top: .25rem;
  border-top: 1.5px solid var(--border);
  font-size: .88rem;
  color: var(--text-muted);
}

.cov-grade-total strong { color: var(--primary); font-size: .95rem; }

/* Chapters */
.cov-chapter-list {
  padding-top: .75rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cov-chapter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: .65rem .25rem;
  border-bottom: 1px solid var(--surface-2);
  transition: background .15s;
}

.cov-chapter-item:last-child { border-bottom: none; }
.cov-chapter-item:hover { background: var(--surface); border-radius: 6px; }

.cov-ch-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cov-chapter-item.done .cov-ch-num {
  background: var(--success-bg);
  border-color: rgba(26,138,90,.3);
  color: var(--success);
}

.cov-ch-title { flex: 1; font-size: .86rem; color: var(--text); line-height: 1.4; }
.cov-ch-lessons { font-size: .75rem; color: var(--text-muted); flex-shrink: 0; }

/* Note */
.cov-note-box {
  margin-top: .75rem;
  background: var(--warn-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .85rem 1rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.cov-note-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.cov-note-text {
  font-size: .85rem;
  line-height: 1.7;
  color: var(--text);
}


/* ── Sidebar ─────────────────────────────────────── */
.cov-sidebar {
  position: sticky;
  top: calc(60px + 12px);
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.cov-sb-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.cov-sb-head {
  padding: .75rem 1rem;
  background: var(--primary);
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
}

.cov-sb-body { padding: .85rem 1rem; }

.cov-sb-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: .4rem 0;
  border-bottom: 1px solid var(--surface-2);
  font-size: .82rem;
}

.cov-sb-row:last-child { border-bottom: none; }
.cov-sb-key { color: var(--text-muted); flex-shrink: 0; }
.cov-sb-val { color: var(--text); font-weight: 500; text-align: right; }

.cov-btn-enroll {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  font-size: .92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s;
  min-height: 44px;
}

.cov-btn-enroll:hover { background: var(--primary-light); }
.cov-btn-enroll:disabled {
  background: var(--text-muted);
  cursor: not-allowed; 
    color: #fff;
}

.cov-btn-wishlist {
  width: 100%;
  background: #fff;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem 1rem;
  font-size: .85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: all .18s;
  min-height: 40px;
}

.cov-btn-wishlist:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

/* Chapter mini-summary in sidebar */
.cov-sb-ch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: .4rem 0;
  border-bottom: 1px solid var(--surface-2);
  font-size: .8rem;
  color: var(--text-muted);
}

.cov-sb-ch-row:last-child { border-bottom: none; }

.cov-sb-ch-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}


/* ── Responsive ──────────────────────────────────── */
@media (max-width: 767px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .cov-banner { padding: 1.25rem 0; }
  .cov-banner-icon { width: 44px; height: 44px; }
  .cov-title { font-size: 1.2rem; }
  .cov-content { padding: 1.1rem 0 2rem; }
  .cov-group-bar { padding: .85rem 1rem; }
  .cov-gbar-grid { grid-template-columns: 1fr 1fr; }
  .cov-acc-title { font-size: .86rem; }
}

@media (max-width: 480px) {
  .cov-banner-inner { flex-direction: column; gap: 10px; }
  .cov-banner-icon { display: none; }
  .cov-grade-row { grid-template-columns: 1fr; gap: 4px; }
  .cov-grade-right { min-width: unset; }
}
.cov-group-bar a{
    text-decoration: none;
}