/* Compatibility for the native Rust journal controls. */
.cv-journal-compose > summary { list-style: none; cursor: pointer; }
.cv-journal-compose > summary::-webkit-details-marker { display: none; }
.cv-journal-compose:not([open]) .cv-journal-collapse,
.cv-journal-compose[open] .cv-journal-open { display: none; }
.cv-journal-select, .cv-trade-status select { min-height: 44px; padding: 10px 12px; border: 1px solid var(--material-rim); border-radius: var(--radius-input); background: var(--material-nested); color: var(--color-text); }
.cv-journal-closed-fields, .cv-journal-exit-date { display: none; }
.cv-trade-execution[data-closed="true"] .cv-journal-closed-fields { display: contents; }
.cv-trade-execution[data-closed="true"] .cv-journal-exit-date { display: flex; }
.cv-journal-unavailable { color: var(--color-muted); font-size: 12px; margin: 16px 0; }
.cv-journal-select-anchor { position: relative; display: block; min-width: 0; }
.cv-journal-select-anchor > .c-select { width: 100%; }
.cv-journal-menu { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: max(100%, 240px); max-width: min(280px, 80vw); max-height: 360px; overflow: auto; }
.cv-journal-compose[data-open="true"] > .cv-manual-heading .cv-journal-select-wrap { display: none; }

.cv-trade-composer[hidden] { display: none; }
.cv-security-password-form fieldset { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; border: 0; margin: 0; padding: 0; }
.cv-security-password-form fieldset > button { justify-self: start; }
[data-profile-mfa] > summary { list-style: none; cursor: pointer; }
[data-profile-mfa] > summary::-webkit-details-marker { display: none; }
@media (max-width: 640px) { .cv-security-password-form fieldset { grid-template-columns: minmax(0,1fr); } }
.cv-connection-form fieldset { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; border: 0; margin: 0; padding: 0; }
.cv-connection-form fieldset > details, .cv-connection-form fieldset > p { grid-column: 1 / -1; }
@media (max-width: 640px) { .cv-connection-form fieldset { grid-template-columns: minmax(0,1fr); } }
#account-security > .cv-profile-card { border: 0; border-top: 1px solid var(--profile-border); background: transparent; border-radius: 0; box-shadow: none; padding: 20px 0 0; margin-top: 24px; }

/* Account settings share the product's neutral Liquid Glass materials. */
.cv-product-shell.cv-product-shell[data-theme] #cv-header[data-scrolled=true]:before {
  opacity: 1; background: color-mix(in srgb,var(--color-bg) 91%,transparent);
  backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
