/* Approved account/card detail layouts. Shared theme tokens keep appearance live.
 * Scoped important font sizes bridge readability.css, whose global type rules
 * are important; layout specificity alone cannot override them. */
.phone .detail-page {
  --detail-surface: var(--biz-surface, var(--paper, #fff));
  --detail-soft: var(--biz-surface-soft, var(--soft, #f4f6f8));
  --detail-ink: var(--biz-ink, var(--ink, #1b2634));
  --detail-muted: var(--biz-muted, var(--muted, #66717f));
  --detail-line: var(--biz-line, var(--line, #e6ebf0));
  --detail-primary: var(--biz-brand, #0755f5);
  --detail-selected: var(--biz-selected, #edf3ff);
  --detail-success: var(--biz-success, #17724c);
  --detail-success-soft: var(--biz-success-soft, #edf8f2);
  --detail-danger: var(--biz-danger, #ab3442);
  color: var(--detail-ink);
}
html body .phone .detail-page :is(button, h1, h2, strong, bdi, p, small, span) {
  font-family: "Vazirmatn Regular", Tahoma, sans-serif;
  letter-spacing: normal;
}
html body .phone .detail-page :is(h1, h2, strong) { font-family: "Vazirmatn Medium", Tahoma, sans-serif; font-weight: 500; }
html body .phone .detail-page svg { flex-shrink: 0; width: 20px; height: 20px; stroke-width: 1.7; }
html body .phone .detail-page [hidden] { display: none !important; }
html body .phone .detail-page .detail-header { min-height: 44px; margin: 0 4px 24px; padding: 0; }
html body .phone .detail-page .detail-header > button { min-height: 44px; min-width: 44px; width: auto; padding: 0; gap: 7px; font-size: 13px !important; color: var(--detail-muted); border: 0; background: transparent; box-shadow: none; }
html body .phone .detail-page .detail-header > button:first-child svg { transform: rotate(180deg); }
html body .phone .detail-page .detail-page-caption { color: var(--detail-muted); font-size: 13px !important; }
html body .phone .detail-page .detail-surface { background: var(--detail-surface); border: 1px solid var(--detail-line); border-radius: 24px; box-shadow: 0 4px 18px rgb(21 38 59 / 2%); }
html body .phone .detail-page .account-overview { padding: 18px 20px; container-type: inline-size; }
html body .phone .detail-page .detail-overview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
html body .phone .detail-page .detail-overview-heading h1 { font-size: 18px !important; line-height: 1.5; margin: 0 0 2px; }
html body .phone .detail-page .detail-caption { color: var(--detail-muted); font-size: 12px !important; line-height: 1.8; }
html body .phone .detail-page .detail-status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; margin-top: 4px; color: var(--detail-success); background: var(--detail-success-soft); border: 0; border-radius: 100px; font-size: 12px !important; line-height: 1.8; white-space: nowrap; }
html body .phone .detail-page .detail-status::before { content: ""; width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
html body .phone .detail-page .detail-status.is-frozen { color: var(--biz-info, #3b608c); background: var(--detail-selected); }
html body .phone .detail-page .detail-status.is-limited { color: var(--biz-warning, #856028); background: var(--biz-warning-soft, #faf4e8); }
html body .phone .detail-page .detail-balance-block { padding: 16px 0 14px; }
html body .phone .detail-page .detail-balance-label { position: relative; display: flex; align-items: center; min-height: 24px; padding-inline-end: 44px; gap: 8px; font-size: 12px !important; color: var(--detail-muted); }
html body .phone #account-detail-balance-toggle { position: absolute; inset-inline-end: -6px; top: 50%; transform: translateY(-50%); }
html body .phone .detail-page .detail-balance-label > span { font-size: 12px !important; }
html body .phone .detail-page .detail-icon-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; color: var(--detail-muted); background: transparent; box-shadow: none; }
html body .phone .detail-page .detail-icon-button:hover { background: var(--detail-soft); }
html body .phone .detail-page .detail-balance-amount { display: flex; align-items: baseline; gap: 7px; min-height: 0; margin-top: 3px; direction: rtl; }
html body .phone .detail-page .detail-balance-amount strong { color: var(--detail-ink); font-size: clamp(27px, 11cqw, 34px) !important; line-height: 1.35; letter-spacing: -.8px; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
html body .phone .detail-page .detail-balance-amount > span { color: var(--detail-muted); font-size: 13px !important; }
html body .phone .detail-page .detail-number-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--detail-line); padding-top: 8px; color: var(--detail-muted); font-size: 13px !important; }
html body .phone .detail-page .detail-number-row > div { display: flex; align-items: center; gap: 7px; }
html body .phone .detail-page .detail-number-row bdi { color: var(--detail-ink); font-size: 14px !important; font-variant-numeric: tabular-nums; }
html body .phone .detail-page .detail-number-row button { margin-inline-end: -10px; }
html body .phone .detail-page .detail-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 10px 14px; border: 1px solid var(--detail-line); border-radius: 15px; background: var(--detail-surface); color: var(--detail-ink); font-size: 14px !important; line-height: 1.7; font-family: "Vazirmatn Medium", Tahoma, sans-serif; box-shadow: none; }
html body .phone .detail-page .detail-primary { border-color: var(--detail-primary); background: var(--detail-primary); color: #fff; }
html body .phone .detail-page .detail-button:disabled { opacity: .4; cursor: not-allowed; }
html body .phone .detail-page .detail-account-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
html body .phone #account-detail-send { grid-column: 1 / -1; min-height: 54px; }
html body .phone .detail-page .detail-linked-card { margin-top: 23px; padding: 16px; border-radius: 20px; }
html body .phone .detail-page .detail-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 17px 0; border: 0; border-radius: 0; background: transparent; text-align: right; color: var(--detail-ink); }
html body .phone .detail-page .detail-row > svg { color: var(--detail-muted); }
html body .phone .detail-page .detail-linked-card .detail-row { padding: 0; }
html body .phone .detail-page .detail-card-thumb { display: block; flex-shrink: 0; width: 61px; height: 40px; border: 1px solid var(--detail-line); border-radius: 7px; background: var(--bank-card-art) center / cover no-repeat; }
html body .phone .detail-page .detail-row-copy { flex: 1; min-width: 0; }
html body .phone .detail-page .detail-row-copy strong { display: block; font-size: 14px !important; line-height: 1.7; }
html body .phone .detail-page .detail-row-copy small { display: block; color: var(--detail-muted); font-size: 11px !important; line-height: 1.8; margin-top: 3px; }
html body .phone .detail-page .detail-linked-card small[data-card-status="active"] { color: var(--detail-success); }
html body .phone .detail-page .detail-chevron { width: 16px; height: 16px; color: var(--detail-muted); }
html body .phone .detail-page .detail-section { margin-top: 24px; padding: 0; border: 0; background: transparent; box-shadow: none; }
html body .phone .detail-page .detail-section > h2 { margin: 0 5px 10px; color: var(--detail-muted); font-size: 13px !important; line-height: 1.8; font-family: "Vazirmatn Regular", Tahoma, sans-serif; font-weight: 400; }
html body .phone .detail-page .detail-row-list { padding: 0 16px; }
html body .phone .detail-page .detail-row-list .detail-row + .detail-row { border-top: 1px solid var(--detail-line); }
html body .phone .detail-page .detail-risk { margin-top: var(--biz-section-gap); padding: 0; border-top: var(--biz-divider-thickness) solid var(--detail-line); }
html body .phone .detail-page .detail-card-heading { font-size: 20px !important; line-height: 1.7; margin: 0 4px 17px; }

html body .phone .detail-page .detail-blocked-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; color: var(--detail-muted); }
html body .phone .detail-page .detail-blocked-row > span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px !important; line-height: 1.7; }
html body .phone .detail-page .detail-blocked-row svg { width: 14px; height: 14px; }
html body .phone .detail-page .detail-blocked-value { display: inline-flex; align-items: baseline; gap: 5px; }
html body .phone .detail-page .detail-blocked-value strong { font-size: 15px !important; line-height: 1.5; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
html body .phone .detail-page .detail-blocked-value > span { font-size: 11px !important; }

/* Keep all three saved card designs; adapt only the detail page composition. */
html body .phone #screen-card-detail #card-hero { width: 100%; margin: 0 0 18px; border-radius: 20px; }
html body .phone #screen-card-detail #card-hero > .card-top { inset: 9% 6% auto; }
html body .phone #screen-card-detail #card-hero .card-brand { font-size: clamp(13px, 4.6cqw, 17px) !important; font-family: "Vazirmatn Medium", Tahoma, sans-serif; }
html body .phone #screen-card-detail #card-hero .card-brand img { width: 9cqw; }
html body .phone #screen-card-detail #card-hero .detail-card-label { color: var(--bank-card-ink); font-size: clamp(9px, 3cqw, 11px) !important; font-family: "Vazirmatn Regular", Tahoma, sans-serif; }
html body .phone #screen-card-detail #card-hero > .card-hardware { top: 32%; right: 6%; left: auto; gap: 10px; direction: rtl; }
html body .phone #screen-card-detail #card-hero .chip { width: 8.5cqw; height: 7cqw; }
html body .phone #screen-card-detail #card-hero #card-detail-number { inset: auto 6% 19% auto; max-width: 78%; padding: 3px 0; font-size: clamp(15px, 5.6cqw, 22px) !important; letter-spacing: .035em; line-height: 1.5; }
html body .phone #screen-card-detail #card-hero.design-wave #card-detail-number { padding-inline: 7px; }
html body .phone #screen-card-detail #card-hero #card-detail-number-toggle { position: absolute; left: 3%; bottom: 17%; color: var(--bank-card-ink); }
html body .phone #screen-card-detail #card-hero #card-detail-number-toggle:hover { background: rgb(255 255 255 / 15%); }
html body .phone #screen-card-detail #card-hero footer { inset: auto 6% 8% auto; }
html body .phone .detail-page .detail-card-actions { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 10px; margin: 0 0 20px; }
html body .phone .detail-page .detail-card-actions .detail-button { min-height: 52px; }
html body .phone .detail-page .detail-share { padding: 0; }
html body .phone .detail-page .detail-card-info { padding: 20px; }
html body .phone .detail-page .detail-card-info-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--detail-line); }
html body .phone .detail-page .detail-card-info-title { display: flex; align-items: center; gap: 11px; }
html body .phone .detail-page .detail-icon-well { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 13px; background: var(--detail-soft); color: var(--detail-muted); }
html body .phone .detail-page .detail-card-info-title h2 { margin: 0; font-size: 16px !important; line-height: 1.7; }
html body .phone .detail-page .detail-card-info-title p { margin: 3px 0 0; font-size: 12px !important; line-height: 1.8; color: var(--detail-muted); }
html body .phone .detail-page .detail-account-link { padding-top: 17px; }
html body .phone .detail-page .detail-account-link > div { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; }
html body .phone .detail-page .detail-account-link strong { font-size: 14px !important; line-height: 1.8; }
html body .phone .detail-page .detail-account-link bdi { color: var(--detail-muted); font-size: 12px !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
html body .phone .detail-page .detail-card-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
html body .phone .detail-page .detail-card-controls > button { display: flex; align-items: center; gap: 11px; padding: 14px; min-height: 70px; border: 1px solid var(--detail-line); border-radius: 18px; background: var(--detail-surface); color: var(--detail-ink); text-align: right; }
html body .phone .detail-page .detail-card-controls svg { color: var(--detail-muted); }
html body .phone .detail-page .detail-card-controls strong { display: block; font-size: 13px !important; line-height: 1.7; }
html body .phone .detail-page .detail-card-controls small { display: block; margin-top: 2px; font-size: 11px !important; line-height: 1.8; color: var(--detail-muted); }
html body .phone .detail-page .detail-confirm { width: min(420px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 22px; color: var(--detail-ink); background: var(--detail-surface); border: 1px solid var(--detail-line); border-radius: 24px; }
html body .phone .detail-page .detail-confirm::backdrop { background: rgb(12 22 36 / 45%); }
html body .phone .detail-page .detail-confirm header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
html body .phone .detail-page .detail-confirm h2 { margin: 0; font-size: 18px !important; }
html body .phone .detail-page .detail-confirm p { margin: 10px 0 18px; color: var(--detail-muted); font-size: 14px !important; line-height: 1.9; }
html body .phone .detail-page .detail-confirm .detail-button { width: 100%; margin-top: 10px; }
@media (max-width: 380px) {
  html body .phone .detail-page .account-overview,
  html body .phone .detail-page .detail-card-info { padding: 16px; }
  html body .phone .detail-page .detail-overview-heading { gap: 8px; }
  html body .phone .detail-page .detail-overview-heading h1 { font-size: 16px !important; }
  html body .phone .detail-page .detail-balance-amount strong { letter-spacing: -1px; }
  html body .phone .detail-page .detail-card-controls > button { padding: 12px; gap: 8px; }
  html body .phone .detail-page .detail-card-info-title { gap: 8px; }
  html body .phone .detail-page .detail-icon-well { width: 36px; height: 40px; }
  html body .phone .detail-page .detail-card-info-header { gap: 6px; }
}
