/* ── Goals ─────────────────────────────────────────────── */

#metas-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 20px;
}

.goals-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Empty state */
.goals-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 0;
}
.goals-empty-ico {
  font-size: 20px;
  flex-shrink: 0;
}

/* ── Sections ── */
.goals-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.goals-section-hdr {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.goals-section-icon {
  font-size: 13px;
  line-height: 1;
}
.goals-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.goals-section-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Goal card ── */
.goal-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color .15s;
}
.goal-card:hover {
  border-color: rgba(91,142,240,.35);
}
.goal-card--done {
  opacity: .6;
}
.goal-card--done:hover {
  opacity: .8;
  border-color: rgba(74,222,128,.3);
}

.goal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.goal-card-info { flex: 1; min-width: 0; }
.goal-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.goal-card-edit {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: color .15s, background .15s, opacity .15s;
}
.goal-card:hover .goal-card-edit {
  opacity: 1;
}
.goal-card-edit:hover {
  color: var(--blue);
  background: rgba(91,142,240,.12);
}

.goal-card-nums {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 10px;
}
.goal-card-progress {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.goal-card-sep {
  font-size: 14px;
  color: var(--text-muted);
}
.goal-card-target {
  font-size: 13px;
  color: var(--text-muted);
}
.goal-card-pct {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.goal-card-badge {
  font-size: 11px;
  background: rgba(74,222,128,.15);
  color: #4ade80;
  border-radius: 20px;
  padding: 2px 9px;
  font-weight: 600;
  white-space: nowrap;
}

/* Done today state */
.goal-card--done-today {
  border-color: rgba(74,222,128,.25);
}

/* Histórico diário */
.goal-hist {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.goal-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}
.goal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
  transition: background .2s;
}
.goal-dot--done {
  background: rgba(74,222,128,.7);
  border-color: rgba(74,222,128,.4);
}
.goal-dot--missed {
  background: rgba(248,113,113,.5);
  border-color: rgba(248,113,113,.3);
}
.goal-dot--today {
  border-color: rgba(255,255,255,.3);
}
.goal-dot--done.goal-dot--today {
  background: #4ade80;
  border-color: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,.5);
}
.goal-hist-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.goal-hist-streak {
  font-size: 11px;
  color: #fb923c;
  font-weight: 600;
}
.goal-hist-total {
  font-size: 11px;
  color: var(--text-muted);
}
.goal-cal-btn {
  background: none;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 8px;
  transition: border-color .15s, color .15s;
}
.goal-cal-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ── Goal calendar modal ── */
.gcal-year-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gcal-year-label {
  font-size: 12px;
  font-weight: 700;
  color: #5b8ef0;
  letter-spacing: .06em;
}
.gcal-year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 540px) {
  .gcal-year-grid { grid-template-columns: repeat(2, 1fr); }
}

.gcal-month {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gcal-month-name {
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1px;
}
.gcal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.gcal-dow {
  font-size: 7px;
  color: #4b5563;
  text-align: center;
  font-weight: 600;
  line-height: 1.6;
}
.gcal-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: rgba(255,255,255,.05);
  cursor: default;
}
.gcal-cell--empty {
  background: none;
}
/* Antes da criação da meta — borda sutil, apagado */
.gcal-cell--before {
  background: none;
  border: 1px solid rgba(255,255,255,.08);
  opacity: .35;
}
/* Dias futuros — borda azulada */
.gcal-cell--future {
  background: none;
  border: 1px solid rgba(91,142,240,.25);
}
.gcal-cell--done {
  background: rgba(74,222,128,.5);
}
.gcal-cell--missed {
  background: rgba(248,113,113,.35);
}
.gcal-cell--today {
  outline: 1px solid rgba(91,142,240,.8);
  outline-offset: -1px;
}

/* Progress bar */
.goal-bar-bg {
  height: 4px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
}
.goal-bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 99px;
  transition: width .5s ease;
  min-width: 3px;
}
.goal-bar-fill--done {
  background: #4ade80;
}
