/* ============================================
   WAVLENTH — PROGRESS PAGE STYLES
   Accent: --accent-progress (#cc5500)
============================================ */

/* ── Page title ─────────────────────────────────────────────── */
.progress-page-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--accent-progress);
}

.progress-page-subtitle {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 4px;
}

/* ── Tabs ────────────────────────────────────────────────────── */
.progress-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.progress-tabs::-webkit-scrollbar {
  display: none;
}

.progress-tab {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: var(--fs-base);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 20px;
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
  white-space: nowrap;
}
.progress-tab:hover {
  color: var(--text);
}
.progress-tab.active {
  color: var(--accent-progress);
}
.progress-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-progress);
  border-radius: 2px 2px 0 0;
}

.progress-pane {
  animation: paneIn 0.2s ease;
}
@keyframes paneIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Overview ─────────────────────────────────────────────────── */
.progress-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
@media (max-width: 900px) {
  .progress-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .progress-stat-grid {
    grid-template-columns: 1fr;
  }
}

.progress-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}
.progress-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.progress-stat-icon {
  font-size: 1.6rem;
}
.progress-stat-value {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--text);
}
.progress-stat-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
@media (max-width: 768px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
}

.overview-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: var(--space-lg);
}

.ov-task-list,
.ov-goal-list,
.ov-deadline-list {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ov-task-list li,
.ov-goal-list li,
.ov-deadline-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--text);
  padding: 8px 10px;
  background: var(--card-hover);
  border-radius: 10px;
}

.ov-empty {
  color: var(--muted);
  font-style: italic;
  background: transparent !important;
}

.ov-link {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--accent-progress);
  text-decoration: none;
  margin-top: var(--space-sm);
  display: inline-block;
  transition: opacity var(--transition);
}
.ov-link:hover {
  opacity: 0.7;
}

.ov-study-stats {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin: var(--space-sm) 0;
}
.ov-study-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card-hover);
  border-radius: 12px;
  padding: 12px 18px;
  min-width: 80px;
}
.ov-study-value {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--accent-progress);
}
.ov-study-key {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Planner ─────────────────────────────────────────────────── */
.planner-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-lg);
  align-items: start;
}
@media (max-width: 768px) {
  .planner-layout {
    grid-template-columns: 1fr;
  }
}

.planner-cal-aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mini-cal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: var(--space-md);
}
.mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}
.mini-cal-month {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  color: var(--text);
  text-transform: uppercase;
}
.mini-cal-nav {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition:
    background var(--transition),
    color var(--transition);
}
.mini-cal-nav:hover {
  background: var(--card-hover);
  color: var(--text);
}

.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-day-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  padding: 4px 0;
  text-transform: uppercase;
}
.cal-day {
  text-align: center;
  padding: 6px 2px;
  border-radius: 8px;
  font-size: var(--fs-sm);
  color: var(--muted);
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
}
.cal-day:hover {
  background: var(--card-hover);
  color: var(--text);
}
.cal-day.today {
  background: rgba(204, 85, 0, 0.15);
  color: var(--accent-progress);
  font-weight: 600;
}
.cal-day.selected {
  background: var(--accent-progress);
  color: #fff;
}
.cal-day.has-tasks::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  background: var(--accent-progress);
  border-radius: 50%;
  margin: 2px auto 0;
}
.cal-day.selected.has-tasks::after {
  background: #fff;
}
.cal-day.empty {
  cursor: default;
}

.planner-selected-date-label {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--muted);
  text-align: center;
}

.planner-tasks-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.planner-tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.planner-filters {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.filter-pill {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition);
}
.filter-pill:hover {
  color: var(--text);
  border-color: var(--accent-progress);
}
.filter-pill.active {
  background: var(--accent-progress);
  border-color: var(--accent-progress);
  color: #fff;
}

.task-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.task-empty {
  color: var(--muted);
  font-style: italic;
  text-align: center;
  padding: 30px 0;
}

.task-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  transition:
    border-color var(--transition),
    transform var(--transition);
}
.task-item:hover {
  transform: translateX(3px);
  border-color: var(--accent-progress);
}
.task-item.completed {
  opacity: 0.5;
}
.task-item.completed .task-title {
  text-decoration: line-through;
}

