/* Portal de Notas - Custom Styles */

.notas-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: 80vh;
}

/* SEARCH AREA */
.search-card {
  background: var(--mode-surface);
  border: 1px solid var(--mode-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  animation: fadeUp 0.6s ease both;
}

.search-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--cyan));
}

.search-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-desc {
  font-size: 0.9rem;
  color: var(--mode-txt2);
  margin-bottom: 1.5rem;
}

.search-box {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 0.75rem;
}

@media (max-width: 520px) {
  .search-box {
    flex-direction: column;
  }
}

.search-input-field {
  flex: 1;
  background: var(--mode-bg2);
  border: 2px solid var(--mode-border);
  color: var(--mode-txt);
  padding: 0.8rem 1.2rem;
  border-radius: var(--rad-sm);
  font-size: 1.1rem;
  outline: none;
  transition: all 0.25s ease;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.search-input-field:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(79, 142, 247, 0.2);
}

.btn-search {
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--rad-sm);
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.45);
}

/* ERROR CONTAINER */
.error-box {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--red);
  padding: 1rem;
  border-radius: var(--rad-sm);
  font-size: 0.9rem;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.error-box.visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESULT CONTAINER */
.result-card {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--mode-surface);
  border: 1px solid var(--mode-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.result-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* STUDENT INFO HEADER */
.student-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--mode-border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.student-identity h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--mode-txt);
  letter-spacing: -0.02em;
}

.student-identity p {
  color: var(--mode-txt2);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.student-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.class-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  color: white;
  text-transform: uppercase;
}

.class-badge.t1 {
  background: var(--blue);
}

.class-badge.t2 {
  background: var(--purple);
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  color: white;
  text-transform: uppercase;
}

.status-badge.approved {
  background: rgba(52, 211, 153, 0.2);
  border: 1px solid var(--green);
  color: var(--green);
}

.status-badge.exam {
  background: rgba(252, 211, 77, 0.2);
  border: 1px solid var(--yellow);
  color: var(--yellow);
}

.status-badge.reproved {
  background: rgba(248, 113, 113, 0.2);
  border: 1px solid var(--red);
  color: var(--red);
}

/* TABLES GRID */
.tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 820px) {
  .tables-grid {
    grid-template-columns: 1fr;
  }
}

.table-wrapper {
  background: var(--mode-bg2);
  border: 1px solid var(--mode-border);
  border-radius: var(--rad-sm);
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.table-wrapper h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--mode-txt);
  border-left: 4px solid var(--blue);
  padding-left: 0.6rem;
}

.table-wrapper.uri h3 {
  border-left-color: var(--purple);
}

.grades-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.grades-table th, .grades-table td {
  padding: 0.8rem 0.6rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--mode-border);
}

.grades-table th {
  color: var(--mode-txt2);
  font-weight: 600;
}

.grades-table td {
  color: var(--mode-txt);
  font-weight: 500;
}

.grades-table tr.highlight-row {
  background: rgba(79, 142, 247, 0.05);
}

.grades-table tr.total-row {
  background: rgba(255, 255, 255, 0.02);
  font-weight: 700;
}

.grades-table tr.total-row td {
  font-weight: 800;
  border-bottom: none;
}

.grade-val {
  font-family: 'Fira Code', monospace;
  font-weight: 700;
}

.grade-val.approved {
  color: var(--green);
}

.grade-val.exam {
  color: var(--yellow);
}

.grade-val.reproved {
  color: var(--red);
}

/* CALCULATION EVALUATION SECTION */
.calc-explanation {
  background: var(--mode-bg2);
  border: 1px solid var(--mode-border);
  border-radius: var(--rad-sm);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.calc-explanation h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--mode-txt);
}

.formula-display {
  display: block;
  text-align: center;
  background: rgba(0, 0, 0, 0.15);
  padding: 1rem;
  border-radius: var(--rad-sm);
  font-family: 'Fira Code', monospace;
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  color: var(--cyan);
  border: 1px dashed var(--mode-border);
  margin-bottom: 1.5rem;
}

.calc-steps {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.calc-step {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--mode-border);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.calc-step:last-child {
  border-bottom: none;
  font-size: 1.05rem;
}

/* PORTAL MAPPING COMPARISON FOOTER */
.portal-matching-alert {
  background: rgba(52, 211, 153, 0.05);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: var(--rad-sm);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.matching-icon {
  font-size: 1.5rem;
  color: var(--green);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.matching-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 0.35rem;
}

.matching-text p {
  font-size: 0.85rem;
  color: var(--mode-txt2);
  line-height: 1.5;
}

/* EXAM SCHEDULING BANNER */
.exam-banner {
  background: radial-gradient(ellipse at top left, rgba(168, 85, 247, 0.15) 0%, transparent 70%), var(--mode-surface);
  border: 1px solid var(--mode-border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  animation: fadeUp 0.7s ease both 0.1s;
  position: relative;
  overflow: hidden;
}

.exam-banner::after {
  content: '✦';
  position: absolute;
  right: 1.5rem;
  top: 1rem;
  font-size: 1.5rem;
  color: var(--purple);
  opacity: 0.3;
}

.exam-icon {
  font-size: 2.2rem;
  background: rgba(168, 85, 247, 0.12);
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(168, 85, 247, 0.4);
  color: var(--purple);
  flex-shrink: 0;
}

.exam-info h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: var(--mode-txt);
}

.exam-info p {
  font-size: 0.9rem;
  color: var(--mode-txt2);
  line-height: 1.6;
}

.exam-highlight {
  color: var(--purple);
  font-weight: 700;
}

@media (max-width: 600px) {
  .exam-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
}

/* FEEDBACK ALERT BOX */
.feedback-alert-box {
  padding: 1.1rem 1.35rem;
  border-radius: var(--rad-sm);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  animation: slideIn 0.35s ease-out;
  border-left: 5px solid transparent;
}

.feedback-alert-box.approved {
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-left: 5px solid var(--green);
  color: var(--green);
}

.feedback-alert-box.exam {
  background: rgba(252, 211, 77, 0.08);
  border: 1px solid rgba(252, 211, 77, 0.2);
  border-left: 5px solid var(--yellow);
  color: var(--yellow);
}

.feedback-alert-box.reproved {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-left: 5px solid var(--red);
  color: var(--red);
}

/* LIGHT MODE ACCESSIBILITY CONTRAST OVERRIDES */
body.light .feedback-alert-box.approved {
  background: rgba(21, 128, 61, 0.06);
  border: 1px solid rgba(21, 128, 61, 0.18);
  border-left: 5px solid #15803d;
  color: #15803d;
}

body.light .feedback-alert-box.exam {
  background: rgba(180, 83, 9, 0.06);
  border: 1px solid rgba(180, 83, 9, 0.18);
  border-left: 5px solid #b45309;
  color: #b45309;
}

body.light .feedback-alert-box.reproved {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-left: 5px solid #dc2626;
  color: #dc2626;
}

body.light .grade-val.approved {
  color: #15803d;
}

body.light .grade-val.exam {
  color: #b45309;
}

body.light .grade-val.reproved {
  color: #dc2626;
}

body.light .status-badge.approved {
  background: rgba(21, 128, 61, 0.12);
  border: 1px solid #15803d;
  color: #15803d;
}

body.light .status-badge.exam {
  background: rgba(180, 83, 9, 0.12);
  border: 1px solid #b45309;
  color: #b45309;
}

body.light .status-badge.reproved {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid #dc2626;
  color: #dc2626;
}
