/* ── Dialog geral ── */
.detailDialog > .sapMDialogScroll {
    padding: 0 !important;
}

/* ── Hero ── */
.detail-hero {
    background: linear-gradient(160deg, #1a237e 0%, #1565c0 100%);
    padding: 2rem 1.5rem 1.5rem;
    gap: 0.6rem;
}

.detail-avatar {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important;
    border: 3px solid rgba(255,255,255,0.3) !important;
}

.detail-hero-title {
    color: #ffffff !important;
    font-size: 1.4rem !important;
}

.detail-hero-desc {
    color: rgba(255,255,255,0.82) !important;
    max-width: 28rem;
    font-size: 0.9rem !important;
}

.detail-hero-status {
    margin-top: 0.3rem;
}

/* ── Formulário ── */
.detail-form {
    padding: 1rem 1.5rem 0.5rem !important;
}

.detail-form-nowrap-label .sapMLabel {
    white-space: nowrap;
}

/* Aumenta peso do texto de valor */
.detail-form .sapMObjectNumberText {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    color: #1a237e !important;
}

/* Títulos de seção dentro do form */
.detail-form .sapUiFormTitle {
    border-bottom: 2px solid #e8eaed !important;
    padding-bottom: 0.3rem !important;
    margin-top: 1rem !important;
    color: #1565c0 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
}

/* Ícone de código de barras */
.detail-barcode-icon {
    color: #6e7983;
    font-size: 1rem;
}

/* ── Seção de fotos ── */
.detail-photos-section {
    padding: 1rem 0 0.5rem;
}

.detail-section-title {
    color: #1565c0 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 2px solid #e8eaed !important;
    margin: 0 1.5rem 0.5rem !important;
}

.detail-carousel {
    border-radius: 0;
    background: #f5f5f5;
}

.detail-photo {
    object-fit: contain;
    border-radius: 4px;
}

/* Avatar cor Accent5 (categorias) — sobrescreve apenas o background */
.sapMAvatarBackgroundColorAccent5 {
    background-color: #0070f2 !important;
}

/* Ícone de departamento */
.detail-field-icon {
    color: #6e7983;
    font-size: 1rem;
}

/* ================================================================
   VENDA DETAIL — DynamicPage inside Dialog
   Cores da marca: Indigo #3E4095 | Amber #F2A80F
   ================================================================ */

/* Remove scroll padding so the DynamicPage fills the dialog */
.vendaDetailDialog .sapMDialogScrollCont {
    padding: 0 !important;
    height: 100% !important;
}

/* DynamicPage fills the dialog shell */
.vendaDetailDynPage {
    height: 100% !important;
}

/* Header gradient igual ao padrão vooze */
.vendaDetailHeader {
    background: linear-gradient(120deg, rgba(62, 64, 149, 0.07) 0%, rgba(242, 168, 15, 0.09) 100%) !important;
    border-bottom: 1px solid rgba(62, 64, 149, 0.1) !important;
}

/* Ícone grande no heading do título */
.vendaDetailHeadingIcon {
    font-size: 1.75rem;
    color: #3E4095;
}

/* Subtítulo com nome do cliente abaixo do título no heading expandido */
.vendaDetailSubTitle.sapMText {
    color: rgba(62, 64, 149, 0.75) !important;
    font-size: 0.85rem !important;
}

/* ---- KPI Cards no header ---- */
.vendaKpiRow {
    gap: 0.75rem;
    padding: 0.5rem 0.75rem 0.75rem;
}

.vendaKpiCard {
    padding: 0.75rem 1.125rem;
    border-radius: 14px;
    min-width: 8.5rem;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: default;
}
.vendaKpiCard:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.11);
}

