/* ====================================================
   AvaliaEAD - Design System
   ==================================================== */

/* -- Reset & Base -- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 12% -10%, rgba(68, 191, 182, 0.2), transparent 42%),
    radial-gradient(circle at 88% -15%, rgba(239, 80, 80, 0.14), transparent 40%),
    linear-gradient(180deg, #f4f7fb 0%, #edf2f7 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* -- CSS Variables -- */
:root {
  --bg-base: #edf2f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f7fafc;
  --bg-sidebar: #ffffff;
  --border: rgba(42, 60, 78, 0.15);
  --border-hover: rgba(68, 191, 182, 0.5);

  --accent: #ef5050;
  --accent-light: #44bfb6;
  --accent-glow: rgba(239, 80, 80, 0.16);
  --gold: #fbb315;
  --gold-light: #ffd063;

  --text-primary: #2a3c4e;
  --text-secondary: #4f6278;
  --text-muted: #75879b;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow: 0 10px 30px rgba(42, 60, 78, 0.09);
  --shadow-lg: 0 20px 55px rgba(42, 60, 78, 0.16);
  --shadow-glow: 0 14px 34px rgba(68, 191, 182, 0.22);

  --container: 1280px;
  --transition: 0.25s ease;
}

/* -- Container -- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* -- Typography -- */
.text-gradient {
  background: linear-gradient(135deg, #fbb315, #44bfb6, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* -- HEADER -- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(42, 60, 78, 0.93);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 26px rgba(42, 60, 78, 0.24);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.logo-accent {
  color: var(--gold);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

/* -- BUTTONS -- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #fbb315, #ffcc5c);
  color: #2a3c4e;
  box-shadow: 0 10px 18px rgba(251, 179, 21, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(251, 179, 21, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: rgba(68, 191, 182, 0.45);
  background: #ffffff;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius);
  width: 100%;
  justify-content: center;
}

.btn-icon {
  font-size: 1.2rem;
}

/* -- HERO -- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5.6rem 0 4.4rem;
  background: linear-gradient(116deg, #2a3c4e 0%, #313e50 45%, #ef5050 155%);
  border-bottom: 1px solid rgba(42, 60, 78, 0.16);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 14% 12%, rgba(68, 191, 182, 0.28), transparent 60%),
    radial-gradient(ellipse 56% 42% at 82% 18%, rgba(251, 179, 21, 0.22), transparent 65%);
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(42, 60, 78, 0.08) 0%, rgba(42, 60, 78, 0.35) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 90px);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: left;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 100px;
  padding: 0.45rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -1.5px;
  max-width: 760px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 620px;
  margin: 0 0 2.2rem;
}

/* -- Hero Search -- */
.hero-search {
  display: flex;
  gap: 0.75rem;
  max-width: 710px;
  margin: 0 0 2.7rem;
  background: #fff;
  border: 1px solid rgba(42, 60, 78, 0.14);
  border-radius: var(--radius);
  padding: 0.4rem 0.4rem 0.4rem 1.25rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow);
}

.hero-search-autocomplete {
  flex: 1;
  min-width: 0;
}

.hero-search-autocomplete .search-input {
  height: 100%;
}

.hero-search-autocomplete .autocomplete-dropdown {
  top: calc(100% + 10px);
  background: #ffffff;
  border-color: rgba(68, 191, 182, 0.4);
}

.hero-search-autocomplete .ac-item-sub {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-search:focus-within {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #2a3c4e;
  font-size: 1rem;
  font-family: inherit;
  min-width: 0;
}

.search-input::placeholder {
  color: #8e9cab;
}

.search-btn {
  background: linear-gradient(135deg, #fbb315, #ffcc5c);
  color: #2a3c4e;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all var(--transition);
  box-shadow: 0 8px 20px rgba(251, 179, 21, 0.3);
}

.search-btn:hover {
  transform: translateY(-1px);
}

/* -- Hero Stats -- */
.hero-stats {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-item {
  background: #fff;
  border: 1px solid rgba(42, 60, 78, 0.12);
  border-radius: var(--radius);
  padding: 1.25rem 2rem;
  text-align: center;
  min-width: 130px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
}

.stat-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: #2a3c4e;
}

.stat-label {
  font-size: 0.78rem;
  color: #70849a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* -- SECTION -- */
.section {
  padding: 3.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 0.35rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.methodology-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.methodology-link:hover {
  text-decoration: underline;
}

/* -- RANKING SECTION -- */
.ranking-section {
  background: linear-gradient(180deg, rgba(68, 191, 182, 0.08), transparent 70%);
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

/* -- COURSES LAYOUT -- */
.courses-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

/* -- Sidebar -- */
.filters-sidebar {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
  box-shadow: var(--shadow);
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.filters-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.btn-clear {
  background: none;
  border: none;
  color: var(--accent-light);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: opacity var(--transition);
}

.btn-clear:hover {
  opacity: 0.7;
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.filter-select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}

.filter-select:focus {
  border-color: var(--border-hover);
}

/* -- Toolbar -- */
.courses-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.results-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* -- Courses Grid -- */
.courses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

/* -- Course Card -- */
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.course-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.course-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.course-card:hover::before {
  opacity: 1;
}

.course-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.course-rank {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 2rem;
  text-align: center;
}

.course-rank.rank-1 {
  color: #fbb315;
}

.course-rank.rank-2 {
  color: #94a3b8;
}

.course-rank.rank-3 {
  color: #cd7c2f;
}

.course-info {
  flex: 1;
  min-width: 0;
}

.course-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.course-ies {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.badge-grau {
  border-color: rgba(68, 191, 182, 0.4);
  color: var(--accent-light);
  background: rgba(68, 191, 182, 0.12);
}

.badge-area {
  border-color: rgba(251, 179, 21, 0.4);
  color: #c07600;
  background: rgba(251, 179, 21, 0.12);
}

.badge-uf {
  border-color: rgba(255, 255, 255, 0.1);
}

.course-rating {
  text-align: right;
  min-width: 80px;
}

.rating-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.rating-num.no-rating {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.rating-stars {
  font-size: 0.7rem;
  color: var(--gold);
  line-height: 1.4;
}

.rating-count {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.rating-confidence {
  margin-top: 0.2rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rating-confidence-high {
  color: #2f8a65;
}

.rating-confidence-medium {
  color: #a16a08;
}

.rating-confidence-low {
  color: #8d5a06;
}

/* -- Loading -- */
.loading-state {
  text-align: center;
  padding: 4rem;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* -- Pagination -- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

.page-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* -- EMPTY STATE -- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.ranking-empty-state {
  grid-column: 1 / -1;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ranking-empty-state .btn {
  margin-top: 0.8rem;
}

/* -- FORM PAGE -- */
.form-hero {
  background: linear-gradient(120deg, #2a3c4e 0%, #313e50 56%, #ef5050 170%);
  border-bottom: 1px solid rgba(42, 60, 78, 0.16);
  padding: 3.1rem 0 2.3rem;
  text-align: center;
}

.form-hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.form-hero-sub {
  color: rgba(255, 255, 255, 0.86);
  margin-top: 0.5rem;
}

.form-container {
  max-width: 780px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.form-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-input {
  background: #fbfdff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(68, 191, 182, 0.16);
}

.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-input.error {
  border-color: #f87171;
}

select.form-input {
  cursor: pointer;
  /* fundo sólido para o dropdown nativo do browser funcionar no dark mode */
  background-color: #fbfdff;
  color: var(--text-primary);
}

select.form-input option {
  background-color: #ffffff;
  color: var(--text-primary);
}

select.form-input option:disabled,
select.form-input option[value=""] {
  color: #8d9bab;
}


.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* -- Autocomplete -- */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-card);
  border: 1px solid rgba(68, 191, 182, 0.5);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 240px;
  overflow-y: auto;
  display: none;
}

.autocomplete-dropdown.open {
  display: block;
}

.ac-item {
  padding: 0.7rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  transition: background var(--transition);
}

.ac-item:last-child {
  border-bottom: none;
}

.ac-item:hover,
.ac-item.highlighted {
  background: rgba(68, 191, 182, 0.13);
}

.ac-item-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* -- Criteria Stars -- */
.criteria-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.criterion-item {
  background: #f7fafd;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.criterion-info {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.criterion-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.criterion-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.criterion-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.stars-wrap {
  display: flex;
  gap: 0.25rem;
}

.star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  color: #c7d0da;
  line-height: 1;
  transition: color 0.15s, transform 0.12s;
}

.star:hover,
.star.active {
  color: var(--gold);
}

.star:hover {
  transform: scale(1.15);
}

/* -- Nota Preview -- */
.nota-preview {
  background: linear-gradient(135deg, rgba(68, 191, 182, 0.12), rgba(251, 179, 21, 0.12));
  border: 1px solid rgba(68, 191, 182, 0.28);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-top: 0.5rem;
}

.nota-preview-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.nota-preview-val {
  font-size: 3rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}

.nota-preview-stars {
  font-size: 1.5rem;
  color: var(--gold);
  margin-top: 0.25rem;
}

/* -- Form Actions -- */
.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.form-error {
  background: rgba(239, 80, 80, 0.12);
  border: 1px solid rgba(239, 80, 80, 0.35);
  color: #9a2532;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  width: 100%;
  text-align: center;
}

/* -- Success State -- */
.success-state {
  text-align: center;
  padding: 4rem 2rem;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 0.6s ease;
}

@keyframes bounce {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

.success-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.success-text {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* -- CURSO PAGE -- */
.curso-hero {
  background: linear-gradient(120deg, #2a3c4e 0%, #313e50 58%, #ef5050 185%);
  border-bottom: 1px solid rgba(42, 60, 78, 0.16);
  padding: 2.5rem 0;
}

.curso-hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.curso-header-info {
  flex: 1;
  min-width: 280px;
}

.curso-breadcrumb {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 1rem;
}

.curso-breadcrumb a {
  color: #ffcc5c;
  text-decoration: none;
}

.curso-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.curso-ies-name {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 1rem;
}

.curso-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.curso-rating-box {
  background: #fff;
  border: 1px solid rgba(42, 60, 78, 0.14);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  text-align: center;
  min-width: 180px;
  box-shadow: var(--shadow);
}

.curso-nota-big {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}

.curso-stars-big {
  font-size: 1.2rem;
  color: var(--gold);
  margin: 0.25rem 0;
}

.curso-avs-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.curso-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.detail-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.criteria-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.crit-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.crit-bar-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-width: 120px;
}

.crit-bar-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.crit-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 100px;
  transition: width 0.8s ease;
}

.crit-bar-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 28px;
  text-align: right;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.review-card {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.review-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.review-report-btn {
  border-color: rgba(239, 80, 80, 0.4);
  color: #b53144;
  background: rgba(239, 80, 80, 0.1);
}

.review-report-btn:hover {
  border-color: rgba(239, 80, 80, 0.6);
  background: rgba(239, 80, 80, 0.16);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.metric-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  background: #fbfdff;
  box-shadow: var(--shadow);
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.metric-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-quick-actions {
  display: grid;
  gap: 0.55rem;
}

.admin-quick-actions .btn {
  justify-content: center;
}

.report-filter-btn.active {
  border-color: rgba(68, 191, 182, 0.5);
  color: #0d6b63;
  background: rgba(68, 191, 182, 0.14);
}

.report-controls {
  display: grid;
  grid-template-columns: auto minmax(180px, 260px) auto;
  gap: 0.6rem;
  align-items: center;
  margin: 0 0 0.85rem;
}

.report-control-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.report-select {
  min-height: 2.2rem;
  font-size: 0.84rem;
  padding: 0.5rem 0.7rem;
}

.report-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.report-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfdff;
  padding: 0.9rem 1rem;
}

.report-card-focus {
  border-color: rgba(68, 191, 182, 0.55);
  box-shadow: 0 8px 24px rgba(68, 191, 182, 0.2);
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.report-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.report-status {
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
}

.report-status-open {
  color: #a35f03;
  border-color: rgba(251, 179, 21, 0.45);
  background: rgba(251, 179, 21, 0.13);
}

.report-status-resolved {
  color: #1f7f56;
  border-color: rgba(68, 191, 182, 0.45);
  background: rgba(68, 191, 182, 0.13);
}

.report-status-dismissed {
  color: #6a7784;
  border-color: rgba(128, 149, 168, 0.45);
  background: rgba(128, 149, 168, 0.12);
}

.report-meta {
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.report-details {
  margin-top: 0.55rem;
  color: var(--text-secondary);
  font-size: 0.83rem;
  line-height: 1.45;
}

.report-note-view {
  margin-top: 0.55rem;
  color: var(--text-secondary);
  font-size: 0.79rem;
  line-height: 1.45;
  border-left: 3px solid rgba(68, 191, 182, 0.45);
  padding-left: 0.55rem;
}

.report-links {
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.73rem;
  color: var(--text-muted);
}

.report-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.report-note-box {
  margin-top: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.report-note-label {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-muted);
}

.report-note-input {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 0.5rem 0.6rem;
}

.report-note-input:focus {
  border-color: rgba(68, 191, 182, 0.55);
  outline: none;
  box-shadow: 0 0 0 3px rgba(68, 191, 182, 0.16);
}

.review-ticket {
  margin-top: 0.6rem;
  font-size: 0.76rem;
  color: #0d6b63;
  background: rgba(68, 191, 182, 0.12);
  border: 1px solid rgba(68, 191, 182, 0.32);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
}

.review-ticket .methodology-link {
  margin-left: 0.45rem;
}

.dashboard-toast {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(42, 60, 78, 0.97);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 0.65rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 9999;
  transition: opacity 0.25s ease;
}

.dashboard-toast.hide {
  opacity: 0;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.review-author {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.review-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.review-stars {
  color: var(--gold);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.review-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* -- FOOTER -- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #2a3c4e;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-minimal {
  border-top: none;
  padding: 0.75rem 0;
  margin-top: 0;
}

.footer-minimal .footer-stellaris {
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

/* -- RESPONSIVE -- */
@media (max-width: 900px) {
  .courses-layout {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .filters-sidebar {
    position: static;
  }

  .criteria-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-content {
    text-align: center;
  }

  .hero-stats {
    gap: 0.5rem;
    justify-content: center;
  }

  .stat-item {
    min-width: 100px;
    padding: 1rem 1.25rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-search {
    flex-direction: column;
    margin-left: auto;
    margin-right: auto;
  }

  .report-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .curso-hero-inner {
    flex-direction: column;
  }
}

/* -- Scrollbar -- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: #9ab0c3;
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* -- STELLARIS BRANDING -- */
.stellaris-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all var(--transition);
}

.stellaris-badge:hover {
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.stellaris-dot {
  color: #ffcc5c;
  font-size: 0.8rem;
  line-height: 1;
}

/* Footer Stellaris stripe */
.footer-stellaris {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
}

.footer-divider {
  color: rgba(255, 255, 255, 0.45);
}

.footer-inner+.footer-stellaris {
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.stellaris-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #ffcc5c;
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.stellaris-link:hover {
  color: #fff;
}

/* -- IES Auto Box (após seleção do curso na cascata) -- */
.ies-auto-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(68, 191, 182, 0.12);
  border: 1px solid rgba(68, 191, 182, 0.32);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  animation: fadeIn 0.3s ease;
}

.ies-auto-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.ies-auto-nome {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ies-auto-sigla {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Select desabilitado da cascata - indicador visual */
select.form-input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Select habilitado - destaca com borda colorida */
select.form-input:not(:disabled) {
  border-color: rgba(68, 191, 182, 0.45);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -- Consentimento LGPD -- */
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  cursor: pointer;
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7fafd;
  transition: border-color var(--transition), background var(--transition);
}

.consent-label:hover {
  border-color: rgba(68, 191, 182, .45);
  background: rgba(68, 191, 182, .08);
}

.consent-checkbox {
  flex-shrink: 0;
  margin-top: .2rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent-light);
  cursor: pointer;
}

.consent-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-link:hover {
  color: var(--accent-light);
}

/* -- Active Filter Chips -- */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .75rem;
}

.active-filters:empty {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  background: rgba(239, 80, 80, .13);
  border: 1px solid rgba(239, 80, 80, .32);
  border-radius: 20px;
  font-size: .8rem;
  color: #b53144;
  font-weight: 500;
  animation: chipIn .25s ease;
}

@keyframes chipIn {
  from {
    opacity: 0;
    transform: scale(.85);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.chip-x {
  background: none;
  border: none;
  color: #b53144;
  cursor: pointer;
  font-size: .85rem;
  padding: 0 .15rem;
  opacity: .7;
  transition: opacity .15s;
  line-height: 1;
}

.chip-x:hover {
  opacity: 1;
}
