/* Importar as fontes Comfortaa e Poppins do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;700&family=Poppins:wght@600;800&display=swap');

/* =========================================================
   RESET / BASE
========================================================= */

html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Comfortaa', cursive;
    font-weight: 400;
    font-size: 16px;
    color: #333;
}

h1, h2, h3, .page-title, .sub-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
}

:root {
    --gradiente-principal: linear-gradient(90deg, #7fd4ff, #6aa9ff, #8c82ff);
}

.page-title {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    text-shadow: none;
}

.titulo-sistema {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin: 0;
    padding: 10px 0;
}

.sub-title {
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 1px 1px 0 #ccc;
    color: #4e73df;
}

@media (max-width: 768px) {
    h1, .page-title {
        font-size: 1.6rem;
    }

    .sub-title {
        font-size: 1rem;
    }
}

button, .sidebar, nav {
    font-family: 'Comfortaa', cursive;
    font-weight: 700;
}

.topbar-logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: #444;
    text-shadow:
        1px 1px 0 #ddd,
        2px 2px 0 #bbb,
        3px 3px 0 #999,
        4px 4px 2px rgba(0, 0, 0, 0.2);
}

input:focus, textarea:focus, select:focus {
    background-color: #FFFFA9 !important;
    border-color: #7ea9e1 !important;
    box-shadow: 0 0 5px #7ea9e1 !important;
    outline: none !important;
}

.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
}

/* =========================================================
   TABELAS - BASE GLOBAL
========================================================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 0.5rem;
    background: #fff;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    z-index: 12;
}

.scroll-table-body {
    max-height: 270px;
    overflow-y: auto;
    overflow-x: hidden;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    table-layout: auto;
    min-width: 700px;
    z-index: 1;
}

.table thead tr {
    background: linear-gradient(90deg, #4e73df, #224abe);
    color: #fff;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table th,
.table td {
    padding: 10px 12px;
    vertical-align: middle;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    color: #2f2f2f;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    border-bottom: 1px solid #dee2e6;
}

.table.table-zebrada tbody tr {
    cursor: pointer;
}

.table.table-zebrada th:nth-child(2),
.table.table-zebrada td:nth-child(2) {
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: clip;
}

.table-zebrada thead th:nth-child(1),
.table-zebrada tbody td:nth-child(1) {
    width: 5%;
    white-space: nowrap;
}

.table-zebrada thead th:nth-child(2),
.table-zebrada tbody td:nth-child(2) {
    width: 40%;
}

.table-zebrada thead th:nth-child(3),
.table-zebrada tbody td:nth-child(3) {
    width: 20%;
    white-space: nowrap;
}

.table-zebrada thead th:nth-child(4),
.table-zebrada tbody td:nth-child(4) {
    width: 20%;
    white-space: nowrap;
}

.table-zebrada thead th:nth-child(5),
.table-zebrada tbody td:nth-child(5) {
    width: 15%;
    white-space: nowrap;
    text-align: center;
}

@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
    }

    .table-zebrada thead th,
    .table-zebrada tbody td {
        white-space: nowrap;
    }
}

.table td.acao-col {
    text-align: right;
}

.table.table-zebrada tbody tr:nth-child(odd) {
    background: linear-gradient(90deg, #f0f7ff, #d9e6ff);
    color: #1a2a4a;
}

.table.table-zebrada tbody tr:nth-child(even) {
    background: linear-gradient(90deg, #ffffff, #e6f0ff);
    color: #1a2a4a;
}

.table.table-zebrada tbody tr:hover {
    background: var(--gradiente-principal);
    color: #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: none;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
}

/* =========================================================
   LISTAS E TOOLTIPS
========================================================= */

.list-group-item-action:hover {
    background: var(--gradiente-principal);
    color: #fff;
}

.list-group-item-action.active {
    background: var(--gradiente-principal) !important;
    color: #fff !important;
    border: none;
}

.tooltip {
    opacity: 1 !important;
}

