/* RExNext — Design System RExSoft v2 (tokens e componentes de rexsoft_design_system_v2.html)
   + complementos do Lab (layout responsivo, formulários de orçamento, home, avisos). */

:root {
  --teal-900: #04342c;
  --teal-800: #085041;
  --teal-700: #0f6e56;
  --teal-600: #017E74;
  --teal-500: #1D9E75;
  --teal-400: #5DCAA5;
  --teal-300: #9FE1CB;
  --teal-200: #c8f0e6;
  --teal-100: #E1F5EE;
  --dark-900: #192c2b;
  --dark-800: #1e3635;
  --dark-700: #243f3e;
  --red-600: #da2a2a;
  --red-500: #e54545;
  --red-100: #fdeaea;
  --gray-900: #1a1a1a;
  --gray-800: #2d2d2d;
  --gray-700: #3f3f3f;
  --gray-600: #525252;
  --gray-500: #6b6b6b;
  --gray-400: #919191;
  --gray-300: #b8b8b8;
  --gray-200: #d9d9d9;
  --gray-150: #e8e8e8;
  --gray-100: #f2f2f2;
  --gray-50: #f8f8f8;
  --white: #ffffff;
  --yellow-400: #f5a623;
  --yellow-100: #fff8e8;
  --blue-500: #2563eb;
  --blue-100: #eff6ff;
  --green-500: #16a34a;
  --green-100: #f0fdf4;
  --warning-text: #b45309;
  --font: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
  --sidebar-w: 260px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.14);
  --focus-ring: 0 0 0 3px rgba(1,126,116,0.1);
  --wrap: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  font-size: 15px;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-600); }
button { font-family: inherit; }
[hidden] { display: none !important; }

/* ─── LAYOUT DO APP (páginas de ferramenta) ───────────── */
.ds-layout { display: flex; min-height: 100vh; }

.ds-sidebar {
  width: var(--sidebar-w);
  background: var(--dark-900);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}
.ds-sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
}
.ds-sidebar-logo {
  width: 32px; height: 32px;
  background: var(--teal-600);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--white);
  flex-shrink: 0;
}
.ds-sidebar-title { color: var(--white); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.ds-sidebar-subtitle { color: rgba(255,255,255,0.4); font-size: 11px; margin-top: 1px; }
.ds-nav { padding: 12px 0; flex: 1; }
.ds-nav-section {
  padding: 16px 20px 6px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}
.ds-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  border-left: 2px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
}
.ds-nav-item:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.ds-nav-item.active { color: var(--teal-300); border-left-color: var(--teal-600); background: rgba(1,126,116,0.12); }
.ds-nav-item.sub { padding-left: 38px; font-size: 12px; }
.ds-nav-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.3); flex-shrink: 0; }
.ds-nav-item.active .ds-nav-dot { background: var(--teal-400); }
.ds-sidebar-footer { padding: 16px 20px 20px; border-top: 1px solid rgba(255,255,255,0.08); display: grid; gap: 8px; }
.ds-sidebar-footer p { color: rgba(255,255,255,0.4); font-size: 11px; line-height: 1.5; }

.ds-main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; }

.rl-topbar { display: none; }

/* ─── PAGE HEADER / SECTIONS ─────────────────────────── */
.ds-page-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-150);
  padding: 40px 48px 32px;
}
.ds-page-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal-100); color: var(--teal-700);
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px;
  margin-bottom: 12px;
}
.ds-page-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-600); }
.ds-page-header h1 { font-size: 32px; font-weight: 300; letter-spacing: -0.02em; color: var(--gray-900); line-height: 1.2; }
.ds-page-header h1 span { color: var(--teal-600); font-weight: 600; }
.ds-page-header p { margin-top: 8px; color: var(--gray-500); font-size: 15px; max-width: 680px; }
.ds-page-header .rl-header-actions { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }

.ds-section { padding: 40px 48px; border-bottom: 1px solid var(--gray-150); }
.ds-section:last-child { border-bottom: none; }
.ds-section-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.ds-section-number { font-size: 11px; font-weight: 600; color: var(--teal-600); font-family: var(--mono); letter-spacing: 0.05em; }
.ds-section-title { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; color: var(--gray-900); }
.ds-section-desc { font-size: 13px; color: var(--gray-500); margin-top: 2px; flex-basis: 100%; }

