:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #101820; background: #f4f7f8; font-size: 15px; line-height: 1.55;
  color-scheme: light; --muted: #66737e; --accent: #27ad63; --green-dark: #178a49;
  --border: #dfe7ea; --navy: #07131c; --surface: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 32px; line-height: 1.2; letter-spacing: -1.2px; font-weight: 750; }
h2 { font-size: 19px; letter-spacing: -.5px; }
small, .muted { color: var(--muted); }
::selection { background: #bff0d2; color: #0a3820; }
aside { width: 248px; position: fixed; inset: 0 auto 0 0; padding: 32px 22px; border-right: 1px solid #19303d; background: linear-gradient(180deg, #07131c, #0b1d29); color: #fff; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 14px; width: fit-content; }
.brand img { display: block; width: 130px; height: auto; }
.brand span { border-left: 1px solid #ffffff30; padding-left: 14px; color: #69df9b; font-size: 10px; letter-spacing: 2px; font-weight: 700; }
aside .brand { gap: 10px; }
aside .brand img { width: 118px; }
aside .brand span { padding-left: 10px; font-size: 9px; }
aside > small { font-size: 9px; letter-spacing: 2px; margin: 25px 12px 16px; color: #6e8b99; }
nav { display: grid; gap: 7px; }
nav a { color: #a8bdc7; padding: 13px 14px; border-radius: 11px; font-size: 13px; font-weight: 550; transition: background .15s; }
nav a:hover { background: #ffffff08; color: #fff; text-decoration: none; }
nav a[aria-current=page] { background: linear-gradient(90deg, #27ad632a, #27ad6310); color: #fff; box-shadow: inset 3px 0 #27ad63, inset 0 0 0 1px #27ad6320; }
footer { margin-top: auto; border-top: 1px solid #ffffff12; padding: 22px 12px 0; font-size: 13px; color: #d2e0e7; }
main { margin-left: 248px; padding: 42px clamp(24px, 3.5vw, 60px); max-width: 1660px; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
header small, .eyebrow { font-size: 10px; letter-spacing: 2px; color: var(--green-dark); font-weight: 700; }
header h1 { margin: 8px 0 0; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 100px; background: #eaf8f0; border: 1px solid #cdebd9; color: #187e46; font-size: 11px; font-weight: 650; }
.badge:before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #27ad63; }
.panel, .metrics article { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 28px; box-shadow: 0 4px 20px #07131c04; }
.panel { margin-bottom: 24px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 28px 0; }
.metrics article { position: relative; overflow: hidden; }
.metrics article:before { content: ''; position: absolute; top: 0; left: 28px; height: 3px; width: 32px; background: #27ad63; border-radius: 0 0 3px 3px; }
.metrics strong { display: block; font-size: 42px; font-weight: 650; letter-spacing: -2px; margin: 18px 0; color: var(--navy); }
.metrics a, .metrics span { font-size: 12px; }
.metrics small { font-size: 12px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.notice { background: #edf7f1; border: 1px solid #d1e9da; border-radius: 13px; padding: 20px 24px; color: #24583b; margin-bottom: 24px; font-size: 13px; }
.notice p { margin: 6px 0 0; color: #507460; }
.error { background: #fff0f1; color: #ae2530; padding: 14px; border: 1px solid #f4cdd0; border-radius: 10px; font-size: 13px; }
label { display: block; font-size: 12px; font-weight: 650; color: #34454f; margin-bottom: 22px; }
input { display: block; width: 100%; border: 1px solid #cfdadd; background: #fbfdfd; border-radius: 10px; padding: 14px 15px; color: #101820; font: inherit; font-weight: 400; margin-top: 9px; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: #929da6; }
input:focus { outline: none; border-color: #27ad63; box-shadow: 0 0 0 4px #27ad6318; }
button, .button { border: 0; border-radius: 10px; background: var(--accent); color: #fff; padding: 13px 19px; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; display: inline-block; white-space: nowrap; box-shadow: 0 6px 18px #27ad6318; transition: background .15s, box-shadow .15s; }
button:hover, .button:hover { background: var(--green-dark); text-decoration: none; box-shadow: 0 8px 22px #27ad6328; }
button:focus-visible, a:focus-visible { outline: 3px solid #27ad63; outline-offset: 4px; }
.quiet { background: transparent; color: #85cda5; padding: 12px 0; font-size: 12px; box-shadow: none; }
.quiet:hover { background: transparent; box-shadow: none; color: #fff; }
.row-form { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr auto; align-items: end; gap: 16px; }
.row-form label { margin: 0; }
.search { display: flex; align-items: end; gap: 16px; max-width: 600px; margin-bottom: 24px; }
.search label { flex: 1; margin: 0; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .7px; }
td, th { padding: 18px 12px; border-bottom: 1px solid #ecf0f2; vertical-align: top; }
td:first-child, th:first-child { padding-left: 0; }
code { font-size: 11px; overflow-wrap: anywhere; color: #577066; }
.empty { text-align: center; padding: 70px 24px; border: 1px dashed #cfdadd; background: #ffffff90; border-radius: 18px; }
.empty p { color: var(--muted); max-width: 600px; margin: auto; font-size: 13px; }
.narrow { max-width: 680px; }
/* Autenticação: identidade Palco Ads, ilustração em HTML, sem métricas fictícias. */
.login-main { margin: 0; max-width: none; min-height: 100dvh; display: grid; grid-template-columns: 52% 48%; padding: 0; }
.login-story { position: relative; overflow: hidden; min-height: 100dvh; padding: 42px clamp(32px, 5vw, 88px) 30px; display: flex; flex-direction: column; background: radial-gradient(ellipse at 10% 80%, #1b654b38, transparent 65%), radial-gradient(ellipse at 100% 0, #1b4f5b4d, transparent 65%), #07131c; color: #fff; }
.login-story:before { content: ''; position: absolute; width: 560px; height: 560px; border: 1px solid #ffffff05; border-radius: 50%; right: -340px; bottom: -100px; box-shadow: 0 0 0 70px #ffffff02, 0 0 0 140px #ffffff02; pointer-events: none; }
.login-story .brand { position: relative; }
.login-story .brand img { width: 138px; }
.story-copy { position: relative; margin: auto 0; padding: 52px 0; max-width: 570px; }
.story-copy .eyebrow { display: flex; align-items: center; gap: 9px; color: #80cfa5; font-size: 9px; margin-bottom: 22px; }
.live-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #49d787; box-shadow: 0 0 0 4px #27ad631a; }
.story-copy h1 { font-size: clamp(30px, 3.45vw, 53px); font-weight: 650; line-height: 1.1; letter-spacing: -2px; margin-bottom: 24px; }
.story-copy h1 em { font-style: normal; color: #57dc91; }
.story-copy > p:not(.eyebrow) { color: #9cb1bc; font-size: 14px; max-width: 355px; line-height: 1.8; }
.fiscal-flow { position: relative; margin-top: 34px; padding: 9px 23px; border: 1px solid #ffffff12; border-radius: 18px; background: linear-gradient(125deg, #ffffff07, #ffffff02); max-width: 370px; box-shadow: 0 20px 50px #00000012; }
.fiscal-flow article { position: relative; display: flex; gap: 16px; align-items: center; padding: 17px 0; }
.fiscal-flow article + article { border-top: 1px solid #ffffff08; }
.flow-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #1a3b31; border: 1px solid #4ada8b22; color: #7addaa; font-size: 10px; font-weight: 600; }
.fiscal-flow strong { display: block; font-size: 12px; font-weight: 550; color: #dfeee6; }
.fiscal-flow small { display: block; font-size: 10px; color: #78988e; margin-top: 3px; }
.flow-check { margin-left: auto; color: #4dc783; font-size: 13px; }
.flow-caption { font-size: 9px; color: #6e8a85; display: block; margin-top: 12px; }
.story-footer { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 18px; color: #6f8995; font-size: 9px; letter-spacing: .5px; }
.story-footer span:first-child { font-size: 8px; letter-spacing: 1px; }
.login-form-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 58px 40px; background: #fff; }
.login-card { width: 100%; max-width: 350px; padding: 24px 0; }
.login-kicker { display: block; color: #178a49; font-size: 9px; font-weight: 750; letter-spacing: 1.8px; margin-bottom: 18px; }
.login-card h2 { font-size: clamp(28px, 2.5vw, 36px); font-weight: 650; line-height: 1.15; letter-spacing: -1.3px; margin-bottom: 16px; }
.login-card > p.muted { font-size: 12px; line-height: 1.8; max-width: 300px; }
.login-card form { margin: 32px 0 25px; }
.login-card button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 15px 19px; margin-top: 28px; font-size: 12px; }
.login-card button span { font-size: 20px; font-weight: 400; line-height: 1; }
.login-security { display: flex; align-items: center; justify-content: center; gap: 10px; border-top: 1px solid #ecf0f2; padding-top: 24px; color: #6d7d84; font-size: 10px; }
.login-security small { font-size: 9px; color: #8d999f; }
.security-icon { color: #27ad63; font-size: 22px; }
.login-bottom { position: absolute; bottom: 20px; margin: 0; color: #96a1a8; font-size: 9px; }
.login-bottom span { padding: 0 8px; }
.login-mobile-brand { display: none; }
@media (max-width: 1100px) {
  .row-form { grid-template-columns: 1fr 1fr; }
  .metrics { gap: 12px; }
  .grid { grid-template-columns: 1fr; }
  main { padding: 28px; }
  .login-story { padding-inline: 38px; }
  .story-footer { flex-direction: column; align-items: start; gap: 7px; }
}
@media (max-width: 760px) {
  aside { position: static; width: 100%; padding: 20px; border-right: 0; border-bottom: 1px solid #19303d; }
  aside .brand img { width: 100px; }
  aside > small { margin: 20px 8px 10px; }
  nav { display: flex; flex-wrap: wrap; gap: 4px; }
  nav a { padding: 9px; font-size: 11px; }
  footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 0; margin-top: 14px; }
  main { margin: 0; padding: 24px 16px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics article { padding: 22px; }
  .metrics strong { font-size: 32px; margin: 8px 0; }
  .row-form { grid-template-columns: 1fr; }
  h1 { font-size: 26px; }
  .panel { padding: 20px; }
  header { gap: 14px; }
  .notice { padding: 18px; }
  .login-main { display: block; }
  .login-story { display: none; }
  .login-form-panel { min-height: 100dvh; padding: 35px 28px 64px; background: radial-gradient(ellipse at top left, #edf7f1, transparent 65%), #fff; }
  .login-card { max-width: 370px; padding: 0; }
  .login-mobile-brand { display: flex; align-items: center; gap: 18px; margin: 0 0 45px; }
  .login-mobile-brand img { width: 100px; height: auto; }
  .login-mobile-brand span { font-size: 9px; letter-spacing: 2px; color: #178a49; padding-left: 18px; border-left: 1px solid #cfdadd; }
  .login-card h2 { font-size: 33px; }
  .login-bottom { bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Diagnóstico de integração: linguagem visual compartilhada. */
select { display:block; width:100%; margin-top:9px; border:1px solid #cfdadd; border-radius:10px; padding:14px 15px; color:#101820; background:#fbfdfd; font:inherit; }
select:focus { outline:2px solid #27ad63; outline-offset:2px; }
.operations-filters { max-width:800px; flex-wrap:wrap; }
.operations-filters label { min-width:160px; }
details summary { cursor:pointer; color:#178a49; white-space:nowrap; }
details strong { display:block; margin-top:12px; font-size:11px; }
pre { white-space:pre-wrap; overflow-wrap:anywhere; font-size:10px; max-width:300px; min-width:180px; }
.result-uncertain,.result-started { color:#8a5c0a; font-weight:700; }
.result-failed { color:#ae2530; font-weight:700; }
.result-success { color:#178a49; font-weight:700; }

textarea { display:block; width:100%; margin-top:9px; border:1px solid #cfdadd; border-radius:10px; padding:14px 15px; color:#101820; background:#fbfdfd; font:inherit; resize:vertical; }
textarea:focus { outline:2px solid #27ad63; outline-offset:2px; }
/* Tabelas operacionais compactas (fila de emissão) */
.table-scroll td form { margin: 0; }
.table-scroll td button { padding: 8px 12px; font-size: 12px; white-space: nowrap; border-radius: 8px; }
.table-scroll td, .table-scroll th { vertical-align: top; }
.table-scroll td .badge { white-space: nowrap; }
.badge.warn { background: #fdecec; border-color: #f4c7c7; color: #a12b2b; }
.badge.warn:before { background: #d64545; }
.badge.neutral { background: #eef1f3; border-color: #dbe1e5; color: #4a5a66; }
.badge.neutral:before { background: #8a98a3; }