.tooltip .tooltip-inner {
    background: #243b7a;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.20);
    max-width: 220px;
}

.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #243b7a !important;
}

.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #243b7a !important;
}

.bs-tooltip-left .tooltip-arrow::before {
    border-left-color: #243b7a !important;
}

.bs-tooltip-right .tooltip-arrow::before {
    border-right-color: #243b7a !important;
}

/* =========================================================
   BOTÕES
========================================================= */

.btn-gradiente {
    background: var(--gradiente-principal);
    color: #fff !important;
    border: none;
    transition: opacity 0.3s ease;
}

.btn-gradiente:hover {
    opacity: 0.85;
}

.btn-gradient-3d i {
    margin-right: 6px;
}

.btn-gradient-3d:hover {
    background: var(--gradiente-principal);
    transform: translateY(-2px) scale(1.02) rotateX(0deg);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    color: #fff;
}

.btn-gradient-3d:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 227, 0, 0.5);
}

.btn-export {
    min-width: 110px;
    padding: 0.45rem 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-export i {
    margin-right: 6px;
    font-size: 1rem;
}

.btn-export.btn-success {
    margin-right: 10px;
}

.btn {
    border-radius: 0.4rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    white-space: nowrap;
}

.btn-sm {
    padding: 0.3rem 0.55rem;
    font-size: 0.85rem;
}

.btn-primary {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary i {
    margin-right: 4px;
}

.btn-success {
    background-color: #1cc88a;
    border: none;
    color: #fff;
}

.btn-success:hover {
    background-color: #17a673;
}

.btn-danger {
    background-color: #e74a3b;
    border: none;
    color: #fff;
}

.btn-danger:hover {
    background-color: #be2617;
}

.btn i {
    margin-right: 5px;
    font-size: 1rem;
}

.btn-acao {
    min-width: 34px;
    padding: 0.3rem 0.5rem;
}

.btn-filtros {
    margin-right: 12px;
}

/* =========================================================
   FILTROS E PAGINAÇÃO
========================================================= */

#btnToggleFiltros.ativo {
    border: 2px solid #4e73df;
    background: #f8f9fc;
    color: #4e73df;
}

#btnToggleFiltros.ativo i {
    color: #4e73df;
}

.pagination .page-link {
    border-radius: 0.4rem;
    margin: 0 2px;
    color: #4e73df;
}

.pagination .page-item.active .page-link {
    background-color: #4e73df;
    border-color: #4e73df;
}

.filtro-panel {
    padding: 22px;
}

.filtro-panel label {
    font-weight: 600;
    margin-bottom: 6px;
}

.filtro-panel input,
.filtro-panel select {
    height: 44px;
    font-size: 15px;
}

.filtro-panel .form-group {
    margin-bottom: 18px;
}

.filtro-panel .col-md-3 {
    min-width: 260px;
}

/* =========================================================
   SIDEBAR FORSHIP V2 — FIXA + FLYOUT REAL
========================================================= */