/* Variante: Indigo — Cliente */
.vendaKpiIndigo {
    background: linear-gradient(145deg, #e8eaf6 0%, #c5cae9 100%);
    border-color: rgba(62, 64, 149, 0.25);
}
.vendaKpiIndigo .vendaKpiIcon,
.vendaKpiIndigo .vendaKpiLabel {
    color: #3E4095 !important;
}

/* Variante: Azul — Data */
.vendaKpiBlue {
    background: linear-gradient(145deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: rgba(30, 136, 229, 0.25);
}
.vendaKpiBlue .vendaKpiIcon,
.vendaKpiBlue .vendaKpiLabel {
    color: #1565c0 !important;
}

/* Variante: Verde — Valor Total */
.vendaKpiGreen {
    background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: rgba(46, 125, 50, 0.25);
}
.vendaKpiGreen .vendaKpiIcon,
.vendaKpiGreen .vendaKpiLabel {
    color: #2e7d32 !important;
}

/* Variante: Amber — Pagamento */
.vendaKpiAmber {
    background: linear-gradient(145deg, #fff8e1 0%, #ffecb3 100%);
    border-color: rgba(242, 168, 15, 0.4);
}
.vendaKpiAmber .vendaKpiIcon,
.vendaKpiAmber .vendaKpiLabel {
    color: #b8860b !important;
}

/* Variante: Neutro — Qtde. Itens */
.vendaKpiNeutral {
    background: linear-gradient(145deg, #fafafa 0%, #eeeeee 100%);
    border-color: rgba(0, 0, 0, 0.1);
}
.vendaKpiNeutral .vendaKpiIcon,
.vendaKpiNeutral .vendaKpiLabel {
    color: #6b7280 !important;
}

.vendaKpiTop {
    margin-bottom: 0.3rem;
}
.vendaKpiIcon {
    font-size: 0.95rem;
}
.vendaKpiLabel.sapMText {
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #6b7280 !important;
}
.vendaKpiValue .sapMTitleText {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
}
.vendaKpiValueGreen .sapMTitleText {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #2e7d32 !important;
}

/* ---- Content: tabela de itens ---- */
.vendaDetailContent {
    width: 100%;
    padding-bottom: 1rem;
}

.vendaListIcon {
    font-size: 1.1rem;
    color: #3E4095;
}

.vendaItensTable .sapMListTblRow:hover > td {
    background-color: rgba(62, 64, 149, 0.03) !important;
}
.vendaItemNome.sapMText {
    font-weight: 600 !important;
    color: #1a1a2e !important;
}

/* ---- Resumo financeiro ---- */
.vendaResumoCard {
    background: #ffffff;
    border: 1px solid rgba(62, 64, 149, 0.16);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(62, 64, 149, 0.08);
    padding: 1rem 1.375rem;
    min-width: 17rem;
}
.vendaResumoLabel.sapMText {
    font-size: 0.85rem !important;
    color: #7d8699 !important;
}
.vendaResumoValor.sapMText {
    font-weight: 600 !important;
    color: #1a1a2e !important;
}
.vendaResumoTotal {
    border-top: 1px solid rgba(62, 64, 149, 0.12);
    padding-top: 0.625rem;
    margin-top: 0.375rem;
}

/* ================================================================
   ESTOQUE DETAIL — DynamicPage inside Dialog
   Cores: Emerald #1b5e20 | Teal #00695c | Amber #f57f17
   ================================================================ */

.estoqueDetailDialog .sapMDialogScrollCont {
    padding: 0 !important;
    height: 100% !important;
}

.estoqueDetailDynPage {
    height: 100% !important;
}

/* Header gradient verde suave */
.estoqueDetailHeader {
    background: linear-gradient(120deg, rgba(27, 94, 32, 0.06) 0%, rgba(0, 105, 92, 0.09) 100%) !important;
    border-bottom: 1px solid rgba(27, 94, 32, 0.12) !important;
}

/* Ícone grande no título */
.estoqueDetailHeadingIcon {
    font-size: 1.75rem;
    color: #2e7d32;
}

/* Subtítulo expandido */
.estoqueDetailSubTitle.sapMText {
    color: rgba(46, 125, 50, 0.75) !important;
    font-size: 0.85rem !important;
}

.estoqueSubIcon {
    color: #78909c;
    font-size: 0.85rem;
}

.estoqueExpandedSub.sapMText {
    color: #78909c !important;
    font-size: 0.85rem !important;
}

/* ---- KPI Cards ---- */
.estoqueKpiRow {
    gap: 0.75rem;
    padding: 0.5rem 0.75rem 0.75rem;
}

.estoqueKpiCard {
    padding: 0.75rem 1.125rem;
    border-radius: 14px;
    min-width: 8.5rem;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: default;
}
.estoqueKpiCard:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.11);
}

/* Verde — Disponível */
.estoqueKpiGreen {
    background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: rgba(46, 125, 50, 0.25);
}
.estoqueKpiGreen .estoqueKpiIcon,
.estoqueKpiGreen .estoqueKpiLabel { color: #2e7d32 !important; }

/* Azul — Entradas */
.estoqueKpiBlue {
    background: linear-gradient(145deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: rgba(30, 136, 229, 0.25);
}
.estoqueKpiBlue .estoqueKpiIcon,
.estoqueKpiBlue .estoqueKpiLabel { color: #1565c0 !important; }

/* Amber — Saídas */
.estoqueKpiAmber {
    background: linear-gradient(145deg, #fff8e1 0%, #ffecb3 100%);
    border-color: rgba(245, 127, 23, 0.3);
}
.estoqueKpiAmber .estoqueKpiIcon,
.estoqueKpiAmber .estoqueKpiLabel { color: #e65100 !important; }

/* Indigo — Última Entrada */
.estoqueKpiIndigo {
    background: linear-gradient(145deg, #e8eaf6 0%, #c5cae9 100%);
    border-color: rgba(62, 64, 149, 0.25);
}
.estoqueKpiIndigo .estoqueKpiIcon,
.estoqueKpiIndigo .estoqueKpiLabel { color: #3E4095 !important; }

/* Roxo — Valor */
.estoqueKpiPurple {
    background: linear-gradient(145deg, #f3e5f5 0%, #e1bee7 100%);
    border-color: rgba(106, 27, 154, 0.2);
}
.estoqueKpiPurple .estoqueKpiIcon,
.estoqueKpiPurple .estoqueKpiLabel { color: #6a1b9a !important; }

.estoqueKpiTop { margin-bottom: 0.3rem; }

.estoqueKpiIcon { font-size: 0.95rem; }

.estoqueKpiLabel.sapMText {
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #6b7280 !important;
}

.estoqueKpiValue .sapMTitleText {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
}
.estoqueKpiValueGreen .sapMTitleText {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #2e7d32 !important;
}
.estoqueKpiValuePurple .sapMTitleText {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #6a1b9a !important;
}

.estoqueKpiUnit.sapMText {
    font-size: 0.72rem !important;
    color: #9e9e9e !important;
}

/* ---- Content ---- */
.estoqueDetailContent {
    width: 100%;
    padding-bottom: 1rem;
}

.estoqueListIcon {
    font-size: 1.1rem;
    color: #2e7d32;
}

/* ---- Progress indicator ---- */
.estoqueProgressSection {
    padding: 0.75rem 1rem 1rem;
}

.estoqueProgressLabel.sapMText {
    font-size: 0.8rem !important;
    color: #78909c !important;
}

.estoqueProgressBar.sapMProgressIndicator {
    border-radius: 999px !important;
    overflow: hidden;
}

/* ---- Resumo card ---- */
.estoqueResumoCard {
    background: #ffffff;
    border: 1px solid rgba(27, 94, 32, 0.16);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(27, 94, 32, 0.08);
    padding: 1rem 1.375rem;
    min-width: 17rem;
}

.estoqueResumoLabel.sapMText {
    font-size: 0.85rem !important;
    color: #7d8699 !important;
}

.estoqueResumoValor .sapMObjectNumberText {
    font-weight: 600 !important;
    color: #1a1a2e !important;
}

.estoqueResumoValorFmt.sapMText {
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    color: #6a1b9a !important;
}

.estoqueResumoTotal {
    border-top: 1px solid rgba(27, 94, 32, 0.12);
    padding-top: 0.625rem;
    margin-top: 0.375rem;
}

.estoqueResumoIcon { font-size: 0.95rem; }
.estoqueIconGreen  { color: #2e7d32 !important; }
.estoqueIconBlue   { color: #1565c0 !important; }
.estoqueIconAmber  { color: #e65100 !important; }
.estoqueIconIndigo { color: #3E4095 !important; }
.estoqueIconPurple { color: #6a1b9a !important; }

/* ================================================================
   ITEM DETAIL — ObjectPageLayout inside Dialog
   Cores: Indigo #3E4095 | Blue #1565c0 | Green #2e7d32
   ================================================================ */

/* Remove padding para ObjectPage preencher o dialog */
.itemObjPageDialog > .sapMDialogScrollCont {
    padding: 0 !important;
    height: 100% !important;
}

/* ObjectPage ocupa todo o espaço do dialog */
.itemObjPage.sapUxAPObjectPageLayout {
    height: 100% !important;
}

/* Gradiente suave no header do ObjectPage */
.itemObjPage .sapUxAPObjectPageHeaderDetails {
    background: linear-gradient(160deg, rgba(62, 64, 149, 0.05) 0%, rgba(21, 101, 192, 0.07) 100%) !important;
    border-bottom: 1px solid rgba(62, 64, 149, 0.1) !important;
}

/* Ícone de produto no título */
.itemObjHeadingIcon {
    font-size: 1.75rem;
    color: #3E4095;
}

/* Foto do item no título (substitui o ícone quando existe) */
.itemObjHeadingPhoto {
    width: 3rem;
    height: 3rem;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(62, 64, 149, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.itemObjHeadingPhoto .sapMImg {
    border-radius: 8px;
}

/* Subtítulo expandido (descrição) */
.itemObjSubtitle.sapMText {
    color: rgba(62, 64, 149, 0.7) !important;
    font-size: 0.875rem !important;
}

/* ---- Facets do header content ---- */
.itemObjFacetRow {
    gap: 2rem;
    padding: 0.5rem 0 0.75rem;
}

.itemObjFacet {
    min-width: 9rem;
    gap: 0.35rem;
}

.itemObjFacetLabel.sapMLabel {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: #78909c !important;
}

.itemObjFacetText.sapMText {
    font-size: 0.925rem !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
}

.itemObjFacetNumber .sapMObjectNumberText {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #2e7d32 !important;
}

.itemObjFacetNumber .sapMObjectNumberUnit {
    color: #2e7d32 !important;
    font-size: 0.8rem !important;
}

.itemObjFacetIcon {
    font-size: 0.85rem;
    color: #78909c;
}

/* Separador vertical entre facets */
.itemObjFacet + .itemObjFacet {
    border-left: 1px solid rgba(62, 64, 149, 0.12);
    padding-left: 2rem;
}

/* ---- Seção de Vendas ---- */
.itemVendasIcon {
    font-size: 1.1rem;
    color: #3E4095;
}

.itemVendasTable .sapMListTblRow:hover > td {
    background-color: rgba(62, 64, 149, 0.03) !important;
}

/* Seção uppercase → lowercase */
.itemObjPage .sapUxAPObjectPageSectionTitle {
    text-transform: none !important;
    font-size: 1rem !important;
    color: #3E4095 !important;
    font-weight: 600 !important;
}

/* ---- Paginador do histórico de vendas ---- */
.itemVendasPaginador {
    padding: 0.5rem 0 0.25rem;
    border-top: 1px solid rgba(62, 64, 149, 0.1);
}

.itemVendasPaginadorLabel.sapMText {
    font-size: 0.82rem !important;
    color: #78909c !important;
    min-width: 14rem;
    text-align: center;
}
