.account-panel {
  --shell-bg: #f2f7f6;
  --shell-surface: #fff;
  --shell-surface-alt: #f4f9f8;
  --shell-text: #1a2b28;
  --shell-muted: #7a9490;
  --shell-border: #e0edeb;
  --shell-input: #eef5f4;
  --shell-teal: #1bbeaa;
  --shell-danger: #ff6060;
  width: 100%;
  color: var(--shell-text, #1a2b28);
}

[data-theme="dark"] .account-panel {
  --shell-bg: #0e1f1c;
  --shell-surface: #162622;
  --shell-surface-alt: #1a2e2b;
  --shell-text: #e8f4f1;
  --shell-muted: #5e8178;
  --shell-border: #1e3530;
  --shell-input: #1a2e2b;
}

.account-panel button {
  font-family: inherit;
}

.account-panel[data-presentation="page"] {
  padding: 24px 16px 40px !important;
}

.account-page-title,
.account-details-page > h1 {
  margin: 0 0 20px;
  color: var(--shell-text, #1a2b28);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.account-profile-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: var(--shell-surface, #fff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .account-profile-card,
[data-theme="dark"] .account-details-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.account-profile-card[data-compact="true"] {
  padding: 8px 20px 16px;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.account-avatar {
  --account-avatar-color: #1bbeaa;
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--account-avatar-color);
  font-size: 16px;
  font-weight: 900;
}

.account-profile-card[data-compact="true"] .account-avatar {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  margin-right: 0;
}

.account-profile-copy {
  display: grid;
  flex: 1;
  min-width: 0;
}

.account-profile-copy strong,
.account-profile-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-copy strong {
  color: var(--shell-text, #1a2b28);
  font-size: 16px;
  font-weight: 900;
}

.account-profile-card[data-compact="true"] .account-profile-copy strong {
  font-size: 17px;
}

.account-profile-copy small {
  margin-top: 1px;
  color: var(--shell-muted, #7a9490);
  font-size: 12px;
  font-weight: 600;
}

.account-close {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--shell-input, #eef5f4);
}

.account-close span::before,
.account-close span::after {
  position: absolute;
  top: 15px;
  left: 9px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--shell-muted, #7a9490);
  content: "";
}

.account-close span::before {
  transform: rotate(45deg);
}

.account-close span::after {
  transform: rotate(-45deg);
}

.account-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-menu-row {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 13px 14px;
  border: 0;
  border-radius: 16px;
  color: var(--shell-text, #1a2b28);
  background: var(--shell-surface-alt, #f4f9f8);
  text-align: left;
}

.account-menu-row > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
}

.account-menu-icon {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
}

.account-theme-icon {
  background: rgba(139, 92, 246, 0.13);
  font-size: 18px;
}

.account-notification-icon,
.account-sign-out-icon {
  color: var(--shell-danger, #ff6060);
  background: color-mix(in srgb, var(--shell-danger, #ff6060), transparent 90%);
}

.account-profile-icon {
  color: var(--shell-teal, #1bbeaa);
  background: color-mix(in srgb, var(--shell-teal, #1bbeaa), transparent 90%);
}

.account-material-icon {
  color: #8b6800;
  background: #fff5cf;
}

.account-material-page {
  min-height: 100%;
  padding: 18px 16px 40px;
}

.account-material-page > .account-back {
  max-width: 920px;
  margin: 0;
}

.account-material-page .materials-panel {
  padding: 0 !important;
}

.account-athlete-profile {
  min-height: 100%;
  padding: 18px 16px 40px;
}

.account-athlete-profile > header,
.account-athlete-profile > form,
.account-athlete-profile > .athlete-registration-history,
.account-athlete-profile > .account-back {
  max-width: 720px;
}

.account-athlete-profile > header h1,
.account-athlete-profile > header p {
  margin: 0;
  letter-spacing: 0;
}

.account-athlete-profile > header h1 { font-size: 22px; font-weight: 900; }
.account-athlete-profile > header p { margin-top: 2px; color: var(--shell-muted, #7a9490); font-size: 12px; font-weight: 700; }
.account-athlete-profile > form { margin-top: 16px; }

.account-athlete-profile .athlete-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-athlete-profile label > span {
  display: block;
  margin: 0 0 4px 2px;
  color: var(--shell-teal, #1bbeaa);
  font-size: 10px;
  font-weight: 900;
}

.account-athlete-profile input {
  width: 100%;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--shell-border, #e0edeb);
  border-radius: 7px;
  color: var(--shell-text, #1a2b28);
  background: var(--shell-input, #eef5f4);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
}

.account-switch {
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--shell-border, #e0edeb);
  transition: background 200ms ease;
}

.account-switch[aria-checked="true"] {
  background: var(--shell-teal, #1bbeaa);
}

.account-switch > span {
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 200ms ease;
}

.account-switch[aria-checked="true"] > span {
  transform: translateX(18.5px);
}

.account-notification-count {
  display: grid;
  width: 20px;
  height: 20px;
  margin-right: 4px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--shell-danger, #ff6060);
  font-size: 10px;
  font-weight: 900;
}

.account-menu-chevron {
  width: 8px;
  height: 8px;
  border-top: 1.8px solid var(--shell-muted, #7a9490);
  border-right: 1.8px solid var(--shell-muted, #7a9490);
  transform: rotate(45deg);
}

.account-sign-out > span:nth-child(2) {
  color: var(--shell-danger, #ff6060);
}

.account-details-page {
  padding: 24px 16px 40px;
}

.account-details-page > h1 {
  margin-bottom: 16px;
}

.account-back {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 0 0 16px;
  border: 0;
  color: var(--shell-teal, #1bbeaa);
  background: transparent;
  font-size: 15px;
  font-weight: 700;
}

.account-back > span {
  width: 10px;
  height: 10px;
  border-bottom: 2.2px solid currentColor;
  border-left: 2.2px solid currentColor;
  transform: rotate(45deg);
}

.account-details-card {
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: var(--shell-surface, #fff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.account-details-card h2 {
  margin: 0 0 14px;
  color: var(--shell-text, #1a2b28);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.account-field {
  margin-bottom: 12px;
}

.account-field > span {
  display: block;
  margin-bottom: 4px;
  color: var(--shell-teal, #1bbeaa);
  font-size: 11px;
  font-weight: 700;
}

.account-field > div {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--shell-text, #1a2b28);
  background: var(--shell-input, #eef5f4);
  font-size: 14px;
  font-weight: 500;
}

.account-field > .account-password-value {
  color: var(--shell-muted, #7a9490);
}

.account-primary-action {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--shell-teal, #1bbeaa);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.account-panel[data-presentation="sheet"] {
  position: absolute;
  z-index: 200;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 !important;
}

.account-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.5);
}

.account-sheet {
  position: relative;
  z-index: 1;
  padding: 0 0 32px;
  border-radius: 28px 28px 0 0;
  background: var(--shell-surface, #fff);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
}

.account-sheet-handle {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
}

.account-sheet-handle span {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--shell-border, #e0edeb);
}

.account-sheet .account-menu-list {
  padding: 0 16px;
}

@media (max-width: 767px) {
  .account-panel[data-presentation="page"],
  .account-details-page {
    padding: 14px 16px 96px !important;
  }

  .account-details-page > h1 {
    display: none;
  }

  .account-back {
    padding: 6px 10px 6px 0;
  }

  .account-material-page {
    padding: 10px 12px 96px !important;
  }

  .account-athlete-profile {
    padding: 10px 12px 96px !important;
  }

  .account-athlete-profile .athlete-profile-fields { grid-template-columns: 1fr; }
  .account-athlete-profile input { font-size: 16px; }

  .account-panel[data-presentation="sheet"] .account-details-page {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--shell-bg, #f2f7f6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-switch,
  .account-switch > span {
    transition: none;
  }
}
