/*:root {
    --primary-color: #6500fe;
    --primary-color-hover: #5200cb;
    --secundary-color: #151515; 

    --font-primary: #f3f3f3;
    --font-secondary: #fff;
}*/

:root {
    --primary-color: #0d1f2d;        /* azul navy escuro (fundo/cards) */
    --primary-color-hover: #154360;  /* azul navy mais escuro (hover) */
    --secundary-color: #0d2b3e;      /* azul quase preto (fundo principal) */

    --accent-color: #27ae60;         /* verde do logo VITTRO */
    --accent-color-hover: #1e8449;   /* verde escuro (hover) */

    --font-primary: #f3f3f3;         /* texto claro (mantido) */
    --font-secondary: #ffffff;       /* branco puro (mantido) */
}

html,
body {
    margin: 0;
    height: 100%;
    padding: 0px;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background-color: #f4f4f4;
}

.headerTitle {
    background-color: var(--primary-color);
    color: var(--font-primary);
    position: absolute;
    top: 0;
    width: 100%;
    height: 46px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.headerTitle h2 {

    text-align: center;
    padding: .5rem 0;
    font-size: 1.4rem;
    font-weight: 700;

}

.back1 {
    display: block;
    width: 100vw;
    height: 100vh;
    opacity: 0.2;
    background-image: url('../imgs/background.png');
    background-repeat: no-repeat;
    background-position: 50% 0;
    background-size: cover;
}

.back2Absolute {
    position: absolute;
    display: block;
    width: 100vw;
    height: 100vh;
    opacity: 0.02;
    background-image: url(../imgs/background.png);
    background-repeat: no-repeat;
    background-position: 50% 0;
    background-size: cover;
}

.form {
    padding: 1rem;
}


.containerPages {
    max-width: 1200px;
    margin: 0 auto !important;
    background: var(--font-secondary);
    position: relative;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    padding-top: 50px;
    padding-bottom: 1rem;
    box-shadow: 0px 1px 5px 1px #c7c3c3;

}

.flex-cont-center {
    display: flex;
    align-items: center;
    justify-content: center;

}

.iptErro {
    border-color: #cc0707 !important;
}

.notValid {
    border-color: red !important;
}


.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1.3rem;
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.1s ease;
}

/* Botão Salvar */
.btn.save {
    background: var(--primary-color);
    color: white;
}

.btn.save:hover {
    background: var(--primary-color-hover);
    transform: scale(1.03);
}

/* Botão Cancelar */
.btn.cancel {
    background: #ddd;
}

.btn.cancel:hover {
    background: #ccc;
    transform: scale(1.03);
}


.scroll-custom::-webkit-scrollbar {
    width: 5px;
}

.scroll-custom::-webkit-scrollbar-track {
    background: #ddd;
}

.scroll-custom::-webkit-scrollbar-thumb {
    background: #666;
}

.scroll-custom::scrollbar {
    width: 2px;
}

.scroll-custom::scrollbar-track {
    background: #ddd;
}

.scroll-custom::scrollbar-thumb {
    background: #666;
}

.headerPages {
    border: 1px solid #118316;
    padding: 0.2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 30px;
    ;
    background: #121212;
    color: #f2f2f2;
    border-radius: 5px;
}

.spantag {
    padding: 0.2rem;
    background-color: #f2f5f9;
    color: #262222;
    margin-right: 0.5rem;
    border-radius: 5px;
    border: 1px solid #b5bfd9;
}






.input-group {
    position: relative;
}

.input {
    width: 100%;
    padding: 10px 10px;
    font-size: 16px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    background: #fff;
    outline: none;
    transition: 0.25s;
    appearance: none;
    /* melhora visual do select */
}

input.input {
    width: calc(100% - 24px);
}

/* Borda ao focar */
.input:focus {
    border-color: var(--primary-color);
}

/* Label */
.input-label {
    position: absolute;
    top: -7px;
    left: 7px;
    background: #fff;
    color: #777;
    font-size: 14px;
    padding: 0 5px;
    pointer-events: none;
    transition: 0.25s;
}

/* Input: ao focar OU se tiver texto */
.input:focus+.input-label,
.input:not(:placeholder-shown)+.input-label,
.input:valid+.input-label {
    top: -8px;
    font-size: 12px;
    color: var(--primary-color);
}

