/* ===========================================================
   ACCOUNT PAGE
   Reuses design tokens (--cs-*) and shell layout classes
   (.cs-app, .cs-shell, .cs-frame, .cs-main, .cs-main-primary,
   .cs-section, .cs-error-state, etc.) defined in dashboard.css.
   Load dashboard.css on this page too — this file only adds
   what's specific to Account.

   Brand colors confirmed for this page:
     --cs-brand-600  ≈ #0066FF  (bright blue — interactive accents)
     --cs-brand-700  ≈ #0639C7  (deeper blue — icon tint, primary tag)
     --cs-ink-950    ≈ #0B1F3B  (near-navy — the rgba(6,24,58,…)
                                  cover gradients already used in
                                  accounts.js / explore.js are this
                                  color at reduced opacity)
   =========================================================== */

/* ---------- page padding, scoped to Account only (mirrors Explore's
   pattern: .cs-main already gives every shell page a base 16px
   mobile / 28–32px desktop padding from dashboard.css — this adds a
   little extra for Account's card-heavy content, without touching
   the shared .cs-main rule dashboard.js / transactions.js rely on) ---------- */

.cs-account-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 6px 4px 10px;
}

@media (min-width: 640px) {
  .cs-account-content {
    padding: 10px 8px 16px;
  }
}

@media (min-width: 1024px) {
  .cs-account-content {
    padding: 4px 12px 20px;
  }
}

/* ---------- header ---------- */

.cs-account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cs-account-title {
  margin: 0;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 21px;
  color: var(--cs-ink-950);
}

.cs-account-settings-btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--cs-cloud-200);
  background: var(--cs-white);
  color: var(--cs-brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cs-account-settings-btn:hover {
  background: var(--cs-cloud-100);
}

/* ---------- cover: masked number + balance ---------- */

.cs-account-cover {
  position: relative;
  border-radius: var(--cs-radius-lg);
  overflow: hidden;
  min-height: 190px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  padding: 20px;
  color: var(--cs-white);
}

.cs-account-cover-number {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  font-weight: 600;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

.cs-account-cover-spacer {
  flex: 1 1 auto;
}

.cs-account-cover-label {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
}

.cs-account-cover-amount {
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  margin-top: 2px;
}

/* ---------- incoming / outgoing ---------- */

.cs-flow-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cs-flow-card {
  background: var(--cs-white);
  border: 1px solid var(--cs-cloud-200);
  border-radius: var(--cs-radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-flow-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--cs-cloud-100);
  color: var(--cs-brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-flow-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cs-slate-600);
}

.cs-flow-amount {
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--cs-ink-950);
}

/* ---------- section title (matches Explore's socials-title weight) ---------- */

.cs-account-section-title {
  margin: 0 0 12px;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 15.5px;
  color: var(--cs-ink-950);
}

/* ---------- quick actions ---------- */

.cs-quick-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cs-quick-action-card {
  position: relative;
  background: var(--cs-white);
  border: 1px solid var(--cs-cloud-200);
  border-radius: var(--cs-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}

.cs-quick-action-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--cs-brand-700);
  color: var(--cs-white);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--cs-radius-pill);
}

.cs-quick-action-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--cs-cloud-100);
  color: var(--cs-brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-quick-action-label {
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--cs-ink-950);
}

/* ---------- budget alert ---------- */

.cs-budget-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--cs-cloud-100);
  border-radius: var(--cs-radius-md);
  padding: 14px;
}

.cs-budget-alert-icon {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--cs-white);
}

.cs-budget-alert-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cs-budget-alert-title {
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--cs-ink-950);
}

.cs-budget-alert-message {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--cs-slate-600);
}

/* ---------- masked profile footer ---------- */

.cs-account-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cs-white);
  border: 1px solid var(--cs-cloud-200);
  border-radius: var(--cs-radius-md);
  padding: 14px;
}

.cs-account-profile-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cs-cloud-100);
}

.cs-account-profile-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cs-brand-700);
}