/* ─── BOTÕES ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none; cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap; text-decoration: none;
  line-height: 1.4;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn-primary { background: var(--teal-600); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--teal-700); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover:not(:disabled) { background: var(--gray-200); }
.btn-outline { background: transparent; color: var(--teal-600); border: 1px solid var(--teal-300); }
.btn-outline:hover:not(:disabled) { background: var(--teal-100); }
.btn-danger { background: var(--red-600); color: var(--white); }
.btn-danger:hover:not(:disabled) { background: #c42424; }
.btn-ghost { background: transparent; color: var(--gray-600); border: 1px solid var(--gray-200); }
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); }
.btn-lg { padding: 11px 22px; font-size: 14px; border-radius: var(--radius-lg); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-icon { padding: 8px; min-width: 36px; }
.btn-whatsapp { background: #25D366; color: var(--white); border-radius: 100px; padding: 10px 16px; }
.btn-upgrade { background: transparent; color: var(--red-600); border: 1.5px solid var(--red-600); border-radius: 100px; padding: 10px 16px; }
.btn-upgrade:hover { background: var(--red-100); }
.btn-on-dark { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.3); }
.btn-on-dark:hover { background: rgba(255,255,255,0.08); }

/* ─── BADGES ─────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: var(--radius-sm);
  white-space: nowrap;
}
.badge-success { background: var(--green-100); color: var(--green-500); }
.badge-warning { background: var(--yellow-100); color: var(--warning-text); }
.badge-danger { background: var(--red-100); color: var(--red-600); }
.badge-info { background: var(--blue-100); color: var(--blue-500); }
.badge-neutral { background: var(--gray-100); color: var(--gray-600); }
.badge-teal { background: var(--teal-100); color: var(--teal-700); }
.badge-beta { background: var(--yellow-100); color: var(--warning-text); border-radius: 100px; font-size: 10px; padding: 2px 7px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--teal-600); background: var(--teal-100);
  padding: 3px 10px; border-radius: 100px; font-weight: 500;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal-500); }

/* ─── INPUTS ─────────────────────────────────────────── */
.ds-input-group { margin-bottom: 12px; }
.ds-input-label { font-size: 12px; font-weight: 500; color: var(--gray-700); margin-bottom: 5px; display: block; }
.ds-input-label .req { color: var(--red-600); }
.ds-input-hint { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.ds-input-error { font-size: 11px; color: var(--red-600); margin-top: 4px; }
.ds-input {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  font-family: var(--font); font-size: 13px; color: var(--gray-800);
  background: var(--white); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.ds-input { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; }
.ds-input:focus { border-color: var(--teal-500); box-shadow: var(--focus-ring); }
.ds-input::placeholder { color: var(--gray-300); }
.ds-input.error { border-color: var(--red-600); box-shadow: 0 0 0 3px rgba(218,42,42,0.08); }
.ds-input[readonly], .ds-input.calc { background: var(--gray-100); color: var(--gray-700); }
select.ds-input {
  appearance: none; -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.ds-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-600); cursor: pointer; }
.ds-check input { width: 15px; height: 15px; accent-color: var(--teal-600); flex-shrink: 0; }
.ds-check-list { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ds-radio-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.ds-radio-card { position: relative; }
.ds-radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.ds-radio-card label {
  display: block; height: 100%;
  background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-lg);
  padding: 14px 16px; cursor: pointer; transition: all 0.15s;
}
.ds-radio-card label strong { display: block; font-size: 14px; font-weight: 500; color: var(--gray-800); }
.ds-radio-card label span { display: block; font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.ds-radio-card input:checked + label { border-color: var(--teal-600); background: var(--teal-100); }
.ds-radio-card input:checked + label strong { color: var(--teal-700); }
.ds-radio-card input:focus-visible + label { box-shadow: var(--focus-ring); }

/* campo numérico com unidade (padrão premissas do DS) */
.campo-num { display: flex; align-items: center; gap: 4px; }
.campo-num input {
  width: 110px; text-align: right;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 5px 9px; font-size: 12px; font-family: inherit;
  background: var(--white); color: var(--gray-700); outline: none;
}
.campo-num input:focus { border-color: var(--teal-500); box-shadow: var(--focus-ring); }
.campo-num input[readonly] { background: var(--gray-100); }
.campo-num input.edited { border-color: var(--teal-400); }
.campo-num .u { font-size: 11px; color: var(--gray-400); min-width: 28px; }
.campo-num .u-pre { font-size: 11px; color: var(--gray-400); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* ─── CARDS ──────────────────────────────────────────── */
.card { background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-lg); padding: 18px 22px; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 500; color: var(--gray-900); margin-bottom: 4px; }
.card-desc { font-size: 12px; color: var(--gray-500); margin-bottom: 14px; }
.card-flush { padding: 0; overflow: hidden; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.metric-card { background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-lg); padding: 16px 20px; min-width: 0; }
.metric-card-icon { width: 32px; height: 32px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.metric-card-icon.teal { background: var(--teal-100); color: var(--teal-700); }
.metric-card-icon.blue { background: var(--blue-100); color: var(--blue-500); }
.metric-card-icon.yellow { background: var(--yellow-100); color: var(--warning-text); }
.metric-card-icon.green { background: var(--green-100); color: var(--green-500); }
.metric-card-icon.red { background: var(--red-100); color: var(--red-600); }
.metric-card-value { font-size: 22px; font-weight: 600; color: var(--gray-900); letter-spacing: -0.02em; line-height: 1.1; word-break: break-word; }
.metric-card-label { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.metric-card-sub { font-size: 10px; color: var(--gray-400); margin-top: 2px; }

.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.result-card { background: var(--teal-100); border-radius: var(--radius-md); padding: 12px 14px; text-align: center; }
.result-card .rc-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal-700); margin-bottom: 6px; }
.result-card .rc-value { font-size: 18px; font-weight: 600; color: var(--teal-800); line-height: 1.2; }
.result-card .rc-sub { font-size: 10px; color: var(--teal-600); margin-top: 2px; }
.result-card.big { padding: 18px; }
.result-card.big .rc-value { font-size: 26px; }

/* ─── TABELAS ────────────────────────────────────────── */
.table-wrap { background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-lg); overflow-x: auto; }
.ds-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ds-table thead th {
  background: var(--gray-50); border-bottom: 1px solid var(--gray-150);
  padding: 9px 14px; text-align: left;
  font-size: 11px; font-weight: 600; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
}
.ds-table tbody tr { border-bottom: 1px solid var(--gray-100); transition: background 0.1s; }
.ds-table tbody tr:hover { background: var(--gray-50); }
.ds-table tbody tr:last-child { border-bottom: none; }
.ds-table tbody td { padding: 10px 14px; color: var(--gray-700); vertical-align: middle; }
.ds-table .num-cell, .ds-table th.num-cell { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-table .td-muted { color: var(--gray-400); font-size: 12px; }
.ds-table tfoot td { padding: 10px 14px; font-weight: 600; background: var(--gray-50); border-top: 1px solid var(--gray-150); }

.dre-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dre-table thead th {
  background: var(--gray-800); color: var(--white);
  padding: 8px 12px; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em; text-align: right;
}
.dre-table thead th:first-child { text-align: left; }
.dre-table tbody td { padding: 7px 12px; border-bottom: 1px solid var(--gray-100); text-align: right; color: var(--gray-700); font-variant-numeric: tabular-nums; }
.dre-table tbody td:first-child { text-align: left; }
.dre-table .dre-sub td:first-child { padding-left: 24px; color: var(--gray-500); }
.dre-table .dre-subtotal td { font-weight: 600; color: var(--gray-800); background: var(--gray-50); }
.dre-table .dre-total td { font-weight: 700; color: var(--teal-700); background: var(--teal-100); border-top: 2px solid var(--teal-300); }
.dre-table .dre-negative { color: var(--red-600) !important; }

/* ─── GRÁFICOS ───────────────────────────────────────── */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.chart-card { background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-lg); overflow: hidden; min-width: 0; }
.chart-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--gray-100); }
.chart-card-title { font-size: 13px; font-weight: 500; color: var(--gray-800); }
.chart-card-sub { font-size: 11px; color: var(--gray-400); }
.chart-card-body { padding: 16px 18px; }
.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 380px; }
.chart-box.short { height: 220px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px; }
.chart-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--gray-600); }
.chart-legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.chart-note { font-size: 11px; color: var(--gray-400); margin-top: 10px; line-height: 1.5; }

