/* =========================================================
   HOME FROTA ANALÍTICA
   CSS GLOBAL DO COMPONENTE
   ========================================================= */


/* =========================================================
   VARIÁVEIS
   ========================================================= */

:root {

    /* STATUS */
    --status-operacao: #299A29;
    --status-manutencao: #BDCE25;
    --status-desligada: #4B0082;
    --status-sem-rede: #808080;
    --status-bloqueada: #FF6347;

    /* PRINCIPAL */
    --home-primary: #356ae6;

    /* TEXTOS */
    --home-text-primary: #2f3b52;
    --home-text-secondary: #6c758a;
    --home-text-muted: #6b7280;

    /* BORDAS */
    --home-border: #e6eaf0;
    --home-border-light: #edf1f6;

    /* BACKGROUND */
    --home-background: #ffffff;

    /* SOMBRAS */
    --home-shadow-sm:
        0 1px 3px rgba(20, 30, 50, 0.05);

    --home-shadow-md:
        0 7px 18px rgba(20, 30, 50, 0.10);

    --home-shadow-lg:
        0 10px 24px rgba(20, 30, 50, 0.10);
}


/* =========================================================
   RESET / UTILITÁRIOS
   ========================================================= */

.no-elevation {
    box-shadow: none !important;
}


/* =========================================================
   KPI
   ========================================================= */

.kpi-grid {

    width: 100%;

    display: grid;

    /*
       Desktop / Notebook
       6 cards lado a lado
    */
    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 12px;

    margin: 0 0 12px 0;

    padding: 0;

    box-sizing: border-box;
}


/* =========================================================
   KPI - CARD BASE
   ========================================================= */

.kpi-card {

    /*
       Variável usada pela faixa,
       borda, valor e estados.
    */
    --kpi-color: var(--home-primary);
    --kpi-background: #f2f5ff;

    position: relative;

    width: 100%;
    min-width: 0;

    height: 132px;

    padding: 18px 12px 13px 12px;

    display: flex;
    align-items: center;

    gap: 10px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            var(--kpi-background) 100%
        );

    border: 1px solid var(--home-border);

    border-radius: 12px;

    box-sizing: border-box;

    box-shadow: var(--home-shadow-sm);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}


/* =========================================================
   KPI - FAIXA SUPERIOR
   ========================================================= */

.kpi-card::before {

    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 5px;

    background: var(--kpi-color);

    border-radius:
        12px 12px 0 0;
}


/*
   Pequeno brilho abaixo da faixa.
   Deixa o card mais moderno sem exagerar.
*/

.kpi-card::after {

    content: "";

    position: absolute;

    top: 5px;
    left: 0;

    width: 100%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent 0%,
            rgba(255,255,255,0.9) 50%,
            transparent 100%
        );

    pointer-events: none;
}


/* =========================================================
   KPI - CORES
   ========================================================= */

.kpi-online {

    --kpi-color: #299A29;
    --kpi-background: #f1faf4;
}


.kpi-maintenance {

    --kpi-color: #BDCE25;
    --kpi-background: #fafbed;
}


.kpi-desligada {

    --kpi-color: #4B0082;
    --kpi-background: #f6effa;
}


.kpi-bloqueada {

    --kpi-color: #FF6347;
    --kpi-background: #fff3f0;
}


.kpi-sem-rede {

    --kpi-color: #808080;
    --kpi-background: #f5f5f5;
}


.kpi-total {

    --kpi-color: #356ae6;
    --kpi-background: #f2f5ff;
}


/* =========================================================
   KPI - ÍCONE
   ========================================================= */

.kpi-icon {

    width: 50px;
    height: 50px;

    flex: 0 0 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    font-size: 28px;

    background: var(--kpi-background);

    color: var(--kpi-color);

    box-sizing: border-box;
}


/* =========================================================
   KPI - ÍCONES POR STATUS
   ========================================================= */

.kpi-online .kpi-icon {

    color: var(--status-operacao);

    background: #eaf7ee;
}


.kpi-maintenance .kpi-icon {

    color: var(--status-manutencao);

    background: #f5f8df;
}


