/* ==========================================================
   LEARN TECH - PÁGINA DE NOTAS
   Usado em: notas.html
   ========================================================== */


html,
body {
  min-height: 100%;
}

body {
  background: linear-gradient(110deg, #1b1033 0%, #0a0d18 100%);
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-header {
  width: 100%;
  min-height: 76px;
  padding: 14px 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffffff;
  min-width: 160px;
}

.brand img {
  width: 48px;
  height: 43px;
  object-fit: contain;
}

.brand span {
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 46px;
  flex: 1;
}

.header-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .2px;
  text-transform: uppercase;
  transition: .2s;
}

.header-nav a:hover {
  color: #4f8df7;
  transform: scale(1.03);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 160px;
  justify-content: flex-end;
}

.header-icon-btn {
  width: 32px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header-icon-btn svg {
  width: 31px;
  height: 31px;
}

.header-icon-btn:hover {
  transform: scale(1.06);
}

.main-content {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 6px 30px 60px;
  flex: 1;
}

.page-title {
  text-align: center;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .8px;
  margin: 4px 0 36px;
  background: linear-gradient(90deg, #ffffff 30%, #3278e8 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.grades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 22px;
  align-items: start;
}

.subject-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 10px;
  background: rgba(12, 16, 30, .72);
  overflow: hidden;
  transition: border-color .2s, background-color .2s, transform .2s;
}

.subject-card:hover {
  border-color: rgba(56, 189, 248, .65);
  background-color: #171e2c;
}

.subject-summary {
  min-height: 154px;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.subject-summary::-webkit-details-marker {
  display: none;
}

.subject-summary-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.subject-eyebrow,
.subject-summary-score span {
  color: #8c9aaf;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .7px;
}

.subject-name {
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.subject-graded-count {
  color: #b7c1ce;
  font-size: 11px;
}

.subject-summary-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  white-space: nowrap;
}

.subject-summary-score strong {
  color: #7dd3fc;
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.subject-chevron {
  width: 9px;
  height: 9px;
  margin-right: 2px;
  border-right: 2px solid #9aa8ba;
  border-bottom: 2px solid #9aa8ba;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
}

.subject-card[open] .subject-chevron {
  transform: rotate(225deg) translate(-2px, -1px);
}

.subject-details {
  padding: 0 20px 17px;
}

.grade-list {
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.grade-row {
  min-height: 44px;
  padding: 11px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-size: 12px;
}

.grade-activity-name {
  color: #e2e8f0;
  overflow-wrap: anywhere;
}

.grade-score {
  color: #86efac;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.grade-score-pending {
  color: #aab4c2;
  font-weight: 600;
}

.subject-total {
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  color: #e2e8f0;
  font-size: 12px;
}

.subject-total strong {
  color: #7dd3fc;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.footer {
  width: 100%;
  margin-top: auto;
}

@media (max-width: 850px) {
  .main-header {
    padding: 12px 25px;
  }

  .header-nav {
    gap: 22px;
  }

  .header-nav a {
    font-size: 15px;
  }

  .grades-grid {
    gap: 18px;
  }
}

@media (max-width: 680px) {
  .main-header {
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand,
  .header-right {
    min-width: auto;
  }

  .header-nav {
    order: 3;
    width: 100%;
  }

  .grades-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }

  .main-content {
    padding-left: 20px;
    padding-right: 20px;
  }
}


/* ==========================================================
   INTEGRAÇÃO COM O BACK-END
   O card cresce conforme a quantidade de atividades da disciplina
   ========================================================== */

.subject-card {
  height: auto;
  min-height: 165px;
}

.grade-row {
  word-break: break-word;
}

/* Mensagens (lista vazia / professor) ocupam a linha toda */
.grades-grid > p {
  grid-column: 1 / -1;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}
