:root {
  --account-lime: #cef43d;
  --account-mint: #29d9bd;
  --account-ink: #101416;
  --account-panel: #171c1f;
  --account-line: #30383c;
  --account-paper: #f5f7f3;
  --account-muted: #859095;
  --account-danger: #ff6b63;
}

.is-hidden,
[hidden] {
  display: none !important;
}

button,
input {
  letter-spacing: 0;
}

.profile-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  padding: 5px 8px 5px 5px;
  border: 1px solid #cdd3ce;
  border-radius: 7px;
  background: #fff;
  color: #111718;
  cursor: pointer;
  box-shadow: none;
}

.profile-button:hover,
.profile-button[aria-expanded="true"] {
  border-color: #101516;
  background: #edf1ed;
  transform: none;
}

.profile-avatar {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  overflow: hidden;
  border-radius: 50%;
  background: #111718;
}

.profile-avatar::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--account-lime);
  transform: translateX(-50%);
}

.profile-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 17px;
  height: 9px;
  border-radius: 9px 9px 4px 4px;
  background: var(--account-lime);
  transform: translateX(-50%);
}

.profile-avatar img {
  position: relative;
  z-index: 1;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar.has-image img {
  display: block;
}

.profile-avatar.has-image::before,
.profile-avatar.has-image::after {
  display: none;
}

.profile-copy {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
}

.profile-copy strong {
  max-width: 120px;
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  margin-top: 3px;
  color: #6f797c;
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-menu {
  position: fixed;
  top: 74px;
  right: 18px;
  z-index: 90;
  width: min(300px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid var(--account-line);
  border-radius: 8px;
  background: #131719;
  color: #f4f7f4;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.42);
}

.profile-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 5px 11px;
  border-bottom: 1px solid var(--account-line);
}

.profile-avatar-large {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.profile-menu-head div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.profile-menu-head strong,
.profile-menu-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu-head strong {
  font-size: 0.86rem;
}

.profile-menu-head small {
  color: #8f9a9e;
  font-size: 0.66rem;
}

.profile-quota {
  margin: 9px 0;
  padding: 9px 10px;
  border: 1px solid rgba(206, 244, 61, 0.24);
  border-radius: 6px;
  background: rgba(206, 244, 61, 0.08);
  color: var(--account-lime);
  font-size: 0.72rem;
  font-weight: 850;
}

.profile-photo-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin-top: 9px;
}

.profile-photo-actions input[type="file"] {
  display: none;
}

.profile-photo-button,
.profile-photo-actions button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 9px;
  border: 1px solid #3a4549;
  border-radius: 6px;
  background: #20272a;
  color: #eef3ef;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.profile-photo-button:hover,
.profile-photo-actions button:hover {
  border-color: var(--account-lime);
  transform: none;
}

.profile-photo-actions button {
  color: #ff9a94;
}

.profile-photo-actions p {
  grid-column: 1 / -1;
  min-height: 14px;
  margin: 0;
  color: #9ba6a2;
  font-size: 0.58rem;
  line-height: 1.35;
}

.profile-photo-actions p.is-error {
  color: var(--account-danger);
}

.profile-menu > button {
  width: 100%;
  min-height: 38px;
  margin-top: 5px;
  border: 1px solid #30383c;
  border-radius: 6px;
  background: #1d2326;
  color: #eef2ef;
  text-align: left;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.profile-menu > button:hover {
  border-color: #526066;
  background: #252c30;
  transform: none;
}

.profile-menu > button.danger-text {
  color: #ff928c;
}

.solver-status-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quota-pill {
  padding: 7px 9px;
  border: 1px solid #3a4549;
  border-radius: 6px;
  background: #1e2528;
  color: #b9c3c6;
  font-size: 0.64rem;
  font-weight: 850;
}

.account-modal,
.student-editor {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 8, 9, 0.76);
  backdrop-filter: blur(8px);
}

.account-dialog,
.student-editor-card {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid #3a4448;
  border-radius: 8px;
  background: #14191b;
  color: #f5f7f5;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.58);
}

.account-dialog::before,
.student-editor-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--account-lime), var(--account-mint));
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #394246;
  border-radius: 50%;
  background: #202629;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.account-brand,
