:root {
  color-scheme: light;
  --account-blue: #1a73e8;
  --account-blue-dark: #185abc;
  --account-blue-soft: #e8f0fe;
  --account-green: #137333;
  --account-green-soft: #e6f4ea;
  --account-amber: #8a5a00;
  --account-amber-soft: #fef7e0;
  --account-red: #b3261e;
  --account-red-soft: #fce8e6;
  --account-ink: #202124;
  --account-muted: #5f6368;
  --account-subtle: #80868b;
  --account-line: #dadce0;
  --account-line-soft: #e8eaed;
  --account-canvas: #f8fafd;
  --account-surface: #ffffff;
  --account-surface-alt: #f1f3f4;
  --account-shadow: 0 1px 2px rgba(60, 64, 67, 0.1), 0 1px 3px rgba(60, 64, 67, 0.08);
  --account-shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--account-canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--account-ink);
  background:
    linear-gradient(180deg, #ffffff 0, #ffffff 72px, var(--account-canvas) 72px);
  font-family: "Google Sans", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--account-blue);
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.account-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--account-shell), calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
}

.account-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--account-ink);
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #ffffff;
  background:
    linear-gradient(135deg, #4285f4 0 36%, #34a853 36% 58%, #fbbc04 58% 78%, #ea4335 78%);
  font-size: 17px;
  font-weight: 700;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.92);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-account {
  position: relative;
}

.header-link {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 6px;
  color: var(--account-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.header-link:hover {
  color: var(--account-blue-dark);
  background: var(--account-blue-soft);
}

.header-help,
.account-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
}

.header-help {
  width: 40px;
  height: 40px;
  color: var(--account-muted);
  background: transparent;
  cursor: pointer;
}

.header-help:hover {
  background: var(--account-surface-alt);
}

.header-help svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.account-avatar {
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(135deg, #1a73e8, #6f9ee8);
  font-weight: 600;
  text-transform: uppercase;
}

.header-avatar {
  width: 38px;
  height: 38px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--account-line);
  cursor: pointer;
}

.header-avatar[aria-expanded="true"] {
  box-shadow: 0 0 0 2px var(--account-blue);
}

.header-account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(300px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--account-line);
  border-radius: 8px;
  background: var(--account-surface);
  box-shadow: 0 8px 28px rgba(32, 33, 36, 0.2);
}

.header-account-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 10px 14px;
  border-bottom: 1px solid var(--account-line-soft);
}

.header-menu-avatar {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.header-account-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header-account-copy strong,
.header-account-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-account-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.header-account-copy span {
  margin-top: 2px;
  color: var(--account-muted);
  font-size: 12px;
}

.header-account-links {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}

.header-account-links a,
.header-account-signout {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 0;
  border-radius: 6px;
  color: var(--account-ink);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
}

.header-account-links a:hover,
.header-account-signout:hover {
  background: var(--account-surface-alt);
}

.header-account-signout {
  border-top: 1px solid var(--account-line-soft);
  border-radius: 0 0 6px 6px;
  color: var(--account-red);
}

.account-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  width: min(var(--account-shell), calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 72px;
}

.account-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
}

.identity-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 4px 14px 24px;
  border-bottom: 1px solid var(--account-line);
}

.identity-avatar {
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  font-size: 28px;
}

