/* =========================================================
   SANTANDER | VIRTUAL INVESTMENTS
   Dashboard de demonstração
========================================================= */

/* 01. CONFIGURAÇÕES GERAIS */

:root {
    --bg: #111318;
    --panel: #1b1e25;
    --panel-2: #222630;
    --panel-3: #292e39;

    --red: #ec0000;
    --red-light: #ff3838;
    --red-soft: rgba(236, 0, 0, .11);

    --green: #43c98b;
    --green-soft: rgba(67, 201, 139, .11);

    --yellow: #e8b45c;
    --yellow-soft: rgba(232, 180, 92, .11);

    --text: #f4f5f7;
    --text-2: #b4bac5;
    --muted: #858c99;

    --border: rgba(255, 255, 255, .075);
    --border-light: rgba(255, 255, 255, .12);

    --radius: 14px;
    --radius-sm: 9px;

    --shadow: 0 12px 35px rgba(0, 0, 0, .18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    overflow: hidden;
    background:
        radial-gradient(ellipse at 12% 0%,
            rgba(236, 0, 0, .07),
            transparent 32%),
        var(--bg);

    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

button {
    font: inherit;
}

button:focus-visible {
    outline: 2px solid var(--red-light);
    outline-offset: 3px;
}


/* 02. CABEÇALHO */

.topbar {
    height: 70px;
    width: 100%;
    padding: 0 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: rgba(17, 19, 24, .94);
    border-bottom: 1px solid var(--border);

    position: relative;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 17px;
}

.santander-logo {
    display: block;
    width: 112px;
    max-height: 35px;
    object-fit: contain;
    object-position: left center;
}

.header-divider {
    width: 1px;
    height: 29px;
    background: var(--border-light);
}

.brand-description {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.brand-description strong {
    color: #f5f5f6;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -.2px;
}

.brand-description small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

.demo-label {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 8px 12px;

    background: var(--red-soft);
    border: 1px solid rgba(236, 0, 0, .22);
    border-radius: 30px;

    color: #ff7777;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.case-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 8px 13px;

    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--border-light);
    border-radius: 30px;

    color: #f5f5f6;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    text-decoration: none;

    transition: all .2s ease;
}

.case-button span {
    color: #ff7777;
    font-size: 13px;
}

.case-button:hover {
    background: var(--red-soft);
    border-color: rgba(236, 0, 0, .45);
    transform: translateY(-1px);
}

.demo-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 10px rgba(236, 0, 0, .65);
}


/* 03. ESTRUTURA DO DASHBOARD */

.dashboard {
    width: 100%;
    height: calc(100dvh - 70px);
    padding: 16px 19px 19px;

    display: grid;
    grid-template-columns:
        minmax(0, .94fr) minmax(0, 1.06fr);

    gap: 15px;
    overflow: hidden;
}

.client-column {
    min-width: 0;
    min-height: 0;

    display: grid;
    grid-template-rows:
        minmax(0, .95fr) minmax(0, 1.05fr);

    gap: 15px;
    overflow: hidden;
}


/* 04. PAINÉIS */

.panel {
    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;

    padding: 19px;

    background: linear-gradient(145deg,
            #20232b,
            #1a1d24);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    flex-shrink: 0;
}

.panel-heading>div {
    min-width: 0;
}

.overline {
    display: block;
    color: #9299a6;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.05px;
    line-height: 1.4;
}

.panel-heading h2 {
    margin-top: 5px;

    color: var(--text);
    font-family: 'Manrope', sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.panel-indicator {
    flex-shrink: 0;

    padding: 6px 9px;

    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--border);
    border-radius: 20px;

    color: var(--text-2);
    font-size: 9px;
    font-weight: 600;
}


/* 05. CONTA BANCÁRIA */

.account-panel {
    gap: 0;
}

.balance-card {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;

    margin-top: 15px;
    padding: 17px 19px;

    border-radius: 11px;

    background:
        radial-gradient(circle at 100% 0%,
            rgba(255, 255, 255, .16),
            transparent 42%),
        linear-gradient(115deg,
            #b90000,
            #ed0000 68%,
            #cf0000);

    box-shadow: 0 8px 22px rgba(190, 0, 0, .16);
}

.balance-card::after {
    content: "";
    position: absolute;

    width: 150px;
    height: 150px;

    right: -48px;
    bottom: -105px;

    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;

    box-shadow:
        0 0 0 17px rgba(255, 255, 255, .035),
        0 0 0 36px rgba(255, 255, 255, .025);
}

.balance-top,
.balance-bottom {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.balance-top span:first-child {
    color: rgba(255, 255, 255, .84);
    font-size: 11px;
    font-weight: 600;
}

.balance-top span:last-child {
    color: rgba(255, 255, 255, .75);
    font-size: 17px;
}

.balance-card h2 {
    position: relative;
    z-index: 1;

    margin: 7px 0 12px;

    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(24px, 2vw, 32px);
    font-weight: 800;
    letter-spacing: -1px;
}

.balance-bottom span {
    color: rgba(255, 255, 255, .77);
    font-size: 10px;
    font-weight: 500;
}


/* 06. RESUMO DOS SALDOS */

.account-financial-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;

    margin-top: 11px;
    flex-shrink: 0;
}

.financial-detail {
    min-width: 0;
    padding: 10px 11px;

    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.financial-detail span {
    display: block;
    min-height: 25px;

    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}

.financial-detail strong {
    display: block;
    margin-top: 4px;

    color: #e9ebef;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(10px, .9vw, 13px);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.financial-detail:nth-child(2) strong {
    color: var(--yellow);
}

.financial-detail:nth-child(3) strong {
    color: var(--green);
}


/* 07. TÍTULOS DE SEÇÃO */

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-top: 15px;
    margin-bottom: 8px;

    flex-shrink: 0;
}

.section-heading h3 {
    color: #e9ebef;
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 800;
}

.muted {
    color: var(--muted);
    font-size: 9px;
}


/* 08. MOVIMENTAÇÕES */

.transaction-list {
    display: flex;
    flex-direction: column;

    min-height: 0;
    overflow: auto;
}

.transaction {
    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 43px;
    padding: 7px 2px;

    border-bottom: 1px solid var(--border);
}

.transaction:last-child {
    border-bottom: none;
}

.transaction-icon {
    width: 29px;
    height: 29px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--red-soft);
    border-radius: 8px;

    color: #ff7777;
    font-size: 13px;
    font-weight: 700;
}

.transaction-info {
    min-width: 0;
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.transaction-info strong {
    color: #e7e9ed;
    font-size: 10px;
    font-weight: 700;
}

.transaction-info small {
    color: var(--muted);
    font-size: 9px;
}

.transaction>strong {
    flex-shrink: 0;
    color: var(--text);
    font-size: 10px;
    font-weight: 700;
}

.transaction>strong.positive {
    color: var(--green);
}

.transaction>strong.negative {
    color: #ff7777;
}


/* 09. AVISO DA CONTA */

.account-notice,
.backstage-footer {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    padding: 10px 11px;
    margin-top: 10px;

    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--border);
    border-radius: 8px;

    flex-shrink: 0;
}

.account-notice>span,
.backstage-footer>span {
    flex-shrink: 0;
    color: #9ba4b2;
    font-size: 12px;
}

.account-notice p,
.backstage-footer p {
    color: #aeb5c0;
    font-size: 9px;
    line-height: 1.55;
}


/* 10. INVESTIMENTOS */

.investments-panel {
    gap: 0;
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;

    margin-top: 13px;
    padding: 13px 16px;

    background:
        linear-gradient(110deg,
            rgba(236, 0, 0, .13),
            rgba(236, 0, 0, .025));

    border: 1px solid rgba(236, 0, 0, .17);
    border-radius: 10px;
}

.portfolio-card>div>span {
    color: #c4a1a4;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}

.portfolio-card h2 {
    margin-top: 4px;

    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.7px;
}

.portfolio-card small {
    display: block;
    margin-top: 3px;

    color: var(--muted);
    font-size: 9px;
}


/* 11. PRODUTO */

.product-list {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
}

.product-card {
    padding: 13px 14px;

    background: rgba(255, 255, 255, .025);
    border: 1px solid var(--border);
    border-radius: 10px;

    transition:
        border-color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.product-card:hover {
    background: rgba(255, 255, 255, .045);
    border-color: rgba(236, 0, 0, .32);
    transform: translateY(-1px);
}

.product-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-icon {
    width: 29px;
    height: 29px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--red-soft);
    border-radius: 8px;

    color: #ff6b6b;
    font-size: 14px;
}

.risk {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 5px 8px;

    background: var(--green-soft);
    border-radius: 20px;

    color: var(--green);
    font-size: 9px;
    font-weight: 700;
}

.risk::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.product-category {
    display: block;
    margin-top: 10px;

    color: #ff7777;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}

.product-card h3 {
    margin-top: 3px;

    color: var(--text);
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 800;
}

.product-card>p {
    max-width: 500px;
    margin-top: 4px;

    color: var(--text-2);
    font-size: 10px;
    line-height: 1.5;
}


/* 12. INFORMAÇÕES DO PRODUTO */

.product-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 14px;

    margin-top: 12px;
    padding-top: 11px;

    border-top: 1px solid var(--border);
}

.product-details>div {
    min-width: 0;
}

.product-details span {
    display: block;

    color: var(--muted);
    font-size: 8px;
    line-height: 1.4;
}

.product-details strong {
    display: block;
    margin-top: 3px;

    color: #e8eaf0;
    font-size: 10px;
    font-weight: 700;
    overflow-wrap: anywhere;
}


/* 13. BOTÃO INVESTIR */

.invest-button {
    width: 100%;
    margin-top: 12px;
    padding: 10px 13px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: 1px solid var(--red);
    border-radius: 7px;

    background: var(--red);
    color: #fff;

    font-size: 10px;
    font-weight: 800;

    cursor: pointer;

    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.invest-button:hover {
    background: #ff1c1c;
    border-color: #ff1c1c;
    box-shadow: 0 5px 16px rgba(236, 0, 0, .2);
    transform: translateY(-1px);
}

.invest-button:active {
    transform: scale(.99);
}


/* 14. INVESTIMENTOS ATUAIS */

.current-investments {
    min-height: 0;
    overflow: auto;

    padding: 9px 0 0;
}

.empty-state {
    min-height: 58px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;

    padding: 9px;

    background: rgba(255, 255, 255, .025);
    border: 1px dashed var(--border-light);
    border-radius: 8px;

    text-align: center;
}

.empty-state>span {
    color: #a4aab5;
    font-size: 16px;
}

.empty-state strong {
    color: #d9dde4;
    font-size: 9px;
    font-weight: 700;
}

.empty-state small {
    color: var(--muted);
    font-size: 8px;
    line-height: 1.4;
}

.current-investment-item {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 9px;

    background: rgba(67, 201, 139, .055);
    border: 1px solid rgba(67, 201, 139, .15);
    border-radius: 8px;
}

.current-investment-icon {
    width: 29px;
    height: 29px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;
    background: var(--green-soft);
    color: var(--green);
}

.current-investment-info {
    min-width: 0;
    flex: 1;
}

.current-investment-info strong,
.current-investment-value strong {
    display: block;
    color: #e9edf0;
    font-size: 10px;
}

.current-investment-info small,
.current-investment-value small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.current-investment-value {
    text-align: right;
}

.investment-success {
    color: var(--green) !important;
}


/* 15. ACOMPANHAMENTO DA LIQUIDAÇÃO */

.settlement-panel {
    flex-shrink: 0;

    margin-top: 11px;
    padding: 11px 12px;

    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--border);
    border-radius: 9px;
}

.settlement-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settlement-indicator {
    width: 7px;
    height: 7px;
    flex-shrink: 0;

    border-radius: 50%;
    background: var(--muted);
}

.settlement-header strong {
    color: #e5e8ed;
    font-size: 10px;
    font-weight: 700;
}

.settlement-panel>p {
    margin-top: 5px;

    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
}

.settlement-progress {
    width: 100%;
    height: 4px;
    overflow: hidden;

    margin-top: 9px;

    background: rgba(255, 255, 255, .08);
    border-radius: 20px;
}

#settlementProgressBar {
    width: 0;
    height: 100%;

    background: linear-gradient(90deg, #c90000, #ff4b4b);
    border-radius: inherit;

    transition: width .4s ease;
}

.settlement-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 7px;
}

.settlement-footer span {
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
}

.settlement-footer strong {
    color: var(--text-2);
    font-size: 9px;
}


/* 16. BACKSTAGE */

.backstage-panel {
    padding: 20px;
}

.workflow-status {
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 7px 10px;

    border: 1px solid var(--border);
    border-radius: 20px;

    background: rgba(255, 255, 255, .035);
    color: var(--text-2);

    font-size: 9px;
    font-weight: 700;
}

.workflow-status>span {
    width: 6px;
    height: 6px;

    background: var(--muted);
    border-radius: 50%;
}

.workflow-status.running {
    color: var(--yellow);
    background: var(--yellow-soft);
    border-color: rgba(232, 180, 92, .2);
}

.workflow-status.running>span {
    background: var(--yellow);
}

.workflow-status.success {
    color: var(--green);
    background: var(--green-soft);
    border-color: rgba(67, 201, 139, .2);
}

.workflow-status.success>span {
    background: var(--green);
}

.workflow-status.error {
    color: #ff7474;
    background: var(--red-soft);
    border-color: rgba(236, 0, 0, .2);
}

.workflow-status.error>span {
    background: var(--red);
}


/* 17. CARTÃO DA EXECUÇÃO */

.run-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-top: 17px;
    padding: 14px 15px;

    background:
        linear-gradient(110deg,
            rgba(236, 0, 0, .09),
            rgba(255, 255, 255, .025));

    border: 1px solid rgba(236, 0, 0, .15);
    border-radius: 10px;
}

.run-card>div:first-child {
    min-width: 0;
}

.run-card h3 {
    margin-top: 5px;

    color: #f1f2f4;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 800;
}

.run-card p {
    margin-top: 4px;

    color: var(--text-2);
    font-size: 9px;
    line-height: 1.5;
}

.run-number {
    flex-shrink: 0;

    padding: 6px 8px;

    background: rgba(255, 255, 255, .055);
    border: 1px solid var(--border);
    border-radius: 6px;

    color: #aeb5c0;
    font-family: monospace;
    font-size: 10px;
}


/* 18. CABEÇALHO DO WORKFLOW */

.workflow-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 0 10px;
}