.cs-account-profile-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cs-account-profile-name {
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--cs-ink-950);
}

.cs-account-profile-business,
.cs-account-profile-detail {
  font-size: 12px;
  color: var(--cs-slate-600);
}

/* ===========================================================
   SETTINGS PANEL (right-side drawer)
   =========================================================== */

.cs-settings-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}

.cs-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 59, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cs-settings-sheet {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: var(--cs-white);
  box-shadow: -8px 0 24px rgba(11, 31, 59, 0.15);
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cs-settings-panel.is-open {
  pointer-events: auto;
}

.cs-settings-panel.is-open .cs-settings-backdrop {
  opacity: 1;
}

.cs-settings-panel.is-open .cs-settings-sheet {
  transform: translateX(0);
}

.cs-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--cs-cloud-200);
}

.cs-settings-head h2 {
  margin: 0;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--cs-ink-950);
}

.cs-settings-close {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--cs-cloud-100);
  color: var(--cs-slate-600);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- accordions ---------- */

.cs-accordion {
  border-bottom: 1px solid var(--cs-cloud-200);
}

.cs-accordion .cs-accordion {
  border-bottom: none;
  margin-top: 4px;
}

.cs-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: none;
  border: none;
  padding: 14px 0;
  cursor: pointer;
  text-align: left;
}

.cs-accordion-title {
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--cs-ink-950);
}

.cs-accordion-chevron {
  flex: none;
  color: var(--cs-slate-400);
  transition: transform 0.2s ease;
}

.cs-accordion.is-open > .cs-accordion-toggle .cs-accordion-chevron {
  transform: rotate(180deg);
}

.cs-accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.cs-accordion-body > * {
  min-height: 0;
  overflow: hidden;
}

.cs-accordion.is-open > .cs-accordion-body {
  grid-template-rows: 1fr;
}

/* ---------- account type rows ---------- */

.cs-account-type-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 12px;
}

.cs-account-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cs-white);
  border: 1px solid var(--cs-cloud-200);
  border-radius: var(--cs-radius-md);
  padding: 12px;
  cursor: pointer;
  text-align: left;
}

.cs-account-row--empty {
  cursor: default;
  background: var(--cs-cloud-100);
  border-style: dashed;
}

.cs-account-row-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--cs-cloud-100);
  color: var(--cs-brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-account-row--empty .cs-account-row-icon {
  background: var(--cs-white);
  color: var(--cs-slate-400);
}

.cs-account-row-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cs-account-row-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--cs-ink-950);
}

.cs-account-row-number,
.cs-account-row-paybill {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--cs-slate-600);
}

.cs-account-row-balance {
  font-weight: 700;
  font-size: 13px;
  color: var(--cs-ink-950);
  margin-top: 2px;
}

.cs-account-row-primary-tag {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cs-brand-700);
  background: var(--cs-cloud-100);
  padding: 2px 8px;
  border-radius: var(--cs-radius-pill);
  margin-top: 2px;
}

.cs-account-row-empty-note {
  font-size: 11.5px;
  color: var(--cs-slate-400);
}

.cs-account-row-chevron {
  flex: none;
  color: var(--cs-slate-400);
}

/* ---------- account tools / request rows ---------- */

.cs-request-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 12px;
}

.cs-request-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cs-white);
  border: 1px solid var(--cs-cloud-200);
  border-radius: var(--cs-radius-md);
  padding: 12px;
  cursor: pointer;
  text-align: left;
}

.cs-request-row-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--cs-cloud-100);
  color: var(--cs-brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-request-row-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cs-request-row-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--cs-ink-950);
}

.cs-request-row-desc {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--cs-slate-600);
}

.cs-request-row-chevron {
  flex: none;
  color: var(--cs-slate-400);
}

/* ===========================================================
   MANAGE ACCOUNT — bottom sheet
   z-index sits above .cs-settings-panel since it opens from
   within it.
   =========================================================== */

.cs-manage-sheet {
  position: fixed;
  inset: 0;
  z-index: 1010;
  pointer-events: none;
}