.sidebar {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    background: linear-gradient(180deg, #3d63d8 0%, #2f54c7 100%);
    overflow: visible !important;
    position: relative !important;
    z-index: 1040 !important;
}

.sidebar .sidebar-brand {
    background-color: #fff !important;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    height: 20px !important;
}

.sidebar .nav-item {
    margin: 0 !important;
    width: 100% !important;
    position: relative !important;
    overflow: visible !important;
    border-radius: 0 !important;
}

.sidebar .nav-link {
    width: calc(100% - 16px) !important;
    margin: 6px 8px !important;
    min-height: 44px !important;
    padding: 0.85rem 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    border-radius: 10px !important;
    color: #fff !important;
    background: transparent !important;
    text-decoration: none !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.sidebar .nav-link i {
    width: 22px !important;
    min-width: 22px !important;
    text-align: center !important;
    margin: 0 !important;
}

.sidebar .nav-link .menu-text,
.sidebar .sidebar-heading {
    display: none !important;
}

.sidebar .nav-link:hover,
.sidebar .nav-item.active > .nav-link,
.sidebar .nav-item.active > .nav-link:hover {
    background: linear-gradient(90deg, #63c7f7, #8f8cfb) !important;
    color: #fff !important;
    font-weight: 700 !important;
}

/* o flyout agora sai totalmente da sidebar */
.submenu-flyout {
    position: fixed !important;
    left: 98px !important;
    top: 0 !important;
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
    display: none !important;
    z-index: 999999 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    pointer-events: auto !important;
}

.submenu-flyout.show {
    display: block !important;
}

.submenu-flyout .collapse-inner {
    background: #496FDB !important;
    border-radius: 10px !important;
    padding: 8px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,.22) !important;
}

.submenu-flyout .collapse-header {
    color: rgba(255,255,255,.75) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 6px 10px !important;
    text-transform: uppercase !important;
}

.submenu-flyout .collapse-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 42px !important;
    padding: 10px !important;
    border-radius: 6px !important;
    color: #fff !important;
    text-decoration: none !important;
    background: transparent !important;
}

.submenu-flyout .collapse-item:hover {
    background: rgba(255,255,255,.10) !important;
    color: #fff !important;
}

.submenu-flyout .collapse-item.active,
.submenu-flyout .collapse-item.active:hover {
    background: #fff !important;
    color: #2f54c7 !important;
    font-weight: 700 !important;
}

.submenu-flyout .collapse-item.active i {
    color: #2f54c7 !important;
}

/* evita qualquer clipping do layout */
#wrapper,
#content-wrapper,
#content,
.container-fluid {
    overflow: visible !important;
}

/* =========================================================
   FORSHIP — FORMULÁRIOS COM ITENS (DESKTOP + RESPONSIVO)
========================================================= */

.forship-itens-wrapper {
    width: 100%;
}

.forship-itens-grid {
    table-layout: fixed;
    width: 100%;
}

.forship-itens-grid th,
.forship-itens-grid td {
    vertical-align: middle !important;
}

.forship-itens-grid .combobox-container .input-group {
    flex-wrap: nowrap;
}

.forship-itens-grid .combobox-container .form-control,
.forship-itens-grid input.form-control,
.forship-itens-grid select.form-control,
.forship-itens-grid textarea.form-control {
    width: 100%;
    min-width: 0;
}

.forship-itens-grid .td-acao,
.forship-itens-grid .th-acao,
.forship-itens-grid .td-item,
.forship-itens-grid .th-item,
.forship-itens-grid .td-qtd,
.forship-itens-grid .th-qtd,
.forship-itens-grid .td-lote,
.forship-itens-grid .th-lote,
.forship-itens-grid .td-valor,
.forship-itens-grid .th-valor {
    text-align: center !important;
}

.forship-item-card {
    border: 1px solid #e3e6f0;
    border-radius: .5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
}

.forship-item-card.item-com-erro {
    border-color: #e74a3b;
}

.forship-item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.forship-item-card-title {
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.forship-item-card-errors {
    margin-bottom: .75rem;
}

.forship-item-card-errors .text-danger {
    display: block;
}

.forship-item-card-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.forship-col-12 { grid-column: span 12; }
.forship-col-8  { grid-column: span 8; }
.forship-col-6  { grid-column: span 6; }
.forship-col-4  { grid-column: span 4; }
.forship-col-3  { grid-column: span 3; }
.forship-col-2  { grid-column: span 2; }

.forship-item-card .form-label {
    margin-bottom: .35rem;
}

.forship-item-card .btn-danger,
.forship-item-card .btn-primary,
.forship-item-card .btn-light {
    white-space: nowrap;
}

.forship-itens-alert {
    margin-bottom: 1rem;
}

.forship-hide-mobile-card {
    display: block;
}

.forship-show-mobile-card {
    display: none;
}

/* =========================================================
   RESPONSIVO — ITENS EM CARD
========================================================= */

@media (max-width: 991.98px) {
    .forship-hide-mobile-card {
        display: none !important;
    }

    .forship-show-mobile-card {
        display: block !important;
    }

    .forship-item-card-grid {
        grid-template-columns: repeat(12, 1fr);
    }

    .forship-col-lg-12 { grid-column: span 12 !important; }
    .forship-col-lg-6  { grid-column: span 6 !important; }
    .forship-col-lg-4  { grid-column: span 4 !important; }
    .forship-col-lg-3  { grid-column: span 3 !important; }
    .forship-col-lg-2  { grid-column: span 2 !important; }
}

@media (max-width: 767.98px) {
    .forship-item-card {
        padding: .85rem;
    }

    .forship-item-card-grid {
        grid-template-columns: 1fr;
        gap: .75rem;
    }

    .forship-col-12,
    .forship-col-8,
    .forship-col-6,
    .forship-col-4,
    .forship-col-3,
    .forship-col-2,
    .forship-col-lg-12,
    .forship-col-lg-6,
    .forship-col-lg-4,
    .forship-col-lg-3,
    .forship-col-lg-2 {
        grid-column: span 1 !important;
    }

    .forship-item-card-header {
        align-items: flex-start;
    }

    .forship-item-card .btn {
        width: 100%;
    }
}

/* =========================================================
   OUTROS
========================================================= */

.borda-marcas {
    border-left: 5px solid #4285F4 !important;
    border-radius: 5px;
}

.borda-produtos {
    border-left: 5px solid #DB4437 !important;
    border-radius: 5px;
}

.borda-usuarios {
    border-left: 5px solid #F4B400 !important;
    border-radius: 5px;
}

.footer.main-footer {
    width: 100%;
    background-color: #ffffff;
    border-top: 1px solid #e3e6f0;
    z-index: 1030;
    position: relative;
    margin-left: 0;
}

#wrapper.toggled footer.main-footer,
#wrapper footer.main-footer {
    margin-left: 0;
}

.Barra-Status {
    width: 100%;
    height: 84px;
    background-color: #ebecee !important;
    border-top: 1px solid #e3e6f0;
    z-index: 1030;
    position: relative;
    margin-left: 0;
}

.topbar-logo {
    height: 80px;
    width: auto;
    display: inline-block;
    margin-top: 15px;
}

input.is-loading {
    background-image: url('https://i.imgur.com/6RMhx.gif');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px 18px;
}

@media (max-width: 768px) {
    #content {
        padding: 10px;
    }
}

