/* ===== TRACKING IBADAH (upgrade selaras video.css) ===== */

@keyframes fadeInUp-ibadah {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SUMMARY CARD */
.ibadah-summary .summary-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 1rem;
  padding: .6rem .65rem .5rem;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
  display: flex;
  flex-direction: column;
  gap: .2rem;
  position: relative;
  overflow: hidden;
  animation: fadeInUp-ibadah .45s ease backwards;
}

.ibadah-summary .summary-card::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), #22c55e);
  opacity: .9;
}

body.dark-mode .ibadah-summary .summary-card {
  background: linear-gradient(135deg, rgba(30,41,59,.7), rgba(15,23,42,.9));
  border-color: rgba(148,163,184,.28);
  box-shadow: 0 14px 34px rgba(0,0,0,.7);
}

.ibadah-summary .label {
  font-size: .6rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .08em;
}

body.dark-mode .ibadah-summary .label {
  color: #cbd5f5;
}

.ibadah-summary .value {
  font-weight: 800;
  font-size: .95rem;
  color: #0f172a;
}

body.dark-mode .ibadah-summary .value {
  color: #f9fafb;
}

.ibadah-summary .sub {
  font-size: .58rem;
  color: #64748b;
}

body.dark-mode .ibadah-summary .sub {
  color: #cbd5f5;
}

/* PROGRESS BAR */
.ibadah-progress-track {
  height: 7px;
  background: rgba(148,163,184,.18);
  border-radius: 999px;
  overflow: hidden;
  margin-top: .3rem;
  position: relative;
}

.ibadah-progress-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(226,232,240,.7), transparent 60%);
  opacity: .6;
}

.ibadah-progress-value {
  height: 100%;
  background: linear-gradient(90deg, #0B7A75, #22c55e);
  width: 0%;
  transition: width .35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .ibadah-progress-track {
  background: rgba(15,23,42,.9);
}

body.dark-mode .ibadah-progress-value {
  background: linear-gradient(90deg, #22c55e, #0ea5e9);
}

/* LIST IBADAH */
.ibadah-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

/* ITEM CARD */
.ibadah-item {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid rgba(148,163,184,.13);
  border-radius: .95rem;
  padding: .55rem .6rem;
  display: flex;
  justify-content: space-between;
  gap: .7rem;
  align-items: center;
  box-shadow: 0 8px 22px rgba(15,23,42,.08);
  position: relative;
  overflow: hidden;
  transition: all .26s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp-ibadah .4s ease backwards;
}

.ibadah-item::before {
  content: '';
  position: absolute;
  inset-inline: -20%;
  bottom: -40%;
  height: 60%;
  background: radial-gradient(circle at top, rgba(45,212,191,.25), transparent 60%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}

.ibadah-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15,23,42,.14);
  border-color: rgba(11,122,117,.32);
}

.ibadah-item:hover::before {
  opacity: 1;
}

body.dark-mode .ibadah-item {
  background: linear-gradient(135deg, rgba(30,41,59,.8), rgba(15,23,42,.9));
  border-color: rgba(148,163,184,.28);
  box-shadow: 0 12px 30px rgba(0,0,0,.75);
}

.ibadah-item.is-done {
  opacity: .7;
}

.ibadah-title {
  font-size: .72rem;
  font-weight: 700;
  color: #0f172a;
}

body.dark-mode .ibadah-title {
  color: #f9fafb;
}

/* META BADGES */
.ibadah-meta {
  display: flex;
  gap: .25rem;
  margin-top: .15rem;
}

.badge-type,
.badge-xp {
  font-size: .55rem;
  border-radius: .5rem;
  padding: .05rem .4rem;
  text-transform: capitalize;
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  white-space: nowrap;
}

.badge-type {
  background: rgba(11,122,117,.12);
  color: #0B7A75;
}

.badge-type.fardhu {
  background: rgba(248,113,113,.12);
  color: #b91c1c;
}

.badge-xp {
  background: rgba(59,130,246,.12);
  color: #1d4ed8;
}

body.dark-mode .badge-type {
  background: rgba(34,197,94,.18);
  color: #bbf7d0;
}

body.dark-mode .badge-type.fardhu {
  background: rgba(248,113,113,.16);
  color: #fecaca;
}

body.dark-mode .badge-xp {
  background: rgba(59,130,246,.2);
  color: #bfdbfe;
}

/* TOGGLE */
.ibadah-toggle {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #e2e8f0;
  border: 0;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: background .18s ease, justify-content .18s ease, box-shadow .18s ease;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(148,163,184,.4);
}

.ibadah-toggle .dot {
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: 0 2px 4px rgba(15,23,42,.2);
}

.ibadah-toggle.on {
  background: linear-gradient(135deg, #0B7A75, #22c55e);
  justify-content: flex-end;
  box-shadow: 0 0 0 1px rgba(16,185,129,.6);
}

.ibadah-toggle.on .dot {
  box-shadow: 0 3px 6px rgba(16,185,129,.65);
}

body.dark-mode .ibadah-toggle {
  background: rgba(15,23,42,.9);
  box-shadow: inset 0 0 0 1px rgba(148,163,184,.4);
}

body.dark-mode .ibadah-toggle.on {
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
}

/* MISSION SMALL CARD */
.mission-card {
  background: linear-gradient(135deg, rgba(11,122,117,.04), rgba(34,197,94,.08));
  border-radius: .75rem;
  padding: .4rem .6rem .6rem;
  box-shadow: 0 6px 16px rgba(15,23,42,.08);
  border: 1px solid rgba(148,163,184,.18);
  position: relative;
  overflow: hidden;
}

.mission-card::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, #0B7A75, #22c55e);
  opacity: .9;
}

body.dark-mode .mission-card {
  background: linear-gradient(135deg, rgba(15,23,42,.95), rgba(15,23,42,.92));
  border-color: rgba(148,163,184,.3);
  box-shadow: 0 10px 26px rgba(0,0,0,.75);
}

/* MISSION PROGRESS */
.mission-track {
  height: 6px;
  background: rgba(148,163,184,.18);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.mission-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(226,232,240,.7), transparent 60%);
  opacity: .5;
}

.mission-value {
  height: 100%;
  background: linear-gradient(90deg, #0B7A75, #22c55e);
  transition: width .35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .mission-track {
  background: rgba(15,23,42,.9);
}

body.dark-mode .mission-value {
  background: linear-gradient(90deg, #22c55e, #0ea5e9);
}