.admin-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-brand > div {
  display: grid;
  gap: 3px;
}

.account-brand strong {
  font-size: 0.86rem;
}

.account-brand small {
  color: #8e999d;
  font-size: 0.66rem;
  font-weight: 750;
  text-transform: uppercase;
}

.account-dialog h2 {
  margin: 25px 0 7px;
  font-size: 1.55rem;
}

.account-lead {
  margin: 0 0 18px;
  color: #98a3a7;
  font-size: 0.8rem;
  line-height: 1.55;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 18px;
  border-bottom: 1px solid #333c40;
}

.auth-tabs button {
  min-height: 40px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #8d989c;
  font-size: 0.74rem;
  font-weight: 850;
  cursor: pointer;
}

.auth-tabs button.is-active {
  border-bottom-color: var(--account-lime);
  color: #fff;
}

.account-form,
.student-editor-card {
  gap: 13px;
}

.account-form {
  display: grid;
}

.account-form label,
.settings-form label,
.student-editor-card label {
  display: grid;
  gap: 6px;
  color: #b9c3c6;
  font-size: 0.68rem;
  font-weight: 820;
}

.account-form input,
.settings-form input,
.student-editor-card input,
.student-toolbar input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #3a4549;
  border-radius: 6px;
  outline: 0;
  background: #202629;
  color: #f7faf8;
}

.account-form input:focus,
.settings-form input:focus,
.student-editor-card input:focus,
.student-toolbar input:focus {
  border-color: var(--account-mint);
  box-shadow: 0 0 0 3px rgba(41, 217, 189, 0.11);
}

.primary-action {
  min-height: 42px;
  border: 1px solid var(--account-lime);
  border-radius: 6px;
  background: var(--account-lime);
  color: #111608;
  font-weight: 900;
  cursor: pointer;
}

.primary-action:disabled {
  opacity: 0.55;
  cursor: wait;
}

.text-action {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--account-mint);
  font-weight: 800;
  cursor: pointer;
}

.form-note,
.account-message,
.student-editor-card > p:last-child {
  margin: 0;
  color: #8d989c;
  font-size: 0.68rem;
  line-height: 1.45;
}

.account-message:not(:empty),
.student-editor-card > p:last-child:not(:empty) {
  margin-top: 12px;
  padding: 9px 10px;
  border-left: 3px solid var(--account-mint);
  background: rgba(41, 217, 189, 0.08);
  color: #d6e2df;
}

.account-message.is-error,
.student-editor-card > p:last-child.is-error {
  border-left-color: var(--account-danger);
  background: rgba(255, 107, 99, 0.08);
  color: #ffaaa5;
}

.otp-email,
.development-otp,
.setup-badge {
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
}

.otp-email {
  background: #202629;
  color: #b9c3c6;
}

.development-otp {
  border: 1px dashed #677700;
  background: rgba(206, 244, 61, 0.08);
  color: var(--account-lime);
}

.setup-badge {
  border: 1px solid rgba(41, 217, 189, 0.28);
  background: rgba(41, 217, 189, 0.08);
  color: var(--account-mint);
}

.admin-console {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr);
  overflow: hidden;
  background: #0d1113;
  color: #f4f7f4;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid #2c3437;
  background: #151a1c;
}

.admin-title .brand-mark {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  box-shadow: 4px 4px 0 var(--account-lime);
}

.admin-title p,
.admin-title h2 {
  margin: 0;
}

.admin-title p {
  color: var(--account-lime);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-title h2 {
  margin-top: 3px;
  font-size: 1rem;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9aa5a8;
  font-size: 0.7rem;
  font-weight: 750;
}

.admin-header-actions button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #3b4549;
  border-radius: 50%;
  background: #22282b;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.admin-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 0;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 12px;
  border-right: 1px solid #2c3437;
  background: #121719;
}