.identity-block strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 16px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-block span {
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  color: var(--account-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 0 24px 24px 0;
  color: var(--account-muted);
  font-weight: 500;
  text-decoration: none;
}

.nav-item svg {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.nav-item:hover {
  color: var(--account-ink);
  background: var(--account-surface-alt);
}

.nav-item.active {
  color: var(--account-blue-dark);
  background: var(--account-blue-soft);
  font-weight: 600;
}

.sidebar-signout {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 9px 16px;
  border: 0;
  border-radius: 6px;
  color: var(--account-muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.sidebar-signout:hover {
  color: var(--account-red);
  background: var(--account-red-soft);
}

.sidebar-signout svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.account-main {
  min-width: 0;
  max-width: 850px;
}

.account-view {
  width: 100%;
}

.page-heading {
  margin: 8px 0 34px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--account-blue-dark);
  font-size: 13px;
  font-weight: 700;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0;
}

.page-heading > p:last-child {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--account-muted);
  font-size: 15px;
  line-height: 1.65;
}

.identity-card {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
  margin-bottom: 28px;
  padding: 24px 26px;
  border: 1px solid var(--account-line);
  border-radius: 8px;
  background: var(--account-surface);
  box-shadow: var(--account-shadow);
}

.hero-avatar {
  width: 78px;
  height: 78px;
  font-size: 30px;
}

.identity-copy {
  min-width: 0;
}

.identity-copy h2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.identity-copy p {
  margin: 4px 0 0;
  color: var(--account-muted);
  overflow-wrap: anywhere;
}

.identity-copy .identity-meta {
  margin-top: 8px;
  color: var(--account-subtle);
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 12px;
  color: var(--account-green);
  background: var(--account-green-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.is-banned {
  color: var(--account-red);
  background: var(--account-red-soft);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.security-overview-section {
  margin-top: 24px;
  margin-bottom: 24px;
}

.security-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 28px;
  margin-top: 18px;
}

.security-overview-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 18px 0;
  border-top: 1px solid var(--account-line-soft);
  color: var(--account-ink);
  text-decoration: none;
}

.security-overview-item:hover .security-overview-copy strong {
  color: var(--account-blue-dark);
}

.safety-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.safety-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.safety-icon.blue {
  color: var(--account-blue-dark);
  background: var(--account-blue-soft);
}

.safety-icon.green {
  color: var(--account-green);
  background: var(--account-green-soft);
}

.safety-icon.amber {
  color: var(--account-amber);
  background: var(--account-amber-soft);
}

.security-overview-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.security-overview-copy > span {
  color: var(--account-muted);
  font-size: 12px;
}

.security-overview-copy strong {
  margin-top: 3px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 120ms ease;
}

.security-overview-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--account-subtle);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-overview-item .card-arrow {
  color: var(--account-subtle);
  font-size: 22px;
  line-height: 1;
}

.overview-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 13px;
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--account-line);
  border-radius: 8px;
  color: var(--account-ink);
  background: var(--account-surface);
  text-decoration: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.overview-card:hover {
  border-color: #bdc1c6;
  box-shadow: var(--account-shadow);
  transform: translateY(-1px);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.card-icon svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.card-icon.blue {
  color: var(--account-blue-dark);
  background: var(--account-blue-soft);
}

.card-icon.green {
  color: var(--account-green);
  background: var(--account-green-soft);
}

.card-icon.amber {
  color: var(--account-amber);
  background: var(--account-amber-soft);
}

.card-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-copy strong {
  font-size: 15px;
  font-weight: 500;
}

.card-copy span {
  margin-top: 5px;
  overflow: hidden;
  color: var(--account-muted);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-arrow {
  color: var(--account-subtle);
  font-size: 24px;
  line-height: 1;
}

.content-section {
  margin-top: 24px;
  padding: 24px 26px;
  border: 1px solid var(--account-line);
  border-radius: 8px;
  background: var(--account-surface);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  min-width: 0;
}

.section-heading > div {
  min-width: 0;
}

.section-heading h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--account-muted);
  font-size: 13px;
  line-height: 1.55;
}

.text-button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.text-button:hover {
  background: var(--account-blue-soft);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.metric {
  display: flex;
  flex-direction: column;
  min-height: 112px;
  padding: 16px;
  border-radius: 8px;
  background: var(--account-surface-alt);
}

.metric span {
  color: var(--account-muted);
  font-size: 12px;
}

.metric strong {
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
}

.metric small {
  margin-top: auto;
  padding-top: 8px;
  color: var(--account-subtle);
  font-size: 11px;
  line-height: 1.4;
}

.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 18px;
}

.product-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--account-line);
  border-radius: 6px;
  color: var(--account-ink);
  font-size: 13px;
  text-decoration: none;
}

.product-links a:hover {
  border-color: #aecbfa;
  color: var(--account-blue-dark);
  background: var(--account-blue-soft);
}

.profile-readonly {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--account-line);
}

.medium-avatar {
  width: 56px;
  height: 56px;
  font-size: 21px;
}

.profile-readonly > div:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-readonly strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 500;
}

.profile-readonly span {
  margin-top: 2px;
  color: var(--account-muted);
  overflow-wrap: anywhere;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.form-section {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--account-line-soft);
}

.form-section-heading {
  margin-bottom: 18px;
}

.form-section-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.form-section-heading p {
  margin: 4px 0 0;
  color: var(--account-muted);
  font-size: 13px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span {
  margin-bottom: 6px;
  color: #3c4043;
  font-size: 12px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--account-line);
  border-radius: 6px;
  outline: none;
  background: var(--account-surface);
  padding: 10px 12px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--account-blue);
  box-shadow: 0 0 0 1px var(--account-blue);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  color: var(--account-muted);
  background: var(--account-surface-alt);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.button.primary {
  border: 1px solid var(--account-blue);
  color: #ffffff;
  background: var(--account-blue);
}