/* =========================================================
   DASHBOARD / PAINEL
========================================================= */

.card-subsystem {
    border-left: 5px solid #4e73df;
    border-radius: 10px;
    transition: all 0.25s ease;
    cursor: pointer;
    background: #ffffff;
}

.card-subsystem:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.card-subsystem .subsystem-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #2c3e50;
}

.card-subsystem .subsystem-desc {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 4px;
    line-height: 1.35;
}

.card-subsystem .subsystem-icon {
    font-size: 28px;
    opacity: 0.85;
}

.card-subsystem.estoque {
    border-left-color: #4e73df;
}

.card-subsystem.manutencao {
    border-left-color: #f6c23e;
}

.card-subsystem.inspecao {
    border-left-color: #36b9cc;
}

.card-subsystem.administracao {
    border-left-color: #858796;
}

.painel-logo {
    height: 58px;
    width: auto;
    display: inline-block;
    opacity: 0.80;
    transition: all 0.25s ease;
}

.painel-logo:hover {
    opacity: 0.95;
    transform: scale(1.02);
}

/* =========================================================
   TOPBAR - IDENTIDADE DO SISTEMA (CONTROLSHIP)
========================================================= */

.topbar-system-brand {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.topbar-system-logo {
    height: 34px;
    width: auto;
    display: block;
    opacity: 0.95;
}

/* =========================================================
   PATCH SOMENTE PARA A TABELA DE MATERIAIS / FORSHIP TABLE
========================================================= */

.forship-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.forship-table th,
.forship-table td {
    padding: 10px 12px;
    vertical-align: middle;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    border-bottom: 1px solid #dee2e6;
}

.forship-table thead th {
    white-space: nowrap !important;
}

.forship-table tbody td {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: initial !important;
}

.forship-table th.col-material,
.forship-table td.col-material {
    width: 45% !important;
}

.forship-table td.col-material {
    white-space: normal !important;
    word-break: break-word !important;
}

.forship-table th.col-fabricante,
.forship-table td.col-fabricante {
    width: 15% !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
}

.forship-table th.col-numero,
.forship-table td.col-numero {
    width: 10% !important;
    text-align: right !important;
    white-space: nowrap !important;
}

.forship-table th.col-curta,
.forship-table td.col-curta {
    width: 8% !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.forship-table th.col-acoes,
.forship-table td.col-acoes {
    width: 12% !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.forship-table th.col-data,
.forship-table td.col-data {
    width: 150px;
    white-space: nowrap !important;
}

.forship-table th.col-tipo,
.forship-table td.col-tipo {
    width: 110px;
    white-space: nowrap !important;
}

.forship-table th.col-origem,
.forship-table td.col-origem {
    width: 260px;
    white-space: normal !important;
    word-break: break-word !important;
}

.forship-table th.col-deposito,
.forship-table td.col-deposito {
    width: 200px;
    white-space: nowrap !important;
}

.forship-table th.col-sinal,
.forship-table td.col-sinal {
    width: 70px;
    text-align: center !important;
    white-space: nowrap !important;
}

.forship-table th.col-quantidade,
.forship-table td.col-quantidade {
    width: 100px;
    text-align: right !important;
    white-space: nowrap !important;
}

.forship-table th.col-observacao,
.forship-table td.col-observacao {
    width: 200px;
    white-space: normal !important;
    word-break: break-word !important;
}

.forship-table.table-zebrada thead th:nth-child(1),
.forship-table.table-zebrada tbody td:nth-child(1),
.forship-table.table-zebrada thead th:nth-child(2),
.forship-table.table-zebrada tbody td:nth-child(2),
.forship-table.table-zebrada thead th:nth-child(3),
.forship-table.table-zebrada tbody td:nth-child(3),
.forship-table.table-zebrada thead th:nth-child(4),
.forship-table.table-zebrada tbody td:nth-child(4),
.forship-table.table-zebrada thead th:nth-child(5),
.forship-table.table-zebrada tbody td:nth-child(5) {
    width: auto !important;
}

/* =========================================================
   PADRÃO VISUAL OFICIAL DAS GRADES FORSHIP V2
========================================================= */

.forship-table.tabela-show-padrao,
.table.tabela-show-padrao {
    min-width: 0 !important;
    table-layout: auto !important;
    border-radius: 0.5rem;
    overflow: hidden;
}

.forship-table.tabela-show-padrao thead tr,
.table.tabela-show-padrao thead tr,
.forship-table.tabela-show-padrao thead th,
.table.tabela-show-padrao thead th {
    background: #666a7a !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-color: #666a7a !important;
}

.forship-table.tabela-show-padrao tbody tr:nth-child(odd),
.table.tabela-show-padrao tbody tr:nth-child(odd) {
    background: #dfe8f6 !important;
    color: #1a2a4a !important;
}

.forship-table.tabela-show-padrao tbody tr:nth-child(even),
.table.tabela-show-padrao tbody tr:nth-child(even) {
    background: #ffffff !important;
    color: #1a2a4a !important;
}

.forship-table.tabela-show-padrao tbody tr:hover,
.table.tabela-show-padrao tbody tr:hover {
    background: #dfe8f6 !important;
    color: #1a2a4a !important;
    box-shadow: none !important;
    transform: none !important;
}

.forship-table.tabela-show-padrao th,
.forship-table.tabela-show-padrao td,
.table.tabela-show-padrao th,
.table.tabela-show-padrao td {
    white-space: nowrap;
}

.forship-table.tabela-show-padrao td.col-material,
.table.tabela-show-padrao td.col-material {
    white-space: normal !important;
    word-break: break-word !important;
}

.forship-table.tabela-show-padrao th.col-numero,
.forship-table.tabela-show-padrao td.col-numero,
.table.tabela-show-padrao th.col-numero,
.table.tabela-show-padrao td.col-numero {
    text-align: right !important;
}

.forship-table.tabela-show-padrao th.col-curta,
.forship-table.tabela-show-padrao td.col-curta,
.table.tabela-show-padrao th.col-curta,
.table.tabela-show-padrao td.col-curta {
    text-align: center !important;
}

.forship-table.tabela-show-padrao th.col-data,
.forship-table.tabela-show-padrao td.col-data,
.table.tabela-show-padrao th.col-data,
.table.tabela-show-padrao td.col-data {
    white-space: nowrap !important;
}

/* =========================================================
   LARGURA DA GRADE DA SHOW DE COMPRAS
========================================================= */

.table-responsive.tabela-container {
    overflow-x: auto;
    overflow-y: hidden;
}

.table.table-zebrada {
    table-layout: auto;
    width: 100%;
    min-width: 1200px;
}

.table.table-zebrada th,
.table.table-zebrada td {
    vertical-align: middle;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.table.table-zebrada th:nth-child(1),
.table.table-zebrada td:nth-child(1) {
    width: 70px;
    min-width: 70px;
}

.table.table-zebrada th:nth-child(2),
.table.table-zebrada td:nth-child(2) {
    min-width: 260px;
}

.table.table-zebrada th:nth-child(3),
.table.table-zebrada td:nth-child(3),
.table.table-zebrada th:nth-child(4),
.table.table-zebrada td:nth-child(4) {
    min-width: 130px;
}

.table.table-zebrada th:nth-child(5),
.table.table-zebrada td:nth-child(5) {
    min-width: 260px;
}

.table.table-zebrada th:nth-child(6),
.table.table-zebrada td:nth-child(6) {
    min-width: 140px;
}

.table.table-zebrada th:nth-child(7),
.table.table-zebrada td:nth-child(7) {
    min-width: 150px;
}

.table.table-zebrada th:nth-child(8),
.table.table-zebrada td:nth-child(8) {
    min-width: 220px;
}

.table.table-zebrada th:nth-child(9),
.table.table-zebrada td:nth-child(9) {
    min-width: 120px;
}

/* =========================================================
   GRID DE AUTORIZAÇÕES
========================================================= */

.table-responsive.autorizacoes-wrapper {
    overflow-x: auto;
}

.table.forship-table-autorizacoes {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
}

.table.forship-table-autorizacoes th.col-modulo,
.table.forship-table-autorizacoes td.col-modulo {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-overflow: initial !important;
    vertical-align: middle !important;
}

.table.forship-table-autorizacoes th.col-permissoes,
.table.forship-table-autorizacoes td.col-permissoes {
    width: auto !important;
    vertical-align: middle !important;
}

.table.forship-table-autorizacoes .permissoes-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.table.forship-table-autorizacoes .form-check {
    display: inline-flex;
    align-items: center;
    min-width: 92px;
    margin: 0;
    gap: 6px;
}

.table.forship-table-autorizacoes .form-check-input {
    margin-top: 0;
    position: relative;
}

.table.forship-table-autorizacoes .form-check-label {
    white-space: nowrap;
    padding-left: 0;
    margin-bottom: 0;
}

/* =========================================================
   SALDO POR DEPÓSITO - AJUSTE DE LARGURA
========================================================= */

.saldo-deposito-wrapper .table.table-zebrada,
.saldo-deposito-wrapper .forship-table {
    min-width: 760px !important;
    width: 100% !important;
}

.saldo-deposito-wrapper .table-responsive {
    overflow-x: auto;
}

.saldo-deposito-wrapper .forship-table th,
.saldo-deposito-wrapper .forship-table td {
    white-space: nowrap;
}

.saldo-deposito-wrapper .forship-table th.col-material,
.saldo-deposito-wrapper .forship-table td.col-material {
    width: 34% !important;
    max-width: 34% !important;
    min-width: 220px !important;
}

.saldo-deposito-wrapper .forship-table th.col-numero,
.saldo-deposito-wrapper .forship-table td.col-numero {
    width: 22% !important;
    max-width: 22% !important;
    min-width: 140px !important;
    text-align: right;
}

.saldo-deposito-wrapper .table.table-zebrada th:nth-child(1),
.saldo-deposito-wrapper .table.table-zebrada td:nth-child(1) {
    width: 34% !important;
    max-width: 34% !important;
    min-width: 220px !important;
}

.saldo-deposito-wrapper .table.table-zebrada th:nth-child(2),
.saldo-deposito-wrapper .table.table-zebrada td:nth-child(2),
.saldo-deposito-wrapper .table.table-zebrada th:nth-child(3),
.saldo-deposito-wrapper .table.table-zebrada td:nth-child(3),
.saldo-deposito-wrapper .table.table-zebrada th:nth-child(4),
.saldo-deposito-wrapper .table.table-zebrada td:nth-child(4) {
    width: 22% !important;
    max-width: 22% !important;
    min-width: 140px !important;
    text-align: right;
}

/* =========================================================
   MATERIAIS - INDEX COM LARGURA CONTROLADA
========================================================= */

.materiais-index-wrapper .table.table-zebrada,
.materiais-index-wrapper .forship-table {
    min-width: 980px !important;
    width: 100% !important;
}

.materiais-index-wrapper .table-responsive {
    overflow-x: auto;
}

.materiais-index-wrapper .forship-table th,
.materiais-index-wrapper .forship-table td {
    vertical-align: middle;
}

.materiais-index-wrapper .forship-table th.col-material,
.materiais-index-wrapper .forship-table td.col-material {
    width: 50% !important;
    max-width: 50% !important;
    min-width: 220px !important;
}

.materiais-index-wrapper .forship-table td.col-material {
    white-space: normal !important;
    word-break: break-word;
}

.materiais-index-wrapper .forship-table th.col-fabricante,
.materiais-index-wrapper .forship-table td.col-fabricante {
    width: 18% !important;
    max-width: 18% !important;
    min-width: 140px !important;
}

.materiais-index-wrapper .forship-table th.col-numero,
.materiais-index-wrapper .forship-table td.col-numero {
    width: 10% !important;
    max-width: 10% !important;
    min-width: 110px !important;
    text-align: right;
    white-space: nowrap !important;
}

.materiais-index-wrapper .forship-table th.col-curta,
.materiais-index-wrapper .forship-table td.col-curta {
    width: 10% !important;
    max-width: 10% !important;
    min-width: 120px !important;
    text-align: center;
    white-space: nowrap !important;
}

.materiais-index-wrapper .forship-table th:last-child,
.materiais-index-wrapper .forship-table td:last-child {
    width: 12% !important;
    min-width: 120px !important;
    white-space: nowrap !important;
}

/* =========================================================
   INDICADOR DE AMBIENTE (DEV / HML / PROD)
========================================================= */

.env-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 34px;
    line-height: 34px;
    text-align: center;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* =========================
   DESENVOLVIMENTO
========================= */
.env-dev {
    background-color: #F0BEC2;
    color: #9C0006;
    border-bottom: 2px solid #9C0006;
}

/* =========================
   HOMOLOGAÇÃO
========================= */
.env-test {
    background-color: #FCF1C7;
    color: #9C6500;
    border-bottom: 2px solid #9C6500;
}

/* =========================
   PRODUÇÃO (opcional)
========================= */
.env-prod {
    background-color: #C6EFCE;
    color: #006100;
    border-bottom: 2px solid #006100;
}

/* =========================
   AJUSTE DE LAYOUT
========================= */
body .env-bar + #wrapper {
    margin-top: 34px;
}

.env-bar {
    backdrop-filter: blur(2px);
}