/* ============================================================================
   Overview (risk analysis) pages — global, modular.
   Section A: Grupo de Risco 360 (/overview/risk-group, .overview360-page) — a
     complete, responsive design that was previously inert because it lived in a
     dead scoped stylesheet. Ported here verbatim so it actually loads; the few
     generic selectors are scoped under .overview360-page so they don't leak.
   Section B: Análise de Risco (/overview, .overview-page) — legacy bespoke page;
     its generic layout utilities are scoped under .overview-page and the old
     #4472c4 blue is unified onto the brand token.
   ============================================================================ */

/* ===== Section A — Grupo de Risco 360 ===== */
.overview360-page {
    background: #f4f6f8;
    min-height: 100vh;
    color: #18202f;
}

.overview360-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #d8dee8;
}

.overview360-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 220px;
}

.overview360-title h1 {
    font-size: 1.34rem;
    line-height: 1.2;
    margin: 0;
    font-weight: 700;
    color: #172033;
}

.overview360-eyebrow {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #0f766e;
    font-weight: 700;
}

.overview360-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.overview360-filter {
    width: 220px;
    min-height: 32px;
    border-color: #c8d1df;
    font-size: 0.86rem;
    padding-right: 34px;
    cursor: pointer;
    background-color: #ffffff;
}

.overview360-filter:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 0.16rem rgba(15, 118, 110, 0.16);
}

.overview360-combobox {
    position: relative;
}

.overview360-combobox-icon {
    position: absolute;
    top: 50%;
    right: 11px;
    z-index: 3;
    transform: translateY(-50%);
    color: #44546a;
    font-size: 0.82rem;
    pointer-events: none;
}

.overview360-combobox:focus-within .overview360-combobox-icon {
    color: #0f766e;
}

.overview360-actions .dropdown-menu {
    width: min(360px, calc(100vw - 32px));
    max-width: min(360px, calc(100vw - 32px));
    margin-top: 4px;
    border-color: #c8d1df;
    box-shadow: 0 10px 24px rgba(18, 32, 59, 0.14);
}

.overview360-actions .dropdown:focus-within > .dropdown-menu,
.overview360-actions .dropdown > .dropdown-menu:hover {
    display: block;
}

.overview360-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.overview360-context {
    display: grid;
    grid-template-columns: minmax(320px, 1.35fr) minmax(240px, 0.85fr);
    gap: 1px;
    background: #d8dee8;
    border-bottom: 1px solid #d8dee8;
}

.overview360-context > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px;
    background: #ffffff;
    min-width: 0;
}

.overview360-context-filter {
    position: relative;
    padding: 0 !important;
}

.overview360-context-button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 10px;
    width: 100%;
    min-height: 72px;
    padding: 12px 20px;
    border: 0;
    background: #ffffff;
    color: inherit;
    text-align: left;
}

.overview360-context-button:hover,
.overview360-context-filter:focus-within .overview360-context-button {
    background: #f8fbfd;
}

.overview360-context-button span,
.overview360-context-button strong {
    min-width: 0;
}

.overview360-context-button i {
    grid-column: 2;
    grid-row: 1 / span 2;
    color: #526277;
    font-size: 0.86rem;
}

.overview360-context span {
    color: #697586;
    font-size: 0.74rem;
}

.overview360-context strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
    color: #263449;
}

.overview360-context-menu {
    top: calc(100% + 4px);
    left: 8px;
    width: min(520px, calc(100vw - 32px));
    max-width: min(520px, calc(100vw - 32px));
    margin-top: 0;
    padding: 8px;
    border-color: #c8d1df;
    box-shadow: 0 14px 30px rgba(18, 32, 59, 0.16);
}

.overview360-context-menu--wide {
    width: min(640px, calc(100vw - 32px));
    max-width: min(640px, calc(100vw - 32px));
}

.overview360-context-search {
    margin-bottom: 8px;
    border-color: #c8d1df;
}

.overview360-context-search:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 0.16rem rgba(15, 118, 110, 0.14);
}