.button.primary:hover:not(:disabled) {
  border-color: var(--account-blue-dark);
  background: var(--account-blue-dark);
}

.button.secondary {
  border: 1px solid var(--account-line);
  color: var(--account-blue-dark);
  background: var(--account-surface);
}

.button.secondary:hover:not(:disabled) {
  border-color: #aecbfa;
  background: var(--account-blue-soft);
}

.button.danger,
.button.danger-outline {
  border: 1px solid var(--account-red);
}

.button.danger {
  color: #ffffff;
  background: var(--account-red);
}

.button.danger:hover:not(:disabled) {
  background: #8c1d18;
}

.button.danger-outline {
  color: var(--account-red);
  background: var(--account-surface);
}

.button.danger-outline:hover:not(:disabled) {
  background: var(--account-red-soft);
}

.security-primary-section {
  margin-top: 0;
}

.security-primary-section .section-heading {
  align-items: center;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 20px;
  padding: 13px 15px;
  border-radius: 6px;
  color: var(--account-muted);
  background: var(--account-surface-alt);
}

.security-note svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: var(--account-blue-dark);
}

.security-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
}

.security-section {
  margin-top: 0;
}

.device-list {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  border-top: 1px solid var(--account-line-soft);
}

.device-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--account-line-soft);
}

.device-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--account-blue-dark);
  background: var(--account-blue-soft);
}

.device-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.device-copy {
  min-width: 0;
}

.device-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.device-title strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 1px 8px;
  border-radius: 10px;
  color: var(--account-green);
  background: var(--account-green-soft);
  font-size: 11px;
  font-weight: 700;
}

