/*
 * Cards das modais de sangria, suprimento e fechamento do caixa (templates/pdv/cashier/_movement_card.html.twig),
 * no mesmo visual dos cards da entrada de notas e da atualização de estoque (card-erp).
 * Tudo sob .cashier-movement para não afetar outras telas.
 */
.cashier-movement .card-erp {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.875rem !important;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03), 0 1px 2px -1px rgba(15, 23, 42, 0.02) !important;
    background-color: #ffffff;
    overflow: hidden;
}

.cashier-movement .card-erp > .card-header {
    border-radius: 0;
}

.cashier-movement .material-symbols-outlined.md-20 {
    font-size: 20px;
}

.cashier-movement .card-erp__title {
    letter-spacing: .05em;
}

/* Resumo do caixa (pdv/cashier/modules/cashier-informations.html.twig) mais compacto só nestas modais. */
.cashier-movement__info > .px-3 {
    padding: 0 !important;
}

.cashier-movement__info h6 {
    margin-bottom: .375rem;
    font-size: .75rem;
    line-height: 1.4;
}

.cashier-movement__info h6:last-child {
    margin-bottom: 0;
}

.cashier-movement__info hr {
    margin: .5rem 0;
}

.cashier-movement__info h6 > i.me-2 {
    margin-right: .375rem !important;
}

/* Formas de pagamento do resumo no fechamento */
.cashier-movement__info li {
    margin-bottom: .25rem !important;
}

/*
 * Consulta do caixa (templates/pdv/cashier/view.html.twig): cabeçalho e abas no visual da entrada de notas
 * (styles/purchases/input/input.css), restritos a .cashier-view.
 */
.cashier-view .material-symbols-outlined.md-18 {
    font-size: 18px;
}

.cashier-view .material-symbols-outlined.md-24 {
    font-size: 24px;
}

/* Ícones com fundo suave na cor do próprio ícone (text-success, text-danger...), como nos cards de indicadores. */
.cashier-view .card-erp__icon,
.cashier-view .cashier-view__row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: color-mix(in srgb, currentColor 12%, transparent);
}

.cashier-view .card-erp__icon {
    width: 2rem;
    height: 2rem;
    border-radius: .6rem;
}

.cashier-view .cashier-view__row-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: .5rem;
    font-size: .8rem;
}

.cashier-view .cashier-view__row {
    padding: .45rem 0;
}

.cashier-view .cashier-view__row + .cashier-view__row {
    border-top: 1px dashed #e2e8f0;
}

.cashier-view .cashier-view__row--total {
    border-top: 1px solid #cbd5e1 !important;
    margin-top: .25rem;
    padding-top: .65rem;
}

/* Contador das abas */
.cashier-view .cashier-view__count {
    min-width: 1.5rem;
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.4;
    background: color-mix(in srgb, currentColor 14%, transparent);
}

/* Tabelas das abas: só linhas horizontais e cabeçalho discreto */
.cashier-view .tab-content .table {
    margin-bottom: 0;
}

.cashier-view .tab-content .table-bordered > :not(caption) > * > * {
    border-width: 0 0 1px;
}

.cashier-view .tab-content .table thead th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}

/*
 * Vendas por forma de pagamento: lista com barra de proporção, no mesmo formato das rejeições da SEFAZ do painel
 * do Aladim (hd-list/hd-meter). A cor vem de --meter-color, definida em cada item.
 */
.cashier-view .cashier-view__meter-list {
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
}

.cashier-view .cashier-view__meter-item {
    padding: .75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.cashier-view .cashier-view__meter-item:first-child {
    padding-top: 0;
}

.cashier-view .cashier-view__meter-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.cashier-view .cashier-view__meter {
    height: 6px;
    margin-top: .5rem;
    border-radius: 999px;
    background-color: color-mix(in srgb, var(--meter-color) 14%, transparent);
}

.cashier-view .cashier-view__meter-fill {
    height: 100%;
    border-radius: 999px;
    background-color: var(--meter-color);
}

/* Cabeçalho da consulta do caixa */
.cashier-view .cashier-view__header-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: .75rem;
    background: color-mix(in srgb, currentColor 12%, transparent);
}

.cashier-view .cashier-view__status {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: color-mix(in srgb, currentColor 12%, transparent);
}

.cashier-view .cashier-view__status-dot {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background-color: currentColor;
}

.cashier-view .cashier-view__chip {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .35rem .75rem;
    border: 1px solid #e2e8f0;
    border-radius: .5rem;
    background-color: #f8fafc;
    font-size: .8rem;
}

.cashier-view .cashier-view__chip .material-symbols-outlined {
    color: #64748b;
}

