﻿/* animacaocores.css */

/* animação com cores sólidas (alert blink) */
@keyframes alertBlink {
    0% {
        background-color: #8B0000;
    }
    /* vermelho escuro */
    50% {
        background-color: #FF4500;
    }
    /* laranja forte */
    100% {
        background-color: #FFD700;
    }
    /* amarelo alerta */
}

/* classe para usar no badge */
.badge-alert-blink {
    color: #fff !important; /* força a cor do texto */
    background-color: #8B0000 !important; /* garante cor inicial */
    animation: alertBlink 1.2s infinite alternate;
    border: none;
    box-shadow: 0 0 10px rgba(255, 69, 0, 0.7);
}

/* Se o AdminLTE adicionar uma classe .bg-maroon ou similar,
   use uma especificidade maior: */
.badge.badge-alert-blink,
div.badge.badge-alert-blink {
    background-color: #8B0000 !important;
}




.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    vertical-align: middle;
    margin: 0 auto;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }



.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 16px;
        width: 16px;
        left: 2px;
        top: 2px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #28a745;
}

input:focus + .slider {
    box-shadow: 0 0 1px #28a745;
}

input:checked + .slider:before {
    transform: translateX(16px);
}

.switch-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

    .switch-disabled .slider {
        background-color: #aaaa !important;
    }



.equip-card {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
    height: 100%;
}

    .equip-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    }

.equip-card-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-weight: bold;
}

    .equip-card-header.online {
        background-color: #28a745;
    }

    .equip-card-header.offline {
        background-color: #dc3545;
    }

.equip-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.equip-card-body {
    padding: 14px 15px;
    font-size: 13.5px;
}

    .equip-card-body .linha {
        margin-bottom: 6px;
        display: flex;
        justify-content: space-between;
    }

        .equip-card-body .linha strong {
            color: #555;
        }

.equip-tempo-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f1f1f1;
    color: #333;
}

.filtro-btn.active {
    font-weight: bold;
}

.ultima-atualizacao-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eef6ff;
    border: 1px solid #b6d9ff;
    color: #0b5ed7;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    float: right;
}

    .ultima-atualizacao-box .label {
        font-weight: 600;
    }

    .ultima-atualizacao-box .valor {
        font-weight: 700;
    }

    .ultima-atualizacao-box i {
        animation: girar 1.2s linear infinite;
        animation-play-state: paused;
    }

    .ultima-atualizacao-box.atualizando i {
        animation-play-state: running;
    }

@keyframes girar {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


.resumo-compra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 1rem;
    align-items: stretch; /* cards da mesma linha ficam com altura igual */
}

.resumo-card {
    background: #343a40;
    color: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start; /* era center → agora topo */
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
    border-left: 4px solid #6c757d;
    transition: transform .12s ease;
}

    .resumo-card:hover {
        transform: translateY(-2px);
    }

    .resumo-card .resumo-icone {
        font-size: 1.4rem;
        opacity: .85;
        flex-shrink: 0;
    }

    .resumo-card .resumo-conteudo {
        display: flex;
        flex-direction: column;
        min-width: 0; /* permite o ellipsis funcionar dentro do grid */
    }

    .resumo-card .resumo-label {
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .3px;
        opacity: .75;
        white-space: normal; /* permite quebrar linha */
        overflow: visible;
        text-overflow: clip;
        line-height: 1.15;
        word-break: break-word; /* garante que nada vaze */
    }

    .resumo-card .resumo-valor {
        font-size: 1.15rem;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
    }

    /* Acentos por categoria */
    .resumo-card.acento-info {
        border-left-color: #17a2b8;
    }

    .resumo-card.acento-sucesso {
        border-left-color: #28a745;
    }

    .resumo-card.acento-alerta {
        border-left-color: #ffc107;
    }

    .resumo-card.acento-perigo {
        border-left-color: #dc3545;
    }

/* ============ COMPRA MOBILE ============ */
/* ============ Layout mobile ============ */
.mob-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 8px 10px 130px 10px;
}