.admin-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #9aa5a8;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 820;
  cursor: pointer;
}

.admin-nav button span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #394347;
  border-radius: 5px;
  color: #778286;
  font-size: 0.58rem;
}

.admin-nav button.is-active {
  border-color: rgba(206, 244, 61, 0.3);
  background: rgba(206, 244, 61, 0.08);
  color: #fff;
}

.admin-nav button.is-active span {
  border-color: var(--account-lime);
  background: var(--account-lime);
  color: #111608;
}

.admin-main {
  min-width: 0;
  overflow-y: auto;
  background: #0f1416;
}

.admin-view {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.admin-view-head,
.student-toolbar,
.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-view-head {
  margin-bottom: 18px;
}

.admin-view-head p,
.admin-view-head h3 {
  margin: 0;
}

.admin-view-head p,
.student-editor-card > p:first-of-type {
  color: var(--account-lime);
  font-size: 0.59rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.admin-view-head h3 {
  margin-top: 4px;
  font-size: 1.35rem;
}

.admin-view-head button,
.settings-actions > button:not(.primary-action) {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #3a4549;
  border-radius: 6px;
  background: #202629;
  color: #eef2ef;
  font-size: 0.7rem;
  font-weight: 820;
  cursor: pointer;
}

.security-note {
  color: #8f999d;
  font-size: 0.66rem;
  font-weight: 750;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid #2e373a;
  border-radius: 8px;
  background: #171c1f;
}

.admin-stat {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid #2e373a;
}

.admin-stat:last-child {
  border-right: 0;
}

.admin-stat span,
.admin-stat strong {
  display: block;
}

.admin-stat span {
  color: #7f8a8e;
  font-size: 0.59rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-stat strong {
  margin-top: 5px;
  color: var(--account-lime);
  font-size: 1.45rem;
}

.student-toolbar {
  margin-bottom: 10px;
}

.student-toolbar input {
  max-width: 330px;
}

.student-toolbar span {
  color: #7f8a8e;
  font-size: 0.65rem;
  font-weight: 750;
}

.student-table-wrap {
  overflow: auto;
  border: 1px solid #2f383b;
  border-radius: 8px;
  background: #171c1f;
}

.student-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

.student-table th,
.student-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #2d3539;
  text-align: left;
  vertical-align: middle;
}

.student-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #202629;
  color: #8e999d;
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.student-table td {
  color: #c3cccf;
  font-size: 0.7rem;
}

.student-table tr:last-child td {
  border-bottom: 0;
}

.student-cell strong,
.student-cell small {
  display: block;
}

.student-cell strong {
  color: #fff;
  font-size: 0.76rem;
}

.student-cell small {
  margin-top: 4px;
  color: #7e898d;
}

.status-tag {
  display: inline-flex;
  padding: 5px 7px;
  border: 1px solid #3a4549;
  border-radius: 5px;
  color: #aab4b7;
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-tag.is-good {
  border-color: rgba(41, 217, 189, 0.3);
  background: rgba(41, 217, 189, 0.08);
  color: var(--account-mint);
}

.status-tag.is-off {
  border-color: rgba(255, 107, 99, 0.3);
  background: rgba(255, 107, 99, 0.08);
  color: #ff918b;
}

.usage-meter {
  display: grid;
  grid-template-columns: repeat(3, 11px);
  gap: 3px;
}

.usage-meter i {
  width: 11px;
  height: 7px;
  border-radius: 2px;
  background: #343d41;
}

.usage-meter i.is-used {
  background: var(--account-lime);
}

.row-actions {
  display: flex;
  gap: 6px;
}

.row-actions button {
  min-height: 31px;
  padding: 6px 8px;
  border: 1px solid #3a4549;
  border-radius: 5px;
  background: #22282b;
  color: #e7ece9;
  font-size: 0.62rem;
  font-weight: 820;
  cursor: pointer;
}

.row-actions button.is-danger {
  color: #ff918b;
}

.settings-form {
  display: grid;
  gap: 16px;
}

.settings-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid #2f383b;
  border-radius: 8px;
  background: #171c1f;
}

.settings-form legend {
  padding: 0 7px;
  color: #eef2ef;
  font-size: 0.75rem;
  font-weight: 900;
}

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

.settings-form label small {
  color: #748085;
  font-size: 0.6rem;
  font-weight: 700;
}

.toggle-field {
  display: flex !important;
  align-items: center;
  align-self: end;
  min-height: 42px;
  flex-direction: row;
  gap: 9px !important;
  padding: 9px 11px;
  border: 1px solid #3a4549;
  border-radius: 6px;
  background: #202629;
}

.toggle-field input {
  width: 17px !important;
  min-height: 17px !important;
  margin: 0;
  accent-color: var(--account-lime);
}

.settings-actions {
  justify-content: flex-start;
}

.settings-actions .primary-action {
  padding-inline: 18px;
}

.settings-actions span {
  color: #9da7aa;
  font-size: 0.68rem;
}

.gmail-admin-email {
  margin-top: 24px;
  padding-top: 23px;
  border-top: 1px solid #2f383b;
}

.gmail-settings-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: end;
  gap: 24px;
  margin-bottom: 18px;
}

.gmail-settings-head p,
.gmail-settings-head h3,
.gmail-card-title p,
.gmail-card-title h4,
.gmail-setup-guide p,
.gmail-setup-guide h4 {
  margin: 0;
}

.gmail-settings-head p,
.gmail-card-title p,
.gmail-setup-guide > p {
  color: var(--account-mint);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.gmail-settings-head h3 {
  margin-top: 5px;
  font-size: clamp(1.2rem, 2.1vw, 1.75rem);
}

.gmail-settings-head > div:first-child > span,
.gmail-card-title > span {
  display: block;
  margin-top: 6px;
  color: #8f9a9f;
  font-size: 0.68rem;
  line-height: 1.55;
}

.gmail-connection-card {
  min-height: 80px;
  padding: 13px 15px;
  border: 1px solid #374145;
  border-left: 3px solid #667276;
  border-radius: 7px;
  background: #171c1f;
}

.gmail-connection-card small,
.gmail-connection-card strong,
.gmail-connection-card time {
  display: block;
}

.gmail-connection-card small,
.gmail-connection-card time {
  color: #7e898e;
  font-size: 0.58rem;
}

.gmail-connection-card strong {
  margin: 4px 0;
  color: #c5ced0;
  font-size: 1.03rem;
}

.gmail-connection-card.is-verified {
  border-left-color: var(--account-mint);
}

.gmail-connection-card.is-verified strong {
  color: var(--account-mint);
}

.gmail-connection-card.is-changed {
  border-left-color: var(--account-lime);
}

.gmail-connection-card.is-changed strong {
  color: var(--account-lime);
}

.gmail-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.7fr);
  gap: 16px;
  align-items: stretch;
}