/* ─── MODAL ──────────────────────────────────────────── */
.ds-modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.4);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.ds-modal-backdrop.open { display: flex; }
.ds-modal {
  background: var(--white); border-radius: var(--radius-xl);
  width: 100%; max-width: 560px; max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.ds-modal.wide { max-width: 860px; }
.ds-modal-header { padding: 18px 20px 14px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ds-modal-title { font-size: 15px; font-weight: 500; color: var(--gray-900); }
.ds-modal-close {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  color: var(--gray-400); cursor: pointer; border-radius: var(--radius-sm);
  background: none; border: none; transition: all 0.15s;
}
.ds-modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.ds-modal-body { padding: 18px 20px; font-size: 13px; color: var(--gray-600); line-height: 1.6; overflow-y: auto; }
.ds-modal-footer { padding: 12px 20px 16px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--gray-100); }

/* ─── TABS ───────────────────────────────────────────── */
.ds-tabs { display: flex; border-bottom: 1px solid var(--gray-150); background: var(--white); padding: 0 32px; overflow-x: auto; }
.ds-tab {
  padding: 12px 16px; font-size: 13px; font-weight: 500; color: var(--gray-500);
  cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.15s; white-space: nowrap;
}
.ds-tab:hover { color: var(--gray-800); }
.ds-tab.active { color: var(--teal-600); border-bottom-color: var(--teal-600); }

/* ─── ACCORDION (padrão premissas) ───────────────────── */
.acc { background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-lg); overflow: hidden; }
.acc + .acc { margin-top: 10px; }
.acc > summary {
  list-style: none; cursor: pointer;
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--gray-50); font-size: 13px; color: var(--gray-600);
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary .acc-title { font-weight: 500; }
.acc > summary .acc-total { font-size: 12px; color: var(--gray-500); font-variant-numeric: tabular-nums; text-align: right; }
.acc > summary::after {
  content: ""; width: 14px; height: 14px; flex-shrink: 0;
  background: no-repeat center/14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23919191' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
.acc[open] > summary { background: var(--teal-100); color: var(--teal-700); border-bottom: 1px solid var(--gray-150); }
.acc[open] > summary .acc-total { color: var(--teal-700); }
.acc[open] > summary::after { transform: rotate(180deg); }
.acc-body { padding: 14px 16px; }

/* ─── TABELA DE ORÇAMENTO (linhas editáveis) ─────────── */
.orc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.orc-table th {
  text-align: left; font-size: 10px; font-weight: 600; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 6px 8px; border-bottom: 1px solid var(--gray-150); white-space: nowrap;
}
.orc-table td { padding: 6px 8px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); vertical-align: middle; }
.orc-table tr:last-child td { border-bottom: none; }
.orc-table .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.orc-table .faixa { font-size: 11px; color: var(--gray-400); white-space: nowrap; font-variant-numeric: tabular-nums; }
.orc-table .item-nome { min-width: 200px; }
.orc-table .item-nome small { display: block; font-size: 10px; color: var(--gray-400); }
.orc-table tr.sub-total td { background: var(--gray-50); font-weight: 600; color: var(--gray-800); }
.orc-table input.nome-extra { width: 100%; min-width: 160px; border: 1px dashed var(--gray-200); border-radius: var(--radius-sm); padding: 5px 8px; font: inherit; font-size: 12px; }

/* ─── AVISOS / CALLOUTS ──────────────────────────────── */
.callout {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--blue-100); color: var(--gray-700);
  border: 1px solid rgba(37,99,235,0.18); border-radius: var(--radius-md);
  padding: 10px 14px; font-size: 12px; line-height: 1.55;
}
.callout strong { color: var(--gray-800); }
.callout-teal { background: var(--teal-100); border-color: var(--teal-300); }
.callout-warning { background: var(--yellow-100); border-color: rgba(245,166,35,0.35); }
.callout-warning strong { color: var(--warning-text); }
.callout-danger { background: var(--red-100); border-color: rgba(218,42,42,0.25); }
.callout ul { margin: 4px 0 0 16px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }

.rl-preliminar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--yellow-100); border-bottom: 1px solid rgba(245,166,35,0.3);
  color: var(--gray-700); font-size: 12px; padding: 8px 48px;
}
.rl-preliminar strong { color: var(--warning-text); }

/* chamada ao fim de cada ferramenta */
.rl-cta {
  background: var(--dark-900); color: var(--white);
  border-radius: var(--radius-xl); padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.rl-cta h3 { font-size: 20px; font-weight: 300; letter-spacing: -0.01em; }
.rl-cta h3 span { color: var(--teal-400); font-weight: 600; }
.rl-cta p { color: rgba(255,255,255,0.65); font-size: 13px; margin-top: 6px; max-width: 620px; }
.rl-cta .rl-cta-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* estados */
.rl-loading { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gray-500); }
.rl-loading::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--gray-200); border-top-color: var(--teal-600);
  animation: rl-spin 0.8s linear infinite;
}
@keyframes rl-spin { to { transform: rotate(360deg); } }
.is-calculando { opacity: 0.6; transition: opacity 0.15s; }
.rl-empty { text-align: center; padding: 32px 16px; color: var(--gray-400); font-size: 13px; }
.rl-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--gray-900); color: var(--white); font-size: 13px;
  padding: 10px 16px; border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  z-index: 600; max-width: calc(100% - 32px);
}
.rl-toast.erro { background: var(--red-600); }

.progress { height: 8px; background: var(--gray-150); border-radius: 100px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--teal-600); width: 0; transition: width 0.4s; }

