* {
  box-sizing: border-box;
}

:root {
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface-soft: #f8f9fb;
  --border: #d9dfe7;
  --border-soft: #e7ebf0;
  --text: #23272f;
  --muted: #5f6773;
  --blue: #0b67c2;
  --accent: #8e2558;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;600;700&display=swap');

body {
  font-family: 'Lato', 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

img {
  max-width: 100%;
  display: block;
}

/* ===== TOP BAR ===== */

.topbar {
  background: #f3f4f6;
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  font-size: 50px;
  color: #17a8f5;
  font-weight: bold;
  line-height: 1;
}

.class-link {
  font-size: 20px;
  color: var(--blue);
  text-decoration: underline;
}

.class-label {
  font-size: 20px;
  color: var(--text);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.icon {
  width: 30px;
  height: 30px;
  stroke: #5f6368;
  stroke-width: 1.6;
  fill: none;
  flex-shrink: 0;
}

.divider {
  height: 24px;
  border-left: 2px dotted #cfd5dd;
}

.user-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  white-space: nowrap;
}

.avatar {
  background: #8e2558;
  color: white;

  font-size: 18px;      /* 👈 bigger text */
  font-weight: bold;

  padding: 12px 16px;  /* 👈 more space inside */
  border-radius: 8px;  /* 👈 slightly softer corners */

  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 48px;     /* 👈 ensures square shape */
  height: 48px;
}

/* ===== NAV ===== */

.subnav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 20;
}

.subnav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  gap: 28px;
  align-items: center;
  overflow: visible;
  white-space: nowrap;
}

.nav-item {
  position: relative;
}

.nav-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dropdown-arrow {
  font-size: 12px;
}

/* ===== DROPDOWN ===== */

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  display: none;
  z-index: 9999;
  overflow: hidden;
}

.dropdown a {
  display: block;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: white;
}

.dropdown a:last-child {
  border-bottom: none;
}

.dropdown a:hover {
  background: #f5f7fa;
}

.dropdown-click.open .dropdown {
  display: block;
}

/* ===== DASHBOARD PAGE ===== */

.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 28px 40px;
}

.page-title {
  margin: 0 0 22px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 28px;
}

.panel {
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ===== COURSE TABS ===== */

.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  padding-bottom: 12px;
}

.tab {
  position: relative;
  font-size: 16px;
  cursor: pointer;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -13px;
  width: 22px;
  height: 4px;
  border-radius: 999px;
  background: var(--blue);
}

/* ===== COURSE GRID ===== */

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.course-card {
  display: block;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
}

