
/* MOBILE */

@media (max-width:768px){
    
.pdo-header{
flex-direction:column;
align-items:flex-start;
gap:15px;
}
    
.pdo-header-inner{
width:100%;
justify-content:space-between;
}
    
.pdo-header-actions{
width:100%;
justify-content:flex-end;
}
    
}

@media (max-width:768px){
    
/* botão novo pedido ocupa linha inteira */
    
#pdo-create-order{
width:100%;
padding:12px 16px;
font-size:15px;
font-weight:600;
}
    
/* garante que o container permita largura total */
    
.pdo-toolbar{
align-items:stretch;
}
    
}


@media (max-width:768px){
    
.pdo-toolbar{
flex-direction:column;
align-items:stretch;
gap:12px;
}
    
.pdo-search{
width:100%;
}
    
.pdo-search input{
flex:1;
width:100%;
}
    
}

.pdo-table-wrapper{
overflow-x:auto;
}

@media (max-width:768px){
    
.pdo-icon{
width:30px;
height:30px;
}
    
.pdo-icon svg,
.pdo-icon img{
width:16px;
height:16px;
}
    
}

@media (max-width:768px){
    
.pdo-grid.cols-2,
.pdo-grid.cols-3,
.pdo-grid.cols-4{
grid-template-columns:1fr;
}
    
}

@media (max-width:768px){
    
.pdo-login-card{
padding:35px 25px;
margin:20px;
}
    
}

/* =================================
MOBILE - TABELA VIRA CARDS
================================= */

@media (max-width:768px){
    
.pdo-table thead{
display:none;
}
    
.pdo-table,
.pdo-table tbody,
.pdo-table tr,
.pdo-table td{
display:block;
width:100%;
}
    
.pdo-table tr{
background:#fff;
border:1px solid #e5e7eb;
border-radius:10px;
padding:12px;
margin-bottom:12px;
box-shadow:0 4px 10px rgba(0,0,0,.04);
}
    
.pdo-table td{
border:none;
padding:6px 0;
display:flex;
justify-content:space-between;
align-items:center;
font-size:14px;
}
    
.pdo-table td::before{
font-weight:600;
color:#6b7280;
font-size:13px;
}
    
/* labels */
    
.pdo-table td:nth-child(1)::before{
content:"Data";
}
    
.pdo-table td:nth-child(2)::before{
content:"OS";
}
    
.pdo-table td:nth-child(3)::before{
content:"Cliente";
}
    
.pdo-table td:nth-child(4)::before{
content:"Ações";
}
    
.pdo-table td:last-child{
margin-top:8px;
justify-content:flex-start;
gap:8px;
}
    
}

@media (max-width:768px){
    
.pdo-actions{
gap:6px;
margin-top:4px;
}
    
.pdo-icon{
width:32px;
height:32px;
}
    
}

/* GERAL */

.pdo-app {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body .pdo-app {
    letter-spacing: -0.01em;
}

.pdo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 30px;
}

.pdo-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.pdo-header-logo {
    max-height: 50px;
}

.pdo-header-brand strong {
    display: block;
    font-size: 18px;
}

.pdo-header-brand small {
    display: block;
    font-size: 12px;
    opacity: .6;
    margin-top: 2px;
}


.pdo-header-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --------------------------------
HEADER ACTIONS
-------------------------------- */

.pdo-header-actions{
    display:flex;
    gap:12px;
}

/* botão padrão do header */

.pdo-header-btn{
    display:flex;
    align-items:center;
    gap:8px;
    
    padding:8px 14px;
    
    border-radius:8px;
    border:1px solid #e3e3e3;
    
    background:#fff;
    color:#444;
    
    font-size:14px;
    font-weight:500;
    
    cursor:pointer;
    transition:all .15s ease;
}

.pdo-header-btn:hover{
    background:#f7f7f7;
}

/* ícone */

.pdo-header-btn svg{
    width:18px;
    height:18px;
}

/* WhatsApp destaque */

.pdo-btn-whatsapp{
    border-color:#25D366;
    color:#25D366;
}

.pdo-btn-whatsapp:hover{
    background:#25D366;
    color:#fff;
}

/* botão sair */

.pdo-btn-logout{
    border-color:#e2e2e2;
}

.pdo-logo {
    max-height: 60px;
}

.pdo-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
}

.pdo-section {
    padding: 25px;
    margin-bottom: 35px;
}

.pdo-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pdo-btn-secondary {
    background: transparent;
    border: 2px solid var(--pdo-primary);
    color: var(--pdo-primary);
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .2s ease;
}

.pdo-btn-secondary:hover {
    background: var(--pdo-primary);
    color: #fff;
}

/* Barra superior */
.pdo-toolbar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* Form de busca */
.pdo-search {
    display: flex;
    align-items: center;
}

/* Campo */
.pdo-search input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px 0 0 6px;
    outline: none;
}