.cashier-view .cashier-view__header-total {
    flex-shrink: 0;
    min-width: 12rem;
    padding-top: .75rem;
    border-top: 1px solid #e2e8f0;
}

/* Lado a lado com a identificação: a linha fina passa a ser vertical. */
@media (min-width: 992px) {
    .cashier-view .cashier-view__header-total {
        padding: 0 0 0 1.5rem;
        border-top: 0;
        border-left: 1px solid #e2e8f0;
    }
}

.cashier-view .cashier-view__header-total-label {
    color: #64748b;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cashier-view .cashier-view__header-total-value {
    color: #0f172a;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.cashier-view .cashier-view__header-total-hint {
    color: #94a3b8;
    font-size: .75rem;
}

/* Valor em destaque dos cards (suprimento inicial, saldo total), no tom da cor do texto */
.cashier-view .cashier-view__highlight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    border-radius: .75rem;
    background: color-mix(in srgb, currentColor 8%, transparent);
    border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.cashier-view .cashier-view__highlight-label {
    color: #475569;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cashier-view .cashier-view__highlight-value {
    font-size: 1.25rem;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Quantidade de lançamentos ao lado do rótulo */
.cashier-view .cashier-view__row-hint {
    padding: 0 .45rem;
    border-radius: 999px;
    background-color: #f1f5f9;
    color: #64748b;
    font-size: .72rem;
    font-weight: 600;
}

.cashier-view .cashier-view__note {
    margin-left: 2.25rem;
    padding: .5rem .75rem;
    border-radius: .5rem;
    background-color: #f8fafc;
    color: #334155;
    font-size: .85rem;
}

/* Botões de ação no cabeçalho dos cards */
.cashier-view .cashier-view__action {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: .5rem;
    color: #475569;
    background-color: #ffffff;
    transition: all .15s ease-in-out;
}

.cashier-view .cashier-view__action:hover {
    color: #2563eb;
    border-color: #bfdbfe;
    background-color: #eff6ff;
}

.cashier-view .cashier-view__action.text-danger:hover {
    color: #dc2626 !important;
    border-color: #fecaca;
    background-color: #fef2f2;
}

/* Subtítulo dentro de um card (ex.: ajuste do fechamento) */
.cashier-view .cashier-view__subtitle {
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Conciliação: percentual conciliado e barra conciliado (verde) x não conciliado (vermelho) */
.cashier-view .cashier-view__highlight--stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
    height: 100%;
}

.cashier-view .cashier-view__highlight--stacked .cashier-view__highlight-value {
    font-size: 1.1rem;
}

.cashier-view .cashier-view__conciliation-percent {
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.cashier-view .cashier-view__conciliation-bar {
    height: 8px;
    border-radius: 999px;
    background-color: color-mix(in srgb, var(--bs-danger) 30%, transparent);
    overflow: hidden;
}

.cashier-view .cashier-view__conciliation-bar-fill {
    height: 100%;
    border-radius: 999px;
    background-color: var(--bs-success);
}

.cashier-view .cashier-view__share-cell {
    min-width: 140px;
}

.cashier-view .cashier-view__brand-group {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    background-color: #ffffff;
}

.cashier-view .cashier-view__methods {
    margin: 0 0 .5rem 2.25rem;
    padding: .25rem 0 0;
    list-style: none;
    font-size: .8rem;
}

.cashier-view .cashier-view__methods li + li {
    margin-top: .15rem;
}

/* Formas de pagamento em duas colunas a partir do tablet. */
@media (min-width: 768px) {
    .cashier-view .cashier-view__meter-list--grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.5rem;
    }

    .cashier-view .cashier-view__meter-list--grid .cashier-view__meter-item:nth-child(-n + 2) {
        padding-top: 0;
    }

    .cashier-view .cashier-view__meter-list--grid .cashier-view__meter-item:nth-last-child(-n + 2) {
        padding-bottom: 0;
        border-bottom: 0;
    }
}

.cashier-view .cashier-view__meter-icon {
    width: 1rem;
    color: var(--meter-color);
    text-align: center;
}

.cashier-view .cashier-view__row--muted {
    opacity: .5;
}

/* Barra de composição das entradas no resumo do caixa */
.cashier-view .cashier-view__composition {
    display: flex;
    gap: 2px;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.cashier-view .cashier-view__composition-part {
    height: 100%;
}

.cashier-view .cashier-view__conciliation-bar--sm {
    height: 5px;
}

/* Cabeçalho: iniciais do operador e indicador de caixa em aberto */
.cashier-view .cashier-view__avatar {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--bs-primary) 14%, transparent);
    color: var(--bs-primary);
    font-size: .65rem;
    font-weight: 700;
}

