@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    color: #2c2c2c;
    background-color: #f7f7f7;
}

.cabecalho-marca {
    position: fixed;
    top: 1.25rem;
    left: 1.5rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    max-width: calc(100vw - 12rem);
}

.logotipo-marca {
    display: flex;
    align-items: center;
    max-height: calc(0.45rem * 2 + 0.95rem + 2px);
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
}

.logotipo-marca img {
    display: block;
    height: calc(0.45rem * 2 + 0.95rem);
    width: auto;
    max-width: min(200px, 40vw);
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logotipo-marca:hover img {
    transform: scale(1.08);
}

.saudacao-utilizador {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.saudacao-utilizador-separador {
    width: 1px;
    height: 1.85rem;
    background-color: #d0d0d0;
    flex-shrink: 0;
}

.saudacao-utilizador-texto {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: #2c2c2c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-container {
    position: fixed;
    top: calc(1.25rem + 1.85rem + 0.85rem);
    left: 1.5rem;
    z-index: 2100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(320px, calc(100vw - 3rem));
    pointer-events: none;
}

.toast {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(-0.4rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-sucesso {
    color: #2d6a4a;
    background-color: #f3faf6;
    border-color: #3d8b5f;
}

.toast-erro {
    color: #9b2c2c;
    background-color: #fef2f2;
    border-color: #e53e3e;
}

.toast.visivel {
    opacity: 1;
    transform: translateY(0);
}

.toast svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: currentColor;
    flex-shrink: 0;
}

.btn-terminar-sessao {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: #2c2c2c;
    background-color: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-terminar-sessao[hidden] {
    display: none;
}

.btn-terminar-sessao svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: currentColor;
}

.btn-terminar-sessao:hover {
    background-color: #f5f5f5;
    border-color: #888;
    color: #111;
}

form {
    width: min(100%, 1320px);
    padding: 0 1.5rem;
}

.filtros-campos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.campo {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 220px;
}

.adicionar-cliente,
.adicionar-encomenda {
    align-self: center;
    margin-top: 0.15rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: #666;
    text-decoration: underline;
    transition: color 0.15s ease;
}

.adicionar-cliente:hover,
.adicionar-encomenda:hover {
    color: #2c2c2c;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
}

select {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background-color: #fff;
    color: #2c2c2c;
    cursor: pointer;
}

.select-pesquisa-native {
    display: none;
}

.select-pesquisa {
    position: relative;
    width: 100%;
}

.select-pesquisa-botao {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    text-align: left;
    color: #2c2c2c;
    background-color: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.select-pesquisa-botao:hover:not(:disabled) {
    border-color: #bbb;
}

.select-pesquisa-botao:focus {
    outline: none;
    border-color: #888;
}

.select-pesquisa-texto.placeholder {
    color: #999;
}

.select-pesquisa-seta {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: #888;
    transition: transform 0.15s ease;
}

.select-pesquisa.aberto .select-pesquisa-seta {
    transform: rotate(180deg);
}

.select-pesquisa.desativado .select-pesquisa-botao {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

.select-pesquisa-dropdown {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 20;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.select-pesquisa-dropdown[hidden] {
    display: none;
}

.select-pesquisa-campo {
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.45rem 0.65rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background-color: #fff;
    color: #2c2c2c;
}

.select-pesquisa-campo:focus {
    outline: none;
    border-color: #888;
}

.select-pesquisa-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 180px;
    overflow-y: auto;
}

.select-pesquisa-opcao,
.select-pesquisa-vazio {
    padding: 0.55rem 0.65rem;
    font-size: 0.9rem;
    border-radius: 5px;
}

.select-pesquisa-opcao {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.select-pesquisa-opcao:hover,
.select-pesquisa-opcao.selecionada {
    background-color: #f5f5f5;
}

.select-pesquisa-vazio {
    color: #999;
    text-align: center;
}

select:focus {
    outline: none;
    border-color: #888;
}

select:disabled {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

.separador {
    margin: 1.75rem auto 0;
    width: 60%;
    border: none;
    border-bottom: 1px solid #ddd;
}

.form-linha-apresentacao {
    display: flex;
    justify-content: center;
}

.form-linha-apresentacao .resumo-itens {
    margin-bottom: 0;
}

.resumo-selecao {
    padding: 1rem 1.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    text-align: center;
}

.resumo-itens {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.85rem;
}

.resumo-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    color: #2c2c2c;
    background-color: #f7f7f7;
    border: 1px solid #ececec;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.resumo-label {
    font-weight: 600;
    color: #777;
}

.resumo-label::after {
    content: ':';
}

.btn-escolher-linha {
    padding: 0.45rem 0.8rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: #2c2c2c;
    background-color: #fff;
    border: 1px dashed #bbb;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-escolher-linha:hover {
    background-color: #f5f5f5;
    border-color: #888;
    color: #111;
}

.detalhe-linha {
    margin-top: 1.25rem;
}

.detalhe-linha .tabela-cabecalho {
    margin-top: 0;
    margin-bottom: 0.5rem;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.quantidades-inspecao {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.campo-quantidade {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.campo-quantidade label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

#qt-total {
    box-sizing: border-box;
    width: 5.5rem;
    min-height: 2.05rem;
    padding: 0.45rem 0.65rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background-color: #fff;
    color: #2c2c2c;
}

#qt-total:focus {
    outline: none;
    border-color: #888;
}

#qt-insp.completo {
    border-color: #3d8b5f;
    background-color: #f3faf6;
    color: #2d6a4a;
}

#qt-insp.completo .resumo-label {
    color: #2d6a4a;
}

.detalhe-linha-acoes {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.detalhe-linha .tabela-wrapper {
    margin-top: 0;
}

.btn-acao-tabela {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: #2c2c2c;
    background-color: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-acao-tabela.completo {
    border-color: #3d8b5f;
    background-color: #f3faf6;
    color: #2d6a4a;
}

.btn-indicador-concluido {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-indicador-concluido[hidden] {
    display: none;
}

.btn-indicador-concluido svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: currentColor;
}

.btn-acao-tabela:hover {
    background-color: #f5f5f5;
    border-color: #888;
    color: #111;
}

.btn-acao-tabela.completo:hover {
    background-color: #e8f5ee;
    border-color: #3d8b5f;
    color: #2d6a4a;
}

.tabela-wrapper-modal {
    margin-top: 0;
}

#tabela-medidas-referencia tbody tr {
    cursor: default;
}

#tabela-medidas-referencia tbody tr:hover {
    background-color: transparent;
}

#tabela-medidas-referencia tfoot tr {
    cursor: default;
}

.form-medida {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-medida[hidden] {
    display: none;
}

.form-medida .campo {
    min-width: 0;
    max-width: none;
}

.fotos-visualizacao {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.foto-area {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    border: 1px dashed #d4d4d4;
    border-radius: 8px;
    background-color: #f7f7f7;
    color: #bbb;
}

.foto-area svg {
    width: 3.5rem;
    height: 3.5rem;
    fill: currentColor;
}

.fotos-navegacao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}

.fotos-navegacao button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background-color: #fff;
    color: #666;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fotos-navegacao button:hover:not(:disabled) {
    background-color: #f5f5f5;
    border-color: #bbb;
    color: #2c2c2c;
}

.fotos-navegacao button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#foto-indicador {
    min-width: 3rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    text-align: center;
}

.assinatura-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.assinatura-area {
    height: 160px;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background-color: #fff;
    overflow: hidden;
    touch-action: none;
    user-select: none;
}

#canvas-assinatura {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
}

.assinatura-acoes {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-limpar-assinatura {
    flex: 1;
    padding: 0.7rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2c2c2c;
    background-color: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-limpar-assinatura:hover {
    background-color: #f5f5f5;
    border-color: #888;
    color: #111;
}

.assinatura-acoes .btn-adicionar {
    flex: 1;
}

.assinatura-visualizacao img {
    display: block;
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fff;
}

.menu-flutuante-conteudo-checklist {
    max-height: min(90vh, 820px);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tabela-wrapper.tabela-wrapper-checklist {
    flex: 1;
    min-height: 0;
    max-height: min(62vh, 520px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.tabela-checklist thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.tabela-checklist {
    font-size: 0.85rem;
}

.tabela-checklist th,
.tabela-checklist td {
    text-align: center;
}

.tabela-checklist th:not(:first-child),
.tabela-checklist td:not(:first-child) {
    width: 5rem;
}

.tabela-checklist tbody tr {
    cursor: default;
}

.tabela-checklist tbody tr:hover {
    background-color: #fafafa;
}

.tabela-checklist input[type="radio"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #2c2c2c;
    cursor: pointer;
}

@media (min-width: 901px) {
    .tabela-wrapper.tabela-wrapper-checklist {
        scrollbar-gutter: stable;
        scrollbar-width: thin;
        scrollbar-color: #bbb #f0f0f0;
    }

    .tabela-wrapper.tabela-wrapper-checklist::-webkit-scrollbar {
        width: 10px;
    }

    .tabela-wrapper.tabela-wrapper-checklist::-webkit-scrollbar-track {
        background-color: #f0f0f0;
        border-radius: 999px;
    }

    .tabela-wrapper.tabela-wrapper-checklist::-webkit-scrollbar-thumb {
        background-color: #bbb;
        border-radius: 999px;
        border: 2px solid #f0f0f0;
    }

    .tabela-wrapper.tabela-wrapper-checklist::-webkit-scrollbar-thumb:hover {
        background-color: #999;
    }
}

@media (max-width: 900px) {
    .tabela-wrapper.tabela-wrapper-checklist {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .tabela-wrapper.tabela-wrapper-checklist::-webkit-scrollbar {
        display: none;
    }
}

#tabela-detalhe-linha .coluna-estado,
#tabela-detalhe-linha td:first-child {
    width: 3.5rem;
}

.estado-linha {
    display: inline-block;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 1px solid #d4d4d4;
    border-radius: 50%;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.estado-linha.estado-verde {
    background-color: #3d8b5f;
    border-color: #3d8b5f;
}

.estado-linha.estado-laranja {
    background-color: #e67e22;
    border-color: #e67e22;
}

.estado-linha.estado-vermelho {
    background-color: #c0392b;
    border-color: #c0392b;
}

#tabela-detalhe-linha tbody tr {
    cursor: pointer;
}

#tabela-detalhe-linha tfoot tr {
    cursor: default;
}

#tabela-detalhe-linha tbody tr:hover {
    background-color: #fafafa;
}

.fotos-acoes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-foto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background-color: #fff;
    color: #666;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-foto svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: currentColor;
}

.btn-foto:hover {
    background-color: #f5f5f5;
    border-color: #bbb;
    color: #2c2c2c;
}

.btn-foto.adicionar-foto.com-foto {
    border-color: #3d8b5f;
    background-color: #f3faf6;
    color: #2d6a4a;
}

.btn-foto.adicionar-foto.com-foto:hover {
    background-color: #e8f5ee;
    border-color: #3d8b5f;
    color: #2d6a4a;
}

.tabela-cabecalho {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.pesquisar-tabela {
    width: min(100%, 200px);
    padding: 0.45rem 0.65rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background-color: #fff;
    color: #2c2c2c;
}

.pesquisar-tabela:focus {
    outline: none;
    border-color: #888;
}

.pesquisar-tabela::-webkit-search-cancel-button {
    cursor: pointer;
}

.tabela-wrapper {
    margin-top: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th,
td {
    padding: 0.85rem 1rem;
    text-align: center;
}

th {
    background-color: #f0f0f0;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
}

tbody tr {
    cursor: pointer;
}

tbody tr:not(:last-child) td {
    border-bottom: 1px solid #eee;
}

tbody tr:hover {
    background-color: #fafafa;
}

.destaque-pesquisa {
    background-color: #fff0a6;
    color: inherit;
    padding: 0.1em 0.15em;
    border-radius: 3px;
}

.adicionar-linha,
.adicionar-linha-detalhe,
.adicionar-medida {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c2c2c;
    text-decoration: none;
    border: 1px dashed #bbb;
    border-radius: 6px;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.adicionar-linha:hover,
.adicionar-linha-detalhe:hover,
.adicionar-medida:hover {
    background-color: #f5f5f5;
    border-color: #888;
    color: #111;
}

tfoot tr {
    cursor: default;
}

tfoot td {
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
    background-color: #fafafa;
}

.paginacao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.paginacao button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background-color: #fff;
    color: #2c2c2c;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.paginacao button:hover:not(:disabled) {
    background-color: #f0f0f0;
    border-color: #bbb;
}

.paginacao button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.paginacao span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"] {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background-color: #fff;
    color: #2c2c2c;
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: #888;
}

.menu-flutuante {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.35);
    z-index: 1000;
}

.menu-flutuante[hidden] {
    display: none;
}

.menu-flutuante-sessao {
    z-index: 2000;
}

.menu-flutuante-sessao .menu-flutuante-cabecalho {
    justify-content: center;
}

.menu-flutuante-conteudo {
    width: min(100%, 420px);
    padding: 1.5rem;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.menu-flutuante-conteudo-largo {
    width: min(100%, 480px);
}

.menu-flutuante-conteudo.menu-flutuante-conteudo-medidas {
    width: min(100%, 520px);
}

.menu-flutuante-conteudo.menu-flutuante-conteudo-assinatura {
    width: min(100%, 600px);
}

.menu-flutuante-conteudo.menu-flutuante-conteudo-fotos {
    width: min(100%, 520px);
}

.menu-flutuante-conteudo.menu-flutuante-conteudo-checklist {
    width: min(100%, 980px);
}

.menu-flutuante-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.menu-flutuante-cabecalho h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.fechar-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 6px;
    background: none;
    color: #666;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fechar-menu:hover {
    background-color: #f0f0f0;
    color: #2c2c2c;
}

.form-linha {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-linha .campo {
    min-width: 0;
    max-width: none;
}

.form-linha-acoes {
    margin-top: 0.5rem;
}

.btn-adicionar-linha,
.btn-adicionar {
    width: 100%;
    padding: 0.7rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background-color: #2c2c2c;
    border: 1px solid #2c2c2c;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-adicionar-linha:hover,
.btn-adicionar:hover {
    background-color: #444;
    border-color: #444;
}

/* Tablet horizontal (~11") — landscape 1024px–1366px */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
    body {
        justify-content: flex-start;
        padding: 4.75rem 0 1.5rem;
    }

    form {
        width: 100%;
        max-width: none;
        padding: 0 1.25rem;
    }

    .cabecalho-marca {
        top: 1rem;
        left: 1.25rem;
        max-width: calc(100vw - 10rem);
    }

    .logotipo-marca {
        top: auto;
        left: auto;
    }

    .logotipo-marca img {
        max-width: min(180px, 22vw);
    }

    .btn-terminar-sessao {
        top: 1rem;
        right: 1.25rem;
    }

    .toast-container {
        top: calc(1rem + 1.85rem + 0.65rem);
        left: 1.25rem;
        max-width: min(300px, calc(100vw - 2.5rem));
    }

    .filtros-campos {
        gap: 1.25rem;
    }

    .campo {
        flex: 1 1 0;
        min-width: 0;
        max-width: 320px;
    }

    .resumo-selecao {
        padding: 0.85rem 1rem;
    }

    .resumo-itens {
        flex-wrap: wrap;
        row-gap: 0.45rem;
    }

    .resumo-item {
        font-size: 0.76rem;
        padding: 0.3rem 0.55rem;
    }

    .detalhe-linha .tabela-cabecalho {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .quantidades-inspecao {
        flex: 1 1 auto;
    }

    .detalhe-linha-acoes {
        flex: 1 1 auto;
        justify-content: flex-end;
    }

    .tabela-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #tabela-detalhe-linha {
        min-width: 680px;
    }

    #tabela-encomenda {
        min-width: 520px;
    }

    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 0.65rem 0.75rem;
    }

    th {
        font-size: 0.72rem;
    }

    .estado-linha {
        width: 1.5rem;
        height: 1.5rem;
    }

    .btn-foto {
        width: 2.35rem;
        height: 2.35rem;
    }

    .btn-acao-tabela,
    .btn-escolher-linha {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .menu-flutuante {
        padding: 1rem;
    }

    .menu-flutuante-conteudo.menu-flutuante-conteudo-checklist {
        width: min(100%, calc(100vw - 2rem));
        max-height: min(88vh, 720px);
    }

    .tabela-wrapper.tabela-wrapper-checklist {
        max-height: min(58vh, 480px);
    }

    .menu-flutuante-conteudo.menu-flutuante-conteudo-assinatura {
        width: min(100%, calc(100vw - 2rem));
    }

    .assinatura-area {
        height: 140px;
    }

    .tabela-checklist {
        font-size: 0.8rem;
    }

    .tabela-checklist th:not(:first-child),
    .tabela-checklist td:not(:first-child) {
        width: 4.25rem;
    }
}
