/* Mobile-first: base rules target phones (~90% of traffic per Sergio),
   desktop gets extra breathing room via the min-width query at the bottom. */

#afc-account {
    --afc-accent: #B32726 !important;
    --afc-accent-hover: #8f1f1e !important;
    --afc-gold: #d4a017 !important;
    --afc-bg: #f5f5f7 !important;
    --afc-white: #ffffff !important;
    --afc-ink: #1d1d1f !important;
    --afc-ink2: #6e6e73 !important;
    --afc-ink3: #a1a1a6 !important;
    --afc-line: #ececee !important;
    --afc-green: #1e7e34 !important;
    --afc-green-bg: #e9f9ee !important;
    --afc-red: #c0392b !important;
    --afc-red-bg: #fdecea !important;
    --afc-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    --afc-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    --afc-sh: 0 2px 10px rgba(20,16,22,.05), 0 10px 30px rgba(20,16,22,.06) !important;

    font-family: var(--afc-font) !important;
    max-width: 720px !important;
    margin: 0 auto !important;
    padding: 12px 12px calc(24px + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    overflow-x: hidden !important;
}

#afc-account * { box-sizing: border-box !important; }
#afc-account svg { display: block !important; }

#afc-account.afc-guest {
    background: var(--afc-white) !important;
    border-radius: 20px !important;
    padding: 36px 20px !important;
    text-align: center !important;
    box-shadow: var(--afc-sh) !important;
    border: 1px solid var(--afc-line) !important;
}
#afc-account.afc-guest p { color: var(--afc-ink2) !important; margin: 0 0 18px !important; font-size: 14.5px !important; }
#afc-account.afc-guest .afc-btn { width: 100% !important; }

.afc-balance-card {
    background: var(--afc-white) !important;
    border-radius: 22px !important;
    padding: 28px 20px !important;
    text-align: center !important;
    box-shadow: var(--afc-sh) !important;
    border: 1px solid var(--afc-line) !important;
    margin-bottom: 14px !important;
}
.afc-balance-label {
    font-size: 11px !important; font-weight: 600 !important; letter-spacing: .09em !important;
    text-transform: uppercase !important; color: var(--afc-ink2) !important; margin-bottom: 8px !important;
}
.afc-balance-value {
    font-family: var(--afc-mono) !important; font-size: 40px !important; font-weight: 700 !important;
    color: var(--afc-ink) !important; margin-bottom: 20px !important; letter-spacing: -1px !important;
    line-height: 1.1 !important; word-break: break-word !important;
}
.afc-balance-unit { font-size: 15px !important; color: var(--afc-ink2) !important; font-weight: 500 !important; font-family: var(--afc-font) !important; }

.afc-cta-row { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 10px !important; }
.afc-soon-tag {
    display: inline-block !important; font-size: 11px !important; font-weight: 600 !important;
    color: var(--afc-ink2) !important; background: var(--afc-bg) !important; padding: 5px 12px !important;
    border-radius: 20px !important; letter-spacing: .02em !important;
}

/* Every tappable control is full-width and >=48px tall on phones — real
   thumb targets, not desktop-sized buttons shrunk to fit. */
