* {
  box-sizing: border-box;
}

:root {
  --bg: #3d7bf5;
  --card: #fefefe;
  --box-gradient: linear-gradient(170deg, #ffffff 0%, #e9f1fb 45%, #d2e2f3 100%);
  --box-gradient-hover: linear-gradient(170deg, #ffffff 0%, #e3eefb 45%, #c7dbf2 100%);
  --text: #153022;
  --muted: #61726a;
  --yellow: #ffd95a;
  --blue: #58a6ff;
  --blue-bright: #60a5fa;
  --accent-soft: #e8f0ff;
  --accent-soft-border: #bfdbfe;
  --accent-on-soft: #1d4ed8;
  --surface-tint: #f5f8ff;
  --surface-tint-border: #d8e4f8;
  --btn-primary: #3d7bf5;
  --btn-primary-hover: #2563eb;
}

body {
  margin: 0;
  font-family: "Inter", "Avenir Next", "Segoe UI", Arial, sans-serif;
  background: transparent;
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Fixed viewport background: layered mix on all pages except welcome (see .page-landing). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 70% at 50% -5%, rgba(96, 165, 250, 0.38) 0%, transparent 55%),
    linear-gradient(195deg, transparent 0%, transparent 45%, rgba(37, 99, 235, 0.2) 100%),
    linear-gradient(
      90deg,
      var(--bg) 0%,
      #467eec 12.5%,
      #5594f3 25%,
      #67a6f5 37.5%,
      #78b6f7 50%,
      #84c4f9 62.5%,
      #8dcefc 75%,
      #7ec2f4 100%
    );
}

/* Welcome page only: original vertical gradient (top --bg → bottom #8dcefc). */
body.page-landing::before {
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    var(--bg) 12%,
    #5fa0f4 38%,
    #8cc0f7 68%,
    #8dcefc 100%
  );
}

.auth-shell {
  padding: 26px;
}

a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.page-landing {
  padding-bottom: 48px;
}

.site-header {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 24px 0 0;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 70%, transparent 100%);
  padding-bottom: 12px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 14px 22px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.site-logo:hover .site-logo-img {
  opacity: 0.92;
}

.site-logo:hover .site-logo-text {
  color: #174483;
}

.site-logo-img {
  height: clamp(48px, 5vw, 56px);
  width: auto;
  max-width: min(210px, 48vw);
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.site-logo-text {
  font-weight: 900;
  font-size: clamp(1.3rem, 2.9vw, 1.8rem);
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav-links a {
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.site-nav-links a:hover {
  color: var(--text);
}

.site-nav-links .site-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid rgba(61, 123, 245, 0.25);
  color: #174483;
  font-weight: 800;
}

.site-nav-links .site-login-link:hover {
  color: #0f172a;
  background: #dcecff;
}

.btn-nav {
  margin-top: 0;
  padding: 10px 18px;
}

.landing-main {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.landing-inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.landing-section {
  margin: 0;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 32px;
  align-items: center;
  padding: 20px 24px;
}

.landing-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(16px, 3vw, 28px);
  margin-left: clamp(16px, 4.5vw, 48px);
  min-width: 0;
}

.landing-hero-headline {
  margin: 0;
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: left;
  max-width: min(32ch, 100%);
}

.landing-hero-img {
  display: block;
  width: auto;
  max-width: min(560px, 46vw);
  max-height: min(340px, 50vw);
  height: auto;
  object-fit: contain;
  object-position: right center;
  border-radius: 28px;
  justify-self: end;
  box-shadow: none;
  filter: none;
}

@media (max-width: 720px) {
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .landing-hero-headline {
    max-width: none;
  }

  .landing-hero-img {
    max-width: 100%;
    justify-self: end;
  }
}

@media (max-width: 560px) {
  .landing-hero-img {
    max-height: none;
  }

  .btn-hero {
    padding: 12px 24px;
    font-size: 1rem;
    width: 100%;
    max-width: 20rem;
  }
}

.landing-section-title {
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 800;
}

.landing-section-intro {
  margin: 0 0 22px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  max-width: 60ch;
  line-height: 1.5;
}

.landing-services-grid {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 80px;
}

.landing-service {
  width: 285px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.landing-service .folder {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.landing-service .folder-body {
  flex: 1;
}

.folder {
  display: flex;
  flex-direction: column;
  filter: drop-shadow(0 8px 24px rgba(52, 120, 220, 0.22));
}

.folder-tab {
  width: 45%;
  height: 14px;
  background: rgba(100, 160, 255, 0.75);
  border-radius: 12px 20px 0 0;
  backdrop-filter: blur(12px) saturate(1.6) brightness(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.6) brightness(1.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: none;
}

.folder-body {
  background: linear-gradient(
    135deg,
    rgba(120, 175, 255, 0.78) 0%,
    rgba(100, 155, 255, 0.72) 50%,
    rgba(85, 140, 250, 0.78) 100%
  );
  backdrop-filter: blur(16px) saturate(1.8) brightness(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.8) brightness(1.2);
  border-radius: 0 18px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-top: none;
  padding: 22px 20px 24px;
  min-height: 155px;
  position: relative;
  overflow: hidden;
}

.folder-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.15) 40%,
    transparent 70%
  );
  border-radius: inherit;
  pointer-events: none;
}

.folder-body::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
  pointer-events: none;
}

.folder-body .landing-service-title {
  color: #fff;
  margin-top: 0;
  font-size: 1.2rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.folder-body .landing-service-text {
  color: rgba(255,255,255,0.88);
  font-size: 15px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.landing-service-title {
  margin: 14px 0 6px;
  font-size: 1rem;
  font-weight: 800;
}

.landing-service-text {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}

.landing-service-img {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid #d4dbe8;
  object-fit: cover;
  /* Slightly below top edge so framing isn’t too tight on the upper crop. */
  object-position: center 18%;
  background: #e8ecf4;
}

.placeholder-media {
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: 16px;
  background: #e8ecf4;
  border: 1px solid #d4dbe8;
  position: relative;
  overflow: hidden;
}

.placeholder-media::before,
.placeholder-media::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70%;
  height: 2px;
  background: #b8c4d8;
  transform: translate(-50%, -50%) rotate(45deg);
}

.placeholder-media::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.placeholder-media-sm {
  aspect-ratio: 1;
  max-width: 200px;
}

.landing-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.landing-split-copy {
  padding-top: 32px;
}

.landing-split-title {
  margin: 0 0 12px;
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  font-weight: 800;
}

.landing-split-text {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.55;
}

.landing-split-text:last-child {
  margin-bottom: 0;
}

.landing-split-media {
  display: flex;
  justify-content: center;
}

.landing-split:not(.landing-split-reverse) .landing-split-media {
  justify-content: flex-start;
}

.placeholder-map {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 5 / 4;
  border-radius: 16px;
  background: linear-gradient(145deg, #e8f0ff 0%, #dce8f8 50%, #cfdff5 100%);
  border: 1px solid #c5d4ea;
  position: relative;
  display: grid;
  place-items: center;
}

.placeholder-map-pin {
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  background: var(--btn-primary);
  transform: rotate(-45deg);
}

.landing-contact-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
  max-width: 480px;
}

.landing-contact-input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--surface-tint-border);
  background: var(--surface-tint);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.landing-contact-input:focus {
  border-color: rgba(61, 123, 245, 0.65);
  outline: 2px solid rgba(61, 123, 245, 0.45);
  outline-offset: 2px;
}

.landing-contact-send {
  margin-top: 0;
  padding-left: 22px;
  padding-right: 22px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-footer {
  text-align: center;
  padding: 8px 12px 0;
}

.site-footer-line {
  margin: 6px 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(254, 254, 254, 0.88);
}

.site-footer-line a {
  color: #fefefe;
  font-weight: 800;
  text-decoration: none;
}

.site-footer-line a:hover {
  text-decoration: underline;
}

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

  .landing-split {
    grid-template-columns: 1fr;
  }

  .landing-split-media {
    justify-content: center;
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav-links {
    justify-content: center;
  }

  .btn-nav {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

.auth-header {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.auth-title {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  margin: 0;
}

.auth-subtitle {
  max-width: 56ch;
  margin-top: 6px;
}

.auth-form {
  margin-top: 8px;
}

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

.form-grid-stacked {
  grid-template-columns: 1fr;
}

.form-grid .field-span {
  grid-column: 1 / -1;
}

.details-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.details-next {
  margin-top: 0;
}

.details-back {
  font-size: 1rem;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--surface-tint-border);
  background: var(--surface-tint);
  color: var(--text);
  outline: none;
  font-size: 14px;
  box-sizing: border-box;
}

input:focus,
select:focus {
  border-color: rgba(61, 123, 245, 0.65);
  outline: 2px solid rgba(61, 123, 245, 0.45);
  outline-offset: 2px;
}

.auth-form-large input[type="text"],
.auth-form-large input[type="email"],
.auth-form-large input[type="password"],
.auth-form-large input[type="date"],
.auth-form-large select {
  padding: 18px 18px;
  font-size: 1.1rem;
  min-height: 56px;
  border-radius: 14px;
}

.password-input-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.password-input-wrap input {
  padding-right: 4.75rem;
}

.auth-form-large .password-input-wrap input {
  padding-right: 5.75rem;
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 6px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #174483;
  font-weight: 800;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.2;
}

.password-toggle-btn:hover {
  text-decoration: underline;
}

.password-toggle-btn:focus-visible {
  outline: 2px solid rgba(61, 123, 245, 0.55);
  outline-offset: 2px;
}

/* Date inputs: match full-width pill fields (avoids native narrow control). */
input[type="date"] {
  display: block;
  max-width: 100%;
  min-width: 0;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.75;
}

.auth-form-large .field label {
  font-size: 15px;
  margin-bottom: 12px;
}

.terms {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 0;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.terms input[type="checkbox"] {
  margin-top: 2px;
}

.auth-footer {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.auth-link {
  color: #174483;
  font-weight: 900;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.role-select-page {
  text-align: center;
}

.role-select-page.auth-shell {
  padding: 44px 40px 48px;
  min-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.role-select-page .role-select-heading {
  margin: 0 0 36px;
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  line-height: 1.15;
}

.role-pick-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: clamp(20px, 3.5vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  max-width: 1100px;
}

button.role-pick {
  font: inherit;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.role-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: clamp(200px, 30vw, 300px);
  min-height: 420px;
  padding: 28px 22px 32px;
  border-radius: 26px;
  border: 1px solid var(--surface-tint-border);
  background: var(--surface-tint);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
  will-change: transform;
}

.role-pick:hover {
  border-color: rgba(61, 123, 245, 0.55);
  background: #f1f5f9;
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.role-pick.is-selected {
  border-color: var(--btn-primary);
  background: var(--box-gradient-hover);
  box-shadow: 0 0 0 3px rgba(61, 123, 245, 0.35);
}

.role-pick.is-selected:hover {
  box-shadow: 0 0 0 3px rgba(61, 123, 245, 0.35), 0 10px 22px rgba(37, 99, 235, 0.12);
}

.role-pick:focus-visible {
  outline: 2px solid var(--btn-primary);
  outline-offset: 3px;
}

.role-pick-media {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 240px;
  max-height: 340px;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: #e8ecf4;
  border: 1px solid #d4dbe8;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

span.role-pick-media::before,
span.role-pick-media::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70%;
  height: 2px;
  background: #b8c4d8;
  transform: translate(-50%, -50%) rotate(45deg);
}

span.role-pick-media::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

img.role-pick-media {
  object-fit: cover;
  object-position: center center;
}

.role-pick-label {
  font-weight: 800;
  font-size: clamp(1.25rem, 3.2vw, 1.55rem);
  color: var(--text);
  text-align: center;
}

/* University destination grid (40 tiles, 4 columns × 10 rows), multi-select */
.country-select-page .country-select-sub {
  margin: -24px auto 28px;
  max-width: 560px;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.45;
  text-align: center;
}

.country-select-page.auth-shell {
  min-height: auto;
  align-items: center;
  text-align: center;
}

.country-select-page .role-select-heading {
  width: 100%;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.country-select-page .role-select-actions {
  justify-content: center;
  gap: clamp(24px, 8vw, 100px);
  flex-wrap: wrap;
}

.country-pick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2.2vw, 18px);
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

/* Education program step: 3×2 grid, reuses .country-pick tiles */
.program-pick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2.2vw, 18px);
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

button.country-pick {
  font: inherit;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  width: 100%;
  height: 100%;
}

.country-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 118px;
  padding: 14px 10px 16px;
  border-radius: 22px;
  border: 1px solid var(--surface-tint-border);
  background: var(--surface-tint);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
  will-change: transform;
}

.country-pick:hover {
  border-color: rgba(61, 123, 245, 0.55);
  background: #f1f5f9;
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.country-pick.is-selected {
  border-color: var(--btn-primary);
  background: var(--box-gradient-hover);
  box-shadow: 0 0 0 3px rgba(61, 123, 245, 0.35);
}

.country-pick.is-selected:hover {
  box-shadow: 0 0 0 3px rgba(61, 123, 245, 0.35), 0 10px 22px rgba(37, 99, 235, 0.12);
}

.country-pick:focus-visible {
  outline: 2px solid var(--btn-primary);
  outline-offset: 3px;
}

/* Extra countries from search: same tile style, inserted in grid before "Others" */
.country-pick.country-pick--extra {
  cursor: pointer;
}

.country-pick-flag {
  font-size: clamp(2rem, 4.5vw, 2.65rem);
  line-height: 1;
  margin-bottom: 8px;
  user-select: none;
}

.country-pick-label {
  font-weight: 800;
  font-size: clamp(0.78rem, 1.65vw, 0.95rem);
  color: var(--text);
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  hyphens: auto;
}

/* Exam subject detail: one block per IGCSE / AS / A / AP / IB choice */
.exam-detail-page #examDetailMessage {
  margin: 12px auto 0;
  max-width: 560px;
  text-align: center;
}

.exam-detail-blocks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2.2vw, 18px);
  width: 100%;
  max-width: 920px;
  margin: 0 auto 8px;
}

button.exam-detail-block {
  font: inherit;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  text-align: center;
}

.exam-detail-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 118px;
  padding: 14px 12px 16px;
  border-radius: 22px;
  border: 1px solid var(--surface-tint-border);
  background: var(--surface-tint);
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
  will-change: transform;
}

.exam-detail-block:hover {
  border-color: rgba(61, 123, 245, 0.55);
  background: #f1f5f9;
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.exam-detail-block-title {
  font-weight: 800;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--text);
}

.exam-detail-block-summary {
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}

.exam-detail-dialog {
  margin: auto;
  padding: 0;
  border: none;
  border-radius: 24px;
  width: min(920px, calc(100vw - 24px));
  max-width: 920px;
  max-height: min(92vh, 780px);
  overflow: hidden;
  background: #fefefe;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.4);
}

.exam-detail-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.exam-detail-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 780px);
}

.exam-detail-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(180deg, #f8fafc 0%, #fefefe 100%);
}

.exam-detail-dialog-title {
  margin: 0;
  padding-right: 8px;
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  line-height: 1.3;
  color: var(--text);
  font-weight: 800;
}

.exam-detail-dialog-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--surface-tint-border);
  border-radius: 14px;
  background: #fefefe;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.exam-detail-dialog-close:hover {
  background: var(--accent-soft);
  border-color: rgba(61, 123, 245, 0.35);
}

