/* Client profile and logout confirmation share the site's theme colors. */
.auth-dialog[data-mode="profile"] {
  width: min(470px, calc(100vw - 32px));
  max-height: calc(var(--real-vh, 100%) - 40px);
  padding: 28px;
  overflow-y: auto;
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 80px #0005;
}
.auth-dialog[data-mode="profile"] h2 { margin: 0 36px 24px 0; font-size: 21px; }
.auth-dialog[data-mode="profile"] .auth-close { color: var(--muted); }
.auth-dialog .client-profile { width: 100%; gap: 18px; }
.client-profile-identity { display: flex; align-items: center; gap: 15px; }
.client-profile-avatar {
  display: grid; place-items: center; flex: 0 0 64px; height: 64px;
  border-radius: 20px; color: #fff; font-size: 22px; font-weight: 800;
  background: linear-gradient(135deg, #f47b3d, #c73977);
  box-shadow: 0 6px 18px #f47b3d20;
}
.client-profile-person { min-width: 0; flex: 1; }
.auth-dialog .client-profile #auth-user-name {
  margin: 0 0 5px; color: var(--text); font-size: 19px;
  font-weight: 800; overflow-wrap: anywhere; line-height: 1.35;
}
.client-profile #modal-email { margin: 0 0 9px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.client-profile-plan {
  display: inline-block; padding: 4px 9px; font-size: 11px; font-weight: 700;
  color: var(--text); background: var(--surface-raised); border: 1px solid var(--line); border-radius: 7px;
}
.client-profile-plan[data-active="true"] { color: #ffa57a; background: #f47b3d12; border-color: #f47b3d40; }
.client-profile-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.client-profile-summary > div { min-width: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }
.client-profile-summary dt { color: var(--muted); font-size: 11px; margin-bottom: 9px; }
.client-profile-summary dd { margin: 0; color: var(--text); font-weight: 800; font-size: 16px; overflow-wrap: anywhere; }
.client-profile-summary #modal-credits { font-size: 27px; line-height: 1.1; }
.client-profile-status { margin: -6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.client-profile-actions { display: grid; gap: 8px; }
.client-profile-action {
  display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 13px;
  background: var(--surface); color: var(--text); cursor: pointer; text-align: left;
  transition: background .15s, border-color .15s;
}
.client-profile-action > svg { flex: 0 0 21px; height: 21px; color: #f47b3d; }
.client-profile-action svg, .client-profile-signout svg, .signout-dialog-icon svg {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.client-profile-action > span:first-of-type { flex: 1; min-width: 0; }
.client-profile-action b, .client-profile-action small { display: block; }
.client-profile-action b { font-size: 13px; margin-bottom: 3px; }
.client-profile-action small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.client-profile-chevron { color: var(--muted); font-size: 24px; }
.client-profile-action:hover { background: var(--surface-raised); border-color: #f47b3d60; }
.client-profile-recharge {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 46px; padding: 10px 14px; border: 0; border-radius: 13px;
  background: #ff9557; color: #21130c; font-size: 13px; font-weight: 800; cursor: pointer;
}
.client-profile-recharge span { font-size: 21px; }
.client-profile-recharge:hover { background: #ffac7c; }
.client-profile-footer { padding-top: 14px; border-top: 1px solid var(--line); }
.auth-dialog .client-profile #sign-out {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 44px; margin: 0; border: 1px solid #ed6b7740;
  border-radius: 12px; background: #ed6b770a; color: #ff8f9a;
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.client-profile-signout svg { width: 19px; height: 19px; }
.auth-dialog .client-profile #sign-out:hover { background: #ed6b771a; }
#account-profile-card { width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
#account-profile-card:hover { border-color: #f47b3d60; }
#account-profile-card .suno-profile-edit-btn { display: grid; place-items: center; flex-shrink: 0; }
#account-profile-card .suno-profile-edit-btn svg { width: 18px; height: 18px; }
.signout-dialog {
  width: min(400px, calc(100vw - 32px)); max-height: calc(var(--real-vh, 100%) - 40px);
  margin: auto; padding: 28px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 80px #0005;
  overflow-y: auto;
}
.signout-dialog::backdrop { background: #0009; backdrop-filter: blur(5px); }
.signout-dialog-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: #ed6b7714; color: #ff8f9a; margin-bottom: 18px; }
.signout-dialog-icon svg { width: 25px; height: 25px; }
.signout-dialog h2 { font-size: 21px; margin: 0 0 10px; }
.signout-dialog #signout-description { font-size: 13px; line-height: 1.65; color: var(--muted); margin: 0; }
.signout-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.signout-dialog-actions button { min-height: 44px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer; padding: 10px; }
.signout-dialog-actions button:hover { background: var(--surface-raised); }
.signout-dialog #signout-confirm { color: #fff; background: #bd3048; border-color: #bd3048; }
.signout-dialog #signout-confirm:hover { background: #a6273d; }
.signout-dialog button:disabled { opacity: .6; cursor: wait; }
.client-profile button:focus-visible, #account-profile-card:focus-visible, .signout-dialog button:focus-visible { outline: 2px solid #f47b3d; outline-offset: 3px; }
html[data-theme="light"] .client-profile-plan[data-active="true"] { color: #913d13; }
html[data-theme="light"] .client-profile #sign-out, html[data-theme="light"] .signout-dialog-icon { color: #aa2940; }
html[data-theme="light"] #account-profile-card { background: var(--panel); border-color: var(--line); }
html[data-theme="light"] #account-profile-card #account-name { color: var(--text); }
html[data-theme="light"] #account-profile-card #account-email { color: var(--muted); }
html[data-theme="light"] #account-profile-card .suno-profile-edit-btn { background: var(--surface); color: var(--text); }
@media (max-width: 480px) {
  .auth-dialog[data-mode="profile"], .signout-dialog { padding: 22px; }
  .client-profile-summary > div { padding: 13px; }
  #account-profile-card .suno-profile-top { flex-wrap: wrap; row-gap: 5px; }
  #account-profile-card .suno-profile-top b { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .client-profile-action, #account-profile-card { transition: none; }
}
