/* Agenda do aluno / professor (views/agenda.js). Usa as variáveis de cor de app.css. */
.ag-next { display: flex; gap: 14px; align-items: center; border-left: 4px solid var(--brand); margin-bottom: 16px; }
.ag-next .ag-when { display: flex; flex-direction: column; align-items: center; min-width: 58px; line-height: 1.1; }
.ag-next .ag-when b { font-family: var(--font-display); font-size: 28px; }
.ag-next .ag-when span { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.ag-next .ag-in { color: var(--text-2); font-weight: 600; }
@media (max-width: 640px) { .ag-next { flex-wrap: wrap; } .ag-next .btn { width: 100%; } }

.ag-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.ag-bar .ag-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: 0 6px; }
.ag-bar .grow { flex: 1; }
.ag-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.ag-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Cores por tipo */
.ag-c-encontro { --ag: #2f6fed; --ag-bg: #e8f0fe; }
.ag-c-treino { --ag: #8a4bd6; --ag-bg: #f0e8fb; }
.ag-c-torneio { --ag: #c9820f; --ag-bg: #fdf3dd; }
.ag-c-tarefa { --ag: #1f9d55; --ag-bg: #e3f5ea; }
.ag-c-aovivo { --ag: #d64545; --ag-bg: #fbe7e7; }
:root[data-theme="dark"] .ag-c-encontro, :root[data-theme="dark"] .ag-c-treino, :root[data-theme="dark"] .ag-c-torneio, :root[data-theme="dark"] .ag-c-tarefa, :root[data-theme="dark"] .ag-c-aovivo { --ag-bg: color-mix(in srgb, var(--ag) 22%, var(--surface)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ag-c-encontro, :root:not([data-theme="light"]) .ag-c-treino, :root:not([data-theme="light"]) .ag-c-torneio, :root:not([data-theme="light"]) .ag-c-tarefa, :root:not([data-theme="light"]) .ag-c-aovivo { --ag-bg: color-mix(in srgb, var(--ag) 22%, var(--surface)); } }

/* Semana: 7 colunas no computador, lista no celular */
.ag-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ag-day { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 120px; display: flex; flex-direction: column; gap: 6px; }
.ag-day.is-today { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(255, 194, 26, .25); }
.ag-day.is-past { opacity: .75; }
.ag-day-h { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ag-day-h b { font-family: var(--font-display); font-size: 20px; color: var(--text); letter-spacing: 0; }
.ag-day.is-today .ag-day-h { color: var(--brand-2); }
.ag-empty { font-size: 12px; color: var(--muted); margin: auto 0; text-align: center; }
.ag-item { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--ag); background: var(--ag-bg); color: var(--text); border-radius: 8px; padding: 6px 8px; cursor: pointer; font: inherit; line-height: 1.3; }
.ag-item:hover { filter: brightness(.97); }
.ag-item .ag-t { font-size: 12px; font-weight: 700; color: var(--ag); }
.ag-item .ag-n { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ag-item .ag-s { font-size: 11px; color: var(--text-2); }
.ag-item.canceled { opacity: .55; }
.ag-item.canceled .ag-n { text-decoration: line-through; }
.ag-item.done .ag-n { text-decoration: line-through; opacity: .7; }
.ag-item.now { outline: 2px solid var(--ag); }
.ag-item .pill { font-size: 10px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
@media (max-width: 760px) {
  .ag-week { grid-template-columns: minmax(0, 1fr); }
  .ag-day { min-height: 0; }
  .ag-day.is-past:not(.is-today) { display: none; }
}

/* Mês */
.ag-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ag-month .ag-wd { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: center; padding: 4px 0; }
.ag-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-height: 84px; padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.ag-cell.other { opacity: .45; }
.ag-cell.is-today { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(255, 194, 26, .25); }
.ag-cell .ag-dn { font-size: 12px; font-weight: 800; color: var(--muted); }
.ag-cell.is-today .ag-dn { color: var(--brand-2); }
.ag-dot { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--ag); background: var(--ag-bg); color: var(--text); border-radius: 4px; padding: 1px 4px; font: inherit; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ag-dot.canceled { text-decoration: line-through; opacity: .55; }
.ag-more { font-size: 11px; color: var(--muted); }
@media (max-width: 640px) { .ag-cell { min-height: 56px; } .ag-dot { font-size: 10px; padding: 0 3px; } }

/* Detalhe (modal) */
.ag-detail .ag-badge { display: inline-block; background: var(--ag-bg); color: var(--ag); font-weight: 800; font-size: 12px; border-radius: 6px; padding: 2px 8px; margin-bottom: 8px; }
.ag-detail dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 10px 0 0; font-size: 14px; }
.ag-detail dt { color: var(--muted); font-weight: 600; }
.ag-detail dd { margin: 0; }

/* Pill "online" (usada também na tela de presença): classe própria porque `.brand` em app.css é a do logo e sobrescreve `.pill.brand`. */
.pill.ag-online { background: var(--brand); color: var(--brand-ink); }
.pill.ag-online .ico { width: 12px; height: 12px; }
