/* Account & safety v4: presentation-only finishing for credentials, desktop parity and mobile flow. */

/* The credential editor is intentionally always visible. The disclosure row and
 * duplicate safety notice add height without adding an action, so v4 removes
 * them while leaving the existing credential form and safety behaviour intact. */
.account-v1-page .account-v1-credential-disclosure,
.account-v1-page .account-v2-credential-disclosure,
.account-v1-page .credential-rotation-warning {
  display: none !important;
}

.account-v1-page .account-v1-credential-details,
.account-v1-page .account-v2-credential-details {
  margin-top: 0 !important;
}

.account-mobile-desktop-note {
  display: none;
}

/* On the desktop two-column layout both columns share the same grid-row height.
 * Billing absorbs any small remainder so both bottom borders finish together. */
@media (min-width: 1121px) {
  .account-v1-page .account-v1-main-grid {
    align-items: stretch !important;
  }

  .account-v1-page .account-v3-left-column {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
  }

  .account-v1-page .account-v3-left-column > .account-v3-billing,
  .account-v1-page .account-v1-main-grid > .account-v1-credentials {
    height: 100%;
  }
}

@media (max-width: 760px) {
  .account-mobile-simplified .dashboard-grid {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
  }

  .account-mobile-simplified .dashboard-grid > aside {
    order: -1;
    display: grid;
    width: 100%;
    gap: 10px;
  }

  .account-mobile-simplified .dashboard-grid > aside > .panel,
  .account-mobile-simplified .dashboard-grid > div > .panel {
    width: 100%;
    margin: 0 0 10px !important;
  }

  .account-v1-page .membership-billing-panel,
  .account-v1-page .account-mobile-billing,
  .account-v1-page .account-mobile-resources {
    display: none !important;
  }

  .account-v1-page .account-mobile-agreement .account-v1-agreement-actions,
  .account-v1-page .account-mobile-agreement .inline-link {
    display: none !important;
  }

  .account-v1-page .account-mobile-desktop-note {
    display: block;
    margin: 12px 0 0;
    padding: 11px 12px;
    border: 1px solid rgba(34, 211, 238, .18);
    border-radius: 10px;
    background: rgba(34, 211, 238, .055);
    color: #9fc0d0;
    font-size: 10px;
    line-height: 1.5;
  }

  .main.account-v1-page.account-mobile-parity-v1 {
    width: 100%;
    max-width: none;
    padding: 15px 12px 92px;
  }

  .account-mobile-parity-v1 .topbar {
    margin-bottom: 4px;
  }

  .account-mobile-parity-v1 .topbar h1 {
    font-size: 23px;
    letter-spacing: -.03em;
  }

  .account-mobile-parity-v1 .account-mobile-intro {
    margin: 0 2px 14px;
    color: #86aabd;
    font-size: 10px;
    line-height: 1.5;
  }

  .account-mobile-parity-v1 .account-mobile-stack {
    display: grid;
    width: 100%;
    gap: 10px;
  }

  .account-mobile-parity-v1 .account-mobile-stack > .panel {
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 15px;
    border: 1px solid rgba(31, 85, 111, .72);
    border-radius: 14px;
    background:
      radial-gradient(circle at 94% 0, rgba(42, 211, 179, .04), transparent 34%),
      linear-gradient(145deg, rgba(3, 24, 39, .99), rgba(2, 15, 28, .995));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.022), 0 14px 30px rgba(0,0,0,.15);
  }

  .account-mobile-parity-v1 .account-mobile-stack .panel-head {
    gap: 9px;
    margin-bottom: 13px;
    align-items: flex-start;
  }

  .account-mobile-parity-v1 .account-mobile-stack .panel h2 {
    margin: 0;
    color: #f3fbff;
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: -.02em;
  }

  .account-mobile-parity-v1 .account-mobile-stack .panel-sub {
    margin-top: 4px;
    color: #82a9bd;
    font-size: 9px;
    line-height: 1.45;
  }

  .account-mobile-parity-v1 .account-mobile-environment {
    order: 1;
    display: block;
    min-height: 0;
    padding: 15px;
    border-color: rgba(44, 157, 174, .56) !important;
    background:
      radial-gradient(circle at 88% 10%, rgba(49, 222, 188, .105), transparent 34%),
      linear-gradient(145deg, rgba(3, 28, 43, .995), rgba(2, 16, 29, .995)) !important;
  }

  .account-mobile-parity-v1 .account-mobile-environment > .panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 13px;
  }

  .account-mobile-parity-v1 .account-mobile-environment .environment-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100% !important;
    max-width: none !important;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(35, 84, 108, .9);
    border-radius: 12px;
    background: rgba(2, 15, 27, .9);
  }

  .account-mobile-parity-v1 .account-mobile-environment .environment-toggle [data-select-env] {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #6f94a8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
    box-shadow: none;
  }

  .account-mobile-parity-v1 .account-mobile-environment .environment-toggle [data-select-env$=":PAPER"] {
    order: 1;
  }

  .account-mobile-parity-v1 .account-mobile-environment .environment-toggle [data-select-env$=":MONEY"] {
    order: 2;
  }

  .account-mobile-parity-v1 .account-mobile-environment .environment-toggle .primary,
  .account-mobile-parity-v1 .account-mobile-environment .environment-toggle .account-v1-env-selected {
    background: linear-gradient(145deg, rgba(15, 78, 73, .98), rgba(8, 54, 54, .99));
    color: #dcfff6;
    box-shadow: inset 0 0 0 1px rgba(49, 218, 188, .4), 0 6px 16px rgba(0,0,0,.15);
  }

  .account-mobile-parity-v1 .account-mobile-controls {
    order: 2;
  }

  .account-mobile-parity-v1 .account-mobile-controls .account-v1-control-buttons,
  .account-mobile-parity-v1 .account-mobile-controls .control-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .account-mobile-parity-v1 .account-mobile-controls .button {
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
    font-size: 10px;
  }

  .account-mobile-parity-v1 .account-mobile-risk-panel {
    order: 3;
    border-color: rgba(42, 122, 151, .66) !important;
    background:
      radial-gradient(circle at 94% 0, rgba(56, 183, 216, .065), transparent 34%),
      linear-gradient(145deg, rgba(3, 25, 40, .99), rgba(2, 15, 28, .995)) !important;
  }

  .account-mobile-parity-v1 .account-mobile-risk-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .account-mobile-parity-v1 .account-mobile-risk-body .field {
    min-width: 0;
  }

  .account-mobile-parity-v1 .account-mobile-risk-body .field label {
    margin-bottom: 6px;
    color: #85abba;
    font-size: 9px;
  }

  .account-mobile-parity-v1 .account-mobile-risk-body #risk {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid rgba(42, 91, 116, .82);
    border-radius: 10px;
    background: rgba(1, 13, 24, .9);
    color: #f5fbff;
    font-size: 13px;
    font-weight: 700;
    outline: none;
  }

  .account-mobile-parity-v1 .account-mobile-risk-body #risk:focus {
    border-color: rgba(51, 214, 183, .68);
    box-shadow: 0 0 0 3px rgba(51, 214, 183, .07);
  }

  .account-mobile-parity-v1 .account-mobile-risk-body #save-risk {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border-radius: 10px;
    background: linear-gradient(145deg, #3ce2ba, #28cdb8);
    color: #03181b;
    font-size: 10px;
  }

  .account-mobile-parity-v1 .account-mobile-credentials {
    order: 4;
  }

  .account-mobile-parity-v1 .account-mobile-credentials > .panel-sub {
    display: block;
    margin: 0 0 12px;
    padding: 10px 11px;
    border: 1px solid rgba(29, 74, 96, .62);
    border-radius: 10px;
    background: rgba(5, 31, 45, .52);
    color: #8eafc0;
    font-size: 9px;
    line-height: 1.5;
  }

  .account-mobile-parity-v1 .account-mobile-credentials #credential-rotation-form,
  .account-mobile-parity-v1 .account-mobile-credentials #credential-initial-form {
    display: grid;
    gap: 10px;
    max-width: none;
    margin-top: 0;
  }

  .account-mobile-parity-v1 .account-mobile-credentials .account-v1-technical-field,
  .account-mobile-parity-v1 .account-mobile-credentials #credential-rotation-form > .credential-note {
    display: none !important;
  }

  .account-mobile-parity-v1 .account-mobile-credentials .field input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(39, 83, 105, .78);
    border-radius: 10px;
    background: #020f1d;
    color: #f4fbff;
  }

  .account-mobile-parity-v1 .account-mobile-credentials .confirmation {
    padding: 10px 11px;
    border: 1px solid rgba(31, 77, 99, .65);
    border-radius: 10px;
    background: rgba(5, 34, 49, .55);
    color: #cfe3ee;
    font-size: 10px;
    line-height: 1.45;
  }

  .account-mobile-parity-v1 .account-mobile-credentials button[type="submit"] {
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
    font-size: 10px;
  }

  .account-mobile-parity-v1 .account-mobile-agreement {
    order: 5;
  }

  .account-mobile-parity-v1 .account-mobile-agreement .agreement-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 8px;
    margin: 0;
  }

  .account-mobile-parity-v1 .account-mobile-agreement .agreement-grid > div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(30, 76, 97, .7);
    border-radius: 10px;
    background: rgba(4, 31, 45, .58);
  }

  .account-mobile-parity-v1 .account-mobile-agreement .agreement-grid span {
    color: #7398ad;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .07em;
  }

  .account-mobile-parity-v1 .account-mobile-agreement .agreement-grid strong {
    display: block;
    margin-top: 5px;
    overflow-wrap: anywhere;
    color: #eef9ff;
    font-size: 10px;
  }

  .account-mobile-parity-v1 .account-mobile-agreement .account-v1-agreement-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .account-mobile-parity-v1 .account-mobile-agreement .account-v1-agreement-actions .button {
    width: 100%;
    min-height: 42px;
    justify-content: center;
    border-radius: 10px;
    font-size: 10px;
    text-decoration: none;
  }

  .account-mobile-parity-v1 .account-mobile-agreement .account-v1-agreement-actions .primary {
    background: linear-gradient(145deg, #3ce2ba, #28cdb8);
    color: #03181b;
  }

  .account-mobile-parity-v1 .account-mobile-billing {
    order: 6;
  }

  .account-mobile-parity-v1 .account-mobile-billing .resource-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .account-mobile-parity-v1 .account-mobile-billing #manage-bot-subscription {
    display: inline-flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 10px;
    text-align: center;
    text-decoration: none;
  }

  .account-mobile-parity-v1 .tradezero-resources,
  .account-mobile-parity-v1 .account-v1-summary {
    display: none !important;
  }
}
