/* 💳 Meus Cartões — Controle de Despesa Pro */

/* Lista de cartões */
.lista-cartoes {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cartao-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #edf2f7;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    padding: 16px;
}

.cartao-card.cartao-alerta {
    border-color: #fca5a5;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.12);
}

.cartao-topo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.cartao-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cartao-nome {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
}

.cartao-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
}

.bandeira-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: #edf2f7;
    color: #4a5568;
}

.bandeira-visa   { background: #1a1f71; color: #fff; }
.bandeira-mastercard { background: #eb001b; color: #fff; }
.bandeira-elo    { background: #f7c600; color: #1a202c; }
.bandeira-hipercard { background: #b3131b; color: #fff; }
.bandeira-amex   { background: #2e77bc; color: #fff; }
.bandeira-diners { background: #0069aa; color: #fff; }
.bandeira-alelo  { background: #ff6a13; color: #fff; }
.bandeira-vr     { background: #00a859; color: #fff; }
.bandeira-sodexo { background: #e2001a; color: #fff; }
.bandeira-ticket { background: #0033a0; color: #fff; }

/* Badges de alerta */
.badge-alerta {
    display: inline-block;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.badge-ok {
    display: inline-block;
    background: #f0fdf4;
    color: #15803d;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

/* Limites */
.cartao-limites {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    gap: 8px;
}

.cartao-limites .label {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cartao-limites strong {
    display: block;
    font-size: 18px;
    color: #1a202c;
    margin-top: 2px;
}

.qtd-gastos {
    font-size: 11px;
    color: #a0aec0;
}

/* Barra de progresso do limite */
.barra-progresso {
    margin-top: 12px;
    height: 10px;
    background: #edf2f7;
    border-radius: 999px;
    overflow: hidden;
}

.barra-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.cartao-pct {
    margin-top: 6px;
    font-size: 11px;
    color: #94a3b8;
    text-align: right;
}

/* Ações */
.cartao-acoes {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.btn-acao {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #4a5568;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.btn-acao:active { background: #eef2f7; }

.btn-acao-excluir {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fef2f2;
}

/* Botão flutuante */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    z-index: 90;
}

.fab:active { transform: scale(0.95); }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}

.modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-pequeno { max-width: 340px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header h3 { margin: 0; color: #1a202c; }

.modal-fechar {
    background: none;
    border: none;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
}

.modal label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    margin: 14px 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #1a202c;
    box-sizing: border-box;
    background: #f8fafc;
}

.modal input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
}

.bandeira-hint {
    display: block;
    font-size: 11px;
    color: #16a34a;
    margin-top: 4px;
}

.btn-salvar {
    width: 100%;
    margin-top: 20px;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.btn-cancelar {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-excluir {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: #dc2626;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.modal-botoes {
    display: flex;
    gap: 8px;
}

.modal-botoes .btn-cancelar { flex: 1; margin-top: 0; }

/* 📷 Fotografar cartão */
.campo-numero {
    display: flex;
    gap: 8px;
    align-items: center;
}

.campo-numero input {
    flex: 1;
}

.btn-fotografar-cartao {
    padding: 10px 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, opacity 0.15s;
}

.btn-fotografar-cartao:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

.btn-fotografar-cartao:disabled {
    opacity: 0.6;
    cursor: wait;
}

.hint-seguranca {
    display: block;
    font-size: 11px;
    color: #6b7a94;
    margin-top: 6px;
    line-height: 1.4;
}

/* 👁️ Olho da tela de cartões */
.dash-cabecalho {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
}

.dash-cabecalho h1 {
    margin-right: auto;
}

.dash-cabecalho .btn-olho {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.dash-cabecalho .btn-olho:hover {
    background: #e2e8f0;
}

.dash-cabecalho .topo {
    width: 100%;
}
