/* Generated by scripts/build-account-css.js — do not edit; edit tokens.css, layout.css, account.css and rebuild */

/* Brand tokens — align with website/docs/bgteacher-colour-usage-guide.md */
:root {
  --color-brand-primary: #2f5d8a;
  --color-brand-strong: #23486b;
  --color-info-bg: #dce9f5;
  --color-success: #2f8f5b;
  --color-error: #c94b4b;
  --color-warning: #d48a2f;
  --color-accent: #e6a84a;
  --color-bg-base: #f7f5f0;
  /* Manage staff shell: slightly cooler canvas (profile uses this) */
  --color-bg-canvas: #eef1f4;
  /* Back link on profile (distinct from nav links; matches manage staff UX) */
  --color-breadcrumb-link: #8b4aab;
  --color-surface: #ffffff;
  --color-text: #1f2a33;
  --color-text-muted: #66727d;
  --color-border: #d8e0e6;
  --shadow-rgb: 31, 42, 51;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(var(--shadow-rgb), 0.08);
  --rgb-brand: 47, 93, 138;
  --rgb-success: 47, 143, 91;
  --rgb-warning: 212, 138, 47;
  --rgb-supportive: 127, 162, 135;
  --color-supportive: #7fa287;
  --color-alert-error-bg: #fceeee;
  --color-alert-error-border: #e5b4b8;
}


/**
 * Member portal shell (account only — self-hosted CSS; do not import manage).
 */
body.page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg-base);
  line-height: 1.5;
}
.shell { max-width: 28rem; margin: 0 auto; padding: 2rem 1rem; }
.shell--wide { max-width: 56rem; }
.shell--full {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 3vw, 2.5rem) 2.5rem;
}
.shell__header { margin-bottom: 1.5rem; }
.shell__title {
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
  color: var(--color-brand-strong);
}
.shell__muted { color: var(--color-text-muted); margin: 0; font-size: 0.95rem; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  overflow: visible;
}
.topbar__brand { font-weight: 700; color: var(--color-text); text-decoration: none; }
.topbar__brand:hover { color: var(--color-brand-primary); }
.topbar__badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-brand-strong);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.25rem;
}
.topbar__nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: visible;
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
}
.staff-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
  overflow: visible;
}
.staff-nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
}
.staff-nav__link:hover { text-decoration: underline; color: var(--color-brand-primary); }
/* Match manage: active top-level nav looks like a pill (dashboard, inbox, …) */
.topbar .staff-nav > a.staff-nav__link--active {
  font-weight: 700;
  color: #fff !important;
  text-decoration: none;
  background: var(--color-brand-primary);
  padding: 0.38rem 0.85rem;
  border-radius: 6px;
}
.topbar .staff-nav > a.staff-nav__link--active:hover {
  background: var(--color-brand-strong);
  color: #fff !important;
}
.staff-nav__link--active { font-weight: 700; color: var(--color-brand-primary); }
.staff-nav__dropdown { position: relative; display: inline-block; align-self: center; vertical-align: middle; }
.staff-nav__dropdown-summary { list-style: none; cursor: pointer; }
.staff-nav__dropdown-summary::-webkit-details-marker { display: none; }
.staff-nav__dropdown-summary::after {
  content: ''; display: inline-block; margin-left: 0.35rem; vertical-align: middle;
  border: solid currentColor; border-width: 0 0.1em 0.1em 0; padding: 0.2em;
  transform: rotate(45deg); margin-top: -0.15em; opacity: 0.75;
}
.staff-nav__dropdown[open] .staff-nav__dropdown-summary::after {
  margin-top: 0.1em; transform: rotate(-135deg);
}
.staff-nav__dropdown-panel {
  position: absolute; left: 0; top: calc(100% + 0.2rem);
  min-width: max(100%, 12rem); padding: 0.35rem 0; margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 200;
}
.staff-nav__dropdown-menu { list-style: none; margin: 0; padding: 0; }
.staff-nav__dropdown-menu li { margin: 0; }
.staff-nav__dropdown-item {
  display: block; padding: 0.45rem 0.85rem; font-size: 0.9rem; font-weight: 500;
  text-decoration: none; color: var(--color-text); white-space: nowrap;
}
.staff-nav__dropdown-item:hover {
  text-decoration: none; background: var(--color-info-bg); color: var(--color-brand-primary);
}
.staff-nav__dropdown-item.staff-nav__link--active {
  background: color-mix(in srgb, var(--color-info-bg) 65%, var(--color-surface));
  color: var(--color-brand-primary);
  font-weight: 600;
}
.staff-nav__dropdown--end { margin-left: auto; }
.staff-nav__dropdown--end .staff-nav__dropdown-panel { left: auto; right: 0; }
.staff-nav__dropdown-summary--account {
  max-width: 14rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.staff-nav__account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
}
.staff-nav__account-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.staff-nav__account-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.staff-nav__account-avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--color-brand-primary) 22%, var(--color-surface));
  color: var(--color-brand-primary);
}
.staff-nav__dropdown-meta {
  padding: 0.35rem 0.85rem 0.3rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0.2rem;
}
.staff-nav__dropdown-role {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--color-text-muted);
}
.staff-nav__dropdown-logout-form { margin: 0; }
.staff-nav__dropdown-item--button {
  width: 100%; box-sizing: border-box; display: block; padding: 0.45rem 0.85rem;
  font-size: 0.9rem; font-weight: 500; text-align: left; border: none; background: none;
  cursor: pointer; font-family: inherit; color: var(--color-text); white-space: nowrap;
}
.staff-nav__dropdown-item--button:hover {
  background: var(--color-info-bg); color: var(--color-brand-primary);
}
.member-content { max-width: 48rem; }
/* Profile: full-bleed main like manage (shell shell--full only — no max-width cap) */
.shell--profile {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
.shell--profile .member-content.profile-page {
  max-width: none;
  width: 100%;
}
.link-list { padding-left: 1.25rem; line-height: 1.6; }
.link-list a { font-weight: 600; color: var(--color-brand-primary); }
.pager { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }

.member-content--wide { max-width: none; }



* {
  box-sizing: border-box;
}

body.page,
body.account-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg-base);
  line-height: 1.5;
}
/* Staff-like canvas (manage staff profile shell) */
body.page.page--profile {
  background: var(--color-bg-canvas);
}

