/* ============================================================= */
/* Lekto V3 · View "Turmas" — integrada ao protótipo (index.html)  */
/* Base: Downloads/turmas 5.1 (lista), 5.2 (turma), 5.3 (aluno)     */
/* Cores só via var(--lkt-*) / color-mix ancorado em tokens.        */
/* ============================================================= */

.view--turmas { padding-bottom: 48px; }
.tm-pane { display: none; }
.tm-pane.is-active { display: block; }

/* Cabeçalho da seção: usa o padrão .view-head (styles.css) */

/* ---------- Lista de turmas ---------- */
.tm-list { display: grid; gap: 14px; }
.tm-row {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  background: #FFF; border: 1px solid var(--theme-panel-border); border-radius: var(--border-radius-sm-plus);
  padding: 22px 24px; cursor: pointer; box-shadow: var(--theme-card-shadow);
  transition: transform var(--motion-dur-fast) var(--motion-ease), border-color var(--motion-dur-fast) var(--motion-ease), box-shadow var(--motion-dur-fast) var(--motion-ease);
}
.tm-row:hover { transform: translateY(-2px); border-color: var(--color-accent-soft); box-shadow: var(--theme-panel-shadow); }
.tm-row__name { font-family: var(--theme-font-family-heading); font-weight: 700; letter-spacing: -.01em; font-size: 22px; color: var(--theme-text-heading); }
.tm-row__count { padding: 5px 12px; border-radius: var(--border-radius-pill); background: var(--color-accent-pure); color: #FFF; font-size: 12.5px; font-weight: 700; }
.tm-row__year { margin-left: auto; padding: 7px 14px; border-radius: var(--border-radius-pill); border: 1px solid var(--theme-panel-border); font-size: 13px; font-weight: 700; color: var(--theme-text-muted); }
.tm-row__chev { flex: 0 0 auto; width: 20px; height: 20px; color: var(--color-surface-soft); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Estado vazio ---------- */
.tm-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: clamp(48px, 9vw, 96px) 24px;
  background: var(--theme-surface); border: 1px solid var(--theme-panel-border); border-radius: var(--border-radius-md);
}
.tm-empty__ic { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px; color: var(--color-surface-soft); }
.tm-empty__ic svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tm-empty__title { font-family: var(--theme-font-family-heading); margin: 0; font-weight: 700; font-size: 16px; color: var(--theme-text-heading); }
.tm-empty__sub { margin: 0 0 14px; font-size: 14px; color: var(--color-surface-pure); }
.tm-empty__cta {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 18px;
  border-radius: var(--border-radius-sm); border: 1.5px solid var(--color-accent-pale); background: #FFF;
  color: var(--color-accent-dark); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: border-color var(--motion-dur-fast) var(--motion-ease), background var(--motion-dur-fast) var(--motion-ease);
}
.tm-empty__cta:hover { border-color: var(--color-accent-pure); background: var(--color-accent-tinted); }
.tm-empty__cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Banner de detalhe (turma / aluno) ---------- */
.tm-banner {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 22px 28px; margin-bottom: 26px; border-radius: var(--border-radius-lg);
  background: linear-gradient(115deg, var(--color-primary-darker), var(--color-surface-deep));
  color: #FFF;
}
.tm-back {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 8px 10px;
  border-radius: var(--border-radius-pill); border: 1.5px solid color-mix(in srgb, #FFF 40%, transparent);
  background: color-mix(in srgb, #FFF 8%, transparent); color: #FFF; font: inherit; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: background var(--motion-dur-fast) var(--motion-ease), transform var(--motion-dur-fast) var(--motion-ease);
}
.tm-back:hover { background: color-mix(in srgb, #FFF 16%, transparent); transform: translateX(-2px); }
.tm-back svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tm-banner__crumb { display: inline-flex; align-items: center; gap: 12px; }
.tm-banner__parent { font-family: var(--theme-font-family-heading); font-weight: 700; font-size: clamp(18px, 2.2vw, 24px); color: color-mix(in srgb, #FFF 62%, transparent); background: none; border: 0; cursor: pointer; padding: 0; }
.tm-banner__parent:hover { color: #FFF; text-decoration: underline; }
.tm-banner__arrow { width: 20px; height: 20px; color: color-mix(in srgb, #FFF 62%, transparent); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tm-banner__avatar { width: 40px; height: 40px; border-radius: var(--border-radius-circle); overflow: hidden; border: 2px solid color-mix(in srgb, #FFF 45%, transparent); display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.tm-banner__avatar img { width: 100%; height: 100%; object-fit: cover; }
.tm-banner__title { font-family: var(--theme-font-family-heading); font-weight: 800; letter-spacing: -.01em; font-size: clamp(22px, 2.6vw, 30px); }

/* ---------- Grid do detalhe ---------- */
.tm-detail { display: grid; grid-template-columns: 1fr 340px; gap: clamp(20px, 2.4vw, 28px); align-items: start; }
.tm-section { background: #FFF; border: 1px solid var(--theme-panel-border); border-radius: var(--theme-card-radius); padding: clamp(18px, 2vw, 24px); box-shadow: var(--theme-card-shadow); }
.tm-section__head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.tm-section__head svg { width: 22px; height: 22px; color: var(--color-primary-pure); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tm-section__title { margin: 0; font-family: var(--theme-font-family-heading); font-weight: 700; letter-spacing: -.01em; font-size: 20px; color: var(--theme-text-heading); }
.tm-aside { display: grid; gap: clamp(20px, 2.4vw, 28px); }

/* Histórico com cards de Atribuição: a seção vira cabeçalho + lista, sem
   chrome de cartão — o peso visual é do .atr-card, não do contêiner. */
.tm-section--atr { background: none; border: 0; box-shadow: none; padding: 0; }
.tm-atrlist { gap: 16px; }

/* ---------- Carrossel de conteúdos (histórico) ---------- */
.tm-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 18px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.tm-cards > .tm-card { scroll-snap-align: start; }

/* card de conteúdo com capa (mesmo design da home-legado) */
.tm-card { display: flex; flex-direction: column; background: #FFF; border: 1px solid var(--theme-panel-border); border-radius: var(--theme-card-radius); overflow: hidden; box-shadow: var(--theme-card-shadow); }
.tm-card__cover { position: relative; aspect-ratio: 16 / 10; background-size: cover; background-position: center; }
.tm-card__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, color-mix(in srgb, var(--color-primary-soft) 55%, transparent), color-mix(in srgb, var(--color-primary-deep) 82%, transparent)); mix-blend-mode: multiply; }
.tm-card__type { position: absolute; top: 12px; left: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--border-radius-nano); background: var(--theme-text-heading); color: #FFF; font-size: 12.5px; font-weight: 700; }
.tm-card__type svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tm-card__badge { position: absolute; bottom: 12px; left: 12px; z-index: 1; padding: 5px 12px; border-radius: var(--border-radius-pill); font-size: 12px; font-weight: 700; }
.tm-card__badge--andamento { background: var(--color-accent-tinted); color: var(--color-accent-darker); }
.tm-card__badge--count { background: var(--color-accent-pure); color: #FFF; }
.tm-card__body { display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 20px; flex: 1; }
.tm-card__title { margin: 0; font-family: var(--theme-font-family-heading); font-weight: 700; letter-spacing: -.01em; font-size: 17px; line-height: 1.25; color: var(--theme-text-heading); }
.tm-card__foot { margin-top: auto; display: grid; gap: 12px; }
.tm-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--border-radius-pill); background: var(--theme-surface-muted); color: var(--theme-text-muted); font-size: 12.5px; font-weight: 700; }
.tm-tag svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* cor por área — [PROPOSTA] pendente (faixa por área), ancorada em primary/secondary por ora */
.tm-tag--area { background: var(--color-primary-tinted); color: var(--color-primary-dark); }
.tm-tag--arte { background: var(--color-secondary-tinted); color: var(--color-secondary-darker); }
.tm-tag--more { background: var(--theme-surface-muted); color: var(--theme-text-muted); }
.tm-card__year { align-self: flex-start; padding: 6px 12px; border-radius: var(--border-radius-pill); border: 1px solid var(--theme-panel-border); background: #FFF; font-size: 12.5px; font-weight: 700; color: var(--theme-text-muted); }

/* ---------- Listas de pessoas (alunos / professores) ---------- */
.tm-people { display: grid; gap: 10px; }
.tm-person { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #FFF; border: 1px solid var(--theme-panel-border); border-radius: var(--border-radius-sm-14); padding: 10px 14px; }
.tm-person--link { cursor: pointer; transition: transform var(--motion-dur-fast) var(--motion-ease), border-color var(--motion-dur-fast) var(--motion-ease), box-shadow var(--motion-dur-fast) var(--motion-ease); }
.tm-person--link:hover { transform: translateY(-1px); border-color: var(--color-accent-soft); box-shadow: var(--theme-card-shadow); }
.tm-person--plain { border: 0; padding: 8px 4px; background: none; }
.tm-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: var(--border-radius-circle); overflow: hidden; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--theme-text-heading); background: var(--av-bg, var(--color-pastel-lavender)); }
.tm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tm-person__name { font-family: var(--theme-font-family-heading); font-weight: 700; font-size: 15px; color: var(--theme-text-heading); }
.tm-person__you { margin-left: 6px; padding: 2px 9px; border-radius: var(--border-radius-pill); border: 1.5px solid var(--color-accent-soft); color: var(--color-accent-dark); font-size: 11px; font-weight: 800; }
.tm-person__chev { margin-left: auto; width: 18px; height: 18px; color: var(--color-surface-soft); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .tm-detail { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .tm-cards { grid-auto-columns: 84%; }
  .tm-row { flex-wrap: wrap; }
  .tm-row__year { margin-left: 0; }
}