.gmail-connect-card,
.gmail-setup-guide {
  min-width: 0;
  padding: 20px;
  border: 1px solid #2f383b;
  border-radius: 8px;
  background: #171c1f;
}

.gmail-card-title h4,
.gmail-setup-guide h4 {
  margin-top: 5px;
  color: #f3f6f4;
  font-size: 1rem;
}

.gmail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.gmail-fields label {
  display: grid;
  gap: 6px;
  color: #b9c3c6;
  font-size: 0.68rem;
  font-weight: 820;
}

.gmail-fields input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #3a4549;
  border-radius: 6px;
  outline: 0;
  background: #202629;
  color: #f7faf8;
}

.gmail-fields input:focus {
  border-color: var(--account-mint);
  box-shadow: 0 0 0 3px rgba(41, 217, 189, 0.11);
}

.gmail-password-field {
  grid-column: 1 / -1;
}

.gmail-password-field small {
  color: #748085;
  font-size: 0.6rem;
  font-weight: 700;
}

.gmail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.gmail-actions button {
  min-height: 42px;
  padding-inline: 17px;
}

.gmail-remove {
  border: 1px solid #4b3b3d;
  border-radius: 6px;
  background: #211a1c;
  color: #ff918b;
  font-weight: 820;
  cursor: pointer;
}