.afc-btn {
    display: flex !important; align-items: center !important; justify-content: center !important;
    gap: 8px !important; width: 100% !important; min-height: 48px !important;
    padding: 13px 20px !important; border: none !important; border-radius: 14px !important;
    font-size: 15px !important; font-weight: 600 !important; font-family: var(--afc-font) !important;
    cursor: pointer !important; text-decoration: none !important; transition: background .2s, border-color .2s !important;
    -webkit-tap-highlight-color: transparent !important;
}
.afc-btn svg { width: 17px !important; height: 17px !important; flex-shrink: 0 !important; }
.afc-btn-primary { background: var(--afc-accent) !important; color: #fff !important; }
.afc-btn-primary:hover:not(:disabled) { background: var(--afc-accent-hover) !important; color: #fff !important; }

/* "Coming soon" actions read as an intentional, disabled state (lock icon,
   neutral outline) rather than a broken red button that happens to be dim. */
.afc-btn-ghost {
    background: var(--afc-white) !important; color: var(--afc-ink2) !important;
    border: 1.5px solid var(--afc-line) !important;
}
.afc-btn-ghost svg { color: var(--afc-ink3) !important; }

.afc-btn-sm { width: auto !important; min-height: 40px !important; padding: 9px 18px !important; font-size: 13px !important; }
.afc-btn:disabled { cursor: not-allowed !important; opacity: 1 !important; }

.afc-section {
    background: var(--afc-white) !important;
    border-radius: 20px !important;
    padding: 18px 16px !important;
    margin-bottom: 14px !important;
    box-shadow: var(--afc-sh) !important;
    border: 1px solid var(--afc-line) !important;
}
.afc-section-title {
    font-size: 14.5px !important; font-weight: 700 !important; color: var(--afc-ink) !important;
    margin: 0 0 14px !important;
}
.afc-empty-text { color: var(--afc-ink2) !important; font-size: 13.5px !important; margin: 0 !important; }

.afc-featured-list { display: flex !important; flex-direction: column !important; gap: 10px !important; }
.afc-featured-row {
    display: flex !important; flex-direction: column !important; align-items: stretch !important;
    gap: 12px !important; padding: 14px !important; background: var(--afc-bg) !important;
    border-radius: 16px !important;
}
.afc-featured-main { display: flex !important; align-items: flex-start !important; gap: 10px !important; min-width: 0 !important; }
.afc-featured-star {
    flex: 0 0 auto !important; width: 26px !important; height: 26px !important; border-radius: 50% !important;
    background: var(--afc-white) !important; display: flex !important; align-items: center !important;
    justify-content: center !important; margin-top: 1px !important;
}
.afc-featured-star svg { width: 13px !important; height: 13px !important; color: var(--afc-gold) !important; }
.afc-featured-title {
    color: var(--afc-ink) !important; font-weight: 600 !important; font-size: 14px !important;
    text-decoration: none !important; line-height: 1.35 !important; display: block !important;
    overflow-wrap: break-word !important;
}
.afc-featured-title:hover { color: var(--afc-accent) !important; }
.afc-featured-tags { display: flex !important; flex-wrap: wrap !important; gap: 6px !important; margin-top: 6px !important; }
.afc-tag {
    display: inline-block !important; font-family: var(--afc-mono) !important; font-size: 10.5px !important;
    color: var(--afc-ink2) !important; background: var(--afc-white) !important; padding: 4px 10px !important;
    border-radius: 20px !important;
}
.afc-featured-row .afc-btn-sm { width: 100% !important; }

/* Transaction history: a tappable-feeling row list, not a table — tables
   force either tiny text or a horizontal scrollbar on a phone, neither of
   which reads well for a money history. */
.afc-history-list { display: flex !important; flex-direction: column !important; }
.afc-history-row {
    display: flex !important; align-items: flex-start !important; gap: 12px !important;
    padding: 13px 0 !important; border-bottom: 1px solid var(--afc-line) !important;
}
.afc-history-row:last-child { border-bottom: none !important; }
.afc-history-icon {
    flex: 0 0 auto !important; width: 30px !important; height: 30px !important; border-radius: 50% !important;
    display: flex !important; align-items: center !important; justify-content: center !important; margin-top: 1px !important;
}
.afc-history-icon svg { width: 14px !important; height: 14px !important; }
.afc-history-icon-pos { background: var(--afc-green-bg) !important; color: var(--afc-green) !important; }
.afc-history-icon-neg { background: var(--afc-red-bg) !important; color: var(--afc-red) !important; }
.afc-history-main { min-width: 0 !important; flex: 1 1 auto !important; }
.afc-history-desc {
    font-size: 13.5px !important; font-weight: 600 !important; color: var(--afc-ink) !important;
    line-height: 1.35 !important; overflow-wrap: break-word !important;
}
.afc-history-date { font-size: 11.5px !important; color: var(--afc-ink2) !important; margin-top: 2px !important; }
.afc-history-nums { text-align: right !important; flex: 0 0 auto !important; }
.afc-amount { font-family: var(--afc-mono) !important; font-weight: 700 !important; font-size: 14px !important; white-space: nowrap !important; }
.afc-amount-pos { color: var(--afc-green) !important; }
.afc-amount-neg { color: var(--afc-red) !important; }
.afc-history-balance { font-family: var(--afc-mono) !important; font-size: 10.5px !important; color: var(--afc-ink2) !important; margin-top: 2px !important; white-space: nowrap !important; }

/* ─── DESKTOP: more breathing room, buttons no longer need to be full-width ─── */
@media (min-width: 601px) {
    #afc-account { padding: 20px !important; }
    .afc-balance-card { padding: 36px 32px !important; }
    .afc-balance-value { font-size: 46px !important; margin-bottom: 22px !important; }
    .afc-balance-unit { font-size: 18px !important; }
    .afc-cta-row { flex-direction: row !important; justify-content: center !important; }
    .afc-btn { width: auto !important; min-width: 200px !important; }
    #afc-account.afc-guest .afc-btn { width: auto !important; margin: 0 auto !important; }
    .afc-section { padding: 26px !important; }
    .afc-section-title { font-size: 15px !important; }
    .afc-featured-row { flex-direction: row !important; align-items: center !important; justify-content: space-between !important; }
    .afc-featured-row .afc-btn-sm { width: auto !important; }
}