/* Botão lupa */
.pdo-search-btn {
    background: var(--pdo-primary);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: opacity .2s ease;
}

.pdo-search-btn:hover {
    opacity: .9;
}


.pdo-section > .pdo-section-title {
    margin-bottom: 20px;
}

.pdo-section.bg-secondary {
    padding: 25px;
    border-radius: 14px;
    margin-bottom: 35px;
    color: var(--lens-secondary);
}


.pdo-section.bg-secondary .pdo-section-title {
    color: #ffffff;
    
}

.pdo-section.bg-secondary {
    padding: 25px;
    border-radius: 14px;
    margin-bottom: 30px;
}



.pdo-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}



.pdo-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdo-section-icon .dashicons {
    font-size: 20px;
}

.pdo-label {
    font-weight: 500;
    font-size: 13px;
}

.pdo-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.pdo-btn-primary {
    background: var(--pdo-primary) !important;
    color: #fff;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all .2s ease;
}

.pdo-btn-primary:hover {
    opacity: .9;
}

.pdo-grid {
    display: grid;
    gap: 24px !important;
}

.pdo-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pdo-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pdo-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}


.pdo-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pdo-field label {
    font-size: 13px;
    font-weight: 500;
    opacity: .8;
}

.pdo-field input {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-family: inherit;
}

@media (max-width: 768px) {
    .pdo-grid.cols-2,
    .pdo-grid.cols-3,
    .pdo-grid.cols-4 {
        grid-template-columns: 1fr;
    }
}


.pdo-card.od {
    border-left: 4px solid var(--pdo-primary);
}

.pdo-card.oe {
    border-left: 4px solid var(--pdo-secondary);
}

.pdo-save-status {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    margin-bottom: 15px;
    display: inline-block;
    transition: all .3s ease;
}

.pdo-save-status.saved {
    background: #ecfdf5;
    color: #065f46;
}

.pdo-save-status.saving {
    background: #fef3c7;
    color: #92400e;
}

.pdo-save-status.error {
    background: #fee2e2;
    color: #991b1b;
}

.pdo-preview-header {
    
    gap:30px;
    align-items:center;
    margin-bottom:40px;
}

.pdo-preview-logo {
    max-height:80px;
}

.pdo-preview-section {
    margin-bottom:35px;
}

.pdo-preview-grid-2 {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:40px;
}

.pdo-preview-actions {
    margin-top: 40px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.pdo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
}

.pdo-btn-primary {
    background-color: var(--pdo-primary);
    color: #fff;
}

.pdo-btn-secondary {
    background: #f3f4f6;
    color: #111827;
}

.pdo-btn:hover {
    opacity: .9;
}

.pdo-btn-danger {
    background: #c0392b;
    border-color: var(--lens-primary);
    color: #fff;
}

.pdo-btn-danger:hover {
    opacity: .9;
}

/* ===========================
   Modal 
=========================== */

.pdo-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pdo-modal.active {
    display: flex;
}

.pdo-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    animation: pdoFadeIn .2s ease;
}

.pdo-modal-box{
background:#fff;
padding:30px;
border-radius:12px;
width:320px;
box-shadow:0 10px 30px rgba(0,0,0,0.2);
display:flex;
flex-direction:column;
gap:15px;
}

@keyframes pdoFadeIn {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

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

.pdo-btn-danger:hover {
    opacity: .9;
}

.pdo-pagination {
    margin-top: 20px;
    display: flex;
    gap: 8px;
}

.pdo-pagination a {
    padding: 6px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    border-radius: 6px;
}

.pdo-pagination a.active {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}

.pdo-table{
width:100%;
border-collapse:separate;
border-spacing:0;
border:1px solid #e5e7eb;
border-radius:10px;
overflow:hidden;
background:#fff;
}

/* cabeçalho */

.pdo-table thead th{
background:#f9fafb;
font-weight:600;
text-align:left;
padding:14px 16px;
font-size:14px;
color:#374151;
border-bottom:1px solid #e5e7eb;
}

/* células */

.pdo-table td{
padding:14px 16px;
font-size:14px;
border-bottom:1px solid #f1f5f9;
vertical-align:middle;
}

/* remover última borda */

.pdo-table tr:last-child td{
border-bottom:none;
}

/* hover */

.pdo-table tbody tr:hover{
background:#fafafa;
}

.pdo-table td:first-child,
.pdo-table th:first-child{
padding-left:20px;
}

.pdo-table td:last-child,
.pdo-table th:last-child{
padding-right:20px;
}

.pdo-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        var(--pdo-secondary) 0%,
        color-mix(in srgb, var(--pdo-secondary) 85%, black) 100%
    );
}

.pdo-login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 50px 40px;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,.15);
    text-align: center;
}

.pdo-login-card img {
    max-height: 70px;
    margin-bottom: 15px;
}

.pdo-login-title {
    font-size: 15px;
    opacity: .6;
    margin-bottom: 30px;
}