.overview360-context-options {
    max-height: 280px;
    overflow-x: hidden;
    overflow-y: auto;
}

.overview360-context-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.overview360-context-option span {
    color: inherit;
    font-size: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview360-context-option small {
    flex: 0 0 auto;
}

.overview360-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 260px;
}

.overview360-loading span {
    color: #44546a;
    font-size: 0.86rem;
    font-weight: 600;
}

.overview360-skeleton-card {
    position: relative;
}

.overview360-skeleton-line,
.overview360-skeleton-block,
.overview360-skeleton-pill {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e4eaf1;
    border-radius: 999px;
}

.overview360-skeleton-line::after,
.overview360-skeleton-block::after,
.overview360-skeleton-pill::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    animation: overview360-shimmer 1.18s linear infinite;
}

.overview360-skeleton-line {
    width: 72%;
    height: 11px;
}

.overview360-skeleton-line--wide {
    width: 88%;
}

.overview360-skeleton-line--short {
    width: 44%;
}

.overview360-skeleton-block {
    width: 68%;
    height: 18px;
    border-radius: 8px;
}

.overview360-skeleton-block--large {
    width: 78%;
    height: 28px;
}

.overview360-skeleton-heading {
    width: 210px;
    max-width: 55%;
    height: 20px;
}

.overview360-skeleton-pill {
    width: 132px;
    height: 30px;
}

.overview360-filter-loading,
.overview360-skeleton-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.overview360-filter-loading {
    padding: 8px 10px;
}

.overview360-skeleton-table {
    min-height: 160px;
    padding: 12px;
    border: 1px solid #dce4ee;
    border-radius: 8px;
    background: #ffffff;
}

.overview360-skeleton-table .overview360-skeleton-line {
    width: 100%;
}

.overview360-skeleton-table .overview360-skeleton-line:nth-child(2n) {
    width: 84%;
}

.overview360-skeleton-table .overview360-skeleton-line:nth-child(3n) {
    width: 64%;
}

@keyframes overview360-shimmer {
    100% {
        transform: translateX(100%);
    }
}

.overview360-command-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.3fr) auto;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
}

.overview360-total-panel,
.overview360-quick-metrics,
.overview360-legacy-actions,
.overview360-role-panel,
.overview360-band,
.overview360-table-panel {
    background: #ffffff;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(18, 32, 59, 0.05);
}

.overview360-total-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 14px 16px;
    border-left: 4px solid #0f766e;
}

.overview360-total-panel span,
.overview360-quick-metrics span {
    color: #697586;
    font-size: 0.74rem;
}

.overview360-total-panel strong {
    font-size: 1.45rem;
    line-height: 1.15;
    color: #172033;
}

.overview360-total-panel div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.overview360-total-panel small {
    color: #44546a;
    font-size: 0.78rem;
}

.overview360-quick-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: #d8dee8;
    overflow: hidden;
}

.overview360-quick-metrics > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 14px;
    background: #ffffff;
}

.overview360-quick-metrics strong {
    overflow-wrap: anywhere;
    font-size: 1rem;
    line-height: 1.2;
}

.overview360-legacy-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
}

.overview360-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px 16px;
    overflow-x: auto;
}

.overview360-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #c8d1df;
    border-radius: 8px;
    background: #ffffff;
    color: #2f3c4f;
    font-size: 0.86rem;
    white-space: nowrap;
}

.overview360-tab:hover {
    border-color: #0f766e;
    color: #0f766e;
}

.overview360-tab.is-active {
    border-color: #0f766e;
    background: #e9f7f5;
    color: #0b5f59;
    font-weight: 700;
}

.overview360-tab.is-disabled,
.overview360-tab:disabled {
    background: #f4f6f9;
    border-color: #dbe2ec;
    color: #8b98aa;
    cursor: not-allowed;
    opacity: 1;
}

.overview360-role-grid,
.overview360-two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 0 16px 16px;
}

.overview360-role-grid--expanded,
.overview360-due-layout {
    grid-template-columns: 1fr;
    gap: 18px;
}

