/* GLOBIS MBA PTOL 2026 Curriculum Tracker
   Palette lifted from the GLOBIS course-registration UI. */

:root {
  --brand:        #1b3e94;  /* GLOBIS wordmark blue */
  --primary:      #1d4ed8;  /* active step / links / checked boxes */
  --primary-dark: #1740b0;
  --band:         #edf1f8;  /* page-title + section bands */
  --band-2:       #f0f3f9;  /* quieter band */
  --surface:      #ffffff;
  --page:         #f7f9fc;
  --border:       #e2e8f0;
  --border-strong:#cbd5e1;
  --ink:          #1a1a1a;
  --ink-2:        #4a5568;
  --muted:        #8c939e;
  --danger:       #c02626;
  --radius:       8px;
  --shadow:       0 1px 2px rgba(16, 32, 72, .06), 0 4px 12px rgba(16, 32, 72, .06);
  --shadow-panel: -8px 0 28px rgba(16, 32, 72, .14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
          "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }

/* ---------- masthead ---------- */

.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.masthead-inner,
.page-band-inner,
.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.wordmark {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--brand);
  text-decoration: none;
  line-height: 1;
}

.page-band {
  background: var(--band);
  border-bottom: 1px solid var(--border);
}

.page-band-inner {
  padding-top: 18px;
  padding-bottom: 18px;
}

.page-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.page-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

.crumbs {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px 0;
  font-size: 12px;
  color: var(--muted);
}

.crumbs a { color: var(--muted); }

.crumbs span { margin: 0 6px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s ease;
}

.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn-ghost {
  color: var(--primary);
  background: var(--surface);
  border-color: var(--border-strong);
}

.btn-ghost:hover { background: var(--band); border-color: var(--primary); }

.btn-plus { font-size: 17px; line-height: 1; margin-top: -2px; }

/* ---------- toolbar ---------- */

.shell { padding-top: 22px; padding-bottom: 64px; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.stats { font-size: 13px; color: var(--ink-2); }

.stats strong { color: var(--ink); font-weight: 700; }

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
}

.pill-select {
  flex: 0 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.pill-select:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .13);
}

.pill-select > span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.pill-select select {
  padding: 9px 4px 9px 0;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  max-width: 220px;
}

.pill-select select:focus { outline: none; }

.search {
  position: relative;
  flex: 0 1 240px;
  min-width: 150px;
}

.search input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .13);
}

.search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

/* ---------- course groups + grid ---------- */

.group { margin-bottom: 26px; }

.group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 16px;
  background: var(--band);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}

.group-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
}

.group-count { font-size: 12px; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.course {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}

.course:hover {
  border-color: var(--primary);
  background: #fbfcff;
  box-shadow: var(--shadow);
}

.course:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .18);
}

.course.is-active {
  border-color: var(--primary);
  background: #f5f8ff;
}

.course-name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

.course-jp {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
}

.count {
  flex: none;
  min-width: 25px;
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: #e8eefc;
  border-radius: 11px;
}

.count.is-zero { color: var(--muted); background: #eef1f5; }

.empty-state {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ---------- overlay panel ---------- */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(16, 32, 72, .32);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 40;
}

.scrim.is-open { opacity: 1; pointer-events: auto; }

/* Keep the board still while the roster panel is open. */
body.panel-open { overflow: hidden; }

.panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  transform: translateX(100%);
  transition: transform .24s cubic-bezier(.4, 0, .2, 1);
  z-index: 50;
}

.panel.is-open { transform: translateX(0); }

.panel-head {
  position: relative;
  padding: 18px 20px 16px;
  background: var(--band);
  border-bottom: 1px solid var(--border);
}

.panel-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
}

.panel-title {
  margin: 5px 40px 0 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.panel-meta { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }

.panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 19px;
  line-height: 1;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.panel-close:hover { background: rgba(16, 32, 72, .08); }

.panel-body { flex: 1; overflow-y: auto; padding: 4px 0 24px; }

.roster-head {
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.roster-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 20px;
  font-size: 14px;
  border-bottom: 1px solid #f1f4f9;
}

.avatar {
  flex: none;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: #e8eefc;
  border-radius: 50%;
}

.roster-empty {
  padding: 44px 24px;
  text-align: center;
  color: var(--muted);
}

/* ---------- form page ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 16px; }

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--band-2);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-title { margin: 0; font-size: 14px; font-weight: 700; }

.card-hint { font-size: 12.5px; color: var(--ink-2); }

.card-body { padding: 20px; }

.field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.field-label label { margin-bottom: 0; }

/* ---------- tooltip ---------- */

.tip-wrap { position: relative; display: inline-flex; }

.info {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0;
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: var(--surface);
  background: var(--muted);
  border: 0;
  border-radius: 50%;
  cursor: help;
  transition: background .12s ease;
}

.info:hover, .info:focus-visible { background: var(--primary); outline: none; }

/* Beside the icon, so it never covers the name field the reader is filling in. */
.tip {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  z-index: 30;
  width: max-content;
  max-width: min(330px, calc(100vw - 260px));
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--surface);
  background: #24334f;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(16, 32, 72, .22);
  opacity: 0;
  visibility: hidden;
  transform: translate(-4px, -50%);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}

