﻿/* zera margens padrão e evita calhas laterais */
html, body, form {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-size: .80em;
    font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
    margin: 0px;
    padding: 0px;
    color: #696969;
}

/* barra do topo */
.header-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}

/* logo não cresce */
.header-logo {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
}

/* área do texto PRECISA ter min-width:0 para o ellipsis funcionar em flex */
.header-brand {
    flex: 1 1 auto;
    min-width: 0;
}

/* corta com reticências numa linha */
.company-name {
    display: block;
    font-weight: 800;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* opcional: reduzir um pouco no celular */
@media (max-width:420px) {
    .company-name {
        font-size: clamp(18px, 5vw, 24px);
    }
}


.template {
    background-color: Transparent !important;
    border: none !important;
    background: none;
    border: 0 none !important;
    text-decoration: none;
    border-bottom-width: 0px !important;
    border-color: transparent;
}

div.RadToolBar_Default .rtbOuter {
    border: none !important;
}

div.RadToolBar_Default .rtbOuter {
    border: none;
}

div.RadToolBar_Default .rtbMiddle {
    border: none;
}


.classPO_Text:focus {
    background-color: white !important;
    border-color: white;
    /*                                border:1px solid #383838;
                        -webkit-box-shadow: 0 0 -5px #383838;
                        -moz-box-shadow: 0 0 2px #383838;
                        box-shadow:0 0 10px #383838;
                        border-radius: 8px;
*/
}

/*                        .ErrorControl
                {
                    background-color: #FBE3E4;
                    border: solid 1px Red;
                    padding-left: 10px;
                }*/

.classPO_ButtonStyle {
    border-radius: 50px;
    height: 45px;
    width: 100%;
    border-width: 1px;
    background-color: darkslategray;
    color: white;
}

.classPO_Parent {
    position: relative;
    text-align: center;
    vertical-align: central;
}

.classPO_container {
    color: darkslategray;
    background-color: transparent;
    padding: 12px;
    font-family: Arial;
}

    .classPO_container h4, H5 {
        color: darkslategray;
        padding: 12px;
        font-family: Arial;
    }


.classPO_DivContainer {
    padding: 12px;
    width: 100%;
    text-align: center;
    background-color: transparent;
}

.classPO_ObjectLabelText {
    position: absolute;
    font-weight: bold;
    left: 15px;
    top: 0px;
    padding-top: 0px;
    background-color: #fff;
    color: darkslategray;
}

.classPO_Validator {
    position: relative;
    top: 35px;
    left: 12px;
}


.classPO_MainDiv {
    position: relative;
    top: 0;
    padding-top: 10px;
    padding-bottom: 0px;
    padding-left: 0px;
    padding-right: 0px;
    background-color: white;
    vertical-align: central;
    text-align: center;
}

.classPO_SubDiv {
    border-radius: 8px;
    border-style: solid;
    position: relative;
    min-height: 50px;
    text-align: left;
    border-color: darkgray;
    border-width: 1px;
    background-color: white;
    vertical-align: middle;
    padding-top: 4px;
    padding-left: 6px;
    padding-right: 6px;
}

.classPO_TableZeroSpace {
    border: none;
    border-collapse: collapse;
    padding: 0;
    margin: 0;
    border-spacing: 0px;
}

.classPO_VerticalCenteredElement {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    height: 25px; /*requires explicit height*/
    padding-left: 12px;
}

.classPO_TableCustStyle1 {
    border-spacing: 3px;
    background-color: transparent;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    /*                border-collapse:separate;
                border:solid black 1px;
                border-radius:6px;
*/
}

    .classPO_TableCustStyle1 a {
        color: White !important;
        /*background-color: aliceblue;*/
        font-weight: bold;
    }

    .classPO_TableCustStyle1 th {
        padding: 3px;
        vertical-align: middle;
        background-color: darkslategray;
        color: white;
        text-align: center;
    }

    .classPO_TableCustStyle1 td {
        padding: 5px;
        vertical-align: middle;
        /*background-color: whitesmoke;*/
    }


.classPO_TableCustStyle2 {
    border-spacing: 3px;
    border-color: transparent;
    background-color: aliceblue;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    border-collapse: separate;
    /*border:solid black 1px;
                border-radius:6px;
    */
}

    .classPO_TableCustStyle2 a {
        color: White !important;
        /*background-color: aliceblue;*/
        font-weight: bold;
    }

    .classPO_TableCustStyle2 th {
        padding: 3px;
        border-spacing: 3px;
        vertical-align: middle;
        border-color: transparent;
        background-color: darkslategray !important;
        color: white;
        text-align: center;
    }

    .classPO_TableCustStyle2 td {
        padding: 5px;
        border-spacing: 3px;
        vertical-align: middle;
        border-color: transparent;
        /*background-color: whitesmoke;*/
    }

    .classPO_TableCustStyle2.grid {
        border-collapse: collapse;
    }

        .classPO_TableCustStyle2.grid tr {
            border: 0px solid white;
            border-width: 20px 0;
        }




.classPO_TableCustStyle3 {
    border-spacing: 3px;
    border-color: transparent;
    /*                background-color: aliceblue;*/
    margin-left: auto;
    margin-right: auto;
    border-collapse: separate;
}

    .classPO_TableCustStyle3 th {
        padding: 3px;
        border-spacing: 3px;
        vertical-align: middle;
        border-color: transparent;
        background-color: darkslategray;
        color: white;
        text-align: center;
    }

    .classPO_TableCustStyle3 td {
        padding: 5px;
        border-spacing: 3px;
        vertical-align: middle;
        border-color: transparent;
        /*background-color: whitesmoke;*/
    }


.classPO_TableCustStyle4 {
    font-size: small;
    border-spacing: 1px;
    border-color: transparent;
    background-color: aliceblue;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    border-collapse: separate;
    /*border:solid black 1px;
                border-radius:6px;
    */
}

    .classPO_TableCustStyle4 a {
        color: White !important;
        background-color: aliceblue;
        font-weight: bold;
        font-size: xx-small;
    }

    .classPO_TableCustStyle4 th {
        padding: 3px;
        border-spacing: 1px;
        vertical-align: middle;
        border-color: transparent;
        background-color: darkslategray !important;
        color: white;
        text-align: center;
        font-size: xx-small;
    }

    .classPO_TableCustStyle4 td {
        padding: 5px;
        border-spacing: 1px;
        vertical-align: middle;
        border-color: transparent;
        font-size: xx-small;
        /*background-color: whitesmoke;*/
    }

    .classPO_TableCustStyle4.grid {
        border-collapse: collapse;
        font-size: xx-small;
    }

        .classPO_TableCustStyle4.grid tr {
            border: 0px solid white;
            border-width: 20px 0;
            font-size: xx-small;
        }


.classPO_TableCustStyle5 {
    font-size: small;
    border-spacing: 1px;
    border-color: transparent;
    background-color: aliceblue;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    border-collapse: separate;
    /*border:solid black 1px;
                border-radius:6px;
    */
}

    .classPO_TableCustStyle5 a {
        color: White !important;
        background-color: aliceblue;
        font-weight: bold;
        font-size: small;
    }

    .classPO_TableCustStyle5 th {
        padding: 3px;
        border-spacing: 1px;
        vertical-align: middle;
        border-color: transparent;
        background-color: darkslategray !important;
        color: white;
        text-align: center;
        font-size: small;
    }

    .classPO_TableCustStyle5 td {
        padding: 5px;
        border-spacing: 1px;
        vertical-align: middle;
        border-color: transparent;
        font-size: smalll;
        /*background-color: whitesmoke;*/
    }

    .classPO_TableCustStyle5.grid {
        border-collapse: collapse;
        font-size: small;
    }

        .classPO_TableCustStyle5.grid tr {
            border: 0px solid white;
            border-width: 20px 0;
            font-size: small;
        }



.classPO_vertical-center {
    margin: 0;
    position: absolute;
    top: 50%;
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

.classPO_TableTDBackColorDefault {
    background-color: aliceblue;
}

.classPO_RadToolBarStyle {
    padding-top: 30px;
}


/* CHAT GPT */

/* === Base inputs (coerente para mobile) === */
.classPO_Text {
    height: 46px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #D6DDE4;
    font-size: 16px;
    line-height: 22px;
}

/* Variantes compactas p/ campos curtos (Ano/Cor/Motor/Complemento) */
.classPO_Text--sm {
    height: 40px;
    padding: 8px 10px;
    border-radius: 10px;
    line-height: 20px;
}

.classPO_Text--xs {
    height: 36px;
    padding: 7px 10px;
    border-radius: 10px;
    line-height: 18px;
}

.classPO_Text--num {
    text-align: left;
    letter-spacing: .08em;
}

/* Label flutuante não bloqueia clique */
.classPO_ObjectLabelText {
    pointer-events: none;
    z-index: 1;
    padding: 0 6px;
    border-radius: 8px;
    background: #fff;
}
/* respiro superior dentro do “cartão” */
.classPO_SubDiv {
    padding-top: 14px;
}

/* ===== Select moderno (única definição) ===== */
.classPO_SelectWrap {
    position: relative;
    display: flex;
    align-items: center;
}

    /* tampa branca que cobre o ícone nativo */
    .classPO_SelectWrap::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 36px;
        background: #fff;
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
        pointer-events: none;
        z-index: 1;
    }
    /* seta custom por cima da tampa */
    .classPO_SelectWrap::after {
        content: "";
        position: absolute;
        right: 10px;
        top: 0;
        bottom: 0;
        width: 18px;
        height: 18px;
        margin: auto 0;
        background: no-repeat center/18px url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a403b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
        pointer-events: none;
        z-index: 2;
    }

.classPO_Select {
    position: relative;
    z-index: 3;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 100%;
    height: 46px;
    padding: 10px 38px 10px 12px;
    border: 1px solid #D6DDE4;
    border-radius: 12px;
    background: #fff !important;
    /* torna o texto SEMPRE visível (alguns temas deixam transparente) */
    color: #1a403b !important;
    -webkit-text-fill-color: #1a403b !important;
    opacity: 1 !important;
    text-indent: 0 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

    .classPO_Select option, .classPO_Select optgroup {
        color: #1a403b !important;
        background: #fff !important;
    }

    .classPO_Select:focus {
        outline: none;
        border-color: #1a403b;
        box-shadow: 0 0 0 2px rgba(26,64,59,.10);
    }

    .classPO_Select:disabled {
        color: #7a8894 !important;
        background: #f5f7f9 !important;
        border-color: #e3e8ee;
        cursor: not-allowed;
    }

    .classPO_Select::-ms-expand {
        display: none;
    }
/* IE/Edge legado */
@supports (-moz-appearance:none) {
    .classPO_Select {
        text-indent: 0 !important;
    }
    /* reverte hacks antigos no Firefox */
}

/* ===== Preset da página de veículos ===== */
.page-vehicles .classPO_SubDiv {
    padding: 8px 10px;
    border: none !important;
    box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

.page-vehicles .classPO_Parent {
    margin-bottom: 14px;
}

.page-vehicles .classPO_Select {
    height: 46px;
    padding: 10px 38px 10px 12px;
}

.page-vehicles .classPO_Text {
    height: 46px;
    padding: 10px 12px;
}

@media (max-width:380px) {
    .classPO_Select, .classPO_Text {
        height: 44px;
        padding-top: 9px;
        padding-bottom: 9px;
    }
}

/* 1) Container da página responsivo */
.page-vehicles {
    padding-left: 8px;
    padding-right: 8px;
}

    .page-vehicles .classPO_Parent,
    .page-vehicles .classPO_MainDiv,
    .page-vehicles .classPO_SubDiv {
        width: 100%;
    }

        /* 2) Campos sempre largura total do cartão */
        .page-vehicles .classPO_SubDiv .classPO_Text,
        .page-vehicles .classPO_SubDiv .classPO_Select,
        .page-vehicles .classPO_SubDiv .classPO_SelectWrap {
            width: 100%;
            display: block;
            box-sizing: border-box;
        }

    /* 3) Tabelas auxiliares não podem “apertar” o conteúdo */
    .page-vehicles .classPO_TableZeroSpace,
    .page-vehicles .classPO_TableZeroSpace tr,
    .page-vehicles .classPO_TableZeroSpace td {
        width: 100%;
    }

        .page-vehicles .classPO_TableZeroSpace td {
            padding: 0;
        }

    /* 4) Validações/mensagens sem “quebrar” a largura */
    .page-vehicles .validation-summary-errors,
    .page-vehicles .field-validation-error,
    .page-vehicles .classPO_SubDiv > span,
    .page-vehicles .classPO_SubDiv > label {
        max-width: 100%;
        display: block;
    }

/* 5) (Opcional) limite de largura em telas grandes + centraliza */
@media (min-width: 900px) {
    .page-vehicles .classPO_DivContainer {
        max-width: 760px;
        margin: 0 auto;
    }
}


/* ===== Larguras responsivas e iguais na página de Veículos ===== */

/* os blocos não podem limitar a largura */
.page-vehicles .classPO_Parent,
.page-vehicles .classPO_MainDiv,
.page-vehicles .classPO_SubDiv {
    width: 100%;
}

/* todo campo ocupa 100% do cartão */
.page-vehicles input.classPO_Text,
.page-vehicles textarea.classPO_Text,
.page-vehicles select.classPO_Select,
.page-vehicles .classPO_SelectWrap {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    display: block;
    box-sizing: border-box;
}

/* tabelas auxiliares não comprimem a linha */
.page-vehicles .classPO_TableZeroSpace,
.page-vehicles .classPO_TableZeroSpace tr,
.page-vehicles .classPO_TableZeroSpace td {
    width: 100%;
}

    .page-vehicles .classPO_TableZeroSpace td {
        padding: 0;
    }

/* textarea deve respeitar Rows: ajuste de altura e padding */
.page-vehicles textarea.classPO_Text {
    height: auto; /* deixa o Rows mandar */
    min-height: 90px; /* só um piso */
    padding: 12px; /* igual aos inputs */
    line-height: 1.4;
    resize: vertical;
}

/* espaçamento consistente entre blocos */
.page-vehicles .classPO_Parent {
    margin-bottom: 14px;
}

.classPO_InputLike {
    width: 100%;
    padding: .875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #fff;
    min-height: 44px; /* altura parecida com input */
    display: flex;
    align-items: center;
    color: #111827;
}

.classPO_Table--fixed {
    width: 100%;
    table-layout: fixed; /* faz o colgroup mandar */
}

    .classPO_Table--fixed .td-btn {
        text-align: center; /* opcional: centraliza o botão */
        white-space: nowrap;
    }

    .classPO_Table--fixed input[type="text"] {
        width: 100%;
    }
/* textbox ocupa a 1ª coluna inteira */

/* faixa que "sangra" de ponta a ponta da viewport */
.toolbar-bleed {
    width: 100vw; /* pega a largura da viewport */
    margin-left: calc(50% - 50vw); /* anula o padding/margem do pai */
    margin-right: calc(50% - 50vw);
    position: sticky; /* fixa no topo ao rolar (opcional) */
    top: 0;
    z-index: 1000;
    background-color: #2f4f4f; /* cor de fundo desejada do topo */
}

    /* faz o fundo cinza ser contínuo dentro do RadToolBar */
    .toolbar-bleed .RadToolBar,
    .toolbar-bleed .rtbOuter,
    .toolbar-bleed .rtbWrap {
        background: transparent; /* o container .toolbar-bleed já tem a cor */
        width: 100%;
        border: 0;
    }

    /* melhora usabilidade no celular */
    .toolbar-bleed .rtbWrap {
        overflow-x: auto; /* permite rolar horizontal se precisar */
        -webkit-overflow-scrolling: touch;
    }

    .toolbar-bleed .rtbInner {
        display: flex;
        flex-wrap: nowrap;
        gap: .25rem;
    }

    .toolbar-bleed .rtbItem {
        min-width: 44px; /* alvo de toque recomendado */
    }

/* Oculta textos dos botões quando a tela é estreita: ícones ficam melhores */
@media (max-width: 480px) {
    .toolbar-bleed .rtbText {
        display: none !important;
    }
}

.footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between; /* empurra esquerda ↔ direita */
    gap: 12px;
    padding: 8px 12px;
    width: 100%;
}

.footer-left {
    font-weight: 600;
    color: #1a1a1a;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap; /* evita quebrar “Framework Braspartner” */
}

.footer-link {
    color: #000;
    text-decoration: none;
}

    .footer-link:hover {
        text-decoration: underline;
    }



/* ===== Scopo APENAS desta view ===== */
.view-services .classPO_TableCustStyle1,
.view-services .classPO_TableCustStyle2,
.view-services .classPO_TableCustStyle3,
.view-services .classPO_TableCustStyle4,
.view-services .classPO_TableCustStyle5 {
    border-collapse: collapse !important; /* acaba com border-spacing */
    border-spacing: 0 !important;
    width: 100%;
    table-layout: fixed; /* colunas previsíveis */
}

    /* padding e alinhamento iguais em todas */
    .view-services .classPO_TableCustStyle1 th,
    .view-services .classPO_TableCustStyle1 td,
    .view-services .classPO_TableCustStyle2 th,
    .view-services .classPO_TableCustStyle2 td {
        padding: 8px 10px;
        vertical-align: middle;
    }

    /* cabeçalho mantém seu tema */
    .view-services .classPO_TableCustStyle1 th,
    .view-services .classPO_TableCustStyle2 th {
        background-color: darkslategray !important;
        color: #fff;
        text-align: center;
    }

/* evita rolagem horizontal por conteúdo longo na coluna de descrição */
.view-services td,
.view-services th {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Larguras por tabela (sem mexer no GridView) ===== */

/* Grid de ITENS: [1]=botão, [2]=código, [3]=descrição, [4]=preço, [5]=unidade */
.view-services #GridViewServiceItems td:nth-child(1),
.view-services #GridViewServiceItems th:nth-child(1) {
    width: 48px;
}

.view-services #GridViewServiceItems td:nth-child(2),
.view-services #GridViewServiceItems th:nth-child(2) {
    width: 12%;
}

.view-services #GridViewServiceItems td:nth-child(4),
.view-services #GridViewServiceItems th:nth-child(4) {
    width: 12%;
    text-align: right;
}