.account-shell {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2rem);
}

.account-shell--narrow {
  max-width: 28rem;
}

.account-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.account-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-brand-strong);
  margin-bottom: 0.65rem;
}

/* Intrinsic size of applogo.png (270×244); scales down on very narrow viewports */
.account-brand__mark {
  display: block;
  width: 270px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.account-brand__text {
  line-height: 1.35;
}

.account-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--color-brand-strong);
}

.account-lead {
  margin: 0 0 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.account-alert {
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.account-alert--error {
  background: #fceeee;
  border: 1px solid #e5b4b8;
  color: #6b2121;
}

.account-alert--success {
  background: #e8f5ec;
  border: 1px solid #a3d4b3;
  color: #1e4d2a;
}

.account-field {
  margin-bottom: 1rem;
}

.account-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.account-field input[type='email'],
.account-field input[type='password'],
.account-field input[type='text'] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

.account-field input.account-code-input {
  max-width: 11rem;
  letter-spacing: 0.25em;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.account-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.account-remember {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.account-btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.account-btn--primary {
  background: var(--color-brand-primary);
  color: #fff;
  width: 100%;
}

.account-btn--primary:hover {
  background: var(--color-brand-strong);
}

.account-btn--secondary {
  background: var(--color-surface);
  color: var(--color-brand-strong);
  border: 1px solid var(--color-border);
}

.account-btn--secondary:hover {
  border-color: var(--color-brand-primary);
}

.account-link {
  color: var(--color-brand-primary);
  text-decoration: none;
  font-size: 0.9rem;
}

.account-link:hover {
  text-decoration: underline;
}

.account-meta {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.account-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.account-dl {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

.account-dl dt {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
}

.account-dl dd {
  margin: 0.15rem 0 0;
}

/* Member portal: nav, lists */
.account-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.account-nav__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-brand-strong);
  text-decoration: none;
}
.account-nav__link:hover {
  text-decoration: underline;
}
.account-subtitle {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--color-brand-strong);
}
.account-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.account-list__item {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}
.account-list__item a {
  color: var(--color-text);
  text-decoration: none;
}
.account-list__item a:hover {
  text-decoration: underline;
}
.account-muted {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.account-pagination {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  display: flex;
  gap: 1rem;
}
.account-pagination a {
  color: var(--color-brand-strong);
}
.account-field-group {
  margin-top: 0.5rem;
}
.account-input {
  width: 100%;
  max-width: 32rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
}

/* Profile + avatar (staff-portal-style patterns; local copy — do not link manage CSS) */
/* Modal (native dialog) */
dialog.modal {
  margin: auto;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  max-width: min(26rem, calc(100vw - 2rem));
  width: 100%;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 8px 32px rgba(var(--shadow-rgb), 0.14), 0 2px 8px rgba(var(--shadow-rgb), 0.07);
}
dialog.modal::backdrop {
  background: rgba(var(--shadow-rgb), 0.42);
}
.modal__inner {
  padding: 1.15rem 1.25rem 1.25rem;
}
.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.modal__title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--color-brand-strong);
}
.modal__close { flex-shrink: 0; }
.modal__alert { margin: 0 0 0.75rem; }
.modal__form { gap: 0.75rem; margin: 0; }
dialog.modal.modal--lg {
  max-width: min(38rem, calc(100vw - 1.5rem));
}
/* Staff user avatar upload modal (crop + preview) */
.avatar-modal__section {
  margin: 0 0 0.85rem;
}
.avatar-modal__section-title {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.avatar-modal__current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.avatar-modal__preview-round {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
  background: color-mix(in srgb, var(--color-info-bg) 40%, var(--color-surface));
}
.avatar-modal__file-label {
  display: block;
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
}
.avatar-modal__crop-wrap {
  display: none;
  margin: 0.75rem 0;
  max-height: min(50vh, 340px);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(var(--shadow-rgb), 0.05);
  border: 1px solid var(--color-border);
}
.avatar-modal__crop-wrap.is-visible {
  display: block;
}
.avatar-modal__crop-wrap img {
  display: block;
  max-width: 100%;
}
.avatar-modal__hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.avatar-modal__error {
  margin: 0.75rem 0 0;
}
.avatar-modal__error[hidden] {
  display: none !important;
}
/* Circular crop selection (matches round avatar in profile) */
.avatar-modal .cropper-crop-box {
  border-radius: 50%;
  overflow: hidden;
}
.avatar-modal .cropper-view-box {
  border-radius: 50%;
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--rgb-brand), 0.85);
}
.avatar-modal .cropper-face {
  border-radius: 50%;
  background-color: transparent;
}
.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.form { display: flex; flex-direction: column; gap: 1rem; }
.form__label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; font-weight: 600; color: var(--color-text); }
.form__input {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
}
.form__input:focus {
  outline: none;
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 2px rgba(var(--rgb-brand), 0.28);
}
.btn {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  font-weight: 600;
}
.btn--primary {
  background: var(--color-brand-primary);
  color: #fff;
}
.btn--primary:hover { background: var(--color-brand-strong); }
.btn--ghost {
  background: transparent;
  color: var(--color-brand-strong);
  border: 1px solid var(--color-brand-primary);
}
.btn--ghost:hover {
  background: color-mix(in srgb, var(--color-supportive) 16%, var(--color-surface));
}
a.btn {
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.btn--secondary {
  background: color-mix(in srgb, var(--color-info-bg) 50%, var(--color-surface));
  color: var(--color-brand-primary);
  border: 1px solid var(--color-border);
}
.btn--secondary:hover {
  background: color-mix(in srgb, var(--color-info-bg) 72%, var(--color-surface));
}
.btn--danger {
  background: var(--color-error);
  color: #fff;
}
.btn--danger:hover {
  filter: brightness(0.92);
}
.modal__confirm-lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text);
}
.modal__confirm-email {
  display: block;
  margin-top: 0.4rem;
  font-weight: 700;
  word-break: break-all;
  color: var(--color-brand-strong);
}
.modal__confirm-warning {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.45;
  border-radius: var(--radius);
  background: var(--color-alert-error-bg);
  color: var(--color-error);
  border: 1px solid var(--color-alert-error-border);
}
dialog.modal.modal--confirm-danger .modal__title {
  color: var(--color-error);
}
.alert { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert--error {
  background: var(--color-alert-error-bg);
  color: var(--color-error);
  border: 1px solid var(--color-alert-error-border);
}
.btn--sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
  border-radius: 6px;
}
.profile-section { margin-bottom: 1rem; }
.profile-section__title {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--color-border);
}
.profile-section__actions { margin: 0 0 0.75rem; }