/* grids utilitários */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.sticky { position: sticky; top: 16px; }

code { font-family: var(--mono); font-size: 11px; background: var(--gray-100); color: var(--teal-700); padding: 1px 5px; border-radius: 3px; }
.ds-divider { height: 1px; background: var(--gray-150); margin: 24px 0; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.text-sm { font-size: 12px; } .text-xs { font-size: 11px; }
.on-dark-muted { color: rgba(255,255,255,0.65); }
.text-muted { color: var(--gray-500); } .text-teal { color: var(--teal-600); } .text-neg { color: var(--red-600); }
.font-mono { font-family: var(--mono); }
.w-full { width: 100%; }
.tabular { font-variant-numeric: tabular-nums; }
.print-only { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ─── SITE (home e páginas institucionais) ───────────── */
.site-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gray-150);
}
.site-nav-inner { max-width: var(--wrap); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
.brand-next { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-next .ds-sidebar-logo { width: 34px; height: 34px; }
.brand-next-name { font-size: 16px; font-weight: 600; color: var(--gray-900); letter-spacing: -0.01em; line-height: 1.1; }
.brand-next-name span { color: var(--teal-600); }
.brand-next-sub { font-size: 10px; color: var(--gray-400); letter-spacing: 0.04em; }
.site-links { display: flex; gap: 20px; margin-left: auto; }
.site-links a { font-size: 13px; color: var(--gray-600); text-decoration: none; font-weight: 500; }
.site-links a:hover { color: var(--teal-600); }
.site-menu-btn { display: none; margin-left: auto; }

.site-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.hero { background: var(--dark-900); color: var(--white); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 480px; height: 480px;
  border-radius: 50%; background: radial-gradient(circle, rgba(1,126,116,0.35), rgba(1,126,116,0) 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding-top: 80px; padding-bottom: 72px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero .ds-page-badge { background: rgba(1,126,116,0.25); color: var(--teal-300); }
.hero h1 { font-size: 44px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.12; }
.hero h1 span { color: var(--teal-400); font-weight: 600; }
.hero p.lead { color: rgba(255,255,255,0.7); font-size: 17px; margin-top: 16px; max-width: 580px; }
.hero-actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.hero-panel { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-xl); padding: 22px; }
.hero-panel h2 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.45); margin-bottom: 12px; }
.hero-panel ul { list-style: none; display: grid; gap: 10px; }
.hero-panel li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: rgba(255,255,255,0.8); }
.hero-panel li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal-400); margin-top: 8px; flex-shrink: 0; }