.view-services #GridViewServiceItems td:nth-child(5),
.view-services #GridViewServiceItems th:nth-child(5) {
    width: 10%;
    text-align: center;
}
/* a descrição (3ª) fica elástica e ocupa o restante */

/* Grid de CATEGORIAS: [1]=botão, [2]=descrição */
.view-services #GridViewServiceCategories td:nth-child(1),
.view-services #GridViewServiceCategories th:nth-child(1) {
    width: 48px;
}

.view-services #GridViewServiceCategories td:nth-child(2),
.view-services #GridViewServiceCategories th:nth-child(2) {
    width: auto; /* resto */
}

/* Barra "Pesquisar Serviço": a 2ª coluna (botão) fica fixa */
.view-services #tblSearch td:last-child,
.view-services #tblSearch th:last-child {
    width: 120px;
}

/* Se houver GridLines/CellPadding do WebForms, neutralize visualmente */
.view-services table {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

    .view-services table tr + tr td {
        border-top: 1px solid #eef1f4;
    }
/* divisória suave */

/* só nesta view, tira a centralização do container */
.view-services .no-center {
    text-align: initial;
}
/* ou left */

/* Escopo: apenas este grid */
/* Grid de Ordens */
#GridViewSales {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* colunas previsíveis */
}

    /* padding/alinhamento iguais */
    #GridViewSales th, #GridViewSales td {
        padding: 8px 10px;
        vertical-align: middle;
    }

        /* [1]=editar  [2]=Ordem  [3]=Cliente  [4]=Placa  [5]=Status  [6]=Data  [7]=excluir */
        #GridViewSales th:nth-child(1), #GridViewSales td:nth-child(1) {
            width: 40px;
            text-align: center;
        }

        #GridViewSales th:nth-child(2), #GridViewSales td:nth-child(2) {
            width: 16%;
        }

        #GridViewSales th:nth-child(3), #GridViewSales td:nth-child(3) {
            width: 28%;
        }
        /* Cliente */
        #GridViewSales th:nth-child(4), #GridViewSales td:nth-child(4) {
            width: 16%;
        }
        /* Placa */
        #GridViewSales th:nth-child(5), #GridViewSales td:nth-child(5) {
            width: 26%;
        }
        /* Status */
        #GridViewSales th:nth-child(6), #GridViewSales td:nth-child(6) {
            width: 12%;
            text-align: center;
        }
        /* Data */
        #GridViewSales th:nth-child(7), #GridViewSales td:nth-child(7) {
            width: 40px;
            text-align: center;
        }

        /* Cliente/Status longos não quebram a linha */
        #GridViewSales td:nth-child(3),
        #GridViewSales td:nth-child(5) {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

/* (opcional) esconder colunas de ação no celular muito estreito */
@media (max-width:380px) {
    #GridViewSales th:nth-child(1), #GridViewSales td:nth-child(1),
    #GridViewSales th:nth-child(7), #GridViewSales td:nth-child(7) {
        display: none;
    }
}

.toolbar-bleed .RadToolBar {
    width: 100%;
}

img, svg {
    max-width: 100%;
    height: auto;
}

* {
    box-sizing: border-box;
}

/* === FIX 1: permitir quebra de linha e impedir "esticamento" no Android === */
.view-services td,
.view-services th {
    white-space: normal !important; /* antes estava nowrap e esmagava tudo */
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word; /* quebra palavras grandes */
}

/* Opcional: use .po-nowrap só onde realmente precisa não quebrar (colunas curtas) */
.po-nowrap {
    white-space: nowrap !important;
}

/* === FIX 2: tabelas realmente fluidas === */
.classPO_TableCustStyle1,
.classPO_TableCustStyle2,
.classPO_TableZeroSpace {
    width: 100% !important;
    border-collapse: collapse !important; /* tira o border-spacing que soma largura */
    table-layout: fixed; /* colunas previsíveis no mobile */
}

    /* Células coerentes no mobile */
    .classPO_TableCustStyle1 th, .classPO_TableCustStyle1 td,
    .classPO_TableCustStyle2 th, .classPO_TableCustStyle2 td,
    .classPO_TableZeroSpace th, .classPO_TableZeroSpace td {
        padding: .6rem .5rem;
        vertical-align: middle;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* Colunas de ícone estreitas */
th.po-icon, td.po-icon {
    width: 36px !important;
    max-width: 36px !important;
    text-align: center;
}

img.po-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Números à direita */
th.po-num, td.po-num {
    text-align: right;
}

/* === FIX 3: neutralizar larguras inline e nowrap herdado no mobile === */
@media (max-width: 768px) {
    td[style*="width"], th[style*="width"] {
        width: auto !important;
    }

    [nowrap], td[nowrap], th[nowrap] {
        white-space: normal !important;
    }
}

/* === Toolbar fluida (seu CSS já tem .toolbar-bleed; só garantir 100%) === */
.po-toolbar .rtbOuter,
.po-toolbar .rtbWrap,
.toolbar-bleed .RadToolBar {
    width: 100% !important;
}

@media (max-width: 768px) {
    .po-toolbar .rtbUL {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
        gap: .5rem;
        width: 100%;
    }

    .po-toolbar .rtbItem {
        width: 100% !important;
    }

    .po-toolbar .rtbButton,
    .po-toolbar .rtbSplBtn,
    .po-toolbar .rtbDropDown {
        width: 100% !important;
        justify-content: center;
        min-height: 44px;
    }
}

/* Cabeçalhos: não quebrar palavra nem hifenizar */
.classPO_TableCustStyle2 th,
.classPO_TableCustStyle1 th,
.classPO_TableZeroSpace th {
    white-space: nowrap !important;
    word-break: keep-all !important; /* não dividir palavras */
    overflow-wrap: normal !important;
}

/* Células: podem quebrar, mas sem “picotar” letras */
.classPO_TableCustStyle2 td,
.classPO_TableCustStyle1 td,
.classPO_TableZeroSpace td {
    white-space: normal; /* pode pular linha */
    overflow-wrap: anywhere; /* quebra só entre palavras/limites semânticos */
    word-break: normal;
}

.po-col-desc {
    width: auto;
}
/* coluna flexível */
.po-col-price {
    width: 100px;
    text-align: right;
}

.po-col-qty {
    width: 80px;
    text-align: right;
}

.po-col-unit {
    width: 70px;
    text-align: center;
}

.po-col-total {
    width: 100px;
    text-align: right;
}

/* Mobile: cabeçalho um pouco menor, padding mais contido */
@media (max-width: 768px) {
    .classPO_TableCustStyle2 th,
    .classPO_TableCustStyle1 th {
        font-size: .9rem;
    }

    .classPO_TableCustStyle2 td,
    .classPO_TableCustStyle1 td {
        font-size: .95rem;
    }

    .classPO_TableCustStyle2 th,
    .classPO_TableCustStyle2 td {
        padding: .5rem .45rem;
    }
}

/* Coluna de ação (botão) — fixa/estável */
.po-col-action {
    width: 56px !important; /* cabe 40x40 + padding */
    min-width: 56px !important;
    max-width: 56px !important;
    text-align: center;
}

/* Texto em 1 linha com reticências */
.po-col-text-1l {
    max-width: 0; /* truque c/ table-layout:fixed para “pegar” o espaço restante */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* OU: Texto em até 2 linhas com reticências (multilinha) */
.po-col-text-2l {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* número de linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
}
/* Linha de busca (só essa tabela) */
.po-search td { /* padding padrão das células da linha */
    padding: .5rem .5rem; /* ↑ dá espaço em cima e embaixo */
}

/* Célula do botão: um pouco mais de topo e alinhamento central */
.po-cell-btn {
    padding-top: .6rem !important; /* respiro extra no topo */
    padding-bottom: .5rem !important;
    padding-left: .5rem !important;
    padding-right: .5rem !important;
    vertical-align: middle; /* garante botão ao centro da célula */
}

/* Botão ocupa a célula inteira sem “estourar” */
.po-btn-processar {
    display: block;
    width: 100%;
    min-height: 30px;
    box-sizing: border-box;
    padding: 6px 12px; /* não aumenta a largura total */
    border-radius: 22px;
}

/* Mobile: pode querer um pouco mais de ar */
@media (max-width:768px) {
    .po-cell-btn {
        padding-top: .7rem !important;
    }
}

/* container do RBL sem quebra de linha */
/*.po-rbl-nowrap {
    display: inline-flex;*/ /* ou flex */
/*flex-wrap: nowrap;*/ /* NÃO quebrar */
/*align-items: center;
    gap: .75rem;*/ /* espaço entre opções */
/*white-space: nowrap;*/ /* garante que o texto não quebre */
/*}*/

/* aproxima input do rótulo e evita quebra entre eles */
/*.po-rbl-nowrap input {
        margin-right: .35rem;
    }

    .po-rbl-nowrap label {
        white-space: nowrap;
    }*/


/* RadioButtonList horizontal, sem wrap, independente de como o ASP.NET renderiza */
.po-rbl-nowrap {
    display: inline-flex;
    em linha e flexível flex-wrap: nowrap;
    não quebra align-items: center;
    gap: .6rem;
    white-space: nowrap;
}

Se o ASP.NET inserir <br >, esconda-os
.po-rbl-nowrap br {
    display: none !important;
}

Quando o ASP.NET renderiza como tabela (RepeatLayout=Table),
garanta que as células também não quebrem
.po-rbl-nowrap td {
    white-space: nowrap !important;
}

Aproxima input do rótulo
.po-rbl-nowrap input {
    margin-right: .35rem;
}

Evita quebra dentro do texto do label
.po-rbl-nowrap label {
    white-space: nowrap;
}

/* Em telas muito estreitas, reduz levemente a fonte para caber */
@media (max-width: 480px) {
    .po-rbl-nowrap {
        gap: .5rem;
        font-size: .95rem;
    }
}

/* barra de busca ocupa 100% */
.po-searchbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    position: relative; /* para o dropdown absoluto usar este contêiner */
}

/* input cresce e usa todo o espaço restante */
.po-searchbar-input {
    flex: 1 1 auto;
    min-width: 0; /* evita estourar por conteúdo longo */
    height: 36px; /* ajuste estético opcional */
}

/* botões com largura fixa */
.po-searchbar-btn {
    flex: 0 0 64px; /* 64px de largura; ajuste se preferir 56/72 */
    height: 36px;
    box-sizing: border-box;
}

/* lista do AutoComplete ocupa a largura inteira da barra */
#listPlacement {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 9999;
    max-height: 50vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

    #listPlacement, #listPlacement > .ajax__autocomplete_completionListElement, #listPlacement > ul {
        width: 100% !important;
        max-width: none !important;
    }

/* mobile: se faltar espaço, afine os botões */
@media (max-width:480px) {
    .po-searchbar-btn {
        flex-basis: 56px;
    }
}

/* Coluna de ações: largura estável e sem cortar conteúdo */
.po-col-actions {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    text-align: center;
}

/* Essa célula NÃO deve esconder o conteúdo */
.classPO_TableCustStyle2 td.po-col-actions {
    overflow: visible !important;
}

.classPO_TableCustStyle2 td img {
    width: auto;
    height: auto;
}

/* Linha de ícones lado a lado */
.po-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.po-action {
    width: 24px;
    height: 24px;
    display: inline-block;
}

.classPO_TableCustStyle2 .po-actions input[type=image],
.classPO_TableCustStyle2 .po-actions img,
.classPO_TableCustStyle2 .po-action {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    line-height: 0 !important; /* evita crescer pela linha */
}

/* tabela de detalhes */
.po-details {
    table-layout: auto; /* deixa o browser calcular pelas colunas */
    width: 100%;
}

    /* 1ª coluna: encolher ao conteúdo, sem quebra */
    .po-details .po-col-label {
        width: 1%;
    }
    /* força a menor largura possível */
    .po-details th {
        white-space: nowrap; /* não quebra "Data Requerida:" */
        text-align: right;
        padding-right: .75rem;
    }

    /* 2ª coluna: ocupa o restante e pode quebrar quando necessário */
    .po-details .po-col-value {
        width: auto;
    }

    .po-details td {
        white-space: normal;
        word-break: break-word; /* evita overflow em textos longos */
    }