/* Profile layout (GitHub-style sidebar + main) */
.profile-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 17.5rem) minmax(0, 1fr);
  gap: 1.25rem clamp(1rem, 2vw, 2rem);
  align-items: start;
}
.profile-sidebar--github {
  padding: 1.1rem 1rem;
}
.profile-sidebar--github > .profile-avatar-button {
  margin-left: auto;
  margin-right: auto;
}
.profile-avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
  display: block;
}
.profile-avatar-button {
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
}
.profile-avatar-button:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 3px;
}
.profile-avatar--sidebar {
  width: 8rem;
  height: 8rem;
  flex-shrink: 0;
}
.profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: color-mix(in srgb, var(--color-info-bg) 45%, var(--color-surface));
  color: var(--color-brand-primary);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
}
.account-field__label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; color: var(--color-text); }
.account-field__readonly { margin: 0; padding: 0.5rem 0.65rem; background: color-mix(in srgb, var(--color-bg-base) 70%, var(--color-surface)); border: 1px solid var(--color-border); border-radius: 6px; max-width: 32rem; }
.small-gap { margin: 0.35rem 0 0; font-size: 0.85rem; }
/* Profile layout (local; same server only — see account/docs/frontend-assets.md) */
.profile-sidebar__name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1rem 0 0.35rem;
  line-height: 1.3;
  word-break: break-word;
}
.profile-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.profile-chips--sidebar { margin-bottom: 1rem; }
.profile-sidebar__verify-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.profile-sidebar__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.profile-sidebar__action-btn {
  width: 100%;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-sidebar__action-btn--danger {
  border-color: var(--color-error);
  color: var(--color-error);
}
/* Chips / KV — match manage/public/css/base.css */
.chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--color-info-bg);
  color: var(--color-brand-primary);
}
.chip--ok {
  background: rgba(var(--rgb-success), 0.18);
  color: var(--color-success);
}
.chip--warn {
  background: rgba(var(--rgb-warning), 0.18);
  color: #b87418;
}
.chip--muted {
  background: rgba(var(--shadow-rgb), 0.08);
  color: var(--color-text-muted);
}
.kv {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}
.kv dt { color: var(--color-text-muted); font-weight: 600; margin: 0; }
.kv dd { margin: 0; word-break: break-word; }
.kv--wide { grid-template-columns: minmax(8rem, 12rem) 1fr; }
.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-info-bg) 55%, var(--color-surface));
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 600;
}
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--color-border);
}
.data-table th { color: var(--color-text-muted); font-weight: 600; }
.cell-clip { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-token-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  word-break: break-all;
}
.device-token { font-size: 0.75rem; }
.profile-main__section { margin-bottom: 0; }
.profile-main__section.profile-section { margin-bottom: 1rem; }
.profile-main__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}
.profile-main__row > .profile-main__section.profile-section { margin-bottom: 0; }
.profile-summary-card { gap: 1.25rem; }
.profile-summary-card__col { min-width: 0; }
@media (min-width: 52rem) {
  .profile-summary-card > .profile-summary-card__col:not(:last-child) {
    border-right: 1px solid var(--color-border);
    padding-right: 1.25rem;
  }
}
.profile-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.profile-section__head .profile-section__title {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.profile-teacher-meta { font-size: 0.9rem; margin: 0 0 0.75rem; }
.profile-teacher-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.profile-teacher-actions .inline-form { margin: 0; }
.profile-teacher-form .account-field { margin-bottom: 0.85rem; }
.profile-teacher-form .account-field--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.profile-teacher-form .account-input--narrow { max-width: 8rem; }
.profile-teacher-form .account-input--currency { max-width: 4rem; text-transform: uppercase; }
.profile-teacher-form .account-field--checkbox label { font-weight: 500; cursor: pointer; }
.form__label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.form__input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
  background: var(--color-surface);
}
.profile-edit-form .form__label { margin-bottom: 0.65rem; }
.modal__form { margin: 0; }
@media (max-width: 56rem) {
  .profile-layout { grid-template-columns: 1fr; }
}