.site-section { padding: 72px 0; border-bottom: 1px solid var(--gray-150); }
.site-section.white { background: var(--white); }
.site-section.dark { background: var(--dark-900); color: var(--white); border-bottom: none; }
.eyebrow { font-size: 11px; font-weight: 600; color: var(--teal-600); font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.site-section h2 { font-size: 32px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.2; margin-top: 8px; }
.site-section h2 span { color: var(--teal-600); font-weight: 600; }
.site-section.dark h2 span { color: var(--teal-400); }
.site-section .section-lead { color: var(--gray-500); font-size: 16px; margin-top: 12px; max-width: 760px; }
.site-section.dark .section-lead { color: rgba(255,255,255,0.65); }
.section-body { margin-top: 36px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.feature-card { background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-lg); padding: 20px; }
.feature-card .fc-icon { width: 34px; height: 34px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; background: var(--teal-100); color: var(--teal-700); }
.feature-card h3 { font-size: 15px; font-weight: 500; color: var(--gray-900); }
.feature-card p { font-size: 13px; color: var(--gray-500); margin-top: 6px; line-height: 1.55; }
.site-section.dark .feature-card { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.site-section.dark .feature-card h3 { color: var(--white); }
.site-section.dark .feature-card p { color: rgba(255,255,255,0.6); }
.site-section.dark .feature-card .fc-icon { background: rgba(1,126,116,0.25); color: var(--teal-300); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--teal-100); border-radius: var(--radius-lg); padding: 18px; }
.stat strong { display: block; font-size: 28px; font-weight: 600; color: var(--teal-800); letter-spacing: -0.02em; line-height: 1.1; }
.stat span { display: block; font-size: 12px; color: var(--teal-700); margin-top: 4px; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: passo; }
.step { position: relative; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-lg); padding: 20px; }
.step::before { counter-increment: passo; content: "0" counter(passo); font-family: var(--mono); font-size: 11px; color: var(--teal-400); letter-spacing: 0.05em; }
.step h3 { font-size: 15px; font-weight: 500; margin-top: 8px; color: var(--white); }
.step p { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 6px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.checklist { list-style: none; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; font-size: 14px; color: var(--gray-700); }
.checklist li::before {
  content: ""; width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; border-radius: 50%;
  background: var(--teal-100) no-repeat center/11px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23017E74' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
}
.site-section.dark .checklist li { color: rgba(255,255,255,0.8); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tool-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-lg);
  padding: 20px; text-decoration: none; color: inherit; transition: all 0.15s;
}
.tool-card:hover { border-color: var(--teal-300); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tool-card .fc-icon { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.tool-card h3 { font-size: 16px; font-weight: 500; color: var(--gray-900); }
.tool-card p { font-size: 13px; color: var(--gray-500); margin-top: 6px; line-height: 1.55; flex: 1; }
.tool-card .tc-link { font-size: 12px; font-weight: 500; color: var(--teal-600); margin-top: 14px; display: flex; align-items: center; gap: 4px; }
.tool-card .badge-beta { position: absolute; top: 16px; right: 16px; }
.tool-card .tc-sub { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ic-teal { background: var(--teal-100); color: var(--teal-700); }
.ic-blue { background: var(--blue-100); color: var(--blue-500); }
.ic-yellow { background: var(--yellow-100); color: var(--warning-text); }
.ic-green { background: var(--green-100); color: var(--green-500); }
.ic-red { background: var(--red-100); color: var(--red-600); }

.contact-card { background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-xl); padding: 28px; box-shadow: var(--shadow-sm); }
.contact-side h3 { font-size: 18px; font-weight: 500; }
.contact-side p { color: var(--gray-500); font-size: 14px; margin-top: 8px; }
.contact-channels { display: grid; gap: 10px; margin-top: 20px; }
.contact-channel { display: flex; gap: 12px; align-items: center; background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-lg); padding: 12px 14px; text-decoration: none; color: var(--gray-800); font-size: 13px; }
.contact-channel small { display: block; color: var(--gray-400); font-size: 11px; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { font-size: 13px; margin-top: 12px; }
.form-msg.ok { color: var(--green-500); }
.form-msg.erro { color: var(--red-600); }

.site-footer { background: var(--dark-900); color: rgba(255,255,255,0.6); font-size: 12px; }
.site-footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 48px 24px 32px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--white); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.site-footer a { color: rgba(255,255,255,0.75); text-decoration: none; }
.site-footer a:hover { color: var(--teal-300); }
.site-footer p + p { margin-top: 6px; }
.site-footer-legal { border-top: 1px solid rgba(255,255,255,0.08); max-width: var(--wrap); margin: 0 auto; padding: 16px 24px 24px; font-size: 11px; color: rgba(255,255,255,0.4); }
.logos-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logos-row img { height: 28px; width: auto; }
.logos-row .sep { width: 1px; height: 26px; background: var(--gray-200); }
.logo-chip { background: var(--white); border-radius: var(--radius-md); padding: 8px 12px; display: inline-flex; align-items: center; gap: 12px; }
.logo-chip img { height: 22px; width: auto; }
.logo-chip .sep { width: 1px; height: 20px; background: var(--gray-200); }

.prose { max-width: 760px; }
.prose h2 { font-size: 20px; font-weight: 500; margin: 28px 0 8px; }
.prose p, .prose li { font-size: 14px; color: var(--gray-700); }
.prose ul { margin: 8px 0 0 20px; }
.prose p + p { margin-top: 10px; }

/* ─── RESPONSIVO ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .grid-side { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .ds-sidebar { transform: translateX(-100%); transition: transform 0.2s; box-shadow: var(--shadow-lg); }
  body.nav-open .ds-sidebar { transform: translateX(0); }
  body.nav-open .rl-nav-backdrop { display: block; }
  .rl-nav-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 90; }
  .ds-main { margin-left: 0; }
  .rl-topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 80;
    background: var(--dark-900); padding: 10px 16px;
  }
  .rl-topbar .brand { display: flex; align-items: center; gap: 8px; color: var(--white); text-decoration: none; font-weight: 600; font-size: 14px; }
  .rl-topbar button { background: transparent; border: 1px solid rgba(255,255,255,0.25); color: var(--white); border-radius: var(--radius-md); padding: 6px 10px; font-size: 12px; cursor: pointer; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); padding-top: 56px; padding-bottom: 48px; }
  .two-col { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer-inner { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .site-links { display: none; }
  .site-links.open {
    display: grid; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--gray-150);
    padding: 12px 24px 16px; gap: 12px;
  }
  .site-menu-btn { display: inline-flex; }
  .site-nav-inner { position: relative; }
  .site-nav-inner .btn-primary.nav-cta { display: none; }
}
@media (max-width: 720px) {
  .ds-page-header { padding: 28px 16px 22px; }
  .ds-page-header h1 { font-size: 26px; }
  .ds-section { padding: 28px 16px; }
  .ds-tabs { padding: 0 8px; }
  .rl-preliminar { padding: 8px 16px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .chart-grid { grid-template-columns: minmax(0, 1fr); }
  .chart-box { height: 260px; }
  .hero h1 { font-size: 32px; }
  .site-section { padding: 48px 0; }
  .site-section h2 { font-size: 26px; }
  .site-wrap, .site-nav-inner { padding-left: 16px; padding-right: 16px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .contact-card { padding: 20px 16px; }
  .rl-cta { padding: 22px 18px; }
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .orc-table .item-nome { min-width: 150px; }
}

.ds-check-top { align-items: flex-start; }
.ds-check-top input { margin-top: 3px; }
@media (min-width: 961px) { .feature-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ─── Escala do IDH-M (sequencial, um só tom) ────────── */
.idh-scale { position: relative; padding: 34px 0 6px; }
.idh-track { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; }
.idh-track span { display: block; height: 100%; }
.idh-track .f1 { background: var(--teal-100); flex: 50; }
.idh-track .f2 { background: var(--teal-200); flex: 10; }
.idh-track .f3 { background: var(--teal-300); flex: 10; }
.idh-track .f4 { background: var(--teal-500); flex: 10; }
.idh-track .f5 { background: var(--teal-700); flex: 20; }
.idh-labels { display: flex; gap: 2px; margin-top: 6px; font-size: 10px; color: var(--gray-500); }
.idh-labels span { text-align: center; }
.idh-labels .f1 { flex: 50; } .idh-labels .f2, .idh-labels .f3, .idh-labels .f4 { flex: 10; } .idh-labels .f5 { flex: 20; }
.idh-marker { position: absolute; top: 0; transform: translateX(-50%); text-align: center; }
.idh-marker strong { display: block; font-size: 13px; font-weight: 600; color: var(--gray-900); line-height: 1.2; }
.idh-marker::after { content: ""; display: block; width: 2px; height: 22px; margin: 2px auto 0; background: var(--gray-900); border-radius: 1px; }

/* ─── Lista de barras (parte do todo, um só tom) ─────── */
.bar-list { display: grid; gap: 10px; }
.bar-list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: end; font-size: 12px; }
.bar-list-row .bl-trilho { grid-column: 1 / -1; }
.bar-list-row .bl-nome { color: var(--gray-700); }
.bar-list-row .bl-trilho { order: 3; height: 10px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.bar-list-row .bl-barra { height: 100%; background: var(--teal-600); border-radius: 0 4px 4px 0; min-width: 2px; }
.bar-list-row .bl-valor { text-align: right; font-variant-numeric: tabular-nums; color: var(--gray-800); white-space: nowrap; }
.bar-list-row .bl-valor small { color: var(--gray-400); margin-left: 6px; }

:is(.grid-2, .grid-3, .chart-grid, .grid-side, .metric-grid, .result-grid) > .card { margin-top: 0; }
.rl-preliminar > span:last-child { flex: 1; min-width: 240px; }

/* referências de aproveitamento (loteamento) */
.aprov-lista { display: grid; gap: 12px; }
.aprov-item { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 14px; align-items: center; border: 1px solid var(--gray-150); border-radius: var(--radius-lg); padding: 10px 14px; }
.aprov-item img { width: 90px; height: auto; border-radius: var(--radius-md); background: var(--gray-50); }
.aprov-item strong { font-size: 14px; color: var(--teal-700); }
.aprov-item ul { margin: 4px 0 0 16px; font-size: 12px; color: var(--gray-600); }
.mb-16 { margin-bottom: 16px; }
body.sem-detalhe-impressao #secoes { }
@media print { body.sem-detalhe-impressao .orc-detalhe { display: none !important; } }
.acc > summary .acc-total { margin-left: auto; }
.result-card .rc-value { white-space: nowrap; }
.result-card.big .rc-value { font-size: 22px; }

/* Triagem Ambiental */
.particao { display: flex; gap: 2px; height: 16px; border-radius: 4px; overflow: hidden; background: var(--gray-100); }
.particao span { display: block; height: 100%; min-width: 2px; }
.mapa-fig { background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-lg); overflow: hidden; break-inside: avoid; }
.mapa-fig img { width: 100%; height: auto; background: var(--gray-100); }
.mapa-fig figcaption { padding: 10px 14px; font-size: 12px; color: var(--gray-600); line-height: 1.5; }
.mapa-fig figcaption strong { display: block; color: var(--gray-800); font-size: 13px; font-weight: 500; }
ul.card { list-style: none; }
ul.card li { font-size: 13px; color: var(--gray-700); display: flex; gap: 8px; }
ul.card li::before { content: "•"; color: var(--warning-text); }
.mapa-fig img { max-height: 560px; object-fit: contain; }