/* Opcional: em telas muito estreitas, limite visual do rótulo */
@media (max-width: 480px) {
    .po-details th {
        max-width: 40%;
    }
    /* rótulo não passa disso */
}

/* Esta tabela NÃO usa layout fixed */
.classPO_TableCustStyle2.po-details {
    table-layout: auto !important;
    width: 100%;
}

    /* 1ª coluna: encurta ao conteúdo e não quebra */
    .classPO_TableCustStyle2.po-details .po-col-label {
        width: 1%;
    }
    /* força mínimo */
    .classPO_TableCustStyle2.po-details th {
        white-space: nowrap; /* "Data Requerida:" não quebra */
        width: 1px; /* ajuda a encolher ao mínimo */
        text-align: right;
        padding-right: .75rem;
    }

    /* 2ª coluna: elástica, ocupa o restante */
    .classPO_TableCustStyle2.po-details .po-col-value {
        width: auto;
    }

    .classPO_TableCustStyle2.po-details td {
        white-space: normal; /* valores podem quebrar */
        word-break: break-word; /* evita overflow em textos longos */
    }

/* Segurança: se houver alguma regra global fixando largura dos th */
@media (max-width:2000px) {
    .classPO_TableCustStyle2.po-details th {
        max-width: none !important;
    }
}

/* Esta tabela NÃO usa layout fixed: colunas podem encolher ao conteúdo */
.po-cats {
    table-layout: auto !important;
    width: 100%;
}

    /* 1ª coluna encolhe ao mínimo (conteúdo) e sem wrap */
    .po-cats .po-col-img {
        width: 1px; /* força o menor possível */
        white-space: nowrap;
        padding: 6px 8px;
        text-align: center;
        vertical-align: top;
        overflow: visible; /* não cortar imagem */
    }

/* Miniatura: limite de tamanho, sem esticar */
.po-cat-thumb {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 64px; /* ajuste conforme quiser (48/56/72…) */
    max-height: 48px;
    object-fit: contain;
}

/* Caso exista regra global tipo img{width:100%}, neutralize aqui */
.po-cats td img {
    width: auto;
    height: auto;
}

/* deixa o navegador calcular as larguras pelo conteúdo */
.po-form {
    table-layout: auto !important;
    width: 100%;
}

    /* 1ª coluna: só o tamanho do rótulo, sem quebrar */
    .po-form td:first-child {
        width: 1px; /* mínimo possível */
        white-space: nowrap;
        text-align: right;
        padding-right: .75rem;
    }

    /* 3ª coluna: só o necessário pro botão */
    .po-form td:last-child {
        width: 1%; /* encolhe o máximo */
        white-space: nowrap;
    }

    /* textbox realmente ocupa todo o meio */
    .po-form input[type="text"],
    .po-form .aspNetDisabled[type="text"] {
        width: 100%;
        box-sizing: border-box; /* considera padding/borda */
    }

    /* evita botão expandir */
    .po-form input[type="submit"],
    .po-form button {
        flex: 0 0 auto;
        width: auto;
    }

.po-form-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.po-lbl {
    white-space: nowrap;
}

.po-input {
    flex: 1 1 auto;
    min-width: 0;
}
/* ocupa todo o resto */
.po-btn {
    flex: 0 0 auto;
}
/* só o necessário */


/* tabela de ordens: ícones menores */
.po-orders {
    table-layout: auto;
}

    .po-orders .po-cell-icon {
        width: 1px; /* coluna mínima */
        white-space: nowrap;
        padding: 4px 6px; /* menos padding = visual menor */
        text-align: center;
        vertical-align: middle;
    }

        /* tamanho do ícone */
        .po-orders .po-icon,
        .po-orders .po-cell-icon img {
            width: 16px; /* ajuste aqui: 16/18/20/24 */
            height: 16px;
            object-fit: contain;
        }

    /* se existir alguma regra global img{ width:100% }, neutraliza no escopo */
    .po-orders td img {
        width: auto;
        height: auto;
    }

    /* opcional: diminui o espaçamento entre linhas */
    .po-orders tr td {
        padding-top: 6px;
        padding-bottom: 6px;
    }


/* === 1) Desktop: não aumentar === */
/* === Compacto 9px — força sobre o desktop === */
@media (min-width:769px) {
    .classPO_TableCustStyle1.po-compact th,
    .classPO_TableCustStyle1.po-compact td,
    .classPO_TableCustStyle2.po-compact th,
    .classPO_TableCustStyle2.po-compact td,
    .GridViewStyle.po-compact th,
    .GridViewStyle.po-compact td,
    #GridViewSales.po-compact th,
    #GridViewSales.po-compact td {
        font-size: 9px !important;
        line-height: 1.10;
        padding: 2px 4px;
        white-space: nowrap !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        vertical-align: middle;
    }
}


/* === 2) Mobile (até 480px): aumento suave === */
/*@media (max-width: 480px) {
    html {
        font-size: 106.25% !important;
    }*/
/* ~17px (antes 18px) */
/*body {
        font-size: 1rem !important;
        line-height: 1.35;
    }

    .classPO_TableCustStyle1 th,
    .classPO_TableCustStyle2 th {
        font-size: 1.02rem !important;
    }

    .classPO_TableCustStyle1 td,
    .classPO_TableCustStyle2 td {
        font-size: 1.06rem !important;
    }

    .classPO_ButtonStyle {
        font-size: 1.05rem !important;
    }
}*/

/* === 3) Tablet pequeno (481–768px): quase neutro === */
/*@media (min-width: 481px) and (max-width: 768px) {
    html {
        font-size: 103.125% !important;
    }*/
/* ~16.5px */
/*body {
        font-size: 1rem !important;
    }
}*/

/* depois (neutro) */
@media (max-width:480px) {
    html {
        font-size: 100% !important;
    }
    /* ou simplesmente apague */
}

@media (min-width:481px) and (max-width:768px) {
    html {
        font-size: 100% !important;
    }
}




/* === Ultra-compacto (9px) — use só onde precisar === */
.po-compact th,
.po-compact td {
    font-size: 12px !important; /* exatamente 9px */
    line-height: 1.10; /* altura de linha curta */
    padding: 2px 4px; /* célula baixinha e estreita */
    text-overflow: ellipsis;
    overflow: hidden;
    vertical-align: middle;
}

/* cabeçalho um tiquinho maior pra legibilidade */
.po-compact th {
    font-size: 12px !important;
    font-weight: 600;
}

/* ícones/botões na célula também menores */
.po-compact .po-actions img,
.po-compact .po-action,
.po-compact input[type=image] {
    width: 16px !important;
    height: 16px !important;
}


/* opcional: permitir quebra em colunas específicas */
.po-wrap {
    white-space: normal !important;
}



/* === ULTRA COMPACTO (força 10px) — coloque no FIM do arquivo === */
.classPO_TableCustStyle1.po-compact th,
.classPO_TableCustStyle1.po-compact td,
.classPO_TableCustStyle2.po-compact th,
.classPO_TableCustStyle2.po-compact td,
.GridViewStyle.po-compact th,
.GridViewStyle.po-compact td,
#GridViewSales.po-compact th,
#GridViewSales.po-compact td {
    font-size: 12px !important;
    line-height: 1.10 !important;
    padding: 2px 4px !important;
    overflow-wrap: normal !important; /* desfaz 'anywhere' */
    word-break: normal !important; /* evita “quebrar” palavras */
    vertical-align: middle !important;
}

/* se precisar rolagem horizontal só nesses grids */
.po-compact-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

    .po-compact-wrap > table {
        min-width: 560px;
    }



.classPO_TableCustStyle2.po-compact th,
.classPO_TableCustStyle2.po-compact td,
#GridViewSales.po-compact th,
#GridViewSales.po-compact td {
    font-size: 12px !important;
    line-height: 1.10 !important;
    padding: 2px 4px !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    vertical-align: middle !important;
}

/* ícones menores (sobrepõe Width/Height=24 do markup) */
#GridViewSales.po-compact .po-cell-icon img,
#GridViewSales.po-compact .po-cell-icon input[type=image] {
    width: 16px !important;
    height: 16px !important;
}


/* célula bem compacta (menos altura) */
.po-tight th,
.po-tight td {
    padding: 1px 3px !important; /* antes 2px 4px */
    line-height: 1.0 !important; /* mais baixo */
    vertical-align: middle !important;
}

/* header um tiquinho maior só para legibilidade */
.po-tight th {
    font-size: 10px !important;
}

/* linha baixa de verdade (se o navegador ignorar apenas o line-height) */
.po-tight tr {
    height: 20px;
}
/* ajuste 18–22px conforme seu gosto */

/* ícones/coluna de ícones ainda menores e com menos padding */
.po-tight .po-cell-icon {
    padding: 0 2px !important;
}

    .po-tight .po-cell-icon img,
    .po-tight .po-cell-icon input[type=image] {
        width: 16px !important;
        height: 16px !important;
    }

/* tabela sem margens extras */
#GridViewSales {
    margin: 0 !important;
}

/* bloco com menos “respiro” em volta */
.po-tight-block {
    margin-top: .25rem !important;
    margin-bottom: .25rem !important;
    padding-top: .25rem !important;
    padding-bottom: .25rem !important;
}



/* Remova/neutralize a regra antiga que alarga 40px a 1ª e 7ª colunas */
#GridViewSales th:nth-child(1),
#GridViewSales td:nth-child(1),
#GridViewSales th:nth-child(7),
#GridViewSales td:nth-child(7) {
    width: auto; /* será substituída pelas classes abaixo */
}

/* Coluna de ícone: mínima possível */
#GridViewSales .po-col-icon {
    width: 22px !important;
    min-width: 18px !important;
    max-width: 24px !important;
    padding: 0 2px !important;
    text-align: center;
}

    /* Ícones bem pequenos (sobrescreve Height/Width do markup) */
    #GridViewSales .po-col-icon img,
    #GridViewSales .po-col-icon input[type=image],
    #GridViewSales .po-icon {
        width: 12px !important; /* ajuste 12–16 se preferir */
        height: 12px !important;
        display: inline-block;
    }

/* Tabela mais “baixa” (já usou .po-tight na GridView) */
.po-tight th, .po-tight td {
    padding: 1px 3px !important;
    line-height: 1.0 !important;
}


/* ===== Veículos (exceções locais) ===== */

/* 1) Tabela "Veículo Selecionado": NÃO usar fixed, senão trunca */
.page-vehicles .table-km {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* solto para caber o texto */
}


/* 3) Coluna PLACA nunca trunca nem vira "..." */
.page-vehicles .col-placa,
.page-vehicles th.col-placa {
    white-space: nowrap;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none;
    width: 1%; /* encolhe ao conteúdo */
}

/* Se algum estilo global forçar ellipsis nos <td> ou spans, neutraliza aqui */
.page-vehicles td.col-placa,
.page-vehicles td.col-placa span {
    display: inline-block;
}

/* Barra título + botão: flex e quebra elegante */
.po-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin: 8px 0;
}

.po-header-title {
    margin: 0;
    line-height: 1.2;
}

.po-header-btn {
    flex: 0 0 auto;
    max-width: 260px;
}

/* Em telas estreitas, o botão desce e vira largura total */
@media (max-width: 560px) {
    .po-header-row {
        flex-wrap: wrap;
    }

    .po-header-btn {
        flex: 1 1 100%;
        width: 100%;
    }
}


/* Grid 'Todos veículos' — versão simples e estável */
#GridViewCustomerObjects {
    border-collapse: collapse;
    table-layout: auto;
}

    #GridViewCustomerObjects th,
    #GridViewCustomerObjects td {
        display: table-cell;
        box-sizing: border-box;
        height: auto;
        line-height: 1.3;
    }

    #GridViewCustomerObjects th {
        white-space: nowrap; /* 1 linha no header */
        overflow: hidden;
        text-overflow: ellipsis;
    }

@media (max-width:560px) {
    #GridViewCustomerObjects th {
        white-space: normal;
        word-break: keep-all;
    }
}

#GridViewCustomerObjects td {
    white-space: normal; /* conteúdo pode quebrar */
    overflow-wrap: break-word;
}

    #GridViewCustomerObjects th.col-placa,
    #GridViewCustomerObjects td.col-placa {
        white-space: nowrap; /* placa nunca quebra */
        overflow: visible !important;
        text-overflow: clip !important;
        width: 1%;
        max-width: none;
    }


/* ========== GRID 'TODOS VEÍCULOS' – HOTFIX DEFINITIVO ========== */

/* 1) Mata border-spacing/separate da classe antiga */
#GridViewCustomerObjects,
#GridViewCustomerObjects table,
#GridViewCustomerObjects.classPO_TableCustStyle2 {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: auto !important; /* deixe o navegador calcular */
    background: #f0f8ff; /* seu aliceblue */
}

    /* 2) Células: nada de position/height fixos */
    #GridViewCustomerObjects th,
    #GridViewCustomerObjects td {
        display: table-cell !important;
        position: static !important;
        height: auto !important;
        line-height: 1.32 !important;
        padding: 8px 10px;
        vertical-align: middle;
        box-sizing: border-box;
    }

    /* 3) Cabeçalho: 1 linha por padrão; se apertar corta com “...” */
    #GridViewCustomerObjects thead th {
        background: darkslategray !important;
        color: #fff !important;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* 4) Mobile: autoriza quebra limpa no header (sem sobrepor) */
@media (max-width: 560px) {
    #GridViewCustomerObjects thead th {
        white-space: normal;
        word-break: keep-all;
    }
}

/* 5) Corpo pode quebrar (sem “picotar” palavras) */
#GridViewCustomerObjects tbody td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

/* 6) Coluna PLACA: nunca quebra nem vira reticências */
#GridViewCustomerObjects th.col-placa,
#GridViewCustomerObjects td.col-placa {
    white-space: nowrap;
    width: 1%;
    max-width: none;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* 7) Ações: largura estável e sem tabela aninhada estourando layout */
#GridViewCustomerObjects th.col-acao,
#GridViewCustomerObjects td.col-acao {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    text-align: center;
    white-space: nowrap;
}

    /* Se houver <table> dentro da célula de ação, normalize */
    #GridViewCustomerObjects td.col-acao table {
        border-collapse: collapse !important;
        border-spacing: 0 !important;
    }

        #GridViewCustomerObjects td.col-acao table td {
            padding: 0 !important;
        }

/* Ícones menores e consistentes */
/* Ícones menores SÓ na barra de ações */
#GridViewCustomerObjects td .gv-actions img,
#GridViewCustomerObjects td .gv-actions input[type=image] {
    width: 16px !important;
    height: 16px !important;
    object-fit: contain;
}

/* A miniatura do veículo deve ocupar o quadro */
#GridViewCustomerObjects td .thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}


/* 8) Permite rolagem horizontal só quando realmente apertar */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


.gv-actions {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

/* Só a coluna PLACA: nunca reticências, não corta */
#GridViewCustomerObjects th.col-placa,
#GridViewCustomerObjects td.col-placa {
    white-space: nowrap; /* 1 linha */
    overflow: visible !important; /* deixa “sair” se faltar espaço */
    text-overflow: clip !important; /* sem "..." */
    max-width: none; /* não limitar largura */
    width: 1%; /* encolhe ao conteúdo (opcional) */
}