.workflow-header h3 {
    color: #e9ebef;
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 800;
}

.workflow-header small {
    display: block;
    margin-top: 4px;

    color: var(--muted);
    font-family: monospace;
    font-size: 9px;
}

.workflow-branch {
    padding: 5px 9px;

    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
    border-radius: 6px;

    color: var(--text-2);
    font-family: monospace;
    font-size: 9px;
}


/* 19. LISTA DE ETAPAS */

.workflow-list {
    position: relative;

    flex: 1;
    min-height: 0;

    display: flex;
    flex-direction: column;
    gap: 5px;

    padding: 3px 4px 10px 0;

    overflow-y: auto;
    overflow-x: hidden;
}

.workflow-empty {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 25px 15px;

    text-align: center;
}

.empty-icon {
    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 12px;

    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--border);
    border-radius: 12px;

    color: #aeb5c0;
    font-size: 22px;
}

.workflow-empty strong {
    color: #dfe2e8;
    font-size: 11px;
    font-weight: 700;
}

.workflow-empty p {
    max-width: 250px;
    margin-top: 6px;

    color: var(--muted);
    font-size: 9px;
    line-height: 1.6;
}


/* 20. CARTÃO DE CADA AÇÃO */

.workflow-action {
    position: relative;
    flex-shrink: 0;

    padding: 8px 10px;

    background: rgba(255, 255, 255, .025);
    border: 1px solid transparent;
    border-radius: 9px;

    cursor: pointer;

    transition:
        background .22s ease,
        border-color .22s ease,
        transform .22s ease,
        padding .22s ease;
}

