:root {
  color-scheme: light;
  --ink: #171a2b;
  --muted: #7a7d8d;
  --violet: #7658f5;
  --violet-dark: #6545e8;
  --line: #e8e8ef;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  background: #f5f6fa;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  width: min(1220px, calc(100% - 64px));
  min-height: min(780px, calc(100vh - 64px));
  margin: 32px auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(23, 26, 43, 0.06);
  border-radius: 24px;
  box-shadow: 0 28px 90px rgba(30, 34, 63, 0.1);
}

.brand-panel {
  position: relative;
  display: flex;
  min-height: 720px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 44px 48px 38px;
  background:
    radial-gradient(ellipse at 17% 88%, rgba(92, 73, 214, 0.42), transparent 48%),
    linear-gradient(145deg, #13182d 0%, #11152a 56%, #1a1b36 100%);
  color: #fff;
}

.brand,
.mobile-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: inherit;
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.8px;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: #a998ff;
}

.brand-mark svg {
  width: 34px;
  height: 34px;
}

.brand-copy {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin-top: -26px;
}

.eyebrow,
.form-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #a7a9bb;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.55px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a48eff;
  box-shadow: 0 0 12px rgba(164, 142, 255, 0.8);
}

.brand-copy h1 {
  margin: 23px 0 18px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(48px, 5vw, 68px);
  font-weight: 700;
  letter-spacing: -4.2px;
  line-height: 1.08;
}

.brand-copy h1 span {
  color: #a998ff;
}

.brand-copy p {
  max-width: 355px;
  margin: 0;
  color: #b9bbca;
  font-size: 15px;
  line-height: 1.8;
}

.panel-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #b9bbca;
  font-size: 12px;
  line-height: 1.6;
}

.avatar-stack {
  display: flex;
  padding-left: 2px;
}

.avatar {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  margin-left: -2px;
  border: 2px solid #171a30;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.avatar + .avatar {
  margin-left: -8px;
}

