html, body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background-color: #F4F6F8;
}

/* ---- Sidebar / drawer ---- */
.ml-drawer .mud-nav-link {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 500;
    border-radius: 8px;
    margin: 2px 12px;
}

.ml-drawer .mud-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.ml-drawer .mud-nav-link.active {
    background-color: #C0392B !important;
    color: #fff !important;
}

/* ---- Drawer de detalhe (lateral direito) — claro, diferente do menu principal ---- */
.ml-detail-drawer {
    max-width: 94vw;
    background-color: #FFFFFF !important;
    color: #1C1C1E !important;
}

.ml-drawer .mud-nav-link.active .mud-nav-link-icon {
    color: #fff !important;
}

.ml-nav-badge {
    display: block;
    width: 100%;
}

.ml-nav-badge .mud-badge {
    top: 10px;
    right: 24px;
}

.ml-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px 20px;
}

.ml-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #C0392B;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    letter-spacing: 1px;
}

/* ---- Main content + header ---- */
.ml-main {
    padding-top: 0 !important;
    background-color: #F4F6F8;
    min-height: 100vh;
}

.ml-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: #FFFFFF;
    border-bottom: 1px solid #E7EAEE;
}

.ml-content {
    padding: 24px 28px;
}

/* ---- Cards ---- */
.ml-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 22px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
    height: 100%;
}

.ml-card-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6B7280;
}

.ml-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1C1C1E;
    line-height: 1.2;
    margin-top: 6px;
}

.ml-card-sub {
    font-size: 0.78rem;
    color: #6B7280;
    margin-top: 6px;
}

.ml-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1C1C1E;
}

.ml-section-sub {
    font-size: 0.8rem;
    color: #6B7280;
}

/* ---- Curva S: faixas de hover e tooltip ---- */
.ml-curva-plot {
    position: relative;
}

.ml-curva-faixa {
    position: absolute;
}

.ml-curva-guia {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #C9D1DA;
    opacity: 0;
}

.ml-curva-faixa:hover .ml-curva-guia {
    opacity: 1;
}

.ml-curva-tip {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -100%);
    margin-top: -12px;
    z-index: 2;
    display: none;
    width: max-content;
    background: #fff;
    border: 1px solid #E7EAEE;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(28, 28, 30, 0.14);
    padding: 8px 10px;
    pointer-events: none;
}

.ml-curva-tip-inicio {
    transform: translate(0, -100%);
}

.ml-curva-tip-fim {
    transform: translate(-100%, -100%);
}

.ml-curva-faixa:hover .ml-curva-tip {
    display: block;
}

.ml-curva-tip-dia {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1C1C1E;
    margin-bottom: 4px;
}

.ml-curva-tip-linha {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.75rem;
    color: #6B7280;
    line-height: 1.5;
}

.ml-curva-tip-linha b {
    color: #1C1C1E;
    font-weight: 600;
}

/* ---- Meta bar (dashboard / detalhe) ---- */
.ml-bar-track {
    background: #EEF1F4;
    border-radius: 4px;
    width: 100%;
    height: 24px;
    overflow: hidden;
}

.ml-bar-fill {
    height: 24px;
    border-radius: 4px;
    transition: width .3s ease;
}

/* ---- Tabela: coloração de linhas (Monitoramento) ---- */
.row-inativo td { background-color: rgba(231, 76, 60, 0.07) !important; }
.row-parando td { background-color: rgba(243, 156, 18, 0.08) !important; }
.row-destaque td { background-color: rgba(39, 174, 96, 0.07) !important; }

/* ---- Login ---- */
.ml-login-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #F4F6F8;
}