/* mantém título e botão na MESMA linha */
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between; /* título à esquerda, botão à direita */
    gap: .75rem;
    flex-wrap: nowrap; /* não quebra linha */
}

    /* título sem margem extra e com reticências se faltar espaço */
    .header-row h4 {
        margin: 0;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* aqui a mágica: o botão deixa de ocupar 100% */
    .header-row .classPO_ButtonStyle {
        width: auto !important;
        flex: 0 0 auto;
        padding: 8px 16px; /* opcional: ajuste do “tamanho” */
    }




/* RBL: no mobile pode quebrar */
.po-rbl-nowrap {
    display: flex;
    flex-wrap: wrap; /* era nowrap */
    align-items: center;
    gap: .6rem;
    white-space: normal; /* permite quebra */
}

    .po-rbl-nowrap label {
        white-space: nowrap;
    }
    /* não quebra no meio de “Não Notificar” */
    .po-rbl-nowrap br {
        display: none !important;
    }
/* WebForms às vezes injeta <br> */

/* acima de 600px mantém tudo numa linha */
@media (min-width:600px) {
    .po-rbl-nowrap {
        flex-wrap: nowrap;
    }
}

/* Painéis “fluídos”: nunca passam da largura da tela */
.po-panel-fluid,
.po-panel-fluid table {
    width: 100%;
    table-layout: auto; /* deixa o browser ajustar colunas */
}

    .po-panel-fluid th,
    .po-panel-fluid td {
        white-space: normal !important; /* pode quebrar */
        word-break: break-word; /* evita alongar por palavras grandes */
    }

    /* Inputs realmente ocupam a coluna sem estourar */
    .po-panel-fluid input[type="text"],
    .po-panel-fluid textarea,
    .po-panel-fluid select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Mensagens de validação longas não forçam largura */
    .po-panel-fluid .validator,
    .po-panel-fluid .field-validation-error,
    .po-panel-fluid span[style*="color:Red"] {
        display: block;
        white-space: normal !important;
    }

    /* Se usar sua tabelinha auxiliar, também a torne fluída */
    .po-panel-fluid .tableAuxForms {
        width: 100%;
        table-layout: auto;
    }

        .po-panel-fluid .tableAuxForms td {
            white-space: normal; /* nada de nowrap aqui */
        }

/* RadioButtonList: já sugerido antes — no mobile pode quebrar */
.po-rbl-nowrap {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    white-space: normal;
}

    .po-rbl-nowrap label {
        white-space: nowrap;
    }

@media (min-width:600px) {
    .po-rbl-nowrap {
        flex-wrap: nowrap;
    }
}

/* em vez de atingir td/th globais… */
@media (max-width: 768px) {
    .classPO_TableCustStyle1 td[style*="width"],
    .classPO_TableCustStyle1 th[style*="width"],
    .classPO_TableCustStyle2 td[style*="width"],
    .classPO_TableCustStyle2 th[style*="width"],
    .classPO_TableZeroSpace td[style*="width"],
    .classPO_TableZeroSpace th[style*="width"] {
        width: auto !important;
    }
}

/* AjaxControlToolkit Calendar – garante 2 dígitos por célula no mobile */
.ajax__calendar_body table {
    table-layout: fixed !important;
    width: 100% !important;
}

.ajax__calendar_body td {
    width: 14.285% !important; /* 100/7 */
    min-width: 2.2ch; /* espaço para “22” */
    text-align: center;
    white-space: nowrap !important;
    letter-spacing: normal !important;
}

@media (max-width:480px) {
    .ajax__calendar_container {
        font-size: 14px;
    }
    /* evita fonte grande demais */
}

/* Quantidade: célula estreita e colada no preço */
.po-qty {
    width: 90px;
    padding-right: 6px;
    white-space: nowrap;
}

.po-qty-input {
    width: 84px;
    min-width: 0;
}

/* Linha de preço: menos “respiro” e alinhada */
.po-price-row {
    width: 100%;
    table-layout: auto;
}

    .po-price-row td {
        padding-left: 4px;
        padding-right: 4px;
        vertical-align: middle;
    }

/* Radios não cortam (se já não tiver) */
.classPO_TableCustStyle2 td.po-cell-rbl {
    overflow: visible !important;
    white-space: nowrap;
}

/* Mobile: ainda menor e com gap curto */
@media (max-width:560px) {
    .po-qty {
        width: 78px;
        padding-right: 4px;
    }

    .po-qty-input {
        width: 72px;
    }

    .po-price-row td {
        padding-left: 2px;
        padding-right: 2px;
    }

    .po-rbl-nowrap {
        gap: .4rem;
    }
}

.po-form2 {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Qtd. | Preço */
    gap: 12px;
}

@media (max-width:700px) {
    .po-form2 {
        grid-template-columns: 1fr;
    }
    /* empilha no celular */
}

.po-col {
    min-width: 0;
}

.po-label {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    text-align: center;
}

.po-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap; /* quebra se faltar espaço */
}



/* RBL colado e sem quebra */
.po-rbl-nowrap {
    white-space: nowrap;
    display: inline-flex;
    gap: 10px;
}

    .po-rbl-nowrap input {
        transform: scale(.95);
    }
    /* radios um tiquinho menores */
    .po-rbl-nowrap label {
        margin-left: 4px;
    }
/* espaço entre bolinha e texto */

/* tipografia e respiros um pouco menores dentro do bloco de registro */
.po-block .po-input,
.po-block .po-select {
    padding: 6px 10px;
    font-size: clamp(13px, 3.4vw, 15px);
}

.po-block__head, .po-block__body {
    padding: 10px 12px;
}

/* celulares bem estreitos: aperta ainda mais */
@media (max-width: 400px) {
    .po-inline {
        gap: 6px;
    }

    .po-input--xs {
        width: 68px;
        padding: 5px 8px;
        font-size: .95rem;
    }

    .po-select--xs {
        width: clamp(100px, 44vw, 180px);
    }

    .po-rbl-nowrap {
        gap: 8px;
        font-size: .95rem;
    }
}


.po-qty-input {
    width: 84px;
    min-width: 72px;
}

.po-price-input {
    width: 110px;
    min-width: 90px;
}

.po-price-ddl {
    min-width: 140px;
    max-width: 220px;
}

.po-rbl-nowrap {
    display: flex;
    gap: .6rem;
    white-space: nowrap;
}

.po-val {
    text-align: center;
}

/* evita que estilos de tabela antigos interfiram */
.classPO_TableCustStyle2 .po-form2 * {
    box-sizing: border-box;
}

/* === CORES (ajuste se preciso) === */
:root {
    --po-header-bg: #1f4d47; /* mesma cor do cabeçalho das tabelas */
    --po-header-fg: #ffffff;
    --po-row-bg: #eef6fb; /* mesma cor do “registro” claro */
    --po-row-fg: #333333;
}

/* === “Tabela” em DIVs === */
.po-block {
    width: 100%;
    border: 0; /* sem borda */
    border-radius: 0; /* sem arredondar */
    overflow: hidden;
}

/* cabeçalho */
.po-block__head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--po-header-bg);
    color: var(--po-header-fg);
    font-weight: 700;
}

.po-head-cell {
    padding: 10px 12px;
    text-align: center;
}

/* corpo (uma “linha” com 2 “células”) */
.po-block__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--po-row-bg);
    color: var(--po-row-fg);
}

.po-body-cell {
    padding: 14px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap; /* não deixa estourar no celular */
}

/* inputs enxutos, sem raio */
.po-input, .po-select {
    height: 34px;
    padding: 4px 8px;
    border: 1px solid #c6c6c6;
    border-radius: 0;
    text-align: center;
}


.po-select {
    min-width: 140px;
    text-align: left;
}

/* radios em linha e sem quebra */
.po-rbl-nowrap input {
    margin-right: 6px;
}

.po-rbl-nowrap label {
    white-space: nowrap;
    margin-right: 14px;
}

/* responsivo: empilha as “colunas” no mobile */
@media (max-width:560px) {
    .po-block__head,
    .po-block__body {
        grid-template-columns: 1fr;
    }

    .po-body-cell {
        padding: 12px;
    }
}



.po-input--xs {
    width: clamp(72px,22vw,120px);
}

.po-select--xs {
    width: clamp(110px,36vw,220px);
}

.po-input--sm {
    width: 100px;
}
/* preço/quantidade */
@media (max-width:560px) {
    .po-input--sm {
        width: 90px;
    }
}



/* cabeçalho: 2 colunas SEM quebrar */
.po-head-row {
    display: flex;
    gap: 0; /* sem vão entre as células */
    white-space: nowrap; /* nunca quebra "Qtd." / "Preço" */
}

.po-head-cell {
    flex: 1 1 0;
    text-align: center;
    padding: 10px 12px; /* use os seus paddings */
}

/* corpo: tenta manter 2 colunas, mas PODE quebrar */
.po-body-row {
    display: flex;
    flex-wrap: wrap; /* permite ir para a linha de baixo */
    gap: 12px;
    align-items: center;
}

.po-body-col {
    flex: 1 1 320px; /* 2 colunas até ~640px; depois empilha */
    min-width: 260px; /* ajuste fino: 240–300px */
    min-height: 1px; /* evita esticar em Android */
}

/* dentro de cada célula, os controles podem quebrar */
.po-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap; /* rótulos/inputs quebram se faltar espaço */
    min-width: 0;
}

/* inputs ocupam a largura da coluna quando convém */
.po-body-col input[type="text"],
.po-body-col select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}


/* === “tabela” em DIVs com o mesmo tema das tabelas === */
.po-block {
    margin: 8px 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
}

    /* Cabeçalho: 2 colunas, fundo igual ao TH do grid */
    .po-block .po-head-row {
        display: grid;
        grid-template-columns: 1fr 1fr; /* “Qtd.” | “Preço” sempre na mesma linha */
        background: darkslategray !important;
        color: #fff !important;
        font-weight: 700;
    }

    .po-block .po-head-cell {
        padding: 10px 12px;
        text-align: center;
        white-space: nowrap;
    }

    .po-block .po-head-row label { /* garante cor do <asp:Label> */
        color: #fff !important;
        font-weight: 700;
    }

    /* Corpo: 2 colunas, fundo igual à linha clara (aliceblue) */
    .po-block .po-body-row {
        display: grid;
        grid-template-columns: 1fr 1fr; /* mantém 2 colunas; controles podem quebrar */
        background: aliceblue !important;
        color: #333;
    }

    .po-block .po-body-col {
        min-width: 0; /* evita “estouro” no mobile */
        padding: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap; /* campos quebram quando faltar espaço */
    }

    /* inputs/selects dentro do bloco (mantém visual atual) */
    .po-block .po-input,
    .po-block .po-select {
        height: 34px;
        padding: 4px 8px;
        border: 1px solid #c6c6c6;
        border-radius: 0;
        background: #fff;
        text-align: center;
    }

    .po-block .po-select {
        text-align: left;
        min-width: 140px;
    }

/* RadioButtonList horizontal, sem wrap, independente de como o ASP.NET renderiza */
.po-rbl-nowrap {
    display: inline-flex; /* em linha e flexível */
    flex-wrap: nowrap; /* não quebra */
    align-items: center;
    gap: .6rem;
    white-space: nowrap;
}

    .po-rbl-nowrap br { /* se o ASP.NET inserir <br>, esconda-os */
        display: none !important;
    }

    .po-rbl-nowrap td { /* quando renderiza como tabela */
        white-space: nowrap !important;
    }

    .po-rbl-nowrap input { /* aproxima input do rótulo */
        margin-right: .35rem;
    }

    .po-rbl-nowrap label { /* evita quebra dentro do label */
        white-space: nowrap;
    }


/* 1) Grid: itens no topo da linha */
.po-block__body {
    align-items: start !important; /* por padrão o grid "estica" (stretch) */
}

    /* 2) Dentro de cada célula: conteúdo também no topo */
    .po-block__body .po-body-cell {
        display: flex;
        align-items: flex-start !important; /* topo */
    }

        /* 3) Coluna "Preço" continua centralizada na horizontal */
        .po-block__body .po-body-cell:nth-child(2) {
            justify-content: center;
            text-align: center;
        }

            .po-block__body .po-body-cell:nth-child(2) .po-rbl-nowrap {
                justify-content: center;
            }

        /* opcional: remova qualquer margem extra dos primeiros elementos */
        .po-block__body .po-body-cell > * {
            margin-top: 0;
        }



/* === Qtd. no TOPO + Preço CENTRAL === */

/* Itens do grid encostam no topo */
.po-block__body {
    align-items: start !important;
    align-content: start !important;
}

    /* Cada “célula” com conteúdo alinhado no topo */
    .po-block__body .po-body-cell {
        display: flex;
        align-items: flex-start !important;
    }

        /* A 1ª coluna (Qtd.) começa no topo com menos “respiro” */
        .po-block__body .po-body-cell:first-child {
            padding-top: 6px !important;
        }

            .po-block__body .po-body-cell:first-child > * {
                align-self: flex-start !important;
                margin-top: 0 !important;
            }

        /* A 2ª coluna (Preço) centralizada na horizontal */
        .po-block__body .po-body-cell:nth-child(2) {
            justify-content: center !important;
            text-align: center !important;
        }

            .po-block__body .po-body-cell:nth-child(2) .po-rbl-nowrap {
                justify-content: center !important;
            }





/* Grid em cards */
#GridViewSales.gv-cards {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 12px !important; /* “respiro” entre cards */
}

/* Barra de ordenação */
#GridViewSales .cards-sortbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    padding: 6px 4px 10px;
}

    #GridViewSales .cards-sortbar a {
        font-weight: 600;
        text-decoration: none;
    }

        #GridViewSales .cards-sortbar a:hover {
            text-decoration: underline;
        }

/* Card */
.sale-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

    /* Topo: ordem + ações */
    .sale-card .card-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 6px;
    }

    .sale-card .ordem {
        font-weight: 700;
        font-size: 1rem;
    }

    .sale-card .actions {
        display: flex;
        gap: 10px;
    }

        .sale-card .actions input[type=image] {
            width: 22px;
            height: 22px;
        }

    /* Corpo */
    .sale-card .card-body {
        display: grid;
        gap: 6px;
    }

    .sale-card .lbl {
        font-size: .8rem;
        font-weight: 600;
        color: #6b7280;
        margin-right: 6px;
    }

    .sale-card .val {
        font-weight: 600;
    }

    .sale-card .status-data {
        color: #374151;
    }

    .sale-card .status {
        font-weight: 600;
    }

    .sale-card .sep {
        color: #9ca3af;
    }

/* Desktop: dá para alinhar em 2 colunas dentro do card, se quiser */
@media(min-width:900px) {
    .sale-card .card-body {
        grid-template-columns: 1fr 1fr;
    }

    .sale-card .status-data {
        grid-column: 1 / -1;
    }
}

/* célula Valor compacta */
.classPO_TableCustStyle5 td:nth-child(3) {
    width: 78px;
}
/* caixa compacta */
.po-money {
    width: 78px !important;
    height: 28px;
    padding: 0 4px;
    text-align: right;
    box-sizing: border-box;
    display: inline-block;
}

