:root {
  --profile-bg: linear-gradient(180deg, #eef4fb 0%, #f7fbff 38%, #f3f7fb 100%);
  --profile-surface: rgba(255, 255, 255, 0.92);
  --profile-surface-strong: #ffffff;
  --profile-line: rgba(10, 91, 82, 0.12);
  --profile-line-strong: rgba(10, 91, 82, 0.22);
  --profile-ink: #14323a;
  --profile-muted: #69828a;
  --profile-accent: #0e7c66;
  --profile-accent-soft: #e4f5f0;
  --profile-gold: #f4c46c;
  --profile-red: #d74b42;
  --profile-shadow: 0 22px 48px rgba(17, 65, 58, 0.1);
  --profile-radius: 24px;
}

body.account-body {
  min-height: 100vh;
  background: var(--profile-bg);
}

.profile-center-page {
  width: min(1380px, calc(100% - 40px));
  margin: 26px auto 44px;
}

.profile-center-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 22px;
}

.profile-card {
  position: relative;
  overflow: hidden;
  background: var(--profile-surface);
  border: 1px solid var(--profile-line);
  border-radius: var(--profile-radius);
  box-shadow: var(--profile-shadow);
  backdrop-filter: blur(12px);
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 30px;
  background:
    radial-gradient(circle at top right, rgba(14, 124, 102, 0.14), transparent 34%),
    radial-gradient(circle at left bottom, rgba(244, 196, 108, 0.15), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 246, 0.9));
}

.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-avatar {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0f8f76, #0c6f60);
  color: #fff;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 18px 38px rgba(14, 124, 102, 0.24);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-hero-copy {
  min-width: 0;
}

.profile-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(14, 124, 102, 0.08);
  color: var(--profile-accent);
  font-size: 13px;
  font-weight: 700;
}

.profile-hero-copy h1 {
  margin: 14px 0 8px;
  color: var(--profile-ink);
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.profile-hero-copy p {
  margin: 0;
  color: var(--profile-muted);
  font-size: 15px;
}

.profile-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.profile-meta-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20, 50, 58, 0.06);
  color: var(--profile-ink);
  font-size: 13px;
}

.profile-vip-box {
  min-width: 240px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #16373f, #0f5661);
  color: #fff;
  box-shadow: 0 18px 40px rgba(16, 86, 97, 0.24);
}

.profile-vip-box span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.profile-vip-box strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.2;
}

.profile-vip-box p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.profile-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.profile-stat {
  padding: 18px;
  border-radius: 20px;
  background: var(--profile-surface-strong);
  border: 1px solid rgba(10, 91, 82, 0.08);
}

.profile-stat span {
  display: block;
  color: var(--profile-muted);
  font-size: 13px;
}

.profile-stat strong {
  display: block;
  margin-top: 10px;
  color: var(--profile-ink);
  font-size: 28px;
  line-height: 1;
}

.profile-stat small {
  display: block;
  margin-top: 10px;
  color: var(--profile-muted);
  font-size: 12px;
}

.profile-panel {
  padding: 24px;
}

.profile-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.profile-panel-header h2 {
  margin: 0;
  color: var(--profile-ink);
  font-size: 24px;
}

.profile-panel-header p {
  margin: 8px 0 0;
  color: var(--profile-muted);
  font-size: 14px;
}

.profile-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.profile-btn,
.profile-link-btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.profile-btn:hover,
.profile-link-btn:hover {
  transform: translateY(-1px);
}

.profile-btn.primary,
.profile-link-btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #0f876f, #0d6e62);
  box-shadow: 0 12px 26px rgba(13, 110, 98, 0.22);
}

.profile-btn.secondary,
.profile-link-btn.secondary {
  color: var(--profile-ink);
  background: rgba(20, 50, 58, 0.08);
}

.profile-btn.ghost,
.profile-link-btn.ghost {
  color: var(--profile-accent);
  background: var(--profile-accent-soft);
}

.profile-btn.danger {
  color: #fff;
  background: linear-gradient(135deg, #d7574e, #b73c36);
}

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

.rights-item,
.summary-item,
.mini-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--profile-line);
}

.rights-item h3,
.summary-item h3,
.mini-card h3 {
  margin: 0;
  color: var(--profile-ink);
  font-size: 18px;
}

.rights-item strong,
.summary-item strong,
.mini-card strong {
  display: block;
  margin-top: 14px;
  color: var(--profile-accent);
  font-size: 30px;
  line-height: 1;
}

.rights-item p,
.summary-item p,
.mini-card p {
  margin: 12px 0 0;
  color: var(--profile-muted);
  font-size: 13px;
  line-height: 1.7;
}

