:root {
  --brand-900: #0f3d6d;
  --brand-800: #145a96;
  --brand-700: #1b74b5;
  --brand-200: #d7ebfa;
  --brand-100: #eef7ff;
  --ink-900: #0d2236;
  --ink-700: #365067;
  --ink-500: #6a8196;
  --line: rgba(15, 61, 109, 0.12);
  --surface: rgba(255, 255, 255, 0.9);
  --shadow: 0 20px 50px rgba(17, 66, 114, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Be Vietnam Pro", sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(circle at top left, rgba(27, 116, 181, 0.18), transparent 32%),
    linear-gradient(180deg, #f7fbff 0%, #edf6fd 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(15, 61, 109, 0.08);
  font-size: 0.95em;
}

.page-shell {
  min-height: 100vh;
  padding: 24px;
}

.site-header {
  max-width: 1680px;
  margin: 0 auto 24px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand__logo {
  display: inline-block;
  height: 56px;
  width: auto;
  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand__text strong {
  font-size: 1rem;
}

.brand__text small {
  color: var(--ink-500);
}

.site-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink-700);
  transition: 0.2s ease;
}

.site-nav a.is-active,
.site-nav a:hover {
  color: white;
  background: var(--brand-800);
}

.content {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
  align-items: stretch;
}

.hero__content,
.hero__panel,
.panel,
.info-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero__content {
  padding: 40px;
}

.hero__panel,
.info-card,
.panel {
  padding: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand-800);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1,
h2 {
  margin-top: 0;
}

.hero h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 1.12;
}

.hero__lead,
.page-intro p,
.panel p {
  color: var(--ink-700);
  line-height: 1.75;
}

.hero__actions {
  margin: 28px 0 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.btn--primary {
  color: white;
  background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
}

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--brand-900);
  background: white;
}

.status-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--brand-100);
  color: var(--brand-900);
}

.status-card[data-tone="warning"] {
  background: #fff5d6;
  color: #7b5b00;
}

.status-card[data-tone="danger"] {
  background: #ffe7e7;
  color: #962d2d;
}

.status-card[data-tone="success"] {
  background: #e7f8ee;
  color: #14633b;
}

.json-card {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(9, 28, 45, 0.96);
  color: #d9e8f4;
}

.json-card__header {
  margin-bottom: 14px;
}

.json-card__header h2 {
  margin-bottom: 8px;
  color: white;
}

.json-card__header p {
  margin: 0;
  color: rgba(217, 232, 244, 0.76);
}

.json-viewer {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.7;
}

.flow-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-700);
  line-height: 1.8;
}

.page-intro {
  margin-bottom: 20px;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.data-list {
  margin: 0;
  display: grid;
  gap: 16px;
}

.data-list div {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.data-list dt {
  margin-bottom: 6px;
  color: var(--ink-500);
  font-size: 0.95rem;
}

.data-list dd {
  margin: 0;
  font-weight: 600;
}

.student-profile {
  width: 100%;
  min-height: calc(100vh - 160px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.student-profile__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.student-profile__identity {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.student-profile__avatar {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border: 4px solid white;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-100);
  box-shadow: 0 14px 30px rgba(17, 66, 114, 0.16);
}

.student-profile__avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
  font-size: 2rem;
  font-weight: 800;
}

.student-profile__heading h1 {
  margin-bottom: 10px;
  font-size: 2rem;
  line-height: 1.2;
}

.student-profile__heading p {
  margin: 0;
  color: var(--ink-700);
}

.student-profile__edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 14px;
  padding: 0 14px;
  border-radius: 999px;
  color: white;
  background: var(--brand-800);
  font-weight: 700;
}

.student-profile__status {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  color: #14633b;
  background: #e7f8ee;
  font-weight: 700;
}

.student-profile__grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.student-profile__grid div {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.student-profile__grid dt {
  margin-bottom: 8px;
  color: var(--ink-500);
  font-size: 0.88rem;
}

.student-profile__grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
  line-height: 1.45;
}

.panel__heading {
  margin-bottom: 18px;
}

.table-wrap {
  overflow-x: auto;
}

.semester-list {
  display: grid;
  gap: 24px;
}

.semester-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.semester-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(15, 61, 109, 0.08), rgba(255, 255, 255, 0.68));
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.semester-section__heading::-webkit-details-marker {
  display: none;
}

.semester-section__heading::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: white;
  background: var(--brand-800);
  font-weight: 800;
}

.semester-section[open] .semester-section__heading::after {
  content: "-";
}

.semester-section__title {
  margin: 0;
  color: var(--brand-900);
  font-size: 1.12rem;
  font-weight: 800;
}

.semester-section__meta {
  margin: 0;
  color: var(--ink-700);
  font-weight: 700;
  margin-left: auto;
}

.curriculum-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px;
}

.curriculum-table th,
.curriculum-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.curriculum-table th {
  position: sticky;
  top: 0;
  color: var(--brand-900);
  background: #f5faff;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.curriculum-table td {
  background: rgba(255, 255, 255, 0.82);
}

.curriculum-table tbody tr:nth-child(even) td {
  background: rgba(238, 247, 255, 0.42);
}

.curriculum-table tbody tr:hover td {
  background: rgba(215, 235, 250, 0.52);
}

.curriculum-table th:first-child,
.curriculum-table td:first-child {
  width: 132px;
  font-weight: 800;
}

.curriculum-table th:nth-child(3),
.curriculum-table td:nth-child(3),
.curriculum-table th:nth-child(4),
.curriculum-table td:nth-child(4),
.curriculum-table th:nth-child(5),
.curriculum-table td:nth-child(5) {
  width: 90px;
  text-align: center;
}

.table-link {
  color: var(--brand-800);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.course-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: white;
  background: var(--brand-800);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.course-link-button--disabled {
  color: var(--ink-500);
  background: rgba(15, 61, 109, 0.08);
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  background: var(--brand-100);
  color: var(--ink-700);
}

.session-monitor {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: rgba(13, 34, 54, 0.92);
  color: white;
  box-shadow: var(--shadow);
}

.session-monitor[data-tone="warning"] {
  background: rgba(123, 91, 0, 0.94);
}

.session-monitor[data-tone="danger"] {
  background: rgba(150, 45, 45, 0.95);
}

.session-monitor[data-tone="success"] {
  background: rgba(20, 99, 59, 0.94);
}

.panel--error {
  max-width: 720px;
}

.panel--auth {
  max-width: 480px;
  margin: 60px auto;
  text-align: center;
  padding: 48px 32px;
}

.spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  border: 4px solid var(--line);
  border-top-color: var(--brand-700);
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-loading h1 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--brand-900);
}

.auth-loading .status-text {
  color: var(--ink-700);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .page-shell {
    padding: 16px;
  }

  .site-header,
  .hero,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding: 18px;
  }

  .hero__content,
  .hero__panel,
  .panel,
  .info-card,
  .json-card,
  .student-profile {
    padding: 22px;
  }

  .student-profile__heading {
    display: grid;
    gap: 14px;
  }

  .student-profile__identity {
    align-items: flex-start;
  }

  .student-profile__status {
    width: fit-content;
  }

  .semester-section__heading {
    display: grid;
    gap: 6px;
  }
}

@media (max-width: 560px) {
  .student-profile__grid {
    grid-template-columns: 1fr;
  }

  .student-profile__heading h1 {
    font-size: 1.55rem;
  }

  .student-profile__identity {
    display: grid;
  }

  .student-profile__avatar {
    width: 82px;
    height: 82px;
  }
}
