/* Fase 2 — Página Agenda. Mismo mundo visual. */

.ag {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(var(--s5) + env(safe-area-inset-top)) var(--s5) 140px;
}

.ag-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s5); }
.ag-header h1 { font-size: clamp(1.75rem, 8vw, 2.125rem); line-height: 1.06; letter-spacing: -0.028em; font-weight: 700; }
.ag-header__sub { color: var(--text-2); font-size: 0.875rem; margin-top: 2px; }

.ag-week {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s4);
}
.ag-week__label { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.ag-week__nav {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface-hi); color: var(--text-2);
  transition: transform var(--dur-fast) var(--spring-snap);
}
.ag-week__nav:active { transform: scale(0.92); }
.ag-week__nav svg { width: 18px; height: 18px; transform: rotate(180deg); }
.ag-week__nav--next svg { transform: none; }

.ag-days {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s2);
  margin-bottom: var(--s5);
}
.ag-day {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 66px; padding: var(--s2) 0;
  border-radius: var(--r-md);
  background: var(--surface-hi);
  border: 1px solid transparent;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) var(--spring-snap);
}
.ag-day:active { transform: scale(0.95); }
.ag-day.is-active { background: var(--brand-tint); border-color: var(--brand); }
.ag-day__name { font-size: 0.6875rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.ag-day.is-active .ag-day__name { color: var(--brand); }
.ag-day__num { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.03em; }
.ag-day__dot { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.ag-day:has(.ag-slot) .ag-day__dot { background: var(--brand); }

.ag-summary {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-2); font-size: 0.8125rem;
  margin-bottom: var(--s4);
}
.ag-summary strong { color: var(--text); font-size: 1rem; }
.ag-block {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 36px; padding: 0 var(--s3);
  border-radius: var(--r-pill); background: var(--surface-hi);
  border: 1px solid var(--hairline); color: var(--text);
  font-size: 0.75rem; font-weight: 600;
}
.ag-block svg { width: 15px; height: 15px; color: var(--brand); }
.ag-slot--pending { border-color: rgba(214, 160, 62, 0.45); }
.ag-slot__info em { color: var(--brand); font-style: normal; font-size: 0.75rem; }
.ag-pending { margin-top: var(--s6); }
.ag-pending__row {
  display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap;
  padding: var(--s3) var(--s4); border-bottom: 1px solid var(--hairline);
  border-radius: var(--r-sm); background: var(--surface); margin-bottom: var(--s2);
}
.ag-pending__row > span { flex: 1; min-width: 120px; font-size: 0.875rem; }
.ag-pending__row small { color: var(--text-2); font-size: 0.75rem; }
.ag-reject {
  min-height: 36px; padding: 0 var(--s3); border-radius: var(--r-pill);
  border: 1px solid rgba(214,92,86,0.4); color: #d67570; font-size: 0.75rem; font-weight: 600;
}
.ag-confirm {
  min-height: 36px; padding: 0 var(--s3); margin-left: var(--s2);
  border-radius: var(--r-pill); background: var(--brand); color: var(--on-brand);
  font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}

.ag-slots { display: flex; flex-direction: column; }
.ag-slot {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 64px; padding: var(--s3);
  border-bottom: 1px solid var(--hairline);
}
.ag-slot__time { font-size: 0.9375rem; font-weight: 650; width: 52px; flex: none; }
.ag-slot__info { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.ag-slot__info strong { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-slot__info > span:not(.avatar) { color: var(--text-3); font-size: 0.75rem; }
.ag-slot__chev { margin-left: auto; width: 14px; height: 14px; color: var(--text-3); }
.ag-slot__chev svg { width: 14px; height: 14px; }
.ag-slot--blocked .ag-slot__info strong { color: var(--text-3); }
.ag-empty { color: var(--text-3); font-size: 0.875rem; padding: var(--s5) 0; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .ag-day, .ag-week__nav { transition: none; }
}