.exam-detail-dialog-body {
  padding: 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  background: #fefefe;
}

.exam-detail-list-wrap {
  margin: 16px 20px 20px;
  border: 1px solid var(--surface-tint-border);
  border-radius: 14px;
  background: var(--surface-tint);
  overflow: hidden;
}

.exam-detail-checklist {
  display: flex;
  flex-direction: column;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.exam-detail-cell {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px 18px;
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #1e293b;
  transition: background 0.12s ease;
  box-sizing: border-box;
}

.exam-detail-cell:last-child {
  border-bottom: none;
}

.exam-detail-cell:hover {
  background: rgba(61, 123, 245, 0.07);
}

.exam-detail-cell:has(input:checked) {
  background: rgba(61, 123, 245, 0.12);
}

.exam-detail-cell input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--btn-primary);
  cursor: pointer;
}

.exam-detail-cell-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.exam-detail-dialog-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding: 18px 20px 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  background: #fefefe;
}

/* Match large flow buttons (Next / Continue), not default .btn */
.exam-detail-dialog-foot .btn {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  font-size: 1.15rem;
  font-weight: 800;
  border-radius: 14px;
  min-width: 140px;
}

.exam-detail-dialog-foot .btn-secondary {
  background: #eff6ff;
  color: #174483;
  border: 1px solid rgba(61, 123, 245, 0.35);
}

.exam-detail-dialog-foot .btn-secondary:hover {
  background: #dcecff;
}

.exam-detail-dialog-foot .btn:not(.btn-secondary) {
  border: none;
}

/* Target scores (registration, after exam detail step) */
.exam-target-page #examTargetsMessage {
  margin: 12px auto 0;
  max-width: 560px;
  text-align: center;
}

.exam-target-page .exam-targets-save-password-wrap {
  max-width: 420px;
  margin: 0 auto 16px;
  text-align: left;
}

.exam-target-page .exam-targets-save-password-wrap label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}

.exam-target-page .exam-targets-save-password-hint {
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 0.85rem;
}

.exam-target-scroll {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 8px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 12px;
}

.exam-target-unified-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.exam-target-section {
  margin-bottom: 20px;
}

.exam-target-section:last-child {
  margin-bottom: 0;
}

.exam-target-section-title {
  margin: 0 0 12px;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
}

.exam-target-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 140px);
  gap: 12px 16px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 16px;
  border: 1px solid var(--surface-tint-border);
  background: var(--surface-tint);
  box-sizing: border-box;
}

.exam-target-row:last-child {
  margin-bottom: 0;
}

.exam-target-label {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--text);
  min-width: 0;
  word-break: break-word;
}

.exam-target-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fefefe;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.exam-target-input:focus {
  outline: none;
  border-color: rgba(61, 123, 245, 0.55);
  box-shadow: 0 0 0 3px rgba(61, 123, 245, 0.15);
}

.exam-target-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.exam-target-section-head .exam-target-section-title {
  margin-bottom: 0;
}

.exam-target-add-other {
  margin-top: 0 !important;
  padding: 10px 18px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  min-width: 0 !important;
}

.exam-target-other-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exam-target-custom-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--surface-tint-border);
  background: var(--surface-tint);
  box-sizing: border-box;
}

.exam-target-remove-other {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fefefe;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.exam-target-remove-other:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

.exam-target-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.exam-target-row--added-custom {
  grid-template-columns: minmax(0, 1.2fr) minmax(100px, 150px) auto;
}

.exam-target-added-name {
  align-self: center;
  word-break: break-word;
}

.exam-target-unified-list > .exam-target-composer:not(:first-child) {
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px dashed rgba(148, 163, 184, 0.45);
}

.exam-target-composer {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.exam-target-add-to-list {
  margin-top: 0 !important;
  padding: 10px 18px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  min-width: 0 !important;
  align-self: center;
}

@media (max-width: 520px) {
  .exam-detail-blocks {
    grid-template-columns: 1fr;
  }

  .exam-target-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .exam-target-scroll {
    max-height: min(58vh, 560px);
  }

  .exam-target-custom-row {
    grid-template-columns: 1fr;
  }

  .exam-target-add-to-list {
    width: 100%;
  }

  .exam-target-section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .exam-target-add-other {
    width: 100%;
  }

  .country-pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 440px;
  }

  /* Education program: keep 3 columns on all widths */
  .program-pick-grid .country-pick {
    min-height: 96px;
    padding: 10px 6px 12px;
  }

  .program-pick-grid .country-pick-label {
    font-size: clamp(0.62rem, 2.6vw, 0.78rem);
  }
}

@media (max-width: 620px) {
  .role-select-page.auth-shell {
    min-height: auto;
    padding: 32px 22px 36px;
  }

  .role-pick-row {
    flex-direction: column;
    align-items: center;
  }

  .role-pick {
    width: min(100%, 380px);
    min-height: 0;
  }
}

.role-select-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  width: 100%;
  max-width: 1100px;
  margin: 40px auto 0;
  padding: 0 4px;
  gap: 16px;
  flex-wrap: wrap;
}

.role-select-back {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #174483;
  text-decoration: none;
  padding: 14px 6px 14px 0;
  line-height: 1.2;
}

.role-select-back:hover {
  text-decoration: underline;
  color: var(--text);
}

.role-select-next.btn,
.details-next.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 16px 40px;
  font-size: 1.15rem;
  border-radius: 14px;
}

.role-select-next.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.role-select-next.btn:disabled:hover {
  background: var(--btn-primary);
  transform: none;
}

@media (max-width: 520px) {
  .role-select-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .role-select-back {
    text-align: left;
  }

  .role-select-next.btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .details-actions .details-next.btn {
    width: 100%;
  }

  .country-select-page .role-select-actions {
    align-items: center;
  }

  .country-select-page .role-select-back {
    text-align: center;
    padding-left: 0;
    padding-right: 0;
  }
}

.message.is-error {
  color: #8a1d1d;
  font-weight: 800;
}

.avatar-ring-sm {
  width: 78px;
  height: 78px;
  padding: 3px;
}

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

.bg-blob {
  display: none;
}

.blob-left {
  width: 280px;
  height: 280px;
  background: rgba(61, 123, 245, 0.22);
  left: -120px;
  top: -90px;
}

.blob-right {
  width: 240px;
  height: 240px;
  background: rgba(88, 166, 255, 0.2);
  right: -110px;
  top: 30px;
}

.app-shell {
  width: min(1120px, 92vw);
  margin: 40px auto;
  position: relative;
  z-index: 1;
}

.app-shell--student-view {
  width: min(1038px, 92vw);
}

.app-shell--student-view.counselor-page {
  width: min(1038px, 92vw);
  margin: 40px auto;
}

.app-shell--with-sidebar {
  width: min(1320px, 94vw);
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.profile-content {
  min-width: 0;
}

.profile-sidebar {
  position: sticky;
  top: 24px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  box-sizing: border-box;
}

.profile-sidebar-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 8px;
}

@media (min-width: 901px) {
  .profile-sidebar-body {
    overflow: hidden;
  }
}

.profile-sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-decoration: none;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.profile-sidebar-logo {
  display: block;
  width: 100%;
  max-width: 172px;
  height: auto;
  object-fit: contain;
}

.profile-sidebar-name {
  margin-top: -20px;
  font-weight: 900;
  font-size: 1.05rem;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.profile-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.profile-sidebar-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
  min-height: min-content;
}

.profile-sidebar-divider {
  display: block;
  width: 100%;
  height: 1px;
  min-height: 1px;
  margin: 4px 0;
  padding: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.12);
  flex-shrink: 0;
  align-self: stretch;
  box-sizing: border-box;
}

.profile-sidebar-link {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1f2937;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  /* Uniform border + inset accent (not thick border-left) so border-radius + overflow:hidden render both corners */
  box-shadow: none;
  /* One line per item: long labels (e.g. Certificates) no longer wrap and push links below the scroll fold */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-sidebar-link:hover:not(.is-active) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.profile-sidebar-link.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
  box-shadow: inset 3px 0 0 0 var(--btn-primary);
}

.profile-sidebar-link.is-active:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  box-shadow: inset 3px 0 0 0 var(--btn-primary);
}

.profile-sidebar-link:focus-visible {
  outline: 2px solid rgba(61, 123, 245, 0.55);
  outline-offset: 2px;
}

/* Profile dashboard only: disable hover “lift” on tiles and buttons (sidebar uses flat nav globally). */
body.page-profile a.cert-profile-cert-tile,
body.page-profile .profile-schedule-card {
  transition: box-shadow 0.2s ease, border-color 0.15s ease;
  will-change: auto;
}

body.page-profile a.cert-profile-cert-tile:hover,
body.page-profile a.cert-profile-cert-tile:active,
body.page-profile a.exam-score-progress-card:hover,
body.page-profile .profile-schedule-card:hover {
  transform: none;
}

