:root {
  --ink: #17211d;
  --muted: #607069;
  --line: #d9e1dd;
  --surface: #ffffff;
  --soft: #f3f6f4;
  --brand: #087f5b;
  --brand-dark: #07533f;
  --accent: #d99a1b;
  --danger: #b42318;
  --shadow: 0 14px 36px rgba(18, 40, 31, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--soft); font-family: Inter, Arial, sans-serif; line-height: 1.5; }
a { color: var(--brand-dark); }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar { min-height: 62px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; position: sticky; top: 0; z-index: 30; }
.topbar .shell { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; color: #fff; background: var(--brand); border-radius: 6px; font-size: 14px; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: #31433b; text-decoration: none; font-size: 14px; font-weight: 650; }
.hero { min-height: 610px; color: #fff; display: flex; align-items: center; background: url('hero-fiscal-api.png') center/cover no-repeat; box-shadow: inset 0 0 0 100vmax rgba(5, 25, 18, .48); }
.hero-copy { width: min(650px, 100%); padding: 82px 0 100px; }
.eyebrow { color: #92e6c4; font-size: 13px; font-weight: 800; text-transform: uppercase; }
h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.02; margin: 16px 0 22px; letter-spacing: 0; }
.hero p { max-width: 610px; color: #dce8e2; font-size: 19px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 750; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-light { background: #fff; color: var(--ink); }
.btn-outline { background: transparent; color: inherit; border-color: #aebbb5; }
.btn-danger { background: #fff; color: var(--danger); border-color: #e5b5b0; }
.band { padding: 72px 0; background: #fff; }
.band.soft { background: var(--soft); }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head h2 { font-size: 32px; margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feature { background: #fff; padding: 28px; min-height: 190px; }
.feature strong { display: block; margin: 14px 0 8px; font-size: 18px; }
.feature p { color: var(--muted); margin: 0; }
.icon { width: 38px; height: 38px; border-radius: 6px; background: #e3f4ed; color: var(--brand-dark); display: grid; place-items: center; font-weight: 900; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.panel-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 20px; }
.panel-body { padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field.full { grid-column: 1 / -1; }
label { display: block; font-size: 13px; font-weight: 750; margin-bottom: 6px; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #bdc9c3; border-radius: 5px; background: #fff; color: var(--ink); font: inherit; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(8, 127, 91, .15); border-color: var(--brand); }
.auth-wrap { min-height: calc(100vh - 62px); display: grid; place-items: center; padding: 42px 16px; }
.auth-panel { width: min(430px, 100%); }
.alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 5px; border: 1px solid; }
.alert-success { color: #0d5f43; background: #e8f7f0; border-color: #a5d8c5; }
.alert-error { color: #84201a; background: #fff0ef; border-color: #e9b6b1; }
.portal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 62px); }
.sidebar { background: #15251e; color: #fff; padding: 24px 16px; }
.sidebar a { display: flex; color: #d9e6e0; padding: 10px 12px; text-decoration: none; border-radius: 5px; margin-bottom: 4px; }
.sidebar a.active, .sidebar a:hover { color: #fff; background: #294337; }
.content { padding: 30px; min-width: 0; }
.page-title { margin: 0 0 24px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.page-title h1 { color: var(--ink); font-size: 30px; margin: 0; }
.page-title p { color: var(--muted); margin: 4px 0 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric { background: #fff; border: 1px solid var(--line); padding: 18px; border-radius: 6px; }
.metric small { color: var(--muted); display: block; }
.metric strong { font-size: 27px; display: block; margin-top: 6px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; background: #f8faf9; }
.badge { display: inline-flex; padding: 3px 7px; border-radius: 4px; font-size: 12px; font-weight: 750; background: #e8eeeb; }
.badge.ok { color: #086044; background: #dff3e9; }
.badge.warn { color: #805900; background: #fff0c7; }
.token-value { font-family: Consolas, monospace; word-break: break-all; padding: 14px; background: #122019; color: #d8f5e8; border-radius: 5px; }
.benchmark-line { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.benchmark-detail { padding: 16px; background: var(--soft); border-left: 4px solid var(--brand); }
.benchmark-detail p { margin: 7px 0; }
.benchmark-status { display: inline-block; margin-left: 12px; color: var(--muted); font-size: 14px; }
.benchmark .btn[disabled] { cursor: wait; opacity: .65; }
.muted { color: var(--muted); }
.whatsapp { position: fixed; right: 22px; bottom: 22px; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #1a9c59; color: #fff; text-decoration: none; font-weight: 900; box-shadow: var(--shadow); z-index: 40; }
.docs pre { overflow: auto; padding: 18px; background: #13221b; color: #dff5ea; border-radius: 6px; }
footer { background: #14231d; color: #c8d6d0; padding: 28px 0; }
@media (max-width: 900px) {
  .feature-grid, .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-layout { grid-template-columns: 1fr; }
  .sidebar { display: flex; overflow-x: auto; gap: 4px; padding: 10px; }
  .sidebar a { white-space: nowrap; margin: 0; }
  .dashboard-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav a:not(.btn) { display: none; }
  .hero { min-height: 560px; background-position: 62% center; }
  .hero-copy { padding: 60px 0 82px; }
  .feature-grid, .metric-grid, .form-grid { grid-template-columns: 1fr; }
  .content { padding: 20px 14px; }
  .page-title { align-items: start; flex-direction: column; }
}