.task-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--accent-progress);
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.task-item.completed .task-check {
  background: var(--accent-progress);
}
.task-item.completed .task-check::after {
  content: "✓";
  color: #fff;
  font-size: 10px;
}

.task-info {
  flex: 1;
  min-width: 0;
}
.task-title {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--text);
  margin-bottom: 2px;
}
.task-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.task-type-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.task-type-badge.exam {
  border-color: #ef4444;
  color: #ef4444;
}
.task-type-badge.assignment {
  border-color: var(--accent-ai);
  color: var(--accent-ai);
}
.task-type-badge.revision {
  border-color: var(--accent-subjects);
  color: var(--accent-subjects);
}

.task-actions {
  display: flex;
  gap: 6px;
}
.task-action-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.85rem;
  transition:
    color var(--transition),
    background var(--transition);
}
.task-action-btn:hover {
  color: var(--text);
  background: var(--card-hover);
}
.task-action-btn.delete:hover {
  color: #ef4444;
}

/* ── Goals ────────────────────────────────────────────────────── */
.goals-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.goals-summary-row {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.goals-summary-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.goals-summary-value {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--accent-progress);
}
.goals-summary-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.goals-filter-row {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}
.goals-empty {
  color: var(--muted);
  font-style: italic;
  grid-column: 1/-1;
  text-align: center;
  padding: 40px 0;
}

.goal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition:
    transform var(--transition),
    border-color var(--transition);
}
.goal-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-progress);
}
.goal-card.completed {
  opacity: 0.6;
}

.goal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}
.goal-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.goal-category {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
}
.goal-priority-high .goal-title {
  color: var(--accent-progress);
}
.goal-priority-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
}
.priority-high {
  background: rgba(204, 85, 0, 0.2);
  color: var(--accent-progress);
}
.priority-medium {
  background: rgba(212, 175, 55, 0.2);
  color: var(--accent-dashboard);
}
.priority-low {
  background: rgba(163, 163, 163, 0.2);
  color: var(--muted);
}

.goal-progress-bar-wrap {
  background: var(--card-hover);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
}
.goal-progress-bar {
  height: 100%;
  background: var(--accent-progress);
  border-radius: 10px;
  transition: width 0.6s ease;
}
.goal-progress-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.goal-deadline {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.goal-deadline span {
  color: var(--text);
}

.goal-card-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: auto;
}
.goal-action-btn {
  background: var(--card-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  padding: 6px 14px;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.goal-action-btn:hover {
  color: var(--text);
  border-color: var(--accent-progress);
}
.goal-action-btn.complete-btn:hover {
  background: var(--accent-progress);
  border-color: var(--accent-progress);
  color: #fff;
}
.goal-action-btn.delete-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

/* ── Analytics ────────────────────────────────────────────────── */
.analytics-stat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
@media (max-width: 900px) {
  .analytics-stat-row {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 500px) {
  .analytics-stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.analytics-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.analytics-stat-icon {
  font-size: 1.4rem;
}
.analytics-stat-value {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--accent-progress);
}
.analytics-stat-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.analytics-stat-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.analytics-charts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
@media (max-width: 768px) {
  .analytics-charts-row {
    grid-template-columns: 1fr;
  }
}

.analytics-chart-panel,
.analytics-trend-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: var(--space-lg);
}
.chart-wrap {
  position: relative;
  height: 220px;
}

.analytics-trend-text {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-sm);
}
.analytics-completion-text {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}
.analytics-completion-text strong {
  color: var(--accent-progress);
}

/* ── Shared Modal ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay.hidden {
  display: none;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: var(--space-xl);
  width: 100%;
  max-width: 480px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color var(--transition);
}
.modal-close:hover {
  color: var(--text);
}
.modal-title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--space-lg);
}
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
  margin-top: var(--space-md);
}
.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--text);
  transition: border-color var(--transition);
  box-sizing: border-box;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent-progress);
}
.modal-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ── Shared section heading override ─────────────────────────── */
.section-heading {
  color: var(--accent-progress);
}