/* rolagem horizontal quando precisar (mobile) */
.po-hscroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.classPO_TableCustStyle5 {
    border-collapse: collapse !important; /* elimina border-spacing */
    table-layout: fixed; /* respeita Width das colunas */
    width: 100%;
}

    .classPO_TableCustStyle5 th,
    .classPO_TableCustStyle5 td {
        padding: 4px 3px;
    }

        /* Larguras enxutas por coluna */
        .classPO_TableCustStyle5 th:nth-child(2),
        .classPO_TableCustStyle5 td:nth-child(2) {
            width: 56px;
            text-align: center;
        }
        /* Parc. */
        .classPO_TableCustStyle5 th:nth-child(3),
        .classPO_TableCustStyle5 td:nth-child(3) {
            width: 90px;
        }
        /* Valor */
        .classPO_TableCustStyle5 th:nth-child(4),
        .classPO_TableCustStyle5 td:nth-child(4) {
            width: 28px;
            text-align: center;
        }
        /* $ */
        .classPO_TableCustStyle5 th:nth-child(5),
        .classPO_TableCustStyle5 td:nth-child(5) {
            width: 96px;
        }
/* Data */

/* Controles ocupam a célula inteira */
.po-parc {
    width: 100% !important;
    height: 28px;
    padding: 0 2px;
    box-sizing: border-box;
}

.po-money {
    width: 100% !important;
    height: 28px;
    padding: 0 4px;
    text-align: right;
    box-sizing: border-box;
}

.po-date {
    width: 100% !important;
    height: 28px;
    padding: 0 4px;
    box-sizing: border-box;
}


/* coloque estas regras NO FINAL do ClassPO_04.css */
.classPO_TableCustStyle5.po-fit {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: fixed;
    width: 100%;
}

    .classPO_TableCustStyle5.po-fit th,
    .classPO_TableCustStyle5.po-fit td {
        padding: 2px 3px !important; /* mais enxuto */
    }

        /* larguras das colunas do Grid de pagamento */
        .classPO_TableCustStyle5.po-fit th:nth-child(2),
        .classPO_TableCustStyle5.po-fit td:nth-child(2) {
            width: 56px;
            text-align: center;
        }
        /* Parc. */
        .classPO_TableCustStyle5.po-fit th:nth-child(3),
        .classPO_TableCustStyle5.po-fit td:nth-child(3) {
            width: 90px;
        }
        /* Valor */
        .classPO_TableCustStyle5.po-fit th:nth-child(4),
        .classPO_TableCustStyle5.po-fit td:nth-child(4) {
            width: 28px;
            text-align: center;
        }
        /* $ */
        .classPO_TableCustStyle5.po-fit th:nth-child(5),
        .classPO_TableCustStyle5.po-fit td:nth-child(5) {
            width: 96px;
        }
/* Data */

/* inputs ocupando 100% da célula */
.po-parc {
    width: 100% !important;
    height: 28px;
    padding: 0 2px;
    box-sizing: border-box;
}

.po-money {
    width: 100% !important;
    height: 28px;
    padding: 0 4px;
    text-align: right;
    box-sizing: border-box;
}

.po-date {
    width: 100% !important;
    height: 28px;
    padding: 0 4px;
    box-sizing: border-box;
}

/* Tabela-resumo compacta */
.classPO_TableCustStyle5.po-summary {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: fixed; /* faz as larguras funcionarem */
    width: 100%;
}

    /* paddings e truncamento elegante */
    .classPO_TableCustStyle5.po-summary th,
    .classPO_TableCustStyle5.po-summary td {
        padding: 4px 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; /* "Não config..." em vez de quebrar várias linhas */
    }

        /* Larguras por coluna (ajuste se precisar) */
        .classPO_TableCustStyle5.po-summary th:nth-child(1),
        .classPO_TableCustStyle5.po-summary td:nth-child(1) {
            width: 34%;
        }

        .classPO_TableCustStyle5.po-summary th:nth-child(2),
        .classPO_TableCustStyle5.po-summary td:nth-child(2) {
            width: 26%;
        }

        .classPO_TableCustStyle5.po-summary th:nth-child(3),
        .classPO_TableCustStyle5.po-summary td:nth-child(3) {
            width: 20%;
            text-align: right; /* valor monetário alinhado à direita */
        }

        .classPO_TableCustStyle5.po-summary th:nth-child(4),
        .classPO_TableCustStyle5.po-summary td:nth-child(4) {
            width: 20%;
            text-align: center;
        }

/* Mobile: enxugar um pouco mais */
@media (max-width: 480px) {
    .classPO_TableCustStyle5.po-summary th,
    .classPO_TableCustStyle5.po-summary td {
        padding: 3px 4px;
    }

        .classPO_TableCustStyle5.po-summary th:nth-child(1),
        .classPO_TableCustStyle5.po-summary td:nth-child(1) {
            width: 32%;
        }

        .classPO_TableCustStyle5.po-summary th:nth-child(2),
        .classPO_TableCustStyle5.po-summary td:nth-child(2) {
            width: 24%;
        }

        .classPO_TableCustStyle5.po-summary th:nth-child(3),
        .classPO_TableCustStyle5.po-summary td:nth-child(3) {
            width: 22%;
        }

        .classPO_TableCustStyle5.po-summary th:nth-child(4),
        .classPO_TableCustStyle5.po-summary td:nth-child(4) {
            width: 22%;
        }
}


/* Escopo: só o bloco com a classe .po-tight-block */
.po-tight-block {
    font-size: 12px; /* bem pequena; mude para 11px se quiser “micro” */
    line-height: 1.2;
}

    /* Garante que tabelas/controles dentro do bloco herdem o tamanho */
    .po-tight-block table,
    .po-tight-block th,
    .po-tight-block td,
    .po-tight-block input,
    .po-tight-block select,
    .po-tight-block .HeaderStyle,
    .po-tight-block .RowStyle,
    .po-tight-block .AlternatingRowStyle {
        font-size: inherit;
        line-height: inherit;
    }

    /* Deixa mais compacto ainda (opcional) */
    .po-tight-block .classPO_TableCustStyle2 th,
    .po-tight-block .classPO_TableCustStyle2 td {
        padding: 3px 4px;
    }

/* Evita “engordar” a fonte em mobile */
html {
    -webkit-text-size-adjust: 100%;
}

/* escolha 1: relativo */
#GridViewPaymentDetails td.colPgto {
    font-size: x-small !important;
}

/* (opcional) escolha 2: fixo e consistente em mobile */
#GridViewPaymentDetails td.colPgto {
    font-size: 11px !important;
}

.th-actions {
    padding: 0;
}

    .th-actions .cmdbar {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
    }

        .th-actions .cmdbar input[type=image] {
            width: 24px;
            height: 24px;
            background: #fff;
            padding: 3px;
            border-radius: 6px;
        }

        .th-actions .cmdbar .lbl {
            color: #fff;
            font-weight: bold;
        }

        .th-actions .cmdbar .lbl1 {
            color: #fff;
            font-weight: bold;
            padding-right: 3px;
        }


/* barra do topo */
.header-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}

/* logo não cresce */
.header-logo {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
}

/* área do texto PRECISA ter min-width:0 para o ellipsis funcionar em flex */
.header-brand {
    flex: 1 1 auto;
    min-width: 0;
}

/* corta com reticências numa linha */
.company-name {
    display: block;
    font-weight: 800;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* opcional: reduzir um pouco no celular */
@media (max-width:420px) {
    .company-name {
        font-size: clamp(18px, 5vw, 24px);
    }
}

/* === GridViewCustomers em formato cartão – largura total e alinhado à esquerda === */
#GridViewCustomers,
#GridViewCustomers > tbody > tr > td {
    width: 100% !important;
    text-align: initial !important; /* desfaz o center herdado do container */
}

    #GridViewCustomers .customer-card {
        width: 100%;
        max-width: none;
        text-align: left;
        margin: 10px 0;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 12px;
        background: aliceblue; /* mesmo “tom” do grid */
    }

    /* barra de ordenação alinhada à esquerda */
    #GridViewCustomers .cards-sortbar {
        text-align: left;
    }

    /* linhas internas mais legíveis */
    #GridViewCustomers .customer-card .linha {
        display: flex;
        gap: .25rem .5rem;
        flex-wrap: wrap;
        margin: .15rem 0;
    }

    #GridViewCustomers .customer-card .lbl {
        color: #6b7280;
    }

    #GridViewCustomers .customer-card .val {
        color: #111827;
        font-weight: 500;
    }

/* em telas médias/grandes, deixa rótulo|valor em 2 colunas */
@media (min-width: 700px) {
    #GridViewCustomers .customer-card .linha {
        display: grid;
        grid-template-columns: 160px 1fr;
        align-items: start;
        gap: .25rem .75rem;
    }

    #GridViewCustomers .customer-card .lbl {
        justify-self: end;
    }

    #GridViewCustomers .customer-card .val {
        justify-self: start;
    }
}

/* opcional: o grid não precisa pintar o fundo; o cartão já pinta */
#GridViewCustomers.classPO_TableCustStyle2 {
    background: transparent;
}


/* 1) Neutraliza o "text-align:center" herdado da .classPO_MainDiv só aqui */
.classPO_MainDiv [id$="GridViewCustomers"],
.classPO_MainDiv [id$="GridViewCustomers"] td,
.classPO_MainDiv [id$="GridViewCustomers"] .cards-sortbar {
    text-align: left !important;
}

/* 2) Tira o fundo azul da tabela (o cartão terá seu próprio fundo) */
.classPO_MainDiv [id$="GridViewCustomers"] {
    background: transparent !important;
}

    /* 3) Cada <td> vira um “cartão” largo e cheio (funciona mesmo sem trocar o ItemTemplate) */
    .classPO_MainDiv [id$="GridViewCustomers"] > tbody > tr > td {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin: 10px 0;
        padding: 12px;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 1px 0 rgba(0,0,0,.04);
    }

    /* Linhas internas mais legíveis */
    .classPO_MainDiv [id$="GridViewCustomers"] .linha {
        display: flex;
        gap: .25rem .5rem;
        flex-wrap: wrap;
        margin: .15rem 0;
    }

    .classPO_MainDiv [id$="GridViewCustomers"] .lbl {
        color: #6b7280;
    }

    .classPO_MainDiv [id$="GridViewCustomers"] .val {
        color: #111827;
        font-weight: 600;
    }

/* Em telas médias/grandes, rótulo | valor em 2 colunas */
@media (min-width:700px) {
    .classPO_MainDiv [id$="GridViewCustomers"] .linha {
        display: grid;
        grid-template-columns: 160px 1fr;
        gap: .25rem .75rem;
        align-items: start;
    }

    .classPO_MainDiv [id$="GridViewCustomers"] .lbl {
        justify-self: end;
    }

    .classPO_MainDiv [id$="GridViewCustomers"] .val {
        justify-self: start;
    }
}

/* Força o GridViewCustomers a ocupar 100% da largura */
#GridViewCustomers {
    width: 100% !important;
    background: transparent !important; /* remove o azul herdado */
    border-collapse: separate;
}

    /* Garante que cada célula fique como um bloco em largura cheia */
    #GridViewCustomers td {
        display: block;
        width: 100% !important;
        text-align: left !important;
        background: #fff; /* fundo branco como os cards de ordens */
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        margin: 10px 0;
        padding: 12px;
        box-shadow: 0 1px 2px rgba(0,0,0,.05);
    }

    /* Labels e valores melhor alinhados */
    #GridViewCustomers .lbl {
        color: #6b7280;
        font-weight: 500;
    }

    #GridViewCustomers .val {
        color: #111827;
        font-weight: 600;
    }


    /* --- GridViewCustomers: topo do card com ações à direita --- */
    #GridViewCustomers .customer-card .card-top {
        display: flex;
        align-items: center;
        justify-content: space-between; /* título à esquerda | ações à direita */
        gap: .75rem;
        margin-bottom: .35rem;
        text-align: left; /* evita herdar centralização */
    }

    #GridViewCustomers .customer-card .ordem {
        font-size: 1rem;
        font-weight: 600;
        color: #111827;
        white-space: nowrap; /* impede quebra do "Cliente 14072" */
    }

    /* fileira de ações (ícones) à direita, sem quebra */
    #GridViewCustomers .customer-card .actions {
        margin-left: auto; /* empurra para a direita */
        display: flex;
        align-items: center;
        gap: .45rem;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

        /* remove <br> acidental que possa vir do GridView entre botões */
        #GridViewCustomers .customer-card .actions br {
            display: none;
        }

    /* botões de ícone */
    #GridViewCustomers .customer-card .action-btn {
        background: transparent;
        border: 0;
        padding: 0;
        line-height: 1;
        vertical-align: middle;
        opacity: .9;
        cursor: pointer;
    }

        #GridViewCustomers .customer-card .action-btn:hover {
            opacity: 1;
        }

    /* divisorzinho entre ícones (se quiser manter) */
    #GridViewCustomers .customer-card .actions .divider {
        width: 1px;
        height: 18px;
        background: #e5e7eb;
        display: inline-block;
    }



/* 1) Nunca force altura fixa nas células desses blocos */
.classPO_TableCustStyle1 tr,
.classPO_TableCustStyle1 td {
    height: auto !important;
    vertical-align: middle;
    overflow: visible !important;
}

/* 2) Os wrappers não devem cortar conteúdo interno */
.classPO_MainDiv,
.classPO_SubDiv {
    height: auto !important;
    overflow: visible !important;
}

/* 3) Inputs de data ocupam a linha toda sem “estourar” o container */
#<%= TextBoxInteractionTaskDate.ClientID % >,
#<%= TextBoxInteractionDate.ClientID % > {
    width: 100%;
    box-sizing: border-box;
    display: block;
}

/* 4) Evita corte por line-height herdado */
.classPO_TableCustStyle1 input[type="text"] {
    line-height: normal !important;
    padding: 8px 10px; /* ajuste fino do “alto” do campo */
}

/* (Opcional) Se o popup do calendário ficar atrás de algo */
.ajax__calendar_container {
    z-index: 5000 !important;
}

/* remove a borda do input */
.po-noborder {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent; /* opcional: deixa “fundido” com o container */
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none; /* evita bordas nativas em alguns browsers */
    appearance: none;
}

    /* foco acessível (opcional, substitui o outline padrão) */
    .po-noborder:focus-visible {
        box-shadow: 0 0 0 2px rgba(20,110,90,.35);
        border-radius: 6px; /* combine com seu layout */
    }




/* força a cor preta nos links de telefone */
.customer-phones a {
    color: #111 !important; /* preto */
    text-decoration: none;
    font-weight: 600;
}

    .customer-phones a:hover {
        text-decoration: underline
    }