.pdo-login-card input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    transition: all .18s ease;
}

.pdo-login-card input:focus {
    outline: none;
    border-color: var(--pdo-primary);
    box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

.pdo-login-card button {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--pdo-primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}

.pdo-login-card button:hover {
    transform: translateY(-1px);
    opacity: .95;
}

.pdo-login-card button:active {
    transform: translateY(0);
}

.pdo-login-powered {
    margin-top: 30px;
    font-size: 12px;
    opacity: .6;
    text-align: center;
}

.pdo-login-powered span {
    display: block;
    margin-bottom: 6px;
    letter-spacing: .5px;
}

.pdo-powered-logo {
    max-height: 18px;
}

.pdo-login-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.pdo-login-version {
    margin-top: 18px;
    display: flex;
    gap: 6px;
    justify-content: center;
}

.pdo-badge {
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    letter-spacing: .3px;
}


.pdo-badge-orcamento {
    background:#fde7c2;
    color:#8a5b00;
}

.pdo-badge-venda {
    background:#d1f7dc;
    color:#0b6b2d;
}

.pdo-badge-beta {
    background: rgba(99,102,241,.15);
    color: #6366f1;
    border: 1px solid rgba(99,102,241,.25);
}

.pdo-badge-secure {
    background: rgba(16,185,129,.15);
    color: #059669;
    border: 1px solid rgba(16,185,129,.25);
}

.pdo-badge-cloud {
    background: rgba(59,130,246,.15);
    color: #2563eb;
    border: 1px solid rgba(59,130,246,.25);
}


.pdo-actions{
display:flex;
gap:10px;
align-items:center;
}

.pdo-icon{
display:flex;
align-items:center;
justify-content:center;
width:36px;
height:36px;
border-radius:8px;
background:#f3f4f6;
color:#374151;
text-decoration:none;
transition:.15s;
}

.pdo-icon:hover{
background:var(--pdo-primary);
color:#fff;
transform:translateY(-1px);
}

.pdo-icon .dashicons{
font-size:20px;
width:20px;
height:20px;
}

.pdo-icon img{
width:20px;
height:20px;
}

.pdo-actions{
display:flex;
gap:8px;
align-items:center;
}

.pdo-icon{
display:flex;
align-items:center;
justify-content:center;
width:34px;
height:34px;
border-radius:8px;
background:#f3f4f6;
text-decoration:none;
transition:.15s;
}

.pdo-icon:hover{
background:var(--pdo-primary);
}

.pdo-icon svg,
.pdo-icon img{
width:18px;
height:18px;
display:block;
}

.pdo-icon-print{ color:#6b7280; }

.pdo-icon-pdf{ color:#dc2626; }

.pdo-icon-whatsapp{ color:#16a34a; }

.pdo-icon-delete{ color:#ef4444; }

.pdo-field-feedback {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
}

.pdo-field-feedback-error {
    color: #b91c1c;
}

.pdo-field-feedback-success {
    color: #047857;
}

@media (max-width: 1024px) {
    .pdo-grid.cols-2,
    .pdo-grid.cols-3,
    .pdo-grid.cols-4,
    .pdo-grid-2,
    .pdo-grid-3 {
        grid-template-columns: 1fr !important;
    }

    .pdo-field input,
    .pdo-field select,
    .pdo-field textarea,
    .pdo-btn-primary,
    .pdo-btn-secondary,
    .pdo-header-btn {
        min-height: 44px;
        font-size: 16px;
    }

    .pdo-field input,
    .pdo-field select,
    .pdo-field textarea {
        width: 100%;
        box-sizing: border-box;
    }

    .pdo-field input[type="date"] {
        width: min(320px, 100%);
        align-self: flex-start;
    }

    .pdo-field textarea {
        min-height: 120px;
    }

    .pdo-mobile-progress {
        position: sticky;
        top: 0;
        z-index: 50;
        background: #fff;
        padding: 10px 0 12px;
        margin-bottom: 16px;
    }

    .pdo-mobile-progress-label {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 6px;
        color: #374151;
    }

    .pdo-mobile-progress-track {
        width: 100%;
        height: 6px;
        border-radius: 999px;
        background: #e5e7eb;
        overflow: hidden;
    }

    .pdo-mobile-progress-track span {
        display: block;
        height: 100%;
        width: 0;
        background: var(--pdo-primary);
        transition: width .2s ease;
    }

    .pdo-mobile-step-hidden {
        display: none;
    }

    .pdo-mobile-sticky-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        background: #fff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -6px 22px rgba(0, 0, 0, .08);
    }

    .pdo-mobile-sticky-actions .pdo-btn-primary,
    .pdo-mobile-sticky-actions .pdo-btn-secondary {
        width: 100%;
        padding: 10px 8px;
        border-width: 1px;
    }

    body.pdo-mobile-has-sticky {
        padding-bottom: 88px;
    }
}
