* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #2563eb;
}

header h1 {
    color: #1e293b;
    font-size: 2em;
    margin-bottom: 5px;
}

header p {
    color: #64748b;
    font-size: 1.1em;
}

.actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.import-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.import-section h3 {
    margin-bottom: 15px;
    color: #1e293b;
}

.import-section form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.form-section h2 {
    color: #1e293b;
    font-size: 1.3em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #cbd5e1;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #334155;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
    color: #1e293b;
    background-color: white;
}

select {
    cursor: pointer;
}

input[type="file"] {
    padding: 8px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    background: white;
    color: #1e293b;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
}

textarea {
    resize: vertical;
    font-family: inherit;
}

.item-row {
    display: grid;
    grid-template-columns: 2.4fr 0.8fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.pagamento-row {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-add,
.btn-remove,
.btn-cancel,
.btn-success {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background-color: #7c3aed;
    color: white;
}

.btn-secondary:hover {
    background-color: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-success {
    background-color: #059669;
    color: white;
}

.btn-success:hover {
    background-color: #047857;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-add {
    background-color: #059669;
    color: white;
    margin-top: 10px;
}

.btn-add:hover {
    background-color: #047857;
}

.btn-remove {
    background-color: #dc2626;
    color: white;
    padding: 10px 15px;
}

.btn-remove:hover {
    background-color: #b91c1c;
}

.btn-cancel {
    background-color: #64748b;
    color: white;
}

.btn-cancel:hover {
    background-color: #475569;
}

.total-section {
    background-color: #1e293b;
    color: white;
}

.total-section h2 {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    font-size: 1.5em;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* ============= LISTA DE ORÇAMENTOS ============= */
.lista-section {
    background: #f8fafc;
    padding: 25px;
    border-radius: 8px;
    margin-top: 40px;
    border: 2px solid #e2e8f0;
}

.lista-section h2 {
    color: #1e293b;
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #cbd5e1;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.filter-section input:focus {
    outline: none;
    border-color: #2563eb;
}

#orcamentos-container {
    display: grid;
    gap: 15px;
}

.orcamento-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.orcamento-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.orcamento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.orcamento-numero {
    font-weight: 700;
    color: #2563eb;
    font-size: 1.15em;
}

.orcamento-data {
    font-size: 0.85em;
    color: #64748b;
    font-style: italic;
}

.orcamento-info {
    margin-bottom: 15px;
}

.orcamento-info p {
    margin: 8px 0;
    font-size: 0.95em;
    color: #334155;
    line-height: 1.5;
}

.orcamento-info strong {
    color: #1e293b;
    font-weight: 600;
}

.orcamento-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.btn-small {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    flex: 1;
    min-width: 100px;
}

.btn-small.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-small.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-small.btn-secondary {
    background-color: #7c3aed;
    color: white;
}

.btn-small.btn-secondary:hover {
    background-color: #6d28d9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.btn-small.btn-danger {
    background-color: #dc2626;
    color: white;
}

.btn-small.btn-danger:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 1.1em;
    font-style: italic;
}

/* ============= RESPONSIVO ============= */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .actions {
        flex-direction: column;
    }

    .actions button {
        width: 100%;
    }

    .item-row,
    .pagamento-row {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary,
    .btn-success {
        width: 100%;
    }

    .orcamento-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .orcamento-actions {
        flex-direction: column;
    }

    .btn-small {
        width: 100%;
        min-width: auto;
    }

    .lista-section {
        padding: 15px;
    }

    .lista-section h2 {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.3em;
    }

    header p {
        font-size: 0.95em;
    }

    .form-section h2 {
        font-size: 1.1em;
    }

    .orcamento-numero {
        font-size: 1em;
    }

    .orcamento-data {
        font-size: 0.8em;
    }
}

.mao-obra-row {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

@media (max-width: 768px) {
    .mao-obra-row {
        grid-template-columns: 1fr;
    }
}
/* ============= SISTEMA LARAVEL ============= */
.topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: #64748b;
    font-size: 0.95em;
}

.btn-link {
    background: none;
    border: none;
    color: #2563eb;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.container-login {
    max-width: 420px;
    margin-top: 60px;
}

input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    font-size: 1em;
    color: #1e293b;
    background-color: white;
}

.label-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
}

.btn-largo {
    width: 100%;
}

