:root {
  color-scheme: light dark;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  background-color: #020617;
  color: #e2e8f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: radial-gradient(circle at top, rgba(14, 165, 233, 0.2), transparent 55%), #020617;
}

.layout {
  width: min(1200px, 100%);
  padding: 2rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 10px 35px rgba(2, 6, 23, 0.5);
}

h1,
h2,
h3 {
  margin: 0;
}

main {
  margin-top: 1.5rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.4);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#filtersForm {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

input,
select,
textarea,
button {
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.65rem 0.9rem;
  font-size: 1rem;
  background: rgba(15, 23, 42, 0.6);
  color: inherit;
}

button {
  cursor: pointer;
  background: linear-gradient(120deg, #0ea5e9, #22d3ee);
  color: #020617;
  border: none;
  font-weight: 700;
  text-transform: uppercase;
}

.list {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

#coursesList {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.list-item {
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 1rem;
  background: rgba(2, 6, 23, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-item.course h3 {
  font-size: 1.1rem;
}

.list-item .muted {
  font-size: 0.9rem;
  color: #94a3b8;
}

.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
  margin: 0;
}

.tags li {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: rgba(14, 165, 233, 0.2);
  font-size: 0.8rem;
}

.announcements .list-item {
  border-left: 4px solid #22d3ee;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #38bdf8;
  margin-bottom: 0.35rem;
  display: inline-block;
}

.subtitle {
  color: #94a3b8;
  margin-top: 0.5rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

#courseStatus {
  min-height: 1.2rem;
  font-size: 0.9rem;
}

#courseStatus.ok {
  color: #4ade80;
}

#courseStatus.error {
  color: #f87171;
}

#installBtn[hidden] {
  display: none;
}

.course-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.badge {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
  background: #38bdf8;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  align-self: flex-start;
}

.meta {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.meta .icon {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.5rem;
  padding: 0.35rem 0.6rem;
  line-height: 1.2;
}

.meta .schedule::before {
  content: '🗓 ';
}

.meta .campus::before {
  content: '📍 ';
}

.meta .modality::before {
  content: '🎯 ';
}

.announcement-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.badge.level {
  background: rgba(236, 72, 153, 0.9);
  color: #fff;
}

@media (min-width: 900px) {
  .section-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }

  #createCourseSection {
    grid-column: 1 / -1;
  }
}