body.page-profile .btn {
  will-change: auto;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

body.page-profile .btn:hover {
  transform: none;
}

.calendar-shell {
  margin-bottom: 18px;
}

.calendar-head {
  gap: 12px;
  flex-wrap: wrap;
}

.calendar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.calendar-nav-btn {
  margin-top: 0;
  min-width: 44px;
  font-size: 1.1rem;
  line-height: 1;
}

.calendar-month-label {
  margin: 0;
  min-width: 180px;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 8px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar-weekdays span:first-child,
.calendar-weekdays span:last-child {
  color: #b91c1c;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-cell--empty {
  min-height: 76px;
}

.calendar-day-btn {
  min-height: 76px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: var(--box-gradient);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.calendar-day-btn:hover {
  border-color: rgba(61, 123, 245, 0.55);
  background: #f1f5f9;
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.calendar-day-btn.is-selected {
  border-color: rgba(61, 123, 245, 0.7);
  box-shadow: 0 0 0 3px rgba(61, 123, 245, 0.18);
}

.calendar-day-btn.is-today .calendar-day-num {
  color: #1d4ed8;
}

.calendar-day-num {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.calendar-day-btn.is-weekend .calendar-day-num {
  color: #b91c1c;
}

.calendar-day-dot {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.calendar-add-form {
  display: grid;
  gap: 12px;
}

.calendar-add-form .field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.calendar-add-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.calendar-agenda-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calendar-agenda-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: var(--box-gradient);
}

.calendar-agenda-badge {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.calendar-agenda-badge--deadline {
  background: #fee2e2;
  color: #991b1b;
}

.calendar-agenda-badge--event {
  background: #e0f2fe;
  color: #0c4a6e;
}

.calendar-agenda-badge--meeting {
  background: #ede9fe;
  color: #5b21b6;
}

.calendar-agenda-badge--exam {
  background: #ffedd5;
  color: #9a3412;
}

.calendar-agenda-badge--meeting-pending {
  background: #fef3c7;
  color: #92400e;
}

.calendar-agenda-badge--meeting-ok {
  background: #dcfce7;
  color: #166534;
}

.calendar-agenda-text {
  min-width: 0;
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.calendar-agenda-remove {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.calendar-agenda-remove:hover {
  color: #64748b;
  background: #f1f5f9;
}

.calendar-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.card {
  background: var(--box-gradient);
  border-radius: 28px;
  padding: 22px;
  border: 1px solid rgba(254, 254, 254, 0.65);
}

.profile-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 20px;
}

.profile-logout-section {
  margin-top: 24px;
}

.profile-logout-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-logout-lead {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.avatar-wrap {
  position: relative;
}

.avatar-ring {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(130deg, var(--btn-primary), var(--blue), var(--blue-bright));
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid #fefefe;
  position: relative;
  overflow: hidden;
}

.default-avatar {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #f4fbff, #dbeeff 62%, #cde5ff);
}

.avatar.has-custom-photo {
  display: block;
  background: #0f172a;
}

.avatar.has-custom-photo .avatar-custom-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar.has-custom-photo .avatar-icon {
  display: none !important;
}

.avatar-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: block;
}

.avatar-icon::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #5e7ca0;
}

.avatar-icon::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 18px;
  border-radius: 12px 12px 8px 8px;
  background: #5e7ca0;
}

.avatar-custom-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.avatar:not(.has-custom-photo) .avatar-custom-img {
  display: none !important;
}

.avatar-custom-img[hidden] {
  display: none !important;
}

.pfp-page .pfp-preview-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 4px;
}

.pfp-preview .avatar-ring {
  width: 180px;
  height: 180px;
}

.pfp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

.pfp-actions .pfp-btn {
  min-width: 200px;
}

.pfp-footer-actions {
  margin-top: 20px;
}

@media (max-width: 520px) {
  .pfp-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pfp-actions .pfp-btn {
    width: 100%;
    min-width: 0;
  }
}

.level-pill {
  position: absolute;
  right: -8px;
  bottom: -5px;
  background: var(--yellow);
  color: #423100;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 700;
  font-size: 12px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  background: #eef2f9;
  border: 1px solid #d8e2f0;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
}

.chip-accent {
  background: var(--accent-soft);
  border-color: var(--accent-soft-border);
  color: var(--accent-on-soft);
}

.quick-stats {
  display: grid;
  gap: 10px;
}

.profile-header .quick-stats {
  grid-template-columns: minmax(210px, 260px) minmax(180px, 1fr);
  align-items: stretch;
}

.stat {
  background: var(--surface-tint);
  border: 1px solid var(--surface-tint-border);
  border-radius: 14px;
  padding: 10px 12px;
  min-width: 180px;
}

.stat-label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.stat-value {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 800;
}

.profile-gpa-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  grid-column: 1;
  grid-row: 1 / span 2;
}

.profile-gpa-stat .stat-label,
.profile-gpa-stat .stat-value {
  margin: 0;
}

.profile-gpa-stat .stat-value {
  font-size: 2rem;
  line-height: 1.1;
}

.profile-gpa-stat .stat-label {
  font-size: 1.15rem;
  font-weight: 800;
  color: #174483;
}

.profile-exams-month-stat {
  grid-column: 2;
  grid-row: 1;
}

.profile-deadlines-month-stat {
  grid-column: 2;
  grid-row: 2;
}

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

/* Profile grid: default is natural height; row pairs can opt into equal height. */
.profile-grid {
  grid-auto-rows: auto;
  align-items: start;
}

.profile-grid > * {
  align-self: start;
}

/* Certificates & Exam progress share one row — match their card heights. */
.profile-grid > #profileCertificatesTile,
.profile-grid > #examScoreProgressCard {
  align-self: stretch;
}

.profile-grid > #examScoreProgressCard {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* First row: My tasks + Contacts share one row and equal height. */
.profile-grid-top-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.profile-grid-top-row > .card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.profile-grid-top-row .profile-goals-split {
  gap: 10px 14px;
}

.profile-grid-top-row .card-head {
  margin-bottom: 10px;
}

.profile-grid-top-row .profile-goals-add {
  margin-top: 8px !important;
}

.profile-grid-top-row > .profile-contacts-card .access-list {
  flex: 1;
  margin: 0;
}

.profile-contacts-card-foot {
  margin-top: auto;
  padding-top: 8px;
}

.profile-contacts-permissions-btn {
  margin-top: 0;
  min-height: 42px;
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 13px;
}

.profile-permissions-dialog .profile-permissions-lead {
  margin-bottom: 12px;
}

.profile-permissions-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
  text-align: left;
}

.profile-permissions-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  cursor: pointer;
}

.profile-permissions-row input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--btn-primary);
}

.profile-permissions-msg {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #166534;
}

.profile-permissions-msg.is-error {
  color: #b91c1c;
}

.profile-permissions-msg[hidden] {
  display: none !important;
}

.profile-permissions-actions {
  margin-top: 4px;
}

/* Make profile tiles more compact, except the meetings block. */
.profile-grid > .card:not(.profile-meetings-week-card),
.profile-grid-top-row > .card:not(.profile-meetings-week-card),
.college-list-page > .card {
  padding: 16px;
}

.profile-grid-top-row > .card:not(.profile-meetings-week-card) {
  padding: 12px;
}

.profile-grid > a.cert-profile-cert-tile:not(.profile-meetings-week-card) {
  padding: 12px 16px;
}