/* ---- Indicadores comerciais (aba Indicadores do cliente e Funil de Prospecção) ---- */
.ml-ind-kpi {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #F9FAFB;
    padding: 10px 12px;
}
.ml-ind-kpi-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6B7280; }
.ml-ind-kpi-valor { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ml-ind-kpi-sub { font-size: 0.7rem; color: #6B7280; line-height: 1.25; margin-top: 2px; }

.ml-ind-box { border: 1px solid #E5E7EB; border-radius: 8px; padding: 12px; background: #FFFFFF; }
.ml-ind-selo {
    display: inline-block;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}
.ml-ind-selo-aviso { background: rgba(243, 156, 18, 0.15); color: #9A6100; }
.ml-ind-selo-neutro { background: #EEF1F4; color: #4B5563; }

/* Matriz 2x2 de conversão: os quadrantes são dimensionados pelos limiares (grid-template inline). */
.ml-ind-matriz { position: relative; height: 190px; border: 1px solid #E5E7EB; border-radius: 6px; overflow: hidden; background: #FAFBFC; }
.ml-ind-matriz-grade { position: absolute; inset: 0; display: grid; font-size: 0.66rem; color: #6B7280; }
.ml-ind-matriz-grade > div { padding: 6px 8px; transition: background-color .2s; }
.ml-ind-matriz-grade > div.ativo { background: rgba(192, 57, 43, 0.08); color: #1C1C1E; font-weight: 600; }
.ml-ind-matriz-ponto {
    position: absolute;
    width: 14px; height: 14px;
    transform: translate(-50%, 50%);
    border-radius: 50%;
    background: #C0392B;
    border: 2px solid #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

/* Barras do resultado da visita */
.ml-ind-barras { position: relative; display: flex; align-items: flex-end; gap: 14px; height: 150px; }
.ml-ind-barra { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.ml-ind-barra-col { margin: 0 auto; width: 100%; max-width: 46px; border-radius: 4px 4px 0 0; }
.ml-ind-barra-valor { font-size: 0.66rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.ml-ind-barra-concluida { background: #2C3E50; }
.ml-ind-barra-pre { background: #95A5A6; }
.ml-ind-barra-apuracao {
    border: 1px solid #F39C12;
    background: repeating-linear-gradient(135deg, rgba(243,156,18,.35) 0 5px, rgba(243,156,18,.12) 5px 10px);
}
.ml-ind-barra-futura { border: 1px dashed #CBD2D9; background: #F4F6F8; }
.ml-ind-barra-rotulo { font-size: 0.66rem; color: #6B7280; height: 30px; line-height: 1.2; margin-top: 4px; border-top: 1px solid #E5E7EB; padding-top: 2px; }
.ml-ind-referencia { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(192, 57, 43, .7); z-index: 2; }
.ml-ind-referencia span { position: absolute; right: 0; top: -14px; font-size: 0.6rem; color: #C0392B; }

.ml-ind-faixa { display: flex; align-items: center; gap: 8px; border-radius: 6px; padding: 8px 12px; font-size: 0.8rem; border: 1px solid; }
.ml-ind-faixa-positivo { border-color: rgba(39,174,96,.3); background: rgba(39,174,96,.08); color: #1E8449; }
.ml-ind-faixa-negativo { border-color: rgba(243,156,18,.4); background: rgba(243,156,18,.09); color: #9A6100; }
.ml-ind-faixa-neutro { border-color: #E5E7EB; background: #F9FAFB; color: #4B5563; }

/* Funil de prospecção */
.ml-funil-fluxo { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; }
.ml-funil-etapa { display: flex; justify-content: center; }
.ml-funil-bloco { border-radius: 8px; padding: 14px; color: #FFFFFF; background: #2C3E50; }
.ml-funil-bloco.final { background: #C0392B; }
.ml-funil-bloco-num { font-size: 0.66rem; opacity: .7; }
.ml-funil-bloco-valor { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ml-funil-bloco-rotulo { font-size: 0.72rem; opacity: .85; line-height: 1.2; margin-top: 2px; }
.ml-funil-seta { text-align: center; }
.ml-funil-seta-rotulo { font-size: 0.62rem; text-transform: uppercase; color: #6B7280; }
.ml-funil-seta-valor { font-size: 0.95rem; font-weight: 700; white-space: nowrap; }
.ml-funil-celula { position: relative; overflow: hidden; border-radius: 4px; background: #EEF1F4; padding: 2px 8px; text-align: right; min-width: 70px; }
.ml-funil-celula-barra { position: absolute; inset: 0 auto 0 0; background: rgba(44, 62, 80, .18); }
.ml-funil-celula span { position: relative; font-variant-numeric: tabular-nums; }
@media (max-width: 960px) {
    .ml-funil-fluxo { grid-template-columns: 1fr; }
}