/* —— Profile page: visible panels, forms, modals (scoped) —— */
.profile-page .profile-main {
  min-width: 0;
}
.profile-page .profile-layout > .card,
.profile-page .profile-main .card {
  border: 1px solid var(--color-border);
  box-sizing: border-box;
}
.profile-page .profile-section__head {
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}
.profile-page .profile-section__head .profile-section__title {
  border-bottom: none;
  padding-bottom: 0;
}
.profile-page .profile-main__row.profile-summary-card {
  align-items: stretch;
}
.profile-page .kv {
  padding: 0.25rem 0 0;
}
.profile-page .profile-teacher-form .account-input,
.profile-page .profile-teacher-form textarea.account-input {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
.profile-page .profile-teacher-form textarea.account-input {
  min-height: 6rem;
  resize: vertical;
}
.profile-page .profile-teacher-form .account-field--inline .account-input--narrow,
.profile-page .profile-teacher-form .account-field--inline .account-input--currency {
  flex: 0 0 auto;
}
.modal__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.25rem;
}
.profile-page .profile-edit-form .form__input:focus,
.profile-page dialog.modal .form__input:focus {
  outline: none;
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 2px rgba(var(--rgb-brand), 0.28);
}
.profile-page .profile-teacher-meta a {
  color: var(--color-brand-primary);
  font-weight: 600;
}
.profile-page .profile-teacher-meta a:hover {
  text-decoration: underline;
}