.alerta-erro {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.editando-aviso {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.dica {
    color: #64748b;
    display: block;
    margin-top: 5px;
}

.btn-small.btn-success {
    background-color: #059669;
    color: white;
}

.btn-small.btn-success:hover {
    background-color: #047857;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* ============= MENU ============= */
.topbar {
    flex-wrap: wrap;
}

.menu {
    display: flex;
    gap: 6px;
    margin-right: auto;
    flex-wrap: wrap;
}

.menu a {
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 5px;
}

.menu a:hover {
    background: #f1f5f9;
}

.menu a.ativo {
    background: #eff6ff;
    color: #1d4ed8;
}

/* ============= ETAPAS ============= */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8em;
    font-weight: 700;
    background: #e2e8f0;
    color: #334155;
    vertical-align: middle;
    white-space: nowrap;
}

.badge-orcamento { background: #e2e8f0; color: #334155; }
.badge-aprovado { background: #dbeafe; color: #1e40af; }
.badge-em_execucao { background: #fef3c7; color: #92400e; }
.badge-concluido { background: #dcfce7; color: #166534; }
.badge-recusado { background: #fee2e2; color: #991b1b; }
.badge-cancelado { background: #f1f5f9; color: #64748b; text-decoration: line-through; }

.situacao-section {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.situacao-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.situacao-numero {
    font-weight: 700;
    font-size: 1.2em;
    color: #1e293b;
    margin-right: 8px;
}

.situacao-datas {
    color: #64748b;
    font-size: 0.9em;
}

.situacao-acoes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.situacao-acoes .btn-small {
    flex: 0 1 auto;
}

.aviso-bloqueio {
    margin-top: 15px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 10px 14px;
    border-radius: 5px;
}

.historico {
    margin-top: 15px;
    color: #334155;
}

.historico summary {
    cursor: pointer;
    font-weight: 600;
}

.historico ul {
    margin: 10px 0 0 20px;
    font-size: 0.9em;
    line-height: 1.7;
}

.campos-orcamento {
    border: none;
    min-width: 0;
}

.campos-orcamento:disabled input,
.campos-orcamento:disabled select,
.campos-orcamento:disabled textarea {
    background-color: #f1f5f9;
    color: #475569;
    cursor: not-allowed;
}

.campos-orcamento:disabled .btn-add {
    display: none;
}

/* Oculto mas ocupando o espaço, para as colunas continuarem alinhadas com o cabeçalho */
.campos-orcamento:disabled .btn-remove {
    visibility: hidden;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.filter-section {
    display: flex;
    gap: 10px;
}

.filter-section select {
    width: auto;
    min-width: 180px;
}

/* ============= RECEBIMENTOS ============= */
.recebimentos-resumo,
.indicadores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.recebimentos-resumo > div,
.indicador {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 15px;
}

.resumo-rotulo {
    display: block;
    color: #64748b;
    font-size: 0.85em;
    margin-bottom: 4px;
}

.recebimentos-resumo strong,
.indicador strong {
    font-size: 1.25em;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

.tabela-rolagem {
    overflow-x: auto;
}

.tabela {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95em;
}

.tabela th,
.tabela td {
    padding: 9px 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    color: #334155;
}

.tabela th {
    background: #f1f5f9;
    color: #1e293b;
    font-size: 0.85em;
    white-space: nowrap;
}

.tabela .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tabela a {
    color: #2563eb;
    font-weight: 600;
}

.tabela-vazia {
    text-align: center;
    color: #64748b;
    font-style: italic;
    padding: 20px;
}

.btn-link-perigo {
    color: #dc2626;
}

.form-recebimento {
    display: grid;
    grid-template-columns: 150px 1fr 140px 2fr auto;
    gap: 10px;
    align-items: end;
    margin-top: 15px;
}

.form-recebimento .form-group {
    margin-bottom: 0;
}

.form-recebimento input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    font-size: 1em;
    color: #1e293b;
}

.form-recebimento[hidden] {
    display: none;
}

/* ============= PAINEL ============= */
.filtro-periodo {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.filtro-periodo .form-group {
    margin-bottom: 0;
}

.filtro-periodo input[type="date"] {
    padding: 10px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    font-size: 1em;
    color: #1e293b;
}

.atalhos {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.atalho {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    color: #334155;
    text-decoration: none;
    font-size: 0.9em;
    background: white;
}

.atalho:hover {
    border-color: #2563eb;
}

.atalho.ativo {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.destaque {
    margin-bottom: 15px;
}

.destaque-valor {
    display: block;
    font-size: 3em;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.1;
}

.destaque-detalhe {
    color: #64748b;
}

.subtitulo {
    margin: 25px 0 10px;
    color: #1e293b;
    font-size: 1.05em;
}

.tabela-formas .col-barra {
    width: 40%;
}

.barra-horizontal {
    display: block;
    height: 12px;
    background: #2563eb;
    border-radius: 0 4px 4px 0;
    min-width: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.grafico-subtitulo {
    color: #64748b;
    margin: -5px 0 15px;
}

.grafico {
    position: relative;
    height: 260px;
    margin: 30px 16px 40px 80px;
}

.grafico-grade {
    position: absolute;
    inset: 0;
}

.grade-linha {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid #e2e8f0;
}

.grade-linha span {
    position: absolute;
    right: calc(100% + 8px);
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.8em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.grafico-colunas {
    position: absolute;
    inset: 0;
    display: flex;
}

.grafico-faixa {
    flex: 1;
    position: relative;
    min-width: 0;
}

.coluna-alvo {
    position: absolute;
    inset: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: default;
}

.coluna-alvo:hover,
.coluna-alvo:focus-visible {
    background: rgba(37, 99, 235, 0.06);
    outline: none;
}

.coluna {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: var(--altura);
    width: min(24px, 60%);
    background: #2563eb;
    border-radius: 4px 4px 0 0;
}

.coluna-alvo:hover .coluna,
.coluna-alvo:focus-visible .coluna {
    background: #1d4ed8;
}

.coluna-rotulo {
    position: absolute;
    bottom: var(--altura);
    left: 50%;
    transform: translate(-50%, -6px);
    font-size: 0.8em;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.coluna-eixo {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    text-align: center;
    color: #64748b;
    font-size: 0.8em;
    white-space: nowrap;
}

.dica-grafico {
    display: none;
    position: absolute;
    /* Logo acima da coluna, sem sair da área do gráfico nas colunas mais altas */
    bottom: calc(min(var(--altura), 70%) + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.85em;
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
    text-align: left;
}

.dica-grafico strong,
.dica-grafico span {
    display: block;
}

.dica-grafico span {
    color: #cbd5e1;
}

.coluna-alvo:hover .dica-grafico,
.coluna-alvo:focus-visible .dica-grafico {
    display: block;
}

.grafico-faixa:first-child .dica-grafico { left: 0; transform: none; }
.grafico-faixa:last-child .dica-grafico { left: auto; right: 0; transform: none; }

.tabela-grafico summary {
    cursor: pointer;
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 10px;
}

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

    .filter-section {
        flex-direction: column;
    }

    .filter-section select {
        width: 100%;
    }

    .destaque-valor {
        font-size: 2.2em;
    }

    .grafico {
        margin-left: 70px;
    }

    .coluna-eixo-secundario {
        display: none;
    }

    .situacao-acoes .btn-small {
        flex: 1 1 100%;
    }
}

/* ============= RELATÓRIO SEMANAL ============= */
.tabela-semanas {
    margin-top: 10px;
}

.tabela tfoot th {
    background: #f1f5f9;
    border-top: 2px solid #cbd5e1;
}

.tabela .linha-vazia td {
    color: #94a3b8;
}

.tabela td:first-child a {
    white-space: nowrap;
}

.tabela-semanas td:first-child {
    white-space: nowrap;
}

/* ============= LINHAS DE ITENS, MÃO DE OBRA E PAGAMENTO ============= */
.secao-ajuda {
    color: #475569;
    font-size: 0.92em;
    line-height: 1.5;
    margin: -5px 0 15px;
}

.linha-cabecalho {
    margin-bottom: 6px;
}

.linha-cabecalho span {
    color: #334155;
    font-size: 0.85em;
    font-weight: 700;
}

.linha-cabecalho span:nth-child(2),
.linha-cabecalho span:nth-child(3),
.linha-cabecalho span:nth-child(4) {
    text-align: right;
}

.mao-obra-row.linha-cabecalho span:nth-child(3),
.pagamento-row.linha-cabecalho span:nth-child(3) {
    text-align: left;
}

label.campo-linha,
.campo-linha {
    display: block;
    margin: 0;
    font-weight: 400;
    min-width: 0;
}

/* No computador o cabeçalho da seção identifica as colunas; o rótulo fica só para leitores de tela */
.rotulo-linha {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.item-row input.quantidade,
.item-row input.valor,
.mao-obra-row input.valor-mao-obra,
.pagamento-row input.valor-pagamento {
    text-align: right;
}

/* Botão Remover com largura fixa, reservada também no cabeçalho, para as colunas alinharem */
.item-row .btn-remove,
.mao-obra-row .btn-remove,
.pagamento-row .btn-remove,
.linha-cabecalho span:last-child {
    width: 96px;
}

.subtotal {
    display: block;
    text-align: right;
    font-weight: 600;
    color: #1e293b;
    padding: 10px 0;
    font-variant-numeric: tabular-nums;
}

.secao-rodape {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.secao-total {
    margin-top: 10px;
    margin-left: auto;
    color: #334155;
}

.secao-total strong {
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

.aviso-diferenca {
    margin-top: 12px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 10px 14px;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .linha-cabecalho {
        display: none;
    }

    .rotulo-linha {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        white-space: normal;
        display: block;
        margin-bottom: 4px;
        color: #334155;
        font-size: 0.85em;
        font-weight: 700;
    }

    .item-row,
    .mao-obra-row,
    .pagamento-row {
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 12px;
        gap: 10px;
    }

    .subtotal {
        text-align: left;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .item-row .btn-remove,
    .mao-obra-row .btn-remove,
    .pagamento-row .btn-remove {
        width: 100%;
    }

    .campos-orcamento:disabled .btn-remove {
        display: none;
    }
}

@media (max-width: 768px) {
    .item-row input.quantidade,
    .item-row input.valor,
    .mao-obra-row input.valor-mao-obra,
    .pagamento-row input.valor-pagamento {
        text-align: left;
    }
}

/* ============= LISTA E FORMULÁRIO EM TELAS SEPARADAS ============= */
.formulario-barra {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}

.link-voltar {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.link-voltar:hover {
    text-decoration: underline;
}

.lista-barra {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 10px;
}

.lista-barra .filter-section {
    flex: 1;
    margin-bottom: 0;
}

.filter-section input[type="search"] {
    flex: 1;
}

a.btn-success,
a.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
}

.btn-novo {
    white-space: nowrap;
}

.lista-contagem {
    color: #64748b;
    font-size: 0.9em;
    margin-bottom: 10px;
    min-height: 1.2em;
}

a.orcamento-numero {
    text-decoration: none;
}

a.orcamento-numero:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .lista-barra {
        flex-direction: column;
    }
}

/* ============= DESCONTO ============= */
.campo-desconto input {
    max-width: 240px;
}

.total-detalhe {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    color: #cbd5e1;
}

.total-detalhe[hidden] {
    display: none;
}

.total-detalhe dt {
    font-size: 0.85em;
}

.total-detalhe dd {
    margin: 0;
    font-size: 1.15em;
    font-weight: 600;
    color: white;
    font-variant-numeric: tabular-nums;
}

.tabela-recebimentos td:first-child,
.tabela-recebimentos td:nth-child(2),
.tabela-recebimentos td:nth-child(4) {
    white-space: nowrap;
}

/* Gaveta (details) dentro de um bloco do painel */
.gaveta {
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.gaveta summary {
    cursor: pointer;
    color: #2563eb;
    font-weight: 600;
}

.gaveta[open] summary {
    margin-bottom: 12px;
}

/* ============= PAGINAÇÃO ============= */
.paginacao {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.paginacao[hidden] {
    display: none;
}

.paginacao-info {
    color: #64748b;
    font-size: 0.9em;
    font-variant-numeric: tabular-nums;
}

.paginacao-botoes {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.paginacao-botoes button {
    min-width: 38px;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: white;
    color: #334155;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

.paginacao-botoes button:hover:not(:disabled) {
    border-color: #2563eb;
    color: #2563eb;
}

.paginacao-botoes button.atual {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.paginacao-reticencias {
    color: #64748b;
    padding: 0 4px;
}

@media (max-width: 768px) {
    .paginacao {
        justify-content: center;
    }

    .paginacao-palavra {
        display: none;
    }
}