.kpi-desligada .kpi-icon {

    color: var(--status-desligada);

    background: #f1e5f8;
}


.kpi-bloqueada .kpi-icon {

    color: var(--status-bloqueada);

    background: #ffebe7;
}


.kpi-sem-rede .kpi-icon {

    color: var(--status-sem-rede);

    background: #eeeeee;
}


.kpi-total .kpi-icon {

    color: var(--home-primary);

    background: #eaf0ff;
}


/* =========================================================
   KPI - CONTEÚDO
   ========================================================= */

.kpi-content {

    min-width: 0;

    flex: 1 1 auto;

    height: 100%;

    display: flex;
    flex-direction: column;

    justify-content: space-between;

    overflow: hidden;

    line-height: 1.1;
}


/* =========================================================
   KPI - TÍTULO
   ========================================================= */

.kpi-title {

    display: -webkit-box;

    min-width: 0;
    min-height: 36px;

    overflow: hidden;

    color: var(--home-text-primary);

    font-size: 14px;
    font-weight: 600;

    line-height: 1.2;

    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


/* =========================================================
   KPI - VALOR
   ========================================================= */

.kpi-value {

    display: block;

    margin-top: 3px;

    color: var(--kpi-color);

    font-size: 40px;
    font-weight: 700;

    line-height: 1;

    white-space: nowrap;
}


/* =========================================================
   KPI - SUBTÍTULO
   ========================================================= */

.kpi-subtitle {

    display: block;

    margin-top: 3px;

    color: var(--home-text-muted);

    font-size: 11px;
    font-weight: 400;

    line-height: 1.15;

    white-space: nowrap;
}


/* =========================================================
   KPI - CLICK
   ========================================================= */

.kpi-clickable {

    cursor: pointer;
}


.kpi-clickable:hover {

    transform: translateY(-2px);

    border-color: var(--kpi-color);

    box-shadow: var(--home-shadow-md);
}


/* =========================================================
   KPI - CARD ATIVO
   ========================================================= */

.kpi-card-ativo {

    border-color: var(--kpi-color);

    box-shadow:
        0 0 0 2px rgba(53, 106, 230, 0.16),
        var(--home-shadow-md);
}


/* =========================================================
   KPI - IMAGENS
   ========================================================= */

.kpi-forklift-image {

    width: 34px;
    height: 34px;

    object-fit: contain;
}


.card-forklift-image {

    width: 20px;
    height: 20px;

    object-fit: contain;
}


/* =========================================================
   BOTÕES DE STATUS
   ========================================================= */

.btn-operacao {

    background-color: var(--status-operacao);
    color: #ffffff;
}


.btn-manutencao {

    background-color: var(--status-manutencao);
    color: #ffffff;
}


.btn-desligada {

    background-color: var(--status-desligada);
    color: #ffffff;
}


.btn-sem-rede {

    background-color: var(--status-sem-rede);
    color: #ffffff;
}


.btn-bloqueada {

    background-color: var(--status-bloqueada);
    color: #ffffff;
}


/* =========================================================
   TOOLBAR DOS CARDS
   ========================================================= */

.cards-toolbar {

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 8px 0;

    margin-bottom: 16px;

    box-sizing: border-box;
}


.cards-toolbar-left {

    display: flex;
    align-items: center;

    gap: 8px;

    flex-shrink: 0;
}


.cards-toolbar-title {

    margin: 0;

    color: #333333;

    font-size: 16px;
    font-weight: 500;

    line-height: 1.2;
}


/* =========================================================
   TABELA
   ========================================================= */

.home-table {

    width: 100%;

    margin-top: 14px;

    box-sizing: border-box;
}


.home-table .mud-table-toolbar {

    background-color: #ffffff;
}


/* =========================================================
   TABLE TOOLBAR
   ========================================================= */

.table-toolbar {

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 0;

    box-sizing: border-box;
}


.table-toolbar-left {

    display: flex;
    align-items: center;

    gap: 8px;

    flex-shrink: 0;
}


.table-toolbar-title {

    margin: 0;

    color: #333333;

    font-size: 16px;
    font-weight: 500;
}


.table-toolbar-right {

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    flex: 1 1 auto;

    min-width: 280px;
}


.table-search-group {

    display: flex;
    align-items: center;

    gap: 8px;

    flex: 1 1 320px;

    min-width: 220px;
}


.table-search-field {

    min-width: 0;

    flex: 1 1 auto;
}


/* =========================================================
   BOTÃO EXCEL
   ========================================================= */

.table-excel-btn {

    min-width: 80px;

    height: 40px;

    padding-left: 14px;
    padding-right: 14px;

    font-weight: 600;

    text-transform: none;

    background-color: #3f51b5 !important;

    color: #ffffff !important;
}


.table-excel-btn:hover {

    background-color: #3949a3 !important;
}


/* =========================================================
   BOTÕES DE VISUALIZAÇÃO
   ========================================================= */

.table-refresh-btn {

    width: 40px;
    height: 40px;

    min-width: 40px;
}


.view-button {

    width: 40px !important;
    height: 40px !important;

    min-width: 40px !important;
}


/* =========================================================
   CARD ANALÍTICO
   ========================================================= */

.home-analitica-card {

    width: 100%;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background-color: #ffffff;

    border: 1px solid var(--home-border);

    border-top-width: 4px;

    border-radius: 12px;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;

    box-sizing: border-box;
}


.home-analitica-card:hover {

    transform: translateY(-2px);

    box-shadow: var(--home-shadow-lg);
}


/* =========================================================
   HEADER DO CARD
   ========================================================= */

.card-header-green {

    min-height: 40px;

    margin: 0;

    padding: 8px 12px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;

    color: var(--home-text-primary);

    border-bottom: 1px solid var(--home-border-light);

    border-radius: 12px 12px 0 0;

    box-sizing: border-box;
}


/* =========================================================
   ID DA FROTA
   ========================================================= */

.card-header-id {

    flex: 1 1 auto;
    min-width: 0;
    max-width: 15ch;

    color: var(--home-text-primary);

    font-size: 22px;
    font-weight: 700;

    letter-spacing: 0.1px;

    line-height: 1.1;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    display: block;
}


/* =========================================================
   STATUS DA FROTA
   ========================================================= */

.card-header-status {

    display: flex;
    align-items: center;

    gap: 4px;

    padding: 4px 8px;

    border: 1px solid transparent;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;

    line-height: 1;

    white-space: nowrap;

    flex: 0 0 auto;
    flex-shrink: 0;
}


.card-header-status .mud-icon-root {

    font-size: 16px;
}


/* =========================================================
   CONTEÚDO DO CARD
   ========================================================= */

.card-content {

    min-height: 185px;

    padding: 0 0 4px 0;

    box-sizing: border-box;
}


/* =========================================================
   LINHAS DO CARD
   ========================================================= */

.card-row {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding: 8px 12px;

    border-bottom: 1px solid var(--home-border-light);

    box-sizing: border-box;
}


.card-row:last-child {

    border-bottom: none;
}


/* =========================================================
   LABEL DA LINHA
   ========================================================= */

.card-row-label {

    display: inline-flex;
    align-items: center;

    gap: 6px;

    min-width: 0;

    color: var(--home-text-secondary);

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   VALOR DA LINHA
   ========================================================= */

.card-row-value {

    min-width: 0;

    color: var(--home-text-primary);

    font-size: 15px;
    font-weight: 600;

    text-align: right;

    line-height: 1.2;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================================
   LINHA TIPO
   ========================================================= */

.card-row-tipo {

    justify-content: flex-start;

    gap: 10px;

    padding-top: 12px;
    padding-bottom: 12px;
}


.card-row-tipo .card-row-label {

    color: #26a045;

    font-size: 18px;
}


.card-row-tipo .card-row-value {

    color: #3a4358;

    font-size: 16px;
    font-weight: 600;

    text-align: left;
}


/* =========================================================
   ÍCONES DAS LINHAS
   ========================================================= */

.card-row-icon {

    flex-shrink: 0;

    color: #7a8498;

    font-size: 16px;
}


.card-row-icon-forklift {

    width: 20px;
    height: 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #2e7d32;

    flex-shrink: 0;
}


.card-row-icon-forklift svg {

    width: 20px;
    height: 20px;

    display: block;
}


/* =========================================================
   TEMPO / MANUTENÇÃO
   ========================================================= */

.card-row-time .card-row-value {

    color: #23ad51;

    font-weight: 700;
}


.card-row-maintenance .card-row-value {

    color: #22a24a;
}


/* =========================================================
   STATUS DOS CARDS ANALÍTICOS
   ========================================================= */


/* ---------- OPERAÇÃO ---------- */

.card-status-operacao {

    border-top-color: #2cab4a;
}


.card-status-operacao .card-header-status {

    background-color: #ecf9f0;

    color: #2aa84a;

    border-color: #d5efdd;
}


/* ---------- MANUTENÇÃO ---------- */

.card-status-manutencao {

    border-top-color: #BDCE25;
}


.card-status-manutencao .card-header-status {

    background-color: #f7f9e8;

    color: #8c9c16;

    border-color: #e3e9bd;
}


/* ---------- DESLIGADA ---------- */

.card-status-desligada {

    border-top-color: #4B0082;
}


.card-status-desligada .card-header-status {

    background-color: #f4e9fb;

    color: #4B0082;

    border-color: #dfc9ee;
}


/* ---------- SEM REDE ---------- */

.card-status-sem-rede {

    border-top-color: #808080;
}


.card-status-sem-rede .card-header-status {

    background-color: #f3f5f8;

    color: #647084;

    border-color: #e1e5ec;
}


/* ---------- BLOQUEADA ---------- */

.card-status-bloqueada {

    border-top-color: #FF6347;
}


.card-status-bloqueada .card-header-status {

    background-color: #ffefee;

    color: #dd4944;

    border-color: #f7d1cf;
}


/* =========================================================
   RESPONSIVIDADE
   ========================================================= */


/* =========================================================
   DESKTOP / NOTEBOOK
   1024px+
   ========================================================= */

@media (min-width: 1024px) {

    .kpi-grid {

        grid-template-columns:
            repeat(6, minmax(0, 1fr));

        gap: 12px;
    }


    .kpi-card {

        height: 132px;

        padding:
            18px 12px 13px 12px;

        gap: 10px;
    }


    .kpi-icon {

        width: 50px;
        height: 50px;

        flex-basis: 50px;

        font-size: 28px;
    }


    .kpi-title {

        font-size: 14px;
    }


    .kpi-value {

        font-size: 40px;
    }


    .kpi-subtitle {

        font-size: 11px;
    }
}


/* =========================================================
   DESKTOP GRANDE
   1440px+
   ========================================================= */

@media (min-width: 1440px) {

    .kpi-grid {

        gap: 14px;
    }


    .kpi-card {

        height: 136px;

        padding-left: 14px;
        padding-right: 14px;

        gap: 12px;
    }


    .kpi-icon {

        width: 54px;
        height: 54px;

        flex-basis: 54px;

        font-size: 30px;
    }


    .kpi-title {

        font-size: 15px;
    }


    .kpi-value {

        font-size: 42px;
    }


    .kpi-subtitle {

        font-size: 12px;
    }
}


/* =========================================================
   TABLET
   768px - 1023px
   ========================================================= */

@media (min-width: 768px) and (max-width: 1023px) {

    .kpi-grid {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 12px;
    }


    .kpi-card {

        height: 126px;

        padding:
            17px 13px 12px 13px;

        gap: 10px;
    }


    .kpi-icon {

        width: 52px;
        height: 52px;

        flex-basis: 52px;

        font-size: 28px;
    }


    .kpi-title {

        font-size: 14px;
    }


    .kpi-value {

        font-size: 38px;
    }


    .kpi-subtitle {

        font-size: 11px;
    }


    .table-toolbar {

        flex-wrap: wrap;

        gap: 8px;
    }


    .table-toolbar-right {

        width: 100%;

        min-width: 0;

        justify-content: space-between;
    }


    .table-search-group {

        min-width: 0;

        flex: 1 1 auto;
    }


    .cards-toolbar {

        flex-wrap: wrap;
    }


    .cards-toolbar-left {

        width: auto;
    }
}


/* =========================================================
   CELULAR GRANDE
   480px - 767px
   ========================================================= */

@media (min-width: 480px) and (max-width: 767px) {

    .kpi-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }


    .kpi-card {

        height: 118px;

        padding:
            15px 12px 11px 12px;

        gap: 9px;
    }


    .kpi-icon {

        width: 46px;
        height: 46px;

        flex-basis: 46px;

        font-size: 25px;
    }


    .kpi-title {

        min-height: 32px;

        font-size: 13px;
    }


    .kpi-value {

        font-size: 34px;
    }


    .kpi-subtitle {

        font-size: 10px;
    }


    .cards-toolbar {

        display: grid;

        grid-template-columns: 1fr;

        row-gap: 8px;

        margin-bottom: 10px;
    }


    .cards-toolbar-left {

        width: 100%;

        justify-content: flex-start;
    }


    .cards-toolbar > div:last-child {

        width: 100%;

        display: flex !important;

        align-items: center;
        justify-content: space-between;

        gap: 6px;
    }


    .cards-toolbar .mud-input-control {

        flex: 1 1 auto;

        min-width: 0 !important;
    }


    .table-excel-btn {

        min-width: 64px;
    }


    .home-analitica-card {

        border-radius: 10px;
    }


    .card-header-id {

        font-size: 24px;
    }


    .card-header-status {

        padding: 5px 8px;

        font-size: 10px;
    }


    .card-row {

        padding:
            8px 10px;
    }


    .card-row-value {

        font-size: 14px;
    }
}


/* =========================================================
   CELULAR
   ATÉ 479px
   ========================================================= */

@media (max-width: 479px) {

    .kpi-grid {

        grid-template-columns: 1fr;

        gap: 8px;

        margin-bottom: 8px;
    }


    .kpi-card {

        height: 96px;

        padding:
            14px 12px 10px 12px;

        gap: 12px;
    }


    .kpi-icon {

        width: 48px;
        height: 48px;

        flex-basis: 48px;

        font-size: 26px;
    }


    .kpi-title {

        min-height: auto;

        font-size: 13px;

        line-clamp: 2;
        -webkit-line-clamp: 2;
    }


    .kpi-value {

        font-size: 32px;
    }


    .kpi-subtitle {

        font-size: 10px;
    }


    .cards-toolbar {

        display: grid;

        grid-template-columns: 1fr;

        row-gap: 8px;

        margin-bottom: 10px;
    }


    .cards-toolbar-left {

        width: 100%;

        justify-content: flex-start;
    }


    .cards-toolbar > div:last-child {

        width: 100%;

        display: flex !important;

        align-items: center;
        justify-content: space-between;

        gap: 6px;
    }


    .cards-toolbar .mud-input-control {

        flex: 1 1 auto;

        min-width: 0 !important;
    }


    .table-excel-btn {

        min-width: 64px;
    }


    .home-analitica-card {

        border-radius: 10px;
    }


    .card-header-id {

        font-size: 24px;
    }


    .card-header-status {

        padding: 5px 8px;

        font-size: 10px;
    }


    .card-row {

        padding:
            8px 10px;
    }


    .card-row-value {

        font-size: 14px;
    }
}


/* =========================================================
   TELAS MUITO PEQUENAS
   ATÉ 360px
   ========================================================= */

@media (max-width: 360px) {

    .kpi-card {

        height: 88px;

        padding:
            13px 10px 9px 10px;

        gap: 9px;
    }


    .kpi-icon {

        width: 42px;
        height: 42px;

        flex-basis: 42px;

        font-size: 23px;

        border-radius: 10px;
    }


    .kpi-title {

        font-size: 12px;
    }


    .kpi-value {

        font-size: 29px;
    }


    .kpi-subtitle {

        font-size: 9px;
    }


    .card-header-id {

        font-size: 22px;
    }
}
/* =========================================================
   HOME FROTA ANALÍTICA
   TOOLBAR
   ========================================================= */

.home-toolbar {
    width: 100%;
    max-width: 100%;

    margin: 0;
    padding: 0;

    box-sizing: border-box;
}


/* =========================================================
   LINHA PRINCIPAL
   ========================================================= */

.home-toolbar-main {
    width: 100%;
    max-width: 100%;

    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    box-sizing: border-box;
}


/* =========================================================
   TÍTULO + ATUALIZAR
   ========================================================= */

.home-toolbar-title {
    flex: 0 0 auto;

    min-width: 90px;
    height: 40px;

    display: flex;
    align-items: center;

    gap: 3px;

    white-space: nowrap;

    box-sizing: border-box;
}


.home-toolbar-title-text {
    display: inline-flex;
    align-items: center;

    font-size: 16px;
    font-weight: 700;
    line-height: 1;

    color: #263238;

    white-space: nowrap;
}


/* =========================================================
   BOTÃO ATUALIZAR
   ========================================================= */

.home-toolbar-refresh {
    width: 36px !important;
    height: 36px !important;

    min-width: 36px !important;

    padding: 0 !important;

    border-radius: 8px !important;

    transition:
        background-color 0.18s ease,
        transform 0.18s ease;
}


.home-toolbar-refresh:hover {
    background-color: rgba(0, 0, 0, 0.06);

    transform: rotate(8deg);
}


/* =========================================================
   GRUPO DE AÇÕES
   ========================================================= */

.home-toolbar-actions {
    flex: 1 1 auto;

    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    box-sizing: border-box;
}


/* =========================================================
   CAMPO DE PESQUISA
   ========================================================= */

.home-toolbar-search {
    flex: 1 1 280px;

    width: 100%;

    min-width: 160px;
    max-width: 420px;

    margin: 0 !important;

    box-sizing: border-box;
}


.home-toolbar-search .mud-input-control {
    width: 100%;

    margin: 0 !important;
}


.home-toolbar-search .mud-input {
    min-height: 38px;
}


.home-toolbar-search .mud-input-slot {
    font-size: 12px;
}


/* =========================================================
   SELETOR TABELA / CARDS
   ========================================================= */

.home-view-switch {
    flex: 0 0 auto;

    height: 38px;

    display: flex;
    align-items: center;

    gap: 2px;

    padding: 2px;

    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;

    background: #ffffff;

    box-sizing: border-box;
}


/* =========================================================
   BOTÕES DE VISUALIZAÇÃO
   ========================================================= */

.home-view-button {
    width: 34px !important;
    min-width: 34px !important;

    height: 34px !important;

    padding: 0 !important;

    border-radius: 6px !important;
}


.home-view-button:disabled {
    opacity: 0.35;
}


/* =========================================================
   TABELA
   ========================================================= */

.home-table {
    width: 100%;
    max-width: 100%;

    box-sizing: border-box;
}


/* =========================================================
   MUDBLAZOR TOOLBAR DA TABELA
   ========================================================= */

/*
   O MudTable possui padding próprio no ToolBarContent.
   Reduzimos para o toolbar ocupar corretamente toda a largura.
*/

.home-table .mud-table-toolbar {
    width: 100%;

    min-height: auto;

    padding: 8px 12px !important;

    box-sizing: border-box;
}


/* =========================================================
   NOTEBOOK
   ========================================================= */

@media (max-width: 1200px) {

    .home-toolbar-main {
        gap: 8px;
    }


    .home-toolbar-title {
        min-width: 85px;
    }


    .home-toolbar-title-text {
        font-size: 15px;
    }


    .home-toolbar-actions {
        gap: 6px;
    }


    .home-toolbar-search {
        flex-basis: 220px;

        min-width: 140px;

        max-width: 330px;
    }


    .home-toolbar-excel {
        min-width: 70px;

        padding-left: 10px !important;
        padding-right: 10px !important;
    }

}


/* =========================================================
   NOTEBOOK PEQUENO
   ========================================================= */

@media (max-width: 1050px) {

    .home-toolbar-main {
        gap: 6px;
    }


    .home-toolbar-title {
        min-width: 78px;
    }


    .home-toolbar-title-text {
        font-size: 14px;
    }


    .home-toolbar-search {
        flex-basis: 180px;

        min-width: 120px;

        max-width: 280px;
    }


    .home-toolbar-excel {
        min-width: 64px;

        padding-left: 9px !important;
        padding-right: 9px !important;
    }


    .home-toolbar-excel-icon {
        display: none;
    }


    .home-view-switch {
        height: 36px;
    }


    .home-view-button {
        width: 32px !important;
        min-width: 32px !important;

        height: 32px !important;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 768px) {

    .home-toolbar {
        margin-bottom: 8px;
    }


    .home-toolbar-main {
        width: 100%;

        flex-direction: column;
        align-items: stretch;

        gap: 7px;
    }


    .home-toolbar-title {
        width: 100%;

        min-width: 0;
        height: 36px;
    }


    .home-toolbar-actions {
        width: 100%;

        display: grid;

        grid-template-columns:
            minmax(0, 1fr)
            auto
            auto;

        gap: 6px;

        justify-content: initial;
    }


    .home-toolbar-search {
        width: 100%;

        min-width: 0;
        max-width: none;

        flex: none;
    }


    .home-toolbar-excel {
        height: 38px;
    }


    .home-view-switch {
        height: 38px;
    }

}


/* =========================================================
   CELULAR
   ========================================================= */

@media (max-width: 480px) {

    .home-toolbar-main {
        gap: 6px;
    }


    .home-toolbar-title {
        height: 34px;
    }


    .home-toolbar-title-text {
        font-size: 14px;
    }


    .home-toolbar-actions {

        grid-template-columns:
            minmax(0, 1fr)
            auto;

        grid-template-areas:
            "search views"
            "excel  excel";

        gap: 6px;
    }


    .home-toolbar-search {
        grid-area: search;
    }


    .home-view-switch {
        grid-area: views;

        height: 38px;
    }


    .home-toolbar-excel {
        grid-area: excel;

        width: 100%;
        height: 38px;
    }


    .home-toolbar-excel-icon {
        display: inline-flex;
    }

}


/* =========================================================
   CELULAR MUITO PEQUENO
   ========================================================= */

@media (max-width: 360px) {

    .home-toolbar-title-text {
        font-size: 13px;
    }


    .home-toolbar-actions {
        gap: 5px;
    }


    .home-view-switch {
        height: 36px;
    }


    .home-view-button {
        width: 32px !important;
        min-width: 32px !important;

        height: 32px !important;
    }


    .home-toolbar-excel {
        height: 36px;
    }

}
/* =========================================================
   BOTÃO EXCEL
   ========================================================= */

.home-toolbar-excel {
    flex: 0 0 auto;

    width: auto;
    min-width: 78px;
    height: 38px;

    padding: 0 13px !important;

    border-radius: 8px !important;

    background: #299A29 !important;
    color: #ffffff !important;

    font-size: 11px !important;
    font-weight: 700 !important;

    line-height: 1 !important;

    text-transform: none !important;

    white-space: nowrap;

    box-shadow: none !important;

    transition:
        background-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}


/* =========================================================
   ÍCONE EXCEL
   ========================================================= */

.home-toolbar-excel-icon {
    margin-right: 5px;

    color: #ffffff !important;
}


/* =========================================================
   HOVER
   ========================================================= */

.home-toolbar-excel:hover {
    background: #218521 !important;

    color: #ffffff !important;

    box-shadow: 0 3px 8px rgba(41, 154, 41, 0.25) !important;

    transform: translateY(-1px);
}


/* =========================================================
   ACTIVE
   ========================================================= */

.home-toolbar-excel:active {
    transform: translateY(0);

    box-shadow: none !important;
}
/* =========================================================
   ACESSIBILIDADE
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .kpi-card,
    .home-analitica-card {

        transition: none;
    }


    .kpi-clickable:hover,
    .home-analitica-card:hover {

        transform: none;
    }
}