/* Profile grid: nav tiles behave like normal cards */
a.cert-profile-cert-tile {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  padding: 14px 18px;
  min-height: 0;
  height: 100%;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.15s ease, transform 0.15s ease;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

.profile-tile-count {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  min-width: 132px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  color: #174483;
  border: 1px solid rgba(61, 123, 245, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  pointer-events: none;
}

.profile-tile-count[hidden] {
  display: none !important;
}

a.cert-profile-cert-tile .cert-profile-cert-head {
  margin-bottom: 0;
}

.profile-cert-tile-main {
  flex: 1;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 0;
}

.profile-cert-tile-main--empty {
  min-height: min(120px, 20vw);
  align-items: center;
  justify-content: center;
}

.profile-cert-tile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.profile-cert-tile-empty[hidden] {
  display: none !important;
}

.profile-cert-add-plus {
  width: clamp(48px, 12vmin, 70px);
  height: clamp(48px, 12vmin, 70px);
  border-radius: clamp(11px, 2vmin, 16px);
  background-color: var(--bg);
  color: #fefefe;
  display: grid;
  place-items: center;
  font-size: clamp(1.35rem, 6vw, 1.9rem);
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(61, 123, 245, 0.32);
}

.profile-cert-add-text {
  font-size: 1rem;
  font-weight: 800;
  color: #174483;
  letter-spacing: 0.01em;
}

.profile-cert-preview-list {
  margin: 0;
  padding: 0 2px 0 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.profile-cert-preview-list[hidden] {
  display: none !important;
}

.profile-cert-preview-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: #334155;
}

.profile-cert-preview-num {
  flex-shrink: 0;
  min-width: 1.5rem;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.profile-cert-preview-name {
  min-width: 0;
  flex: 1;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-cert-preview-more {
  margin: 10px 0 0;
  padding: 0 2px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #174483;
}

.profile-cert-preview-more[hidden] {
  display: none !important;
}

a.cert-profile-cert-tile:hover {
  background: #f1f5f9;
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
}

a.cert-profile-cert-tile:focus-visible {
  outline: 2px solid rgba(61, 123, 245, 0.65);
  outline-offset: 3px;
}

a.cert-profile-cert-tile:active {
  transform: translateY(0);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

a.cert-profile-cert-tile .card-head h2 {
  color: #0f172a;
  font-size: 1.08rem;
  line-height: 1.35;
}

.profile-college-meta {
  margin: 10px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #174483;
}

.profile-college-top3 {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}

/* Profile: counselor meeting schedule (tile + modal calendar) */
.profile-schedule-card {
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.15s ease, transform 0.15s ease;
  will-change: transform;
  outline: none;
}

.profile-schedule-card:hover {
  background: #f8fafc;
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.1);
}

.profile-schedule-card:focus-visible {
  outline: 2px solid rgba(61, 123, 245, 0.65);
  outline-offset: 3px;
}

.profile-schedule-card-head {
  margin-bottom: 6px;
}

.profile-schedule-card-assigned {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.4;
}

.profile-schedule-card-lead {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}

.profile-schedule-card-cta {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #2563eb;
  letter-spacing: 0.02em;
}

body.profile-schedule-open {
  overflow: hidden;
}

.profile-schedule-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.profile-schedule-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1210;
  width: min(420px, 92vw);
  max-height: min(90vh, 720px);
  overflow-y: auto;
  padding: 22px;
  margin: 0;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.profile-schedule-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-schedule-dialog-head h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
}

.profile-schedule-dialog-sub {
  margin: 6px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #174483;
}

.profile-schedule-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.profile-schedule-close:hover {
  background: #e2e8f0;
}

.profile-schedule-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.profile-schedule-nav-btn {
  padding: 8px 14px;
  min-width: 44px;
  font-size: 1.1rem;
  line-height: 1;
}

.profile-schedule-month-label {
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
}

.profile-schedule-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.profile-schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.profile-schedule-cell--empty {
  min-height: 40px;
}

.profile-schedule-day {
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.profile-schedule-day:hover:not(:disabled) {
  border-color: rgba(61, 123, 245, 0.55);
  background: #eff6ff;
  color: #1d4ed8;
}

.profile-schedule-day.is-selected {
  border-color: var(--btn-primary, #3d7bf5);
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  color: #1e40af;
  box-shadow: 0 4px 12px rgba(61, 123, 245, 0.25);
}

.profile-schedule-day--past,
.profile-schedule-day:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #f8fafc;
}

.profile-schedule-times-wrap {
  margin-bottom: 14px;
}

.profile-schedule-times-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #334155;
}

.profile-schedule-times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-schedule-time-btn {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(61, 123, 245, 0.35);
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e40af;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.profile-schedule-time-btn:hover {
  background: #eff6ff;
  border-color: rgba(61, 123, 245, 0.6);
}

.profile-schedule-time-btn.is-selected {
  background: linear-gradient(130deg, var(--btn-primary, #3d7bf5), #60a5fa);
  border-color: transparent;
  color: #fff;
}

.profile-schedule-note-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

.profile-schedule-note {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  font-family: inherit;
  font-size: 0.88rem;
  resize: vertical;
  min-height: 52px;
}

.profile-schedule-note:focus {
  outline: 2px solid rgba(61, 123, 245, 0.45);
  outline-offset: 2px;
}

.profile-schedule-msg {
  margin-top: 0;
  margin-bottom: 12px;
  min-height: 0;
  font-size: 0.88rem;
}

.profile-schedule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.profile-schedule-times-loading,
.profile-schedule-times-empty {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

.profile-meetings-week-card {
  grid-column: 1 / -1;
}

.profile-meetings-week-lead {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.45;
}

.profile-meetings-week-toolbar {
  margin-bottom: 12px;
}

.profile-meetings-week-msg {
  min-height: 1.25em;
  margin: 0 0 8px;
  font-size: 0.88rem;
}

.profile-meetings-week-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-meetings-week-empty {
  margin: 0;
  font-size: 0.92rem;
  color: #64748b;
}

.profile-meetings-day-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}

.profile-meetings-day-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-meetings-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

.profile-meetings-item:last-child {
  border-bottom: none;
}

.profile-meetings-status {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.profile-meetings-status--pending {
  background: #fef3c7;
  color: #92400e;
}

.profile-meetings-status--ok {
  background: #d1fae5;
  color: #065f46;
}

.profile-meetings-item-line {
  color: #334155;
}

.counselor-meeting-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(120deg, #1e3a5f 0%, #2563eb 100%);
  color: #f8fafc;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.counselor-meeting-banner-text {
  margin: 0;
  flex: 1;
  min-width: 200px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.counselor-meeting-banner .counselor-meeting-banner-jump {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.counselor-meeting-banner .counselor-meeting-banner-jump:hover {
  background: rgba(255, 255, 255, 0.25);
}

.counselor-meetings-requests-card,
.counselor-meetings-week-card {
  margin-bottom: 20px;
}

.counselor-meetings-inline-msg {
  min-height: 1.25em;
  margin: 0 0 10px;
  font-size: 0.88rem;
}

.counselor-meeting-requests-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.counselor-meetings-empty {
  margin: 0;
  font-size: 0.92rem;
  color: #64748b;
}

.counselor-meeting-request-card {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.counselor-meeting-request-title {
  margin: 0 0 3px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
}

.counselor-meeting-request-meta {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: #475569;
}

.counselor-meeting-request-note {
  margin: 0 0 6px;
  font-size: 0.76rem;
  color: #334155;
  line-height: 1.3;
}

.counselor-meeting-request-note--muted {
  color: #94a3b8;
  font-style: italic;
}

.counselor-meeting-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: flex-start;
  margin-top: -8px;
  position: relative;
  z-index: 1;
}

.counselor-meeting-request-actions .btn {
  padding: 7px 14px !important;
  min-height: 38px;
  font-size: 0.86rem;
  line-height: 1;
}

.counselor-meetings-week-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.counselor-meetings-day {
  flex: 0 0 150px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  min-height: 100px;
  scroll-snap-align: start;
}

.counselor-meetings-day-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
}

.counselor-meetings-day-empty {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.counselor-meetings-day-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.counselor-meetings-week-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 6px 0 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.78rem;
}

.counselor-meetings-week-item:last-child {
  border-bottom: none;
}

.counselor-meetings-status {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.counselor-meetings-status--pending {
  background: #fef3c7;
  color: #92400e;
}

.counselor-meetings-status--ok {
  background: #d1fae5;
  color: #065f46;
}

.counselor-meetings-week-line {
  color: #334155;
}

.profile-college-top3 li + li {
  margin-top: 4px;
}

a.cert-profile-cert-tile:visited .card-head h2 {
  color: #0f172a;
}

/* Standalone certificates & achievements page */
.cert-page-shell {
  padding-bottom: 48px;
}

.cert-page-back {
  margin: 0 0 16px;
}

.cert-page-back-link {
  font-size: 1rem;
}

.cert-page-card {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

/* GPA page shares .cert-page-card but should keep the previous narrower layout. */
.gpa-page-card.cert-page-card {
  max-width: 880px;
}

.cert-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  padding-bottom: 18px;
}

.cert-page-header-main {
  flex: 1;
  min-width: 0;
}

.cert-page-title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 800;
  color: #0f172a;
}

.cert-page-lead {
  margin: 10px 0 0;
  max-width: 52ch;
}

/* College list — merged top card (title + search), then list card */
.college-list-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  min-width: 0;
}

.college-list-merged-top .college-list-intro-header {
  margin-bottom: 0;
  padding-bottom: 0;
}

.college-list-search-block {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid #e7eef8;
}

.college-list-search-head {
  margin-bottom: 12px;
}

.college-list-page > .college-list-panel--list {
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.college-list-panel-body {
  margin: 0;
}

.college-list-panel-body--scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.college-list-panel--list .college-table-scroll {
  flex: 1;
  min-height: 0;
}

.college-search-panel {
  margin-bottom: 0;
}

.college-search-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--surface-tint-border);
  background: #fff;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
}

.college-search-input:focus {
  border-color: rgba(61, 123, 245, 0.65);
  outline: 2px solid rgba(61, 123, 245, 0.35);
  outline-offset: 2px;
}

.college-search-empty {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.college-search-results {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  max-height: min(360px, 50vh);
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.college-search-result {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
  line-height: 1.35;
  word-break: break-word;
}

.college-search-result:last-child {
  border-bottom: none;
}

.college-search-result:hover,
.college-search-result.is-active {
  background: var(--accent-soft);
}

.college-list-panel--list .card-head {
  margin-bottom: 10px;
}

.college-list-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.college-list-add-spare-btn,
.college-list-fullscreen-btn {
  margin-top: 0;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.college-list-add-spare-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.college-slot-header-th {
  min-width: 7rem;
  vertical-align: bottom;
}

.college-slot-header-row {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.college-slot-drag-handle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-height: 34px;
  margin-bottom: 1px;
  border-radius: 8px;
  cursor: grab;
  user-select: none;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.12em;
  transition: background 0.15s ease, color 0.15s ease;
}

.college-slot-drag-handle:hover {
  color: #475569;
  background: rgba(148, 163, 184, 0.2);
}

.college-slot-drag-handle:active {
  cursor: grabbing;
}

.college-slot-drag-handle::before {
  content: "≡";
  font-weight: 700;
  display: inline-block;
  font-size: 15px;
  line-height: 1;
}

.college-slot-th-dragging {
  opacity: 0.55;
}

.college-slot-th-drag-over {
  box-shadow: inset 0 -3px 0 0 rgba(61, 123, 245, 0.85);
  background: rgba(61, 123, 245, 0.06);
}

.college-slot-header-wrap {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.college-slot-header-input {
  flex: 1;
  min-width: 5rem;
  box-sizing: border-box;
  font-weight: 600;
  font-size: 12px;
}

.college-slot-header-remove-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px 2px;
  align-self: center;
}

.college-slot-header-remove-btn:hover {
  color: #0f172a;
}

.college-table-scroll {
  overflow-x: auto;
  margin-top: 0;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.college-details-table thead[hidden] {
  display: none;
}

.college-details-empty {
  padding: 28px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.5;
}

.college-details-table {
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
  font-size: 13px;
}

.college-details-table thead th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 800;
  color: #0f172a;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.college-details-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.college-details-table tbody tr:last-child td {
  border-bottom: none;
}

.college-details-table tbody tr:hover td {
  background: #fafbfd;
}

.college-details-table-actions {
  width: 1%;
  text-align: center;
}

.college-details-readonly {
  display: block;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  word-break: break-word;
}

.college-details-cell-name {
  min-width: 160px;
  max-width: 220px;
}

.college-details-cell-country {
  min-width: 100px;
  max-width: 140px;
}

.college-details-cell-edit {
  min-width: 140px;
  max-width: 200px;
}

.college-details-control {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: var(--text);
  border: 1px solid var(--surface-tint-border);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  resize: vertical;
  min-height: 40px;
}

.college-details-select {
  min-height: 40px;
  cursor: pointer;
}

.college-details-textarea {
  min-height: 52px;
  line-height: 1.4;
}

.college-details-url {
  min-height: 40px;
  resize: none;
}

.college-details-control:focus {
  border-color: rgba(61, 123, 245, 0.65);
  outline: 2px solid rgba(61, 123, 245, 0.28);
  outline-offset: 0;
}

.college-details-cell-actions {
  text-align: center;
  vertical-align: middle;
  width: 52px;
}

.college-details-loading {
  padding: 20px 16px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

body.college-table-fullscreen-open {
  overflow: hidden;
}

.college-list-panel--list.is-fullscreen {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1210;
  width: min(1500px, 97vw);
  height: min(88vh, 980px);
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--box-gradient);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.college-list-panel--list.is-fullscreen .college-list-panel-body--scroll {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.college-list-panel--list.is-fullscreen .college-table-scroll {
  flex: 1;
  height: 100%;
  max-height: none;
  overflow: auto;
}

/* --- Essays (Google Drive–style cards) --- */
.essays-page-header {
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.essays-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.essays-toolbar .btn {
  margin-top: 0;
  padding: 14px 26px;
  font-size: 16px;
  border-radius: 14px;
  min-height: 48px;
}

.essays-message {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}

.essays-message--error {
  color: #b91c1c;
}

.essays-empty {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.essays-drive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.essay-drive-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f1f5f9 0%, #e8eef5 100%);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  min-height: 220px;
}

.essay-drive-card__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 8px 12px;
  background: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid #e2e8f0;
}

.essay-drive-card__icon-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.essay-drive-card__icon-img {
  display: block;
  border-radius: 4px;
}

.essay-drive-card__icon-svg svg {
  display: block;
}

.essay-drive-card__title {
  flex: 1;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.essay-drive-card__menu {
  position: relative;
  flex-shrink: 0;
}

.essay-drive-card__menu-btn {
  list-style: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  user-select: none;
}

.essay-drive-card__menu-btn::-webkit-details-marker {
  display: none;
}

.essay-drive-card__menu-btn:hover {
  background: rgba(148, 163, 184, 0.25);
  color: #0f172a;
}

.essay-drive-card__menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  z-index: 30;
}

.essay-drive-card__menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: #0f172a;
  cursor: pointer;
}

.essay-drive-card__menu-item:hover {
  background: #f1f5f9;
}

.essay-drive-card__preview {
  flex: 1;
  min-height: 180px;
  background: #fff;
  margin: 0 10px 10px;
  /* Square corners so the doc reads like a sheet of paper, not clipped to a round rect */
  border-radius: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

/* Preview only: centered, zoomed-out embed (card chrome unchanged). */
.essay-drive-card__preview--static {
  flex: 0 0 auto;
  position: relative;
  height: min(280px, 42vh);
  min-height: 200px;
  max-height: 320px;
  isolation: isolate;
  overflow: hidden;
  scrollbar-width: none;
  /* Lower = more zoomed out. */
  --essay-preview-zoom: 0.54;
  /* Scrollbar overlay width only (not document text). Raise to 10–12px on Windows if a sliver remains. */
  --essay-scrollbar-mask-w: 8px;
}

.essay-drive-card__preview--static::-webkit-scrollbar {
  display: none;
}

.essay-drive-card__preview-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  scrollbar-width: none;
}

.essay-drive-card__preview-frame::-webkit-scrollbar {
  display: none;
}

/* Hides the iframe’s vertical scrollbar only (narrow strip; widen if a sliver still shows on Windows). */
.essay-drive-card__preview-scrollbar-mask {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--essay-scrollbar-mask-w, 8px);
  z-index: 8;
  pointer-events: none;
  background: #fff;
}

/*
 * Full page width: use 100% (not 145%) so Google lays out to the iframe width and we don’t
 * crop a horizontal “center slice”. Scale + compensation keeps the scaled view filling the frame.
 */
.essay-drive-card__iframe {
  position: relative;
  flex-shrink: 0;
  width: calc(100% / var(--essay-preview-zoom));
  min-width: calc(100% / var(--essay-preview-zoom));
  max-width: none;
  height: calc(100% / var(--essay-preview-zoom));
  border: none;
  display: block;
  background: #fff;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  transform: scale(var(--essay-preview-zoom));
  transform-origin: top center;
}

/* Real element on top of the iframe layer (pseudo-elements often sit under embedded iframes). */
.essay-drive-card__preview-shield {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: default;
  touch-action: none;
  overscroll-behavior: none;
  background: transparent;
}

.essay-link-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(440px, 94vw);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.essay-link-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.essay-link-dialog-form {
  padding: 22px 24px 20px;
}

.essay-link-dialog-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.essay-link-dialog-hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.essay-link-dialog-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.essay-link-dialog-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font: inherit;
}

.essay-link-dialog-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: #b91c1c;
}

.essay-link-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* Logout confirm — full-screen overlay + card (works on all roles/pages; not native <dialog>). */
.onay-logout-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.onay-logout-overlay[hidden] {
  display: none !important;
}

.onay-logout-overlay.is-open .onay-logout-dialog {
  animation: onay-logout-dialog-in 0.2s ease-out both;
}

@keyframes onay-logout-dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.onay-logout-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(400px, 94vw);
  width: min(400px, calc(100vw - 32px));
  background: #fff;
  color: var(--text);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  outline: none;
}

.onay-logout-dialog-body {
  padding: 22px 24px 20px;
}

.onay-logout-dialog-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.onay-logout-dialog-text {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.onay-logout-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.onay-logout-dialog .onay-logout-dialog-actions .btn {
  margin-top: 0;
}

.onay-logout-dialog .onay-logout-dialog-actions .btn:hover {
  transform: translateY(-1px);
}

.college-my-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.college-my-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.college-my-list-name {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  min-width: 0;
}

.college-my-list-remove {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
}

.college-my-list-remove:hover {
  color: #64748b;
  background: #f1f5f9;
}

.cert-page-body {
  padding-top: 4px;
}

/* Blue rounded square + only — top-right of header */
.cert-add-fab {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  position: relative;
  border: none;
  border-radius: 14px;
  background-color: var(--bg);
  color: #fefefe;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(61, 123, 245, 0.35);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  will-change: transform;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.cert-add-count {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fefefe;
  color: #174483;
  border: 1px solid rgba(61, 123, 245, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.cert-add-count[hidden] {
  display: none !important;
}

.cert-add-fab:hover {
  background-color: var(--btn-primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(61, 123, 245, 0.4);
}

.cert-add-fab:focus-visible {
  outline: 2px solid var(--btn-primary);
  outline-offset: 3px;
}

.cert-add-fab-icon {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
}

.cert-list-wrap--page {
  margin-top: 28px;
}

/* Certificates page only — GPA reuses .cert-list-wrap--page for one transcript row (must stay full width). */
.cert-list-wrap--page:not(.gpa-transcript-list-wrap) .cert-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

@media (max-width: 1024px) {
  .cert-list-wrap--page:not(.gpa-transcript-list-wrap) .cert-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 640px) {
  .cert-list-wrap--page:not(.gpa-transcript-list-wrap) .cert-list {
    grid-template-columns: 1fr;
  }
}

.gpa-transcript-list-wrap.cert-list-wrap--page .cert-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.cert-add-panel {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.cert-add-panel[hidden] {
  display: none !important;
}

.cert-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.cert-form-actions .btn {
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 120px;
}

.cert-form-actions .cert-submit-btn {
  margin-top: 0;
}

.cert-cancel-add-btn {
  flex: 0 1 auto;
}

.cert-form-fields {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
}

.cert-form .field label {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
}

@media (min-width: 640px) {
  .cert-form-fields {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.cert-page-card .field label .req {
  color: #b45309;
  font-weight: 800;
}

.optional-label {
  font-weight: 600;
  color: var(--muted);
}

.cert-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.cert-file-picked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: min(100%, 320px);
}

.cert-pick-btn {
  margin-top: 0;
}

.cert-file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cert-file-name.has-file {
  color: var(--text);
}

.cert-file-clear {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.cert-file-clear:hover {
  color: #64748b;
  background: #f1f5f9;
}

.cert-file-clear:focus-visible {
  outline: 2px solid rgba(61, 123, 245, 0.45);
  outline-offset: 1px;
}

.cert-file-clear[hidden] {
  display: none !important;
}

.cert-submit-btn {
  margin-top: 12px;
}

.cert-list-wrap {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e7eef8;
}

/* Certificates list — essay-style preview cards */
.cert-list {
  margin: 0;
  padding: 0;
}

.cert-preview-card {
  position: relative;
  z-index: 0;
  cursor: pointer;
}

.cert-preview-card .cert-kebab-wrap {
  flex-shrink: 0;
}

/* Kebab on certificate card header: no filled box — icon only */
.cert-preview-card .cert-kebab-btn {
  background: transparent;
  color: #64748b;
  border-radius: 8px;
}

.cert-preview-card .cert-kebab-btn:hover {
  background: transparent;
  color: #0f172a;
}

.cert-preview-card .cert-kebab-btn[aria-expanded="true"] {
  background: transparent;
  color: #0f172a;
}

.cert-preview-card .cert-kebab-btn:focus-visible {
  outline: 2px solid var(--btn-primary, #3d7bf5);
  outline-offset: 2px;
}

.cert-drive-item.cert-preview-card:has(.cert-kebab-btn[aria-expanded="true"]) {
  z-index: 50;
}

.cert-drive-card__thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  pointer-events: none;
  user-select: none;
}

.cert-drive-card__preview-fallback {
  margin: 0;
  padding: 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  align-self: center;
}

.essay-drive-card__preview-frame:has(.cert-drive-card__preview-fallback) {
  align-items: center;
  justify-content: center;
}

/*
 * Certificate PDF cards: canvas (PDF.js) for controlled background + centering; iframe fallback only.
 */
.essay-drive-card__preview-frame--cert-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
}

.essay-drive-card__preview-frame--cert-pdf .cert-pdf-preview__canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 8px;
}

.essay-drive-card__preview-frame--cert-pdf .cert-pdf-preview__canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.essay-drive-card__preview-frame--cert-pdf-fallback .cert-pdf-preview__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #f1f5f9;
  pointer-events: none;
}

.essay-drive-card__preview-frame--cert-image {
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
}

.essay-drive-card__preview-frame--cert-image .cert-drive-card__thumb-img {
  background: transparent;
}

.cert-drive-item {
  min-width: 0;
  position: relative;
  z-index: 0;
}

/* One blue bar — same blue as page (--bg); inner <button>s reset so they don’t look like separate grey widgets */
.cert-drive-bar {
  width: 100%;
  min-height: 72px;
  padding: 16px 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background-color: var(--bg);
  background-image: none;
  color: #ffffff;
  border: none;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(61, 123, 245, 0.35);
  overflow: visible;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  will-change: transform;
}

.cert-drive-bar:hover {
  background-color: var(--btn-primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(61, 123, 245, 0.4);
}

.cert-kebab-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Frosted square, three dots (matches header + chip style) */
.cert-kebab-btn {
  margin: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
}

.cert-kebab-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.cert-kebab-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.38);
}

.cert-kebab-btn:focus-visible {
  outline: 2px solid #fefefe;
  outline-offset: 2px;
}

.cert-kebab-icon {
  display: block;
  flex-shrink: 0;
}

.cert-drive-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  z-index: 60;
  min-width: 180px;
  padding: 6px 0;
  margin: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.cert-drive-dropdown[hidden] {
  display: none !important;
}

.cert-menu-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  color: #0f172a;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s ease;
}

.cert-menu-item:hover,
.cert-menu-item:focus-visible {
  background: #f1f5f9;
  outline: none;
}

a.cert-menu-dl {
  color: var(--accent-on-soft);
}

.cert-menu-rename {
  border-top: 1px solid #f1f5f9;
  color: #0f172a;
}

.cert-menu-del {
  color: #9f1239;
  border-top: 1px solid #f1f5f9;
}

.cert-menu-del:hover {
  background: #fff1f2;
}

/* Title on the left — white on blue */
.cert-open-btn {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-color: transparent;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: left;
  transition: opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.cert-open-btn:hover {
  opacity: 0.92;
}

.cert-open-btn:focus-visible {
  outline: 2px solid #fefefe;
  outline-offset: 4px;
  border-radius: 8px;
}

.cert-drive-label {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  text-align: left;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Full certificate modal */
.cert-viewer-dialog {
  width: min(96vw, 920px);
  max-height: min(92vh, 900px);
  padding: 0;
  border: none;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
}

.cert-viewer-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.cert-viewer-shell {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 900px);
}

.cert-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e7eef8;
  flex-shrink: 0;
}

.cert-viewer-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cert-viewer-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease;
}

.cert-viewer-close:hover {
  background: #e2e8f0;
}

.cert-viewer-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-viewer-img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: min(78vh, 820px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
}

.cert-viewer-frame {
  width: 100%;
  min-height: min(78vh, 820px);
  height: min(78vh, 820px);
  border: none;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
}

.cert-viewer-fallback {
  margin: 0;
  padding: 24px;
  text-align: center;
  font-weight: 600;
  color: #64748b;
}

.cert-rename-dialog {
  width: min(92vw, 420px);
  padding: 0;
  border: none;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
}

.cert-rename-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.cert-rename-form {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cert-rename-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.cert-rename-field {
  margin: 0;
}

.cert-rename-error {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #b45309;
  min-height: 1.25em;
}

.cert-rename-error[hidden] {
  display: none !important;
}

.cert-rename-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 2px;
}

.cert-rename-actions .btn {
  margin-top: 0;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-size: 1.1rem;
}

/* Minimal stroke icons in card headers (replaces emoji). */
.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: inherit;
}

.ui-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  shape-rendering: geometricPrecision;
}

.card-highlight {
  background: linear-gradient(170deg, #fefefe, #f0f6ff);
}

/* Landing page: keep all white cards on one visual gradient system. */
.page-landing .card {
  background: var(--box-gradient);
}

/* Shared "white box" style for reusable UI surfaces. */
.role-pick,
.country-pick,
.exam-detail-block,
.exam-target-row,
.exam-target-custom-row,
.stat,
.task-list li,
.profile-goals-item,
.exam-progress-item,
.college-my-list-item,
.counselor-meeting-request-card,
.cert-add-panel,
.profile-schedule-day,
.profile-schedule-time-btn {
  background: var(--box-gradient);
}

.profile-goals-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 230px);
  gap: clamp(16px, 3vw, 28px);
  align-items: start;
}

.profile-goals-left {
  min-width: 0;
}

.profile-goals-list {
  margin: 0;
  padding: 0;
  list-style: none;
  height: 170px;
  overflow-y: auto;
  padding-right: 4px;
}

.profile-goals-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: #f9fbff;
  border: 1px solid #e7eef8;
  border-radius: 12px;
  box-sizing: border-box;
}

.profile-goals-item:last-child {
  margin-bottom: 0;
}

.profile-goal-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--btn-primary);
  cursor: pointer;
}

.profile-goal-text {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding: 4px 0;
}

.profile-goal-text:focus {
  outline: none;
}

.profile-goal-text::placeholder {
  color: #94a3b8;
  font-weight: 600;
}

.profile-goal-delete {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 10px;
  background: #fefefe;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.profile-goal-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

.profile-goals-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.profile-goals-edit-btn {
  margin-top: 0 !important;
  padding: 8px 16px !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  min-width: 0 !important;
}

.profile-goal-text[readonly] {
  cursor: default;
  color: var(--text);
}

.profile-goal-text[readonly]:focus {
  box-shadow: none;
}

.profile-goals-add {
  margin-top: 12px !important;
  width: 100%;
  box-sizing: border-box;
}

.profile-goals-right {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 4px;
}

/* Gauge: percentage uses only --gauge-pct-top + absolute centering (independent of flex/margins) */
.profile-goals-gauge {
  --gauge-pct-top: 68%;
  position: relative;
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
}

.profile-goals-gauge-svg {
  width: 100%;
  height: auto;
  display: block;
}

.profile-goals-gauge-bg {
  stroke: #e2eaf8;
}

.profile-goals-gauge-fill {
  transition: stroke-dashoffset 0.35s ease;
}

.profile-goals-gauge-label {
  position: absolute;
  left: 50%;
  top: var(--gauge-pct-top);
  transform: translate(-50%, -50%);
  margin: 0;
  width: max-content;
  max-width: 90%;
  text-align: center;
  z-index: 1;
  pointer-events: none;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 800;
  color: #164572;
  letter-spacing: -0.02em;
}

@media (max-width: 720px) {
  .profile-goals-split {
    grid-template-columns: 1fr;
  }

  .profile-goals-right {
    padding-top: 8px;
  }
}

.progress-list,
.access-list,
.task-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-list li + li,
.access-list li + li,
.task-list li + li {
  margin-top: 12px;
}

.row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 5px;
}

.bar {
  background: #e2eaf8;
  border-radius: 999px;
  overflow: hidden;
  height: 9px;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--btn-primary), var(--blue-bright));
  border-radius: 999px;
}

