/* ============================================================
   WalletDashboard.css — Dashboard da Carteira (Atividade 2)
   Layout FIEL aos frames do Figma (Dashboard - ARK Web Responsivo,
   telas 1/3/5/7). Paleta sky + gray hardcoded, modo Day, sem dark.
   ============================================================ */

.wallet-dash {
    background: #e5e7eb;
    min-height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
}

/* ---------- Sub-header do módulo (barra azul com gradiente) ---------- */
.wallet-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 32px;
    background: linear-gradient(90deg, #1e88c7 0%, #0b3a5c 100%);
    color: #fff;
}

.wallet-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
}

.wallet-topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #e0f2fe;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.wallet-topbar-ctx {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.wallet-topbar-ctx:hover {
    background: rgba(255, 255, 255, 0.2);
}

.wallet-topbar-spacer {
    flex: 1;
}

.wallet-topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #0b3a5c;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.wallet-topbar-btn:hover {
    background: #fff;
}

.wallet-topbar-bell {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #38bdf8;
    color: #fff;
    cursor: pointer;
}

/* ---------- Container interno ---------- */
.wallet-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px 32px 56px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ---------- Saudação + tabs ---------- */
.wallet-greet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.wallet-greet-title {
    font-size: 30px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.wallet-greet-sub {
    font-size: 15px;
    color: #6b7280;
    margin: 6px 0 0;
}

.wallet-tabs {
    display: inline-flex;
    gap: 4px;
    background: #fff;
    padding: 5px;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.wallet-tab {
    padding: 9px 24px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.wallet-tab.is-active {
    background: #1e88c7;
    color: #fff;
}

/* ---------- Grids ---------- */
.wallet-grid {
    display: grid;
    gap: 20px;
}

.wallet-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.wallet-grid-2 {
    grid-template-columns: 1fr 1fr;
}

/* banner largo + promo estreita */
.wallet-grid-2a {
    grid-template-columns: 1.9fr 1fr;
}

.wallet-grid-1-16 {
    grid-template-columns: 1fr 1.7fr;
}

.wallet-grid-14-1 {
    grid-template-columns: 1.5fr 1fr;
}

.wallet-grid-3col {
    grid-template-columns: 0.85fr 1.5fr 1fr;
}

.wallet-grid-06-2 {
    grid-template-columns: 0.55fr 2fr;
}

.wallet-grid-1-12 {
    grid-template-columns: 1fr 1.25fr;
}

.wallet-grid-tokens {
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

/* ---------- Card base ---------- */
.wallet-card {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.wallet-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wallet-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.wallet-card-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.wallet-card-add:hover {
    background: #f3f4f6;
}

.wallet-card-update {
    font-size: 12px;
    color: #9ca3af;
}

/* Card escuro (JRBank) — gradiente preto → azul, horizontal (frame 1/3) */
.wallet-card-dark {
    background: linear-gradient(105deg, #0b1220 0%, #10263c 45%, #1e88c7 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Card azul (saldo total FIAT/Crypto) */
.wallet-card-blue {
    background: linear-gradient(135deg, #1e88c7 0%, #0b3a5c 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Card laranja (conta bancária — Inter, frame 3) */
.wallet-card-orange {
    background: linear-gradient(120deg, #ff8a3d 0%, #f2661a 55%, #e2540d 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.wallet-card-dark::after,
.wallet-card-orange::after,
.wallet-card-blue::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 55%);
    pointer-events: none;
}

.wallet-card-dark > *,
.wallet-card-orange > *,
.wallet-card-blue > * {
    position: relative;
    z-index: 1;
}

.wallet-card-dark .wallet-card-title,
.wallet-card-orange .wallet-card-title,
.wallet-card-blue .wallet-card-title {
    color: #fff;
}

.wallet-card-dark .wallet-card-add,
.wallet-card-orange .wallet-card-add,
.wallet-card-blue .wallet-card-add {
    background: rgba(255, 255, 255, 0.95);
    border-color: transparent;
    color: #1f2937;
}

/* ---------- Tipografia de valores/labels ---------- */
.wallet-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wallet-value {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 6px 0 0;
    letter-spacing: -0.5px;
}

.wallet-value small {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    margin-left: 6px;
    letter-spacing: 0;
}

.wallet-card-dark .wallet-value,
.wallet-card-orange .wallet-value,
.wallet-card-blue .wallet-value {
    color: #fff;
}

.wallet-card-dark .wallet-label,
.wallet-card-orange .wallet-label,
.wallet-card-blue .wallet-label {
    color: rgba(255, 255, 255, 0.75);
}

.wallet-subcard {
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 10px;
    padding: 16px;
}

.wallet-card-blue .wallet-subcard {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

.wallet-subvalue {
    font-size: 18px;
    font-weight: 700;
    margin: 6px 0 0;
    color: #1f2937;
}

.wallet-card-blue .wallet-subvalue {
    color: #fff;
}

/* Tendência */
.wallet-up {
    color: #16a34a;
    font-weight: 600;
}

.wallet-down {
    color: #ef4444;
    font-weight: 600;
}

/* ---------- Chips de moeda / filtros ---------- */
.wallet-coins {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.wallet-coin {
    padding: 7px 16px;
    border: none;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.wallet-coin.is-active {
    background: #1e88c7;
    color: #fff;
}

.wallet-card-dark .wallet-coin,
.wallet-card-blue .wallet-coin {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.wallet-card-dark .wallet-coin.is-active,
.wallet-card-blue .wallet-coin.is-active {
    background: #fff;
    color: #0b3a5c;
}

/* ---------- Cotações (Quotes) ---------- */
.wallet-quotes-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 14px;
    text-align: center;
}

.wallet-mini-table,
.wallet-tx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.wallet-mini-table th,
.wallet-tx-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 10px 8px;
    border-bottom: 1px solid #f3f4f6;
}

.wallet-mini-table td,
.wallet-tx-table td {
    padding: 12px 8px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.wallet-mini-table tr:last-child td,
.wallet-tx-table tr:last-child td {
    border-bottom: none;
}

/* ---------- Conta bancária destaque (laranja, frame 3) ---------- */
.wallet-acc-country {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.wallet-acc-flag {
    width: 22px;
    height: auto;
    border-radius: 3px;
}

.wallet-acc-info {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    font-size: 12px;
}

.wallet-acc-bankrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    font-size: 13px;
    opacity: 0.95;
}

.wallet-acc-bank {
    font-weight: 600;
}

.wallet-acc-dots {
    display: inline-flex;
    gap: 4px;
    font-size: 6px;
    align-items: center;
}

.wallet-acc-body {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.wallet-acc-logo {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 700;
    font-size: 24px;
    flex: 0 0 auto;
}

.wallet-acc-balance {
    margin: 0;
    font-size: 30px;
}

.wallet-acc-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.wallet-btn-white {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.wallet-btn-white:hover {
    background: #fff;
}

/* ---------- Banner Open Finance (frame 1) ---------- */
.wallet-banner {
    position: relative;
    border-radius: 16px;
    padding: 36px 40px;
    color: #fff;
    background-color: #0b3a5c;
    background-size: cover;
    background-position: center right;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    min-height: 240px;
    justify-content: center;
    overflow: hidden;
}

.wallet-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(9, 30, 50, 0.92) 0%, rgba(9, 30, 50, 0.55) 45%, rgba(9, 30, 50, 0) 75%);
}

.wallet-banner > * {
    position: relative;
    z-index: 1;
}

.wallet-banner-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    font-size: 12px;
    font-weight: 500;
}

.wallet-banner-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    max-width: 22ch;
}

.wallet-banner-text {
    font-size: 14px;
    margin: 0;
    opacity: 0.92;
    max-width: 42ch;
    line-height: 1.5;
}

.wallet-banner-text b {
    font-weight: 700;
}

/* ---------- Promo (Exchange / Gestão Financeira) ---------- */
.wallet-promo {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.wallet-promo-img {
    height: 118px;
    background-size: cover;
    background-position: center;
    background-color: #cbd5e1;
}

.wallet-promo-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    flex: 1;
}

.wallet-promo-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #1f2937;
}

.wallet-promo-text {
    font-size: 13px;
    color: #6b7280;
    margin: 5px 0 0;
    line-height: 1.4;
}

.wallet-promo-go {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #1f2937;
    color: #fff;
    cursor: pointer;
}

.wallet-promo-go:hover {
    background: #111827;
}

/* ---------- Transações ---------- */
.wallet-tx-head,
.wallet-donut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.wallet-tx-link {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wallet-tx-link:hover {
    color: #1e88c7;
}

.wallet-tx-who {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #1f2937;
}

.wallet-tx-photo,
.wallet-tx-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    font-size: 15px;
    flex: 0 0 auto;
}

/* ---------- Badges de status (pill) ---------- */
.wallet-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.wallet-badge-success {
    background: #dcfce7;
    color: #16a34a;
}

.wallet-badge-warning,
.wallet-badge-pending {
    background: #fee2e2;
    color: #ef4444;
}

.wallet-badge-gray,
.wallet-badge-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

/* ---------- Seções / período ---------- */
.wallet-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 8px 0 0;
}

.wallet-period {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wallet-period-box {
    padding: 9px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.wallet-period-arrow {
    color: #9ca3af;
}

/* ---------- Gráficos ---------- */
.wallet-chart {
    margin-top: 16px;
    min-height: 240px;
}

.wallet-chart-donut {
    min-height: 210px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---------- Cartão de crédito ---------- */
.wallet-credit-card {
    background: linear-gradient(120deg, #2563eb 0%, #1e3a8a 100%);
    border-radius: 14px;
    padding: 22px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.wallet-cc-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.wallet-cc-balance {
    font-size: 24px;
    font-weight: 700;
    margin: 4px 0 0;
}

.wallet-cc-chip {
    font-size: 24px;
    opacity: 0.9;
}

.wallet-cc-num {
    font-size: 17px;
    letter-spacing: 2px;
    margin: 22px 0 16px;
}

.wallet-cc-foot {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.wallet-cc-foot small {
    font-size: 10px;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

/* ---------- KPI cards ---------- */
.wallet-kpi {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ---------- Lista de investimentos ---------- */
.wallet-inv-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    border-bottom: 1px solid #f3f4f6;
}

.wallet-inv-row:last-child {
    border-bottom: none;
}

.wallet-inv-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 17px;
    flex: 0 0 auto;
}

.wallet-inv-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wallet-inv-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.wallet-inv-cat {
    font-size: 12px;
    color: #9ca3af;
}

.wallet-inv-vals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.wallet-inv-value {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

/* ---------- Tokens (Crypto) ---------- */
.wallet-token {
    padding: 18px;
}

.wallet-token-head {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

.wallet-token-flag {
    width: 24px;
    height: auto;
    border-radius: 3px;
}

.wallet-token-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
}

.wallet-jr-badge {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1e88c7;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

/* ============================================================
   Responsivo — reflow real (breakpoints 992 / 600)
   ============================================================ */
@media (max-width: 992px) {
    .wallet-grid-3,
    .wallet-grid-3col {
        grid-template-columns: 1fr 1fr;
    }

    .wallet-grid-2,
    .wallet-grid-2a,
    .wallet-grid-1-16,
    .wallet-grid-14-1,
    .wallet-grid-06-2,
    .wallet-grid-1-12 {
        grid-template-columns: 1fr;
    }

    .wallet-greet-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .wallet-tabs {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .wallet-topbar {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 10px;
    }

    .wallet-topbar-spacer {
        display: none;
    }

    .wallet-inner {
        padding: 20px 16px 40px;
        gap: 18px;
    }

    .wallet-greet-title {
        font-size: 24px;
    }

    .wallet-grid-3,
    .wallet-grid-3col,
    .wallet-grid-tokens {
        grid-template-columns: 1fr;
    }

    .wallet-value {
        font-size: 26px;
    }

    /* tabelas rolam dentro do card; a página nunca rola na horizontal */
    .wallet-mini-table,
    .wallet-tx-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ===== Ajustes de botões conforme o Figma (2026) ===== */

/* Botão de refresh (recarrega cotação) ao lado de "Última atualização" */
.wallet-refresh-btn {
    background: none;
    border: none;
    padding: 0 0 0 6px;
    cursor: pointer;
    color: #0ea5e9;
    font-size: 13px;
    vertical-align: middle;
}
.wallet-card-dark .wallet-refresh-btn { color: #7dd3fc; }
.wallet-refresh-btn:hover { color: #0284c7; }

/* Agrupa ações à direita do cabeçalho do card (info + adicionar saldo) */
.wallet-card-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Setas de carrossel no card JRBank */
.wallet-carousel {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
}
.wallet-carousel button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 10px;
}
.wallet-carousel button:hover { background: rgba(255, 255, 255, 0.28); }

/* Busca dos Quotes (input com lupa) */
.wallet-quotes-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    color: #9ca3af;
}
.wallet-quotes-search i { font-size: 13px; }
.wallet-quotes-search-input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 0;
    font: inherit;
    font-size: 13px;
    color: #374151;
    background: transparent;
}
.wallet-quotes-search:focus-within {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Menu do topbar na aba Crypto (Dashboard/Exchange/Staking) */
.wallet-topbar-nav {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 4px;
}
.wallet-topbar-nav .wallet-tab {
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}
.wallet-topbar-nav .wallet-tab.is-active {
    background: #fff;
    color: #0369a1;
}

/* ===== Modal Atualizar Patrimônio ===== */
.patrimony-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 16px;
}
.patrimony-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.patrimony-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.patrimony-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}
.patrimony-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 18px;
}
.patrimony-modal-close:hover { color: #111827; }
.patrimony-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 4px;
}
.patrimony-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}
.patrimony-input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    color: #111827;
    background: #fff;
}
.patrimony-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.patrimony-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}
.patrimony-btn-primary {
    background: #0ea5e9;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.patrimony-btn-primary:hover { background: #0284c7; }
.patrimony-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 20px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.patrimony-btn-secondary:hover { background: #f3f4f6; }

/* ============================================================
   DARK MODE — acompanha o tema do app ([data-theme="dark"]).
   Overrides só das superfícies/textos/bordas; o CSS Day acima
   fica intacto. As cores de destaque (azul/laranja/verde/roxo)
   e os badges funcionam nos dois temas, não são sobrescritos.
   ============================================================ */
[data-theme="dark"] .wallet-dash {
    background: #151a20;
    color: #e8ecf0;
}

/* Superfícies (cards, subcards, tabelas) */
[data-theme="dark"] .wallet-card {
    background: #1e2329;
}
[data-theme="dark"] .wallet-subcard {
    background: #232a31;
    border-color: #2c333b;
}
[data-theme="dark"] .wallet-card-add {
    background: #1e2329;
    border-color: #2c333b;
    color: #e8ecf0;
}
[data-theme="dark"] .wallet-card-add:hover {
    background: #2c333b;
}

/* Textos: título/valor → claro; secundário/mudo mantém o cinza (legível no escuro) */
[data-theme="dark"] .wallet-greet-title,
[data-theme="dark"] .wallet-card-title,
[data-theme="dark"] .wallet-value,
[data-theme="dark"] .wallet-section-title,
[data-theme="dark"] .wallet-subvalue {
    color: #e8ecf0;
}
[data-theme="dark"] .wallet-mini-table td,
[data-theme="dark"] .wallet-tx-table td {
    color: #c5ccd6;
    border-bottom-color: #2c333b;
}

/* Tabs / chips de moeda no escuro */
[data-theme="dark"] .wallet-tab {
    color: #9ca3af;
}
[data-theme="dark"] .wallet-coin {
    background: #232a31;
    color: #c5ccd6;
}

/* Cartão de conexão (WalletAccountCard) e headings herdados */
[data-theme="dark"] .wallet-accounts-heading {
    color: #e8ecf0;
}

/* Erro inline continua legível sobre fundo escuro */
[data-theme="dark"] .wallet-inline-error {
    background: #3b1d1d;
    color: #fca5a5;
}
