/* ============================================================
   BattleCredits — AUTH / PAYMENT-FLOW PAGES (Light Theme)
   Covers: login, register, charge, processing, success,
           failed, status, error. Centered card, mobile-first.
   Uses shared design tokens (do not redefine palette).
   ============================================================ */

/* ---- Centered stage inside <main> ---- */
.bc-auth-stage {
    min-height: calc(100vh - var(--bc-header-h) - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 48px;
}
.bc-auth-wrap {
    width: 100%;
    max-width: 440px;
    animation: bc-auth-in .45s var(--bc-ease) both;
}
.bc-auth-wrap.wide { max-width: 560px; }
@keyframes bc-auth-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Auth card ---- */
.bc-auth-card {
    background: var(--bc-card);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-r-lg);
    box-shadow: var(--bc-shadow-lg);
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
}
.bc-auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--bc-gradient-cyan);
}

/* ---- Brand head ---- */
.bc-auth-brand { text-align: center; margin-bottom: 22px; }
.bc-auth-brand .bc-auth-logo {
    width: 64px; height: 64px;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: var(--bc-gradient-btn);
    box-shadow: 0 8px 22px rgba(23,105,232,.32);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 26px;
}
.bc-auth-brand img.bc-auth-logo-img {
    max-height: 64px; max-width: 180px;
    margin: 0 auto 12px; object-fit: contain;
}
.bc-auth-brand h1 {
    font-size: 1.35rem; margin: 0 0 4px;
}
.bc-auth-brand p { color: var(--bc-muted); font-size: .88rem; margin: 0; }

/* ---- Field-level error ---- */
.bc-field { margin-bottom: 16px; position: relative; }
.bc-field label { font-size: .82rem; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.bc-field label i { color: var(--bc-muted-2); font-size: .8rem; }
.bc-field .bc-field-error {
    color: var(--bc-error); font-size: .78rem; margin-top: 5px;
    display: flex; align-items: center; gap: 5px;
    animation: bc-auth-in .25s var(--bc-ease) both;
}
.bc-field.has-error .form-control,
.bc-field.has-error input {
    border-color: var(--bc-error) !important;
    box-shadow: 0 0 0 3px rgba(220,53,69,.12) !important;
}

/* ---- Password toggle ---- */
.bc-pw-wrap { position: relative; }
.bc-pw-wrap .form-control,
.bc-pw-wrap input[type="password"],
.bc-pw-wrap input[type="text"] { padding-right: 46px; }
.bc-pw-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: none; background: transparent;
    color: var(--bc-muted); cursor: pointer; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: color .2s, background .2s;
}
.bc-pw-toggle:hover { color: var(--bc-primary); background: var(--bc-info-soft); }

/* ---- Submit button with loading state ---- */
.bc-btn-submit { position: relative; overflow: hidden; }
.bc-btn-submit .bc-btn-label { display: inline-flex; align-items: center; gap: 8px; transition: opacity .2s; }
.bc-btn-submit.is-loading { pointer-events: none; }
.bc-btn-submit.is-loading .bc-btn-label { opacity: .4; }
.bc-btn-submit .bc-btn-spinner {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
    border-radius: 50%; animation: bc-spin .7s linear infinite;
    display: none;
}
.bc-btn-submit.is-loading .bc-btn-spinner { display: block; }

/* ---- Divider + footer links ---- */
.bc-auth-divider {
    display: flex; align-items: center; gap: 12px;
    color: var(--bc-muted-2); font-size: .78rem; margin: 20px 0 14px;
}
.bc-auth-divider::before, .bc-auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--bc-border);
}
.bc-auth-foot { text-align: center; margin-top: 16px; font-size: .86rem; color: var(--bc-muted); }
.bc-auth-foot a { font-weight: 600; }

/* ---- Amount display box ---- */
.bc-amount-box {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bc-info-soft); border: 1px solid #B9D0F5;
    border-radius: var(--bc-r-sm); padding: 14px 18px; margin-bottom: 18px;
}
.bc-amount-box .label { font-size: .78rem; color: var(--bc-primary-deep); font-weight:600; text-transform: uppercase; letter-spacing:.04em; }
.bc-amount-box .value { font-size: 1.4rem; font-weight: 800; color: var(--bc-primary-deep); }