.cv-product-shell[data-theme] .cv-profile-settings {
  font-family: "Converge UI", "Golos Text", sans-serif;
}
.cv-product-shell[data-theme] .cv-profile-workspace { min-width: 0; }
.cv-product-shell[data-theme] .cv-profile-tabs-scroll { padding-bottom: 8px; }
.cv-product-shell[data-theme] .cv-profile-tabs { gap: 4px; }
.cv-product-shell[data-theme] .cv-profile-tabs > a { min-height: 44px; font-size: 13px; }
.cv-settings-heading { display: block; margin: 0 0 26px; }
.cv-product-shell .cv-referrals > .cv-settings-heading { display: block; }
.cv-settings-heading h2, .cv-security > h2 { margin: 0; font-size: 23px; line-height: 1.3; font-weight: 500; letter-spacing: -.025em; }
.cv-settings-heading p, .cv-settings-block > p, .cv-settings-row p { margin: 9px 0 0; max-width: 65ch; color: var(--color-muted); font-size: 14px; line-height: 1.65; }
.cv-product-shell[data-theme] .cv-profile-settings :is(.cv-profile-form,.cv-profile-form fieldset) { min-width: 0; margin: 0; padding: 0; border: 0; }
.cv-product-shell[data-theme] .cv-profile-settings .cv-profile-form fieldset { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 18px; }
.cv-product-shell[data-theme] .cv-profile-settings .cv-profile-form fieldset > .c-btn { justify-self: start; margin: 2px 0 0; }
.cv-product-shell[data-theme] .cv-profile-settings :is(#account-security,.cv-referrals,.cv-feature-locked,.cv-profile-card) :is(.c-btn,.c-tool-button) {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; height: auto; max-width: 100%; padding: 11px 20px;
  border: 1px solid var(--material-rim); border-radius: var(--radius-pill,999px);
  background: linear-gradient(135deg,var(--material-top),transparent 70%),var(--material-surface);
  color: var(--color-text); box-shadow: inset 0 1px 0 var(--material-top),0 5px 16px -12px #0005;
  font: 500 13px/1.5 "Converge UI", "Golos Text", sans-serif;
  text-align: center; white-space: normal; overflow-wrap: anywhere;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.cv-product-shell[data-theme] .cv-profile-settings :is(#account-security,.cv-referrals,.cv-feature-locked,.cv-profile-card) :is(.c-btn,.c-tool-button):hover:not(:disabled) { background-color: var(--material-hover); }
.cv-product-shell[data-theme] .cv-profile-settings :is(button,a,input,summary):focus-visible { outline: 2px solid var(--color-muted); outline-offset: 3px; }
.cv-product-shell[data-theme] .cv-profile-settings button:disabled { opacity: .5; cursor: not-allowed; }
.cv-product-shell[data-theme] .cv-profile-settings .cv-profile-form :is(.c-field,input,textarea) { min-width: 0; width: 100%; box-sizing: border-box; }
.cv-product-shell[data-theme] .cv-profile-settings .c-field { display: grid; gap: 8px; color: var(--color-muted); font-size: 13px; line-height: 1.5; }
.cv-product-shell[data-theme] .cv-profile-settings :is(input:not([type=checkbox]),textarea) {
  min-height: 48px; padding: 12px 15px; border: 1px solid var(--profile-field-border);
  border-radius: var(--radius-input,14px); background: var(--profile-field); color: var(--color-text);
  font-family: inherit; font-size: 14px; line-height: 1.5;
}
.cv-product-shell[data-theme] .cv-profile-settings input[type=checkbox] { width: 18px; height: 18px; }
.cv-security-email { display: grid; gap: 9px; margin-bottom: 28px; }
.cv-security-email > span { color: var(--color-muted); font-size: 12px; }
.cv-security-email > strong { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.cv-security-email > p { margin: 0; font-size: 13px; color: var(--color-muted); }
.cv-security-email .cv-profile-form { margin-top: 7px!important; }
.cv-settings-block { padding: 26px 0; border-top: 1px solid var(--profile-border,var(--material-rim)); }
.cv-settings-block h3, .cv-security .cv-profile-card h2 { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 500; }
.cv-settings-block > .cv-profile-form, .cv-settings-block > details { margin-top: 20px!important; }
.cv-settings-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cv-product-shell[data-theme] #account-security :is(.cv-security-password-form,[data-workspace-form=security_password]) { max-width: none; }
.cv-product-shell[data-theme] #account-security :is(.cv-security-password-form,[data-workspace-form=security_password]) fieldset { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
:is(.cv-security-password-form,[data-workspace-form=security_password]) .c-field:first-child { grid-column: 1 / -1; max-width: calc(50% - 10px); }
:is(.cv-security-password-form,[data-workspace-form=security_password]) button { grid-column: 1 / -1; }
.cv-product-shell[data-theme] #account-security :is(.cv-security-password-form,[data-workspace-form=security_password]) input { padding-right: 15px!important; border-color: var(--profile-field-border); background: var(--profile-field); color: var(--color-text); box-shadow: inset 0 1px 0 var(--material-top); }
.cv-security details > summary { width: fit-content; list-style: none; }
.cv-security details > summary:after { content: "+"; margin-left: 8px; font-size: 18px; line-height: 1; }
.cv-security details[open] > summary:after { content: "−"; }
.cv-security details > p { margin: 18px 0; color: var(--color-muted); font-size: 14px; line-height: 1.65; }
.cv-security details .cv-profile-form { max-width: 460px; }
.cv-product-shell[data-theme] #account-security > .cv-profile-card { margin-top: 26px; padding-top: 26px; }
#account-security > .cv-profile-card > p { margin: 10px 0 20px; color: var(--color-muted); font-size: 14px; line-height: 1.65; }
#account-security > .cv-profile-card .cv-profile-form { max-width: 560px; }
#account-security > .cv-profile-card ul { margin: 16px 0 20px; padding: 0; list-style: none; }
#account-security > .cv-profile-card li { padding: 12px 0; border-bottom: 1px solid var(--material-rim); font-size: 13px; line-height: 1.6; }
.cv-referral-share { display: flex; align-items: flex-end; gap: 12px; padding: 22px; border: 1px solid var(--material-rim); border-radius: var(--radius-panel,22px); background: var(--material-surface); box-shadow: inset 0 1px 0 var(--material-top); }
.cv-referral-share > label { flex: 1; min-width: 0; }
.cv-referral-share .c-input { width: 100%; min-width: 0; box-sizing: border-box; }
.cv-referral-share > button { flex: 0 0 auto; min-height: 48px!important; }
.cv-profile-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.cv-profile-metrics > div { min-width: 0; padding: 20px; border: 1px solid var(--material-rim); border-radius: var(--radius-input,14px); background: var(--material-surface); }
.cv-profile-metrics dt { font-size: 12px; line-height: 1.5; color: var(--color-muted); }
.cv-profile-metrics dd { margin: 12px 0 0; font-size: 27px; font-weight: 500; letter-spacing: -.03em; overflow-wrap: anywhere; }
.cv-profile-metrics dd small { font-size: 12px; font-weight: 400; color: var(--color-muted); }
.cv-profile-metrics dd small { margin-left: 6px; }
.cv-referral-empty { display: grid; justify-items: center; padding: 38px 24px; text-align: center; border: 1px dashed var(--material-rim); border-radius: var(--radius-panel,22px); }
.cv-referral-empty > span { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid var(--material-rim); border-radius: 50%; background: var(--material-surface); color: var(--color-muted); }
.cv-referral-empty h3 { margin: 18px 0 8px; font-size: 16px; font-weight: 500; }
.cv-referral-empty p { max-width: 38ch; margin: 0; color: var(--color-muted); font-size: 13px; line-height: 1.65; }
.cv-profile-table { max-width: 100%; overflow-x: auto; margin-top: 24px; }
.cv-profile-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cv-profile-table caption { padding-bottom: 16px; text-align: left; color: var(--color-muted); }
.cv-profile-table :is(th,td) { padding: 14px 16px; border-bottom: 1px solid var(--material-rim); text-align: left; }
.cv-referrals-full > .cv-profile-card { margin-top: 24px; }
.cv-feature-locked { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; min-height: 420px; padding: 40px 24px; box-sizing: border-box; border: 1px solid var(--material-rim); border-radius: var(--radius-panel,22px); background: var(--material-surface); }
.cv-locked-preview { position: absolute; z-index: -2; inset: 36px; display: grid; gap: 20px; align-content: center; filter: blur(9px); opacity: .35; pointer-events: none; user-select: none; }
.cv-locked-preview > div { display: flex; align-items: center; gap: 18px; padding: 26px; border: 1px solid var(--material-rim); border-radius: 18px; background: var(--material-hover); }
.cv-locked-preview i { width: 40px; height: 40px; border-radius: 50%; background: var(--color-muted); }
.cv-locked-preview b { width: 38%; height: 12px; border-radius: 10px; background: var(--color-muted); }
.cv-locked-preview span { margin-left: auto; width: 18%; height: 30px; border-radius: 20px; background: var(--color-muted); }
.cv-feature-locked:after { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb,var(--color-bg) 76%,transparent); }
.cv-locked-content { display: grid; justify-items: center; max-width: 440px; text-align: center; }
.cv-locked-icon { display: grid; place-items: center; width: 88px; height: 88px; margin-bottom: 20px; border: 1px solid var(--material-rim); border-radius: 50%; background: linear-gradient(135deg,var(--material-top),transparent),var(--material-surface); box-shadow: inset 0 1px 0 var(--material-top),0 12px 35px -20px #0008; }
.cv-settings-eyebrow { color: var(--color-muted); font-size: 12px; line-height: 1.5; }
.cv-locked-content :is(h1,h2) { margin: 8px 0 12px; font-size: 26px; line-height: 1.25; font-weight: 500; letter-spacing: -.035em; }
.cv-locked-content p { margin: 0 0 24px; color: var(--color-muted); font-size: 14px; line-height: 1.7; }
.cv-alerts-closed { max-width: 1000px; margin-inline: auto; }
.cv-alerts-closed .cv-feature-locked { min-height: 520px; }
@media(max-width: 700px) {
  .cv-product-shell[data-theme] .cv-profile-settings .cv-profile-identity-card { padding: 18px; }
  .cv-product-shell[data-theme] .cv-profile-person { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 6px 12px; align-items: center; text-align: left; }
  .cv-product-shell[data-theme] .cv-profile-person .cv-profile-avatar { width: 48px; height: 48px; margin: 0; grid-row: 1 / 3; }
  .cv-profile-person .cv-profile-avatar svg { width: 26px; height: 26px; }
  .cv-product-shell[data-theme] .cv-profile-person > h2 { display: none; }
  .cv-product-shell[data-theme] .cv-profile-person > p { margin: 0; font-size: 12px; }
  .cv-product-shell[data-theme] .cv-profile-person .cv-profile-email { grid-column: 2; margin: 0; padding: 7px 10px; max-width: 100%; width: fit-content; font-size: 12px; }
  .cv-product-shell[data-theme] .cv-profile-settings .cv-profile-plan-card { margin-top: 16px; padding: 14px 16px; }
  .cv-product-shell[data-theme] .cv-profile-plan-card > p { margin: 8px 0 12px; font-size: 12px; }
  .cv-product-shell[data-theme] .cv-profile-plan-card > a { padding-top: 12px; font-size: 12px; }
  /* The same tools remain available in the mobile header and account tabs. */
  .cv-product-shell[data-theme] .cv-profile-tools { display: none; }
  .cv-product-shell[data-theme] .cv-profile-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; border-radius: 20px; box-sizing: border-box; }
  .cv-product-shell[data-theme] .cv-profile-tabs > a { min-width: 0; min-height: 48px; padding: 9px 10px; border-radius: 16px; font-size: 12px; white-space: normal; }
  .cv-product-shell.cv-product-shell[data-theme] .cv-profile-settings .cv-profile-tabs:is(.c-local-edge-segment,.c-scanner-hover-lens):before,
  .cv-product-shell.cv-product-shell[data-theme] .cv-profile-settings .cv-profile-tabs.c-scanner-hover-lens:after { border-radius: 16px; }
  .cv-product-shell[data-theme] #account-security :is(.cv-security-password-form,[data-workspace-form=security_password]) fieldset { grid-template-columns: minmax(0,1fr); gap: 18px; }
  :is(.cv-security-password-form,[data-workspace-form=security_password]) .c-field:first-child { max-width: none; }
  .cv-settings-heading h2 { font-size: 21px; }
  .cv-settings-row { align-items: flex-start; flex-direction: column; gap: 16px; }
  .cv-referral-share { flex-direction: column; align-items: stretch; padding: 18px; gap: 14px; }
  .cv-profile-metrics { grid-template-columns: minmax(0,1fr); }
  .cv-profile-metrics > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 18px; }
  .cv-profile-metrics dd { margin: 0; font-size: 23px; }
  .cv-feature-locked { min-height: 400px; padding: 30px 20px; }
  .cv-locked-icon { width: 76px; height: 76px; }
  .cv-locked-content :is(h1,h2) { font-size: 23px; }
  .cv-product-shell[data-theme] .cv-profile-settings .cv-profile-form fieldset > .c-btn { width: 100%; justify-self: stretch; }
}
@media(prefers-reduced-motion: reduce) { .cv-profile-settings :is(#account-security,.cv-referrals,.cv-feature-locked,.cv-profile-card) :is(.c-btn,.c-tool-button) { transition: none!important; } }

.cv-product-shell[data-theme] #account-security .cv-profile-card > h2 { margin: 0 0 16px; font-size: 16px; font-weight: 500; line-height: 1.5; }
.cv-product-shell[data-theme] .cv-profile-settings #manual-records {
  padding: 0; border: 0; border-radius: 0!important; background: transparent; box-shadow: none;
}
.cv-product-shell[data-theme] .cv-profile-settings #manual-records > .cv-manual-stats { margin-block: 24px; }
