/**
 * Dashboard Styles
 */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
}

.dashboard-section {
  background: var(--content-bg, white);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--card-shadow, 0 2px 4px rgba(0,0,0,0.05));
}

.dashboard-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--content-text, #1f2937);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.dashboard-content {
  min-height: 100px;
}

.dashboard-loading {
  color: var(--content-text-secondary, #9ca3af);
  font-size: 0.875rem;
  text-align: center;
  padding: 2rem;
}

.dashboard-empty {
  color: var(--content-text-secondary, #9ca3af);
  font-size: 0.875rem;
  text-align: center;
  padding: 1.5rem;
  margin: 0;
}

.dashboard-error {
  color: #dc2626;
  font-size: 0.875rem;
  text-align: center;
  padding: 1.5rem;
  margin: 0;
}

/* Dashboard List */
.dashboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-color, #f3f4f6);
  gap: 1rem;
}

.dashboard-item:last-child {
  border-bottom: none;
}

.dashboard-item.overdue {
  color: #dc2626;
}

.dashboard-item-title {
  font-size: 0.875rem;
  color: var(--content-text, #1f2937);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-item.overdue .dashboard-item-title {
  color: #dc2626;
}

.dashboard-item-meta {
  font-size: 0.75rem;
  color: var(--content-text-secondary, #9ca3af);
  white-space: nowrap;
}

.dashboard-item-meta.overdue {
  color: #dc2626;
  font-weight: 500;
}

/* Dashboard Link */
.dashboard-link {
  display: block;
  text-align: center;
  padding: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--primary-color, #667eea);
  text-decoration: none;
  border-top: 1px solid var(--border-color, #e5e7eb);
}

.dashboard-link:hover {
  text-decoration: underline;
}

/* Goals Section */
.dashboard-goals-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-goal {
  padding: 0.75rem;
  background: var(--hover-bg, #f9fafb);
  border-radius: 8px;
}

.dashboard-goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.dashboard-goal-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--content-text, #1f2937);
}

.dashboard-goal-amount {
  font-size: 0.75rem;
  color: var(--content-text-secondary, #6b7280);
}

.dashboard-progress-bar {
  height: 8px;
  background: var(--border-color, #e5e7eb);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.dashboard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.dashboard-goal-percent {
  font-size: 0.75rem;
  color: var(--content-text-secondary, #6b7280);
}

/* Budget Section */
.dashboard-budget-total {
  text-align: center;
  padding: 1rem;
  background: var(--hover-bg, #f9fafb);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.dashboard-budget-label {
  display: block;
  font-size: 0.75rem;
  color: var(--content-text-secondary, #6b7280);
  margin-bottom: 0.25rem;
}

.dashboard-budget-amount {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--content-text, #1f2937);
}

.dashboard-budget-categories {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dashboard-budget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
}

.dashboard-budget-cat {
  font-size: 0.875rem;
  color: var(--content-text, #374151);
}

.dashboard-budget-cat-amount {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--content-text, #1f2937);
}

/* === Cycle Widget === */
.cycle-status {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cycle-phase {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: color-mix(in srgb, var(--phase-color, #8b5cf6) 10%, transparent);
  border-left: 3px solid var(--phase-color, #8b5cf6);
  border-radius: 0 8px 8px 0;
}

.cycle-phase-emoji {
  font-size: 1.5rem;
}

.cycle-phase-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.cycle-phase-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--content-text, #1f2937);
}

.cycle-phase-day {
  font-size: 0.75rem;
  color: var(--content-text-secondary, #6b7280);
}

.cycle-description {
  font-size: 0.875rem;
  color: var(--content-text, #374151);
  line-height: 1.4;
}

.cycle-tips {
  font-size: 0.8125rem;
  color: var(--content-text-secondary, #6b7280);
  background: var(--hover-bg, #f9fafb);
  padding: 0.625rem 0.75rem;
  border-radius: 6px;
  line-height: 1.4;
}

.cycle-tips strong {
  color: var(--content-text, #374151);
}

.cycle-prediction {
  text-align: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color, #e5e7eb);
}

.cycle-active {
  font-weight: 500;
  color: #be185d;
}

.cycle-next {
  font-size: 0.875rem;
  color: var(--content-text-secondary, #6b7280);
}

.cycle-empty {
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