.device-meta {
  margin: 4px 0 0;
  color: var(--account-muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.device-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.device-action {
  min-height: 34px;
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  color: var(--account-muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.device-action:hover {
  color: var(--account-blue-dark);
  background: var(--account-blue-soft);
}

.device-action.remove:hover {
  color: var(--account-red);
  background: var(--account-red-soft);
}

.loading-row,
.empty-row,
.error-row {
  padding: 24px 0;
  color: var(--account-muted);
  font-size: 13px;
  text-align: center;
}

.error-row {
  color: var(--account-red);
}

.status-panel,
.appeal-panel {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--account-line);
  border-radius: 8px;
  background: var(--account-surface);
}

.status-panel.is-banned {
  border-color: #f4c7c3;
  background: #fffbfa;
}

.status-panel > div:last-child {
  min-width: 0;
}

.status-panel h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.status-panel p {
  margin: 5px 0 0;
  color: var(--account-muted);
  font-size: 13px;
  line-height: 1.6;
}

.appeal-panel {
  display: block;
  margin-top: 20px;
}

.appeal-note {
  margin: 16px 0 0;
  padding: 13px 15px;
  border-radius: 6px;
  color: #5f4b00;
  background: var(--account-amber-soft);
  font-size: 12px;
  line-height: 1.6;
}

.privacy-section {
  margin-top: 20px;
}

.modal {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--account-ink);
  background: var(--account-surface);
  box-shadow: 0 12px 36px rgba(32, 33, 36, 0.28);
}

.modal::backdrop {
  background: rgba(32, 33, 36, 0.46);
}

.modal-card {
  margin: 0;
  padding: 24px;
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal-heading h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 500;
}

.icon-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--account-muted);
  background: transparent;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.icon-close:hover {
  background: var(--account-surface-alt);
}

.modal-card > p {
  margin: 12px 0 20px;
  color: var(--account-muted);
  font-size: 14px;
  line-height: 1.65;
}

.confirmation-field {
  margin-top: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.password-card {
  width: 100%;
}

.password-field + .password-field {
  margin-top: 15px;
}

.field > .password-input-wrap {
  position: relative;
  display: block;
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.password-input-wrap input {
  padding-right: 50px;
}

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

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle.is-visible {
  color: var(--account-blue-dark);
  background: var(--account-blue-soft);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--account-blue);
  outline-offset: -2px;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: var(--account-muted);
  font-size: 11px;
  line-height: 1.5;
}

.form-error {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #f4c7c3;
  border-radius: 6px;
  color: var(--account-red);
  background: var(--account-red-soft);
  font-size: 12px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: min(400px, calc(100% - 48px));
  padding: 12px 16px;
  border-radius: 6px;
  color: #ffffff;
  background: #202124;
  box-shadow: 0 4px 14px rgba(32, 33, 36, 0.3);
  font-size: 13px;
  line-height: 1.5;
}

.toast.error {
  background: #8c1d18;
}

.accounts-face {
  letter-spacing: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --account-blue: #8ab4f8;
    --account-blue-dark: #aecbfa;
    --account-blue-soft: #23324a;
    --account-green: #81c995;
    --account-green-soft: #1f3526;
    --account-amber: #fdd663;
    --account-amber-soft: #3d3218;
    --account-red: #f28b82;
    --account-red-soft: #44211f;
    --account-ink: #e8eaed;
    --account-muted: #bdc1c6;
    --account-subtle: #9aa0a6;
    --account-line: #5f6368;
    --account-line-soft: #3c4043;
    --account-canvas: #202124;
    --account-surface: #292a2d;
    --account-surface-alt: #35363a;
    --account-shadow: 0 1px 3px rgba(0, 0, 0, 0.34);
  }

  body {
    background: linear-gradient(180deg, #292a2d 0, #292a2d 72px, var(--account-canvas) 72px);
  }

  .brand-mark {
    box-shadow: inset 0 0 0 3px rgba(32, 33, 36, 0.92);
  }

  .header-avatar {
    border-color: #292a2d;
  }

  .overview-card:hover {
    border-color: #80868b;
  }

  .status-panel.is-banned {
    border-color: #5c2b28;
    background: #2d2221;
  }

  .appeal-note {
    color: #fdd663;
  }

  .button.primary,
  .button.danger {
    color: #202124;
  }

  .toast {
    color: #202124;
    background: #e8eaed;
  }

  .toast.error {
    color: #ffffff;
    background: #8c1d18;
  }
}

@media (max-width: 900px) {
  .account-shell {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 28px;
  }

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

  .security-overview-grid {
    grid-template-columns: 1fr;
  }

  .security-overview-item {
    padding: 15px 0;
  }

  .overview-card {
    min-height: 88px;
  }

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

  .metric {
    min-height: 96px;
  }
}

@media (max-width: 680px) {
  body {
    background: var(--account-canvas);
  }

  .account-header {
    width: 100%;
    min-height: 62px;
    padding: 0 16px;
    background: var(--account-surface);
  }

  .account-brand {
    gap: 9px;
    font-size: 17px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .header-link {
    display: none;
  }

  .header-help,
  .header-avatar {
    width: 36px;
    height: 36px;
  }

  .header-account-menu {
    top: calc(100% + 8px);
  }

  .account-shell {
    display: block;
    width: 100%;
    padding: 0 0 48px;
  }

  .account-sidebar {
    position: static;
    background: var(--account-surface);
    border-bottom: 1px solid var(--account-line);
  }

  .identity-block,
  .sidebar-signout {
    display: none;
  }

  .account-nav {
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    padding: 0 8px;
    scrollbar-width: none;
  }

  .account-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    position: relative;
    flex: 1 0 auto;
    justify-content: center;
    min-height: 52px;
    padding: 8px 14px;
    border-radius: 0;
    white-space: nowrap;
  }

  .nav-item svg {
    width: 19px;
    height: 19px;
  }

  .nav-item.active {
    border-radius: 0;
    background: transparent;
  }

  .nav-item.active::after {
    position: absolute;
    right: 12px;
    bottom: 0;
    left: 12px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--account-blue);
    content: "";
  }

  .account-main {
    width: 100%;
    max-width: none;
    padding: 0 16px;
  }

  .page-heading {
    margin: 28px 0 24px;
  }

  .page-heading h1 {
    font-size: 30px;
  }

  .page-heading > p:last-child {
    font-size: 14px;
  }

  .identity-card {
    gap: 16px;
    padding: 20px;
  }

  .hero-avatar {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }

  .identity-copy h2 {
    font-size: 19px;
  }

  .overview-grid {
    gap: 10px;
  }

  .security-overview-grid {
    margin-top: 14px;
  }

  .overview-card {
    grid-template-columns: 40px minmax(0, 1fr) 14px;
    min-height: 82px;
    padding: 14px;
  }

  .content-section,
  .status-panel,
  .appeal-panel {
    padding: 19px 16px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .section-heading .button,
  .section-heading .text-button {
    align-self: flex-start;
  }

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

  .field-wide {
    grid-column: auto;
  }

  .form-actions,
  .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .button {
    width: 100%;
  }

  .device-row {
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: start;
  }

  .device-icon {
    width: 38px;
    height: 38px;
  }

  .device-actions {
    grid-column: 2;
    justify-content: flex-start;
    margin-top: 2px;
  }

  .modal {
    width: calc(100% - 20px);
  }

  .modal-card {
    padding: 20px 18px;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    max-width: calc(100% - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
