/* ========================================
   Dashboard Widgets — Personalized Cards
   ======================================== */

/* Widget Grid Container */
.dw-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 40px;
}

/* Individual Widget Card */
.dw-card {
  background: var(--ob-card-bg, #fff);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px var(--ob-card-shadow, rgba(0, 0, 0, 0.05));
  border: 1px solid var(--ob-border-light, #f0f0f0);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dw-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--ob-card-hover-shadow, rgba(0, 0, 0, 0.08));
}

/* Card Header */
.dw-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.dw-card__icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: rgba(232, 108, 46, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--ob-accent, #e86c2e);
}

.dw-card__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ob-text-heading, #2a2a2a);
  margin: 0;
}

/* ── Weather Widget ── */

.dw-weather__body {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dw-weather__emoji {
  font-size: 2.8rem;
  line-height: 1;
}

.dw-weather__info {
  flex: 1;
}

.dw-weather__temp {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ob-text-heading, #2a2a2a);
  line-height: 1;
}

.dw-weather__desc {
  font-family: 'Mulish', sans-serif;
  font-size: 0.82rem;
  color: var(--ob-text-muted, #999);
  margin-top: 4px;
}

.dw-weather__city {
  font-family: 'Mulish', sans-serif;
  font-size: 0.78rem;
  color: var(--ob-text-secondary, #777);
  margin-top: 2px;
}

.dw-weather__loading,
.dw-currency__loading {
  font-family: 'Mulish', sans-serif;
  font-size: 0.85rem;
  color: var(--ob-text-muted, #999);
  padding: 12px 0;
}

/* ── Currency Widget ── */

.dw-currency__main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ob-border-light, #f0f0f0);
}

.dw-currency__main-rate {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ob-text-heading, #2a2a2a);
}

.dw-currency__main-label {
  font-family: 'Mulish', sans-serif;
  font-size: 0.8rem;
  color: var(--ob-text-muted, #999);
}

.dw-currency__others {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.dw-currency__pair {
  font-family: 'Mulish', sans-serif;
  font-size: 0.82rem;
  color: var(--ob-text-secondary, #777);
}

.dw-currency__pair-code {
  font-weight: 600;
  color: var(--ob-text-heading, #2a2a2a);
  margin-right: 4px;
}

.dw-currency__all {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dw-currency__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--ob-border-light, #f0f0f0);
}

.dw-currency__row:last-child {
  border-bottom: none;
}

.dw-currency__row-label {
  font-family: 'Mulish', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ob-text-heading, #2a2a2a);
}

.dw-currency__row-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ob-text-secondary, #555);
}

[data-theme="dark"] .dw-currency__row {
  border-bottom-color: var(--ob-border, #2a2d3d);
}

.dw-currency__updated {
  font-family: 'Mulish', sans-serif;
  font-size: 0.7rem;
  color: var(--ob-text-muted, #999);
  margin-top: 10px;
}

/* ── Recommendations Widget ── */

.dw-recs__greeting {
  font-family: 'Mulish', sans-serif;
  font-size: 0.85rem;
  color: var(--ob-text-secondary, #777);
  margin-bottom: 14px;
  line-height: 1.5;
}

.dw-recs__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dw-recs__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--ob-bg-warm, #f5f0eb);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ob-text-heading, #2a2a2a);
  font-family: 'Mulish', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.dw-recs__link:hover {
  background: rgba(232, 108, 46, 0.12);
  transform: translateX(4px);
}

.dw-recs__link i {
  color: var(--ob-accent, #e86c2e);
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
}

.dw-recs__empty {
  font-family: 'Mulish', sans-serif;
  font-size: 0.85rem;
  color: var(--ob-text-muted, #999);
  text-align: center;
  padding: 16px 0;
}

/* ── Progress/Streak Widget ── */

.dw-progress__row {
  margin-bottom: 16px;
}

.dw-progress__row:last-child {
  margin-bottom: 0;
}

.dw-progress__label {
  font-family: 'Mulish', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ob-text-secondary, #777);
  margin-bottom: 6px;
}

.dw-progress__bar {
  background: var(--ob-bg-warm, #f0ece7);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
}

.dw-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #e86c2e, #f0a060);
  border-radius: 8px;
  transition: width 0.6s ease;
}

.dw-progress__text {
  font-family: 'Mulish', sans-serif;
  font-size: 0.78rem;
  color: var(--ob-text-muted, #999);
  margin-top: 4px;
}

.dw-progress__streak {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(232, 108, 46, 0.08);
  border-radius: 10px;
  margin-top: 12px;
}

.dw-progress__streak-icon {
  font-size: 1.2rem;
}

.dw-progress__streak-text {
  font-family: 'Mulish', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ob-accent, #e86c2e);
}

.dw-progress__empty {
  font-family: 'Mulish', sans-serif;
  font-size: 0.85rem;
  color: var(--ob-text-muted, #999);
  text-align: center;
  padding: 16px 0;
}

.dw-progress__start-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ob-accent, #e86c2e);
  font-family: 'Mulish', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 8px;
}

.dw-progress__start-link:hover {
  text-decoration: underline;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .dw-grid {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }

  .dw-weather__temp {
    font-size: 1.6rem;
  }

  .dw-currency__main-rate {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .dw-grid {
    padding: 20px 16px;
    gap: 14px;
  }

  .dw-card {
    padding: 18px;
  }
}

/* ── Dark Theme Support ── */

[data-theme="dark"] .dw-card__icon {
  background: rgba(232, 108, 46, 0.15);
}

[data-theme="dark"] .dw-recs__link {
  background: var(--ob-bg-warm, #1e2130);
}

[data-theme="dark"] .dw-recs__link:hover {
  background: rgba(232, 108, 46, 0.15);
}

[data-theme="dark"] .dw-progress__streak {
  background: rgba(232, 108, 46, 0.12);
}

[data-theme="dark"] .dw-progress__bar {
  background: var(--ob-bg-warm, #252838);
}

[data-theme="dark"] .dw-currency__main {
  border-bottom-color: var(--ob-border, #2a2d3d);
}