.overview360-role-panel,
.overview360-table-panel {
    min-width: 0;
    overflow: hidden;
    padding: 14px;
}

.overview360-role-grid--expanded .overview360-role-panel,
.overview360-due-layout .overview360-table-panel {
    padding: 16px;
}

.role-panel-header,
.overview360-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.role-panel-header h2,
.overview360-section-title h2,
.overview360-table-panel h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    line-height: 1.2;
    margin: 0;
    color: #172033;
}

.overview360-role-grid--expanded .role-panel-header h2,
.overview360-due-layout .overview360-table-panel h2 {
    font-size: 1.08rem;
}

.role-panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.role-panel-actions span,
.overview360-section-title span {
    color: #697586;
    font-size: 0.82rem;
    white-space: nowrap;
}

.overview360-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.overview360-role-grid--expanded .overview360-kpis {
    gap: 10px;
}

.overview360-kpis > div {
    min-width: 0;
    padding: 10px;
    border: 1px solid #dce3ec;
    border-radius: 8px;
    background: #fbfcfe;
}

.overview360-kpis span {
    display: block;
    color: #697586;
    font-size: 0.72rem;
    margin-bottom: 4px;
}

.overview360-kpis strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 0.94rem;
    line-height: 1.2;
}

.overview360-role-grid--expanded .overview360-kpis strong {
    font-size: 1.04rem;
}

.overview360-tables {
    display: grid;
    align-items: start;
    grid-template-columns: minmax(230px, 1fr) minmax(230px, 1fr) minmax(260px, 1.08fr);
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 10px;
    scrollbar-gutter: stable;
}

.overview360-role-grid--expanded .overview360-tables {
    grid-template-columns: minmax(270px, 0.92fr) minmax(330px, 1fr) minmax(360px, 1.08fr);
    gap: 12px;
}

.overview360-tables::-webkit-scrollbar,
.overview360-table-panel .table-responsive::-webkit-scrollbar,
.overview360-band .table-responsive::-webkit-scrollbar {
    height: 10px;
}

.overview360-tables::-webkit-scrollbar-track,
.overview360-table-panel .table-responsive::-webkit-scrollbar-track,
.overview360-band .table-responsive::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 999px;
}

.overview360-tables::-webkit-scrollbar-thumb,
.overview360-table-panel .table-responsive::-webkit-scrollbar-thumb,
.overview360-band .table-responsive::-webkit-scrollbar-thumb {
    background: #aebccc;
    border: 2px solid #edf2f7;
    border-radius: 999px;
}

.overview360-tables > table {
    min-width: 230px;
}

.overview360-tables > table:last-child {
    min-width: 260px;
}

.overview360-tables table,
.overview360-table-panel table,
.overview360-ranking {
    border: 1px solid #dce4ee;
    border-collapse: separate;
    border-radius: 8px;
    border-spacing: 0;
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 0;
    font-size: 0.84rem;
}

.overview360-role-grid--expanded .overview360-tables table {
    font-size: 0.87rem;
}

.overview360-tables thead,
.overview360-table-panel thead,
.overview360-ranking thead {
    --bs-table-bg: #edf4f8;
    --bs-table-color: #172033;
}