.course-thumb {
  height: 106px;
  position: relative;
  background: linear-gradient(135deg, #c47e00, #945700);
}

.course-thumb.purple {
  background: linear-gradient(135deg, #8f62ff, #6d2dde);
}

.course-thumb.blue {
  background: linear-gradient(135deg, #0819a9, #0aa3ff);
}

.course-thumb.orange-dark {
  background: linear-gradient(135deg, #3b1b00, #bf4d00);
}

.course-thumb.rainbow {
  background: linear-gradient(90deg, #ff5b5b, #ffd155, #70e37c, #66bfff, #9867ff);
}

.course-thumb.navy {
  background: linear-gradient(135deg, #0c4477, #0055a4);
}

.thumb-label {
  position: absolute;
  left: 14px;
  top: 34px;
  color: white;
  font-weight: 700;
  font-size: 15px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.course-content {
  padding: 14px;
}

.course-title {
  font-size: 17px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.course-meta {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.view-all {
  display: inline-block;
  margin-top: 14px;
  color: var(--blue);
  font-size: 15px;
}

/* ===== SIDEBAR / SMALL BOXES ===== */

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.simple-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: white;
}

.center-empty {
  min-height: 102px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #3b4047;
  font-size: 15px;
  line-height: 1.4;
}

.date-box {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
}

.events-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 700;
}

.event-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.event-date {
  font-size: 14px;
  color: gray;
  line-height: 1.4;
}

.event-body {
  font-size: 15px;
  line-height: 1.5;
}

.event-time {
  font-weight: bold;
}

/* ===== HERO ===== */

.hero-banner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}

.hero-banner-inner {
  height: 180px;
  background: linear-gradient(135deg, #c88200, #8d5b00);
  position: relative;
  overflow: hidden;
}

.hero-big {
  position: absolute;
  left: 30px;
  top: 20px;
  font-size: 60px;
  color: white;
  font-weight: bold;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}

.hero-course {
  position: absolute;
  left: 30px;
  bottom: 20px;
  font-size: 28px;
  color: white;
  line-height: 1.2;
}

/* ===== COURSE HOME LAYOUT ===== */

.course-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
}

.announcement-card {
  min-height: 450px;
}

.announce-link {
  color: var(--blue);
  font-weight: bold;
  font-size: 18px;
}

.announcement-text {
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 10px;
}

.blue-link {
  color: var(--blue);
}

/* ===== GRADES PAGE ===== */

.grades-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 28px 40px;
}

.grades-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 26px;
}

.grades-title {
  font-size: 46px;
  font-weight: 400;
  margin: 0;
}

.print-link {
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
}

.action-row {
  margin-bottom: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.soft-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid var(--border);
  cursor: pointer;
}

.soft-button {
  background: #e9edf2;
  color: #2b313a;
}

.primary-button {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.table-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.grade-table {
  width: 100%;
  border-collapse: collapse;
}

.grade-table thead th {
  text-align: left;
  font-size: 15px;
  font-weight: 400;
  padding: 16px;
  background: #f7f8fa;
  border-bottom: 1px solid var(--border);
}

.grade-table tbody td {
  vertical-align: top;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  line-height: 1.5;
}

.feedback-title {
  margin: 18px 0 8px;
  font-weight: 400;
}

.rubric-link {
  color: var(--blue);
  margin-top: 18px;
  display: inline-block;
}

/* ===== PREDICTOR PAGE ===== */

.predictor-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 28px 40px;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
}

.predictor-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.95fr;
  gap: 24px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

.stat-sub {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.predictor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.predictor-card + .predictor-card {
  margin-top: 18px;
}

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

.input-row {
  margin-bottom: 16px;
}

.input-row label {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--muted);
}

input[type="number"],
input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: white;
}

.slider-row {
  margin-bottom: 18px;
}

.slider-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  margin-bottom: 10px;
}

.slider-meta {
  font-size: 13px;
  color: var(--muted);
}

input[type="range"] {
  width: 100%;
}

.status-pill {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.status-on-track {
  background: #e8f6ed;
  color: #1c7a3b;
}

.status-risk {
  background: #fff3e8;
  color: #a85d09;
}

.chart-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-item {
  display: grid;
  grid-template-columns: 120px 1fr 48px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.bar-track {
  height: 12px;
  background: #edf1f5;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 999px;
}

.insight-box {
  background: #f8fbff;
  border: 1px solid #d8e8fa;
  border-radius: 10px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.5;
}

.small-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1100px) {
  .dashboard-grid,
  .course-grid,
  .predictor-grid {
    grid-template-columns: 1fr;
  }

  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .topbar-inner,
  .subnav-inner,
  .page-wrap,
  .hero-banner,
  .course-grid,
  .grades-page,
  .predictor-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .top-right {
    flex-wrap: wrap;
  }

  .divider {
    display: none;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 32px;
  }

  .hero-big {
    font-size: 42px;
  }

  .hero-course {
    font-size: 20px;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .bar-item {
    grid-template-columns: 1fr;
  }
}


.slider-row.disabled {
  opacity: 0.5;
}

input[type="range"]:disabled {
  cursor: not-allowed;
  accent-color: #c9c9c9;
}