.workflow-action:hover {
    z-index: 2;

    padding-left: 14px;

    background: rgba(255, 255, 255, .065);
    border-color: var(--border-light);

    transform: translateX(2px);
}

.workflow-action-line {
    display: flex;
    align-items: center;
    gap: 11px;
}

.workflow-action-icon {
    position: relative;
    flex-shrink: 0;

    width: 29px;
    height: 29px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--panel-3);
    border: 1px solid var(--border-light);
    border-radius: 8px;

    color: #b5bbc5;
    font-size: 12px;
    font-weight: 800;
}

.workflow-action-content {
    min-width: 0;
    flex: 1;
}

.workflow-action-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.workflow-action-heading strong {
    min-width: 0;

    color: #e8eaf0;
    font-size: 10px;
    font-weight: 700;
}

.action-status {
    flex-shrink: 0;

    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.workflow-action-content>small {
    display: block;
    margin-top: 3px;

    color: var(--muted);
    font-size: 8px;
}


/* 21. ESTADOS DAS AÇÕES */

.workflow-action.running {
    background: rgba(232, 180, 92, .055);
    border-color: rgba(232, 180, 92, .2);
}

.workflow-action.running .workflow-action-icon {
    background: var(--yellow-soft);
    border-color: rgba(232, 180, 92, .3);
    color: var(--yellow);
}

.workflow-action.running .workflow-action-heading strong {
    color: #f1d39a;
}

.workflow-action.running .action-status {
    color: var(--yellow);
}

.workflow-action.success {
    background: rgba(67, 201, 139, .035);
}

.workflow-action.success .workflow-action-icon {
    background: var(--green-soft);
    border-color: rgba(67, 201, 139, .25);
    color: var(--green);
}

.workflow-action.success .workflow-action-heading strong {
    color: #c6efdb;
}

.workflow-action.success .action-status {
    color: var(--green);
}

.workflow-action.error {
    background: rgba(236, 0, 0, .06);
    border-color: rgba(236, 0, 0, .2);
}

.workflow-action.error .workflow-action-icon {
    background: var(--red-soft);
    border-color: rgba(236, 0, 0, .25);
    color: #ff7777;
}

.workflow-action.error .action-status {
    color: #ff7777;
}


/* 22. BARRA DE PROGRESSO DAS AÇÕES */

.workflow-action-progress {
    width: 100%;
    height: 2px;

    margin-top: 7px;

    background: rgba(255, 255, 255, .07);
    border-radius: 10px;
    overflow: hidden;
}

.workflow-action-progress>div {
    width: 0;
    height: 100%;

    background: var(--green);
    border-radius: inherit;
}

.workflow-action.running .workflow-action-progress>div {
    width: 100%;
    background: var(--yellow);
    animation: progress-action 1.4s ease-in-out infinite;
}

.workflow-action.success .workflow-action-progress>div {
    width: 100%;
}

.workflow-action.error .workflow-action-progress>div {
    width: 100%;
    background: var(--red);
}

@keyframes progress-action {
    0% {
        transform: scaleX(.05);
        transform-origin: left;
    }

    100% {
        transform: scaleX(1);
        transform-origin: left;
    }
}


/* 23. SPINNER */

.action-spinner {
    display: inline-block;

    width: 11px;
    height: 11px;

    border: 2px solid rgba(232, 180, 92, .25);
    border-top-color: var(--yellow);
    border-radius: 50%;

    animation: spin .7s linear infinite;
}

.workflow-action-icon .action-spinner {
    width: 13px;
    height: 13px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* 24. DETALHES DA OPERAÇÃO */

.workflow-details {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;

    padding-top: 12px;
    border-top: 1px solid var(--border);

    flex-shrink: 0;
}

.workflow-details>.overline {
    grid-column: 1 / -1;
    margin-bottom: 2px;
}

.detail-line {
    min-width: 0;
    padding: 9px 8px;

    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--border);
    border-radius: 7px;
}

.detail-line small {
    display: block;

    color: var(--muted);
    font-size: 8px;
}

.detail-line strong {
    display: block;
    margin-top: 5px;

    color: #e8eaf0;
    font-size: 9px;
    font-weight: 700;

    overflow-wrap: anywhere;
}


/* 25. RODAPÉ DO BACKSTAGE */

.backstage-footer {
    margin-top: 10px;
}


/* 26. MODAL DE INVESTIMENTO */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(9px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.investment-modal {
    position: relative;

    width: min(100%, 440px);
    padding: 27px;

    background: linear-gradient(145deg, #252a33, #1b1e25);
    border: 1px solid var(--border-light);
    border-radius: 16px;

    box-shadow: 0 25px 80px rgba(0, 0, 0, .5);

    transform: translateY(12px) scale(.98);
    transition: transform .25s ease;
}

.modal-overlay.active .investment-modal {
    transform: translateY(0) scale(1);
}

.modal-close,
.action-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;

    width: 31px;
    height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--border);
    border-radius: 8px;

    color: var(--text-2);
    font-size: 20px;

    cursor: pointer;
    transition: .2s ease;
}

.modal-close:hover,
.action-modal-close:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.investment-modal h2 {
    margin-top: 10px;

    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 21px;
    font-weight: 800;
}

.investment-modal>p {
    margin-top: 6px;

    color: var(--text-2);
    font-size: 11px;
    line-height: 1.6;
}


/* 27. VALOR DO MODAL */

.fixed-investment {
    display: flex;
    flex-direction: column;
    gap: 5px;

    margin-top: 19px;
    padding: 17px;

    background: var(--red-soft);
    border: 1px solid rgba(236, 0, 0, .19);
    border-radius: 10px;
}

.fixed-investment small {
    color: #d69b9b;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .8px;
}

.fixed-investment strong {
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 27px;
    font-weight: 800;
}

.fixed-investment span {
    color: #c4a9aa;
    font-size: 9px;
}


/* 28. SALDO DO MODAL */

.available-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 13px 0;

    border-bottom: 1px solid var(--border);
}