/* ---- Status hero icon (success/failed/error/processing) ---- */
.bc-status-hero { text-align: center; margin-bottom: 20px; }
.bc-status-icon {
    width: 92px; height: 92px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; font-size: 40px;
}
.bc-status-icon.success { background: var(--bc-success-soft); color: var(--bc-success); }
.bc-status-icon.failed  { background: var(--bc-error-soft); color: var(--bc-error); }
.bc-status-icon.error   { background: var(--bc-error-soft); color: var(--bc-error); }
.bc-status-icon.info    { background: var(--bc-info-soft); color: var(--bc-primary); }
.bc-status-icon.processing {
    background: var(--bc-info-soft); color: var(--bc-primary);
    border: 4px solid var(--bc-border); border-top-color: var(--bc-primary);
    animation: bc-spin 1s linear infinite;
    font-size: 0;
}
.bc-status-hero h2 { margin: 0 0 6px; }
.bc-status-hero.success h2 { color: var(--bc-success); }
.bc-status-hero.failed h2, .bc-status-hero.error h2 { color: var(--bc-error); }
.bc-status-hero p { color: var(--bc-muted); margin: 0; }

/* ---- Detail grid (status page) ---- */
.bc-detail-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    background: var(--bc-card-2); border: 1px solid var(--bc-border);
    border-radius: var(--bc-r-sm); padding: 16px;
}
.bc-detail-grid .d-item small { color: var(--bc-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.bc-detail-grid .d-item strong { display: block; color: var(--bc-navy); font-size: .92rem; margin-top: 2px; word-break: break-all; }

/* ---- Quick preset amount chips ---- */
.bc-amount-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bc-amount-chip {
    border: 1.5px solid var(--bc-border); background: #fff; color: var(--bc-text-2);
    border-radius: var(--bc-r-pill); padding: 7px 14px; font-size: .82rem; font-weight: 600;
    cursor: pointer; transition: all .2s var(--bc-ease);
}
.bc-amount-chip:hover { border-color: var(--bc-primary); color: var(--bc-primary); background: var(--bc-info-soft); }
.bc-amount-chip.active { background: var(--bc-gradient-btn); color: #fff; border-color: transparent; }

/* ---- Payment method selector cards ---- */
.bc-method-list { display: grid; gap: 10px; margin-bottom: 16px; }
.bc-method-card {
    display: flex; align-items: center; gap: 12px;
    border: 1.5px solid var(--bc-border); border-radius: var(--bc-r-sm);
    padding: 12px 14px; cursor: pointer; background: #fff;
    transition: all .2s var(--bc-ease);
}
.bc-method-card:hover { border-color: var(--bc-primary); }
.bc-method-card input { display: none; }
.bc-method-card .m-icon {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    background: var(--bc-info-soft); color: var(--bc-primary);
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.bc-method-card .m-body { flex: 1; min-width: 0; }
.bc-method-card .m-body strong { display: block; font-size: .9rem; color: var(--bc-navy); }
.bc-method-card .m-body small { color: var(--bc-muted); font-size: .76rem; }
.bc-method-card .m-check {
    width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--bc-border-strong);
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; transition: all .2s;
}
.bc-method-card.selected { border-color: var(--bc-primary); background: var(--bc-info-soft); }
.bc-method-card.selected .m-check { background: var(--bc-primary); border-color: var(--bc-primary); }
.bc-method-card.selected .m-check::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; }

/* ---- Info / instruction callout ---- */
.bc-callout {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--bc-info-soft); border: 1px solid #B9D0F5;
    border-radius: var(--bc-r-sm); padding: 12px 14px;
    font-size: .84rem; color: var(--bc-primary-deep); margin-top: 14px;
}
.bc-callout i { margin-top: 2px; flex-shrink: 0; }
.bc-callout ul { margin: 4px 0 0 16px; padding: 0; }
.bc-callout li { margin-bottom: 3px; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .bc-auth-stage { padding: 20px 12px 36px; }
    .bc-auth-card { padding: 24px 18px; }
    .bc-auth-brand h1 { font-size: 1.15rem; }
    .bc-detail-grid { grid-template-columns: 1fr; }
    .bc-status-icon { width: 76px; height: 76px; font-size: 32px; }
}