.gmail-actions span {
  color: #9da7aa;
  font-size: 0.66rem;
  line-height: 1.4;
}

.gmail-actions span.is-error {
  color: #ff918b;
}

.gmail-setup-guide ol {
  margin: 17px 0;
  padding-left: 19px;
  color: #aeb8bb;
  font-size: 0.68rem;
  line-height: 1.8;
}

.gmail-setup-guide li::marker {
  color: var(--account-lime);
  font-weight: 900;
}

.gmail-setup-guide a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #465156;
  border-radius: 6px;
  color: #eef2ef;
  font-size: 0.68rem;
  font-weight: 850;
  text-decoration: none;
}

.gmail-setup-guide a:hover {
  border-color: var(--account-mint);
  color: var(--account-mint);
}

.gmail-setup-guide > small {
  display: block;
  margin-top: 11px;
  color: #748085;
  font-size: 0.57rem;
  line-height: 1.5;
}

.student-editor-card {
  display: grid;
  width: min(420px, 100%);
}

.student-editor-card > p:first-of-type,
.student-editor-card h3 {
  margin: 0;
}

.student-editor-card h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .admin-nav button {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .admin-stats,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stat:nth-child(2) {
    border-right: 0;
  }

  .admin-stat:nth-child(-n + 2) {
    border-bottom: 1px solid #2e373a;
  }

  .gmail-settings-layout {
    grid-template-columns: 1fr;
  }

  .gmail-setup-guide {
    order: -1;
  }
}

@media (max-width: 600px) {
  .profile-copy {
    display: none;
  }

  .profile-button {
    width: 36px;
    height: 36px;
    padding: 3px;
    border-radius: 50%;
  }

  .profile-avatar {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .profile-menu {
    top: 62px;
    right: 8px;
  }

  .solver-status-group {
    align-items: flex-end;
    flex-direction: column-reverse;
    gap: 4px;
  }

  .quota-pill {
    max-width: 94px;
    overflow: hidden;
    padding: 4px 6px;
    font-size: 0.52rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-modal,
  .student-editor {
    align-items: end;
    padding: 0;
  }

  .account-dialog,
  .student-editor-card {
    width: 100%;
    max-height: 92dvh;
    padding: 22px 18px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .admin-console {
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .admin-header {
    padding: 0 10px;
  }

  .admin-title .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .admin-title p,
  .admin-header-actions span {
    display: none;
  }

  .admin-title h2 {
    font-size: 0.85rem;
  }

  .admin-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .admin-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-direction: row;
    padding: 7px;
    border-right: 0;
    border-bottom: 1px solid #2c3437;
  }

  .admin-nav button {
    min-height: 40px;
    align-items: center;
    flex-direction: row;
    padding: 5px 7px;
    font-size: 0.62rem;
  }

  .admin-nav button span {
    width: 24px;
    height: 24px;
  }

  .admin-view {
    padding: 14px 10px 28px;
  }

  .admin-view-head {
    align-items: flex-start;
  }

  .admin-view-head h3 {
    font-size: 1.05rem;
  }

  .security-note {
    max-width: 120px;
    text-align: right;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stat {
    padding: 12px;
  }

  .admin-stat strong {
    font-size: 1.2rem;
  }

  .student-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .student-toolbar input {
    max-width: none;
  }

  .student-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .student-table,
  .student-table tbody,
  .student-table tr,
  .student-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .student-table thead {
    display: none;
  }

  .student-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 9px;
    overflow: hidden;
    border: 1px solid #2f383b;
    border-radius: 8px;
    background: #171c1f;
  }

  .student-table td {
    min-width: 0;
    padding: 10px;
    border-bottom: 1px solid #2d3539;
  }

  .student-table td:first-child,
  .student-table td:last-child {
    grid-column: 1 / -1;
  }

  .student-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: #707b7f;
    font-size: 0.52rem;
    font-weight: 900;
    text-transform: uppercase;
  }

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

  .settings-form fieldset {
    padding: 14px 11px;
  }

  .settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-actions span {
    min-height: 18px;
  }

  .gmail-settings-head,
  .gmail-fields {
    grid-template-columns: 1fr;
  }

  .gmail-settings-head {
    align-items: stretch;
  }

  .gmail-password-field {
    grid-column: auto;
  }

  .gmail-connect-card,
  .gmail-setup-guide {
    padding: 15px 12px;
  }

  .gmail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .gmail-actions span {
    min-height: 18px;
  }
}

/* Current-theme loading sequence */
.intro-loader.loader-v2 {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0a0e10;
  color: #f4f7f4;
}

.intro-loader.loader-v2::before {
  content: none;
}

.intro-loader.loader-v2::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: none;
  pointer-events: none;
}

.loader-matrix {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.loader-matrix::before,
.loader-matrix::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-color: var(--account-lime);
  opacity: 0.4;
}

.loader-matrix::before {
  top: 48px;
  left: 48px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.loader-matrix::after {
  right: 48px;
  bottom: 48px;
  border-right: 2px solid;
  border-bottom: 2px solid;
  border-color: var(--account-mint);
}

.loader-float-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.loader-float-field span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  color: rgba(190, 227, 214, 0.28);
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--size);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 14px rgba(41, 217, 189, 0.14);
  transform: translate3d(0, 0, 0);
  animation: loaderFloat var(--speed) ease-in-out var(--delay) infinite alternate;
}

