/* ============================================================
   BuddyBoss – Cartão Online do Associado  |  cartao.css
   ============================================================ */

/* ─── Reset / Base ─────────────────────────────────────────── */
.bca-wrap *,
.bca-wrap *::before,
.bca-wrap *::after { box-sizing: border-box; }

.bca-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 680px;
    margin: 24px auto;
}

/* ─── Card ─────────────────────────────────────────────────── */
.bca-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.10);
    background: linear-gradient(135deg, #1e64c8 0%, #1546a0 100%);
    color: #fff;
    position: relative;
    transition: transform .2s ease, box-shadow .2s ease;
}
.bca-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,.22);
}
.bca-card--inativo {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

/* Decoração geométrica de fundo */
.bca-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    pointer-events: none;
}
.bca-card::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    pointer-events: none;
}

/* ─── Header ─────────────────────────────────────────────────── */
.bca-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.bca-card__logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255,255,255,.9);
    padding: 3px;
}
.bca-card__assoc-name {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    flex: 1;
    text-transform: uppercase;
    opacity: .9;
}
.bca-card__title {
    font-size: 11px;
    opacity: .7;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ─── Body ───────────────────────────────────────────────────── */
.bca-card__body {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 20px 16px;
}

/* Left: avatar + badge */
.bca-card__left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.bca-card__avatar-wrap {
    position: relative;
    width: 80px;
    height: 80px;
}
.bca-card__avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.8);
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.bca-card__status-dot {
    position: absolute;
    bottom: 4px; right: 4px;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
}
.bca-card__status-dot--ativo    { background: #00c864; }
.bca-card__status-dot--inativo  { background: #dc3545; }

/* Center: info */
.bca-card__center { flex: 1; }

.bca-card__nome {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.bca-card__field {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}
.bca-card__label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .07em;
    opacity: .65;
    font-weight: 600;
}
.bca-card__value {
    font-size: 14px;
    font-weight: 500;
    opacity: .95;
}
.bca-card__field--validade.bca-expired .bca-card__value {
    color: #ff6b6b;
}

/* Right: QR */
.bca-card__right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.bca-card__qr-wrap { text-align: center; }
.bca-card__qr {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    display: block;
}
.bca-card__qr-label {
    font-size: 9px;
    opacity: .65;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.bca-card__no-qr {
    font-size: 11px;
    opacity: .6;
    text-align: center;
    max-width: 80px;
}

/* ─── Footer ────────────────────────────────────────────────── */
.bca-card__footer {
    padding: 10px 20px;
    background: rgba(0,0,0,.15);
    text-align: center;
    font-size: 10px;
    opacity: .65;
    letter-spacing: .04em;
}

/* ─── Badges ─────────────────────────────────────────────────── */
.bca-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.bca-badge-ativo    { background: #00c864; color: #fff; }
.bca-badge-inativo  { background: #dc3545; color: #fff; }

/* ─── Actions ────────────────────────────────────────────────── */
.bca-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    justify-content: center;
}

.bca-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: opacity .15s ease, transform .15s ease, box-shadow .15s ease;
    border: none;
    line-height: 1;
}
.bca-btn:hover {
    opacity: .88;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    text-decoration: none;
}
.bca-btn--pdf    { background: #e74c3c; color: #fff; }
.bca-btn--apple  { background: #000;   color: #fff; }
.bca-btn--google { background: #fff;   color: #333; border: 1px solid #ddd; }

/* ─── Validation page ────────────────────────────────────────── */
.bca-validation-wrap {
    max-width: 420px;
    margin: 40px auto;
    text-align: center;
    padding: 32px 28px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.bca-active   { border-top: 6px solid #00c864; }
.bca-inactive { border-top: 6px solid #dc3545; }
.bca-invalid  { border-top: 6px solid #ffc107; }
.bca-no-token { border-top: 6px solid #6c757d; }

.bca-val-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .05em;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.bca-val-status-badge.bca-active   { background: #d4f5e7; color: #00864a; }
.bca-val-status-badge.bca-inactive { background: #fde8e8; color: #b91c1c; }

.bca-val-icon { font-size: 22px; }

.bca-val-logo {
    max-height: 60px;
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.bca-val-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
    margin-bottom: 12px;
}
.bca-val-nome  { font-size: 20px; font-weight: 700; margin: 0 0 4px; color: #111; }
.bca-val-assoc { font-size: 13px; color: #6b7280; margin: 0 0 20px; }

.bca-val-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
    margin-bottom: 16px;
}
.bca-val-table th {
    width: 42%;
    color: #6b7280;
    font-weight: 600;
    padding: 7px 0;
    border-bottom: 1px solid #f3f4f6;
}
.bca-val-table td {
    font-weight: 500;
    color: #111;
    padding: 7px 0;
    border-bottom: 1px solid #f3f4f6;
}
.bca-val-table td.bca-active   { color: #00864a; font-weight: 700; }
.bca-val-table td.bca-inactive { color: #b91c1c; font-weight: 700; }

.bca-val-timestamp {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 12px;
}

/* ─── Notice / misc ──────────────────────────────────────────── */
.bca-login-notice,
.bca-no-membership-notice {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-top: 16px;
}
.bca-login-notice a { color: #1e64c8; }

/* ─── Admin ─────────────────────────────────────────────────── */
.bca-admin-wrap h1 { margin-bottom: 20px; }
.bca-edit-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 520px) {
    .bca-card__body { flex-wrap: wrap; }
    .bca-card__left { flex-direction: row; gap: 12px; }
    .bca-card__right { order: -1; align-self: flex-end; margin-left: auto; }
    .bca-card__nome  { font-size: 15px; }
    .bca-btn { font-size: 13px; padding: 9px 16px; }
}

/* ─── Print ──────────────────────────────────────────────────── */
@media print {
    .bca-actions, .bca-no-membership-notice, header, footer, nav { display: none !important; }
    .bca-card {
        box-shadow: none;
        width: 85.6mm;
        height: auto;
        page-break-inside: avoid;
    }
    .bca-wrap { max-width: 100%; margin: 0; }
}
