/* ===========================================================================
 * Patrimônio V2 - estilos da modernização da Home (posição consolidada,
 * evolução patrimonial, governança, detalhes de Renda Fixa).
 * Tokens alinhados ao tema (azul #25A7DB, navy #293953, verde #17B652,
 * coral #FD645F, cinza #6B6B6B). Carregado direto no index.html (sem build SCSS).
 * ======================================================================== */

/* ── Banner de avisos (warnings[]) ──────────────────────────────────────── */
.patrimony-warnings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.patrimony-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff6e9;
    border: 1px solid #f3d9a8;
    color: #8a5a12;
    font-size: 12px;
    line-height: 1.4;
}
.patrimony-warning__icon {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    flex-shrink: 0;
}

/* ── Evolução patrimonial ───────────────────────────────────────────────── */
.patrimony-evolution {
    border: 1px solid #eef0f3;
    border-radius: 12px;
    padding: 16px 18px;
    background: #ffffff;
}
.patrimony-evolution--hidden {
    background: #f6f8fa;
    border-style: dashed;
}
.patrimony-evolution__chart {
    min-height: 230px;
}

/* Pílulas de período */
.patrimony-pills {
    display: inline-flex;
    background: #f0f2f5;
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}
.patrimony-pill {
    border: none;
    background: transparent;
    color: #6b6b6b;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: 'Montserrat', sans-serif;
}
.patrimony-pill:hover {
    color: #293953;
}
.patrimony-pill--active {
    background: #ffffff;
    color: #25a7db;
    box-shadow: 0 1px 3px rgba(41, 57, 83, 0.12);
}
.patrimony-pill:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ── Chips / selos ──────────────────────────────────────────────────────── */
.patrimony-chip {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}
.patrimony-chip--review {
    color: #b8860b;
    background: rgba(184, 134, 11, 0.1);
}
.patrimony-chip--muted {
    color: #6b6b6b;
    background: rgba(107, 107, 107, 0.1);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}
.patrimony-chip--manual {
    color: #25a7db;
    background: rgba(37, 167, 219, 0.12);
}

/* Célula de preço médio (valor + chip Manual + lápis de edição) */
.patrimony-pm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.patrimony-pm__edit {
    font-size: 12px;
}

/* Truncamento de textos longos nas tabelas (ex.: emissor / nome do produto) */
.patrimony-ellipsis {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.patrimony-nowrap {
    white-space: nowrap;
}

/* Botão-ícone (olho "ver detalhes") que abre o painel inline */
.patrimony-detail-toggle {
    border: none;
    background: transparent;
    padding: 2px;
    cursor: pointer;
    line-height: 0;
    display: inline-flex;
    -webkit-tap-highlight-color: transparent;
}
.patrimony-detail-toggle,
.patrimony-detail-toggle:focus,
.patrimony-detail-toggle:active,
.patrimony-detail-toggle:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}
.patrimony-detail-toggle svg {
    fill: #9aa3af;
    transition: fill 0.2s ease;
}
.patrimony-detail-toggle:hover svg,
.patrimony-detail-toggle--active svg {
    fill: #25a7db;
}

/* Painel de detalhes inline (expande para baixo no lugar do modal) */
.patrimony-detail-row > td {
    padding: 0 !important;
    border-top: none !important;
}
.patrimony-detail {
    background: #f6f8fa;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 4px 0 12px;
}
.patrimony-detail__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px 18px;
}
.patrimony-detail__item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: left;
}
.patrimony-detail__label {
    font-size: 11px;
    color: #6b6b6b;
}
.patrimony-detail__value {
    font-size: 13px;
    color: #293953;
    font-weight: 600;
}
.patrimony-detail__foot {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e6e9ee;
}
@media (max-width: 575px) {
    .patrimony-detail {
        margin: 8px 0;
    }
    .patrimony-detail__grid {
        grid-template-columns: 1fr 1fr;
    }
    .patrimony-ellipsis {
        max-width: 150px;
    }
}

/* ── Botões de link / info ──────────────────────────────────────────────── */
.patrimony-link-btn {
    border: none;
    background: transparent;
    color: #25a7db;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
    font-family: 'Montserrat', sans-serif;
}
.patrimony-link-btn:hover {
    text-decoration: underline;
}
.patrimony-info-btn {
    border: none;
    background: transparent;
    color: #25a7db;
    cursor: pointer;
    padding: 0;
    font-size: 13px;
    line-height: 1;
}

/* ── Modal de detalhes / info (single-column md) ────────────────────────── */
.patrimony-modal .modal-dialog {
    max-width: 460px;
}
.patrimony-modal .modal-invest__content,
.patrimony-details__content,
.patrimony-info__content {
    height: auto !important;
    padding: 32px 28px;
    position: relative;
    align-items: stretch;
}

.patrimony-details__hero {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: #f6f8fa;
    border-radius: 10px;
    padding: 14px 16px;
}
.patrimony-details__hero-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.patrimony-details__section-title {
    font-size: 13px;
    font-weight: 700;
    color: #293953;
    margin: 0 0 10px;
}
.patrimony-details__rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.patrimony-details__rows .modal-invest__details {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
.patrimony-details__mtm {
    border-top: 1px solid #eef0f3;
    padding-top: 14px;
}

.patrimony-info__text {
    font-size: 13px;
    color: #4a4a4a;
    line-height: 1.5;
    margin-bottom: 12px;
}
.patrimony-info__footnote {
    font-size: 11px;
    color: #8a8a8a;
    font-style: italic;
    margin-top: 4px;
}
.patrimony-info__list {
    margin: 8px 0 0;
    padding-left: 18px;
    color: #4a4a4a;
    font-size: 13px;
    line-height: 1.7;
}

/* ── Ajustes responsivos ────────────────────────────────────────────────── */
@media (max-width: 575px) {
    .patrimony-evolution {
        padding: 14px;
    }
    .patrimony-details__hero {
        flex-direction: column;
        gap: 10px;
    }
    .patrimony-modal .modal-dialog {
        max-width: 92%;
        margin: 16px auto;
    }
}