/* ─── Área do administrador (/admin) ─────────────────────────────── */
.adm { background: var(--gray-50); }
.adm-topo { background: var(--dark-900); color: var(--white); }
.adm-topo-inner { max-width: var(--wrap); margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.adm-marca { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; }
.adm-marca strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.2; }
.adm-marca small { display: block; font-size: 11px; color: var(--teal-300); letter-spacing: 0.05em; text-transform: uppercase; }
.adm-marca.escura { color: var(--gray-900); }
.adm-marca.escura small { color: var(--teal-600); }
.adm-usuario { display: flex; align-items: center; gap: 12px; font-size: 13px; color: rgba(255,255,255,0.75); }
.adm .ds-tabs { position: sticky; top: 0; z-index: 20; padding: 0 max(24px, calc((100% - var(--wrap)) / 2 + 24px)); }
.adm-main { max-width: var(--wrap); margin: 0 auto; padding: 28px 24px 72px; }
.adm-titulo { font-size: 24px; font-weight: 300; letter-spacing: -0.01em; color: var(--gray-900); margin-bottom: 6px; }
.adm-titulo span { color: var(--teal-600); font-weight: 600; }
.adm-sub { color: var(--gray-500); font-size: 14px; margin-bottom: 20px; max-width: 780px; }
.adm-main .card + .card { margin-top: 16px; }
.adm-card-cab { padding: 18px 22px 4px; }
.card-flush .table-wrap { border: none; border-top: 1px solid var(--gray-150); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.adm-sufixo { position: relative; }
.adm-sufixo .ds-input { padding-right: 30px; }
.adm-sufixo::after { content: attr(data-sufixo); position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 13px; pointer-events: none; }
.adm-grid-uf { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 0 10px; }
.adm-grid-uf .ds-input { padding-left: 8px; padding-right: 8px; }
.adm-mix .ds-input { padding: 6px 8px; text-align: right; min-width: 72px; }
.adm-mix td { white-space: nowrap; }
.soma-ok { color: var(--green-500); }
.soma-erro { color: var(--red-600); font-weight: 600; }
.adm-acoes { position: sticky; bottom: 0; z-index: 10; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 18px 0 14px;
  background: linear-gradient(to bottom, rgba(248,248,248,0), var(--gray-50) 35%); }
.adm-delta { font-size: 12px; color: var(--gray-400); white-space: nowrap; }
.adm-delta.pos { color: var(--green-500); }
.adm-delta.neg { color: var(--red-600); }
.adm-msg-lista { margin: 8px 0 0 18px; font-size: 13px; color: var(--gray-700); }
.adm-msg-lista li + li { margin-top: 3px; }
.adm-detalhe td { background: var(--gray-50); }
.adm-valores { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 12px; color: var(--gray-600); }
.adm-valores strong { color: var(--gray-900); font-weight: 600; }
.adm-dados code, .adm-main p code { font-family: var(--mono); font-size: 12px; background: var(--gray-100); padding: 1px 5px; border-radius: var(--radius-sm); }
.adm-dados .callout ul { margin-top: 6px; font-size: 12px; }
.adm-busca { max-width: 460px; flex: 1; }
.adm-nowrap { white-space: nowrap; }
.adm-dados { align-items: start; }
.adm-dados .card + .card { margin-top: 0; }
.adm-mensagem { max-width: 320px; white-space: pre-wrap; font-size: 12px; color: var(--gray-600); }
.adm-pag { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--gray-500); }
.adm-form-estreito { max-width: 420px; }
.adm-login-body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px;
  background: radial-gradient(ellipse at 50% 0%, var(--dark-700), var(--dark-900) 70%); }
.adm-login { width: 100%; max-width: 400px; text-align: center; }
.adm-login .card { padding: 32px; box-shadow: var(--shadow-lg); text-align: left; }
.adm-login h1 { font-size: 24px; font-weight: 300; color: var(--gray-900); margin: 22px 0 4px; }
.adm-login h1 span { color: var(--teal-600); font-weight: 600; }
.adm-voltar { display: inline-block; margin-top: 18px; font-size: 13px; color: rgba(255,255,255,0.7); text-decoration: none; }
.adm-voltar:hover { color: var(--white); }
@media (max-width: 720px) {
  .adm-topo-inner, .adm-main { padding-left: 16px; padding-right: 16px; }
  .adm .ds-tabs { padding: 0 16px; }
  .adm-usuario span { display: none; }
  .adm-login .card { padding: 24px 20px; }
}