/* Select: seta custom (opcional) */
.input-group select.input {
    cursor: pointer;
    background-image: none;
    padding-right: 30px;
}

/* Opcional: seta minimalista */
.input-group.select-arrow::after {
    content: "▼";
    font-size: 12px;
    color: #555;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Ícone de status de vínculo XML */
.xml-status-icone {
    display: flex;
    align-items: center;
    margin-left: 6px;
    font-size: 1.2em;
    line-height: 1;
}

.xml-status-icone i.fa-circle-check {
    color: #2ecc40;
    filter: drop-shadow(0 0 2px #e6faed);
}
.xml-status-icone i.fa-circle-xmark {
    color: #ff4d4f;
    filter: drop-shadow(0 0 2px #ffeaea);
}

/* Remove botão Avulso visualmente (caso ainda exista em algum lugar) */
.btn-avulso-toggle {
    display: none !important;
}

#snackbar {
    visibility: hidden;
    width: calc(100% - 40px);
    max-width: 600px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 20px;
    position: fixed;
    z-index: 10000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    word-wrap: break-word;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s;
    animation: fadein 0.5s;
}

#snackbar.show.msgerro {
    background-color: #d32f2f;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    border-color: #ff5252;
    font-weight: 600;
}

#snackbar.show.msgprocessing {
    background-color: #0288d1;
    background: linear-gradient(135deg, #0288d1 0%, #0277bd 100%);
    border-color: #29b6f6;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#snackbar.show.msgprocessing::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


.modal-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 9999;
}

.modal-loader.hidden {
    display: none;
}

.loader {
    width: 45px;
    height: 45px;
    border: 5px solid #fff;
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}



.fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 20px;
    border-radius: 10px;
}

.fields .dashed {
    grid-column: span 2;
    padding: 15px;
    border: 2px dashed #cacaca;
    border-radius: 10px;
    text-align: center;
    font-size: 15px;
    color: #555;
    cursor: pointer;
    transition: .25s;
}

.fields .dashed:hover {
    background: #f5f5f5;
}

@media (max-width: 768px) {
    .fields {
        grid-template-columns: 1fr;
    }

    .fields>.dashed {
        grid-column: span 1;
    }
}




@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.modal-loader p {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}




@-webkit-keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@-webkit-keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    backdrop-filter: blur(3px);
}

.modal-box {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    width: 320px;
    max-width: 90%;
    text-align: center;
    font-family: sans-serif;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    animation: fadeIn .25s ease;
}

.modal-title {
    margin: 0 0 10px;
}

.modal-message {
    font-size: 15px;
    margin-bottom: 20px;
}

.modal-input{
    width: calc(100% - 30px);
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 20px;
    outline: none;
    transition: border-color .2s;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: .2s;
    font-weight: 600;
}

.modal-btn.ok {
    background: #3b82f6;
    color: white;
}

.modal-btn.ok:hover {
    background: #2768c5;
}

.modal-btn.cancel {
    background: #ddd;
}

.modal-btn.cancel:hover {
    background: #ccc;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


.modal-box-2 {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 800px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    z-index: 1000;
}

/* Cabeçalho */
.modal-box-2 .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #f5f7fa;
    border-bottom: 1px solid #e5e7eb;
}

/* Título */
.modal-box-2 .modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

/* Botão fechar */
.modal-box-2 .modal-btn.cancel {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease;
}

.modal-box-2 .modal-btn.cancel:hover {
    background: #dc2626;
}

/* Conteúdo */
.modal-box-2 .modal-content {
    padding: 20px;
    background: #ffffff;
    min-height: 100px;
}

/*
 * Fundo verde claro para itens vinculados (sugestão/cadastro encontrado)
 * Fundo vermelho claro para itens não vinculados (sem sugestão)
 */
.xml-vinculado {
    background: #e6faed !important; /* verde bem claro */
}
.xml-nao-vinculado {
    background: #ffeaea !important; /* vermelho bem claro */
}

/* Sempre texto preto nas linhas da tabela Excel de itens */
#corpoTabelaExcel tr,
#corpoTabelaExcel td,
#corpoTabelaExcel input,
#corpoTabelaExcel .produto-input {
    color: #222 !important;
    font-weight: 500;
    text-transform: uppercase;
}