.loader-float-field span:nth-child(3n + 1) {
  color: rgba(206, 244, 61, 0.24);
  text-shadow: 0 0 16px rgba(206, 244, 61, 0.12);
}

.loader-float-field span:nth-child(even) {
  filter: blur(0.45px);
  opacity: 0.72;
}

.loader-float-field span:nth-child(1) { --x: 7%; --y: 18%; --size: 2.1rem; --speed: 5.8s; --delay: -1.2s; --drift: 18px; }
.loader-float-field span:nth-child(2) { --x: 19%; --y: 68%; --size: 2.6rem; --speed: 6.8s; --delay: -3.1s; --drift: 25px; }
.loader-float-field span:nth-child(3) { --x: 29%; --y: 13%; --size: 1.45rem; --speed: 5.2s; --delay: -2.4s; --drift: 16px; }
.loader-float-field span:nth-child(4) { --x: 73%; --y: 15%; --size: 2.4rem; --speed: 7.2s; --delay: -4.6s; --drift: 22px; }
.loader-float-field span:nth-child(5) { --x: 87%; --y: 61%; --size: 2.8rem; --speed: 6.3s; --delay: -2.8s; --drift: 28px; }
.loader-float-field span:nth-child(6) { --x: 76%; --y: 78%; --size: 1.35rem; --speed: 5.5s; --delay: -1.7s; --drift: 17px; }
.loader-float-field span:nth-child(7) { --x: 10%; --y: 84%; --size: 1.8rem; --speed: 7.6s; --delay: -5.2s; --drift: 24px; }
.loader-float-field span:nth-child(8) { --x: 91%; --y: 24%; --size: 1.9rem; --speed: 6.9s; --delay: -3.7s; --drift: 20px; }
.loader-float-field span:nth-child(9) { --x: 55%; --y: 89%; --size: 1.5rem; --speed: 6.1s; --delay: -2.1s; --drift: 19px; }
.loader-float-field span:nth-child(10) { --x: 48%; --y: 8%; --size: 1.75rem; --speed: 7.4s; --delay: -4.1s; --drift: 23px; }