/* ============ Tela de status (já aprovada / reprovada / cotando) ============ */
.mob-hero {
    text-align: center;
    border-radius: 18px;
    padding: 40px 22px;
    margin: 24px auto;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

    .mob-hero .hero-icone {
        font-size: 74px;
        line-height: 1;
        margin-bottom: 14px;
    }

    .mob-hero h2 {
        font-weight: 800;
        margin: 6px 0;
        font-size: 28px;
    }

    .mob-hero p {
        font-size: 16px;
        opacity: .95;
        margin: 2px 0;
    }

.hero-aprovada {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.hero-reprovada {
    background: linear-gradient(135deg, #dc3545, #a71d2a);
}

.hero-cotando {
    background: linear-gradient(135deg, #ffc107, #d39e00);
}

.mob-hero-box {
    background: rgba(255,255,255,.16);
    border-radius: 12px;
    padding: 14px;
    margin-top: 18px;
    text-align: left;
    font-size: 15px;
}

    .mob-hero-box .linha {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
    }

        .mob-hero-box .linha strong {
            font-weight: 700;
        }

    .mob-hero-box .bloco {
        padding: 8px 0 2px;
        margin-top: 6px;
        border-top: 1px solid rgba(255,255,255,.22);
    }

        .mob-hero-box .bloco .rot {
            font-size: 12px;
            opacity: .85;
        }

        .mob-hero-box .bloco .val {
            font-weight: 700;
            font-size: 15px;
            line-height: 1.3;
        }

/* ============ Resumo topo ============ */
.mob-resumo {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    margin-bottom: 14px;
}

    .mob-resumo .titulo {
        font-size: 20px;
        font-weight: 800;
        color: #2c3e50;
    }

    .mob-resumo .sub {
        color: #6c757d;
        font-size: 14px;
        margin-top: 2px;
    }

    .mob-resumo .det {
        margin-top: 10px;
    }

    .mob-resumo .det-rot {
        display: block;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .02em;
        color: #adb5bd;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .mob-resumo .det-val {
        color: #2c3e50;
        font-weight: 600;
        font-size: 14px;
        line-height: 1.35;
    }

    .mob-resumo .det-just {
        background: #f8f9fa;
        border-radius: 10px;
        padding: 10px 12px;
    }

    .mob-resumo .total {
        font-size: 26px;
        font-weight: 800;
        color: #28a745;
        margin-top: 8px;
    }

.mob-legenda {
    font-size: 12px;
    color: #6c757d;
    margin-top: 6px;
}

    .mob-legenda .dot {
        display: inline-block;
        width: 12px;
        height: 12px;
        border-radius: 3px;
        background: #28a745;
        vertical-align: middle;
        margin-right: 4px;
    }

/* ============ Card de orçamento ============ */
.mob-orc {
    background: #fff;
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    border-left: 6px solid #adb5bd;
}

    .mob-orc.melhor {
        border-left-color: #28a745;
    }

.mob-orc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    background: #f8f9fa;
    gap: 8px;
}

    .mob-orc-head .n {
        font-weight: 800;
        font-size: 17px;
        color: #2c3e50;
    }

    .mob-orc-head .v {
        font-weight: 800;
        font-size: 16px;
        color: #2c3e50;
        white-space: nowrap;
    }

        .mob-orc-head .v.melhor {
            color: #28a745;
        }

.mob-orc-fornecedor {
    padding: 4px 16px 10px;
    font-size: 13px;
    color: #495057;
    background: #f8f9fa;
}

.mob-badge-melhor {
    display: inline-block;
    background: #28a745;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 10px;
    margin-left: 6px;
}

.mob-badge-parcial {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 10px;
    margin-left: 6px;
}

.mob-orc-body {
    padding: 6px 10px 12px;
}

/* ============ Item ============ */
.mob-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 8px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    border-radius: 10px;
    transition: background .15s;
}

    .mob-item:last-child {
        border-bottom: none;
    }

    .mob-item.selecionado {
        background: #e6f7ef;
    }

    .mob-item.melhor-preco::after {
        content: "Melhor preço";
        position: absolute;
        top: 8px;
        right: 8px;
        background: #28a745;
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        padding: 2px 8px;
        border-radius: 20px;
    }

.mob-item-titulo {
    font-weight: 700;
    font-size: 15px;
    color: #2c3e50;
    line-height: 1.25;
    padding-right: 70px;
}

.mob-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.mob-tag {
    background: #f1f3f5;
    color: #495057;
    font-size: 12px;
    border-radius: 8px;
    padding: 3px 8px;
    font-weight: 600;
}

    .mob-tag.qtd {
        background: #fff3cd;
        color: #856404;
    }

    .mob-tag.total {
        background: #d4edda;
        color: #155724;
    }

.mob-item-forn {
    font-size: 12px;
    color: #6c757d;
    margin-top: 6px;
}

.mob-item-obs {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-top: 4px;
}

.mob-item-just {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    border-radius: 20px;
    padding: 3px 10px;
    background: linear-gradient(90deg,#8B0000,#B22222,#FF4500);
}

/* Checkbox grande e touch-friendly */
.mob-check {
    position: relative;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin-top: 2px;
}

    .mob-check input {
        position: absolute;
        opacity: 0;
        width: 30px;
        height: 30px;
        margin: 0;
        cursor: pointer;
        z-index: 2;
    }

    .mob-check .marca {
        position: absolute;
        inset: 0;
        width: 30px;
        height: 30px;
        border: 2px solid #adb5bd;
        border-radius: 8px;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: .15s;
    }

    .mob-check input:checked + .marca {
        background: #28a745;
        border-color: #28a745;
    }

    .mob-check .marca::after {
        content: "\f00c";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        color: #fff;
        font-size: 15px;
        opacity: 0;
        transition: .15s;
    }

    .mob-check input:checked + .marca::after {
        opacity: 1;
    }

/* ============ Barra de ação fixa ============ */
.mob-actionbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background: #fff;
    box-shadow: 0 -3px 14px rgba(0,0,0,.12);
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
}

    .mob-actionbar .contador {
        display: block;
        text-align: center;
        font-size: 12px;
        font-weight: 700;
        color: #495057;
        margin-bottom: 8px;
    }

        .mob-actionbar .contador b {
            color: #28a745;
        }

    .mob-actionbar .botoes {
        display: flex;
        gap: 8px;
    }

    .mob-actionbar .btn {
        flex: 1;
        font-size: 15px;
        font-weight: 700;
        padding: 13px 6px;
        border-radius: 12px;
    }

.mob-empty {
    text-align: center;
    padding: 50px 20px;
    color: #6c757d;
}

    .mob-empty i {
        font-size: 54px;
        margin-bottom: 12px;
        color: #ced4da;
    }

/* Inputs do SweetAlert (aprovação) */
.swal2-html-container .mob-swal {
    text-align: left;
    padding: 0 4px;
}

    .swal2-html-container .mob-swal .form-group-mob {
        margin-bottom: 14px;
    }

        .swal2-html-container .mob-swal .form-group-mob label {
            font-weight: 700;
            font-size: 13px;
            display: block;
            margin-bottom: 5px;
            color: #2c3e50;
        }

    .swal2-html-container .mob-swal .mob-swal-input {
        display: block;
        width: 100%;
        margin: 0;
        box-sizing: border-box;
        padding: 9px 11px;
        border: 1px solid #ccc;
        border-radius: 8px;
        font-size: 14px;
        background: #fff;
        color: #2c3e50;
    }

    .swal2-html-container .mob-swal textarea.mob-swal-input {
        min-height: 80px;
        resize: vertical;
    }

    .swal2-html-container .mob-swal .mob-swal-intro {
        font-size: 14px;
        margin: 0 0 12px;
        color: #495057;
    }