/* ícone do WhatsApp via SVG embutido (sem arquivo externo) */
.wa-ico {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: -2px;
    background: center/contain no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><path fill='%2325D366' d='M19.11 17.41c-.27-.14-1.6-.79-1.84-.88-.25-.09-.43-.14-.61.14-.18.27-.7.88-.86 1.05-.16.18-.32.2-.59.07-.27-.14-1.13-.42-2.15-1.34-.79-.7-1.33-1.57-1.49-1.83-.16-.27-.02-.41.12-.54.12-.12.27-.32.41-.48.14-.16.18-.27.27-.45.09-.18.05-.34-.02-.48-.07-.14-.61-1.47-.83-2.01-.22-.53-.44-.46-.61-.46h-.52c-.18 0-.48.07-.73.34-.25.27-.96.94-.96 2.29s.99 2.65 1.13 2.83c.14.18 1.95 2.98 4.72 4.17.66.28 1.18.45 1.58.57.66.21 1.27.18 1.75.11.53-.08 1.6-.65 1.83-1.28.23-.63.23-1.17.16-1.28-.07-.11-.25-.18-.52-.32z'/><path fill='%2325D366' d='M27.2 4.8A14.9 14.9 0 0 0 16 0C7.2 0 0 7.2 0 16c0 2.8.74 5.44 2.08 7.73L0 32l8.46-2.22A15.9 15.9 0 0 0 16 32c8.8 0 16-7.2 16-16 0-4.27-1.66-8.27-4.8-11.2zM16 29.3c-2.61 0-5.08-.76-7.2-2.2l-.52-.34-5.02 1.32 1.34-4.88-.34-.54A13.26 13.26 0 0 1 2.7 16C2.7 8.67 8.67 2.7 16 2.7S29.3 8.67 29.3 16 23.33 29.3 16 29.3z'/></svg>");
}
/* força texto preto dentro da linha do telefone */
.phone-line {
    color: #000 !important;
}

    .phone-line a:link,
    .phone-line a:visited,
    .phone-line a:active {
        color: #000 !important;
        text-decoration: none;
    }

    .phone-line a:hover {
        color: #000 !important;
        text-decoration: underline;
    }


/* remove borda/sombra nativos do select (desktop e mobile) */
.po-noborder {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* se a borda vier do wrapper, zere também */
.classPO_SelectWrap {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* a tabela não cresce além da tela */
.classPO_TableZeroSpace.po-grid {
    width: 100%;
    table-layout: fixed; /* impede que uma célula alargue a tabela */
}

/* colunas lado a lado no desktop */
.po-col-estado, .po-col-cidade {
    width: 50%;
}
    /* 50/50 fica mais seguro que 25/75 */
    .po-col-estado *, .po-col-cidade * {
        min-width: 0;
    }
/* wrappers podem encolher */

/* o select ocupa no MÁXIMO o pai */
.classPO_Select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* mobile: empilha (100%) e elimina qualquer largura fixa herdada */
@media (max-width: 768px) {
    .po-col-estado, .po-col-cidade {
        width: 100% !important;
        display: block;
    }
}

.classPO_MainDiv {
    display: flex;
}

.classPO_SubDiv {
    flex: 1 1 auto;
    min-width: 0;
}

/* select fluido, sem cortar texto */
.classPO_Select {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 44px; /* em vez de height fixo */
    padding: 8px 12px; /* dá altura e respiro */
    line-height: 1.2; /* volta ao normal, não achata o texto */
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.po-noborder {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
}

/* 1) Não cortar o rótulo flutuante */
.classPO_Parent {
    overflow: visible !important;
}

/* 2) Wrapper do campo: deixe altura “natural” e centralize via flex */
.classPO_VerticalCenteredElement {
    position: static !important;
    display: flex !important;
    justify-content: flex-start !important; /* horizontal (esquerda) */
    align-items: flex-start !important; /* vertical (topo) */
    min-height: 46px;
    height: auto !important;
    margin: 0;
    padding-left: 0;
}

/* 3) Select: mantém altura, mas sem “achatar” linha de base */
.classPO_Select {
    height: 46px; /* já existe */
    line-height: 1.2 !important; /* em vez de igualar à altura */
    padding: 10px 38px 10px 12px; /* já existe */
}

/* 4) Se o rótulo ainda encostar na borda, desça um tico */
.classPO_ObjectLabelText {
    top: 0; /* valor atual */
    line-height: 1.2; /* evita “comer” a parte de baixo da fonte */
    /* se precisar: top: 2px; */
}

.classPO_VerticalCenteredElement {
    min-height: 48px;
}


/* === MODO INTERMEDIÁRIO (po-medium) === */
.po-medium .classPO_TableCustStyle2 th,
.po-medium .classPO_TableCustStyle2 td {
    padding: 6px 8px; /* um pouco mais espaçado que o compacto */
    font-size: 14px; /* tamanho intermediário */
    line-height: 1.3em; /* melhora a leitura */
}

.po-medium .classPO_TableCustStyle2 th {
    font-weight: 600;
}

.po-medium .classPO_TableCustStyle2 td {
    vertical-align: middle;
}

.cards-grid .vehicle-card {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    margin: 10px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.cards-grid .card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cards-grid .titulo {
    font-weight: 600;
}

.cards-grid .actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cards-grid .divider {
    width: 1px;
    height: 16px;
    background: #ddd;
    display: inline-block;
}

.cards-grid .card-body .linha {
    margin: 4px 0;
}

.cards-grid .lbl {
    opacity: .7;
}

.cards-grid .sep {
    opacity: .5;
    margin: 0 6px;
}

.action-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.action-primary {
    filter: saturate(1.2);
}

.action-danger {
    filter: hue-rotate(330deg) saturate(1.2);
}


.cards-grid .vehicle-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

    .cards-grid .vehicle-body .info {
        flex: 1;
        min-width: 0;
    }

    .cards-grid .vehicle-body .thumb {
        width: 180px;
        height: 120px;
        flex: 0 0 auto;
        border-radius: 10px;
        overflow: hidden;
        background: #f5f7fa;
    }

        .cards-grid .vehicle-body .thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

@media (max-width: 720px) {
    .cards-grid .vehicle-body {
        flex-direction: column;
    }

        .cards-grid .vehicle-body .thumb {
            width: 100%;
            height: 180px;
        }
}


.cards-grid .vehicle-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

    .cards-grid .vehicle-body .info {
        flex: 1;
        min-width: 0;
    }

    .cards-grid .vehicle-body .thumb {
        width: 180px;
        height: 120px;
        flex: 0 0 auto;
        border-radius: 10px;
        overflow: hidden;
        background: #f5f7fa;
    }

        .cards-grid .vehicle-body .thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

@media (max-width: 720px) {
    .cards-grid .vehicle-body {
        flex-direction: column;
    }

        .cards-grid .vehicle-body .thumb {
            width: 100%;
            height: 180px;
        }
}


/* GRID: texto à esquerda, foto à direita */
#GridViewCustomerObjects .vehicle-body {
    display: grid !important;
    grid-template-columns: 1fr auto; /* 1fr para texto; auto = largura da thumb */
    gap: 16px;
    align-items: start;
}

    /* a thumb tem largura adaptativa e mantém proporção 4:3 */
    #GridViewCustomerObjects .vehicle-body .thumb {
        width: clamp(120px, 32vw, 220px); /* min 120px, ideal 32% da viewport, máx 220px */
        aspect-ratio: 4 / 3; /* altura automática pelo ratio */
        border-radius: 10px;
        overflow: hidden;
        background: #f5f7fa;
    }

        /* a imagem preenche a thumb */
        #GridViewCustomerObjects .vehicle-body .thumb img {
            width: 100% !important;
            height: 100% !important;
            object-fit: cover !important;
            display: block;
        }

    /* O texto pode encolher sem quebrar o layout */
    #GridViewCustomerObjects .vehicle-body .info {
        min-width: 0;
    }

/* BREAKPOINTS: ajuste fino para celular */
@media (max-width: 640px) {
    #GridViewCustomerObjects .vehicle-body .thumb {
        width: clamp(110px, 40vw, 180px); /* um pouco menor para caber lado a lado */
    }
}

/* Se quiser empilhar apenas em telas MUITO pequenas, ative isto: */
@media (max-width: 420px) {
    #GridViewCustomerObjects .vehicle-body {
        grid-template-columns: 1fr; /* empilha */
    }

        #GridViewCustomerObjects .vehicle-body .thumb {
            width: 100%; /* ocupa toda a largura */
            aspect-ratio: 16 / 9; /* fica mais “banner” quando empilhar */
            margin-top: 8px;
        }
}


/* ===== Prescriptions (escopo só desta view) ===== */
.view-prescriptions {
    padding: 0 12px;
}

/* limite de largura e centralização, como em page-vehicles */
@media (min-width: 900px) {
    .view-prescriptions {
        max-width: 980px;
        margin: 0 auto;
    }
}

/* título + botão na mesma linha; botão não ocupa 100% */
.view-prescriptions .header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

    .view-prescriptions .header-row .classPO_ButtonStyle {
        width: auto !important;
        padding: 8px 16px;
    }

/* GridView desta view ocupa 100% do container, mas não “aperta” conteúdo */
.view-prescriptions .cards-grid {
    width: 100%;
    table-layout: auto;
}

/* CARD da receita — largura fluida, mas centralizado */
.view-prescriptions .rx-card {
    width: 100%;
    max-width: 920px;
    margin: 14px auto; /* centraliza o card */
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

/* Cabeçalho do card */
.view-prescriptions .rx-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f6;
}

/* Corpo da receita (coluna única, bem respirada) */
.view-prescriptions .rx-body {
    display: block;
    padding: 16px;
}

/* Meta em “coluna” com labels e valores centralizados */
.view-prescriptions .rx-meta {
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
    margin-bottom: 14px;
}

/* Subcards dos itens */
.view-prescriptions .items-grid {
    width: 100%;
}

.view-prescriptions .item-card {
    width: 100%;
    max-width: 880px;
    margin: 10px auto;
    background: #fff;
    border: 1px solid #e9eef4;
    border-radius: 12px;
    padding: 12px 14px;
}

    .view-prescriptions .item-card .top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 8px;
    }

/* “badges” */
.view-prescriptions .badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .9rem;
    background: #f1f5f9;
    margin-right: 6px;
}

    .view-prescriptions .badge.green {
        background: #dcfce7;
    }

    .view-prescriptions .badge.orange {
        background: #ffedd5;
    }

/* grid simples dos campos do item */
.view-prescriptions .item-grid {
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
}

/* garante que o GridView não encolha coisas estranhas quando a janela alarga */
.view-prescriptions .classPO_TableCustStyle2 {
    width: 100%;
    table-layout: auto !important;
}

/* Texto das badges bem escuro (preto) nesta view */
.view-prescriptions .badge {
    color: #000 !important; /* preto */
    opacity: 1 !important; /* garante sem esmaecimento */
    font-weight: 600; /* um pouco mais firme */
}

    /* mantém o fundo das variantes, mas texto preto também */
    .view-prescriptions .badge.green,
    .view-prescriptions .badge.orange {
        color: #000 !important;
    }

.sign-panel {
    max-width: 480px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;
}

.form-row {
    margin-bottom: 10px;
}

.lbl {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.btn-primary {
    background: #111827;
    color: white;
    padding: 8px 14px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.message {
    margin-top: 10px;
    display: block;
}

.classPO_TextMultiline {
    width: 100%;
    min-height: 260px; /* altura inicial maior */
    box-sizing: border-box;
    resize: vertical; /* permite o usuário arrastar para aumentar */
    font-size: 14px; /* opcional: melhora legibilidade */
    line-height: 1.4;
}






:root {
    --card-max: 720px;
    --pad: 16px;
    --pad-lg: 20px;
    --radius: 14px;
    --muted: #6b7280;
}

.doc-wrap {
    margin: 0 auto;
    padding: var(--pad);
    max-width: var(--card-max);
}

.doc-header {
    margin-bottom: 12px;
}

.doc-title {
    font-size: 1.4rem;
    margin: 0;
    letter-spacing: .3px;
}

.doc-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(16,24,40,.06);
    overflow: hidden;
}

.doc-body {
    padding: var(--pad-lg);
}

.doc-text {
    display: block;
    line-height: 1.6;
    font-size: 1rem;
    color: #111827;
    margin-bottom: 14px;
}

.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 10px 0 16px;
}

    .consent input {
        margin-top: 3px;
        transform: scale(1.1);
    }

/* bloco de assinatura */
.sig-block {
    margin-top: 8px;
}

.sig-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.sig-hint {
    color: var(--muted);
}

.sig-canvas-ctn {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: repeating-linear-gradient(0deg, #fafafa, #fafafa 8px, #fff 8px, #fff 16px);
    padding: 10px;
}

    .sig-canvas-ctn canvas {
        display: block;
        width: 100%;
        height: 220px;
        border-radius: 6px;
        background: #fff;
        touch-action: none;
    }

.sig-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

/* botões */
.btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .95rem;
    cursor: pointer;
    line-height: 1;
}

    .btn.primary {
        background: #111827;
        color: #fff;
    }

        .btn.primary:hover {
            filter: brightness(0.9);
        }

    .btn.ghost {
        background: #fff;
        border-color: #d1d5db;
        color: #111827;
    }

        .btn.ghost:hover {
            background: #f3f4f6;
        }

.doc-footer {
    border-top: 1px solid #eef0f2;
    background: #fafafa;
    padding: 10px var(--pad-lg);
}

.meta {
    display: flex;
    justify-content: space-between;
    color: #374151;
    font-size: .92rem;
}

.brand {
    color: #111827;
}

/* impressão: mostra só o card e a assinatura */
@media print {
    body * {
        visibility: hidden;
    }

    .doc-card, .doc-card * {
        visibility: visible;
    }

    .doc-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: 0;
    }

    .btn, .consent input {
        display: none !important;
    }
}


