*{box-sizing:border-box;}

body{
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
    background:#f4f5f7;
    color:#1e293b;
    margin:0;
    padding:0;
}

.topo{
    background:#111827;
    color:#fff;
    padding:18px 32px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.topo h1{
    font-size:18px;
    margin:0;
    font-weight:700;
}

.topo a{
    color:#cbd5e1;
    text-decoration:none;
    font-size:14px;
}

.topo a:hover{
    color:#fff;
}

.container{
    max-width:1100px;
    margin:0 auto;
    padding:32px 24px;
}

.card{
    background:#fff;
    border-radius:16px;
    padding:32px;
    box-shadow:0 2px 8px rgba(0,0,0,.06);
    margin-bottom:24px;
}

h2{
    margin-top:0;
    font-size:20px;
}

.btn{
    display:inline-block;
    background:#ff6b00;
    color:#fff;
    border:none;
    border-radius:10px;
    padding:12px 24px;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    text-decoration:none;
}

.btn:hover{
    background:#e85f00;
}

.btn-secundario{
    background:#f1f5f9;
    color:#1e293b;
}

.btn-secundario:hover{
    background:#e2e8f0;
}

.form-control{
    width:100%;
    padding:11px 14px;
    border:1px solid #d1d5db;
    border-radius:8px;
    font-size:15px;
    margin-bottom:14px;
}

.codigo-box{
    background:#fff7ed;
    border:1px solid #fed7aa;
    border-radius:10px;
    padding:18px;
    font-size:22px;
    font-weight:800;
    letter-spacing:2px;
    text-align:center;
    color:#c2410c;
    margin:16px 0;
}

.link-box{
    word-break:break-all;
    background:#f1f5f9;
    padding:12px;
    border-radius:8px;
    font-size:13px;
    margin-bottom:16px;
}

.alert{
    padding:14px 18px;
    border-radius:8px;
    margin-bottom:20px;
    font-size:14px;
}

.alert-erro{
    background:#fee2e2;
    color:#991b1b;
}

.alert-sucesso{
    background:#dcfce7;
    color:#166534;
}

.status-conectado{
    display:inline-flex;
    align-items:center;
    gap:6px;
    background:#dcfce7;
    color:#166534;
    padding:6px 14px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
}

.filtros{
    display:flex;
    gap:12px;
    align-items:flex-end;
    flex-wrap:wrap;
    margin-bottom:20px;
}

.filtros label{
    font-size:12px;
    font-weight:700;
    color:#64748b;
    text-transform:uppercase;
    display:block;
    margin-bottom:6px;
}

.filtros .form-control{
    margin-bottom:0;
    width:auto;
}

#buscaTabela{
    width:100%;
    max-width:320px;
}

.table-wrap{
    overflow-x:auto;
    border:1px solid #e5e7eb;
    border-radius:12px;
}

table{
    width:100%;
    border-collapse:collapse;
    font-size:13px;
}

thead th{
    background:#111827;
    color:#fff;
    text-align:left;
    padding:10px 12px;
    cursor:pointer;
    white-space:nowrap;
    user-select:none;
}

thead th:hover{
    background:#1f2937;
}

thead th.sort-asc::after{ content:" ▲"; }
thead th.sort-desc::after{ content:" ▼"; }

tbody td{
    padding:10px 12px;
    border-bottom:1px solid #f1f1f1;
    white-space:nowrap;
}

tbody tr:hover{
    background:#fff7ed;
}

.badge{
    padding:3px 10px;
    border-radius:999px;
    font-size:11px;
    font-weight:700;
}

.badge-concluido, .badge-finished{ background:#dcfce7; color:#166534; }
.badge-cancelado, .badge-cancelled{ background:#fee2e2; color:#991b1b; }
.badge-outro{ background:#e2e8f0; color:#475569; }

.btn-json{
    background:none;
    border:1px solid #d1d5db;
    border-radius:6px;
    padding:4px 10px;
    font-size:12px;
    cursor:pointer;
}

.json-detalhe{
    display:none;
    background:#0f172a;
    color:#e2e8f0;
    padding:16px;
    border-radius:8px;
    font-size:12px;
    overflow-x:auto;
    margin:8px 0 16px;
    white-space:pre-wrap;
    word-break:break-word;
}

.json-detalhe.aberto{
    display:block;
}

.vazio{
    color:#64748b;
    padding:30px;
    text-align:center;
}