.available-balance span {
    color: var(--text-2);
    font-size: 10px;
}

.available-balance strong {
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
}


/* 29. AVISO E ERRO DO MODAL */

.modal-warning {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    margin-top: 14px;
    padding: 11px;

    background: rgba(232, 180, 92, .07);
    border: 1px solid rgba(232, 180, 92, .15);
    border-radius: 8px;
}

.modal-warning>span {
    color: var(--yellow);
    font-size: 12px;
}

.modal-warning p {
    color: #c4b99f;
    font-size: 9px;
    line-height: 1.6;
}

.modal-error {
    margin-top: 9px;

    color: #ff7777;
    font-size: 10px;
    line-height: 1.5;
}


/* 30. BOTÕES DO MODAL */

.confirm-button,
.cancel-button {
    width: 100%;
    padding: 12px;

    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;

    cursor: pointer;
    transition: .2s ease;
}

.confirm-button {
    margin-top: 17px;

    background: var(--red);
    border: 1px solid var(--red);
    color: #fff;
}

.confirm-button:hover {
    background: #ff2020;
    box-shadow: 0 6px 18px rgba(236, 0, 0, .2);
}

.cancel-button {
    margin-top: 7px;

    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-2);
}

.cancel-button:hover {
    background: rgba(255, 255, 255, .05);
    color: #fff;
}