/* ====== DOCUMENTO: manter legibilidade fixa ====== */
.view-doc {
    /* neutraliza o font-size global .80em e variações por viewport */
    font-size: 16px !important; /* base (≈16px) */
    line-height: 1.45 !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

    /* cartão do documento com largura de leitura confortável */
    .view-doc .doc-card {
        max-width: 72ch; /* ~linha de 60–75 caracteres */
        margin: 0 auto;
        padding: 16px 18px;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        box-shadow: 0 6px 18px rgba(16,24,40,.06);
    }

    /* título e corpo com tamanhos estáveis (não usam vw) */
    .view-doc h1,
    .view-doc h2,
    .view-doc h3 {
        font-size: 22px !important;
        line-height: 1.3 !important;
        margin: 0 0 10px;
    }

    .view-doc .doc-text {
        display: block;
        color: #111827;
        font-size: 18px !important; /* trava corpo do texto */
        line-height: 1.6 !important;
        white-space: normal; /* evita “apertar” o texto */
        word-break: normal;
        overflow-wrap: anywhere;
        /* se seu texto vier com quebras \n do banco, ative: */
        /* white-space: pre-wrap; */
    }

    /* checkbox de consentimento: mantém tamanho fixo */
    .view-doc label,
    .view-doc .consent {
        font-size: 16px !important;
    }

    /* assinatura: mantém proporção e não “shrink” o texto adjacente */
    .view-doc .sig-head {
        font-size: 16px !important;
    }

    .view-doc .sig-hint {
        font-size: 14px !important;
        color: #6b7280;
    }

    /* botões: tamanho legível e consistente */
    .view-doc .btn {
        font-size: 15px !important;
    }

/* Em telas muito grandes, NÃO reduza nada; 
   se quiser, pode até subir um ponto para conforto */
@media (min-width: 1400px) {
    .view-doc .doc-text {
        font-size: 19px !important;
    }

    .view-doc h1, .view-doc h2, .view-doc h3 {
        font-size: 24px !important;
    }
}

/* Impressão: tipografia consistente em pontos (não px) */
@media print {
    .view-doc {
        font-size: 12pt !important;
        line-height: 1.5 !important;
    }

        .view-doc .doc-text {
            font-size: 12pt !important;
        }

        .view-doc h1, .view-doc h2, .view-doc h3 {
            font-size: 14pt !important;
        }

        .view-doc .btn, .view-doc .consent input {
            display: none !important;
        }

        .view-doc .doc-card {
            box-shadow: none;
            border: 0;
        }
}

/* coloque no seu CSS já usado na view */
.view-doc .doc-text {
    white-space: pre-line; /* ou pre-wrap se quiser preservar múltiplos espaços também */
}



/* Cartões de ordem: linhas em uma única linha, com quebra elegante se apertar */
.sale-card .card-body {
    text-align: left;
}

    .sale-card .card-body .cliente,
    .sale-card .card-body .linha {
        display: flex;
        align-items: baseline;
        gap: .35rem;
        flex-wrap: wrap; /* se faltar espaço, quebra bonito sem pular o rótulo */
    }

/* spans não viram bloco */
.sale-card .lbl,
.sale-card .val,
.sale-card .sep {
    display: inline;
}

/* mantém “3 — Elaine Cristina” juntinhos quando couber */
.sale-card .val {
    white-space: nowrap;
}

/* estética opcional */
.sale-card .lbl {
    font-weight: 600;
}

.sale-card .sep {
    opacity: .6;
}


/* --- Receita: cabeçalho e corpo alinhados à esquerda --- */
.rx-card .rx-header,
.rx-card .rx-body {
    text-align: left;
}

    /* --- Metadados (Peso, Notas, Status, Assinatura) em linha --- */
    .rx-card .rx-body .rx-meta > div {
        display: flex;
        align-items: baseline;
        gap: .4rem;
        /* se a tela ficar estreita, permite quebrar mantendo o rótulo colado ao valor */
        flex-wrap: wrap;
    }

    .rx-card .rx-body .rx-meta .lbl,
    .rx-card .rx-body .rx-meta .val {
        display: inline;
    }

    .rx-card .rx-body .rx-meta .val {
        white-space: nowrap;
    }
/* mantém "1,000" junto do rótulo */

/* --- Itens da receita: campos em linha (Frequência, Duração, Quantidade total) --- */
.rx-card .item-grid > div {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    flex-wrap: wrap;
}

.rx-card .item-grid .lbl,
.rx-card .item-grid .val {
    display: inline;
}

.rx-card .item-grid .val {
    white-space: nowrap;
}

/* opcional: reduza a distância vertical geral */
.rx-card .rx-body .rx-meta > div,
.rx-card .item-grid > div {
    margin: .15rem 0;
}


/* --- Animais: alinhar conteúdo à esquerda --- */
.vehicle-card .card-body {
    text-align: left;
}

/* Cada linha (Marca, Modelo, Cor, Ano, Status) na mesma linha */
.vehicle-card .linha {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    flex-wrap: wrap; /* quebra elegante se faltar espaço */
}

    /* garantir inline (caso algum estilo antigo force block) */
    .vehicle-card .linha .lbl,
    .vehicle-card .linha .val {
        display: inline;
    }

    /* manter rótulo colado ao valor */
    .vehicle-card .linha .val {
        white-space: nowrap;
    }

/* opcional: dar uma compactada vertical */
.vehicle-card .linha {
    margin: .15rem 0;
}

/* thumb: tamanho consistente e não deforma */
.vehicle-body .thumb img {
    max-width: 140px;
    max-height: 140px;
    width: auto;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}


/* tons (ajuste à vontade) */
:root {
    --rx-bg: #e9f2f9; /* corpo da receita: um pouco mais escuro que aliceblue */
    --rx-item-bg: #f2f7fc; /* itens internos: um tom acima para contraste */
    --rx-border: #d7e3ef;
}

/* card da receita (container principal) */
.cards-grid .rx-card {
    background: var(--rx-bg);
    border: 1px solid var(--rx-border);
    border-radius: 10px;
}

/* cabeçalho: mantém contraste e “separa” do corpo */
.cards-grid .rx-header {
    background: rgba(0,0,0,.03); /* sutil */
    border-bottom: 1px solid var(--rx-border);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

/* corpo da receita (a área que expande/recolhe) */
.cards-grid .rx-body {
    background: var(--rx-bg);
    display: grid; /* já é grid no seu toggle */
    gap: 8px;
    padding: 10px 12px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.cards-grid .item-card {
    background: #fff !important; /* branco */
    border: 1px solid #d7e3ef;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 1px 0 rgba(0,0,0,.03);
}

/* remove qualquer fundo vindo do GridView interno */
.cards-grid .items-grid,
.cards-grid .items-grid table,
.cards-grid .items-grid tr,
.cards-grid .items-grid td {
    background: transparent !important;
}

/* hover opcional no cabeçalho para feedback */
.cards-grid .rx-toggle:hover {
    background: rgba(0,0,0,.05);
}

/* barra de ações alinhada e com espaçamento */
.rx-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

    /* todos os ImageButton do cabeçalho com a MESMA caixa clicável */
    .rx-actions .action-btn,
    .rx-actions input[type="image"] {
        width: 20px; /* tamanho do ícone visual */
        height: 20px;
        padding: 0; /* não deixe padding “roubar” espaço */
        margin: 0;
        border: 0;
        background: transparent;
        vertical-align: middle;
    }

    /* (opcional) efeito hover e hitbox mais confortável */
    .rx-actions .action-btn {
        display: inline-grid;
        place-items: center;
        border-radius: 6px;
    }

        .rx-actions .action-btn:hover {
            background: rgba(0,0,0,.06);
        }

    /* mantenha o chevron proporcional */
    .rx-actions .chev {
        font-size: 16px;
        line-height: 20px; /* casa com a altura dos ícones */
    }

.gv-historic {
    width: 100%;
    border-collapse: separate;
    table-layout: auto;
}

    .gv-historic th, .gv-historic td {
        padding: 6px 8px;
        vertical-align: top;
    }

    /* Estreitas: nunca quebram linha */
    .gv-historic .col-num {
        width: 48px !important;
        min-width: 42px;
        white-space: nowrap;
        text-align: left;
    }

    .gv-historic .col-qtd {
        width: 64px !important;
        min-width: 56px;
        white-space: nowrap;
        text-align: right;
    }

    .gv-historic .col-date {
        width: 92px !important;
        min-width: 84px;
        white-space: nowrap;
        text-align: left;
    }

    /* Descrição usa o espaço restante e pode quebrar */
    .gv-historic .col-desc {
        width: auto;
        word-break: break-word;
        white-space: normal;
    }

/* Em telas muito estreitas, aperta mais um pouco */
@media (max-width: 480px) {
    .gv-historic .col-num {
        width: 40px !important;
    }

    .gv-historic .col-qtd {
        width: 56px !important;
    }

    .gv-historic .col-date {
        width: 80px !important;
    }
}

/* evita quebra da imagem no mobile */
.vehicle-body {
    display: flex;
    flex-wrap: nowrap; /* impede quebra de linha */
    align-items: flex-start;
    gap: 12px;
}

    /* garante que o bloco da foto encolha, mas não quebre */
    .vehicle-body .thumb {
        flex: 0 0 auto;
        width: 96px; /* tamanho fixo (ajuste conforme o ideal) */
        max-width: 30%; /* impede que cresça demais em telas menores */
    }

        /* garante que a imagem ocupe toda a largura do contêiner e redimensione */
        .vehicle-body .thumb img {
            width: 100%;
            height: auto;
            border-radius: 6px;
            display: block;
        }

    /* faz o texto se ajustar no espaço restante */
    .vehicle-body .info {
        flex: 1 1 0;
        min-width: 0;
        word-wrap: break-word;
    }

/*#divScheduleCommandsGV {
    text-align: center;*/ /* centra o botão também */
/*}

    #divScheduleCommandsGV .date-line {
        display: flex;
        justify-content: center;*/ /* centraliza horizontalmente */
/*align-items: center;*/ /* alinha verticalmente */
/*gap: .5rem;*/ /* espaço entre o texto e o label */
/*margin-bottom: .75rem;
        flex-wrap: wrap;*/ /* quebra no mobile se precisar */
/*}*/

/* opcional: deixa o valor com destaque */
/*#divScheduleCommandsGV .date-line > *:last-child {
            font-weight: 600;
        }*/


/* tudo dentro da caixa dos horários */
#divScheduleItemsGV,
#divScheduleItemsGV * {
    color: #000;
}

    /* garante que links fiquem pretos em qualquer estado */
    #divScheduleItemsGV a,
    #divScheduleItemsGV a:link,
    #divScheduleItemsGV a:visited,
    #divScheduleItemsGV a:hover,
    #divScheduleItemsGV a:active {
        color: #000 !important;
        text-decoration: none;
    }

    /* quando o LinkButton estiver desabilitado (ASP.NET renderiza <span class="aspNetDisabled">) */
    #divScheduleItemsGV .aspNetDisabled {
        color: #000 !important;
        opacity: 1 !important; /* se algum estilo estiver esmaecendo */
    }

    #divScheduleItemsGV a,
    #divScheduleItemsGV a:link,
    #divScheduleItemsGV a:visited {
        color: #000;
        text-decoration: none;
    }

    #divScheduleItemsGV .aspNetDisabled {
        color: #000;
        opacity: 1;
    }


.header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap; /* quebra no mobile */
    justify-content: center; /* centralizado, se quiser */
}

    .header-row h3 {
        margin: 0;
    }

.agenda-row {
    display: flex;
    align-items: center;
    justify-content: center; /* centraliza; remova se não quiser */
    gap: 12px;
    flex-wrap: nowrap; /* mantém na MESMA linha */
    margin: 8px 0 16px;
}

.agenda-title {
    font-size: clamp(20px,2.2vw,28px);
    font-weight: 700;
    white-space: nowrap;
}

/* Select compacto, sem ocupar 100% */
.agenda-select {
    display: inline-block;
    width: auto !important; /* derruba qualquer select{width:100%} global */
    max-width: 340px; /* limite */
    flex: 0 1 340px; /* permite encolher dentro do flex */
    min-width: 0; /* <— permite encolher de verdade */
    padding: .5rem 2rem .5rem .75rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* … quando o texto é longo */
}

@media (max-width:600px) {
    .agenda-row {
        flex-wrap: wrap;
    }

    .agenda-select {
        flex: 1 1 100%;
        max-width: 100%;
    }
}




#GridViewCustomerObjects .card-body-2col {
    width: 100%;
    border-collapse: separate;
    border-spacing: 12px 0;
    table-layout: fixed;
    display: table !important; /* vence regras responsivas globais */
}

    #GridViewCustomerObjects .card-body-2col td {
        display: table-cell !important; /* impede td de virar block */
        vertical-align: top;
    }

    #GridViewCustomerObjects .card-body-2col .info {
        width: auto;
    }

    #GridViewCustomerObjects .card-body-2col .thumb {
        width: 120px;
    }

        #GridViewCustomerObjects .card-body-2col .thumb img {
            display: block;
            width: 100%;
            height: auto;
        }


/* Cartão: info (cresce) + thumb (fixa) */
#GridViewCustomerObjects .card-body.vehicle-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

    /* coluna esquerda pode encolher e quebrar texto sem empurrar a thumb */
    #GridViewCustomerObjects .card-body.vehicle-body .info {
        flex: 1 1 auto;
        min-width: 0; /* IMPORTANTÍSSIMO: permite encolher */
        overflow-wrap: anywhere; /* evita palavras “estourarem” a linha */
        word-break: break-word;
    }

    /* coluna direita: largura fixa, não encolhe, não quebra de linha */
    #GridViewCustomerObjects .card-body.vehicle-body .thumb {
        flex: 0 0 112px; /* fixa em 112px */
        max-width: 112px;
    }

        /* imagem nunca distorce */
        #GridViewCustomerObjects .card-body.vehicle-body .thumb img {
            display: block;
            width: 100%;
            height: auto; /* mantém proporção */
            object-fit: cover; /* cobre o quadro sem “espremer” */
            border-radius: 12px; /* opcional */
        }

/* em telas bem estreitas, reduza a miniatura em ~16px */
@media (max-width: 420px) {
    #GridViewCustomerObjects .card-body.vehicle-body .thumb {
        flex-basis: 96px;
        max-width: 96px;
    }
}

.checklist-card {
    background-color: #f7fbff;
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.checklist-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
    padding: 4px 0;
}

.checklist-group-text {
    font-size: 14px;
}

.accordion-icon {
    font-size: 16px;
    font-weight: bold;
}

.checklist-card-body {
    border-top: 1px solid #e0e0e0;
    margin-top: 4px;
    padding-top: 4px;
}

.checklist-item-row {
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}

.checklist-item-header {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
}

.status-pill-group {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 2px;
}

    .status-pill-group input[type="radio"] {
        display: none;
    }


    .status-pill-group label {
        padding: 3px 8px;
        border-radius: 999px;
        border: 1px solid #ccc;
        cursor: pointer;
        font-size: 11px;
        user-select: none;
        background-color: #f8f8f8;
        color: #333;
    }

    /* selecionado */
    .status-pill-group input[type="radio"]:checked + label {
        border-color: #007bff;
        font-weight: 600;
    }

.checklist-item-notes {
    margin-top: 2px;
}

.checklist-notes {
    width: 100%;
    font-size: 11px;
    resize: vertical;
}

/* NA selecionado – cinza */
.status-pill-group input[value="NA"]:checked + label {
    background-color: #e0e0e0;
    border-color: #bdbdbd;
    color: #333;
    font-weight: 600;
}

/* NO selecionado – vermelho */
.status-pill-group input[value="NO"]:checked + label {
    background-color: #ffebee;
    border-color: #e53935;
    color: #b71c1c;
    font-weight: 600;
}

/* OK selecionado – verde */
.status-pill-group input[value="OK"]:checked + label {
    background-color: #e8f5e9;
    border-color: #43a047;
    color: #1b5e20;
    font-weight: 600;
}


/* cada linha do card */
.task-card .linha {
    display: flex;
    flex-wrap: wrap; /* permite quebrar para a linha de baixo */
    align-items: flex-start;
}

    /* rótulo: "Tarefa:", "Cliente:" etc. */
    .task-card .linha .lbl {
        font-weight: 600;
        margin-right: 4px;
        white-space: nowrap; /* o rótulo continua em uma linha só */
    }

    /* valor: aqui o texto pode quebrar à vontade */
    .task-card .linha .val {
        flex: 1 1 0;
        white-space: normal; /* importantíssimo: tira qualquer nowrap herdado */
        word-wrap: break-word; /* se tiver palavra muito grande, quebra também */
        word-break: break-word; /* reforço para navegadores chatos */
    }



/* base do botão */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
    transition: all .15s ease-in-out;
}

/* estado padrão (verde) */
.whatsapp-btn-default {
    background-color: #25D366;
    color: #fff !important;
}

    .whatsapp-btn-default:hover {
        background-color: #1ebe5d;
        transform: translateY(-1px);
    }

/* quando precisa notificar HOJE (seu amarelo atual) */
.whatsapp-btn-today {
    background-color: #facc15; /* amarelo */
    color: #000 !important;
}

    .whatsapp-btn-today:hover {
        background-color: #eab308;
        transform: translateY(-1px);
    }



