:root {
  --sidebar-bg: #14181f;
  --sidebar-hover: #1d232d;
  --sidebar-text: #9aa4b2;
  --sidebar-active: #2f81f7;
  --bg: #f2f4f7;
  --surface: #ffffff;
  --border: #e4e7ec;
  --text: #1d2433;
  --muted: #667085;
  --primary: #2f81f7;
  --primary-dark: #1f6fe0;
  --success: #12805c;
  --success-bg: #e6f4ef;
  --danger: #d13438;
  --danger-bg: #fdecec;
  --warning-bg: #fff4e0;
  --warning: #b25e09;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px; flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  padding: 20px 20px 16px;
  color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .3px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar .brand span { color: var(--sidebar-active); }
.sidebar .section-label {
  padding: 18px 20px 6px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .8px;
  color: #566072;
}
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  color: var(--sidebar-text); font-weight: 500;
  border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.sidebar nav a.active {
  background: var(--sidebar-hover); color: #fff;
  border-left-color: var(--sidebar-active);
}
.sidebar nav a svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar .sidebar-footer {
  margin-top: auto; padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: 12px; color: #566072;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 28px; height: 56px;
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
}
.topbar .user { color: var(--muted); font-size: 13px; }
.topbar a.logout { font-size: 13px; }

.content { padding: 28px; max-width: 1320px; width: 100%; }

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; gap: 16px; flex-wrap: wrap;
}
.page-head h1 { margin: 0; font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.page-head .sub { color: var(--muted); margin-top: 2px; font-size: 13px; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px;
}
.stat { display: flex; align-items: center; gap: 14px; }
.stat .icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.icon.blue { background: #e8f1fe; color: var(--primary); }
.icon.green { background: var(--success-bg); color: var(--success); }
.icon.red { background: var(--danger-bg); color: var(--danger); }
.icon.amber { background: var(--warning-bg); color: var(--warning); }
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value { font-size: 19px; font-weight: 700; margin-top: 1px; }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.panel .panel-head {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-weight: 600;
}
.panel .panel-body { padding: 20px; }

/* ---------- Tabelas ---------- */
table.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); font-weight: 600;
  padding: 12px 20px; border-bottom: 1px solid var(--border); background: #fafbfc;
}
.table td { padding: 13px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafbfd; }
.table td.actions { text-align: right; white-space: nowrap; }
.actions-inner { display: inline-flex; gap: 6px; align-items: center; vertical-align: middle; }
.actions-inner form { display: contents; }
.table-footer { padding: 14px 20px; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600;
}
.badge.green { background: var(--success-bg); color: var(--success); }
.badge.red { background: var(--danger-bg); color: var(--danger); }
.badge.gray { background: #eef0f3; color: var(--muted); }
.badge.blue { background: #e8f1fe; color: var(--primary-dark); }
.badge.amber { background: var(--warning-bg); color: var(--warning); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  background: var(--primary); color: #fff;
  transition: background .15s;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.secondary:hover { background: #f5f7fa; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #b02428; }
.btn.ghost-danger { background: transparent; color: var(--danger); border-color: var(--border); }
.btn.ghost-danger:hover { background: var(--danger-bg); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .6; cursor: wait; }

/* ---------- Formulários ---------- */
label.field-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=url], select, textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font: inherit; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(47, 129, 247, .35); border-color: var(--primary);
}
textarea { resize: vertical; min-height: 110px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-row { margin-bottom: 18px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.checkbox-line { display: flex; align-items: center; gap: 8px; font-weight: 500; }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: #cfd6df; border-radius: 99px;
  transition: .15s; cursor: pointer;
}
.switch .slider:before {
  content: ""; position: absolute; width: 16px; height: 16px;
  left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s;
}
.switch input:checked + .slider { background: var(--success); }
.switch input:checked + .slider:before { transform: translateX(16px); }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 13.5px; }
.alert.success { background: var(--success-bg); color: var(--success); }
.alert.error { background: var(--danger-bg); color: var(--danger); }
.alert.info { background: #e8f1fe; color: var(--primary-dark); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 180px; overflow: auto; padding: 4px 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 99px;
  padding: 5px 12px; cursor: pointer; user-select: none; font-size: 13px;
  background: #fff;
}
.chip input { accent-color: var(--primary); }
.chip:has(input:checked) { background: #e8f1fe; border-color: var(--primary); color: var(--primary-dark); }

/* ---------- Login ---------- */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #14181f 0%, #1d2634 60%, #23314a 100%);
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--surface); border-radius: 14px;
  padding: 34px 32px; box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.auth-card .logo { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.auth-card .logo span { color: var(--primary); }
.auth-card .subtitle { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.auth-card .form-row { margin-bottom: 16px; }
.auth-card .btn { width: 100%; justify-content: center; padding: 11px; }
.auth-links { margin-top: 16px; text-align: center; font-size: 13px; }

/* ---------- Docs da API ---------- */
.endpoint { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; background: var(--surface); overflow: hidden; }
.endpoint-head { display: flex; align-items: center; gap: 12px; padding: 13px 18px; cursor: pointer; }
.endpoint-head:hover { background: #fafbfd; }
.method {
  font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 6px;
  font-family: ui-monospace, monospace; letter-spacing: .3px;
}
.method.get { background: #e8f1fe; color: var(--primary-dark); }
.method.post { background: var(--success-bg); color: var(--success); }
.endpoint-path { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.endpoint-title { margin-left: auto; color: var(--muted); font-size: 13px; }
.endpoint-body { padding: 0 18px 18px; border-top: 1px solid var(--border); }
.endpoint-body p { color: var(--muted); }
pre.code {
  background: #14181f; color: #d7e0ea; padding: 14px 16px;
  border-radius: 8px; overflow: auto; font-size: 12.5px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.fields-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; }
.fields-table th, .fields-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.fields-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.fields-table code { background: #f1f3f6; padding: 1px 6px; border-radius: 5px; font-size: 12px; }

/* ---------- Gráfico ---------- */
.chart-wrap { padding: 20px; }
.chart-bars { display: flex; align-items: flex-end; gap: 3px; height: 190px; }
.chart-bars .bar { flex: 1; background: var(--primary); border-radius: 3px 3px 0 0; min-width: 4px; position: relative; opacity: .85; }
.chart-bars .bar:hover { opacity: 1; }
.chart-legend { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 8px; }
.empty {
  padding: 40px 20px; text-align: center; color: var(--muted);
}

/* ---------- Modal ---------- */
dialog.modal { border: none; border-radius: 14px; padding: 0; width: 460px; max-width: calc(100vw - 32px); box-shadow: 0 24px 60px rgba(0,0,0,.3); }
dialog.modal.modal-lg { width: 720px; }
dialog.modal::backdrop { background: rgba(13, 18, 26, .55); }
dialog.modal .modal-head { padding: 18px 22px 0; font-weight: 700; font-size: 16px; }
dialog.modal .modal-body { padding: 16px 22px 22px; }

@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar .brand, .sidebar .section-label, .sidebar nav a span, .sidebar .sidebar-footer { display: none; }
  .sidebar nav a { justify-content: center; padding: 14px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .content { padding: 18px; }
}


/* Confirmação amigável */
.confirm-modal { max-width: 420px; text-align: left; }
.confirm-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; margin: 20px 24px 0;
  background: #eef2ff; color: var(--primary);
}
.confirm-icon.danger { background: #fee2e2; color: var(--danger); }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.danger:hover { filter: brightness(0.92); }

/* Teste de agente */
.test-result {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; white-space: pre-wrap; line-height: 1.55;
  max-height: 320px; overflow-y: auto;
}
.test-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; color: var(--text-2); font-size: 13px; }

.alert.warning { background: #fff7e6; border: 1px solid #f2d49b; color: #8a5a00; }
.switch.disabled { opacity: 0.45; cursor: not-allowed; }
.switch.disabled .slider { cursor: not-allowed; }

/* Tabela de clientes no formulário do agente */
.clients-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.clients-toolbar input[type="search"] { flex: 1; min-width: 220px; max-width: 380px; }
.clients-bulk { display: flex; gap: 6px; }
.clients-table-wrap { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.clients-table-wrap .table { margin: 0; }
.clients-table-wrap thead th { position: sticky; top: 0; background: var(--panel, #fff); z-index: 1; }

.doc-upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.test-files { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.test-files > div { min-width: 0; }
.test-files input[type="file"] { max-width: 100%; }
@media (max-width: 640px) { .test-files { grid-template-columns: 1fr; } }

.unit-hint { color: var(--text-2); font-size: 12px; white-space: nowrap; margin-left: 6px; }
.badge.neutral { background: #eef1f5; color: var(--text-2); white-space: nowrap; cursor: help; }

/* Página de motores: campos sem quebra e larguras equilibradas */
.table td.nowrap { white-space: nowrap; }
.price-form { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.price-form input[type="number"] { width: 110px; flex: none; }
.price-form .btn { flex: none; }

.info-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: #eef1f5; color: var(--text-2); cursor: help;
}
.info-icon:hover { background: #e2e7ee; color: var(--text-1, #1f2937); }

/* Colapse informativo */
.collapse-info { margin-top: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.collapse-info summary {
  padding: 10px 14px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2);
  list-style: none; display: flex; align-items: center; gap: 8px; user-select: none;
}
.collapse-info summary::before { content: "▸"; transition: transform .15s; font-size: 11px; }
.collapse-info[open] summary::before { transform: rotate(90deg); }
.collapse-info summary::-webkit-details-marker { display: none; }
.collapse-body { padding: 0 14px 14px; font-size: 13px; color: var(--text-2); }
.collapse-body p { margin: 8px 0; line-height: 1.55; }
.collapse-body .code { margin: 8px 0; font-size: 12px; }

/* Ícone de ajuda no título */
.help-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0; flex: none;
  border: none; border-radius: 50%; background: transparent;
  color: var(--muted); cursor: pointer; transition: background .15s, color .15s;
}
.help-icon svg { display: block; }
.help-icon:hover { background: #eef1f5; color: var(--primary); }

/* Conteúdo de ajuda (modais e página) */
.help-content h2 { font-size: 18px; margin: 0 0 12px; }
.help-content h4 { font-size: 14px; margin: 16px 0 6px; color: var(--text-1, #1f2937); }
.help-content p { margin: 8px 0; line-height: 1.6; color: var(--text-2); }
.help-content ul, .help-content ol { margin: 8px 0 8px 18px; padding: 0; color: var(--text-2); line-height: 1.6; }
.help-content li { margin: 5px 0; }
.help-content .code { margin: 10px 0; font-size: 12px; }
.help-content .table { margin: 10px 0; }
.help-content .table td, .help-content .table th { font-size: 13px; }
.help-modal .modal-body { max-height: 70vh; overflow-y: auto; }

/* Página de ajuda geral */
.help-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.help-nav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.help-nav a { padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--text-2); text-decoration: none; }
.help-nav a:hover { background: var(--bg); color: var(--primary); }
.help-doc { display: flex; flex-direction: column; gap: 16px; }
.help-doc section { scroll-margin-top: 20px; }
@media (max-width: 900px) { .help-layout { grid-template-columns: 1fr; } .help-nav { position: static; } }

/* ---------- Orquestração ---------- */
.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-option {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #fff;
  transition: border-color .15s, background .15s;
}
.type-option:hover { border-color: var(--primary); }
.type-option input { margin-top: 3px; }
.type-option span { display: flex; flex-direction: column; gap: 2px; }
.type-option small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.type-option:has(input:checked) { border-color: var(--primary); background: #f5f8ff; }
@media (max-width: 640px) { .type-switch { grid-template-columns: 1fr; } }

.step-row {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px;
  background: #fff;
}
.step-index {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-fields { flex: 1; min-width: 0; }
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.step-grid select { width: 100%; }
.step-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.step-actions .btn { padding: 4px 9px; line-height: 1.2; }
.step-actions .btn:disabled { opacity: .4; cursor: not-allowed; }

.badge.purple { background: #ede9fe; color: #6d28d9; }
.step-result { border-left: 3px solid var(--border); padding-left: 12px; margin: 10px 0; }
.step-result-head { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.step-result-meta { color: var(--muted); font-size: 12px; font-weight: 400; }

/* Credenciais exibidas uma única vez */
.credentials { border-color: var(--primary); }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; flex: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }


/* Changelog público */
.public-page { background: var(--bg); }
.public-wrap { max-width: 780px; margin: 0 auto; padding: 40px 20px 64px; }
.public-head h1 { font-size: 26px; margin: 0 0 6px; }
.public-head .sub { color: var(--text-2); margin: 0 0 28px; }
.timeline { display: flex; flex-direction: column; gap: 4px; }
.entry { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.entry-date { flex: none; width: 92px; color: var(--muted); font-size: 13px; padding-top: 2px; }
.entry-body { flex: 1; min-width: 0; }
.entry-head { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.entry-body h2 { font-size: 16px; margin: 0 0 4px; }
.entry-body p { margin: 0; color: var(--text-2); line-height: 1.6; }
.public-foot { margin-top: 32px; color: var(--muted); font-size: 13px; }
.inline-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }

/* Tabela de motores: colunas estreitas e sem transbordo */
.engines-table td, .engines-table th { vertical-align: middle; }
.engines-table .price-form input[type="number"] { width: 96px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.modal .price-form { gap: 8px; }
.modal .price-form input[type="number"] { width: 100%; max-width: 220px; }

/* Seções dentro de formulários longos (integradores, cliente) */
.form-section { margin: 22px 0 10px; font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.limit-hint { font-size: 12px; color: var(--text-2); margin-top: 4px; }
/* Pré-visualização do embed: formulário compacto + janela grande */
.preview-form { max-width: 920px; }
.pv-inline { display: flex; gap: 10px; align-items: center; }
.pv-inline select { flex: 1; }
.pv-inline input[type=color] { width: 46px; height: 40px; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }
.pv-scopes { display: flex; flex-wrap: wrap; gap: 6px 18px; }
dialog.preview-dialog {
  width: min(1320px, 96vw); height: 92vh; max-width: none; max-height: none;
  padding: 0; border: 0; border-radius: 14px; overflow: hidden;
  background: #fff; box-shadow: 0 30px 80px rgba(15, 20, 30, .35);
}
dialog.preview-dialog[open] { display: flex; flex-direction: column; }
dialog.preview-dialog::backdrop { background: rgba(15, 20, 30, .55); }
.pv-bar { display: flex; align-items: center; gap: 16px; padding: 10px 14px 10px 18px; border-bottom: 1px solid var(--border); }
.pv-bar strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32%; }
.pv-devices { display: inline-flex; padding: 3px; border-radius: 9px; background: #eef0f3; }
.pv-device-btn { padding: 5px 12px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.pv-device-btn.is-active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 20, 30, .12); }
.pv-status { flex: 1; text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-stage { flex: 1; min-height: 0; display: flex; justify-content: center; padding: 18px; background: #e9ecf1; }
.pv-device { width: 100%; height: 100%; overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 2px 10px rgba(15, 20, 30, .12); transition: width .2s ease; }
.pv-device[data-device="tablet"] { width: min(768px, 100%); }
.pv-device[data-device="mobile"] { width: min(390px, 100%); border-radius: 22px; }
.pv-device iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (prefers-reduced-motion: reduce) { .pv-device { transition: none; } }


.panel.table-scroll { overflow-x: auto; }
/* Documentação: blocos de código longos rolam dentro do bloco, não a página */
.help-doc { min-width: 0; }
.help-content pre.code { overflow-x: auto; white-space: pre; }

[hidden] { display: none !important; }