/* ─── Revelar ao rolar (só com JS ativo e sem "reduzir movimento") ── */
.js-revelar .revelar { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js-revelar .revelar.visivel { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-revelar .revelar { opacity: 1; transform: none; transition: none; }
}

/* ─── Página do RExSoft (/rexsoft/) ─────────────────────────────── */
@media (min-width: 961px) { .rs-hero .hero-inner { padding-top: 64px; padding-bottom: 56px; } }
.rs-logo { display: block; width: 220px; height: auto; margin-bottom: 22px; }
.rs-hero-nota { margin-top: 16px; font-size: 13px; color: rgba(255,255,255,0.55); }
.rs-hero-visual { display: flex; justify-content: center; }
.rs-hero-visual img { width: min(100%, 440px); height: auto; filter: drop-shadow(0 24px 48px rgba(0,0,0,0.35)); }
.rs-demo { margin-top: 32px; background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); overflow: hidden; }
.rs-demo-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 14px; }
.rs-demo-nome { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 500; color: var(--gray-900); flex-wrap: wrap; }
.rs-demo-nome img { width: 110px; height: auto; }
.rs-demo-sub { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.rs-perspectivas { padding: 0 24px; }
.rs-corpo { padding: 18px 24px 22px; }
.rs-persp-nota { font-size: 13px; color: var(--gray-500); margin-bottom: 14px; min-height: 20px; }
.rs-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rs-kpi { background: var(--teal-100); border-radius: var(--radius-md); padding: 12px 14px; text-align: center; }
.rs-kpi-titulo { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal-700); margin-bottom: 8px; }
.rs-kpi-valores { display: flex; justify-content: space-around; gap: 8px; flex-wrap: wrap; }
.rs-kpi-valores strong { display: block; font-size: 18px; font-weight: 600; color: var(--teal-800); font-variant-numeric: tabular-nums; line-height: 1.25; }
.rs-kpi-valores span { display: block; font-size: 10px; color: var(--teal-600); }
.rs-controles { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 22px 0 16px; }
.rs-seg { display: inline-flex; background: var(--gray-100); border-radius: var(--radius-md); padding: 3px; gap: 2px; }
.rs-seg[hidden] { display: none; }
.rs-seg button { border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--gray-600); padding: 6px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.rs-seg button:hover { color: var(--gray-900); }
.rs-seg button.active { background: var(--white); color: var(--teal-700); font-weight: 500; box-shadow: var(--shadow-sm); }
.rs-seg button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.rs-taxa { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--gray-600); margin-left: auto; min-width: 220px; }
.rs-taxa strong { color: var(--teal-700); }
.rs-taxa input[type=range] { accent-color: var(--teal-600); width: 100%; }
.rs-demo-rodape { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 24px; background: var(--teal-100); border-top: 1px solid var(--teal-200); }
.rs-demo-rodape p { font-size: 14px; color: var(--teal-800); max-width: 640px; }
.rs-recursos { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.feature-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rs-notebook img { width: 100%; height: auto; }
.rs-notebook figcaption { font-size: 13px; color: var(--gray-500); text-align: center; margin-top: 10px; }
.rs-depoimentos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rs-depo { background: var(--gray-50); border: 1px solid var(--gray-150); border-radius: var(--radius-lg); padding: 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.rs-depo blockquote { font-size: 16px; line-height: 1.5; color: var(--gray-800); }
.rs-depo blockquote::before { content: ""; display: block; width: 28px; height: 3px; background: var(--teal-500); border-radius: 2px; margin-bottom: 14px; }
.rs-depo figcaption { font-size: 12px; color: var(--gray-500); }
.rs-depo figcaption strong { display: block; font-size: 14px; color: var(--gray-900); font-weight: 600; }
.rs-faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.rs-faq .acc-body { font-size: 14px; color: var(--gray-600); line-height: 1.6; }
.rs-final-inner { display: flex; align-items: center; gap: 36px; }
.rs-final-inner img { width: 150px; height: auto; flex-shrink: 0; }
@media (max-width: 1100px) { .rs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .rs-recursos, .rs-faq { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .rs-depoimentos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-hero-visual img { width: min(70%, 320px); }
  .rs-taxa { margin-left: 0; }
}
@media (max-width: 720px) {
  .rs-demo-cab, .rs-corpo, .rs-demo-rodape { padding-left: 16px; padding-right: 16px; }
  .rs-perspectivas { padding: 0 8px; }
  .rs-kpis, .feature-grid.cols-2, .rs-depoimentos { grid-template-columns: minmax(0, 1fr); }
  .rs-seg { width: 100%; overflow-x: auto; }
  .rs-seg button { flex: 1; padding: 6px 8px; font-size: 12px; }
  .rs-taxa { width: 100%; }
  .rs-final-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .rs-final-inner img { width: 96px; }
}
/* âncoras não ficam escondidas sob o cabeçalho fixo */
section[id] { scroll-margin-top: 72px; }

/* ─── Home: hero com foto, números, sócios, clientes, depoimentos, galeria, livros ─── */
.hero-fundo { position: absolute; inset: 0; z-index: 0; }
.hero-fundo img { width: 100%; height: 100%; object-fit: cover; }
.hero-fundo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(25,44,43,0.97) 0%, rgba(25,44,43,0.88) 42%, rgba(25,44,43,0.62) 100%); }
.hero-foto .hero-inner { min-height: 540px; }
.hero-panel a { color: var(--teal-300); }
.numeros { background: var(--white); border-bottom: 1px solid var(--gray-150); padding: 28px 0; }
.quem-somos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.quem-somos-sub { margin-top: 14px; font-size: 13px; color: var(--gray-500); }
.quem-somos-foto img { width: 100%; height: auto; border-radius: var(--radius-xl); box-shadow: var(--shadow-md); display: block; }
.quem-somos-foto figcaption { font-size: 12px; color: var(--gray-500); margin-top: 8px; }
.socios { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.socio { display: block; background: var(--white); border: 1px solid var(--gray-150); border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; color: inherit; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.socio img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 6; object-fit: cover; filter: grayscale(0.2); transition: filter 0.3s ease; }
.socio:hover, .socio:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-md); outline: none; }
.socio:hover img, .socio:focus-visible img { filter: none; }
.socio-nome { display: block; padding: 12px 14px 0; font-size: 14px; font-weight: 500; color: var(--gray-900); }
.socio-link { display: flex; align-items: center; gap: 4px; padding: 2px 14px 14px; font-size: 12px; color: var(--teal-600); }
.clientes { background: var(--white); border-bottom: 1px solid var(--gray-150); padding: 36px 0 40px; overflow: hidden; }
.clientes-titulo { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-400); text-align: center; margin-bottom: 22px; }
.clientes-faixa { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.clientes-lista { display: flex; align-items: center; width: max-content; list-style: none; animation: clientes-rolar 48s linear infinite; }
.clientes-lista li { padding: 0 30px; flex-shrink: 0; }
.clientes-faixa:hover .clientes-lista { animation-play-state: paused; }
.clientes-lista img { display: block; height: 40px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1); opacity: 0.55; transition: filter 0.3s ease, opacity 0.3s ease; }
.clientes-lista li:hover img { filter: none; opacity: 1; }
@keyframes clientes-rolar { to { transform: translateX(-50%); } }
.depoimentos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.depo { background: var(--gray-50); border: 1px solid var(--gray-150); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.depo blockquote { font-size: 17px; font-weight: 300; line-height: 1.5; color: var(--gray-800); }
.depo blockquote::before { content: ""; display: block; width: 28px; height: 3px; background: var(--red-600); border-radius: 2px; margin-bottom: 14px; }
.depo figcaption { font-size: 12px; color: var(--gray-500); }
.depo figcaption strong { display: block; font-size: 14px; font-weight: 600; color: var(--gray-900); }
.video { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--dark-900); aspect-ratio: 16 / 9; }
.video-capa { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: pointer; }
.video-capa img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.video-capa::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.08) 60%); }
.video-capa:hover img { transform: scale(1.04); }
.video-capa:focus-visible { outline: 3px solid var(--teal-400); outline-offset: -3px; }
.video-play { position: absolute; left: 50%; top: 50%; z-index: 1; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%;
  background: var(--red-600); box-shadow: 0 8px 24px rgba(0,0,0,0.35); transition: transform 0.2s ease; }