.summary-item strong.is-warning {
  color: var(--profile-red);
}

.record-switcher {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(20, 50, 58, 0.06);
}

.record-switcher button {
  min-width: 92px;
  border: 0;
  background: transparent;
  color: var(--profile-muted);
  padding: 9px 14px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.record-switcher button.is-active {
  color: var(--profile-ink);
  background: #fff;
  box-shadow: 0 8px 18px rgba(14, 124, 102, 0.12);
}

.record-list,
.message-list,
.reminder-list {
  display: grid;
  gap: 12px;
}

.record-item,
.message-item,
.reminder-item {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--profile-line);
}

.record-row,
.message-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.record-title,
.message-title,
.reminder-title {
  color: var(--profile-ink);
  font-size: 15px;
  font-weight: 700;
}

.record-meta,
.message-meta,
.reminder-item p,
.empty-state {
  margin-top: 8px;
  color: var(--profile-muted);
  font-size: 13px;
  line-height: 1.7;
}

.record-tag,
.message-tag,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(14, 124, 102, 0.1);
  color: var(--profile-accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-chip.guest {
  background: rgba(215, 75, 66, 0.12);
  color: var(--profile-red);
}

.status-chip.annual,
.status-chip.lifetime,
.status-chip.vip {
  background: rgba(244, 196, 108, 0.2);
  color: #7a5311;
}

.message-item.unread {
  border-color: rgba(215, 75, 66, 0.22);
  background: linear-gradient(180deg, rgba(255, 249, 245, 0.96), rgba(255, 255, 255, 0.84));
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-form {
  display: grid;
  gap: 14px;
}

.profile-form label {
  display: grid;
  gap: 8px;
  color: var(--profile-ink);
  font-size: 14px;
  font-weight: 700;
}

.profile-form input,
.profile-form textarea {
  width: 100%;
  padding: 14px 15px;
  color: var(--profile-ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--profile-line-strong);
  border-radius: 16px;
  outline: none;
  font: inherit;
}

.profile-form input:focus,
.profile-form textarea:focus {
  border-color: rgba(14, 124, 102, 0.38);
  box-shadow: 0 0 0 4px rgba(14, 124, 102, 0.08);
}

.hint-text {
  color: var(--profile-muted);
  font-size: 12px;
  line-height: 1.7;
}

.promotion-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(14, 124, 102, 0.08), rgba(255, 255, 255, 0.88));
  border: 1px solid var(--profile-line);
}

.promotion-box p {
  margin: 10px 0 0;
  color: var(--profile-muted);
  font-size: 13px;
  line-height: 1.7;
}

.modal-actions .is-favorited,
.doc-actions .is-favorited,
.m-file-actions .is-favorited {
  color: #7a5311;
  background: rgba(244, 196, 108, 0.22);
  border-color: rgba(244, 196, 108, 0.4);
}

.promotion-link {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--profile-ink);
  font-size: 13px;
  line-height: 1.7;
  word-break: break-all;
}

.profile-login-panel {
  display: grid;
  gap: 16px;
  place-items: start;
  padding: 28px;
}

.profile-login-panel h2 {
  margin: 0;
  color: var(--profile-ink);
  font-size: 26px;
}

.profile-login-panel p {
  margin: 0;
  color: var(--profile-muted);
  line-height: 1.8;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  max-width: min(90vw, 460px);
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(20, 50, 58, 0.92);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 18px 38px rgba(20, 50, 58, 0.22);
  z-index: 80;
}

@media (max-width: 1120px) {
  .profile-center-grid,
  .rights-grid,
  .profile-subgrid,
  .profile-stat-strip {
    grid-template-columns: 1fr 1fr;
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-vip-box {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .profile-center-page {
    width: min(100%, calc(100% - 22px));
    margin: 16px auto 96px;
  }

  .profile-hero,
  .profile-panel,
  .profile-login-panel {
    padding: 20px;
  }

  .profile-hero-main {
    align-items: flex-start;
  }

  .profile-avatar {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    font-size: 28px;
  }

  .profile-hero-copy h1 {
    font-size: 28px;
  }

  .profile-center-grid,
  .rights-grid,
  .profile-subgrid,
  .profile-stat-strip {
    grid-template-columns: 1fr;
  }

  .profile-panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .record-row,
  .message-row {
    flex-direction: column;
  }

  .profile-action-row,
  .message-actions {
    width: 100%;
  }

  .profile-btn,
  .profile-link-btn {
    width: 100%;
    text-align: center;
  }

  .record-switcher {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .record-switcher button {
    min-width: 0;
  }
}