/* botão ? continua igual */
.help-menu-btn {
    margin-left: .5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #24433e;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
}

/* AGORA: menu fixo na tela, acima de tudo */
.help-menu {
    position: fixed; /* em vez de absolute */
    right: 16px;
    top: 100px; /* ajusta se quiser mais pra cima/baixo */
    background: #fff;
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
    z-index: 99999; /* bem alto */
    min-width: 190px;
}

    .help-menu.hidden {
        display: none;
    }

    .help-menu ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }


.rx-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: .25rem;
}

.rx-help-btn {
    margin-left: .25rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #24433e; /* cor do tema */
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: .85rem;
}

/* popover do card */
.rx-help-menu {
    position: absolute;
    right: 0;
    top: 30px;
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 4px 18px rgba(0,0,0,.18);
    z-index: 9999;
    min-width: 190px;
}

    .rx-help-menu.hidden {
        display: none;
    }

.rx-help-item {
    width: 100%;
    border: none;
    background: transparent;
    padding: 4px 0;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #24433e; /* cor do texto */
}

    .rx-help-item:hover {
        text-decoration: underline;
        color: #0b8174; /* cor ao passar o mouse (opcional) */
    }

.rx-help-icon {
    width: 18px;
    height: 18px;
}


.help-menu-item {
    display: flex;
    align-items: center; /* <<< garante alinhamento vertical perfeito */
    gap: 10px; /* espaço entre ícone e texto */
    padding: 8px 10px;
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.92rem;
    color: #24433e; /* texto */
}

    .help-menu-item:hover {
        background: #f2f8f7; /* leve destaque */
        border-radius: 6px;
    }

    .help-menu-item img {
        width: 22px; /* tamanho padrão do ícone */
        height: 22px;
        object-fit: contain;
    }

.vehicle-card .actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* botão ? */
.obj-help-btn {
    margin-left: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #24433e; /* cor do tema */
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: .8rem;
}

/* popover */
.obj-help-menu {
    position: absolute;
    right: 0;
    top: 26px;
    background: #fff;
    border-radius: 10px;
    padding: 6px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.16);
    z-index: 9999;
    min-width: 180px;
}

    .obj-help-menu.hidden {
        display: none;
    }

/* itens do menu */
.obj-help-item {
    display: flex;
    align-items: center; /* ícone e texto alinhados */
    gap: 8px;
    width: 100%;
    border: none;
    background: transparent;
    padding: 4px 6px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #24433e;
}

    .obj-help-item:hover {
        background: #f2f8f7;
        border-radius: 6px;
    }

.obj-help-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* se ainda não tiver */
.hidden {
    display: none;
}

.unit-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.unit-hint {
    font-size: 11px;
    color: #666;
    line-height: 1.3;
    max-width: 260px;
}

.classPO_TextMultiLine {
    min-height: 160px; /* aprox. 10 linhas */
    height: auto;
    resize: vertical; /* opcional: permite o usuário aumentar/diminuir */
}


/* =========================================================
   CARTA DE ENCAMINHAMENTO (GridView “cards”) — escopo local
   Container: <div class="classPO_DivContainer view-ReferralLetters">
   ========================================================= */

/* Cabeçalho (título + botão “Nova Carta”) */
.view-ReferralLetters .header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 10px;
    flex-wrap: wrap;
}

    .view-ReferralLetters .header-row h3 {
        margin: 0;
        font-size: 18px;
        line-height: 1.2;
        color: darkslategray;
        flex: 1 1 auto;
        min-width: 0;
    }

    .view-ReferralLetters .header-row .classPO_ButtonStyle {
        width: auto !important; /* evita 100% */
        padding: 10px 16px;
        height: 40px;
        flex: 0 0 auto;
    }

/* Grid/“lista” de cards */
.view-ReferralLetters .cards-grid {
    background: transparent !important;
    border: none !important;
}

/* Card */
.view-ReferralLetters .RefLetter-card {
    width: 100%;
    max-width: 920px;
    margin: 12px auto;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    overflow: hidden;
}

/* Cabeçalho clicável */
.view-ReferralLetters .RefLetter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px;
    cursor: pointer;
    user-select: none;
    background: #f7fbff;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.view-ReferralLetters .RefLetter-title {
    font-size: 14px;
    color: #1a403b;
}

.view-ReferralLetters .RefLetter-sub {
    margin-top: 2px;
    font-size: 12px;
    color: #54606b;
    line-height: 1.2;
}

/* Ações (ícones + chevron + ?) */
.view-ReferralLetters .RefLetter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative; /* para menu */
}

    /* Botões/ícones (ImageButton vira <input type="image">) */
    .view-ReferralLetters .RefLetter-actions .action-btn {
        width: 34px;
        height: 34px;
        padding: 6px;
        border-radius: 10px;
        border: 1px solid rgba(0,0,0,.10);
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .view-ReferralLetters .RefLetter-actions input[type="image"].action-btn {
        box-sizing: border-box;
    }

    .view-ReferralLetters .RefLetter-actions .action-btn:hover {
        background: #f2f6fa;
    }

    .view-ReferralLetters .RefLetter-actions .action-btn:active {
        transform: translateY(1px);
    }

    /* Se existir regra global que deixa img 100% */
    .view-ReferralLetters .RefLetter-actions img {
        width: 18px;
        height: 18px;
        object-fit: contain;
    }

    /* Chevron */
    .view-ReferralLetters .RefLetter-actions .chev {
        font-size: 16px;
        line-height: 1;
        color: #1a403b;
        margin-left: 2px;
        transition: transform .15s ease;
    }

/* Botão “?” */
.view-ReferralLetters .RefLetter-help-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.10);
    background: #fff;
    color: #1a403b;
    font-weight: 800;
    cursor: pointer;
}

    .view-ReferralLetters .RefLetter-help-btn:hover {
        background: #f2f6fa;
    }

/* Menu do “?” */
.view-ReferralLetters .RefLetter-help-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
    padding: 6px;
    z-index: 999;
}

    .view-ReferralLetters .RefLetter-help-menu.hidden {
        display: none;
    }

.view-ReferralLetters .RefLetter-help-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
}

    .view-ReferralLetters .RefLetter-help-item:hover {
        background: #f2f6fa;
    }

.view-ReferralLetters .RefLetter-help-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.view-ReferralLetters .RefLetter-help-item span {
    font-size: 13px;
    color: #1f2937;
}

/* Corpo (detalhes) — você alterna display none/grid no JS */
.view-ReferralLetters .RefLetter-body {
    display: none; /* fechado por padrão */
    padding: 12px;
}

/* Meta em grid (Peso/Notas/Status/Assinatura) */
.view-ReferralLetters .RefLetter-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}

    .view-ReferralLetters .RefLetter-meta > div {
        background: #f8fafc;
        border: 1px solid rgba(0,0,0,.06);
        border-radius: 12px;
        padding: 10px 10px;
        min-width: 0;
    }

    .view-ReferralLetters .RefLetter-meta .lbl {
        display: block;
        font-size: 11px;
        font-weight: 800;
        color: #1a403b;
        margin-bottom: 4px;
    }

    .view-ReferralLetters .RefLetter-meta .val {
        display: block;
        font-size: 13px;
        color: #334155;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

/* Responsivo */
@media (max-width: 560px) {
    .view-ReferralLetters .RefLetter-header {
        align-items: flex-start;
    }

    .view-ReferralLetters .RefLetter-meta {
        grid-template-columns: 1fr;
    }

    .view-ReferralLetters .RefLetter-actions {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

        .view-ReferralLetters .RefLetter-actions .action-btn,
        .view-ReferralLetters .RefLetter-help-btn {
            width: 32px;
            height: 32px;
            border-radius: 10px;
        }
}

/* Acessibilidade: foco visível em botões */
.view-ReferralLetters .RefLetter-actions .action-btn:focus,
.view-ReferralLetters .RefLetter-help-btn:focus,
.view-ReferralLetters .RefLetter-help-item:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,64,59,.18);
    border-color: rgba(26,64,59,.35);
}

.RefLetter-preview {
    display: block !important;
    width: 100% !important;
    /* altura mínima garantida */
    min-height: 200px !important; /* ajuste: 100/120/140 */
    padding: 12px 14px !important;
    /* texto */
    font-size: 14px !important;
    line-height: 1.4 !important;
    /* visual */
    background: #fff !important;
    border: 1px solid rgba(0,0,0,.10) !important;
    border-radius: 10px !important;
    /* comportamento */
    white-space: normal !important;
    overflow: visible !important; /* importante pra não cortar */
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

    /* O ASP.NET geralmente renderiza o Label como <span> inline */
    .RefLetter-preview > span,
    .RefLetter-preview span {
        display: block !important;
        min-height: 96px !important; /* garante altura mesmo se span estiver com estilo ruim */
        line-height: 1.4 !important;
    }



    .RefLetter-preview:empty {
        display: none;
    }

.RefLetter-header {
    display: block;
}

.RefLetter-headerRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.RefLetter-preview {
    margin-top: 6px;
    padding-left: 0px;
    font-size: 12px;
    opacity: .85;
    /* se quiser quebrar linha (não ficar em uma linha só) */
    white-space: normal;
    overflow-wrap: anywhere;
}

    .RefLetter-preview:empty {
        display: none;
    }

.RefLetter-headerTable {
    width: 100%;
    border-collapse: collapse;
}

    .RefLetter-headerTable td {
        vertical-align: top;
        padding: 4px 6px;
    }

.RefLetter-left {
    width: 100%;
}

.RefLetter-actions {
    white-space: nowrap;
    text-align: right;
}

.RefLetter-preview {
    font-size: 12px;
    opacity: .85;
    padding-top: 6px;
    white-space: normal;
    word-break: break-word;
}

    .RefLetter-preview:empty {
        display: none;
    }

.RefLetter-header {
    display: block;
    width: 100%;
}

.RefLetter-headerRow {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* esquerda pode encolher, mas sem “bug do flex” */
.RefLetter-left {
    flex: 1 1 auto;
    min-width: 0;
}

/* ✅ botões nunca quebram linha */
.RefLetter-actions {
    flex: 0 0 auto;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px; /* ajuste fino */
}

    /* ✅ garante que os botões (inputs/img) não “empurrem” */
    .RefLetter-actions input,
    .RefLetter-actions button,
    .RefLetter-actions img,
    .RefLetter-actions span {
        vertical-align: middle;
    }

.RefLetter-help-menu {
    position: absolute;
    z-index: 9999;
}

.RefLetter-card {
    position: relative;
}

.refletter-text {
    display: block !important;
    width: 100% !important;
    text-align: left !important; /* vence o text-align do pai */
    white-space: pre-line; /* respeita \r\n do banco */
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

    .refletter-text span {
        text-align: left !important; /* garantia extra */
    }


.refletter-left {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
}

    .refletter-left * {
        text-align: left !important;
    }

.discount-panel {
    width: 100%;
    box-sizing: border-box;
    background: aliceblue;
    border-radius: 12px;
    padding: 12px 14px;
}

.discount-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    width: 100%;
}

.discount-label {
    margin-right: auto; /* empurra os outros itens para a direita */
}
/* Input com tamanho controlado (não estoura e não força wrap) */
.discount-input {
    flex: 0 0 140px; /* largura fixa */
    width: 140px;
    padding: 8px 10px;
    font-size: 15px; /* menor */
    text-align: right;
    border: 1px solid #9fc7ef;
    border-radius: 8px;
    box-sizing: border-box;
}

/* RadioButtonList menor e em linha */
.discount-mode {
    font-size: 16px; /* menor */
    margin: 0;
}

    .discount-mode table {
        border-collapse: collapse;
    }

    .discount-mode td {
        padding: 0 10px 0 0;
    }

/* Opcional: se a tela ficar MUITO estreita, em vez de quebrar, permite rolar horizontal */
.discount-panel {
    overflow-x: auto;
}

/* bloco geral */
.po-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* cada linha: Label + Campos */
.po-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* coluna do label (alinha as labels) */
.po-label {
    width: 110px; /* ajuste conforme quiser */
    text-align: right;
    white-space: nowrap;
}

/* coluna dos controles */
.po-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap; /* se faltar espaço, quebra */
}

/* se quiser que o textbox da qtd tenha tamanho fixo */
.po-input--sm {
    width: 70px;
}

.po-input--xs {
    width: 90px;
}

.po-select--xs {
    width: 160px;
}

/* RadioButtonList em linha sem quebrar (ou deixe quebrar se preferir) */
.po-rbl-nowrap {
    white-space: nowrap;
}

/* só pra esse bloco ficar bem “Order Management” */
.po-qty-like-om th {
    width: 160px;
    white-space: nowrap;
}

/* alinha os controles em linha, igual você queria */
.po-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* quebra se faltar espaço */
}

/* tamanhos (ajuste fino se quiser) */
.po-input--sm {
    width: 80px;
}

.po-input--xs {
    width: 110px;
}

.po-select--xs {
    width: 170px;
}

/* RadioButtonList sem quebrar (ou remova se quiser que quebre) */
.po-rbl-nowrap {
    white-space: nowrap;
}

/* ===== SOMENTE GridViewSaleItems ===== */
.po-saleitems td.po-col-actions {
    overflow: hidden !important; /* impede invadir a coluna Item */
    white-space: nowrap;
}

/* deixa os ícones bem compactos */
.po-saleitems .po-actions {
    display: inline-flex;
    align-items: center;
    gap: 3px; /* menor que o padrão (6px) */
}

    /* diminui um pouco os ícones só aqui */
    .po-saleitems .po-actions input[type=image],
    .po-saleitems .po-actions img,
    .po-saleitems .po-action {
        width: 14px !important;
        height: 14px !important;
        max-width: 14px !important;
        max-height: 14px !important;
    }

/* se ficar MUITO apertado, quebra em 2 linhas (sem invadir o texto) */
@media (max-width: 420px) {
    .po-saleitems .po-actions {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 90px; /* respeita sua largura da coluna */
    }
}

.po-actions {
    display: flex;
    align-items: center; /* <- centraliza tudo na vertical */
    gap: 12px;
}

/* o CheckBox do ASP.NET vira: <span class="po-check"><input> <label>...</label></span> */
.po-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    line-height: 1; /* evita o texto “subir” */
}

    /* micro-ajuste do quadradinho para ficar na mesma linha do botão */
    .po-check input[type="checkbox"] {
        margin: 0;
        transform: translateY(2px); /* ajuste fino: teste 1px, 2px ou 0 */
    }

    /* opcional: deixar o texto com o mesmo “peso” visual do botão */
    .po-check label {
        margin: 0;
        cursor: pointer;
    }

@media (max-width:380px) {
    #GridViewSales.po-compact th:nth-child(1),
    #GridViewSales.po-compact td:nth-child(1) {
        display: table-cell !important;
    }

    #GridViewSales.po-compact {
        table-layout: auto !important;
    }

        #GridViewSales.po-compact td, #GridViewSales.po-compact th {
            width: auto !important;
        }
}

.button-grid {
    display: flex;
    gap: 10px; /* espaço entre botões */
    margin-top: 10px; /* espaço abaixo do título */
}

    .button-grid .classPO_ButtonStyle {
        flex: 1; /* divide igualmente em 2 colunas */
    }
