/* ===== Design tokens ===== */
:root {
  --navy: #012a55;
  --navy-light: #1d4a78;
  --nav-blue: #0f5b8d;
  --gold: #fdb515;
  --page-bg: #ffffff;
  --card-bg: #ffffff;
  --card-head-bg: #eeeeee;
  --border: #cfcfcf;
  --rule: #e3e3e3;
  --text: #333333;
  --heading: #222222;
  --muted: #555555;
  --link: #1660b5;
  --danger: #d0021b;
  --warning-bg: #fbe9a3;
  --bullet: #8798ab;
}

/* ===== Reset / base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  background: var(--page-bg);
}

a { color: var(--link); }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }

/* ===== Top bar ===== */
.topbar { background: var(--navy); color: #fff; height: 41px; }
.topbar__inner {
  height: 100%;
  padding: 0 7px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  color: var(--gold);
  text-decoration: none;
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 2.5px;
  line-height: 1;
}
.logo span { color: #fff; font-weight: 700; }

.topbar__icons { display: flex; align-items: center; gap: 26px; height: 100%; }
.badge-item { display: flex; align-items: center; gap: 6px; }
.gicon { display: block; }
.count { font-size: 13px; }

.user { position: relative; height: 100%; display: flex; align-items: flex-end; }
.user__toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 37px;
  background: transparent;
  color: #fff;
  border: 1px solid transparent;
  border-bottom: 0;
  padding: 0 10px 0 4px;
  font-size: 13px;
}
.user__toggle:hover,
.user__toggle[aria-expanded="true"] {
  background: var(--navy-light);
  border-color: #6c98c4;
}

.caret { font-size: 9px; transition: transform 0.15s; }
.user__toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }

.avatar {
  position: relative;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #c9c2b8;
  border: 1px solid #fff;
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: bold;
  font-size: 11px;
}
.avatar__badge {
  position: absolute;
  top: -5px; right: -6px;
  min-width: 12px; height: 12px;
  border-radius: 6px;
  background: var(--danger);
  color: #fff;
  font-size: 8px;
  line-height: 12px;
  text-align: center;
}

.user__menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 10;
  width: 247px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}
.user__menu[hidden] { display: none; }
.user__menu-id {
  background: #f0f0f0;
  padding: 8px;
  font-size: 13px;
}
.user__menu a {
  display: block;
  padding: 8px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
}
.user__menu-id + a { border-top: 0; }
.user__menu a:hover { background: #f2f7fb; }

/* ===== Main nav ===== */
.mainnav { background: var(--nav-blue); border-bottom: 1px solid #c4ccd4; }
.mainnav ul { display: flex; gap: 8px; padding: 7px 10px; }
.mainnav a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  line-height: 18px;
  padding: 2px 5px;
  border: 1px solid transparent;
  border-radius: 2px;
}
.mainnav a .fa { margin-right: 2px; }
.mainnav a:hover { background: rgba(255, 255, 255, 0.15); }
.mainnav a.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  font-weight: bold;
}

/* ===== Announcement bar ===== */
.announce {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 15px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 0;
  font-size: 13px;
  color: var(--muted);
}
.announce strong { color: var(--muted); }

/* ===== Dashboard grid ===== */
.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  align-items: start;
  padding-top: 13px;
}
.column { display: flex; flex-direction: column; gap: 13px; min-width: 0; }

/* ===== Cards ===== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
}
.card__title {
  background: var(--card-head-bg);
  color: var(--heading);
  font-size: 16px;
  font-weight: 400;
  padding: 11px 15px;
  line-height: 19px;
}
.card__title small { font-size: 13px; color: var(--muted); text-transform: uppercase; margin-left: 1px; }
.card__body { padding: 15px; }
.card__body--roomy { padding-top: 16px; }
.card__body--tight { padding: 9px 8px 0; }

.subhead {
  font-size: 14px;
  font-weight: bold;
  color: var(--heading);
  margin: 13px 0 8px;
}
.subhead:first-child { margin-top: 0; }
.subhead--sm { font-size: 13px; margin-bottom: 14px; }
.subhead--sm + p { margin-bottom: 20px; }
.card__body p { margin-bottom: 8px; }

.square-list li { position: relative; padding-left: 13px; margin-bottom: 1px; }
.square-list li::before {
  content: "";
  position: absolute;
  left: 1px; top: 6px;
  width: 6px; height: 6px;
  background: var(--bullet);
}
.square-list + .subhead { margin-top: 6px; }
.ext::after {
  content: "\f08e";            /* fa-external-link */
  font-family: FontAwesome;
  display: inline-block;
  margin-left: 3px;
  font-size: 11px;
  text-decoration: none;
}

/* ===== bCal schedule ===== */
.event { display: flex; gap: 12px; padding: 4px 8px 0; font-size: 12px; }
.event__time { text-align: center; line-height: 18px; }
.event__name { font-weight: bold; line-height: 18px; }

