/* Daily Challenges Widget - Advanced Glossy UI (info/teal theme) */
.card.daily-challenges-widget {
  position: relative;
  overflow: hidden;
  border: 0 none;
  border-radius: 22px;
  box-shadow:
    0 4px 6px rgba(23, 162, 184, 0.08),
    0 12px 28px rgba(23, 162, 184, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.65) inset,
    0 1px 0 rgba(255, 255, 255, 0.45) inset;
  background: linear-gradient(152deg, #ffffff 0%, #f4fbfd 35%, #eef8fb 70%, #e6f6fa 100%) !important;
  transition: box-shadow 0.35s ease;
}
.card.daily-challenges-widget:hover {
  box-shadow:
    0 10px 24px rgba(23, 162, 184, 0.14),
    0 24px 52px rgba(23, 162, 184, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.75) inset,
    0 1px 0 rgba(255, 255, 255, 0.55) inset;
}

/* Header */
.card.daily-challenges-widget .card-header.challenges-widget-header {
  position: relative;
  border-radius: 22px 22px 0 0 !important;
  padding: 22px 24px 24px;
  border: 0 none;
  background: linear-gradient(138deg, #0d7a8c 0%, #17a2b8 25%, #1fc8e3 50%, #17a2b8 75%, #138496 100%) !important;
  box-shadow:
    0 6px 20px rgba(23, 162, 184, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset,
    0 2px 0 rgba(255, 255, 255, 0.28) inset;
  overflow: hidden;
}
.challenges-widget-header__shine {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.15) 35%, transparent 70%);
  border-radius: 22px 22px 0 0;
}
.card.daily-challenges-widget .card-header .position-relative { position: relative; z-index: 1; }
.challenges-widget-header__left { gap: 14px; }
.challenges-widget-header__left .challenges-widget-header__icon-wrap { margin-right: 14px; }

.challenges-widget-header__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.4) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1.35rem;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.25));
}
.challenges-widget-header__title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.challenges-widget-score { text-align: right; }
.challenges-widget-score__value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.challenges-widget-score__label {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.92);
}

/* Body */
.card.daily-challenges-widget .card-body.challenges-widget-body {
  border-radius: 0 0 22px 22px;
  padding: 22px;
  background: transparent;
}

/* Progress block */
.challenges-widget-progress {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(248,252,253,0.85) 100%);
  box-shadow: 0 2px 8px rgba(23, 162, 184, 0.06), 0 0 0 1px rgba(23, 162, 184, 0.08) inset;
}
.challenges-widget-progress__label,
.challenges-widget-progress__meta { color: #6c757d; font-size: 0.8rem; }
.challenges-widget-progress__pct { color: #17a2b8; font-weight: 700; }

.card.daily-challenges-widget .challenges-widget-progress-bar-wrap {
  height: 12px;
  border-radius: 12px;
  background: rgba(23, 162, 184, 0.15);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(23, 162, 184, 0.12) inset;
}
.card.daily-challenges-widget .challenges-widget-progress-bar {
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(90deg, #17a2b8 0%, #1fc8e3 50%, #17a2b8 100%) !important;
  box-shadow: 0 0 14px rgba(23, 162, 184, 0.5), 0 0 0 1px rgba(255,255,255,0.45) inset;
  transition: width 0.6s cubic-bezier(0.34, 1.2, 0.64, 1);
  position: relative;
}
.card.daily-challenges-widget .challenges-widget-progress-bar::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
  pointer-events: none;
}

/* Challenge items - glass cards */
.challenges-list .challenge-item {
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(248,250,252,0.85) 100%);
  box-shadow: 0 2px 8px rgba(23, 162, 184, 0.06), 0 0 0 1px rgba(23, 162, 184, 0.08) inset;
  transition: box-shadow 0.25s ease;
}
.challenges-list .challenge-item:last-child { margin-bottom: 0; }
.challenges-list .challenge-item:hover {
  box-shadow: 0 4px 14px rgba(23, 162, 184, 0.1), 0 0 0 1px rgba(23, 162, 184, 0.1) inset;
}
.challenge-item--completed {
  background: linear-gradient(145deg, rgba(45, 206, 137, 0.12) 0%, rgba(36, 201, 122, 0.08) 100%) !important;
  box-shadow: 0 2px 8px rgba(45, 206, 137, 0.1), 0 0 0 1px rgba(45, 206, 137, 0.15) inset;
}
.challenge-item__icon { font-size: 1.1rem; }
.challenge-item__icon--done { color: #2dce89 !important; }
.challenge-item__icon--pending { color: #adb5bd !important; }
.challenge-item__name { font-weight: 700; color: #32325d; font-size: 0.95rem; }
.challenge-item__desc { color: #6c757d; font-size: 0.8rem; }
.challenge-item__points { font-weight: 800; color: #5e72e4; }
.challenge-item__progress { color: #6c757d; font-size: 0.75rem; }

.card.daily-challenges-widget .challenge-item-progress {
  height: 6px;
  border-radius: 6px;
  background: rgba(94, 114, 228, 0.15);
  overflow: hidden;
}
.card.daily-challenges-widget .challenge-item-progress-bar {
  border-radius: 6px;
  background: linear-gradient(90deg, #5e72e4 0%, #825ee4 100%) !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset;
  transition: width 0.4s ease;
}

/* Refresh button */
.card.daily-challenges-widget .challenges-widget-refresh-btn {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 10px 20px;
  font-weight: 700;
  border: 2px solid rgba(23, 162, 184, 0.6);
  background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(238,248,251,0.9) 100%) !important;
  color: #17a2b8 !important;
  box-shadow: 0 2px 10px rgba(23, 162, 184, 0.15), 0 0 0 1px rgba(255,255,255,0.8) inset;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card.daily-challenges-widget .challenges-widget-refresh-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(23, 162, 184, 0.25), 0 0 0 1px rgba(255,255,255,0.9) inset;
  border-color: #17a2b8;
  background: linear-gradient(145deg, #17a2b8 0%, #138496 100%) !important;
  color: #fff !important;
}
.challenges-widget-refresh-btn__shine {
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.5), transparent);
  transition: left 0.7s ease;
}
.card.daily-challenges-widget .challenges-widget-refresh-btn:hover .challenges-widget-refresh-btn__shine {
  left: 120%;
}

/* Night mode */
body.night-mode .card.daily-challenges-widget {
  background: linear-gradient(152deg, #1a1d2a 0%, #1a2428 40%, #1e2a2e 100%) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
body.night-mode .card.daily-challenges-widget .challenges-widget-progress {
  background: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.03) 100%);
}
body.night-mode .card.daily-challenges-widget .challenge-item--pending {
  background: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.03) 100%) !important;
}
body.night-mode .card.daily-challenges-widget .challenge-item__name { color: #e8ecf4; }
body.night-mode .card.daily-challenges-widget .challenge-item__desc,
body.night-mode .card.daily-challenges-widget .challenges-widget-progress__label,
body.night-mode .card.daily-challenges-widget .challenges-widget-progress__meta { color: #8f9ba5; }
