/* Details page — light PipraTopUp layout */
.ff-detail-page {
    background: var(--topup-bg, #f3f4f6);
    color: var(--topup-text, #111827);
}

.ff-detail-page .ff-stat-card {
    background: #fff;
    border: 1px solid var(--topup-border, #e5e7eb);
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ff-detail-page .ff-stat-card:hover {
    border-color: #bbf7d0;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.1);
}

.ff-detail-page .ff-price-tag {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: var(--topup-price, #ea580c);
    border-radius: 12px;
}

.ff-detail-media {
    border-radius: 12px;
    border: 1px solid var(--topup-border, #e5e7eb);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    background: #fff;
    line-height: 0;
}

.ff-detail-media__img,
.ff-detail-media__video {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
}

.ff-detail-media__badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #15803d;
}

.ff-detail-thumb {
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.ff-detail-thumb.is-active {
    border-color: var(--topup-green, #16a34a) !important;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.ff-detail-buy {
    background: var(--topup-green, #16a34a);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.25);
    transition: background 0.2s ease, transform 0.15s ease;
    min-height: 48px;
}

.ff-detail-buy:hover {
    background: var(--topup-green-hover, #15803d);
    transform: translateY(-1px);
}

.ff-detail-sticky-buy {
    display: none;
}

@media (max-width: 767px) {
    .ff-detail-sticky-buy {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(3.5rem + env(safe-area-inset-bottom, 0));
        z-index: 40;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        background: #fff;
        border-top: 1px solid var(--topup-border, #e5e7eb);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    }

    .ff-detail-sticky-buy .sticky-price {
        font-size: 1.25rem;
        font-weight: 800;
        color: var(--topup-price, #ea580c);
    }

    .ff-detail-sticky-buy .ff-detail-buy {
        flex: 1;
        max-width: 200px;
    }
}

.ff-account-info {
    background: #fff;
    border: 1px solid var(--topup-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ff-account-info__head {
    padding: 1rem 1rem 0;
    border-bottom: 1px solid var(--topup-border, #e5e7eb);
    background: #f9fafb;
}

.ff-account-info__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--topup-text, #111827);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.ff-account-info__title i {
    color: var(--topup-green, #16a34a);
}

.ff-account-info__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.ff-account-info__tab {
    padding: 0.65rem 0.75rem;
    border-radius: 8px 8px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    background: #f3f4f6;
    color: var(--topup-muted, #4b5563);
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    line-height: 1.3;
    text-align: center;
}

.ff-account-info__tab:hover {
    color: var(--topup-text, #111827);
    background: #e5e7eb;
}

.ff-account-info__tab.is-active {
    color: #15803d;
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.ff-account-info__tab.is-active--live {
    color: #0369a1;
    background: #eff6ff;
    border-color: #bae6fd;
}

.ff-account-info__body {
    padding: 1rem;
}

.ff-account-info__ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    color: #6d28d9;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.ff-account-info__admin {
    color: var(--topup-text-secondary, #374151);
    line-height: 1.7;
    font-size: 0.9375rem;
}

.ff-live-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ff-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 600;
}

.ff-live-badge i {
    font-size: 0.5rem;
    animation: ff-live-pulse 1.4s ease-in-out infinite;
}

@keyframes ff-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.ff-live-refresh {
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #bae6fd;
    background: #eff6ff;
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.ff-live-refresh:hover:not(:disabled) {
    background: #dbeafe;
}

.ff-live-refresh:disabled {
    opacity: 0.5;
    cursor: wait;
}

.ff-live-hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}

@media (min-width: 480px) {
    .ff-live-hero {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .ff-live-hero {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.ff-live-scroll {
    max-height: min(70vh, 720px);
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-gutter: stable;
}

.ff-live-stat {
    background: #f9fafb;
    border: 1px solid var(--topup-border, #e5e7eb);
    border-radius: 10px;
    padding: 0.75rem 0.875rem;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.ff-live-stat::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--topup-green, #16a34a);
}

.ff-live-stat--wide {
    grid-column: 1 / -1;
}

.ff-live-stat__label {
    font-size: 0.75rem;
    color: var(--topup-muted, #4b5563);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.ff-live-stat__value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--topup-text, #111827);
    word-break: break-word;
}

.ff-live-stat__value--accent { color: #15803d; }
.ff-live-stat__value--sky { color: #0369a1; }
.ff-live-stat__value--gold { color: #b45309; }
.ff-live-stat__value--rose { color: #be123c; }

.ff-live-section__title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--topup-border, #e5e7eb);
}

.ff-live-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 480px) {
    .ff-live-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .ff-live-detail-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.ff-live-section {
    margin-bottom: 1rem;
}

.ff-live-detail-card {
    background: #f9fafb;
    border: 1px solid var(--topup-border, #e5e7eb);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
}

.ff-live-detail-card__label {
    display: block;
    font-size: 0.75rem;
    color: var(--topup-muted, #4b5563);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.ff-live-detail-card__value {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--topup-text, #111827);
    word-break: break-word;
}

.ff-live-empty,
.ff-live-loading,
.ff-live-error {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--topup-muted, #4b5563);
    font-size: 0.9375rem;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px dashed var(--topup-border, #e5e7eb);
}

.ff-live-error {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.ff-live-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--topup-border, #e5e7eb);
    text-align: center;
    font-size: 0.75rem;
    color: var(--topup-muted, #4b5563);
}

.ff-detail-action {
    background: #fff;
    border: 1px solid var(--topup-border, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ff-detail-title {
    color: var(--topup-text, #111827);
    font-weight: 800;
    line-height: 1.35;
    word-break: break-word;
}

.ff-stat-label {
    color: var(--topup-muted, #4b5563);
}

.ff-detail-page .ff-price-tag {
    color: #c2410c !important;
    font-weight: 800;
}

.ff-detail-page .ff-detail-alert {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.ff-detail-page .ff-detail-alert--success {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.ff-detail-page .ff-detail-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.ff-detail-page .ff-detail-alert--warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.ff-detail-page .ff-detail-alert--warning strong {
    color: #78350f;
}

.ff-detail-page .ff-detail-alert a {
    color: #15803d;
    font-weight: 600;
    text-decoration: underline;
}

.ff-detail-page .topup-breadcrumb span {
    color: var(--topup-text-secondary, #374151);
    font-weight: 600;
}

.ff-detail-page .text-gray-400,
.ff-detail-page .text-gray-500 {
    color: var(--topup-muted, #4b5563) !important;
}

/* Safety net: leftover dark-theme utilities on the light product panel only */
.ff-detail-page .w-full.lg\:w-1\/2 .text-slate-50,
.ff-detail-page .w-full.lg\:w-1\/2 .text-slate-100,
.ff-detail-page .w-full.lg\:w-1\/2 .text-slate-200,
.ff-detail-page .topup-breadcrumb .text-white {
    color: var(--topup-text, #111827) !important;
}

.ff-detail-page .w-full.lg\:w-1\/2 .text-sky-300 { color: #0369a1 !important; }
.ff-detail-page .w-full.lg\:w-1\/2 .text-emerald-300 { color: #15803d !important; }
.ff-detail-page .w-full.lg\:w-1\/2 .text-amber-300 { color: #b45309 !important; }

.ff-detail-page .prose-invert,
.ff-detail-page .prose-invert :where(p, li, strong, em) {
    color: var(--topup-text-secondary, #374151) !important;
}

.ff-detail-page .prose-invert :where(h1, h2, h3, h4) {
    color: var(--topup-text, #111827) !important;
}

/* Step 3 — Gmail handover (light professional panel inside checkout modal) */
.ff-gmail-setup {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1rem;
    color: #111827;
    text-align: left;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .ff-gmail-setup {
        padding: 1.5rem 1.75rem;
    }
}

.ff-gmail-setup__hero {
    text-align: center;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.ff-gmail-setup__badge {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 0.75rem;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.ff-gmail-setup__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.ff-gmail-setup__subtitle {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #6b7280;
    max-width: 34rem;
    margin-inline: auto;
}

.ff-gmail-setup__section {
    margin-bottom: 1.25rem;
}

.ff-gmail-setup__section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.ff-gmail-setup__step {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ff-gmail-setup__section-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
}

.ff-gmail-setup__section-desc {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.45;
}

.ff-gmail-setup__options {
    display: grid;
    gap: 0.65rem;
}

.ff-gmail-setup__option {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    text-align: left;
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    background: #fafafa;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
}

.ff-gmail-setup__option:hover {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.ff-gmail-setup__option.is-selected {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.ff-gmail-setup__option-radio {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    border-radius: 999px;
    border: 2px solid #d1d5db;
    flex-shrink: 0;
    position: relative;
}

.ff-gmail-setup__option.is-selected .ff-gmail-setup__option-radio {
    border-color: #16a34a;
}

.ff-gmail-setup__option.is-selected .ff-gmail-setup__option-radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 999px;
    background: #16a34a;
}

.ff-gmail-setup__option-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ff-gmail-setup__option-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    word-break: break-word;
}

.ff-gmail-setup__option-text {
    font-size: 0.78rem;
    line-height: 1.45;
    color: #6b7280;
    word-break: break-word;
}

.ff-gmail-setup__option-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: #9ca3af;
    font-size: 1rem;
}

.ff-gmail-setup__option.is-selected .ff-gmail-setup__option-icon {
    color: #16a34a;
}

.ff-gmail-setup__alert {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.8rem;
    font-weight: 600;
}

.ff-gmail-setup__hint {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 0.8rem;
}

.ff-gmail-signin {
    position: relative;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    background: #fafafa;
    min-height: 3.75rem;
    padding: 0.75rem;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.ff-gmail-signin.is-locked {
    background: #f3f4f6;
}

.ff-gmail-signin__lock {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem;
    text-align: center;
    background: rgba(249, 250, 251, 0.92);
    border-radius: 11px;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.ff-gmail-signin__lock i {
    color: #9ca3af;
    font-size: 1rem;
}

.ff-gmail-signin__btn-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.ff-gmail-signin__gsi {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.ff-gmail-signin__gsi > div,
.ff-gmail-signin__gsi iframe {
    max-width: 100% !important;
}

.ff-gmail-setup__notice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.45;
    padding: 0.75rem;
    border-radius: 10px;
}

.ff-gmail-setup__notice--warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.ff-gmail-connected {
    display: none;
    align-items: center;
    gap: 0.85rem;
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
}

.ff-gmail-connected.flex {
    display: flex;
}

.ff-gmail-connected__avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #86efac;
    flex-shrink: 0;
}

.ff-gmail-connected__info {
    flex: 1;
    min-width: 0;
}

.ff-gmail-connected__name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ff-gmail-connected__email {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ff-gmail-connected__status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #15803d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ff-gmail-connected__brand {
    font-size: 1.5rem;
    color: #ea4335;
    opacity: 0.35;
    flex-shrink: 0;
}

.ff-gmail-success {
    display: none;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.ff-gmail-success:not(.hidden) {
    display: flex;
}

.ff-gmail-success i {
    margin-top: 0.15rem;
    font-size: 1rem;
}

.ff-gmail-success strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.15rem;
}

.ff-gmail-success span {
    font-size: 0.78rem;
    line-height: 1.45;
    color: #1d4ed8;
}

.ff-gmail-setup__launch {
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
    color: #9ca3af;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: not-allowed;
    transition: all 0.2s ease;
}

.ff-gmail-setup__launch.is-ready {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25);
}

.ff-gmail-setup__launch.is-ready:hover {
    background: #15803d;
}

.ff-gmail-setup__footer-note {
    margin: 1rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid #f3f4f6;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #9ca3af;
}

.ff-gmail-setup__footer-note i {
    color: #16a34a;
    margin-right: 0.25rem;
}

/* Checkout modal — mobile-first */
.ff-checkout-overlay {
    -webkit-overflow-scrolling: touch;
}

.ff-checkout-modal {
    max-height: 100dvh;
}

.ff-checkout-modal__body {
    overscroll-behavior: contain;
}

@media (max-width: 639px) {
    .ff-checkout-modal {
        min-height: 100dvh;
        border-radius: 0;
    }

    .ff-gmail-setup {
        border-radius: 14px;
        padding: 0.85rem;
    }

    .ff-gmail-setup__hero {
        padding-bottom: 0.85rem;
        margin-bottom: 0.85rem;
    }

    .ff-gmail-setup__title {
        font-size: 1.1rem;
    }

    .ff-gmail-setup__subtitle {
        font-size: 0.82rem;
    }

    .ff-gmail-setup__section-head {
        gap: 0.6rem;
    }

    .ff-gmail-setup__section-title {
        font-size: 0.88rem;
    }

    .ff-gmail-setup__section-desc {
        font-size: 0.76rem;
    }

    .ff-gmail-setup__option {
        padding: 0.75rem;
        gap: 0.55rem;
    }

    .ff-gmail-setup__option-icon {
        display: none;
    }

    .ff-gmail-signin__lock {
        font-size: 0.78rem;
        padding: 0.65rem;
    }

    .ff-gmail-setup__launch {
        font-size: 0.88rem;
        padding: 0.85rem 0.75rem;
    }

    .ff-gmail-connected {
        flex-wrap: wrap;
    }

    .ff-gmail-connected__brand {
        display: none;
    }

    .ff-gmail-success {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
