/* =========================================================
   Dashboard — Compact + Polished + Tabbed
   File: /public/scripts/dashboard.css
   ========================================================= */

body.page--dashboard {
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(255, 212, 71, 0.10), transparent 55%),
    radial-gradient(900px 520px at 75% 10%, rgba(90, 160, 255, 0.13), transparent 55%),
    radial-gradient(900px 650px at 50% 120%, rgba(0, 0, 0, 0.45), transparent 60%),
    linear-gradient(180deg, rgba(7, 14, 28, 0.92), rgba(4, 9, 20, 0.98));
}

/* Click-safety: prevent any pseudo/overlay from blocking the UI */
body.page--dashboard::before,
body.page--dashboard::after,
.page--dashboard .dash::before,
.page--dashboard .dash::after,
.page--dashboard .dashBrand__glow {
  pointer-events: none !important;
}

.page--dashboard .dash {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 16px 34px;
  position: relative;
  z-index: 2; /* above any background layers */
}

/* ---------- Top row ---------- */
.dashTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.dashBrand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashBrand__logoWrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255, 212, 71, 0.18);
  box-shadow: 0 14px 34px rgba(0,0,0,0.28);
}

.dashBrand__glow {
  position: absolute;
  inset: -10px;
  border-radius: 22px;
  background: radial-gradient(circle at 40% 30%, rgba(255,212,71,0.22), transparent 55%);
  filter: blur(10px);
}

.dashBrand__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.dashBrand__title {
  margin: 0;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.dashBrand__subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  opacity: 0.78;
}

.dashAdminLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  text-decoration: none;
  color: inherit;
  font-size: 13px;
  opacity: 0.92;
}

.dashAdminLink:hover { opacity: 1; }

/* ---------- Snapshot row ---------- */
.dashSnap {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 980px) {
  .dashTop { align-items: flex-start; }
  .dashSnap { grid-template-columns: 1fr; }
}

/* Shared card */
.snapCard, .panelCard {
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.snapCard--primary {
  border-color: rgba(255, 212, 71, 0.18);
  box-shadow:
    0 10px 26px rgba(0,0,0,0.22),
    0 0 22px rgba(255, 212, 71, 0.08);
}

.snapCard__head,
.panelCard__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.snapCard__kicker,
.panelCard__kicker {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
  opacity: 0.90;
}

.snapCard__meta,
.panelCard__meta {
  font-size: 12px;
  opacity: 0.74;
  text-align: right;
  max-width: 55%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snapCard__title {
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

/* Progress */
.snapProgress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 8px;
}

.snapProgress__bar {
  flex: 1 1 auto;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.snapProgress__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 212, 71, 0.95), rgba(255, 212, 71, 0.35));
  box-shadow: 0 0 16px rgba(255, 212, 71, 0.12);
}

.snapProgress__pct {
  width: 44px;
  text-align: right;
  font-size: 12px;
  opacity: 0.78;
}

/* Actions */
.snapCard__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.snapHint {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.72;
}

/* Pills */
.pillGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pill {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.pill__label { font-size: 12px; opacity: 0.78; }
.pill__value { font-size: 14px; font-weight: 850; letter-spacing: 0.01em; }

.snapNote {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.72;
}

/* ---------- Tabs ---------- */
.dashTabs { margin-bottom: 14px; position: relative; z-index: 3; }

.tabBar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  position: relative;
  z-index: 4;
}

.tabBtn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: inherit;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.86;
}

.tabBtn:hover { opacity: 1; }
.tabBtn.is-active {
  opacity: 1;
  border-color: rgba(255, 212, 71, 0.22);
  box-shadow: 0 0 0 3px rgba(255, 212, 71, 0.12);
}

/* Panels */
.tabPanel { display: none; }
.tabPanel.is-active { display: block; }

.panelGrid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 980px) {
  .panelGrid2 { grid-template-columns: 1fr; }
}

.panelEmpty {
  font-size: 13px;
  opacity: 0.78;
  padding: 6px 0 2px;
}

/* Recent list */
.dashList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.dashList__item {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
}

.dashList__item--muted {
  opacity: 0.72;
  font-size: 12px;
}

/* ---------- Courses zone cards (from JS) ---------- */
#dash-courses-zone {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.dash-course-card {
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.dash-course-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.dash-course-title { font-weight: 850; letter-spacing: 0.01em; }
.dash-course-meta  { font-size: 12px; opacity: 0.75; white-space: nowrap; }

.dash-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 10px;
}

.dash-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 212, 71, 0.95), rgba(255, 212, 71, 0.35));
}

.dash-course-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (min-width: 980px) {
  #dash-courses-zone { grid-template-columns: 1fr 1fr; }
}

/* ---------- Feedback ---------- */
.dashFeedback { margin-top: 14px; }

.feedback__row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 860px) {
  .feedback__row { grid-template-columns: 1fr; }
}

.field__label { font-size: 12px; font-weight: 850; opacity: 0.86; }
.field__input, .field__textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.22);
  color: inherit;
  padding: 10px 12px;
  outline: none;
}

.field__input:focus, .field__textarea:focus {
  border-color: rgba(255, 212, 71, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 212, 71, 0.14);
}

.field__help { font-size: 12px; opacity: 0.72; margin-top: 6px; }

.feedback__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.feedback__status { font-size: 12px; opacity: 0.78; }

.dashBottomNote {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  opacity: 0.70;
}
