/* Botao com icone em circulo colorido + texto ao lado - padrao adotado em
   2026-08-10 (Ruptura Atacado) e extendido pro projeto inteiro a pedido
   do usuario. Fundo branco/contorno claro, a cor fica so' no circulo do
   icone (nao no fundo do botao inteiro). Uso: <a/button class="btn
   btn-icon-pill rounded-pill"><span class="btn-icon-circle
   btn-icon-circle-red"><i class="bi ..."></i></span> Texto</a> - pra
   botao so'-icone (sem texto), usar rounded-circle no lugar de
   rounded-pill e nao colocar texto depois do span. */
.btn-icon-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    height: 42px;
    padding: 0.2rem 1.1rem 0.2rem 0.2rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a1a1a;
    background: #ffffff;
    border: 1px solid #e2e6ef;
    box-shadow: 0 1px 2px rgba(10, 29, 99, 0.06);
    transition: box-shadow .15s ease, transform .15s ease;
}

.btn-icon-pill:hover:not(:disabled) {
    box-shadow: 0 3px 8px rgba(10, 29, 99, 0.14);
    transform: translateY(-1px);
    color: #1a1a1a;
}

.btn-icon-pill:disabled {
    opacity: 0.55;
    box-shadow: none;
}

.btn-icon-pill.rounded-circle {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
}

.btn-icon-pill.rounded-circle .btn-icon-circle {
    margin: 0;
}

.btn-icon-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.btn-icon-circle-red { background: #c0392b; }
.btn-icon-circle-green { background: #1f8a4c; }
.btn-icon-circle-blue { background: #2f5aa8; }
.btn-icon-circle-navy { background: #0a1d63; }
.btn-icon-circle-gray { background: #6c757d; }

.btn-icon-pill-sep {
    width: 1px;
    align-self: stretch;
    background: #dde3f0;
    margin: 0 0.2rem;
}

.st-calc-minimizado-chip {
    display: none;
    align-items: center;
    gap: 0.5rem;
    position: fixed;
    left: 22px;
    bottom: 22px;
    max-width: min(320px, calc(100vw - 44px));
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 999px;
    background: #0a1d63;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 14px rgba(10, 29, 99, 0.35);
    transition: box-shadow .15s ease, transform .15s ease;
    z-index: 1060;
}

.st-calc-minimizado-chip.show {
    display: inline-flex;
}

.st-calc-minimizado-chip:hover {
    box-shadow: 0 6px 18px rgba(10, 29, 99, 0.45);
    transform: translateY(-2px);
    color: #ffffff;
}

.st-calc-minimizado-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #eaf1fb 0%, #fdf4e9 40%, #fff7eb 100%);
    color: #0f2138;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

.container-fluid > .row {
    align-items: flex-start;
}

.container-fluid > .row > main.col {
    min-width: 0;
    flex: 1 1 0%;
}

@media (min-width: 768px) {
    .container-fluid > .row {
        flex-wrap: nowrap;
    }

    .app-sidebar-column {
        flex: 0 0 225px;
        max-width: 225px;
    }
}

@media (min-width: 768px) {
    .products-page-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: flex-start;
    }

    .products-page-row > .app-sidebar-column,
    .products-page-row > .col-md-2 {
        flex: 0 0 225px !important;
        max-width: 225px !important;
    }

    .products-page-row > main,
    .products-page-row > main.col {
        flex: 1 1 auto !important;
        max-width: calc(100% - 225px) !important;
        min-width: 0 !important;
    }
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    border-radius: 40px;
    overflow: hidden;
    max-width: 1020px;
    width: 100%;
    border: none;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 40px 120px rgba(17, 40, 22, 0.16);
}

.login-banner {
    background: linear-gradient(135deg, #007a3d 0%, #00924f 45%, #ff8c24 100%);
    color: #ffffff;
    min-height: 100%;
    padding: 3rem 2.8rem;
    position: relative;
}

.login-banner::before {
    content: '';
    position: absolute;
    right: -40px;
    top: 0;
    width: 220px;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    transform: skewX(-12deg);
}

.login-banner .brand-title {
    font-size: 3.4rem;
    letter-spacing: 0.16em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    font-weight: 900;
}

.login-banner .brand-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.94);
    margin-bottom: 1.5rem;
}

.login-banner .feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-banner .feature-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.15rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.96);
    font-weight: 500;
}

.login-banner .feature-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 0.9rem;
    color: #fff2d1;
}

