:root {
  --maroon: #721519;
  --dark: #4f0d11;
  --gold: #caa34b;
  --ink: #242323;
  --line: #e7e3dc;
  --paper: #f7f5f1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.portalShell {
  min-height: 100vh;
  display: flex;
}

/* SIDEBAR */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  background: linear-gradient(
    165deg,
    var(--maroon),
    var(--dark)
  );
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.brandBlock {
  min-height: 104px;
  padding: 24px 22px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid #ffffff1c;
}

.crestMark,
.modalCrest {
  display: grid;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50% 50% 44% 44%;
  color: var(--gold);
  font: 700 16px Georgia, serif;
}

.crestMark {
  width: 47px;
  height: 55px;
}

.brandBlock strong,
.brandBlock span {
  display: block;
}

.brandBlock strong {
  font: 700 16px Georgia, serif;
}

.brandBlock span {
  margin-top: 4px;
  color: #e4c982;
  font-size: 11px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.sideNav {
  padding: 28px 15px;
}

.sideNav p {
  margin: 0 12px 12px;
  color: #dfbc6b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

.sideNav button,
.sideBottom button {
  border: 0;
  color: #f5e8e8;
  background: transparent;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 9px;
  padding: 12px 13px;
  margin: 3px 0;
  text-align: left;
  font-size: 14px;
}

.sideNav button b {
  width: 19px;
  text-align: center;
}

.sideNav button:hover,
.sideNav button.active {
  background: #ffffff15;
}

.sideNav button.active {
  box-shadow: inset 3px 0 var(--gold);
}

.sideNav button em {
  margin-left: auto;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--dark);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.sideBottom {
  margin-top: auto;
  padding: 10px 15px 22px;
  border-top: 1px solid #ffffff16;
}

.futureAccessSide {
  background: #cba74f !important;
  color: #461014 !important;
  font-weight: 800 !important;
}

.schoolMotto {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 18px 12px 0;
  color: #dcb95f;
}

.schoolMotto small {
  font-family: Georgia, serif;
  font-style: italic;
}

/* MAIN AREA */

.mainPanel {
  margin-left: 250px;
  width: calc(100% - 250px);
  min-width: 0;
}

.topbar {
  height: 76px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.searchBox {
  width: 280px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #999;
}

.searchBox input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.topActions,
.parentProfile {
  display: flex;
  align-items: center;
  gap: 11px;
}

.iconButton {
  border: 0;
  background: #f5f2ed;
  color: #666;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  position: relative;
}

.iconButton span {
  position: absolute;
  top: -3px;
  right: -2px;
  background: var(--maroon);
  color: #fff;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.parentProfile strong,
.parentProfile small {
  display: block;
}

.parentProfile strong {
  font-size: 13px;
}

.parentProfile small {
  color: #888;
  font-size: 10px;
  margin-top: 2px;
}

.contentWrap {
  max-width: 1440px;
  margin: auto;
  padding: 27px 36px 48px;
}

.demoNote {
  padding: 8px;
  border: 1px solid #dccb9d;
  background: #fffaf0;
  color: #896c27;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.3px;
  border-radius: 5px;
}

.welcomeRow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  padding: 28px 0 24px;
}

.welcomeRow p {
  margin: 0 0 6px;
  color: #888;
  font-size: 12px;
}

.welcomeRow h1 {
  margin: 0;
  font: 700 30px Georgia, serif;
}

.welcomeRow > div > span {
  display: block;
  color: #747474;
  font-size: 13px;
  margin-top: 7px;
}

.studentPicker {
  min-width: 260px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 10px;
  padding: 10px 13px;
  text-align: left;
}

.studentPicker > b {
  margin-left: auto;
}

.studentAvatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f0e3c3;
  color: #74540f;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.studentPicker small,
.studentPicker strong,
.studentPicker span {
  display: block;
}

.studentPicker small {
  font-size: 8px;
  color: #9b8b66;
  font-weight: 800;
}

.studentPicker strong {
  font-size: 13px;
  margin: 2px 0;
}

.studentPicker span {
  font-size: 10px;
  color: #888;
}

/* SUMMARY CARDS */

.statGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 15px;
}

.statCard {
  min-height: 104px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.statIcon {
  width: 43px;
  height: 43px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.statIcon.gold {
  color: #92701d;
  background: #fbf3df;
}

.statIcon.green {
  color: #356451;
  background: #eaf3ef;
}

.statIcon.blue {
  color: #345f8a;
  background: #eaf0f5;
}

.statIcon.maroon {
  color: var(--maroon);
  background: #f5e8e8;
}

.statCard small,
.statCard strong,
.statCard span {
  display: block;
}

.statCard small {
  font-size: 9px;
  color: #888;
  font-weight: 800;
}

.statCard strong {
  font: 700 22px Georgia, serif;
  margin: 3px 0;
}

.statCard span {
  font-size: 10px;
  color: #888;
}

.statCard .positive {
  color: #35735a;
}

/* DASHBOARD */

.dashboardGrid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.65fr)
    minmax(300px, 0.75fr);
  gap: 15px;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}

.panelHead {
  min-height: 79px;
  padding: 19px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eeeae4;
}

.panelHead p {
  margin: 0 0 4px;
  color: #a17b25;
  letter-spacing: 1.4px;
  font-size: 8px;
  font-weight: 800;
}

.panelHead h2 {
  margin: 0;
  font: 700 18px Georgia, serif;
}

.panelHead button {
  border: 0;
  background: transparent;
  color: var(--maroon);
  font-size: 11px;
  font-weight: 700;
}

.subjectList article {
  min-height: 72px;
  display: grid;
  grid-template-columns:
    42px
    minmax(145px, 1fr)
    minmax(90px, 1.1fr)
    47px
    38px;
  align-items: center;
  gap: 13px;
  padding: 10px 22px;
  border-bottom: 1px solid #f0ede8;
}

.subjectIcon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #f6eaea;
  color: var(--maroon);
  display: grid;
  place-items: center;
}

.subjectName strong,
.subjectName span {
  display: block;
}

.subjectName strong {
  font-size: 12px;
}

.subjectName span {
  margin-top: 4px;
  color: #929292;
  font-size: 9px;
}

.progressTrack {
  height: 5px;
  background: #edeae4;
  border-radius: 5px;
  overflow: hidden;
}

.progressTrack span {
  display: block;
  height: 100%;
  background: var(--maroon);
}

.progressTrack .goldBar {
  background: var(--gold);
}

.progressTrack .greenBar {
  background: #315b4c;
}

.progressTrack .blueBar {
  background: #345f8a;
}

.subjectList article > strong {
  font: 700 13px Georgia, serif;
  text-align: right;
}

.subjectList article > i {
  border: 1px solid #dcc7c8;
  border-radius: 6px;
  padding: 4px 2px;
  color: var(--maroon);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.goldText {
  color: #92701d;
  background: #fbf3df;
}

.greenText {
  color: #356451;
  background: #eaf3ef;
}

.blueText {
  color: #345f8a;
  background: #eaf0f5;
}

/* NOTICES */

.featuredNotice {
  margin: 16px 18px 9px;
  padding: 16px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(
    135deg,
    #76171b,
    #521014
  );
}

.featuredNotice > span {
  display: inline-block;
  background: #d3ae56;
  color: #4d3510;
  padding: 3px 7px;
  border-radius: 3px;
  font-size: 7px;
  font-weight: 900;
}

.featuredNotice strong {
  display: block;
  margin: 9px 0 6px;
  font: 700 14px Georgia, serif;
}

.featuredNotice p {
  margin: 0;
  color: #f0dfe0;
  font-size: 10px;
  line-height: 1.55;
}

.featuredNotice button {
  margin-top: 11px;
  border: 0;
  border-radius: 5px;
  padding: 7px 10px;
  background: #fff;
  color: var(--dark);
  font-size: 9px;
  font-weight: 800;
}

.miniNotice {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 18px;
  padding: 10px 0;
  border-bottom: 1px solid #efebe6;
}

.dateTile,
.dueDate {
  width: 37px;
  height: 39px;
  border-radius: 6px;
  display: grid;
  place-content: center;
  text-align: center;
}

.dateTile {
  background: #f4efe5;
  color: #8b691e;
}

.dateTile b,
.dueDate b {
  font: 700 14px Georgia, serif;
}

.dateTile span,
.dueDate span {
  font-size: 7px;
  font-weight: 800;
}

.miniNotice strong,
.miniNotice > div > span {
  display: block;
}

.miniNotice strong {
  font-size: 10px;
}

.miniNotice > div > span {
  font-size: 8px;
  color: #999;
  margin-top: 3px;
}

/* ASSIGNMENTS */

.assignmentRows {
  padding: 0 22px;
}

.assignmentRows article {
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid #f0ede8;
}

.dueDate {
  border: 1px solid #dfd9cf;
  color: #777;
}

.dueDate.urgent {
  background: #f9eeee;
  color: var(--maroon);
}

.assignmentRows strong,
.assignmentRows div > span {
  display: block;
}

.assignmentRows strong {
  font-size: 11px;
}

.assignmentRows div > span,
.assignmentRows em {
  margin-top: 4px;
  color: #949494;
  font-size: 9px;
}

.assignmentRows em {
  font-style: normal;
}

/* TEACHER */

.teacherCard {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 18px 19px 12px;
}

.teacherAvatar {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: #f4e7e7;
  color: var(--maroon);
  display: grid;
  place-items: center;
}

.teacherCard strong,
.teacherCard span {
  display: block;
}

.teacherCard strong {
  font-size: 11px;
}

.teacherCard span {
  font-size: 9px;
  color: #929292;
  margin-top: 4px;
}

.contactPanel > p {
  color: #777;
  font-size: 10px;
  line-height: 1.55;
  margin: 0 19px 13px;
}

.contactButtons {
  display: flex;
  gap: 7px;
  padding: 0 19px;
}

.contactButtons button {
  border: 0;
  background: var(--maroon);
  color: #fff;
  height: 35px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

.contactButtons button:first-child {
  flex: 1;
}

.contactButtons button:last-child {
  width: 39px;
  background: #f1ece5;
  color: #756e65;
}

.responseTime {
  margin: 12px 19px 17px;
  color: #999;
  font-size: 8px;
}

.mobileMenu,
.mobileClose,
.backdrop {
  display: none;
}

/* SIGNUP MODAL */

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modalBackdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: #1f0d0db8;
  backdrop-filter: blur(3px);
}

.modalCard {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 32px 90px #2a1111aa;
}

.modalClose {
  position: absolute;
  z-index: 2;
  right: 14px;
  top: 13px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #ffffff19;
  color: #fff;
  font-size: 23px;
}

.signupBrand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 19px 28px;
  background: linear-gradient(
    115deg,
    #721519,
    #4e0c10
  );
  color: #fff;
  border-bottom: 3px solid var(--gold);
}

.modalCrest {
  width: 39px;
  height: 45px;
  font-size: 13px;
}

.signupBrand strong,
.signupBrand span {
  display: block;
}

.signupBrand strong {
  font: 700 15px Georgia, serif;
}

.signupBrand span {
  margin-top: 3px;
  color: #dec986;
  font-size: 8px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.signupHeader {
  padding: 26px 29px 13px;
}

.signupHeader > span,
.signupSuccess > span {
  color: #a17b25;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.7px;
}

.signupHeader h2 {
  margin: 4px 0 8px;
  font: 700 28px/1.18 Georgia, serif;
}

.signupHeader p {
  margin: 0;
  color: #716f6c;
  font-size: 12px;
  line-height: 1.6;
}

.signupForm {
  padding: 8px 29px 26px;
}

.fieldRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.signupForm label {
  display: block;
  color: #4d4744;
  font-size: 10px;
  font-weight: 800;
}

.signupForm label small {
  margin-left: 4px;
  color: #999;
  font-weight: 500;
}

.signupForm input:not([type="checkbox"]),
.signupForm select {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border: 1px solid #ddd7ce;
  border-radius: 7px;
  background: #fbfaf8;
  padding: 0 12px;
  outline: 0;
  font-size: 12px;
}

.signupForm input:focus,
.signupForm select:focus {
  border-color: #a17b25;
  box-shadow: 0 0 0 3px #caa34b20;
}

.consentRow {
  display: flex !important;
  gap: 10px;
  padding: 13px;
  border: 1px solid #e4ded4;
  border-radius: 8px;
  background: #faf8f4;
  margin: 2px 0 15px;
}

.consentRow input {
  accent-color: var(--maroon);
}

.consentRow strong,
.consentRow small {
  display: block !important;
  margin: 0 !important;
}

.consentRow small {
  margin-top: 4px !important;
  line-height: 1.4;
  color: #888 !important;
}

.signupSubmit {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 7px;
  background: var(--maroon);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.signupSubmit:disabled {
  opacity: 0.65;
}

.privacyNote {
  text-align: center;
  color: #999;
  font-size: 8px;
  margin: 9px 0 0;
}

.formMessage {
  display: none;
}

.formMessage.error {
  display: block;
  color: #a30e15;
  background: #fff0f0;
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 10px;
}

.signupSuccess {
  padding: 48px 42px;
  text-align: center;
}

.signupSuccess[hidden] {
  display: none;
}

.successSeal {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf5ee;
  color: #357258;
  margin: 0 auto 20px;
  font-size: 28px;
}

.signupSuccess h2 {
  font: 700 27px Georgia, serif;
  margin: 7px 0 8px;
}

.signupSuccess p {
  color: #74716e;
  line-height: 1.6;
}

.signupSuccess button {
  margin-top: 20px;
  border: 0;
  border-radius: 7px;
  padding: 12px 18px;
  background: var(--maroon);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.modalOpen {
  overflow: hidden;
}

/* TABLET */

@media (max-width: 1100px) {
  .statGrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboardGrid {
    grid-template-columns: 1fr;
  }

  .noticePanel {
    order: 3;
  }

  .contactPanel {
    order: 4;
  }
}

/* MOBILE */

@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-102%);
    transition: 0.25s;
  }

  .sidebar.sidebarOpen {
    transform: translateX(0);
  }

  .mainPanel {
    margin-left: 0;
    width: 100%;
  }

  .backdrop.show {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    background: #1f1615aa;
    z-index: 25;
  }

  .mobileClose,
  .mobileMenu {
    display: block;
    border: 0;
    background: transparent;
  }

  .mobileClose {
    margin-left: auto;
    color: #fff;
    font-size: 24px;
  }

  .mobileMenu {
    color: var(--maroon);
    font-size: 22px;
  }

  .topbar {
    height: 66px;
    padding: 0 17px;
  }

  .searchBox {
    display: none;
  }

  .topActions {
    margin-left: auto;
  }

  .parentProfile > div:not(.avatar),
  .parentProfile > b {
    display: none;
  }

  .contentWrap {
    padding: 18px 16px 38px;
  }

  .welcomeRow {
    align-items: stretch;
    flex-direction: column;
    padding: 22px 0 18px;
    gap: 17px;
  }

  .studentPicker {
    width: 100%;
  }

  .statGrid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .statCard {
    padding: 14px 12px;
    min-height: 93px;
    gap: 10px;
  }

  .statCard strong {
    font-size: 17px;
  }

  .dashboardGrid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .subjectList article {
    grid-template-columns:
      38px 1fr 42px 34px;
    padding: 10px 14px;
  }

  .progressTrack {
    display: none;
  }

  .assignmentRows {
    padding: 0 14px;
  }

  .assignmentRows article {
    grid-template-columns: 40px 1fr;
  }

  .assignmentRows em {
    display: none;
  }

  .fieldRow {
    grid-template-columns: 1fr;
  }

  .signupBrand {
    padding: 15px 20px;
  }

  .signupHeader {
    padding: 20px 20px 10px;
  }

  .signupHeader h2 {
    font-size: 23px;
  }

  .signupForm {
    padding: 7px 20px 21px;
  }
}

@media (max-width: 420px) {
  .statGrid {
    grid-template-columns: 1fr;
  }

  .iconButton:first-child {
    display: none;
  }

  .subjectList article {
    gap: 8px;
  }
}