.loader-shell {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(620px, calc(100vw - 44px));
  justify-items: center;
  padding: 44px;
  border: 1px solid #30383c;
  border-radius: 8px;
  background: rgba(18, 23, 25, 0.94);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.58);
  text-align: center;
}

.loader-shell::before,
.loader-shell::after {
  content: "";
  position: absolute;
  top: -1px;
  width: 34%;
  height: 3px;
}

.loader-shell::before {
  left: -1px;
  background: var(--account-lime);
}

.loader-shell::after {
  right: -1px;
  background: var(--account-mint);
}

.loader-brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 22px;
  border: 1px solid #465155;
  border-radius: 8px;
  background: #0d1214;
}

.loader-brand-mark span {
  position: relative;
  z-index: 2;
  color: var(--account-lime);
  font-size: 2rem;
  font-weight: 950;
}

.loader-brand-mark i,
.loader-brand-mark b {
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(206, 244, 61, 0.38);
  border-radius: 8px;
  animation: loaderBracket 2.2s ease-in-out infinite;
}

.loader-brand-mark b {
  inset: -17px;
  border-color: rgba(41, 217, 189, 0.22);
  animation-delay: -1.1s;
}

.loader-name {
  margin: 0;
  color: var(--account-lime);
  font-size: clamp(0.76rem, 2vw, 0.92rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.loader-shell h1 {
  display: flex;
  align-items: baseline;
  margin: 9px 0 24px;
  color: #f7faf8;
  font-size: clamp(2.2rem, 8vw, 5rem);
  line-height: 1;
  letter-spacing: 0;
}

.loader-dots {
  display: inline-block;
  width: 1.6em;
  overflow: hidden;
  color: var(--account-mint);
  font-size: 0.42em;
  white-space: nowrap;
  animation: loaderDots 1.4s steps(9, end) infinite;
}

.loader-modules {
  display: grid;
  grid-template-columns: repeat(5, 46px);
  gap: 8px;
  margin-bottom: 28px;
}

.loader-modules span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 38px;
  border: 1px solid #354044;
  border-radius: 5px;
  background: #1c2326;
  color: #aab5b8;
  font-family: Georgia, serif;
  font-size: 0.82rem;
  font-weight: 800;
  animation: loaderModule 1.8s ease-in-out infinite;
}

.loader-modules span:nth-child(2) { animation-delay: 0.16s; }
.loader-modules span:nth-child(3) { animation-delay: 0.32s; }
.loader-modules span:nth-child(4) { animation-delay: 0.48s; }
.loader-modules span:nth-child(5) { animation-delay: 0.64s; }

.loader-progress {
  width: min(420px, 100%);
  height: 6px;
  overflow: hidden;
  border: 1px solid #344044;
  border-radius: 3px;
  background: #0d1214;
}

.loader-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--account-lime), var(--account-mint));
  transform-origin: left;
  animation: loaderProgressCurrent 3s cubic-bezier(0.2, 0.72, 0.2, 1) forwards;
}

.loader-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  color: #8d989c;
  font-size: 0.67rem;
  font-weight: 750;
}

.loader-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--account-mint);
  box-shadow: 0 0 0 4px rgba(41, 217, 189, 0.1);
  animation: loaderStatus 1s ease-in-out infinite;
}

@keyframes loaderBracket {
  0%, 100% { transform: scale(0.94); opacity: 0.25; }
  50% { transform: scale(1.04); opacity: 0.85; }
}

@keyframes loaderFloat {
  0% { transform: translate3d(calc(0px - var(--drift)), 12px, 0) rotate(-4deg); }
  45% { transform: translate3d(5px, -7px, 0) rotate(1deg); }
  100% { transform: translate3d(var(--drift), -20px, 0) rotate(5deg); }
}

@keyframes loaderDots {
  from { width: 0; }
  to { width: 1.6em; }
}