.overview360-tables th,
.overview360-table-panel th,
.overview360-ranking th {
    padding: 8px 10px;
    border-bottom: 1px solid #93a4b8;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.overview360-tables td,
.overview360-table-panel td,
.overview360-ranking td {
    padding: 8px 10px;
    border-bottom: 1px solid #e4ebf3;
    vertical-align: middle;
}

.overview360-tables tbody tr:last-child td,
.overview360-table-panel tbody tr:last-child td,
.overview360-ranking tbody tr:last-child td {
    border-bottom: 0;
}

.overview360-tables tbody tr:hover td,
.overview360-table-panel tbody tr:hover td,
.overview360-ranking tbody tr:hover td {
    --bs-table-bg: #f8fbfd;
}

.overview360-tables td:first-child,
.overview360-table-panel td:first-child,
.overview360-ranking td:first-child {
    color: #26364b;
    font-weight: 500;
}

.overview360-tables th:first-child,
.overview360-tables td:first-child {
    white-space: nowrap;
}

.overview360-tables td:last-child,
.overview360-table-panel td:not(:first-child),
.overview360-ranking td:not(:first-child) {
    white-space: nowrap;
}

.overview360-tables td:last-child,
.overview360-table-panel th:nth-last-child(-n + 2),
.overview360-table-panel td:nth-last-child(-n + 2),
.overview360-ranking th:not(:first-child),
.overview360-ranking td:not(:first-child) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.overview360-ranking td:last-child {
    width: 1%;
}

.overview360-band {
    margin: 0 16px 16px;
    padding: 14px;
}

.overview360-ranking td,
.overview360-ranking th {
    vertical-align: middle;
}

.overview360-table-panel h2 {
    margin-bottom: 12px;
}

.overview360-due-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.overview360-due-layout .overview360-due-grid {
    grid-template-columns: repeat(2, minmax(380px, 1fr));
    gap: 16px;
}

.overview360-page .dropdown-menu {
    min-width: 280px;
}

.overview360-page .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.overview360-page .dropdown-item small {
    color: #697586;
}

.overview360-page .dropdown-empty {
    color: #697586;
    padding: 6px 10px;
}

.overview360-page .scrollable-dropdown {
    max-height: 280px;
    overflow-y: auto;
}

.overview360-page td small {
    display: block;
    color: #697586;
    font-size: 0.76rem;
}

@media (max-width: 1260px) {
    .overview360-context {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .overview360-command-row {
        grid-template-columns: 1fr 1fr;
    }

    .overview360-legacy-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .overview360-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .overview360-due-layout .overview360-due-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .overview360-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .overview360-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .overview360-context,
    .overview360-command-row,
    .overview360-role-grid,
    .overview360-two-columns,
    .overview360-due-grid {
        grid-template-columns: 1fr;
    }

    .overview360-filter {
        width: 100%;
    }

    .overview360-actions .dropdown {
        flex: 1 1 220px;
    }

    .overview360-quick-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .overview360-kpis {
        grid-template-columns: 1fr;
    }

    .overview360-header,
    .overview360-command-row,
    .overview360-role-grid,
    .overview360-two-columns,
    .overview360-tabs {
        padding-left: 12px;
        padding-right: 12px;
    }

    .overview360-band {
        margin-left: 12px;
        margin-right: 12px;
    }

    .role-panel-header,
    .overview360-section-title {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ===== Section B — Análise de Risco (legacy /overview, .overview-page) =====
   Previously these layout utilities lived in a dead scoped stylesheet, so the
   page collapsed (tables stacked, dropdowns unstyled, clickable text plain).
   Scoped under .overview-page and unified onto the brand blue. */

.overview-page .navbar.bg-primary {
    background-color: var(--color-brand-70) !important;
    color: #fff !important;
}
.overview-page .bg-primary-dark {
    background-color: var(--color-brand-90);
    color: #fff;
}

/* The page's blue accents (accordion headers, primary buttons) carried the old
   #4472c4; an !important here beats the per-element inline style so the whole
   page lands on one brand blue with no markup churn. */
.overview-page .accordion-button {
    background-color: var(--color-brand-70) !important;
    color: #fff !important;
}
.overview-page .accordion-button:not(.collapsed) {
    box-shadow: none;
}
.overview-page .accordion-button::after,
.overview-page .accordion-button.collapsed::after {
    filter: brightness(0) invert(1);
}
.overview-page .btn-primary {
    background-color: var(--color-brand-70) !important;
    border-color: var(--color-brand-70) !important;
}
.overview-page .btn-primary:hover {
    background-color: var(--color-brand-90) !important;
    border-color: var(--color-brand-90) !important;
}
.overview-page .thead-blue {
    background-color: var(--color-brand-70);
    color: #fff;
}

/* Layout utilities revived (were dead scoped classes). */
.overview-page .linear {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}
.overview-page .table-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 16px;
}
.overview-page .table-row > div {
    min-width: 0;
    flex: 1 1 280px;
}
.overview-page .centered {
    display: flex;
    justify-content: center;
}
.overview-page .round {
    border-radius: var(--border-radius);
}
.overview-page .section {
    margin: 20px;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}
.overview-page .section-title {
    margin: 20px;
    font-size: 1.6rem;
}
.overview-page .scrollable-dropdown {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px;
    border: 1px solid var(--border-neutral-primary);
    background-color: #fff;
}
.overview-page .text-clickable {
    text-decoration: underline;
    color: var(--color-brand-70);
    cursor: pointer;
}
.overview-page .text-clickable:hover {
    color: var(--color-brand-90);
}
.overview-page .load-more {
    cursor: pointer;
}
.overview-page .load-more:hover {
    text-decoration: underline;
}

/* Mobile / native: stack the side-by-side table cluster and tighten gutters so
   the page follows header → content → navbar with no horizontal scroll. */
@media (max-width: 768px) {
    .overview-page .table-row {
        flex-direction: column;
        gap: 12px;
    }
    .overview-page .navbar {
        gap: 10px;
    }
    .overview-page .section {
        margin: 12px;
        padding: 14px;
    }
    .overview-page > div[style*="margin"] {
        margin: 12px !important;
    }
}

/* Negative financial values use the same high-contrast treatment in both risk views. */
.overview-page .risk-negative-value,
.overview360-page .risk-negative-value {
    --risk-negative-bg: var(--color-red-10, #fff1f0);
    --bs-table-bg: var(--color-red-10, #fff1f0);
    --bs-table-color: var(--color-red-100, #7f1d1d);
    background-color: var(--risk-negative-bg) !important;
    color: var(--color-red-100, #7f1d1d) !important;
    border-color: var(--color-red-40, #f0aaa6) !important;
    outline: 1px solid var(--color-red-40, #f0aaa6);
    outline-offset: -1px;
}

.overview-page td.risk-negative-value,
.overview-page th.risk-negative-value,
.overview360-page td.risk-negative-value,
.overview360-page th.risk-negative-value {
    box-shadow: inset 0 0 0 9999px var(--risk-negative-bg) !important;
}

/* ===== Section C — Análise de Risco (/overview) reskin on the .overview360-* language =====
   The .overview360-* classes used in Overview.razor are styled by Section A (global selectors),
   so the header/context/actions inherit that look automatically. These rules add the page-only
   bits (segmented role toggle, header meta, 3-up context grid) and give every table on the page
   — Informações, Vencimento, Checagem and the modals — one clean treatment. */

/* Three context filters (Empresa / Grupo / Agente) span the row; stacks on mobile. */
.overview-page .overview360-context {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Outside-click closes the context filter menus: an invisible full-screen catcher sits behind the
   open menu; the open filter is lifted above it so taps inside still work. */
.overview-filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: transparent;
}
.overview-page .overview360-context-filter.is-open,
.overview360-page .overview360-context-filter.is-open {
  position: relative;
  z-index: 1050;
}

/* Tabs strip (both risk pages): swipe-scrollable WITHOUT a visible scrollbar — the WebKit x-bar
   read as broken / non-native. Momentum scroll stays on for touch. */
.overview360-tabs {
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}
.overview360-tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.overview360-tab {
    scroll-snap-align: start;
}

/* Icon buttons (Clássica, Atualizar, Lista, etc.) read as bottom-heavy on native because the
   native `.btn { display:block; min-height:38px }` touch rule overrides the design's inline-flex,
   so `align-items:center` is ignored and the inline content top-aligns inside the 38px box. Force
   them back to centered flex and normalize the child line-heights. */
html.yaaleh-maui-app .overview360-icon-btn,
.overview360-icon-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}
.overview360-icon-btn > i,
.overview360-icon-btn > span {
    line-height: 1;
}

/* Title meta line (CNPJ / ramo / classe de risco). */
.overview360-context-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--color-ink-600);
}
.overview360-context-meta strong {
    color: var(--color-ink-900);
}
.overview360-riskclass {
    display: inline-flex;
    align-items: center;
    padding: 1px 10px;
    border-radius: 999px;
    background: var(--color-brand-tint);
    color: var(--color-brand-80);
    font-weight: 700;
}

/* Segmented Cedente | Sacado control (replaces the old form-switch checkbox). */
.overview-role-toggle {
    display: inline-flex;
    padding: 3px;
    background: #eef1f5;
    border: 1px solid var(--border-neutral-primary);
    border-radius: 999px;
}
.overview-role-toggle__btn {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-ink-600);
    cursor: pointer;
}
.overview-role-toggle__btn.is-active {
    background: #fff;
    color: var(--color-brand-80);
    box-shadow: 0 1px 2px rgba(18, 32, 59, 0.12);
}

/* One clean table treatment for the whole page (info / due / check / modal tables).
   Scoped to :not(.cards-mobile): on native the enhancer adds .cards-mobile and the table becomes
   floating row-cards — the desktop frame (white bg / border / radius) must NOT paint behind them,
   so it only applies to real (non-card) tables. The card recipe then keeps the tbody transparent. */
.overview-page .table:not(.cards-mobile) {
    border: 1px solid var(--border-neutral-primary);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #fff;
    margin-bottom: 0;
    font-size: 0.86rem;
}
.overview-page .table:not(.cards-mobile) thead th,
.overview-page .table:not(.cards-mobile) thead td {
    background: #edf4f8;
    color: var(--color-ink-900);
    border-bottom: 1px solid #93a4b8;
    padding: 8px 10px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
}
.overview-page .table:not(.cards-mobile) tbody td,
.overview-page .table:not(.cards-mobile) tbody th {
    padding: 8px 10px;
    border-bottom: 1px solid #e4ebf3;
    vertical-align: middle;
}
.overview-page .table:not(.cards-mobile) tbody tr:last-child td,
.overview-page .table:not(.cards-mobile) tbody tr:last-child th {
    border-bottom: 0;
}
.overview-page .table:not(.cards-mobile) tbody tr:hover td {
    background: #f8fbfd;
}

/* "Informações" metric tables: native iOS grouped-list (label left, value right). Kept out of the
   cards-mobile enhancer so each group reads as one tidy list, not a stack of one-line cards. */
/* A global responsive rule renders these tables display:block, which collapses the cells to content
   width (~half the screen). Force real table layout at full width so each row spans 100%, with the
   label cell greedy (left) and the value pinned to the far right. */
.overview-page .table.overview-info-table {
    display: table !important;
    width: 100% !important;
}
.overview-page .table.overview-info-table td,
.overview-page .table.overview-info-table th {
    white-space: normal;
}
.overview-page .table.overview-info-table td:first-child,
.overview-page .table.overview-info-table th:first-child {
    width: 100%;
}
.overview-page .table.overview-info-table td:last-child,
.overview-page .table.overview-info-table th:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
/* Bootstrap .table-striped paints the zebra with an inset box-shadow (not background-color), so
   it survives a transparent background. Kill it for these metric lists. */
.overview-page .table.overview-info-table > :not(caption) > * > * {
    box-shadow: none !important;
}

@media (max-width: 768px) {
    /* Flat inside the single accordion card (no nested border/radius / no zebra) — thin dividers,
       muted label + strong value, small-caps section eyebrow. Reads native, not spreadsheet. */
    .overview-page .table.overview-info-table {
        border: 0;
        border-radius: 0;
        background: transparent;
    }
    .overview-page .table.overview-info-table thead th,
    .overview-page .table.overview-info-table thead td {
        background: transparent !important;
        border: 0 !important;
        border-bottom: 1px solid var(--border-neutral-primary) !important;
        padding: 2px 2px 7px !important;
        color: var(--color-ink-600);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-size: 0.72rem;
        font-weight: 700;
    }
    .overview-page .table.overview-info-table tbody td,
    .overview-page .table.overview-info-table tbody th {
        background: transparent !important;
        border: 0 !important;
        border-bottom: 1px solid #eef1f5 !important;
        padding: 11px 2px !important;
        font-size: 0.95rem;
        vertical-align: middle;
    }
    .overview-page .table.overview-info-table tbody tr:last-child td,
    .overview-page .table.overview-info-table tbody tr:last-child th {
        border-bottom: 0 !important;
    }
    .overview-page .table.overview-info-table tbody td:first-child,
    .overview-page .table.overview-info-table tbody th:first-child {
        color: var(--color-ink-600);
        font-weight: 400;
    }
    .overview-page .table.overview-info-table tbody td:last-child,
    .overview-page .table.overview-info-table tbody th:last-child {
        color: var(--color-ink-900);
        font-weight: 600;
    }
    /* Clickable metric labels keep the brand-blue affordance, a touch bolder. */
    .overview-page .table.overview-info-table a {
        font-weight: 600;
    }
    /* Kill the padding-on-padding: the card already gives a screen-edge gutter, so the body just
       needs a slim inset, and the metric groups sit close together. */
    .overview-page .accordion-body {
        padding: 6px 14px 12px;
    }
    .overview-page .accordion-body .table-row {
        gap: 14px;
    }
    /* Full-bleed native: the accordion sections use the whole width (edge-to-edge, like the header
       and context filters above), instead of a narrow inset card. Inner padding gives the gutter. */
    .overview-page > div[style*="margin"] {
        margin: 12px 0 !important;
    }
    .overview-page .accordion-item {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 14px;
    }
    /* The action row isn't a floating card on mobile — let the buttons sit on the page. */
    .overview-page .overview360-legacy-actions {
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

/* Belt-and-suspenders for native (BOTH risk pages): when the enhancer turns a data table into
   cards-mobile, the page-scoped table rules (here + Section A's .overview360-tables/table-panel)
   out-specify the cards-mobile recipe's transparency, leaving a white box / border / radius behind
   the row-cards. Force the table container + thead + tbody transparent so the cards float on the
   page background. The tr-cards keep their own styling from the cards-mobile recipe. */
html.yaaleh-maui-app .overview-page table.cards-mobile,
html.yaaleh-maui-app .overview-page table.cards-mobile > thead,
html.yaaleh-maui-app .overview-page table.cards-mobile > tbody,
html.yaaleh-maui-app .overview360-page table.cards-mobile,
html.yaaleh-maui-app .overview360-page table.cards-mobile > thead,
html.yaaleh-maui-app .overview360-page table.cards-mobile > tbody {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Action cells inside cards-mobile (e.g. the Ranking "Abrir" button): the desktop width:1% used to
   shrink the action column collapses the cell in card layout, so a text button wraps letter by
   letter. Give the cell room and render the button as a full-width CTA at the foot of the card. */
html.yaaleh-maui-app .overview-page table.cards-mobile td:last-child,
html.yaaleh-maui-app .overview360-page table.cards-mobile td:last-child {
    width: auto !important;
}
html.yaaleh-maui-app .overview-page table.cards-mobile td .btn,
html.yaaleh-maui-app .overview360-page table.cards-mobile td .btn {
    width: 100%;
    white-space: nowrap;
}

/* Accordion sections (Informações / Vencimento / Checagem) as clean cards, flush brand header. */
.overview-page .accordion {
    margin: 0;
}
.overview-page .accordion-item {
    margin-bottom: 16px;
    border: 1px solid var(--border-neutral-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}
.overview-page .accordion-button {
    border-radius: 0 !important;
    font-weight: 600;
}
.overview-page .accordion-body {
    background: #fff;
}

/* Mobile: context filters stack; tables that sit side-by-side (.table-row) already stack
   (Section B). Keep the page edge-to-edge with one comfortable gutter. */
@media (max-width: 768px) {
    .overview-page .overview360-context {
        grid-template-columns: 1fr;
    }
    .overview-page .overview360-legacy-actions {
        justify-content: stretch;
    }
    .overview-page .overview360-legacy-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}