.cs-manage-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 59, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cs-manage-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--cs-white);
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 24px;
  box-shadow: 0 -8px 24px rgba(11, 31, 59, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cs-manage-sheet.is-open {
  pointer-events: auto;
}

.cs-manage-sheet.is-open .cs-manage-sheet-backdrop {
  opacity: 1;
}

.cs-manage-sheet.is-open .cs-manage-sheet-panel {
  transform: translateY(0);
}

.cs-manage-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: var(--cs-radius-pill);
  background: var(--cs-cloud-200);
  margin: 0 auto 16px;
}

.cs-manage-sheet-title {
  margin: 0 0 4px;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--cs-ink-950);
  text-align: center;
}

.cs-manage-sheet-subtitle {
  margin: 0 0 16px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--cs-slate-600);
  text-align: center;
}

.cs-manage-sheet-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cs-cloud-100);
  border: none;
  border-radius: var(--cs-radius-md);
  padding: 14px;
  cursor: pointer;
  text-align: left;
}

.cs-manage-sheet-row-icon {
  flex: none;
  color: var(--cs-brand-700);
}

.cs-manage-sheet-row-label {
  flex: 1 1 auto;
  font-weight: 700;
  font-size: 13px;
  color: var(--cs-ink-950);
}

.cs-manage-sheet-row-chevron {
  flex: none;
  color: var(--cs-slate-400);
}

/* ---------- keyboard focus (quality floor) ---------- */

.cs-account-settings-btn:focus-visible,
.cs-settings-close:focus-visible,
.cs-accordion-toggle:focus-visible,
.cs-account-row:focus-visible,
.cs-quick-action-card:focus-visible,
.cs-request-row:focus-visible,
.cs-manage-sheet-row:focus-visible {
  outline: 2px solid var(--cs-brand-600);
  outline-offset: 2px;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .cs-settings-backdrop,
  .cs-settings-sheet,
  .cs-manage-sheet-backdrop,
  .cs-manage-sheet-panel,
  .cs-accordion-chevron,
  .cs-accordion-body {
    transition: none;
  }
}

/* ---------- small screens ---------- */

@media (max-width: 380px) {
  .cs-account-cover-amount {
    font-size: 24px;
  }

  .cs-flow-grid,
  .cs-quick-action-grid {
    gap: 10px;
  }
}
/* ---------- profile: bank-grade summary card ---------- */

.cs-account-profile {
  background: var(--cs-white);
  border: 1px solid var(--cs-cloud-200);
  border-radius: var(--cs-radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cs-account-profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cs-account-profile-avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cs-cloud-100);
}

.cs-account-profile-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cs-brand-700);
}

.cs-account-profile-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cs-account-profile-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cs-account-profile-name {
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--cs-ink-950);
}

.cs-account-profile-verified {
  flex: none;
  display: flex;
  align-items: center;
  color: var(--cs-brand-600);
}

.cs-account-profile-business {
  font-size: 12px;
  color: var(--cs-slate-600);
}

.cs-account-profile-divider {
  border-top: 1px solid var(--cs-cloud-200);
}

.cs-account-profile-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-account-profile-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-account-profile-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--cs-slate-400);
}

.cs-account-profile-field-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--cs-cloud-100);
  border-radius: var(--cs-radius-md);
  padding: 10px 12px;
}

.cs-account-profile-field-value {
  font-family: var(--cs-font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--cs-ink-950);
}

.cs-account-profile-field-value--muted {
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 13px;
  color: var(--cs-slate-600);
  padding: 10px 12px;
  background: var(--cs-cloud-100);
  border-radius: var(--cs-radius-md);
}

.cs-account-profile-copy-btn {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: var(--cs-white);
  color: var(--cs-brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cs-account-profile-copy-btn:hover {
  background: var(--cs-brand-700);
  color: var(--cs-white);
}

.cs-account-profile-copy-btn:focus-visible {
  outline: 2px solid var(--cs-brand-600);
  outline-offset: 2px;
}