.video-play::after { content: ""; position: absolute; left: 26px; top: 21px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent var(--white); }
.video-capa:hover .video-play { transform: scale(1.08); }
.video-rotulo { position: absolute; left: 16px; bottom: 14px; z-index: 1; color: var(--white); font-size: 13px; font-weight: 500; text-align: left; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.galeria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 210px; grid-auto-flow: dense; gap: 12px; }
.galeria-item { position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--gray-100); }
.galeria-item.larga { grid-column: span 2; }
.galeria-item.alta { grid-row: span 2; }
.galeria-item.video { aspect-ratio: auto; }
.galeria-item > button { display: block; width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; }
.galeria-item > button:focus-visible { outline: 3px solid var(--teal-500); outline-offset: -3px; }
.galeria-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.galeria-item:hover img { transform: scale(1.05); }
.galeria-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; color: var(--white); font-size: 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.62)); opacity: 0; transform: translateY(6px); transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: none; }
.galeria-item:hover figcaption, .galeria-item:focus-within figcaption { opacity: 1; transform: none; }
@media (hover: none) { .galeria-item figcaption { opacity: 1; transform: none; } }
.galeria-modal .ds-modal { max-width: 1100px; width: calc(100% - 32px); }
.galeria-modal .ds-modal-body img { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; border-radius: var(--radius-md); background: var(--gray-100); }
.galeria-nav { display: flex; justify-content: space-between; margin-top: 10px; }
.livros { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.livros-foto img { display: block; width: 100%; height: auto; max-height: 580px; object-fit: cover; border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.livros-capas { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 26px; }
.livros-capas figure { width: 150px; }
.livros-capas img { display: block; width: 100%; height: auto; border-radius: 4px; box-shadow: 0 12px 28px rgba(0,0,0,0.18); transition: transform 0.3s ease; }
.livros-capas figure:hover img { transform: translateY(-4px) rotate(-1deg); }
.livros-capas figcaption { margin-top: 10px; font-size: 13px; font-weight: 500; color: var(--gray-900); line-height: 1.35; }
.livros-capas figcaption small { display: block; font-size: 12px; font-weight: 400; color: var(--gray-500); margin-top: 2px; }
.rexsoft-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.rexsoft-previa { position: relative; display: block; text-decoration: none; }
.rexsoft-previa img { display: block; width: 100%; height: auto; transition: transform 0.4s ease; }
.rexsoft-previa:hover img { transform: translateY(-4px); }
.rexsoft-previa-selo { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); background: var(--teal-600); color: var(--white);
  font-size: 12px; padding: 7px 14px; border-radius: 999px; white-space: nowrap; box-shadow: var(--shadow-md); }
@media (max-width: 1100px) { .socios { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .quem-somos, .livros, .rexsoft-intro { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .depoimentos { grid-template-columns: minmax(0, 1fr); }
  .hero-foto .hero-inner { min-height: 0; }
  .livros-foto { max-width: 420px; }
}
@media (max-width: 720px) {
  .socios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .galeria { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; }
  .clientes-lista img { height: 32px; }
  .clientes-lista li { padding: 0 20px; }
  .rexsoft-previa-selo { font-size: 11px; white-space: normal; text-align: center; width: max-content; max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  .clientes-lista { animation: none; flex-wrap: wrap; justify-content: center; width: auto; row-gap: 20px; }
  .clientes-lista li[aria-hidden="true"] { display: none; }
}
.galeria .galeria-item.video { grid-column: 1 / -1; grid-row: span 2; }
.clientes-lista img { max-width: 170px; }
@media (max-width: 720px) { .clientes-lista img { transform: scale(0.8); } }