.cashier-view .cashier-view__status-dot--live {
    animation: cashier-view-pulse 1.6s ease-in-out infinite;
}

@keyframes cashier-view-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent);
    }

    50% {
        box-shadow: 0 0 0 .3rem transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cashier-view .cashier-view__status-dot--live {
        animation: none;
    }
}

.cashier-view .cashier-view__chip-ellipsis {
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cashier-view .cashier-view__note--danger {
    background-color: color-mix(in srgb, var(--bs-danger) 10%, transparent);
    color: var(--bs-danger);
}

.cashier-view .cashier-view__brand-logo {
    width: 2.25rem;
    height: 1.5rem;
    flex-shrink: 0;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: .3rem;
    background-color: #ffffff;
}

/*
    Abas presas ao card da tabela: a barra é o topo do card, a aba ativa fica branca e se funde com o
    conteúdo logo abaixo (sem linha entre elas), e o primeiro card de cada aba perde a borda de cima.
*/
.cashier-view .cashier-view__tabs {
    margin-bottom: 0;
    padding: .375rem .375rem 0;
    gap: 2px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .875rem .875rem 0 0;
}

.cashier-view .cashier-view__tabs .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: .875rem;
    font-weight: 500;
    transition: color .15s ease-in-out, background-color .15s ease-in-out;
    margin-bottom: -1px;
    padding: .6rem 1rem;
    white-space: nowrap;
    color: #64748b;
    background-color: transparent;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: .6rem .6rem 0 0;
    box-shadow: none;
}

.cashier-view .cashier-view__tabs .nav-link:hover {
    color: #2563eb;
    background-color: #f1f5f9;
}

.cashier-view .cashier-view__tabs .nav-link.active {
    color: #2563eb;
    font-weight: 600;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    /* A base branca cobre a linha da barra, ligando a aba ao conteúdo. */
    border-bottom: 1px solid #ffffff;
    box-shadow: inset 0 2px 0 #2563eb;
}

.cashier-view .tab-content > .tab-pane > .card-erp:first-child {
    border-top: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* Em telas menores as seis abas rolam na horizontal em vez de quebrar em várias linhas. */
@media (max-width: 991.98px) {
    .cashier-view .cashier-view__tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .cashier-view .cashier-view__tabs .nav-item {
        flex: 0 0 auto;
    }
}

/* Conciliação em duas colunas (caixa aberto): separador entre o resumo e as formas de pagamento */
@media (min-width: 992px) {
    .cashier-view .cashier-view__conciliation-types {
        border-left: 1px solid #f1f5f9;
    }
}

/* Resumo: cabeçalho de cada bloco (entradas, saídas) com o subtotal */
.cashier-view .cashier-view__section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .35rem;
    border-bottom: 1px solid #e2e8f0;
}

.cashier-view .cashier-view__section-label {
    color: #64748b;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Abertura: linha do tempo do caixa, na horizontal (rola se faltar espaço) */
.cashier-view .cashier-view__timeline {
    display: flex;
    margin: 0;
    padding: 0 0 .25rem;
    list-style: none;
    overflow-x: auto;
}

.cashier-view .cashier-view__timeline-item {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    min-width: 5.5rem;
    padding: 0 .25rem;
    text-align: center;
    line-height: 1.3;
}

/* Traço do centro deste ícone ao centro do próximo, por trás dos ícones */
.cashier-view .cashier-view__timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: calc(.875rem - 1px);
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: #e2e8f0;
}

.cashier-view .cashier-view__timeline-icon {
    position: relative;
    z-index: 1;
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin-bottom: .35rem;
    border-radius: 50%;
    /* Fundo opaco para o traço passar por trás do ícone. */
    background: color-mix(in srgb, currentColor 12%, #ffffff);
}

.cashier-view .cashier-view__timeline-label {
    color: #0f172a;
    font-size: .8rem;
    font-weight: 600;
}

.cashier-view .cashier-view__timeline-item--pending .cashier-view__timeline-icon {
    border: 1px dashed currentColor;
    background: #ffffff;
}

/* Fechamento: ajuste da retirada (anterior → atual) */
.cashier-view .cashier-view__adjustment {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    padding: .65rem .75rem;
    border-radius: .6rem;
    background-color: #f8fafc;
}

/* Rodapé com muitos totais (conciliação): fonte e espaçamento menores para caber numa linha */
.cashier-view .cashier-view__footer--compact {
    gap: .35rem 1rem !important;
    font-size: .78rem;
}