/* 31. MODAL DAS AÇÕES */

.action-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, .76);
    backdrop-filter: blur(10px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.action-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.action-modal {
    position: relative;

    width: min(100%, 490px);
    padding: 27px;

    background: linear-gradient(145deg, #252a33, #1b1e25);
    border: 1px solid var(--border-light);
    border-radius: 16px;

    box-shadow: 0 25px 90px rgba(0, 0, 0, .5);

    transform: translateY(12px) scale(.98);
    transition: transform .25s ease;
}

.action-overlay.active .action-modal {
    transform: translateY(0) scale(1);
}

.action-modal-tag {
    display: inline-flex;
    padding: 6px 9px;

    background: var(--red-soft);
    border: 1px solid rgba(236, 0, 0, .16);
    border-radius: 20px;

    color: #ff8585;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .8px;
}

.action-modal-icon {
    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 18px;

    background: var(--red-soft);
    border: 1px solid rgba(236, 0, 0, .15);
    border-radius: 11px;

    color: #ff7777;
    font-size: 19px;
}

.action-modal h2 {
    margin-top: 15px;

    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.4px;
}

.action-modal-component {
    margin-top: 6px;

    color: #ff8585;
    font-size: 10px;
    font-weight: 700;
}

.action-modal-divider {
    height: 1px;
    margin: 17px 0;

    background: var(--border);
}

.action-modal h3 {
    color: #e8eaf0;
    font-size: 11px;
    font-weight: 800;
}

.action-modal-description {
    margin-top: 9px;

    color: #b9c0cb;
    font-size: 11px;
    line-height: 1.8;
}


/* 32. RESULTADO DA AÇÃO */

.action-modal-result {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-top: 19px;
    padding: 13px;

    background: var(--green-soft);
    border: 1px solid rgba(67, 201, 139, .17);
    border-radius: 9px;
}

.action-modal-result>span {
    width: 22px;
    height: 22px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(67, 201, 139, .15);
    border-radius: 50%;

    color: var(--green);
    font-size: 11px;
}

.action-modal-result strong {
    display: block;
    color: #c9efdc;
    font-size: 10px;
}

.action-modal-result small {
    display: block;
    margin-top: 5px;

    color: #a9c9b8;
    font-size: 9px;
    line-height: 1.6;
}


/* 33. NOTIFICAÇÕES */

.toast {
    position: fixed;
    right: 23px;
    bottom: 22px;
    z-index: 300;

    max-width: 360px;
    padding: 13px 17px;

    background: #252a33;
    border: 1px solid var(--border-light);
    border-left: 3px solid var(--green);
    border-radius: 9px;

    color: #f1f2f5;
    font-size: 11px;
    line-height: 1.5;

    box-shadow: 0 12px 35px rgba(0, 0, 0, .35);

    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);

    transition: .25s ease;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.toast.error {
    border-left-color: var(--red);
}


/* 34. BARRA DE ROLAGEM */

* {
    scrollbar-width: thin;
    scrollbar-color: #414752 transparent;
}

*::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: #414752;
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #626a78;
}


/* 35. TELAS MENORES */

@media (max-width: 1100px) {
    .topbar {
        padding: 0 18px;
    }

    .dashboard {
        padding: 12px;
        gap: 10px;
    }

    .client-column {
        gap: 10px;
    }

    .panel {
        padding: 14px;
    }

    .backstage-panel {
        padding: 15px;
    }

    .workflow-details {
        gap: 4px;
    }

    .detail-line {
        padding: 7px 5px;
    }

    .detail-line small {
        font-size: 7px;
    }

    .detail-line strong {
        font-size: 8px;
    }
}

@media (max-width: 800px) {

    html,
    body {
        height: auto;
        min-height: 100%;
        overflow: auto;
    }

    .topbar {
        height: 64px;
        padding: 0 15px;
    }

    .santander-logo {
        width: 95px;
    }

    .dashboard {
        height: auto;
        min-height: calc(100dvh - 64px);

        grid-template-columns: 1fr;
        overflow: visible;
    }

    .client-column {
        grid-template-rows: auto auto;
        overflow: visible;
    }

    .panel {
        min-height: 0;
        overflow: visible;
    }

    .account-panel {
        min-height: 390px;
    }

    .investments-panel {
        min-height: 500px;
    }

    .backstage-panel {
        min-height: 680px;
    }

    .workflow-list {
        min-height: 350px;
        overflow: visible;
    }

    .workflow-details {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {

    .header-divider,
    .brand-description small {
        display: none;
    }

    .brand {
        gap: 10px;
    }

    .santander-logo {
        width: 88px;
    }

    .demo-label {
        padding: 7px 9px;
        font-size: 8px;
    }

    .panel-heading h2 {
        font-size: 15px;
    }

    .account-financial-details {
        gap: 5px;
    }

    .financial-detail {
        padding: 8px 6px;
    }

    .financial-detail strong {
        font-size: 9px;
    }

    .workflow-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .investment-modal,
    .action-modal {
        padding: 22px;
    }

    .toast {
        left: 15px;
        right: 15px;
        bottom: 15px;
        max-width: none;
    }
}


/* =========================================
   ÁREA DE INVESTIMENTOS — AJUSTE DE LAYOUT
========================================= */

.investments-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

/* Cabeçalho */
.investments-panel .panel-heading {
    flex-shrink: 0;
    margin-bottom: 0;
}

/* Resumo da carteira */
.portfolio-card {
    flex-shrink: 0;
    min-width: 0;
    margin: 0;
}

/* Títulos das seções */
.investments-panel .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
    margin: 2px 0 0;
}

/* Lista de produtos disponíveis */
.product-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    flex-shrink: 0;
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 15px;
    height: auto;
    overflow: visible;
}

/* Cabeçalho do produto */
.product-top {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.product-icon {
    flex-shrink: 0;
}

.product-category {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Nome e descrição do investimento */
.product-card h3 {
    margin: 0;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.product-card p {
    margin: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Informações do produto */
.product-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    min-width: 0;
}

.product-details>* {
    min-width: 0;
}

/* Botão */
.product-card .invest-button {
    width: 100%;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Investimentos atuais */
.current-investments {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    min-height: 0;
}

.current-investments .empty-state {
    padding: 14px;
    text-align: center;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Painel de liquidação */
.settlement-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    height: auto;
    flex-shrink: 0;
    overflow: hidden;
}

.settlement-header,
.settlement-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

#settlementStatus,
#settlementDescription,
#settlementDay,
#settlementDate {
    overflow-wrap: anywhere;
}

.settlement-progress {
    width: 100%;
    min-width: 0;
}

/* Evita que textos e elementos se sobreponham */
.investments-panel *,
.investments-panel *::before,
.investments-panel *::after {
    box-sizing: border-box;
}

.investments-panel h2,
.investments-panel h3,
.investments-panel p {
    max-width: 100%;
}

/* Telas menores */
@media (max-width: 900px) {
    .investments-panel {
        overflow: visible;
    }

    .product-card {
        padding: 14px;
    }

    .product-details {
        gap: 10px;
    }
}


/* Rolagem independente do card de investimentos */
.investments-panel {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #555 transparent;
    padding-right: 10px;
}

/* Barra de rolagem no Chrome, Edge e Safari */
.investments-panel::-webkit-scrollbar {
    width: 5px;
}

.investments-panel::-webkit-scrollbar-track {
    background: transparent;
}

.investments-panel::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}

.investments-panel::-webkit-scrollbar-thumb:hover {
    background: #888;
}


/* =====================================================
   AJUSTES: LIQUIDAÇÃO MANUAL D+5 E VALOR PERSONALIZÁVEL
===================================================== */

.workflow-header {
    margin-top: 2px;
}

.settlement-panel {
    margin: 2px 0 12px;
    padding: 13px 14px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.settlement-panel.is-waiting {
    background: rgba(245, 145, 45, .11);
    border-color: rgba(245, 145, 45, .58);
    box-shadow: inset 3px 0 0 #f29a3f;
}

.settlement-panel.is-waiting .settlement-indicator {
    background: #f29a3f;
    box-shadow: 0 0 0 4px rgba(242, 154, 63, .14);
}

.settlement-panel.is-waiting .settlement-header strong,
.settlement-panel.is-waiting .settlement-day-label {
    color: #ffbd78;
}

.settlement-panel.is-waiting #settlementProgressBar {
    background: linear-gradient(90deg, #e78327, #ffbd70);
}

.settlement-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.settlement-dates>div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.settlement-dates small {
    color: var(--muted);
    font-size: 8px;
}

.settlement-dates strong {
    color: var(--text);
    font-size: 10px;
    font-family: monospace;
}

.settlement-days {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    margin-top: 10px;
}

.settlement-day-chip {
    padding: 6px 2px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: monospace;
    font-size: 9px;
}

.settlement-day-chip.completed {
    color: #9bd6b1;
    border-color: rgba(76, 175, 125, .35);
    background: rgba(76, 175, 125, .09);
}

.settlement-day-chip.current {
    color: #fff;
    border-color: #f29a3f;
    background: #d97820;
}

.settlement-panel:not(.is-waiting) .settlement-day-chip.current {
    color: var(--text);
    border-color: var(--border);
    background: rgba(255, 255, 255, .08);
}

.advance-day-button {
    width: 100%;
    margin-top: 10px;
    padding: 9px 12px;
    color: #fff;
    background: #d97820;
    border: 1px solid #ed9847;
    border-radius: 7px;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.advance-day-button:hover:not(:disabled) {
    background: #ed8b2d;
}

.advance-day-button:disabled {
    color: var(--muted);
    background: rgba(255, 255, 255, .04);
    border-color: var(--border);
    cursor: not-allowed;
    opacity: .65;
}

.investment-input-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 8px 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.investment-input-wrap span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.investment-input-wrap input {
    width: 100%;
    min-width: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
}

.fixed-investment label {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
}

@media (max-width: 560px) {
    .settlement-dates {
        grid-template-columns: 1fr;
    }
}

/* Barra de liquidação concluída */
#settlementProgressBar.completed {
    background: linear-gradient(90deg, #269b63, #55d694);
}


/* Status de aplicações ainda em processamento */
.investment-pending {
    color: #e7b65c !important;
}

.current-investment-info small {
    line-height: 1.45;
}



/* =========================================
   FUNDO XPTO - CARD EXPANSÍVEL
========================================= */

.product-card-collapsible {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 14px;
    min-width: 0;
    height: auto;
    overflow: visible;
    cursor: default;

    transition:
        border-color .25s ease,
        background .25s ease,
        padding .25s ease;
}

/* Área compacta */

.product-compact {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.product-compact-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.product-compact-info .product-category {
    margin-top: 0;
    margin-bottom: 3px;
}

.product-compact-info h3 {
    margin: 0;
    font-size: 14px;
}

.product-expand-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;

    color: var(--muted);
    font-size: 9px;
}

.product-expand-hint span {
    font-size: 15px;
    transition: transform .25s ease;
}

/* Conteúdo escondido inicialmente */

.product-expand-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;

    transition:
        max-height .35s ease,
        opacity .25s ease,
        margin .35s ease;
}

/* Expansão ao passar o mouse ou usar teclado */

.product-card-collapsible:hover
.product-expand-content,
.product-card-collapsible:focus
.product-expand-content,
.product-card-collapsible:focus-within
.product-expand-content {
    max-height: 600px;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
    margin-top: 12px;
}

.product-card-collapsible:hover,
.product-card-collapsible:focus,
.product-card-collapsible:focus-within {
    border-color: rgba(236, 0, 0, .4);
    background: rgba(255, 255, 255, .045);
}

.product-card-collapsible:hover
.product-expand-hint span,
.product-card-collapsible:focus
.product-expand-hint span,
.product-card-collapsible:focus-within
.product-expand-hint span {
    transform: rotate(180deg);
}

/* Descrição */

.product-expand-content > p {
    margin: 0;
    color: var(--text-2);
    font-size: 10px;
    line-height: 1.5;
}

/* Informações */

.product-card-collapsible .product-details {
    margin-top: 12px;
}

/* Botão */

.product-card-collapsible .invest-button {
    margin-top: 12px;
}

/* Acessibilidade */

@media (prefers-reduced-motion: reduce) {
    .product-card-collapsible,
    .product-expand-content,
    .product-expand-hint span {
        transition: none;
    }
}