.access-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.role {
  font-weight: 600;
}

.role-tag {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf2ff;
  color: #23498d;
  font-weight: 700;
}

.role-owner {
  background: #dbeafe;
  color: #1e40af;
}

.role-view {
  background: #fff5d8;
  color: #745900;
}

.task-list li {
  background: #f9fbff;
  border: 1px solid #e7eef8;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.exam-score-progress-card .exam-progress-empty {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}

a.exam-score-progress-card {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

a.exam-score-progress-card * {
  pointer-events: none;
}

a.exam-score-progress-card:hover {
  background: #f1f5f9;
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.12);
}

a.exam-score-progress-card:focus-visible {
  outline: 2px solid rgba(61, 123, 245, 0.65);
  outline-offset: 3px;
}

.exam-progress-overall {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px 22px;
  padding: 12px 0 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e7eef8;
}

.exam-progress-overall-circle {
  --overall-pct: 0%;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: conic-gradient(from -90deg, var(--btn-primary) var(--overall-pct), #e7eef8 0);
  display: grid;
  place-items: center;
  position: relative;
}

.exam-progress-overall-circle::before {
  content: "";
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: #fefefe;
  border: 1px solid #e2e8f0;
}

.exam-progress-overall-circle > span {
  position: absolute;
  font-size: 1.05rem;
  font-weight: 800;
  color: #174483;
}

.exam-progress-overall-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.exam-progress-overall-line {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid #e7eef8;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.exam-progress-overall-line strong {
  color: #174483;
  font-weight: 800;
}

/* Label on one line, count on the next (narrow card columns). */
.exam-progress-overall-stats .exam-progress-overall-line strong {
  display: block;
  margin-top: 4px;
  line-height: 1.15;
}

.exam-progress-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.exam-progress-list li + li {
  margin-top: 14px;
}

.exam-progress-item {
  background: #f9fbff;
  border: 1px solid #e7eef8;
  border-radius: 14px;
  padding: 12px 14px;
}

.exam-progress-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.exam-progress-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  min-width: 0;
  word-break: break-word;
}

.exam-progress-target {
  font-size: 0.82rem;
  font-weight: 700;
  color: #23498d;
  white-space: nowrap;
}

.exam-progress-current-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.exam-progress-current-label {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.exam-progress-input {
  flex: 1;
  min-width: 0;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fefefe;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.exam-progress-input:focus {
  outline: none;
  border-color: rgba(61, 123, 245, 0.55);
  box-shadow: 0 0 0 3px rgba(61, 123, 245, 0.12);
}

.exam-progress-bar {
  margin-bottom: 4px;
}

.exam-progress-bar span.is-indeterminate {
  background: linear-gradient(90deg, #cbd5e1, #e2e8f0);
  opacity: 0.85;
}

.exam-progress-pct {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.exam-progress-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.exam-targets-island-dialog {
  width: min(92vw, 480px);
  max-height: min(90vh, 720px);
  padding: 0;
  border: none;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
}

.exam-targets-island-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.exam-targets-island-inner {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 720px);
  padding: 0;
}

.exam-targets-island-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid #e7eef8;
  flex-shrink: 0;
}

.exam-targets-island-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  padding-right: 8px;
}

.exam-targets-island-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease;
}

.exam-targets-island-close:hover {
  background: #e2e8f0;
}

.exam-targets-island-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 18px 8px;
}