.tip::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  margin-top: -6px;
  border: 6px solid transparent;
  border-right-color: #24334f;
}

.tip-wrap:hover .tip,
.tip-wrap.is-open .tip,
.info:focus-visible + .tip {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

/* Too narrow to sit beside the label: drop it underneath instead. */
@media (max-width: 700px) {
  .tip {
    top: calc(100% + 9px);
    left: -7px;
    max-width: calc(100vw - 48px);
    transform: translate(0, -3px);
  }

  .tip::before {
    top: auto;
    bottom: 100%;
    right: auto;
    left: 10px;
    margin-top: 0;
    border-right-color: transparent;
    border-bottom-color: #24334f;
  }

  .tip-wrap:hover .tip,
  .tip-wrap.is-open .tip,
  .info:focus-visible + .tip { transform: translate(0, 0); }
}

.req { margin-left: 5px; font-size: 11px; font-weight: 700; color: var(--danger); }

.field input[type="text"] {
  width: 100%;
  max-width: 420px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.field input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .13);
}

.field input.is-invalid { border-color: var(--danger); }

.field-note { margin-top: 7px; font-size: 12.5px; color: var(--ink-2); }

.field-error { margin-top: 7px; font-size: 12.5px; font-weight: 600; color: var(--danger); }

.notice {
  margin-top: 10px;
  padding: 10px 13px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: #f5f8ff;
  border: 1px solid #d4e0fb;
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
}

.pick-group + .pick-group { margin-top: 20px; }

.pick-group-name {
  margin: 0 0 9px;
  padding-bottom: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand);
  border-bottom: 1px solid var(--border);
}

.picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2px 14px;
}

.pick {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.pick:hover { background: var(--band); }

/* Courses the student is already recorded on. Untick one to remove it. */
.pick.is-existing { background: #f5f8ff; }

.pick.is-existing span::after,
.pick.is-removing span::after {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pick.is-existing span::after {
  content: "already added";
  color: var(--primary);
}

.pick.is-removing { background: #fdf3f3; }

.pick.is-removing span {
  color: var(--danger);
  text-decoration: line-through;
  text-decoration-color: rgba(192, 38, 38, .45);
}

.pick.is-removing span::after {
  content: "will be removed";
  color: var(--danger);
  text-decoration: none;
}

.picked-count.has-removals { color: var(--danger); font-weight: 600; }

.pick input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.pick span { font-size: 13.5px; line-height: 1.4; }

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--band-2);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}

.picked-count { font-size: 13px; color: var(--ink-2); }

.done { padding: 44px 24px; text-align: center; }

.done-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
}

.done h2 { margin: 0 0 6px; font-size: 19px; }

.done p { margin: 0 0 20px; color: var(--ink-2); }

.loading { padding: 48px; text-align: center; color: var(--muted); }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 8px;
  padding: 24px 0 34px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 18px 30px;
}

.footer-col h3 {
  margin: 0 0 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.footer-col p,
.footer-base p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

.footer-base {
  margin-top: 18px;
  padding-top: 14px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-base p + p { margin-top: 5px; }

.site-footer a { color: var(--muted); }

@media (max-width: 640px) {
  .site-footer-inner { padding-left: 16px; padding-right: 16px; }
  .footer-cols { gap: 16px; }
}

@media (max-width: 640px) {
  .masthead-inner, .page-band-inner, .shell, .crumbs { padding-left: 16px; padding-right: 16px; }
  .grid { grid-template-columns: 1fr; }
  .filters { flex: 1 1 100%; flex-wrap: wrap; }
  .search { flex: 1 1 100%; }
  .pill-select { flex: 1 1 100%; }
  .pill-select select { flex: 1; max-width: none; }
}