.login-card .card-body {
    padding: 3.5rem 3rem;
}

.login-card .form-control {
    border-radius: 16px;
    border: 1px solid #dce6dd;
    padding: 1rem 1.15rem;
    background: #f7faf6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-card .form-control:focus {
    border-color: #82c384;
    box-shadow: 0 0 0 0.15rem rgba(0, 122, 61, 0.12);
}

.login-card .form-label {
    font-weight: 700;
    color: #153525;
}

.login-card .btn-login {
    border-radius: 16px;
    padding: 1rem 1.2rem;
    background: #ff7c29;
    border: none;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 18px 35px rgba(255, 124, 41, 0.22);
    transition: transform 0.2s ease, background 0.2s ease;
}

.login-card .btn-login:hover {
    background: #e86b1f;
    transform: translateY(-1px);
}

.login-card .form-text {
    color: #5f6d63;
}

.login-card .alert {
    border-radius: 16px;
}

.bg-panel {
    background: #f8faf5;
}

.login-panel-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #102e1b;
}

.login-panel-subtitle {
    color: #4f6258;
    margin-bottom: 1.7rem;
}

.login-card .form-check-label {
    color: #4f6258;
}

.login-card .card-body .badge {
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

@media (max-width: 991.98px) {
    .login-banner {
        display: none;
    }
}

.navbar {
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.06);
}