.exam-targets-island-msg {
  margin: 0 18px 8px;
}

.exam-targets-island-msg[hidden] {
  display: none !important;
}

.exam-targets-island-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid #e7eef8;
  flex-shrink: 0;
}

.exam-target-island-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 12px;
}

.exam-target-island-row-main {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exam-target-island-remove {
  flex: 0 0 auto;
  align-self: center;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.exam-targets-island-add {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed #cbd5e1;
}

.exam-targets-island-add-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.exam-targets-island-add-block {
  margin-bottom: 16px;
}

.exam-targets-island-add-block:last-child {
  margin-bottom: 0;
}

.exam-targets-island-add-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.exam-targets-island-add-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.exam-targets-island-add-row--wrap {
  align-items: stretch;
}

.exam-targets-island-select {
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 0.95rem;
  color: #0f172a;
}

.exam-targets-island-add-btn {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.exam-targets-island-add-note {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

@media (max-width: 760px) {
  .exam-progress-overall {
    grid-template-columns: 1fr;
  }

  .exam-progress-overall-circle {
    margin: 0 auto;
  }

  .exam-progress-overall-stats {
    grid-template-columns: 1fr;
  }
}

/* Registration — GPA roller (4.0 scale) */
.register-gpa-page .register-gpa-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  margin-bottom: 18px;
}

.register-gpa-page .register-gpa-header .auth-title {
  margin: 0;
}

.register-gpa-page .register-gpa-panel {
  margin: 8px 0 20px;
  padding: 20px 18px 22px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #f0f6ff 100%);
  border: 1px solid #e2eaf8;
}

.register-gpa-value-block {
  text-align: center;
  margin-bottom: 18px;
}

.register-gpa-value {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #174483;
  font-variant-numeric: tabular-nums;
}

.register-gpa-scale {
  margin-left: 6px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--muted);
}

.register-gpa-track-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.register-gpa-tick {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.register-gpa-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e1 50%, #94a3b8 100%);
  outline: none;
  touch-action: none;
  cursor: pointer;
}

.register-gpa-slider:focus-visible {
  box-shadow: 0 0 0 3px rgba(61, 123, 245, 0.25);
}

.register-gpa-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff 0%, #e8f0fe 45%, #3d7bf5 100%);
  border: 3px solid #1d4ed8;
  box-shadow:
    0 4px 14px rgba(37, 99, 235, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  cursor: grab;
}

.register-gpa-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
}

.register-gpa-slider::-moz-range-track {
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e1 50%, #94a3b8 100%);
}

.register-gpa-slider::-moz-range-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff 0%, #e8f0fe 45%, #3d7bf5 100%);
  border: 3px solid #1d4ed8;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  cursor: grab;
}

.register-gpa-track-wrap.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.register-gpa-unknown-row {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e2eaf8;
}

.register-gpa-unknown-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  line-height: 1.35;
}

.register-gpa-unknown-label input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  accent-color: var(--btn-primary, #3d7bf5);
}

.gpa-page-sections {
  display: grid;
  gap: 16px;
}

.gpa-block {
  border: 1px solid #e7eef8;
  background: #f8fbff;
  border-radius: 14px;
  padding: 14px;
}

.gpa-block h2 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.gpa-inline-value {
  margin: 0 0 12px;
  font-size: 0.98rem;
  color: var(--muted);
}

.gpa-inline-value strong {
  color: #174483;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.gpa-page-unknown {
  margin-top: 12px;
}

.gpa-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.gpa-save-row .btn {
  margin-top: 0;
}

.gpa-calculator-card {
  margin-top: 16px;
}

.gpa-calculator-card__title {
  margin: 0 0 12px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
}

.gpa-calculator-dialog {
  width: min(94vw, 520px);
  padding: 0;
  border: none;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
}

.gpa-calculator-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.gpa-calculator-form {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gpa-calculator-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.gpa-calc-table-wrap {
  display: block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.gpa-calc-table {
  /* Shrink to column contents — avoids stretching cells across the full card width */
  width: max-content;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  table-layout: auto;
}

.gpa-calc-table th,
.gpa-calc-table td {
  padding: 8px 8px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  width: auto;
}

.gpa-calc-table th {
  font-weight: 700;
  color: #334155;
  background: #f1f5f9;
}

.gpa-calc-table tbody tr:last-child td {
  border-bottom: none;
}

.gpa-calc-table th:last-child,
.gpa-calc-table td:last-child {
  width: 2.75rem;
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
  white-space: nowrap;
}

.gpa-calc-table th:nth-child(2),
.gpa-calc-table td:nth-child(2),
.gpa-calc-table th:nth-child(3),
.gpa-calc-table td:nth-child(3) {
  white-space: nowrap;
}

.gpa-calc-name {
  min-width: 7rem;
  max-width: 14rem;
  width: 10rem;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}

.gpa-calc-grade,
.gpa-calc-credits {
  width: auto;
  min-width: 5.75rem;
  max-width: 7rem;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}

.gpa-calc-credits {
  min-width: 3.25rem;
  max-width: 5rem;
}

.gpa-calc-remove {
  margin-top: 0;
  min-width: 40px;
  padding: 6px 10px;
  font-size: 1.1rem;
  line-height: 1;
}

.gpa-calc-add {
  margin-top: 0;
  align-self: flex-start;
}

.gpa-calculator-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

.gpa-calculator-controls .gpa-calculator-actions {
  margin-top: 0;
}

.gpa-calc-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.35em 0.65em;
  margin: 12px 0 0;
  width: 100%;
  box-sizing: border-box;
}

.gpa-calc-result__label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
}

.gpa-calc-result__label::after {
  content: ":";
}

.gpa-calc-result__value {
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.gpa-calculator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  margin-top: 2px;
}

.gpa-calculator-actions .btn {
  margin-top: 0;
}

.gpa-transcript-pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gpa-transcript-picked-name {
  font-size: 0.9rem;
  color: var(--muted);
}

.gpa-transcript-actions {
  margin-top: 8px;
}

.gpa-transcript-list-wrap {
  border-top: none;
  padding-top: 0;
  margin-top: 8px;
}

.gpa-transcript-current {
  margin-top: 14px;
  border-top: 1px solid #e7eef8;
  padding-top: 12px;
}

.gpa-transcript-current p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #174483;
}

.gpa-transcript-current-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

input[type="checkbox"] {
  accent-color: var(--btn-primary);
  width: 16px;
  height: 16px;
}

.btn {
  margin-top: 16px;
  background: var(--btn-primary);
  color: #fefefe;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  will-change: transform;
}

.btn:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-3px);
}

.btn-secondary {
  background: #eff6ff;
  color: #174483;
}

.btn-secondary:hover {
  background: #dcecff;
}

.btn-hero {
  margin-top: 0;
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: 14px;
}