/* ===== Classes ===== */
.note { font-size: 11px; line-height: 14px; margin-bottom: 26px !important; }
.course {
  padding-bottom: 11px;
  margin-bottom: 11px;
  border-bottom: 1px solid var(--rule);
}
.course:last-child { border-bottom: 0; }
.course h3 { font-size: 13px; line-height: 17px; }
.course p { font-size: 12px; margin: 0 0 6px; }
.course__links { padding-left: 4px; font-size: 12px; }
.course__links li {
  position: relative;
  padding-left: 21px;
  margin-bottom: 0;
  line-height: 18px;
}
/* Canvas-style ring of dots */
.course__links li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 13px; height: 13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cg fill='%23777'%3E%3Ccircle cx='13' cy='2.5' r='2.5'/%3E%3Ccircle cx='13' cy='23.5' r='2.5'/%3E%3Ccircle cx='2.5' cy='13' r='2.5'/%3E%3Ccircle cx='23.5' cy='13' r='2.5'/%3E%3Ccircle cx='5.6' cy='5.6' r='2'/%3E%3Ccircle cx='20.4' cy='5.6' r='2'/%3E%3Ccircle cx='5.6' cy='20.4' r='2'/%3E%3Ccircle cx='20.4' cy='20.4' r='2'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}
.course__links span { display: block; color: var(--text); }

/* ===== Tabs ===== */
.tabs { display: flex; border-bottom: 2px solid #ececec; }
.tab {
  flex: 1;
  background: #fff;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 13px 8px;
  font-size: 13px;
  font-weight: bold;
  color: #666;
}
.tab--active { color: var(--link); border-bottom-color: var(--link); }

/* ===== Tasks ===== */
.overdue {
  color: var(--danger);
  font-size: 16px;
  padding: 0 0 9px;
  margin: 0 -8px;
  padding-left: 8px;
  border-bottom: 1px solid var(--rule);
}
.task {
  display: flex;
  gap: 11px;
  padding: 10px 0 11px;
  border-bottom: 1px solid var(--rule);
}
.task:last-child { border-bottom: 0; }
.task__icon {
  flex: none;
  color: var(--danger);
  font-size: 15px;
  line-height: 16px;
  margin-top: 1px;
}
.task__main { flex: 1; min-width: 0; }
.task__title { display: block; font-weight: bold; font-size: 13px; line-height: 16px; text-decoration: none; }
.task--overdue .task__title,
.task--overdue .task__due { color: var(--danger); }
.task__course { font-size: 11px; margin: 6px 0 2px; }
.task__due { font-size: 13px; }
.task__chevron { color: var(--link); font-size: 14px; padding: 0 8px; line-height: 16px; }

/* ===== Notifications ===== */
.unread {
  background: var(--warning-bg);
  text-align: center;
  font-size: 13px;
  padding: 3px;
  margin-bottom: 18px;
}
.notif { display: flex; gap: 19px; padding-left: 7px; font-size: 13px; }
.notif__date { text-align: center; font-size: 15px; color: var(--muted); line-height: 15px; }
.notif__date span { display: block; font-size: 11px; }
.notif__text p { margin-bottom: 9px; line-height: 16px; }
.notif__link .fa { color: var(--muted); margin-right: 2px; }
.notif__more {
  text-align: center;
  font-size: 13px;
  border-top: 1px solid var(--rule);
  margin-top: 14px;
  padding-top: 12px;
}

/* ===== Tablet: 2 columns ===== */
@media (max-width: 900px) {
  .dashboard { grid-template-columns: repeat(2, 1fr); }
  .column:last-child { grid-column: 1 / -1; }
}

/* ===== Mobile: 1 column ===== */
@media (max-width: 600px) {
  .dashboard { grid-template-columns: 1fr; padding: 13px 8px 0; }
  .topbar__icons { gap: 14px; }
  .logo { font-size: 17px; }
  .mainnav ul { flex-wrap: wrap; }
  .announce { flex-wrap: wrap; }
}

/* ===== Personal profile ===== */
.avatar__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-dialog {
  width: min(340px, calc(100vw - 32px));
  border: 1px solid var(--border);
  padding: 16px;
  color: var(--text);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}
.profile-dialog::backdrop { background: rgba(0, 0, 0, 0.4); }
.profile-dialog h2 { font-size: 16px; color: var(--heading); margin: 0 0 12px; }
.profile-dialog label { display: block; font-size: 13px; margin-bottom: 10px; }
.profile-dialog input { display: block; width: 100%; margin-top: 3px; padding: 5px; font: inherit; }
.profile-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.profile-dialog button { padding: 5px 12px; font-size: 13px; }
.profile-dialog button[type="submit"] { background: var(--nav-blue); color: #fff; border: 1px solid var(--nav-blue); }