.profile-page .profile-teacher-form .account-input:focus,
.profile-page .profile-teacher-form textarea.account-input:focus {
  outline: none;
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 2px rgba(var(--rgb-brand), 0.28);
}
.profile-page .profile-teacher-form .account-btn--primary {
  width: auto;
  min-width: 12rem;
  margin-top: 0.25rem;
}

/* —— Profile page: polish (spacing, cards, primary actions) —— */
/* Horizontal padding: .shell--profile in layout.css (no :has — older browsers) */
.profile-page .member-content {
  padding-bottom: 2.5rem;
}
.profile-page .shell__header {
  margin-bottom: 1.25rem;
}
.profile-page .shell__title {
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}
.profile-page .profile-layout {
  gap: 1.5rem 2rem;
}
.profile-page .profile-layout > .card,
.profile-page .profile-main .card {
  padding: 1.35rem 1.4rem;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), 0.06), 0 4px 14px rgba(var(--shadow-rgb), 0.06);
}
.profile-page .profile-sidebar--github {
  text-align: center;
}
.profile-page .profile-sidebar__name {
  font-size: 1.2rem;
  line-height: 1.3;
  margin-top: 1rem;
}
.profile-page .profile-chips {
  justify-content: center;
  margin-top: 0.35rem;
}
.profile-page .kv {
  row-gap: 0.5rem;
  column-gap: 1.25rem;
  padding: 0.35rem 0 0.15rem;
}
.profile-page .kv dt {
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
  align-self: center;
  padding-top: 0;
}
.profile-page .kv dd {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.45;
}
.profile-page .btn.btn--primary,
.profile-page button.btn--primary {
  background: var(--color-brand-primary);
  color: #fff;
  border: 1px solid transparent;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), 0.12);
}
.profile-page .btn.btn--primary:hover,
.profile-page button.btn--primary:hover {
  background: var(--color-brand-strong);
  color: #fff;
}
.profile-page .btn.btn--primary:focus-visible,
.profile-page button.btn--primary:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
}
/* Ghost: same as manage — transparent + brand border (not gray “default button”) */
.profile-page .profile-section__head .btn--sm {
  min-height: 2.1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.profile-login-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.profile-login-pagination__meta {
  color: var(--color-text-muted);
}