.card-accent {
  background: linear-gradient(170deg, #fffdf5, #fefefe);
}

.goal-school {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.goal-ring {
  width: 140px;
  height: 140px;
  margin: 14px auto 0;
  border-radius: 50%;
  background: conic-gradient(var(--blue) 0deg 260deg, #e8eef4 260deg 360deg);
  display: grid;
  place-items: center;
}

.ring-inner {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fefefe;
  font-size: 1.4rem;
  font-weight: 800;
  color: #164572;
}

.message {
  min-height: 1.25em;
  margin-top: 12px;
  color: #1d4ed8;
  font-weight: 600;
}

@media (max-width: 900px) {
  .app-shell--with-sidebar {
    width: min(1120px, 92vw);
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    position: static;
    top: auto;
    max-height: none;
  }

  /* Avoid flex-basis/overflow collapse: without a fixed sidebar height, body was 0px tall on mobile. */
  .profile-sidebar-body {
    flex: 0 1 auto;
    overflow: visible;
    min-height: auto;
  }

  .profile-sidebar-brand {
    align-items: center;
  }

  .profile-sidebar-nav {
    flex: 0 0 auto;
    overflow-y: visible;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-header {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    grid-template-columns: 1fr 1fr;
  }

  .profile-gpa-stat,
  .profile-exams-month-stat,
  .profile-deadlines-month-stat {
    grid-column: auto;
    grid-row: auto;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .profile-grid-top-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .calendar-add-row {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 6px;
  }

  .calendar-day-btn,
  .calendar-cell--empty {
    min-height: 64px;
  }

  .profile-sidebar-nav {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }
}

/* ——— Counselor dashboard ——— */
.counselor-page {
  width: 100%;
  margin: 0;
  padding: 12px 0 56px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.counselor-header {
  padding: 22px 24px;
}

.counselor-msg {
  margin: 0;
  min-height: 0;
}

.counselor-msg:empty {
  display: none;
}

.counselor-roster {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.counselor-class-card {
  padding: 20px 22px;
}

.counselor-class-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.counselor-class-head h2 {
  margin: 0;
  font-size: 1.12rem;
}

.counselor-class-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.counselor-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.counselor-roster-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.counselor-roster-table th,
.counselor-roster-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.counselor-roster-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 800;
}

.counselor-roster-table tbody tr:hover {
  background: rgba(241, 245, 249, 0.65);
}

.counselor-mono {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
}

.counselor-row-action {
  white-space: nowrap;
}

.counselor-profile-link {
  padding: 6px 12px;
  font-size: 0.82rem;
  text-decoration: none;
  display: inline-block;
}

.counselor-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: #f1f5f9;
  color: #64748b;
}

.counselor-pill--ok {
  background: #dcfce7;
  color: #166534;
}

.counselor-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.counselor-student-nav {
  margin-left: 60px;
  margin-bottom: 8px;
}

.counselor-back-link {
  font-weight: 700;
}

/* ── Student view redesign ─────────────────────────────────────────────────── */

.sv-header-card {
  padding: 28px 32px;
  margin-bottom: 0;
}

.sv-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.sv-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sv-name {
  margin: 4px 0 2px;
  font-size: 1.5rem;
}

.sv-email {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.sv-header-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sv-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--box-gradient);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 12px 20px;
  min-width: 90px;
  text-align: center;
}

.sv-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.sv-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.sv-body-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
  gap: 10px;
}

.sv-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sv-section {
  padding: 22px 24px;
}

.sv-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

/* Academic profile rows */
.sv-row {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.9rem;
  align-items: baseline;
}

.sv-row:last-child {
  border-bottom: none;
}

.sv-row-label {
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  width: 150px;
}

.sv-row-value {
  color: var(--muted);
  flex: 1;
  min-width: 0;
}

/* Exam target rows */
.sv-target-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin-bottom: 6px;
  background: var(--box-gradient);
  border: 1px solid #e7eef8;
  border-radius: 10px;
  font-size: 0.88rem;
}

.sv-target-row:last-child {
  margin-bottom: 0;
}

.sv-target-name {
  font-weight: 600;
  color: var(--text);
}

.sv-target-score {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.sv-target-score strong {
  color: var(--btn-primary);
}

/* Score progress items */
.sv-progress-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.sv-progress-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sv-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.sv-progress-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.sv-progress-scores {
  font-size: 0.82rem;
  white-space: nowrap;
}

.sv-progress-current {
  font-weight: 800;
  color: var(--btn-primary);
}

.sv-progress-sep {
  margin: 0 3px;
  color: var(--muted);
}

.sv-progress-target {
  color: var(--muted);
}

.sv-bar {
  height: 7px;
  border-radius: 99px;
  margin-bottom: 4px;
}

.sv-progress-pct {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.sv-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

@media (max-width: 860px) {
  .sv-body-grid {
    grid-template-columns: 1fr;
  }
  .sv-header-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

.counselor-student-card {
  padding: 24px;
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
}

.counselor-student-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.counselor-student-avatar-ring {
  flex-shrink: 0;
}

.counselor-student-name {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

.counselor-student-meta {
  padding: 16px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 0.92rem;
  line-height: 1.6;
}

.counselor-student-meta p {
  margin: 0 0 8px;
}

.counselor-student-meta p:last-child {
  margin-bottom: 0;
}

.counselor-student-reg {
  margin-top: 20px;
}

.counselor-reg-title {
  margin: 0 0 12px;
  font-size: 1rem;
}

.counselor-reg-list {
  margin: 0;
  padding-left: 20px;
  color: #334155;
  line-height: 1.55;
}

.counselor-reg-list li {
  margin-bottom: 8px;
}

.counselor-reg-note {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.counselor-reg-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

/* Counselor: weekly availability */
.counselor-availability-card {
  padding: 20px 22px;
}

.counselor-availability-head {
  margin-bottom: 8px;
}

.counselor-availability-lead {
  margin: 0 0 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}

.counselor-availability-body {
  margin-top: 4px;
}

.counselor-cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 14px;
}

.counselor-cal-range {
  margin: 0;
  flex: 1;
  min-width: 160px;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.counselor-cal-nav-btn {
  padding: 8px 14px;
  min-width: 44px;
  font-size: 1.15rem;
  line-height: 1;
}

.counselor-cal-today {
  margin-left: auto;
}

@media (max-width: 560px) {
  .counselor-cal-today {
    margin-left: 0;
    width: 100%;
  }
}

/* Google Calendar–style week grid */
.counselor-cal-shell {
  border: 1px solid rgba(218, 220, 224, 0.95);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.12);
  user-select: none;
}

.counselor-cal-scroll {
  overflow: auto;
  max-height: min(72vh, 720px);
  -webkit-overflow-scrolling: touch;
}

.counselor-cal-main-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-width: min(720px, 100%);
}

.counselor-cal-gutter {
  flex: 0 0 52px;
  border-right: 1px solid rgba(218, 220, 224, 0.95);
  background: #fafafa;
  user-select: none;
}

.counselor-cal-gutter-head {
  box-sizing: border-box;
  border-bottom: 1px solid rgba(218, 220, 224, 0.95);
}

.counselor-cal-gutter-hour {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 2px 8px 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #70757a;
  border-bottom: 1px solid rgba(218, 220, 224, 0.85);
}

.counselor-cal-days {
  display: flex;
  flex: 1;
  min-width: 0;
}

.counselor-cal-day-col {
  flex: 1;
  min-width: 0;
  border-right: 1px solid rgba(218, 220, 224, 0.95);
  display: flex;
  flex-direction: column;
}

.counselor-cal-day-col:last-child {
  border-right: none;
}

.counselor-cal-day-head {
  box-sizing: border-box;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-bottom: 1px solid rgba(218, 220, 224, 0.95);
  background: #fff;
  padding: 4px;
}

.counselor-cal-day-name {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #70757a;
}

.counselor-cal-day-num {
  font-size: 1.35rem;
  font-weight: 400;
  color: #3c4043;
  line-height: 1;
}

.counselor-cal-day-head--today .counselor-cal-day-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  font-weight: 600;
}

.counselor-cal-slots {
  display: flex;
  flex-direction: column;
  background: #fff;
}

.counselor-cal-slot {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin: 0;
  padding: 0 4px;
  border: none;
  border-bottom: 1px solid rgba(218, 220, 224, 0.65);
  border-left: 1px solid transparent;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.06s ease;
  touch-action: none;
}

.counselor-cal-slot--hour {
  border-top: 1px solid rgba(218, 220, 224, 0.95);
}

.counselor-cal-slot:hover {
  background: rgba(26, 115, 232, 0.06);
}

.counselor-cal-slot.is-free {
  background: rgba(26, 115, 232, 0.22);
  box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.35);
}

.counselor-cal-slot.is-free:hover {
  background: rgba(26, 115, 232, 0.3);
}

.counselor-cal-slot.is-meeting {
  cursor: default;
}

.counselor-cal-slot.is-meeting-confirmed {
  background: rgba(16, 185, 129, 0.25);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.45);
}

.counselor-cal-slot.is-meeting-pending {
  background: rgba(245, 158, 11, 0.28);
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.5);
}

.counselor-cal-slot.is-meeting:hover {
  background: inherit;
}

.counselor-cal-slot.is-meeting-confirmed:hover {
  background: rgba(16, 185, 129, 0.3);
}

.counselor-cal-slot.is-meeting-pending:hover {
  background: rgba(245, 158, 11, 0.34);
}

.counselor-cal-slot-meeting-text {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.05;
  color: #0f172a;
}

.counselor-cal-slot:focus-visible {
  outline: 2px solid rgba(26, 115, 232, 0.7);
  outline-offset: -2px;
  z-index: 1;
}

.counselor-availability-foot-msg {
  margin: 16px 0 0;
  min-height: 0;
  font-size: 0.88rem;
}

.counselor-availability-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ——— Admin dashboard ——— */
.admin-page {
  width: min(720px, 92vw);
  margin: 0 auto;
  padding: 28px 0 56px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.admin-header {
  padding: 22px 24px;
}

.admin-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}

.admin-title {
  margin: 0 0 6px;
}

.admin-lead {
  margin: 0;
  max-width: 36rem;
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.admin-header-btn {
  margin: 0;
}

.admin-add-user {
  padding: 24px 26px 28px;
}

.admin-section-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}

.admin-hint {
  margin: 0 0 18px;
}

.admin-form {
  margin-top: 4px;
}

.admin-role-fieldset {
  border: 1px solid var(--accent-soft-border);
  border-radius: 14px;
  padding: 14px 16px 16px;
  margin: 0;
  background: var(--surface-tint);
}

.admin-role-legend {
  padding: 0 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.admin-role-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 6px;
}

.admin-role-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

.admin-student-block,
.admin-counselor-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--accent-soft-border);
}

/* `display: flex` above would override the UA `[hidden]` rule — keep blocks actually hidden. */
.admin-student-block[hidden],
.admin-counselor-block[hidden] {
  display: none;
}

.admin-student-hint {
  margin-top: 6px;
}

.admin-refresh-classes {
  margin-top: 12px;
  align-self: flex-start;
}

.admin-counselor-classes-field .fake-label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--text);
}

.admin-class-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.admin-class-cb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