.avatar-one { background: #d78e74; }
.avatar-two { background: #657baf; }
.avatar-three { background: #a27ab3; }

.decor {
  position: absolute;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(169, 152, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.decor-one {
  right: -225px;
  bottom: 74px;
  box-shadow: 0 0 0 30px rgba(169, 152, 255, 0.035), 0 0 0 60px rgba(169, 152, 255, 0.025);
}

.decor-two {
  top: -235px;
  left: -195px;
  width: 420px;
  height: 420px;
  border-color: rgba(169, 152, 255, 0.07);
}

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 60px 34px;
}

.form-wrap {
  width: min(100%, 390px);
}

.mobile-brand {
  display: none;
  color: var(--ink);
}

.form-heading {
  margin-bottom: 25px;
}

.form-kicker {
  color: #8c82bd;
  font-size: 9px;
  letter-spacing: 1.4px;
}

.form-heading h2 {
  margin: 12px 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1.25px;
}

.form-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  border-radius: 10px;
  background: #f4f4f8;
}

.mode-button {
  min-height: 39px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #7b7d8b;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.mode-button.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(31, 33, 59, 0.09);
}

.form-label {
  margin-bottom: 8px;
  color: #3b3d4d;
  font-size: 11px;
  font-weight: 700;
}

.form-control {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  box-shadow: none;
}

.form-control::placeholder {
  color: #b0b1be;
}

.form-control:focus {
  border-color: #9d8bf8;
  box-shadow: 0 0 0 3px rgba(118, 88, 245, 0.11);
}

.password-label,
.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-hint {
  margin-bottom: 8px;
  color: #9293a1;
  font-size: 10px;
}

.password-control {
  position: relative;
}

.password-control .form-control {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #9697a5;
}

.password-toggle svg,
.secure-note svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.form-meta {
  min-height: 39px;
  margin-bottom: 12px;
}

.secure-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #888a98;
  font-size: 10px;
}

.secure-note svg {
  width: 14px;
  height: 14px;
  color: #8d82c2;
}

.submit-button {
  display: flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: var(--violet);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(118, 88, 245, 0.2);
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: var(--violet-dark);
  color: #fff;
  box-shadow: 0 8px 18px rgba(118, 88, 245, 0.26);
  transform: translateY(-1px);
}

.submit-button:disabled {
  background: #9b8be8;
}

.button-arrow {
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.terms-copy {
  margin: 18px 0 0;
  color: #9a9ba7;
  font-size: 10px;
  line-height: 1.8;
  text-align: center;
}

.terms-copy a {
  color: #686078;
  text-decoration-color: #c8c3d5;
  text-underline-offset: 2px;
}

.notice {
  margin: -8px 0 18px;
  padding: 10px 12px;
  border: 1px solid #f0d5d5;
  border-radius: 8px;
  background: #fff8f8;
  color: #a63f48;
  font-size: 12px;
  line-height: 1.5;
}

.notice.is-success {
  border-color: #d6eadf;
  background: #f6fcf8;
  color: #31734b;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 72px;
  color: #a3a4b0;
  font-size: 9px;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-status span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5dbb83;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    width: min(100% - 32px, 780px);
    min-height: min(720px, calc(100vh - 32px));
    margin: 16px auto;
  }

  .brand-panel {
    min-height: 680px;
    padding: 34px 30px;
  }

  .brand-copy h1 {
    font-size: 50px;
  }

  .form-panel {
    padding: 48px 34px 30px;
  }

  .form-footer {
    margin-top: 54px;
  }
}

@media (max-width: 760px) {
  body {
    background: #fff;
  }

  .auth-shell {
    display: block;
    width: min(100% - 32px, 480px);
    min-height: 100vh;
    margin: 0 auto;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .brand-panel {
    display: none;
  }

  .form-panel {
    min-height: 100vh;
    align-items: flex-start;
    padding: 32px 0 24px;
  }

  .form-wrap {
    width: 100%;
    margin: 0 auto;
  }

  .mobile-brand {
    display: inline-flex;
    margin-bottom: 42px;
  }

  .form-footer {
    margin-top: 56px;
  }
}

@media (max-width: 680px) {
  .auth-shell {
    width: 100%;
  }

  .form-panel {
    padding: 27px 24px 24px;
  }

  .form-wrap {
    width: min(100%, 420px);
    margin: 0 auto;
  }

  .mobile-brand {
    margin-bottom: 45px;
  }

  .form-heading h2 {
    font-size: 28px;
  }

  .form-footer {
    margin-top: 64px;
  }
}

@media (max-width: 380px) {
  .form-panel {
    padding-right: 18px;
    padding-left: 18px;
  }

  .form-heading h2 {
    font-size: clamp(24px, 7vw, 28px);
  }

  .footer-status {
    gap: 4px;
  }

  .terms-copy {
    font-size: 9px;
  }
}

/* Dashboard */
.dashboard {
  min-height: 100vh;
  background: #f6f7fb;
}

.dashboard[hidden] {
  display: none !important;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: 258px;
  flex-direction: column;
  padding: 27px 19px 17px;
  border-right: 1px solid #ececf2;
  background: #fff;
}

.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 45px 5px;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  text-decoration: none;
}

.dashboard-brand .brand-mark {
  flex: 0 0 38px;
}

.dashboard-brand strong {
  display: block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
}

.dashboard-brand small {
  display: block;
  margin-top: 3px;
  color: #9495a3;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
}

.sidebar-label {
  padding: 0 11px;
  color: #a3a4b0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #777989;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}

.nav-item:hover {
  background: #f7f6fc;
  color: var(--violet-dark);
}

.nav-item.is-active {
  background: #f0edff;
  color: #674ce2;
}

.nav-icon {
  display: inline-flex;
  width: 20px;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
}

.sidebar-bottom {
  margin-top: auto;
}

.sidebar-profile {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 12px 3px 11px;
  border-top: 1px solid #f0f0f4;
}

.user-avatar {
  display: inline-flex;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e4defe;
  border-radius: 12px;
  background: #f0edff;
  color: #6b52df;
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.profile-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.profile-copy strong {
  overflow: hidden;
  color: #333548;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  overflow: hidden;
  color: #9697a4;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #777989;
  font-family: inherit;
  font-size: 18px;
  line-height: 1;
}

.icon-button:hover {
  border-color: #ece9fa;
  background: #f7f5ff;
  color: #674ce2;
}

.sidebar-logout,
.topbar-logout {
  display: flex;
  min-height: 39px;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8a6270;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
}

.sidebar-logout:hover,
.topbar-logout:hover {
  background: #fff3f4;
  color: #b44758;
}

.sidebar-logout > span,
.topbar-logout > span:first-child {
  font-size: 17px;
}

.course-code-card {
  display: grid;
  gap: 7px;
  margin: 4px 0 8px;
  padding: 12px 11px;
  border: 1px solid #eae6fb;
  border-radius: 9px;
  background: #faf9ff;
  cursor: pointer;
}

.course-code-card small {
  color: #9791ae;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
}

.course-code-card strong {
  color: #5e48c7;
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  letter-spacing: 2px;
}

.course-code-card button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #765ee0;
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
}

.course-code-card:hover {
  border-color: #d9d1f9;
}

.sidebar-signature {
  margin: 17px 3px 0;
  color: #aaaab5;
  font-size: 9px;
  line-height: 1.6;
}

.dashboard-main {
  min-height: 100vh;
  margin-left: 258px;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 258px;
  display: flex;
  height: 75px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 38px;
  border-bottom: 1px solid #ececf2;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.topbar-leading,
.topbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.topbar-course {
  position: absolute;
  left: 50%;
  display: flex;
  max-width: min(38%, 360px);
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translateX(-50%);
  text-align: center;
}

.topbar-course[hidden] {
  display: none;
}

.topbar-course strong {
  overflow: hidden;
  color: #48445e;
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-course small {
  color: #9693a3;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a0a1ad;
  font-size: 11px;
}

.breadcrumb strong {
  color: #46485a;
  font-weight: 600;
}

.topbar-date {
  padding-right: 17px;
  border-right: 1px solid #ececf2;
  color: #858694;
  font-size: 10px;
  text-transform: capitalize;
}

.profile-button {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.user-avatar-small {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 11px;
}

.topbar-logout {
  min-height: 35px;
  padding: 0 9px;
}

.menu-toggle,
.sidebar-backdrop {
  display: none;
}

.dashboard-content {
  width: min(100%, 1460px);
  margin: 0 auto;
  padding: 112px 38px 55px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.page-heading h1 {
  margin: 8px 0 5px;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: clamp(25px, 3vw, 32px);
  font-weight: 750;
  letter-spacing: -1.2px;
}

.page-heading p {
  margin: 0;
  color: #828492;
  font-size: 12px;
}

.page-action {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 0 16px;
  font-size: 11px;
}

.dashboard-notice {
  margin: -9px 0 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  position: relative;
  display: flex;
  min-height: 111px;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid #eeeef3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(29, 33, 61, 0.025);
}

.stat-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 20px;
}

.stat-icon.purple { background: #f0edff; color: #785df0; }
.stat-icon.blue { background: #eaf3ff; color: #5489d8; }
.stat-icon.green { background: #eaf8f0; color: #45a676; }
.stat-icon.orange { background: #fff4e9; color: #d88b41; }

.stat-label {
  display: block;
  margin-bottom: 5px;
  color: #898b99;
  font-size: 10px;
  line-height: 1.4;
}

.stat-value {
  color: #25283a;
  font-family: "Manrope", sans-serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
}

.stat-spark {
  position: absolute;
  top: 13px;
  right: 15px;
  color: #bab6cf;
  font-size: 13px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(250px, 0.7fr);
  align-items: start;
  gap: 16px;
}

.content-card {
  min-width: 0;
  border: 1px solid #eeeef3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(29, 33, 61, 0.025);
}

.recent-card,
.user-management-card {
  padding: 21px 22px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.card-heading h2 {
  margin: 5px 0 0;
  color: #282b3d;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.card-heading p {
  margin: 5px 0 0;
  color: #8e909d;
  font-size: 10px;
}

.text-action,
.welcome-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #7259e8;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.text-action:hover,
.welcome-action:hover {
  color: #5137c7;
}

.text-action span,
.welcome-action span {
  font-size: 15px;
}

.recent-list {
  display: grid;
}

.recent-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 12px 1px;
  border: 0;
  border-top: 1px solid #f1f1f5;
  background: transparent;
  text-align: left;
}

.recent-item:hover .recent-copy strong {
  color: #6d53e5;
}

.assignment-type-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #f0edff;
  color: #755bee;
  font-size: 17px;
}

.assignment-type-icon.activity {
  background: #eaf6ff;
  color: #4a8ac5;
}

.recent-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.recent-copy strong {
  overflow: hidden;
  color: #37394b;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-copy small,
.recent-date {
  color: #9293a0;
  font-size: 9px;
}

.recent-date {
  flex: 0 0 auto;
}

.welcome-card {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  padding: 22px;
  border-radius: 13px;
  background: linear-gradient(145deg, #6250d7 0%, #7965ef 55%, #957bfa 100%);
  color: #fff;
}

.welcome-tag {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.77);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.welcome-icon {
  position: relative;
  z-index: 1;
  display: flex;
  width: 35px;
  height: 35px;
  align-items: center;
  justify-content: center;
  margin-top: 19px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 17px;
}

.welcome-card h2 {
  position: relative;
  z-index: 1;
  margin: 14px 0 7px;
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.welcome-card p {
  position: relative;
  z-index: 1;
  max-width: 300px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  line-height: 1.65;
}

.welcome-action {
  position: relative;
  z-index: 1;
  margin-top: 13px;
  color: #fff;
}

.welcome-action:hover {
  color: #f0ecff;
}

.welcome-orbit {
  position: absolute;
  right: -51px;
  bottom: -119px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.orbit-a {
  box-shadow: 0 0 0 25px rgba(255, 255, 255, 0.045), 0 0 0 51px rgba(255, 255, 255, 0.04);
}

.orbit-b {
  right: -105px;
  bottom: -168px;
}

.mini-user-list {
  display: grid;
}

.mini-user {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #f1f1f5;
}

.mini-avatar {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 10px;
  font-size: 10px;
}

.role-pill,
.status-pill {
  display: inline-flex;
  min-height: 23px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #f1efff;
  color: #7158df;
  font-size: 9px;
  font-weight: 700;
}

.role-admin { background: #f1efff; color: #7158df; }
.role-teacher { background: #eaf3ff; color: #4d80c2; }
.role-student { background: #eaf8f0; color: #378b60; }
.role-essay { background: #f1efff; color: #7158df; }
.role-activity { background: #eaf3ff; color: #4d80c2; }

.submission-preview {
  padding: 20px 21px;
}

.submission-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin: 0 5px;
  border-radius: 50%;
  background: #70bd91;
}

.empty-state {
  display: flex;
  min-height: 225px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: #777989;
  text-align: center;
}

.empty-state strong {
  margin-top: 11px;
  color: #454759;
  font-size: 13px;
}

.empty-state p {
  max-width: 350px;
  margin: 7px 0 0;
  color: #9193a0;
  font-size: 10px;
  line-height: 1.6;
}

.empty-icon {
  display: inline-flex;
  width: 45px;
  height: 45px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f0edff;
  color: #775ce9;
  font-size: 22px;
}

.empty-state .submit-button {
  margin-top: 15px;
  padding: 0 16px;
}

.compact-empty {
  min-height: 120px;
  padding: 18px;
}

.compact-empty .empty-icon {
  width: 35px;
  height: 35px;
  font-size: 17px;
}

.user-management-card {
  padding-bottom: 7px;
}

.count-chip {
  padding: 6px 10px;
  border: 1px solid #eceaf5;
  border-radius: 999px;
  background: #faf9ff;
  color: #72649b;
  font-size: 9px;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 -2px;
}

.users-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.users-table th {
  padding: 11px 12px;
  border-top: 1px solid #eeeef3;
  border-bottom: 1px solid #eeeef3;
  background: #fafafd;
  color: #9697a3;
  font-size: 9px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.users-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #f0f0f4;
  color: #838593;
  font-size: 10px;
  white-space: nowrap;
}

.table-user,
.role-editor {
  display: flex;
  align-items: center;
  gap: 9px;
}

.role-select {
  width: 140px;
  min-height: 33px;
  padding: 5px 26px 5px 9px;
  border-color: #e9e8ef;
  font-size: 10px;
}

.small-action {
  display: inline-flex;
  min-height: 31px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid #e4defe;
  border-radius: 7px;
  background: #f8f6ff;
  color: #694fdb;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
}

.small-action:hover {
  background: #eeeaff;
}

.small-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.danger-action {
  border-color: #f1dfe1;
  background: #fffafa;
  color: #ad5965;
}

.danger-action:hover {
  border-color: #e9c6ca;
  background: #fff1f2;
  color: #a43e4c;
}

.course-name-cell {
  display: block;
  margin-top: 5px;
  color: #858394;
  font-size: 9px;
}

.assignment-manage-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.submission-item > .small-action {
  margin-top: 10px;
}

.reviewed-feedback {
  margin-top: 11px;
  padding: 11px 12px;
  border: 1px solid #e4eee8;
  border-radius: 8px;
  background: #f7fcf8;
}

.reviewed-feedback strong {
  color: #437a59;
  font-size: 9px;
}

.reviewed-feedback p {
  margin: 6px 0 0;
  color: #65756a;
  font-size: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.feedback-list {
  display: grid;
  gap: 13px;
}

.feedback-card {
  min-width: 0;
  padding: 20px 22px;
  border: 1px solid #eeeef3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(29, 33, 61, 0.025);
}

.feedback-card-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.feedback-card h2 {
  margin: 15px 0 5px;
  color: #2d3042;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.feedback-byline {
  margin: 0;
  color: #8c8e9b;
  font-size: 9px;
  line-height: 1.6;
}

.feedback-score {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid #e6e1fb;
  border-radius: 8px;
  background: #f7f5ff;
  color: #634bcf;
  font-family: "Manrope", sans-serif;
  font-size: 19px;
  font-weight: 800;
}

.feedback-score small {
  color: #8981ad;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 600;
}

.feedback-comment {
  margin-top: 17px;
  padding: 14px 15px;
  border-left: 3px solid #816bea;
  border-radius: 0 8px 8px 0;
  background: #f8f7ff;
}

.feedback-comment > span {
  color: #8a80b7;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.9px;
}

.feedback-comment p {
  margin: 8px 0 0;
  color: #59586b;
  font-size: 11px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.teacher-feedback-card > .small-action {
  margin-top: 13px;
}

.submission-preview-copy {
  max-height: 180px;
  overflow: auto;
  margin-top: 13px;
  padding: 12px;
  border: 1px solid #f0eff5;
  border-radius: 8px;
  background: #fcfcfe;
  color: #696b7a;
  font-size: 10px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.feedback-result {
  margin-top: 13px;
  padding: 14px;
  border: 1px solid #e4eee8;
  border-radius: 9px;
  background: #f8fcf9;
}

.feedback-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #467354;
  font-size: 10px;
  font-weight: 700;
}

.feedback-result-heading strong {
  color: #328252;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.feedback-result > p {
  margin: 9px 0;
  color: #5f7165;
  font-size: 10px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.feedback-result > small {
  color: #8a9d8f;
  font-size: 8px;
}

.course-code-input {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.course-code-input .form-control {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
}

.course-code-input .small-action {
  min-height: 48px;
}

.student-work-preview {
  max-height: 200px;
  overflow: auto;
  margin: 0 0 17px;
  padding: 12px;
  border: 1px solid #efedf5;
  border-radius: 9px;
  background: #fbfaff;
}

.student-work-preview strong {
  color: #777187;
  font-size: 9px;
}

.student-work-preview p {
  margin: 8px 0 0;
  color: #626475;
  font-size: 10px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.course-code-help {
  display: block;
  margin: -4px 0 0;
  font-size: 9px;
}

.access-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #e9e6f5;
  border-radius: 9px;
  background: #fbfaff;
  color: #747185;
}

.access-note > span {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #efecff;
  color: #7059db;
  font-size: 11px;
  font-weight: 700;
}

.access-note p {
  margin: 1px 0 0;
  font-size: 10px;
  line-height: 1.6;
}

.assignment-list {
  display: grid;
  gap: 13px;
}

.assignment-card {
  min-width: 0;
  padding: 19px 21px;
  border: 1px solid #eeeef3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(29, 33, 61, 0.025);
}

.assignment-card-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.assignment-card h2 {
  margin: 14px 0 5px;
  color: #2d3042;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.assignment-description {
  margin: 0;
  color: #777988;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.submission-count,
.assignment-date {
  color: #898b98;
  font-size: 9px;
}

.submission-count {
  margin-left: auto;
}

.assignment-date {
  white-space: nowrap;
}

.status-pill.submitted {
  background: #eaf8f0;
  color: #38885c;
}

.status-pill.pending {
  background: #fff4e8;
  color: #b87b33;
}

.status-pill.overdue {
  background: #fff0f0;
  color: #b6535e;
}

.assignment-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f4;
  color: #8c8e9b;
  font-size: 9px;
}

.assignment-card-footer i {
  padding: 0 4px;
  color: #c2c2cc;
  font-style: normal;
}

.own-submission,
.submission-details {
  margin-top: 13px;
  border-top: 1px solid #f0f0f4;
  color: #747685;
  font-size: 10px;
}

.own-submission summary,
.submission-details summary {
  padding: 12px 2px 2px;
  color: #6b56d1;
  cursor: pointer;
  font-weight: 700;
}

.own-submission p {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #faf9ff;
  line-height: 1.7;
  white-space: pre-wrap;
}

.submission-details summary span {
  margin-left: 5px;
  color: #9999a6;
}

.submission-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.submission-item {
  padding: 12px;
  border: 1px solid #f0eff5;
  border-radius: 9px;
  background: #fcfcfe;
}

.submission-student {
  display: flex;
  align-items: center;
  gap: 9px;
}

.submission-item > p {
  max-height: 190px;
  overflow: auto;
  margin: 11px 0 0;
  padding-top: 10px;
  border-top: 1px solid #eeeef3;
  color: #696b7a;
  font-size: 10px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.no-submissions {
  margin: 12px 0 2px;
  color: #9394a0;
  font-size: 10px;
}

.app-dialog {
  width: min(440px, calc(100% - 32px));
  max-width: none;
  max-height: min(90vh, 850px);
  overflow: auto;
  padding: 24px;
  border: 1px solid #eeedf4;
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 25px 90px rgba(20, 22, 44, 0.2);
}

.app-dialog::backdrop {
  background: rgba(19, 21, 39, 0.48);
  backdrop-filter: blur(3px);
}

.app-dialog-wide {
  width: min(620px, calc(100% - 32px));
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.dialog-header h2 {
  margin: 6px 0 0;
  color: #26293b;
  font-family: "Manrope", sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.7px;
}

.dialog-close {
  border-color: #efeff4;
  font-size: 21px;
}

.dialog-input {
  margin-bottom: 14px;
  font-size: 12px;
}

.dialog-input.form-select {
  min-height: 46px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 8px;
}

.dialog-actions .submit-button {
  min-height: 42px;
  padding: 0 14px;
}

.cancel-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #e8e8ef;
  border-radius: 8px;
  color: #777989;
  font-size: 11px;
}

.cancel-button:hover {
  background: #f7f7fa;
}

.profile-dialog-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid #f0eff5;
  border-radius: 10px;
  background: #fbfaff;
}

.profile-dialog-user > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.profile-dialog-user strong {
  overflow: hidden;
  color: #343648;
  font-size: 12px;
  text-overflow: ellipsis;
}

.profile-dialog-user > div > span {
  overflow: hidden;
  color: #898b98;
  font-size: 10px;
  text-overflow: ellipsis;
}

.profile-detail {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 15px 0 20px;
  padding: 0 2px;
  color: #858694;
  font-size: 10px;
}

.profile-detail strong {
  color: #4b4d5e;
}

.dialog-done {
  min-height: 42px;
}

.dialog-description {
  margin: -7px 0 18px;
  color: #777989;
  font-size: 11px;
}

.submission-textarea {
  min-height: 210px;
  resize: vertical;
  line-height: 1.7;
}

.teacher-access-status {
  display: block;
  margin-top: 5px;
  font-size: 9px;
}

.teacher-access-status.is-active {
  color: #43845c;
}

.teacher-access-status.is-expired {
  color: #b15b65;
}

.access-dialog-date {
  margin: -4px 0 17px;
  color: #6352b4;
  font-size: 11px;
  font-weight: 700;
}

.access-dialog-done {
  margin-top: 10px;
}

.access-blocked-card .empty-state {
  max-width: 560px;
}

.access-blocked-card .empty-state p {
  line-height: 1.8;
}

@media (max-width: 1100px) {
  .sidebar {
    width: 230px;
  }

  .dashboard-main {
    margin-left: 230px;
  }

  .topbar {
    left: 230px;
    padding-right: 25px;
    padding-left: 25px;
  }

  .dashboard-content {
    padding-right: 25px;
    padding-left: 25px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sidebar {
    z-index: 45;
    width: min(290px, calc(100vw - 52px));
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop.is-visible {
    position: fixed;
    z-index: 40;
    inset: 0;
    display: block;
    background: rgba(20, 22, 42, 0.38);
  }

  .dashboard-main {
    margin-left: 0;
  }

  .topbar {
    left: 0;
    height: 64px;
    padding: 0 20px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .topbar-leading,
  .topbar-actions {
    gap: 10px;
  }

  .topbar-course {
    max-width: 32%;
  }

  .dashboard-content {
    padding: 94px 20px 40px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .welcome-card {
    grid-row: 1;
    min-height: 230px;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding: 0 13px;
  }

  .topbar-date,
  .topbar-logout > span:last-child,
  .profile-button .profile-copy {
    display: none;
  }

  .topbar-course {
    max-width: 38%;
  }

  .topbar-course strong {
    font-size: 10px;
  }

  .topbar-course small {
    overflow: hidden;
    max-width: 100%;
    font-size: 8px;
  }

  .topbar-logout {
    width: 34px;
    justify-content: center;
    padding: 0;
  }

  .dashboard-content {
    padding: 87px 14px 30px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 19px;
  }

  .page-action {
    min-height: 39px;
  }

  .stats-grid {
    gap: 9px;
    margin-bottom: 13px;
  }

  .stat-card {
    min-height: 93px;
    gap: 9px;
    padding: 12px 10px;
  }

  .stat-icon {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
    border-radius: 10px;
    font-size: 17px;
  }

  .stat-label {
    font-size: 9px;
  }

  .stat-value {
    font-size: 21px;
  }

  .stat-spark {
    top: 7px;
    right: 9px;
    font-size: 11px;
  }

  .recent-card,
  .user-management-card,
  .submission-preview {
    padding: 16px 13px;
  }

  .card-heading h2 {
    font-size: 14px;
  }

  .recent-date {
    max-width: 72px;
    font-size: 8px;
    text-align: right;
    white-space: normal;
  }

  .assignment-card {
    padding: 15px 13px;
  }

  .feedback-card {
    padding: 16px 13px;
  }

  .assignment-card-top {
    flex-wrap: wrap;
    gap: 7px;
  }

  .submission-count {
    margin-left: 0;
  }

  .assignment-date {
    width: 100%;
    margin-left: 44px;
  }

  .assignment-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-dialog {
    padding: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