@keyframes loaderModule {
  0%, 100% { border-color: #354044; color: #758084; }
  50% { border-color: var(--account-lime); color: var(--account-lime); }
}

@keyframes loaderProgressCurrent {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes loaderStatus {
  50% { opacity: 0.35; }
}

/* Password controls */
.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle span {
  position: relative;
  width: 19px;
  height: 12px;
  border: 2px solid #9aa5a8;
  border-radius: 50% / 65%;
}

.password-toggle span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9aa5a8;
  transform: translate(-50%, -50%);
}

.password-toggle.is-visible span {
  border-color: var(--account-lime);
}

.password-toggle.is-visible span::before {
  background: var(--account-lime);
}

.forgot-password {
  justify-self: end;
  margin-top: -5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--account-mint);
  font-size: 0.68rem;
  font-weight: 820;
  cursor: pointer;
}

.development-reset {
  display: block;
  padding: 9px 10px;
  border: 1px dashed #718500;
  border-radius: 6px;
  color: var(--account-lime);
  font-size: 0.68rem;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 600px) {
  .intro-loader.loader-v2::after {
    inset: 8px;
  }

  .loader-matrix::before {
    top: 24px;
    left: 24px;
  }

  .loader-matrix::after {
    right: 24px;
    bottom: 24px;
  }

  .loader-float-field span {
    font-size: min(var(--size), 1.65rem);
    opacity: 0.65;
  }

  .loader-float-field span:nth-child(3),
  .loader-float-field span:nth-child(6),
  .loader-float-field span:nth-child(9),
  .loader-float-field span:nth-child(10) {
    display: none;
  }

  .loader-shell {
    width: calc(100vw - 28px);
    padding: 34px 18px;
  }

  .loader-brand-mark {
    width: 64px;
    height: 64px;
  }

  .loader-shell h1 {
    margin-bottom: 20px;
  }

  .loader-modules {
    grid-template-columns: repeat(5, 38px);
    gap: 5px;
  }

  .loader-modules span {
    width: 38px;
    height: 34px;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader-brand-mark i,
  .loader-brand-mark b,
  .loader-float-field span,
  .loader-dots,
  .loader-modules span,
  .loader-status i {
    animation: none;
  }
}

html.superadmin-route,
html.superadmin-route body {
  min-height: 100%;
  background: #0a0f11;
}

html.superadmin-route .intro-loader,
html.superadmin-route #particleCanvas,
html.superadmin-route .app-shell,
html.superadmin-route .profile-menu,
html.superadmin-route .chat-community,
html.superadmin-route .chat-guidelines,
html.superadmin-route .chat-image-editor,
html.superadmin-route .chat-context-menu,
html.superadmin-route .floating-calc-button,
html.superadmin-route .floating-calculator {
  display: none !important;
}

html.superadmin-route .account-modal {
  z-index: 200;
  padding: 24px;
  background-color: #0a0f11;
  background-image:
    linear-gradient(rgba(206, 244, 61, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 217, 189, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  backdrop-filter: none;
}

html.superadmin-route .account-dialog {
  width: min(470px, 100%);
  border-color: #3b474a;
  background: #13191b;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.62);
}

html.superadmin-route .account-brand small {
  color: var(--account-lime);
}

html.superadmin-route .account-dialog > .dialog-close,
html.superadmin-route .auth-tabs {
  display: none !important;
}

html.superadmin-route .account-dialog h2 {
  margin-top: 34px;
}

html.superadmin-route .admin-header-actions button.admin-signout {
  width: auto;
  min-width: 76px;
  height: 34px;
  padding: 0 13px;
  border-radius: 5px;
  color: #111718;
  background: var(--account-lime);
  border-color: var(--account-lime);
  font-size: 0.68rem;
  font-weight: 900;
}

@media (max-width: 600px) {
  html.superadmin-route .account-modal {
    align-items: center;
    padding: 14px;
  }

  html.superadmin-route .account-dialog {
    width: 100%;
    max-height: calc(100dvh - 28px);
    padding: 24px 20px;
    border: 1px solid #3b474a;
    border-radius: 8px;
  }
}