.admin-micro-hint {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.admin-actions {
  margin-top: 18px;
}

@media (max-width: 520px) {
  .admin-header-inner {
    flex-direction: column;
  }
}

/*
  Exam subject modal — repeated at file end so these always override generic .btn
  (and so a cached old style.css sheet is less likely to hide updates when combined with ?v= on the link).
*/
footer.exam-detail-dialog-foot .btn {
  margin-top: 0 !important;
  padding: 16px 40px !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  border-radius: 14px !important;
  min-width: 140px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

footer.exam-detail-dialog-foot .btn.btn-secondary {
  background: #eff6ff !important;
  color: #174483 !important;
  border: 1px solid rgba(61, 123, 245, 0.35) !important;
}

footer.exam-detail-dialog-foot .btn.btn-secondary:hover {
  background: #dcecff !important;
}

/* Front page design merge from style1.css */
.site-nav-links {
  margin: 0 0 0 auto;
}

.btn-nav-cta {
  margin-top: 0;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(61, 123, 245, 0.32);
}

.landing-hero-proto {
  position: relative;
  overflow: hidden;
  min-height: min(640px, 78vh);
  padding: clamp(22px, 3.5vw, 34px);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
}

.landing-hero-proto-bg {
  position: absolute;
  inset: -40px;
  background:
    radial-gradient(900px 520px at 50% 86%, rgba(61, 123, 245, 0.22), transparent 60%),
    radial-gradient(760px 520px at 8% 18%, rgba(37, 99, 235, 0.22), transparent 62%),
    radial-gradient(720px 520px at 92% 16%, rgba(96, 165, 250, 0.18), transparent 62%),
    radial-gradient(520px 360px at 88% 88%, rgba(61, 123, 245, 0.2), transparent 68%);
  filter: blur(0.2px);
  z-index: 0;
}

.landing-hero-proto-center {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: min(860px, 92%);
  padding: clamp(8px, 1vw, 14px) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.landing-hero-proto-headline {
  margin: 0;
  font-size: clamp(2.05rem, 4.4vw, 3.25rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.proto-accent {
  color: var(--btn-primary);
}

.landing-hero-proto-sub {
  margin: 0;
  max-width: 64ch;
  font-size: 14px;
  font-weight: 700;
  color: rgba(51, 65, 85, 0.75);
  line-height: 1.55;
}

.btn-hero-proto {
  margin-top: 6px;
  padding: 20px 56px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(124, 189, 255, 0.88) 0%, rgba(61, 123, 245, 0.82) 52%, rgba(36, 99, 235, 0.88) 100%);
  border: 1px solid rgba(191, 225, 255, 0.85);
  box-shadow:
    0 22px 52px rgba(37, 99, 235, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -10px 18px rgba(29, 78, 216, 0.34);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
}

.btn-hero-proto:hover {
  background: linear-gradient(180deg, rgba(140, 201, 255, 0.9) 0%, rgba(61, 123, 245, 0.86) 52%, rgba(29, 78, 216, 0.9) 100%);
  box-shadow:
    0 28px 62px rgba(37, 99, 235, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -10px 18px rgba(29, 78, 216, 0.38);
}

.landing-hero-proto-icons {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.proto-icon {
  position: absolute;
  width: 64px;
  height: 64px;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  background: transparent;
  border: none;
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.14);
  transform: rotate(-10deg);
}

.proto-icon--ap {
  left: 10%;
  top: 28%;
  transform: rotate(-14deg);
}

.proto-icon--sat {
  left: 16%;
  top: 52%;
  transform: rotate(10deg);
}

.proto-icon--ielts {
  left: 8%;
  top: 66%;
  transform: rotate(-6deg);
}

.proto-icon--ib {
  right: 11%;
  top: 30%;
  transform: rotate(12deg);
}

.proto-icon--cambridge {
  right: 17%;
  top: 53%;
  transform: rotate(-10deg);
}

.proto-icon--ent {
  right: 9%;
  top: 67%;
  transform: rotate(8deg);
}

.landing-hero-proto-folders {
  position: relative;
  z-index: 2;
  width: min(980px, 96%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2.2vw, 24px);
  align-items: end;
  padding: 10px 0 2px;
}

.proto-folder {
  position: relative;
  isolation: isolate;
  border-radius: 22px;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 20px 18px 16px;
  transform-origin: center bottom;
}

.proto-folder::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(96, 202, 252, 0.58) 0%, rgba(61, 123, 245, 0.44) 100%);
  border: none;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px) saturate(130%);
  z-index: 1;
}

.proto-folder::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 72px;
  bottom: 0;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(180deg, rgba(96, 201, 255, 0.44) 0%, rgba(61, 123, 245, 0.34) 100%);
  border: 1px solid rgba(178, 232, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(7px) saturate(130%);
  z-index: 4;
  pointer-events: none;
}

.proto-folder-tab {
  position: absolute;
  left: 8px;
  top: -15px;
  width: 84px;
  height: 22px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, rgba(96, 202, 252, 0.58) 0%, rgba(61, 123, 245, 0.44) 100%);
  border: none;
  box-shadow: none;
  backdrop-filter: blur(6px) saturate(130%);
  z-index: 0;
}

.proto-folder-tab::after {
  content: none;
}

.proto-folder--red {
  transform: translateY(12px) rotate(-4deg);
}

.proto-folder--purple {
  transform: translateY(0) rotate(1deg);
  border-color: rgba(124, 58, 237, 0.25);
}

.proto-folder--blue {
  transform: translateY(18px) rotate(4deg);
}

.proto-folder-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.proto-folder-dot {
  width: 11px;
  height: 11px;
  border-radius: 6px;
  background: var(--btn-primary);
  box-shadow: 0 8px 22px rgba(61, 123, 245, 0.35);
}

.proto-folder--red .proto-folder-dot {
  background: #fb7185;
  box-shadow: 0 8px 22px rgba(251, 113, 133, 0.26);
}

.proto-folder--purple .proto-folder-dot {
  background: #8b5cf6;
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.26);
}

.proto-folder--blue .proto-folder-dot {
  background: #3d7bf5;
  box-shadow: 0 8px 22px rgba(61, 123, 245, 0.3);
}

.proto-folder-title {
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.proto-folder-list {
  position: relative;
  z-index: 3;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  transform: translateY(-8px);
}

.proto-folder-list li {
  font-size: 13px;
  font-weight: 700;
  color: rgba(51, 65, 85, 0.9);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

@media (max-width: 720px) {
  .landing-hero-proto {
    min-height: auto;
    grid-template-rows: auto auto;
  }

  .landing-hero-proto-folders {
    grid-template-columns: 1fr;
  }

  .proto-folder--red,
  .proto-folder--purple,
  .proto-folder--blue {
    transform: none;
  }

  .proto-icon {
    width: 54px;
    height: 54px;
  }
}

/* ── Student-view tab bar ─────────────────────────────────────────────────── */

.sv-tab-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.sv-tab-btn {
  padding: 9px 18px;
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.sv-tab-btn:hover {
  background: var(--box-gradient-hover);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.4);
}

.sv-tab-btn.is-active {
  background: var(--btn-primary);
  color: #fff;
  border-color: var(--btn-primary);
}

.sv-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Transcript file row */
.sv-transcript-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--box-gradient);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  font-size: 0.9rem;
}

.sv-transcript-name {
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sv-transcript-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.sv-btn-sm {
  display: inline-block;
  padding: 5px 13px;
  border: 1px solid var(--btn-primary);
  border-radius: 8px;
  background: transparent;
  color: var(--btn-primary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.sv-btn-sm:hover {
  background: var(--btn-primary);
  color: #fff;
}

.sv-transcript-preview-img {
  display: block;
  max-width: 100%;
  margin-top: 14px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.sv-transcript-preview-frame {
  display: block;
  width: 100%;
  height: 520px;
  margin-top: 14px;
  border: none;
  border-radius: 8px;
}

/* Certificate list */
.sv-cert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sv-cert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--box-gradient);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  font-size: 0.9rem;
}

.sv-cert-name {
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Essays list */
.sv-essay-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sv-essay-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--box-gradient);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  font-size: 0.9rem;
}

.sv-essay-title {
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.sv-essay-link {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--btn-primary);
  border-radius: 8px;
  color: var(--btn-primary);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.sv-essay-link:hover {
  background: var(--btn-primary);
  color: #fff;
}

/* College list table */
.sv-college-count {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.sv-college-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.sv-college-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.sv-college-table th {
  text-align: left;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 2px solid rgba(148, 163, 184, 0.2);
  white-space: nowrap;
  background: var(--surface-tint);
}

.sv-college-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: middle;
}

.sv-college-table tbody tr:last-child td {
  border-bottom: none;
}

.sv-college-table tbody tr:hover td {
  background: var(--box-gradient);
}

.sv-college-cat {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
}

.sv-college-cat--dream  { background: #fce7f3; color: #9d174d; }
.sv-college-cat--reach  { background: #fee2e2; color: #991b1b; }
.sv-college-cat--target { background: #fef3c7; color: #92400e; }
.sv-college-cat--safety { background: #d1fae5; color: #065f46; }

@media (max-width: 520px) {
  .sv-tab-btn {
    flex: 1 1 auto;
    font-size: 0.82rem;
    padding: 8px 10px;
  }
}

/* ── Student view v2 (counselor) ─────────────────────────────────────────── */

body.page-student-view .app-shell--student-view {
  width: min(1400px, 96vw);
}

body.page-student-view #studentViewMsg {
  margin: 0 0 12px;
}

body.page-student-view .profile-sidebar-link {
  text-decoration: none;
}

.sv2-header-card {
  margin-bottom: 16px;
}

.sv2-quick-stats {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.sv2-stat {
  min-width: 0;
  padding: 10px 12px;
}

.sv2-stat .stat-value {
  font-size: 1.2rem;
  line-height: 1.15;
}

.sv2-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.sv2-grid > .card {
  height: 100%;
}

.sv2-grid-span-2 {
  grid-column: 1 / -1;
}

.sv2-stack {
  display: grid;
  gap: 14px;
}

.sv2-subheading {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #174483;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

body.page-student-view .sv-body-grid {
  margin-top: 0;
}

body.page-student-view .sv-section {
  padding: 18px;
}

.sv2-main-panel {
  min-height: 520px;
}

.sv2-panel {
  width: 100%;
}

.sv2-panel[hidden] {
  display: none !important;
}

body.page-student-view .sv-nav-btn {
  width: 100%;
}

/* Counselor: student turned off sharing — full panel, eye-off + message */
.sv-share-blocked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 280px;
  padding: 32px 20px;
  box-sizing: border-box;
  color: #475569;
}

.sv-share-blocked-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #64748b;
}

.sv-share-blocked-icon svg {
  display: block;
}

.sv-share-blocked-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  font-style: normal;
}

.sv-share-blocked-text {
  margin: 0;
  max-width: 22rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #64748b;
  font-style: normal;
}

#svPanelGpa:has(.sv-share-blocked) #svTranscriptHeading,
#svPanelExam:has(.sv-share-blocked) #svProgressHeading {
  display: none;
}

body.page-student-view .sv-transcript-preview-frame {
  height: min(56vh, 460px);
}

@media (max-width: 1200px) {
  .sv2-quick-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  body.page-student-view .app-shell--student-view {
    width: min(1180px, 94vw);
  }

  .sv2-grid {
    grid-template-columns: 1fr;
  }

  .sv2-grid-span-2 {
    grid-column: auto;
  }

  .sv2-quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .sv2-quick-stats {
    grid-template-columns: 1fr;
  }
}

/* ── Edit Profile page ─────────────────────────────────── */
.edit-profile-page-header {
  margin-bottom: 12px;
}

@media (min-width: 901px) {
  body.page-edit-profile .profile-content {
    margin-top: -10px;
  }
}

.edit-profile-footer .edit-profile-save-btn.btn.details-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edit-profile-page-message {
  margin: 10px 0 0;
  width: 100%;
  text-align: left;
}

.edit-profile-page-message:empty {
  display: none;
}

.edit-profile-card {
  margin-bottom: 18px;
}

.edit-profile-card-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2eaf8;
}

.edit-profile-card-title {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}

.edit-profile-photo-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.edit-profile-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.edit-profile-photo-btn {
  font-size: 0.9rem;
  padding: 10px 16px;
}

.edit-profile-readonly input[type="text"],
.edit-profile-readonly input[type="email"] {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8fafc;
}

.edit-profile-locked-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.edit-profile-locked-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.edit-profile-pick-grid {
  margin-top: 0;
}

.country-other-wrap {
  margin-top: 16px;
  max-width: 28rem;
}

.country-other-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.country-other-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--accent-soft-border);
  font: inherit;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
}

/* Country search (Others) — bar only inside tinted panel */
.country-others-panel {
  margin-top: 1.25rem;
  width: 100%;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
.country-others-panel--embedded {
  margin-top: 1rem;
  max-width: none;
}
.country-others-panel-inner {
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(61, 123, 245, 0.06), rgba(96, 165, 250, 0.04));
  border: 1px solid var(--accent-soft-border);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}
.country-search-wrap {
  position: relative;
  margin: 0;
  width: 100%;
}
.country-search-input {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--accent-soft-border);
  font: inherit;
  font-size: 1.08rem;
  line-height: 1.35;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.country-search-input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
.country-search-input:hover {
  border-color: rgba(61, 123, 245, 0.45);
}
.country-search-input:focus {
  outline: none;
  border-color: var(--btn-primary);
  box-shadow: 0 0 0 3px rgba(61, 123, 245, 0.2);
}
.country-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--accent-soft-border);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}
.country-search-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text);
  transition: background 0.1s ease;
}
.country-search-option:hover,
.country-search-option.is-active {
  background: rgba(61, 123, 245, 0.1);
}
.country-search-option-flag {
  font-size: 1.35rem;
  line-height: 1;
}
.country-search-option-name {
  flex: 1;
  min-width: 0;
}
.country-extra-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}
.country-extra-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--accent-soft-border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.country-extra-chip-flag {
  font-size: 1.2rem;
  line-height: 1;
}
.country-extra-chip-label {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.country-extra-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0 -2px 0 2px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.country-extra-chip-remove:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.edit-profile-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
  margin-bottom: 32px;
}

@media (max-width: 520px) {
  .edit-profile-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .edit-profile-footer .edit-profile-save-btn.btn.details-next {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* University plans (register-university-interest.html + edit-profile.html) */
.uni-interest-page.country-select-page .role-select-heading {
  margin-bottom: clamp(1.25rem, 4vw, 2rem);
}

.uni-form-surface {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto 1.25rem;
  padding: 1.85rem 1.65rem 1.65rem;
  text-align: left;
  border-radius: 20px;
  background: var(--box-gradient);
  border: 1px solid var(--surface-tint-border);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 12px 40px rgba(21, 48, 34, 0.07);
}

.edit-profile-card .uni-unknown-panel--edit-profile:not([hidden]) {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(61, 123, 245, 0.12);
}

.edit-profile-card .uni-unknown-panel-sub {
  margin: 0 0 1rem;
  max-width: none;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.uni-general-block[hidden],
.uni-major-block[hidden] {
  display: none !important;
}

.uni-panel {
  margin-top: 0;
  width: 100%;
}

.uni-panel[hidden] {
  display: none !important;
}

.uni-field {
  margin-bottom: 1.45rem;
}

.uni-field:last-of-type {
  margin-bottom: 0;
}

.uni-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
  color: var(--muted);
}

.uni-field select,
.uni-field input[type="text"] {
  width: 100%;
  max-width: none;
  min-height: 62px;
  padding: 0.85rem 3.1rem 0.85rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--accent-soft-border);
  font: inherit;
  font-size: 1.12rem;
  font-weight: 600;
  background-color: #fff;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(21, 48, 34, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%2361726a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.28rem;
}

.uni-field input[type="text"] {
  background-image: none;
  padding-left: 1.2rem;
  padding-right: 1.2rem;
  font-weight: 500;
}

.uni-field select:hover:not(:disabled) {
  border-color: rgba(61, 123, 245, 0.45);
}

.uni-field select:focus,
.uni-field input[type="text"]:focus {
  outline: none;
  border-color: var(--btn-primary);
  box-shadow: 0 0 0 3px rgba(61, 123, 245, 0.22);
}

.uni-field select:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  background-color: #f4f7fb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.uni-dunno-wrap {
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(61, 123, 245, 0.12);
}

.uni-unknown-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(61, 123, 245, 0.07), rgba(96, 165, 250, 0.05));
  border: 1px dashed rgba(61, 123, 245, 0.35);
  font-size: 1rem;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.uni-unknown-row:hover {
  border-color: rgba(61, 123, 245, 0.5);
  background: linear-gradient(135deg, rgba(61, 123, 245, 0.1), rgba(96, 165, 250, 0.06));
}

.uni-unknown-row input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin: 2px 0 0;
  flex-shrink: 0;
  border-radius: 6px;
  border: 2px solid var(--accent-soft-border);
  background: #fff;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
}

.uni-unknown-row input[type="checkbox"]:checked {
  background-color: var(--btn-primary);
  border-color: var(--btn-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6l2.5 2.5L9.5 3.5'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.uni-unknown-row input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--btn-primary);
  outline-offset: 2px;
}

.uni-unknown-row label {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
  line-height: 1.35;
  padding-top: 1px;
}

.uni-unknown-surface {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.85rem 1.65rem 1.75rem;
  text-align: left;
  border-radius: 20px;
  background: var(--box-gradient);
  border: 1px solid var(--surface-tint-border);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 12px 40px rgba(21, 48, 34, 0.07);
}

.uni-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.uni-unknown-surface .country-select-sub {
  margin: 0 0 1rem !important;
  max-width: none !important;
  text-align: left !important;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.uni-core-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  max-width: none;
}

.uni-core-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0.45rem 0.85rem 0.45rem 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  border-radius: 999px;
  border: 1px solid var(--accent-soft-border);
  background: #fff;
  color: var(--text);
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.uni-core-item:hover {
  border-color: rgba(61, 123, 245, 0.45);
}

.uni-core-item:has(input:checked) {
  border-color: var(--btn-primary);
  background: rgba(61, 123, 245, 0.1);
  box-shadow: 0 0 0 1px rgba(61, 123, 245, 0.18);
  color: var(--accent-on-soft);
}

.uni-core-item input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--btn-primary);
  cursor: pointer;
}

.uni-error {
  color: #b91c1c;
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0.75rem auto 0;
  max-width: 42rem;
  min-height: 1.35rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: rgba(185, 28, 28, 0.06);
}

.edit-profile-card .uni-error {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

.uni-error:empty {
  padding: 0;
  min-height: 0;
  background: transparent;
}

@media (max-width: 520px) {
  .uni-form-surface,
  .uni-unknown-surface {
    padding: 1.2rem 1rem;
  }
}
