/**
 * /my-account/ page — profile, credits with progress bars, activity, danger zone.
 */

.aiv2-acct-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: 80px;
    font-family: var(--aiv2-font, 'Inter', sans-serif);
    color: var(--aiv2-text, #2C363D);
}
.aiv2-acct-pagetitle {
    margin: 0 0 18px;
    font-size: 24px;
    font-weight: 700;
}

/* Read-only field display */
.aiv2-readonly {
    padding: 10px 12px;
    background: #F3F4F6;
    border: 1px solid var(--aiv2-border, #E5E7EB);
    border-radius: var(--aiv2-radius-sm, 6px);
    color: var(--aiv2-text, #2C363D);
    font-size: 14px;
}

/* Saved flash */
.aiv2-name-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.aiv2-name-row .aiv2-input { flex: 1; }
.aiv2-saved-flash {
    font-size: 13px;
    color: var(--aiv2-success, #16A34A);
    transition: opacity 0.2s;
    flex: 0 0 auto;
}

/* Action button row */
.aiv2-acct-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.aiv2-acct-actions .aiv2-btn { padding: 9px 18px; font-size: 14px; text-decoration: none; }

/* Progress bars */
.aiv2-pbar-wrap {
    margin-bottom: 16px;
}
.aiv2-pbar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 14px;
}
.aiv2-pbar-label > span:first-child { font-weight: 500; color: var(--aiv2-text, #2C363D); }
.aiv2-pbar-stat { color: var(--aiv2-text-muted, #6B7280); font-size: 13px; }
.aiv2-pbar-track {
    width: 100%;
    height: 10px;
    background: #E5E7EB;
    border-radius: 100px;
    overflow: hidden;
}
.aiv2-pbar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.4s ease, background 0.3s ease;
}
.aiv2-pbar-tone-ok    { background: var(--aiv2-brown, #9A6E56); }
.aiv2-pbar-tone-low   { background: var(--aiv2-warn, #D97706); }
.aiv2-pbar-tone-empty { background: var(--aiv2-danger, #DC2626); }

.aiv2-topup-btn {
    margin-top: 12px;
    text-decoration: none;
    align-self: flex-start;
}

/* Activity table */
.aiv2-activity-table {
    display: grid;
    border: 1px solid var(--aiv2-border, #E5E7EB);
    border-radius: var(--aiv2-radius-md, 10px);
    overflow: hidden;
}
.aiv2-activity-row {
    display: grid;
    grid-template-columns: 160px 1fr 60px 60px 110px;
    gap: 14px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--aiv2-border, #F3F4F6);
    font-size: 13px;
    color: var(--aiv2-text, #2C363D);
}
.aiv2-activity-row:last-child { border-bottom: 0; }
.aiv2-activity-head {
    background: #FAFAFA;
    font-weight: 600;
    color: var(--aiv2-text-muted, #6B7280);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.aiv2-activity-num { text-align: right; font-variant-numeric: tabular-nums; }
.aiv2-activity-ref {
    color: var(--aiv2-text-muted, #6B7280);
    font-family: monospace;
    font-size: 12px;
}
@media (max-width: 640px) {
    .aiv2-activity-row {
        grid-template-columns: 1fr 50px 50px;
        font-size: 12px;
    }
    .aiv2-activity-row > div:nth-child(1) { grid-column: 1 / -1; color: var(--aiv2-text-muted, #6B7280); font-size: 11px; }
    .aiv2-activity-row > div:nth-child(2) { grid-column: 1 / -1; }
    .aiv2-activity-row > div:nth-child(3) { grid-column: 1; }
    .aiv2-activity-row > div:nth-child(4) { grid-column: 2; }
    .aiv2-activity-row > div:nth-child(5) { grid-column: 3; }
    .aiv2-activity-head { display: none; }
}

.aiv2-empty {
    padding: 18px;
    text-align: center;
    color: var(--aiv2-text-muted, #6B7280);
    font-size: 14px;
}

/* Danger zone */
.aiv2-card-danger {
    border-color: var(--aiv2-danger, #FCA5A5);
}
.aiv2-card-danger .aiv2-card-title { color: var(--aiv2-danger, #B91C1C); }
.aiv2-btn-danger {
    background: var(--aiv2-danger, #DC2626);
    color: #fff;
}
.aiv2-btn-danger:hover { background: #B91C1C; }

/* Delete-confirm modal */
.aiv2-delete-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: aiv2DelFadeIn 0.15s ease-out;
}
@keyframes aiv2DelFadeIn { from { opacity: 0 } to { opacity: 1 } }
.aiv2-delete-card {
    background: var(--aiv2-card, #fff);
    border-radius: var(--aiv2-radius-lg, 16px);
    padding: 28px 26px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--aiv2-shadow-card, 0 14px 40px rgba(15,23,42,0.18));
    font-family: var(--aiv2-font, 'Inter', sans-serif);
}
.aiv2-delete-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--aiv2-danger, #B91C1C);
}
.aiv2-delete-warning {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--aiv2-text, #2C363D);
    line-height: 1.5;
}
.aiv2-delete-error {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--aiv2-danger-bg, #FEE2E2);
    border: 1px solid var(--aiv2-danger, #FCA5A5);
    border-radius: var(--aiv2-radius-sm, 6px);
    color: var(--aiv2-danger, #991B1B);
    font-size: 13px;
}
.aiv2-delete-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    justify-content: flex-end;
}
