:root {
  color: #172f36;
  background: #f4f7f7;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  --ink: #172f36;
  --muted: #536a70;
  --line: #dbe5e5;
  --panel: #fff;
  --brand: #087f72;
  --brand-dark: #06675d;
  --focus: #0e927e;
  --shadow: 0 2px 4px #16353b08;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.18rem; letter-spacing: -.015em; }
h3 { font-size: 1rem; }
p { color: var(--muted); line-height: 1.55; }
svg { flex: 0 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 10; transform: translateY(-150%); padding: 9px 14px; border-radius: 7px; color: #fff; background: var(--brand-dark); }
.skip:focus { transform: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: #123139; color: #eaf7f6; padding: 27px 18px 20px; }
.brand { display: flex; align-items: center; gap: 11px; width: fit-content; padding: 0 8px; margin-bottom: 52px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 10px; background: #51d6b9; color: #123139; }
.brand strong { display: block; letter-spacing: .17em; font-size: 1.17rem; line-height: 1.05; }
.brand small { display: block; font-size: .71rem; margin-top: 5px; color: #a7c4c5; }
.sidebar-label { margin: 0 10px 12px; color: #a4c5c6; font-weight: 700; font-size: .69rem; text-transform: uppercase; letter-spacing: .13em; }
.navigation { display: grid; gap: 5px; }
.navigation a { text-decoration: none; color: #c4dbdc; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 11px; border-radius: 8px; font-size: .88rem; font-weight: 600; }
.navigation a:hover { color: #fff; background: #20434a; }
.navigation a[aria-current="page"] { color: #edfffa; background: #1b5452; box-shadow: inset 3px 0 #51d6b9; }
.navigation svg, .sidebar-foot svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 18px 4px 0; border-top: 1px solid #305258; font-size: .78rem; line-height: 1.4; }
.sidebar-foot-icon { background: #244850; color: #8be4d0; border-radius: 8px; display: grid; place-items: center; width: 35px; height: 35px; }
.sidebar-foot small { display: block; color: #a7c4c5; font-size: .7rem; }
.workspace { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 62px; gap: 12px; background: #fff; border-bottom: 1px solid var(--line); padding: 0 clamp(18px, 3.3vw, 48px); }
.breadcrumbs { display: flex; align-items: center; gap: 11px; font-size: .83rem; color: var(--muted); }
.breadcrumbs strong { color: var(--ink); font-weight: 650; }
.connection { display: inline-flex; align-items: center; gap: 7px; background: #f1f6f5; border-radius: 99px; padding: 5px 9px; color: #365a60; font-size: .72rem; font-weight: 650; white-space: nowrap; }
.connection > span { width: 7px; height: 7px; border-radius: 50%; background: #829c9d; }
.connection[data-state="ok"] > span { background: #15846c; }
.connection[data-state="error"] > span { background: #b84f45; }
main { padding: 34px clamp(18px, 3.3vw, 48px) 44px; margin: 0 auto; max-width: 1600px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.eyebrow { color: #13786d; font-weight: 750; letter-spacing: .12em; font-size: .68rem; line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 3.1vw, 2.65rem); margin: 4px 0 5px; letter-spacing: -.045em; line-height: 1.15; }
.page-heading p { font-size: .95rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 12px; border: 1px solid transparent; border-radius: 8px; font-weight: 650; font-size: .83rem; line-height: 1.3; white-space: nowrap; }
.button svg, .search-field svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.button.secondary { background: #fff; border-color: #cadada; color: #25484c; box-shadow: var(--shadow); }
.button.secondary:hover:not(:disabled) { background: #f3faf9; border-color: #9fbbb8; }
.button.primary { color: #fff; background: var(--brand); }
.button.primary:hover:not(:disabled) { background: var(--brand-dark); }
.button.danger { color: #9f352b; background: #fff; border-color: #e6bcb7; }
.button.danger:hover:not(:disabled) { background: #fff3f1; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 21px; }
.metric { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 11px; padding: 14px; min-width: 0; }
.metric-top { display: flex; align-items: center; gap: 8px; color: #405c61; font-size: .8rem; font-weight: 650; min-height: 27px; }
.metric-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #ebf5f5; color: #12776b; font-size: 1rem; font-weight: 700; }
.metric[data-tone="review"] .metric-icon { background: #fff4d9; color: #82600c; }
.metric[data-tone="working"] .metric-icon { background: #eaf1ff; color: #305898; }
.metric-value { display: block; margin-top: 8px; font-size: 1.86rem; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1.1; }
.metric-subtitle { display: block; margin-top: 5px; color: var(--muted); font-size: .74rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 19px 19px 14px; }
.panel-heading p, .flow-menu p { margin-top: 3px; font-size: .82rem; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 19px 16px; }
input:not([type="checkbox"]), select, textarea { width: 100%; padding: 8px 10px; min-height: 38px; border: 1px solid #cbd9d9; border-radius: 7px; background: #fff; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #647980; opacity: 1; }
textarea { line-height: 1.45; resize: vertical; }
.search-field { flex: 1 1 230px; position: relative; min-width: 160px; }
.search-field svg { position: absolute; top: 11px; left: 11px; color: #607c81; }
.search-field input { padding-left: 35px; }
.toolbar select, .search-field input { font-size: .82rem; }
.table-scroll { overflow-x: auto; }
#records-table { position: relative; }
.invoice-table-wrap { position: relative; max-width: 100%; }
.invoice-table { min-width: 1100px; }
.invoice-table th, .invoice-table td { text-align: left; }
.invoice-table .invoice-invoice_number { font-weight: 700; white-space: nowrap; }
.invoice-table .invoice-invoice_value, .invoice-table .invoice-collection_date, .invoice-table .invoice-delivery_date { white-space: nowrap; }
.invoice-table .invoice-volumes, .invoice-table .invoice-equipment { text-align: right; }
.invoice-table .invoice-origin, .invoice-table .invoice-destination, .invoice-table .invoice-receiver_name { min-width: 130px; max-width: 240px; overflow-wrap: anywhere; }
.operation-detail > .invoice-table-wrap { margin: 12px 0 20px; }
.historical-invoice-label { display: block; color: #876329; font-size: .65rem; font-weight: 500; white-space: normal; margin-block: 5px; }
.invoice-mobile-label { display: none; }
.invoice-table td[data-empty="true"] { color: var(--muted); font-size: .77rem; }
.invoice-documental { display: block; width: fit-content; margin: 5px 0 0 auto; padding: 3px 6px; color: #765615; background: #fff3d7; border: 1px solid #e8d5a1; border-radius: 5px; font-size: .66rem; font-weight: 650; white-space: nowrap; }
.invoice-not-performed { display: block; color: #8c4b2c; font-size: .72rem; font-weight: 650; margin-top: 5px; }
.history-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.history-count { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 15px; }
.history-count span { display: block; color: var(--muted); font-size: .77rem; }
.history-count strong { display: block; font-size: 1.6rem; margin-top: 6px; }
.history-coverage-panel { margin-bottom: 20px; }
.history-coverage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 19px 19px; }
.history-coverage-card, .history-message { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.history-card-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; }
.history-card-heading h3, .history-card-heading > strong { font-size: .9rem; }
.history-coverage-card > p { margin: 10px 0; font-size: .76rem; }
.history-coverage-card .record-meta { grid-template-columns: 1fr; margin: 12px 0; }
.history-coverage-card .record-meta > div { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.history-coverage-card .record-meta dd { font-size: .76rem; }
.history-list { display: grid; gap: 12px; padding: 0 19px 19px; }
.history-list:empty { display: none; }
.history-message { overflow-wrap: anywhere; }
.history-message-time { font-size: .71rem; color: var(--muted); margin-top: 8px; }
.history-quote { border-left: 3px solid #9fcbbf; background: #f3f8f7; border-radius: 5px; margin: 12px 0; padding: 12px; font-size: .8rem; }
.history-references { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .8rem; margin-block: 10px; }
.history-issues, .history-occurrence, .history-review-notice { border: 1px solid #ead8b1; border-radius: 7px; background: #fff9ed; padding: 12px; font-size: .8rem; line-height: 1.6; margin-block: 12px; }
.history-issues ul { margin: 6px 0 0; padding-left: 20px; }
.history-issues li + li { margin-top: 4px; }
.history-occurrence p { margin-block: 5px; }
.history-source-id, .history-observation { font-size: .79rem; margin-block: 14px; }
.history-source-id summary, .history-observation summary { cursor: pointer; color: #396a60; }
.history-source-id .record-meta { margin-top: 10px; }
.history-observation .invoice-table-wrap { margin-block: 12px; }
.history-sources-heading { font-size: .95rem; margin-block: 22px 12px; }
#history-source-content > .history-message + .history-message { margin-top: 12px; }
@media (max-width: 760px) { .history-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }.history-coverage { grid-template-columns: 1fr; } }
@media (max-width: 630px) { #historico .page-heading { flex-wrap: wrap; }.history-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }.history-coverage, .history-list { padding: 0 11px 11px; }.history-coverage-card, .history-message { padding: 12px; } }
table { width: 100%; min-width: 620px; border-collapse: collapse; table-layout: auto; text-align: left; }
thead { background: #f5f8f8; color: #455f65; }
th { padding: 10px 11px; font-size: .72rem; font-weight: 750; }
td { padding: 10px 11px; font-size: .83rem; border-top: 1px solid #e7eeee; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { text-align: right; padding-right: 19px; }
tr:hover td { background: #f8fbfa; }
.table-title { display: block; font-weight: 700; }
.table-secondary { display: block; color: var(--muted); font-size: .73rem; margin-top: 2px; overflow-wrap: anywhere; }
.table-origin { max-width: 240px; overflow-wrap: anywhere; }
.evidence-stage-detail { max-width: 225px; line-height: 1.4; }
.evidence-poll-note { margin-top: 8px; }
.evidence-progress { padding: 12px; margin-bottom: 16px; background: #f2f7f6; border: 1px solid var(--line); border-radius: 8px; }
.evidence-progress p { margin: 7px 0 10px; font-size: .84rem; }
.date { white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 5px 8px; font-size: .72rem; font-weight: 650; line-height: 1.2; color: #425f64; background: #eef4f4; white-space: nowrap; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-badge[data-status="approved"], .status-badge[data-status="active"] { color: #086b56; background: #e4f6ef; }
.status-badge[data-status="review"] { color: #805b0e; background: #fff3d9; }
.status-badge[data-status="processing"] { color: #2e5594; background: #ebf1fc; }
.status-badge[data-status="error"], .status-badge[data-status="rejected"] { color: #963e32; background: #fbeeea; }
.record-link { background: transparent; border: 0; padding: 7px 0 7px 6px; color: #086e62; font-weight: 700; font-size: .82rem; border-radius: 3px; }
.record-link:hover { text-decoration: underline; }
.placeholder { min-height: 176px; display: grid; place-content: center; gap: 6px; text-align: center; padding: 20px; }
.placeholder p { font-size: .84rem; max-width: 520px; }
.placeholder .button { justify-self: center; margin-top: 5px; }
.empty-icon { display: grid; place-items: center; justify-self: center; background: #eef7f5; color: #1d7b6d; border-radius: 11px; width: 40px; height: 40px; font-size: 1.25rem; margin-bottom: 3px; }
.panel-foot { border-top: 1px solid #e7eeee; padding: 11px 19px; min-height: 39px; color: var(--muted); font-size: .77rem; }
.panel-foot:empty { display: none; }
.records .panel-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.records .panel-foot:empty { display: none; }
.page-controls { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.page-controls .button { min-height: 30px; padding: 4px 8px; }
.subtle { color: var(--muted); font-size: .81rem; }
.flow-layout { display: grid; grid-template-columns: minmax(178px, 222px) minmax(0, 1fr); gap: 14px; align-items: start; }
.flow-menu { padding: 16px 12px; }
.flow-menu h2, .flow-menu p { padding: 0 4px; }
#flow-list { display: grid; gap: 7px; margin-top: 14px; }
.flow-choice { text-align: left; border: 1px solid transparent; background: #f4f8f8; border-radius: 8px; padding: 9px 10px; color: var(--ink); }
.flow-choice:hover { background: #ebf6f4; }
.flow-choice[aria-pressed="true"] { background: #e6f7f2; border-color: #97ccbf; }
.flow-choice strong { display: block; font-size: .87rem; overflow-wrap: anywhere; }
.flow-choice span { display: block; margin-top: 4px; color: #39736e; font-size: .74rem; overflow-wrap: anywhere; }
.flow-heading { border-bottom: 1px solid #e7eeee; }
.flow-caption { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 7px; }
.tag { display: inline-flex; color: #086d60; background: #e8f8f3; border-radius: 5px; padding: 4px 7px; font-size: .76rem; font-weight: 720; }
.toggle { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 680; white-space: nowrap; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); vertical-align: middle; }
.editor-body { display: grid; gap: 18px; padding: 16px 19px 18px; }
.control { display: grid; align-content: start; gap: 5px; color: #365057; font-size: .8rem; font-weight: 650; min-width: 0; }
.control input, .control select, .control textarea { font-weight: 400; color: var(--ink); }
.control small { color: var(--muted); font-weight: 400; }
.steps-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 1px; }
.steps-heading p { margin-top: 3px; font-size: .8rem; }
.steps { list-style: none; padding: 0; margin: -6px 0 0; display: grid; gap: 10px; }
.step { border: 1px solid #dbe8e7; background: #f9fbfb; border-radius: 9px; padding: 11px; }
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 9px; }
.step-heading { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: .84rem; }
.step-number { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #dff4ef; color: #146e62; font-size: .73rem; }
.step-actions { display: flex; gap: 5px; }
.icon-button { display: grid; place-items: center; color: #456269; background: #fff; border: 1px solid #cbdcdb; border-radius: 6px; min-width: 31px; min-height: 31px; font-size: 1.12rem; font-weight: 650; line-height: 1; }
.icon-button:hover:not(:disabled) { color: var(--brand-dark); background: #edf8f5; }
.step-fields { display: grid; grid-template-columns: 1fr 1fr minmax(90px, .62fr); gap: 8px; margin-top: 8px; }
.actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.actions .subtle { margin-right: auto; }
.form-error { border-radius: 7px; background: #fff1ee; color: #8c3329; padding: 9px 10px; font-size: .8rem; line-height: 1.5; }
.status-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.status-strip > span:first-child { margin-right: 5px; }
.access-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.access-rows { padding: 0 19px 13px; display: grid; gap: 8px; }
.access-rows > p { font-size: .83rem; padding: 8px 0; }
.access-row { position: relative; border: 1px solid #e0e9e8; border-radius: 8px; padding: 9px; display: grid; gap: 8px; }
.access-row > button { position: absolute; top: 8px; right: 8px; }
.access-row .control:first-child { padding-right: 39px; }
.access-options { display: flex; gap: 8px; flex-wrap: wrap; }
.access-options label { display: flex; align-items: center; gap: 5px; font-size: .79rem; color: var(--muted); }
.access-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 14px 0; }
.access-actions .subtle { margin-right: auto; }
#access-error { margin-top: 9px; }
dialog { width: min(620px, calc(100% - 28px)); max-height: calc(100% - 28px); border: 1px solid #d8e4e3; border-radius: 12px; padding: 0; color: var(--ink); box-shadow: 0 14px 60px #12313942; }
dialog::backdrop { background: #1231398a; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 19px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { margin-top: 4px; }
.dialog-body { padding: 16px 19px 19px; }
.record-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.record-meta > div { padding: 8px 9px; background: #f3f8f7; border-radius: 7px; min-width: 0; overflow-wrap: anywhere; }
.record-meta dt { color: var(--muted); font-size: .74rem; font-weight: 650; margin-bottom: 4px; }
.record-meta dd { margin: 0; font-size: .87rem; }
.record-form { display: grid; gap: 9px; }
.record-original { display: grid; justify-items: start; gap: 7px; margin: 0 0 13px; }
.source-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-block: 4px; }
.document-viewer { width: min(1480px, calc(100% - 24px)); height: min(960px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); }
.document-viewer[open] { display: flex; flex-direction: column; overflow: hidden; }
.document-viewer > .dialog-heading { flex-shrink: 0; padding-block: 12px; }
.document-viewer-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; padding: 10px 16px; flex-shrink: 1; min-height: 0; max-height: 40dvh; overflow-y: auto; border-bottom: 1px solid var(--line); background: #f8fbfa; }
.document-viewer-file-label { flex: 1 1 280px; max-width: 550px; min-width: 0; color: var(--muted); font-size: .74rem; font-weight: 650; }
.document-viewer-file-label select { display: block; margin-top: 4px; text-overflow: ellipsis; font-size: .82rem; }
.document-viewer-pages, .document-viewer-zoom-controls { display: flex; align-items: center; gap: 6px; }
.document-viewer-pages output { min-width: 90px; text-align: center; font-size: .8rem; }
.document-viewer-zoom-controls output { min-width: 45px; text-align: center; font-size: .8rem; font-variant-numeric: tabular-nums; }
.document-viewer-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; width: 100%; }
.document-viewer-tools .button { min-height: 36px; padding: 6px 10px; }
#document-viewer-loupe[aria-pressed="true"] { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }
.document-viewer-note { flex-shrink: 0; max-height: 60px; overflow-y: auto; padding: 8px 16px; font-size: .77rem; color: #765f32; background: #fff9ed; overflow-wrap: anywhere; }
.document-viewer-note:empty { display: none; }
.document-viewer-stage { flex: 1 1 auto; position: relative; min-height: 80px; min-width: 0; background: #26383e; overflow: hidden; }
#document-viewer-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#document-viewer-canvas:focus-visible { outline: 3px solid #77e5c4; outline-offset: -4px; }
.document-viewer-status { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 22px; text-align: center; background: #26383e; }
.document-viewer-status p { color: #eff9f7; max-width: 600px; }
.document-viewer-status > div { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.document-viewer-footer { flex-shrink: 0; padding: 9px 16px; background: #fff; border-top: 1px solid var(--line); }
.document-viewer-footer p { font-size: .75rem; line-height: 1.5; }
.document-viewer-footer p + p { margin-top: 3px; }
@media (max-height: 560px) {
  .document-viewer > .dialog-heading { padding-block: 7px; }
  .document-viewer .dialog-heading .eyebrow { display: none; }
  .document-viewer .dialog-heading h2 { margin: 0; font-size: .95rem; }
  .document-viewer-toolbar { padding-block: 6px; gap: 6px 12px; }
  .document-viewer-note { max-height: 36px; padding-block: 5px; }
  .document-viewer-footer { padding-block: 5px; }
  .document-viewer-footer p { font-size: .67rem; }
}
@media (max-width: 630px) {
  .document-viewer { width: calc(100% - 12px); height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); }
  .document-viewer > .dialog-heading { padding: 10px; }
  .document-viewer .dialog-heading h2 { font-size: 1rem; }
  .document-viewer-toolbar { gap: 8px; padding: 8px 10px; align-items: center; }
  .document-viewer-file-label { flex-basis: 100%; max-width: none; }
  .document-viewer-tools { gap: 6px; }
  .document-viewer-tools .button { font-size: .74rem; padding-inline: 8px; }
  .document-viewer-footer { padding: 7px 10px; }
  .document-viewer-footer p { font-size: .67rem; }
}
.record-fields { display: grid; gap: 6px; margin: 0 0 13px; }
.record-fields summary { cursor: pointer; color: #30575e; font-weight: 650; font-size: .82rem; }
.record-fields dl { margin-bottom: 0; }
#record-dialog { width: min(1240px, calc(100% - 28px)); }
#record-detail > .record-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.evidence-heading-actions, .record-invoices-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.record-invoices { margin: 0 0 20px; min-width: 0; }
.record-invoices-heading { margin-bottom: 10px; }
.record-invoices-heading h3 { font-size: 1.1rem; }
.record-invoices-heading a, .evidence-heading-actions a { text-decoration: none; }
.invoice-scope { color: #806024; font-weight: 650; font-size: .8rem; }
.invoice-scope[data-scope="operation"] { color: #355e70; }
.record-invoice-note { margin: 5px 0 10px; font-size: .83rem; overflow-wrap: anywhere; }
.evidence-invoice-table { border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; }
.invoice-unknown { color: var(--muted); font-size: .77rem; font-weight: 400; }
.record-invoice-empty { padding: 15px; border: 1px dashed #bdceca; border-radius: 8px; background: #f7faf9; margin-top: 12px; }
.record-invoice-empty strong { font-size: .88rem; }
.record-invoice-empty p { margin-top: 5px; font-size: .83rem; }
.record-invoice-observation { padding: 12px; margin-top: 9px; border: 1px solid #e5dec9; border-radius: 8px; background: #fffdf7; overflow-wrap: anywhere; }
.record-invoice-observation h4 { margin: 0 0 6px; font-size: .85rem; }
.invoice-documentary-label { color: #745b2c; font-size: .8rem; }
.invoice-documentary-values { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 8px 0; }
.invoice-documentary-values dt { color: var(--muted); font-size: .74rem; }
.invoice-documentary-values dd { margin: 3px 0 0; font-size: .88rem; font-weight: 650; }
.invoice-issues { margin: 8px 0; padding-left: 19px; color: #665a3e; font-size: .79rem; line-height: 1.5; }
.invoice-issues li + li { margin-top: 4px; }
.invoice-issue-nfs { color: var(--muted); }
.record-invoice-support { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.record-invoice-support > summary { color: #30575e; font-size: .84rem; font-weight: 650; cursor: pointer; }
.record-invoice-support > p { margin-top: 10px; }
.record-invoice-support .record-invoice-observation { background: #fff; border-color: var(--line); }
.invoice-provenance { margin-top: 10px; }
.invoice-provenance summary { color: #30575e; font-size: .79rem; cursor: pointer; }
.invoice-provenance .record-meta { margin: 10px 0 0; }
@media (max-width: 800px) {
  #record-detail > .record-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-invoice-table { border: 0; }
  .evidence-invoice-table .invoice-table { display: block; min-width: 0; }
  .evidence-invoice-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .evidence-invoice-table tbody { display: grid; gap: 12px; }
  .evidence-invoice-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; }
  .evidence-invoice-table td { display: block; border: 0; min-width: 0 !important; max-width: none !important; text-align: left !important; white-space: normal !important; padding: 9px !important; overflow-wrap: anywhere; }
  .evidence-invoice-table .invoice-invoice_number { grid-column: 1 / -1; background: #eef6f3; border-radius: 5px; }
  .evidence-invoice-table .invoice-mobile-label { display: block; color: var(--muted); font-size: .67rem; font-weight: 650; margin-bottom: 5px; }
  .evidence-invoice-table .invoice-cell-value { display: block; }
  .evidence-invoice-table .invoice-documental { margin-left: 0; }
  #comprovantes .page-heading { flex-wrap: wrap; }
}
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.preview-messages { display: grid; align-content: start; gap: 7px; min-height: 145px; max-height: 320px; overflow-y: auto; background: #f1f7f5; border-radius: 9px; padding: 10px; margin: 10px 0; }
.bubble { width: fit-content; max-width: 92%; white-space: pre-wrap; overflow-wrap: anywhere; padding: 7px 9px; border: 1px solid #deebeb; border-radius: 9px 9px 9px 2px; background: #fff; color: var(--ink); font-size: .86rem; line-height: 1.4; }
.bubble.user { justify-self: end; background: #ddf4e9; border-color: #cbeadf; border-radius: 9px 9px 2px 9px; }
.bubble.typing { font-style: italic; color: var(--muted); }
.preview-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 7px; }
.preview-form .control { flex: 1; }
.preview-form textarea { min-width: 180px; resize: vertical; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 7px; flex-basis: 100%; }
.preview-actions .button { font-size: .78rem; }
.confirmation-fields { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.confirmation-fields legend { color: var(--ink); font-size: .76rem; padding-inline: 4px; }
.confirmation-fields .toggle { justify-content: flex-start; align-items: flex-start; overflow-wrap: anywhere; }
.confirmation-fields .toggle input { flex: 0 0 auto; margin-top: 2px; }
.batch-list { margin: 0; padding-left: 20px; display: grid; gap: 9px; }
.batch-list li { overflow-wrap: anywhere; white-space: pre-wrap; }
.batch-list small { display: block; color: var(--muted); }
.operation-detail { padding: 15px; border: 1px solid #c7e4da; border-radius: 9px; background: #f5fbf8; margin-block: 14px; }
.operation-detail h3 { font-size: .95rem; margin-bottom: 8px; }
.operation-detail .record-meta { margin-block: 12px; }
.operation-detail .record-original { display: grid; gap: 7px; }
.operation-attachment { display: grid; gap: 7px; border-top: 1px solid var(--line); padding-block: 10px; }
.operation-attachment .button { justify-self: start; }
.toast { position: fixed; right: 18px; bottom: 18px; max-width: min(380px, calc(100% - 36px)); padding: 10px 13px; border-radius: 8px; background: #123139; color: #fff; box-shadow: 0 4px 20px #12313942; font-size: .84rem; z-index: 5; }
@media (max-width: 990px) {
  .layout { grid-template-columns: 188px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-layout { grid-template-columns: 1fr; }
  .flow-layout { grid-template-columns: 1fr; }
  #flow-list { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}
@media (max-width: 630px) {
  .layout { display: block; }
  .sidebar { position: static; height: auto; padding: 12px; }
  .brand { margin: 0 0 9px; padding: 0 3px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand strong { font-size: .97rem; }
  .brand small { font-size: .66rem; }
  .sidebar-label, .sidebar-foot { display: none; }
  .navigation { display: flex; gap: 4px; }
  .navigation a { font-size: .72rem; min-height: 36px; gap: 4px; padding: 0 6px; flex: 1; white-space: normal; }
  .navigation svg { width: 15px; height: 15px; }
  .topbar { min-height: 46px; padding-inline: 13px; }
  main { padding: 20px 12px 26px; }
  .page-heading { align-items: flex-start; margin-bottom: 15px; }
  .page-heading p { font-size: .85rem; }
  .page-heading > .button { margin-top: 11px; }
  .metrics { gap: 7px; margin-bottom: 13px; }
  .metric { padding: 10px; }
  .metric-top { gap: 5px; font-size: .73rem; }
  .metric-subtitle { font-size: .7rem; }
  .toolbar, .panel-heading, .panel-foot, .editor-body, .access-rows { padding-left: 11px; padding-right: 11px; }
  .step-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-heading { align-items: flex-start; flex-direction: column; }
  .actions .subtle { width: 100%; }
  .dialog-heading, .dialog-body { padding-left: 12px; padding-right: 12px; }
}

/* Flow canvas and conversation metadata */
body:has(#fluxos:not([hidden])) main { max-width: none; padding: 24px 22px 30px; }
body:has(#fluxos:not([hidden])) .page-heading { margin-bottom: 18px; }
.builder-layout { display: grid; gap: 14px; }
.builder-layout .flow-menu { padding: 13px 16px; display: flex; align-items: center; gap: 16px; }
.builder-layout .flow-menu > h2 { font-size: .9rem; white-space: nowrap; }
.builder-layout .flow-menu > p { display: none; }
.builder-layout #flow-list { display: flex; flex: 1; gap: 7px; overflow-x: auto; padding: 2px; }
.builder-layout .flow-choice { min-width: 190px; width: auto; margin: 0; padding: 9px 12px; text-align: left; }
.builder-layout .flow-choice strong { font-size: .82rem; }
.builder-layout .flow-choice span { font-size: .7rem; }
.builder-layout .flow-heading { padding: 13px 17px; }
.builder-layout .flow-heading h2 { display: none; }
.builder-layout .flow-caption { margin: 0; }
.builder-top { display: grid; grid-template-columns: minmax(160px, 1.6fr) minmax(150px, 1fr); gap: 14px; padding: 12px 17px; }
.builder-top .control { font-size: .73rem; }
.builder-top input, .builder-top select { min-height: 34px; padding-block: 6px; font-size: .82rem; }
.builder-tools { display: flex; gap: 8px; align-items: center; justify-content: space-between; border-block: 1px solid var(--line); padding: 9px 12px; flex-wrap: wrap; background: #fafcfc; }
.block-palette, .canvas-controls { display: flex; align-items: center; gap: 5px; }
.block-palette { flex-wrap: wrap; }
.block-palette > span { color: var(--muted); font-size: .71rem; margin-right: 4px; }
.block-palette button, .canvas-controls button { border: 1px solid #cadada; background: #fff; color: #244b51; border-radius: 6px; padding: 6px 8px; min-height: 30px; font-size: .74rem; font-weight: 650; }
.block-palette button:hover:not(:disabled), .canvas-controls button:hover { border-color: #62a597; background: #eef9f6; }
.block-palette [data-add-node="condition"] { color: #8a600f; }
.block-palette [data-add-node="metadata"] { color: #7153a3; }
.canvas-controls output { min-width: 36px; text-align: center; font-size: .7rem; color: var(--muted); }
.graph-workspace { display: grid; grid-template-columns: minmax(280px, 1fr) 290px; min-height: 535px; }
.graph-area { min-width: 0; display: grid; grid-template-rows: 1fr auto; }
.graph-viewport { position: relative; height: 510px; min-height: 430px; overflow: auto; background-color: #f5f8f9; background-image: radial-gradient(#c6d7d8 1px, transparent 1px); background-size: 20px 20px; overscroll-behavior: contain; }
.graph-surface { position: relative; width: 1400px; height: 700px; }
.graph-edges { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.graph-edge { fill: none; stroke: #98b1b2; stroke-width: 2.5; }
.graph-edge.yes { stroke: #258771; }
.graph-edge.no { stroke: #bd8459; }
.edge-label { font-size: 11px; font-weight: 700; fill: #667e82; }
.edge-label.yes { fill: #267b69; }
.edge-label.no { fill: #a16b40; }
.graph-node { position: absolute; width: 220px; min-height: 135px; background: white; border: 1px solid #cbdcdd; border-top: 3px solid #389e8b; border-radius: 10px; box-shadow: 0 3px 8px #193d4310; user-select: none; }
.graph-node[data-type="condition"] { border-top-color: #cd9a37; }
.graph-node[data-type="metadata"] { border-top-color: #9571c5; }
.graph-node[data-type="message"] { border-top-color: #639bc9; }
.graph-node[data-type="batch"], .graph-node[data-type="confirmation"], .graph-node[data-type="record"] { border-top-color: #389e8b; }
.graph-node[data-type="lookup"] { border-top-color: #639bc9; }
.graph-node[data-type="extract"] { border-top-color: #7967b5; }
.graph-node[data-type="end"] { border-top-color: #6b858c; }
.graph-node.selected { outline: 2px solid #12917d; outline-offset: 3px; box-shadow: 0 3px 12px #12917d25; }
.node-select { display: grid; gap: 6px; width: 100%; text-align: left; border: 0; padding: 11px 12px 10px; background: transparent; color: var(--ink); border-radius: 7px; cursor: grab; touch-action: none; }
.node-select:active { cursor: grabbing; }
.node-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.node-title strong { font-size: .83rem; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.node-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 25px; height: 25px; background: #e8f7f2; color: #087a66; border-radius: 6px; font-size: 1rem; font-weight: 750; }
[data-type="condition"] .node-icon { background: #fff5de; color: #906817; }
[data-type="metadata"] .node-icon { background: #f2ecfa; color: #7956a4; }
[data-type="message"] .node-icon { background: #ebf3fb; color: #487ba7; }
[data-type="extract"] .node-icon { background: #f0ecfa; color: #654c98; }
[data-type="end"] .node-icon { background: #edf2f4; color: #546e76; }
.node-type { color: #587077; font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; }
.node-summary { font-size: .75rem; line-height: 1.4; color: #496168; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 31px; }
.node-tag { font-size: .66rem; color: #7754a1; background: #f4effa; border-radius: 4px; padding: 3px 5px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.node-ports { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #e6eeee; padding: 6px 9px; min-height: 31px; }
.node-ports:empty { display: none; }
.node-port { border: 0; background: transparent; color: #3e706e; font-size: .68rem; font-weight: 700; padding: 2px; }
.node-port[data-port="no"] { color: #a36b3a; }
.node-port.connecting { color: #fff; background: #087f72; border-radius: 4px; padding-inline: 5px; }
.canvas-hint { min-height: 35px; font-size: .69rem; color: #597177; background: #f9fbfb; padding: 9px 12px; border-top: 1px solid #e1eaea; }
.node-inspector { border-left: 1px solid var(--line); background: #fff; max-height: 545px; overflow: auto; }
#node-properties { padding: 15px; }
.inspector-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; }
.inspector-heading h3 { font-size: .93rem; }
.inspector-fields { display: grid; gap: 13px; }
.inspector-fields .control { font-size: .74rem; }
.inspector-fields input, .inspector-fields textarea, .inspector-fields select { font-size: .79rem; padding: 7px 8px; }
.inspector-fields small { font-size: .69rem; line-height: 1.45; }
.metatag-settings { border: 1px solid #e7ddf2; border-radius: 8px; background: #faf7fe; padding: 10px; }
.metatag-settings > .control > span { color: #6c4c95; }
.inspector-note { font-size: .71rem; border-left: 3px solid #d3c3e9; padding-left: 9px; }
.inspector-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 17px; margin-top: 17px; border-top: 1px solid var(--line); }
.inspector-footer small { font-size: .64rem; overflow-wrap: anywhere; }
.inspector-footer .button { font-size: .68rem; min-height: 30px; padding: 5px 7px; }
.builder-error { margin: 12px 15px; }
.preview-report { padding-top: 15px; margin-top: 16px; border-top: 1px solid var(--line); }
.preview-report h3 { font-size: .9rem; margin-bottom: 10px; }
.preview-report .record-meta { margin-bottom: 0; }
.bubble.system { background: transparent; border: 0; color: #5c767b; font-size: .72rem; justify-self: center; text-align: center; }
.report-filters { align-items: flex-end; gap: 10px; }
.report-filters .control { font-size: .72rem; flex: 1 1 140px; }
.report-filters .control:first-child { flex: 1.4 1 190px; }
.report-filters input { font-size: .8rem; }
#report-timezone { width: 100%; font-size: .7rem; }
.report-error { margin: 0 18px 15px; }
.conversation-table { min-width: 1000px; }
.conversation-table th, .conversation-table td { text-align: left; }
.conversation-table th:last-child, .conversation-table td:last-child { text-align: left; }
.conversation-table th { white-space: nowrap; }
.conversation-table .report-identifier { font-family: ui-monospace, monospace; font-size: .7rem; color: #587078; }
.conversation-id { font-family: ui-monospace, monospace; font-size: .75rem; }
.metatag-column { background: #f2eef8; border-left: 1px solid #e3d9ee; }
.metatag-header { color: #705198; }
.metatag-value { border-left: 1px solid #eee7f5; min-width: 150px; max-width: 320px; overflow-wrap: anywhere; white-space: pre-wrap; }
.status-badge[data-status="completed"] { color: #086b56; background: #e4f6ef; }
.status-badge[data-status="expired"], .status-badge[data-status="stopped"] { color: #8b6032; background: #fff3e3; }
.status-badge[data-status="restarted"] { color: #73539c; background: #f1eafa; }
.whatsapp-overview { display: flex; align-items: flex-start; gap: 18px; padding: 25px; }
.whatsapp-symbol { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; color: #087f72; background: #e7f6f1; flex: 0 0 auto; }
.whatsapp-symbol svg { width: 31px; height: 31px; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.whatsapp-status-copy { flex: 1; min-width: 0; }
.whatsapp-status-copy h2 { margin: 9px 0 5px; }
.whatsapp-status-copy p { font-size: .86rem; max-width: 590px; }
.whatsapp-status-copy .whatsapp-account { color: var(--brand-dark); font-weight: 650; margin-top: 10px; overflow-wrap: anywhere; }
.whatsapp-overview > .button { align-self: center; }
.whatsapp-notice { margin: 0 25px 20px; }
.whatsapp-pairing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, .85fr); gap: 30px; border-top: 1px solid var(--line); padding: 29px 25px; }
.whatsapp-instructions h3 { margin: 7px 0 14px; font-size: 1.1rem; }
.whatsapp-instructions ol { padding-left: 23px; margin: 0 0 18px; color: #35565b; font-size: .88rem; line-height: 1.65; }
.whatsapp-instructions li { padding-left: 5px; margin: 0 0 13px; }
.whatsapp-instructions li::marker { color: var(--brand-dark); font-weight: 750; }
.whatsapp-instructions .subtle { font-size: .79rem; }
.whatsapp-qr-area { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 21px 15px; border-radius: 12px; background: #f4f8f7; min-height: 315px; }
.whatsapp-qr-placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 260px; text-align: center; }
.whatsapp-qr-placeholder > span { display: grid; place-items: center; height: 79px; width: 79px; font-size: 3.1rem; border-radius: 15px; background: #e4eeeb; color: #8ba6a1; }
.whatsapp-qr-placeholder p { font-size: .8rem; }
#whatsapp-qr { display: block; max-width: 100%; height: auto; aspect-ratio: 1; background: #fff; border: 9px solid #fff; border-radius: 8px; }
.whatsapp-poll-note { margin-top: 13px; font-size: .73rem; text-align: center; max-width: 300px; }
.whatsapp-poll-note:empty { display: none; }
.whatsapp-next { display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font-size: .8rem; }
.account-tools { display: flex; align-items: center; gap: 16px; }
.session-profile { display: flex; align-items: center; gap: 7px; color: #39595f; font-size: .77rem; min-width: 0; }
#session-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-avatar { display: grid; place-items: center; width: 29px; height: 29px; background: #eff5f3; border: 1px solid #dce7e3; border-radius: 50%; }
.profile-avatar svg { width: 17px; height: 17px; stroke: #3e7165; stroke-width: 1.7; }
.logout-button { border: 0; padding: 7px 0 7px 12px; background: transparent; border-left: 1px solid #dce6e3; font-size: .76rem; color: #536b70; }
.logout-button:hover { color: #056a5d; }
.session-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 25px; font-size: .82rem; background: #fff5e2; color: #76501d; border-bottom: 1px solid #eaddc5; }
.session-notice > span { flex: 1 1 300px; }
.session-error { margin: 15px 20px; }
.logout-actions { margin-top: 22px; }
.home-hero { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; padding: 29px; border: 1px solid #bcded3; border-radius: 13px; background: linear-gradient(115deg, #edf8f2, #f7fbf9); margin-bottom: 20px; }
.home-hero h2 { font-size: 1.5rem; margin: 8px 0; letter-spacing: -.035em; }
.home-hero p { max-width: 660px; font-size: .88rem; line-height: 1.6; }
.home-hero .button { margin-top: 17px; text-decoration: none; }
.home-progress { min-width: 165px; display: grid; gap: 7px; padding-left: 27px; border-left: 1px solid #cee2d9; }
.home-progress strong { font-size: 2.2rem; font-weight: 650; letter-spacing: -.05em; color: #246759; }
.home-progress span { color: #567b70; font-size: .8rem; }
.home-progress small { color: #66847b; font-size: .66rem; }
.home-progress progress { display: block; height: 7px; width: 160px; margin: 6px 0; border: 0; border-radius: 10px; overflow: hidden; background: #d5e6de; accent-color: #147e65; }
.home-progress progress::-webkit-progress-bar { background: #d5e6de; border-radius: 10px; }
.home-progress progress::-webkit-progress-value { background: #147e65; border-radius: 10px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.home-steps { list-style: none; padding: 0; margin: 0; }
.home-step { display: flex; gap: 13px; padding: 22px 20px; border-top: 1px solid #e6ecea; }
.home-step-marker { flex: 0 0 auto; display: grid; place-items: center; height: 29px; width: 29px; border-radius: 50%; background: #eff3f2; color: #7c9690; font-size: .79rem; font-weight: 700; border: 1px solid #dbe5e0; }
.home-step[data-state="done"] .home-step-marker { background: #e0f3e9; color: #188263; border-color: #c4e5d5; }
.home-step-copy { min-width: 0; flex: 1; }
.home-step-title { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; justify-content: space-between; margin-bottom: 8px; }
.home-step-title h3 { font-size: .9rem; line-height: 1.4; }
.home-step-title .status-badge { font-size: .64rem; }
.home-step p { font-size: .79rem; overflow-wrap: anywhere; }
.home-text-link { display: inline-block; text-decoration: none; color: #177363; font-size: .78rem; font-weight: 650; margin-top: 12px; }
.home-text-link:hover { text-decoration: underline; }
.home-side { display: grid; gap: 20px; }
.home-test-guide { padding: 22px; background: #fbfcfb; }
.home-test-guide h2 { margin: 9px 0 10px; font-size: 1.13rem; }
.home-test-guide p { font-size: .82rem; }
.home-triggers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.trigger-chip { padding: 6px 10px; border: 1px solid #ccdfd7; background: #edf5f0; border-radius: 7px; font-size: .81rem; color: #2f705b; }
.home-test-guide .home-guide-note { margin-top: 18px; padding-top: 15px; border-top: 1px solid #e1e9e4; font-size: .73rem; color: #70857d; }
.home-links { padding: 21px; }
.home-links h2 { font-size: 1rem; margin-bottom: 8px; }
.home-links > a { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid #e7edea; text-decoration: none; color: #365e53; }
.home-links > a:last-child { border-bottom: 0; padding-bottom: 0; }
.home-links strong { display: block; font-size: .79rem; }
.home-links small { display: block; margin-top: 4px; font-size: .71rem; color: #748a82; }
.home-recent { margin-top: 20px; }
.home-recent-row { display: flex; align-items: center; gap: 15px; padding: 15px 20px; border-top: 1px solid var(--line); }
.home-recent-row time { font-size: .73rem; }
#home-recent-list:has(.empty-icon) { text-align: center; padding: 30px 20px; }
#home-recent-list > .empty-icon { display: block; color: #77988b; margin-bottom: 10px; font-size: 1.8rem; }
#home-recent-list > p { font-size: .82rem; margin-top: 8px; }
.login-page { background: #f4f7f4; }
.login-layout { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; max-width: none; padding: 0; margin: 0; }
.login-intro { display: flex; flex-direction: column; min-height: 100vh; padding: clamp(32px, 5.6vw, 82px); background: #123139; color: #f1f9f4; position: relative; overflow: hidden; }
.login-intro::after { content: ""; width: 480px; height: 480px; border: 1px solid #3c65594d; border-radius: 50%; position: absolute; bottom: -290px; right: -140px; box-shadow: 0 0 0 60px #3c65591a, 0 0 0 120px #3c655910; pointer-events: none; }
.login-brand { padding: 0; margin: 0 0 65px; }
.login-intro-copy { margin-block: auto; padding-block: 20px 55px; max-width: 490px; position: relative; z-index: 1; }
.login-kicker { color: #87c6b3; font-size: .65rem; letter-spacing: .19em; font-weight: 650; }
.login-intro h1 { font-size: clamp(2.7rem, 4.9vw, 4.5rem); letter-spacing: -.055em; line-height: 1.08; font-weight: 600; margin: 23px 0 22px; }
.login-intro-copy p { color: #b4d0c5; max-width: 380px; font-size: .98rem; line-height: 1.8; }
.login-journey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; position: relative; z-index: 1; margin-bottom: 50px; }
.login-journey > div { border-top: 1px solid #47635c; padding-top: 16px; }
.login-journey span { display: block; font-size: .66rem; color: #75b49e; margin-bottom: 12px; }
.login-journey strong { display: block; font-size: .84rem; margin-bottom: 8px; font-weight: 600; }
.login-journey p { font-size: .72rem; color: #abc7bb; }
.login-intro-foot { position: relative; z-index: 1; color: #7ca296; font-size: .68rem; letter-spacing: .03em; }
.login-form-area { display: flex; align-items: center; justify-content: center; padding: 55px clamp(25px, 5vw, 75px); background: #fafcfb; }
.login-form-card { width: 100%; max-width: 410px; }
.login-form-card h2 { font-size: 2rem; font-weight: 650; letter-spacing: -.045em; margin: 13px 0 12px; }
.login-description { font-size: .9rem; line-height: 1.7; max-width: 360px; }
.login-form { margin-top: 32px; }
.login-form .control { font-size: .82rem; font-weight: 650; color: #39594f; }
.login-form > .control:first-child { margin-bottom: 21px; }
.login-form input { height: 48px; background: #fff; border-color: #cedbd5; border-radius: 8px; font-size: .9rem; margin-top: 7px; }
.password-field { position: relative; margin-bottom: 16px; }
.password-field input { padding-right: 82px; }
.password-field button { position: absolute; top: 13px; right: 7px; padding: 10px; font-size: .73rem; color: #487260; background: transparent; border: 0; border-radius: 6px; }
.password-field button:hover { background: #eff5f1; }
.login-submit { width: 100%; min-height: 48px; margin-top: 8px; font-size: .9rem; gap: 10px; }
.login-submit > span:last-child { margin-left: auto; font-size: 1.1rem; }
.login-submit > #login-submit-label { flex: 1; }
.login-spinner { width: 17px; height: 17px; border: 2px solid #ffffff70; border-top-color: #fff; border-radius: 50%; animation: login-spin .8s linear infinite; }
.login-help { margin-top: 31px; padding-top: 24px; border-top: 1px solid #dfe7e1; }
.login-help strong { font-size: .78rem; color: #486658; }
.login-help p { font-size: .76rem; line-height: 1.7; margin-top: 6px; }
.login-form-foot { margin-top: 35px; font-size: .69rem; color: #7a9184; }
@keyframes login-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .login-spinner { animation: none; } }
@media (max-width: 1100px) { .home-grid { grid-template-columns: 1fr; }.home-side { grid-template-columns: 1fr 1fr; }.login-intro { padding: 40px; }.login-journey { gap: 15px; }.account-tools { gap: 10px; }.topbar .connection { display: none; } }
@media (max-width: 760px) { .login-layout { grid-template-columns: 1fr; }.login-intro { min-height: auto; padding: 26px 30px 32px; }.login-brand { margin-bottom: 20px; }.login-intro-copy { padding: 0; }.login-intro h1 { font-size: 2.3rem; margin: 16px 0 12px; }.login-intro h1 br { display: none; }.login-intro-copy p { font-size: .84rem; line-height: 1.7; max-width: 450px; }.login-journey, .login-intro-foot { display: none; }.login-form-area { padding: 35px 30px 45px; }.login-form-card { max-width: 460px; }.login-form-card h2 { font-size: 1.7rem; }.login-form-foot { margin-top: 25px; }.home-hero { padding: 22px; gap: 20px; }.home-progress { padding-left: 20px; min-width: 130px; }.home-progress progress { width: 130px; }.home-recent-row { flex-wrap: wrap; }.home-recent-row .directory-copy { flex-basis: 50%; }.home-recent-row time { flex: 1; }.session-profile { font-size: .7rem; } }
@media (max-width: 540px) { .home-hero { grid-template-columns: 1fr; }.home-progress { border-left: 0; border-top: 1px solid #cee2d9; padding: 15px 0 0; grid-template-columns: auto 1fr; align-items: center; column-gap: 14px; }.home-progress strong { font-size: 1.65rem; }.home-progress progress { width: 100%; grid-column: 1 / -1; margin: 0; }.home-progress small { grid-column: 1 / -1; }.home-side { grid-template-columns: 1fr; }.home-step { padding: 19px 14px; gap: 10px; }.home-step-title { gap: 7px; }.home-recent .panel-heading, #inicio .page-heading { flex-wrap: wrap; }.account-tools { gap: 8px; }.profile-avatar { display: none; }#session-name { max-width: 90px; }.topbar { flex-wrap: wrap; padding-block: 12px; gap: 10px; }.breadcrumbs { flex: 1; font-size: .75rem; }.logout-button { font-size: .74rem; }.login-form-area { padding-inline: 24px; }.login-intro { padding-inline: 24px; }.login-kicker { font-size: .58rem; }.login-intro h1 { font-size: 2.1rem; } }
.discovery-panel, .participants-panel, .manual-access, .operation-panel { margin-bottom: 18px; }
.setup-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 16px 20px; background: #f1f8f5; border-block: 1px solid var(--line); font-size: .82rem; }
.setup-notice > span { flex: 1 1 250px; }
.discovery-search { flex: 1; min-width: 160px; }
.discovery-panel .toolbar, .participants-panel .toolbar { align-items: flex-end; }
.directory-row { display: flex; align-items: center; gap: 15px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.directory-row:last-child { border-bottom: 0; }
.directory-row[data-selected="true"] { background: #edf8f3; box-shadow: inset 3px 0 #197f6d; }
.directory-copy { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.directory-copy strong { font-size: .85rem; color: #26484e; }
.directory-copy small, .identifier { font-size: .7rem; color: #627d82; overflow-wrap: anywhere; }
.identifier { font-family: ui-monospace, monospace; }
.selected-group { display: grid; gap: 10px; margin: 0 20px 12px; padding: 16px; border: 1px solid #b9dcd1; border-radius: 9px; background: #f4faf7; }
.selected-group strong { color: #25584c; }
.permission-check { display: flex; align-items: flex-start; gap: 8px; font-size: .8rem; color: #34575c; cursor: pointer; }
.permission-check input { flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--brand-dark); width: 16px; height: 16px; }
.permission-check:has(input:disabled) { opacity: .6; cursor: default; }
.participant-row > .permission-check { flex: 0 0 auto; }
.participant-permissions { display: grid; gap: 11px; flex: 0 0 auto; }
.manual-access > summary { cursor: pointer; padding: 17px 20px; font-weight: 650; font-size: .87rem; color: #35575c; }
.manual-description { padding: 0 20px 14px; font-size: .8rem; }
.manual-access .access-layout { padding: 0 4px; margin: 0; }
.manual-access .access-layout > div { min-width: 0; }
.manual-access .access-options { display: grid; gap: 10px; }
.manual-access .access-options label { margin: 0; }
.operation-state { display: grid; gap: 12px; padding: 0 20px 20px; font-size: .83rem; }
.operation-state > .status-badge { justify-self: start; }
.operation-scope { margin: 0; padding-left: 20px; color: #426267; line-height: 1.7; overflow-wrap: anywhere; }
.setup-warning { color: #835b29; background: #fff7e9; border-radius: 7px; padding: 10px 12px; font-size: .8rem; }
#operation-error { margin-inline: 20px; }
.operation-panel .panel-foot { display: flex; gap: 10px; flex-wrap: wrap; }
.inbox-poll-note { flex: 1 1 100%; font-size: .72rem; }
.inbox-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 18px; }
.inbox-list:empty { display: none; }
.inbox-card { border: 1px solid var(--line); border-radius: 10px; padding: 17px; background: #fff; min-width: 0; }
.inbox-card-heading, .inbox-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inbox-card-heading { padding-bottom: 12px; border-bottom: 1px solid #edf1f0; }
.inbox-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 16px 0; }
.inbox-meta > div { min-width: 0; }
.inbox-meta dt { color: #7b9094; text-transform: uppercase; letter-spacing: .05em; font-size: .6rem; margin-bottom: 5px; font-weight: 650; }
.inbox-meta dd { margin: 0; color: #33565c; font-size: .78rem; overflow-wrap: anywhere; }
.inbox-card-footer .subtle { font-size: .7rem; }
.conversation-link { background: none; border: 0; padding: 0; color: #147463; text-decoration: underline; cursor: pointer; font: inherit; }
.conversation-dialog { width: min(850px, calc(100vw - 30px)); }
.detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.detail-toolbar p { font-size: .75rem; }
.conversation-detail-overview { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.conversation-detail-overview > .record-meta { width: 100%; margin-top: 10px; }
.conversation-timeline { margin: 10px 0 25px; border-top: 1px solid var(--line); padding-top: 20px; }
.conversation-timeline h3, .conversation-fields h3 { font-size: .95rem; margin-bottom: 10px; }
.conversation-timeline > .subtle { font-size: .76rem; margin-bottom: 15px; }
.conversation-timeline > .button { margin: 8px 0; }
.message-timeline { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.timeline-message { max-width: 88%; border: 1px solid #dfe8e5; border-radius: 11px; padding: 12px 14px; background: #f5f8f7; align-self: flex-start; overflow-wrap: anywhere; }
.timeline-message.outgoing { align-self: flex-end; background: #eaf6ef; border-color: #cfe6d8; }
.timeline-message.system { align-self: center; background: #f4f1f8; border-color: #e4ddef; }
.message-author { color: #477266; font-size: .69rem; }
.message-text { white-space: pre-wrap; margin: 7px 0 9px; color: #304d52; font-size: .84rem; line-height: 1.6; }
.message-attachment { font-size: .76rem; color: #546d76; background: #ffffff9c; padding: 8px; border-radius: 5px; margin-block: 8px; }
.message-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; font-size: .62rem; color: #7d9390; }
.message-foot .status-badge { font-size: .6rem; }
.status-badge[data-status="failed"], .status-badge[data-status="uncertain"] { background: #fff0e8; color: #8a4e33; }
.status-badge[data-status="pending"], .status-badge[data-status="sending"] { background: #fff5dd; color: #8a6828; }
.status-badge[data-status="sent"], .status-badge[data-status="received"] { background: #e4f3ec; color: #28735d; }
.conversation-fields { border-top: 1px solid var(--line); padding: 20px 0 0; margin-top: 20px; }
.conversation-fields dd { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .inbox-list { grid-template-columns: 1fr; }.directory-row { flex-wrap: wrap; }.directory-copy { flex-basis: 50%; } }
@media (max-width: 630px) { .discovery-panel .panel-heading, .participants-panel .panel-heading, .operation-panel .panel-heading, #atendimentos .page-heading { flex-wrap: wrap; }.directory-row { gap: 10px; padding: 15px; }.directory-copy { flex-basis: 100%; }.directory-row > .button { margin-left: auto; }.participant-row > .permission-check { flex-basis: 100%; }.inbox-card { padding: 13px; }.inbox-list { padding: 12px; }.inbox-card-heading, .detail-toolbar { flex-wrap: wrap; }.inbox-meta { gap: 12px; }.timeline-message { max-width: 96%; }.operation-state { padding-inline: 15px; }.selected-group { margin-inline: 15px; } }
@media (max-width: 1000px) { .whatsapp-overview { flex-wrap: wrap; }.whatsapp-overview > .button { margin-left: 76px; }.whatsapp-pairing { gap: 20px; grid-template-columns: minmax(0, 1fr) 290px; } }
@media (max-width: 760px) { .whatsapp-pairing { grid-template-columns: 1fr; }.whatsapp-overview, .whatsapp-pairing { padding: 20px; }.whatsapp-overview > .button { margin-left: 0; }.whatsapp-notice { margin-inline: 20px; }.whatsapp-next, #whatsapp .page-heading { flex-wrap: wrap; } }
@media (min-width: 1600px) {
  .graph-workspace { grid-template-columns: minmax(400px, 1fr) 330px; }
  .graph-viewport { height: 590px; }
  .node-inspector { max-height: 625px; }
}
@media (max-width: 1100px) {
  .graph-workspace { grid-template-columns: minmax(260px, 1fr) 260px; }
  body:has(#fluxos:not([hidden])) main { padding-inline: 14px; }
  .graph-viewport { height: 530px; }
  .node-inspector { max-height: 565px; }
}
@media (max-width: 850px) {
  .graph-workspace { grid-template-columns: 1fr; }
  .node-inspector { border-left: 0; border-top: 1px solid var(--line); max-height: none; }
  .inspector-fields { grid-template-columns: 1fr 1fr; }
  .inspector-fields > .control:has(textarea), .metatag-settings, .inspector-note { grid-column: 1 / -1; }
  .graph-viewport { height: 400px; min-height: 350px; }
  .builder-layout .flow-menu { display: block; }
  .builder-layout .flow-menu > h2 { margin-bottom: 9px; }
}
@media (max-width: 630px) {
  .navigation { flex-wrap: wrap; }
  .navigation a { flex: 1 0 42%; }
  body:has(#fluxos:not([hidden])) main { padding-inline: 10px; }
  #fluxos .page-heading { flex-wrap: wrap; }
  .builder-top { grid-template-columns: 1fr; gap: 8px; padding-inline: 12px; }
  .block-palette > span { width: 100%; }
  .canvas-controls { margin-left: auto; }
  .inspector-fields { grid-template-columns: 1fr; }
  .graph-viewport { height: 350px; }
  .report-filters .control { flex-basis: calc(50% - 10px); }
  .report-filters .control:first-child { flex-basis: 100%; }
  #conversas .page-heading { flex-wrap: wrap; }
}