.list-group-item {
    border: none;
    padding: 16px;
    font-weight: 600;
    color: #c9dbf5;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
    border-radius: 0 24px 24px 0;
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.sidebar-link.active {
    background: #2fa4e7;
    color: #ffffff;
}

.sidebar-link.active .bi {
    color: #ffffff;
}

.list-group-item.active .bi {
    color: #ffffff;
}

.sidebar-header {
    background: linear-gradient(135deg, #07235c, #0b3a8e);
    color: #ffffff;
}


.sidebar-link .bi {
    font-size: 1.1rem;
    margin-right: 0.85rem;
    color: #c9dbf5;
}

.sidebar-link.active .bi,
.sidebar-link:hover .bi {
    color: #ffffff;
}

.sidebar-link.active {
    font-weight: 700;
}

.table thead th {
    background: #eaf1fb;
    color: #07235c;
}

.btn-outline-primary,
.btn-outline-danger,
.btn-outline-secondary {
    border-radius: 14px;
}

.btn-outline-primary {
    border-color: #0b3a8e;
    color: #0b3a8e;
}

.btn-outline-primary:hover {
    background: rgba(11, 58, 142, 0.08);
}

.btn-secondary {
    background: #0b3a8e;
    color: #f8faf8;
    border: 1px solid transparent;
}

.btn-secondary:hover {
    background: #07235c;
    color: #ffffff;
}

/* Botao de acao principal (cor de marca) - substitui btn-success nos CTAs
   que nao sao mensagem/selo de "sucesso" (Novo Usuario, Cadastrar, Salvar,
   Adicionar item, Criar cotacao etc). Alertas de sucesso e selos "Ativo"
   continuam verdes (convencao universal de UI), so' os botoes de acao
   principal viraram azuis - ver skill/memoria do projeto. */
.btn-brand {
    background: #0b3a8e;
    border-color: #0b3a8e;
    color: #ffffff;
}

.btn-brand:hover,
.btn-brand:focus {
    background: #07235c;
    border-color: #07235c;
    color: #ffffff;
}

.icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* Bootstrap's bg-primary e' o azul padrao (#0d6efd) - substituido pelo azul
   de marca aqui pra bater com sidebar/cabecalhos, sem mexer na classe
   bg-primary em si (usada por outros elementos fora do dashboard). */
.icon-circle.bg-primary {
    background-color: #0b3a8e !important;
}

.dashboard-card {
    border-radius: 16px;
    min-height: 108px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-card .card-body {
    height: 100%;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(11, 58, 142, 0.14) !important;
}

.dashboard-card h6 {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.dashboard-card h4 {
    font-weight: 800;
    color: #12295a;
}

.dashboard-hero {
    background: linear-gradient(135deg, rgba(11, 58, 142, 0.12), rgba(255, 124, 41, 0.08));
    border-left: 6px solid #0b3a8e;
    border-radius: 24px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.dashboard-hero h2,
.dashboard-hero p {
    margin-bottom: 0.25rem;
}

.dashboard-hero .btn {
    min-width: 160px;
}

.import-check-card {
    border: 1px solid #d3e0f5;
    border-radius: 14px;
    overflow: hidden;
}

/* Resumo em chips compactos - padrao adotado em 2026-08-16, substitui o
   antigo .resumo-tabela (formato de tabela) em todas as telas de listagem.
   Icone colorido + valor em negrito + rotulo pequeno em maiuscula, dentro
   de um card arredondado. Tambem serve pra envolver busca/filtro (variante
   .resumo-chip-busca, input sem borda propria dentro do chip). */
.resumo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.resumo-chip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: #f5f7fb;
    border: 1px solid #dde3f0;
    border-radius: 10px;
    padding: 0.4rem 0.8rem;
}

.resumo-chip i {
    font-size: 1.05rem;
}

.resumo-chip .resumo-chip-valor {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.1;
    color: #0a1d63;
}

.resumo-chip .resumo-chip-label {
    display: block;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5a6684;
    white-space: nowrap;
}

.resumo-chip-danger i,
.resumo-chip-danger .resumo-chip-valor { color: #8c1d1d; }
.resumo-chip-warning i { color: #7d5600; }
.resumo-chip-info i { color: #0b3a8e; }
.resumo-chip-success i { color: #16653a; }
.resumo-chip-muted i { color: #6c757d; }

.resumo-chip-busca {
    flex: 1 1 260px;
    max-width: 420px;
}

.resumo-chip input.form-control {
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
    font-weight: 700;
    color: #0a1d63;
}

.resumo-chip-busca input.form-control {
    font-weight: 400;
    color: #212529;
    width: 100%;
}

.resumo-chip-filtro-num {
    width: 44px;
    text-align: center;
}

@media (max-width: 900px) {
    .resumo-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}

.import-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.import-summary .summary-chip {
    padding: 0.48rem 0.72rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid transparent;
    line-height: 1.1;
}

.import-summary .summary-ok {
    background: #e9f8ef;
    color: #16653a;
    border-color: #b9e8ca;
}

.import-summary .summary-missing {
    background: #fdecec;
    color: #8c1d1d;
    border-color: #f6c5c5;
}

.import-summary .summary-ready {
    background: #fff6e2;
    color: #7d5600;
    border-color: #f4dfae;
}

.import-summary .summary-imported {
    background: #e8f1ff;
    color: #1f4f93;
    border-color: #bfd5fb;
}

.import-check-header {
    background: linear-gradient(90deg, #07235c, #0b3a8e);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.import-check-header[data-bs-toggle="collapse"] .bi-chevron-right {
    transition: transform 0.2s ease;
}

.import-check-header[data-bs-toggle="collapse"][aria-expanded="true"] .bi-chevron-right {
    transform: rotate(90deg);
}

.import-check-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 0.75rem 1rem;
    background: #f4f7fb;
    border-bottom: 1px solid #e0e7f2;
    font-size: 0.92rem;
    color: #223552;
}

.import-check-table thead th {
    background: #0a1d63;
    color: #ffffff;
    border-color: #09164c;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    padding: 0.4rem 1.5rem;
}

.import-check-table tbody td {
    vertical-align: middle;
    border-top: 1px solid #e7edf7;
    font-size: 0.78rem;
    line-height: 1.15;
    padding: 0.15rem 1.5rem;
}

/* Dentro de modal (mais estreito que a tela cheia), o padding largo acima
   empurra colunas pra fora da area visivel, escondendo a ultima coluna
   atras de um scroll horizontal nao obvio - achado real 2026-08-26 no
   modal "Arquivos na pasta" (coluna Acoes sumindo). */
.modal .import-check-table thead th,
.modal .import-check-table tbody td {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.import-check-table .file-path {
    display: inline-block;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.import-check-table .btn-sm {
    padding: 0.08rem 0.4rem;
    font-size: 0.72rem;
    line-height: 1.3;
}

.import-check-table .btn-sm i {
    font-size: 0.72rem;
}

.import-check-table .status-pill {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.import-check-table .status-success {
    background: #e9f8ef;
    color: #16653a;
    border-color: #b9e8ca;
}

.import-check-table .status-danger {
    background: #fdecec;
    color: #8c1d1d;
    border-color: #f6c5c5;
}

.import-check-table .status-warning {
    background: #fff6e2;
    color: #7d5600;
    border-color: #f4dfae;
}

.import-check-table .status-info {
    background: #e8f1ff;
    color: #1f4f93;
    border-color: #bfd5fb;
}

.import-check-table .status-secondary {
    background: #f0f2f5;
    color: #415165;
    border-color: #d7dfe9;
}

.import-check-table .status-text-success {
    color: #16653a;
}

.import-check-table .status-text-danger {
    color: #8c1d1d;
}

.import-check-table .status-text-warning {
    color: #7d5600;
}

.import-check-table .status-text-info {
    color: #1f4f93;
}

.import-check-table .status-text-secondary {
    color: #415165;
}

.status-pill {
    display: inline-block;
    padding: 0.24rem 0.56rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid transparent;
}

.status-ativa {
    background: #e9f8ef;
    color: #16653a;
    border-color: #b9e8ca;
}

.status-vencendo {
    background: #fff6e2;
    color: #7d5600;
    border-color: #f4dfae;
}

.status-esgotada {
    background: #fdecec;
    color: #8c1d1d;
    border-color: #f6c5c5;
}

.status-vencida,
.status-info {
    background: #e8f1ff;
    color: #1f4f93;
    border-color: #bfd5fb;
}

#subsidy-list-grid .tabulator-header {
    background: #052a78;
    border-bottom: 1px solid #041f59;
}

#subsidy-list-grid .tabulator-header .tabulator-col {
    background: #052a78;
    border-right: 1px solid #214a9d;
}

#subsidy-list-grid .tabulator-header .tabulator-col .tabulator-col-title,
#subsidy-list-grid .tabulator-header .tabulator-col .tabulator-col-title-holder,
#subsidy-list-grid .tabulator-header .tabulator-col .tabulator-arrow {
    color: #ffffff;
    font-weight: 700;
}

#subsidy-list-grid .tabulator-row:nth-child(even) {
    background: #f6f8fb;
}

.import-check-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e0e7f2;
    background: #f8fbff;
    color: #1e3358;
    font-size: 0.9rem;
}

@media (max-width: 767.98px) {
    .import-summary {
        gap: 0.45rem;
    }

    .import-summary .summary-chip {
        font-size: 0.77rem;
    }

    .import-check-meta {
        flex-direction: column;
        gap: 0.45rem;
    }

    .import-check-table .file-path {
        max-width: 190px;
    }
}

.profile-card {
    border-radius: 24px;
    border: 1px solid #dfe9fa;
    background: #ffffff;
}

.profile-card .form-control {
    background: #f6f9fd;
}

.profile-card .form-label {
    color: #07235c;
}

.profile-card .mb-3 strong {
    color: #12295a;
}

.table thead th {
    background: #eaf1fb;
    color: #07235c;
}

.text-primary,
a.text-primary {
    color: #0b3a8e !important;
}

.list-panel {
    border: 1px solid #dfe9e2;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(17, 40, 22, 0.06);
}

.list-panel-header {
    padding: 0.85rem 1rem;
    background: #f1f8f3;
    border-bottom: 1px solid #dfe9e2;
    font-weight: 700;
    color: #134022;
}

.list-panel-body {
    max-height: 62vh;
    overflow: auto;
}

.products-table {
    min-width: 1650px;
    white-space: nowrap;
    margin-bottom: 0;
}

.products-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eaf1fb;
}

#products-list-grid .tabulator-header .tabulator-col {
    min-height: 36px;
}

#products-list-grid .tabulator-header .tabulator-col .tabulator-col-content {
    padding: 6px 8px;
}

#products-list-grid .tabulator-header .tabulator-col input {
    height: 30px;
    padding: 4px 8px;
}

#products-list-grid .tabulator-row .tabulator-cell {
    padding: 6px 8px;
    line-height: 1.2;
}

@media (max-width: 767.98px) {
    .app-sidebar-column {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        max-width: 82vw;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
    }

    .app-sidebar-column.show {
        transform: translateX(0);
    }

    .app-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(9, 22, 13, 0.45);
        z-index: 1040;
    }

    .app-sidebar-backdrop.show {
        display: block;
    }

    .navbar .navbar-brand {
        font-size: 1.15rem;
    }

    main.col,
    main.col.p-4 {
        padding: 1rem !important;
    }
}
