:root {
  --bg: #0c0e13;
  --surface: #13161e;
  --surface2: #1b1f2b;
  --border: #252933;
  --accent: #e8382f;
  --accent2: #ff6b35;
  --text: #e2e4ea;
  --muted: #9ca3af;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --nav-h: 70px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
}

body.modo-homolog {
  background: #100e00;
  --bg: #100e00;
  --surface: #1a1700;
  --surface2: #221f00;
  --border: #2e2900;
}

body.modo-homolog nav {
  border-bottom-color: rgba(245, 158, 11, 0.4);
}

.homolog-banner {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(245, 158, 11, 0.12);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 99;
}

body.modo-homolog .page {
  padding-top: calc(var(--nav-h) + 32px + 28px);
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  margin-right: 32px;
  white-space: nowrap;
}

.nav-brand-icon {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  flex-shrink: 0;
  overflow: visible;
}

.nav-brand-icon img,
.login-logo-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-brand-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-brand-name span {
  color: var(--accent);
}

.nav-brand-sub {
  font-size: 9px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface2);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
}

.nav-dropdown-toggle:hover {
  color: var(--text);
  background: var(--surface2);
}

.nav-dropdown-toggle.active {
  color: var(--text);
  background: var(--surface2);
}

.nav-dropdown-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}

.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--text);
  background: var(--surface2);
}

.nav-dropdown.open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 160px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 200;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.1s, color 0.1s;
}

.nav-dropdown-menu a:hover {
  background: var(--border);
  color: var(--text);
}

.nav-spacer {
  flex: 1;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-theme-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 2px;
}

.nav-theme-btn {
  min-width: 34px;
  justify-content: center;
  padding: 5px 9px;
}

.nav-user-badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px 4px 10px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-user-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.nav-logout {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
  background: none;
  cursor: pointer;
}

.nav-user-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}

.nav-user-link:hover {
  color: var(--accent2);
  border-color: var(--accent2);
}

.nav-logout:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.nav-inline-form {
  display: inline;
  margin: 0;
}

.page {
  padding-top: calc(var(--nav-h) + 32px);
  padding-bottom: 48px;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.page-header p {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label,
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 56, 47, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  cursor: pointer;
}

.input-mono {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.88;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232, 56, 47, 0.3);
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface2);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn[disabled],
.btn.is-loading {
  opacity: 0.66;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 3px solid;
}

.alert-success {
  background: rgba(34, 197, 94, 0.08);
  border-color: var(--success);
  color: #4ade80;
}

.alert-error {
  background: rgba(239, 68, 68, 0.08);
  border-color: var(--danger);
  color: #f87171;
}

.alert-info {
  background: rgba(59, 130, 246, 0.08);
  border-color: #3b82f6;
  color: #93c5fd;
}

.popup-feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.popup-feedback-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: popupIn 0.16s ease;
  text-align: center;
}

.popup-feedback-card.sucesso {
  border-color: rgba(34, 197, 94, 0.55);
}

.popup-feedback-card.erro {
  border-color: rgba(239, 68, 68, 0.55);
}

.popup-feedback-icone {
  font-size: 38px;
  margin-bottom: 10px;
}

.popup-feedback-titulo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 8px;
}

.popup-feedback-msg {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.popup-feedback-btn {
  width: 100%;
  justify-content: center;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--surface2);
  padding: 11px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.mono {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--accent2);
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
}

.badge-admin {
  background: rgba(232, 56, 47, 0.15);
  color: #f87171;
}

.badge-user {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.badge-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.badge-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.badge-admin-mini {
  padding: 1px 6px;
  font-size: 10px;
}

.badge-large {
  font-size: 14px;
  padding: 4px 12px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  font-size: 13px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}

.pagination a {
  color: var(--muted);
}

.pagination a:hover {
  background: var(--surface2);
  color: var(--text);
}

.pagination span {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.flex {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mt-4 {
  margin-top: 16px;
}

.mt-6 {
  margin-top: 24px;
}

.text-muted {
  color: var(--muted);
  font-size: 12px;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 20% 60%, rgba(232, 56, 47, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 30%, rgba(255, 107, 53, 0.04) 0%, transparent 70%);
}

.login-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
}

.login-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.login-logo-icon {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
}

.login-logo-text {
  line-height: 1.2;
}

.login-logo-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-logo-name span {
  color: var(--accent);
}

.login-logo-tagline {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.login-sub {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 28px;
}

body.tema-claro {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface2: #e8eaed;
  --border: #d1d5db;
  --text: #111827;
  --muted: #4b5563;
}

body.tema-claro nav {
  background: #ffffff;
  border-bottom-color: #d1d5db;
}

body.tema-claro .nav-theme-btn {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

body.tema-claro .form-control {
  background: #f9fafb;
  color: #111827;
}

body.tema-claro tbody tr:hover td {
  background: rgba(0, 0, 0, 0.03);
}

body.tema-claro .login-wrap {
  background: var(--bg);
}

body.modo-homolog.tema-claro {
  --bg: #fffaf0;
  --surface: #fff7e6;
  --surface2: #ffefcc;
  --border: #f2d7a6;
  --text: #3d2b1f;
  --muted: #725736;
  background: var(--bg);
}

body.modo-homolog.tema-claro nav {
  background: var(--surface);
  border-bottom-color: #e7bf7a;
}

body.modo-homolog.tema-claro .homolog-banner {
  background: rgba(245, 158, 11, 0.18);
  border-bottom: 1px solid rgba(180, 83, 9, 0.35);
  color: #92400e;
}

body.modo-homolog.tema-claro .form-control {
  background: #fffdf7;
  color: var(--text);
  border-color: var(--border);
}

body.modo-homolog.tema-claro tbody tr:hover td {
  background: rgba(146, 64, 14, 0.06);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.stat-value.accent {
  color: var(--accent);
}

.stat-value-sm {
  font-size: 20px;
  padding-top: 4px;
}

.theme-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-switch-label {
  font-size: 12px;
  color: var(--muted);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.tools-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: start;
}

.tool-card-link {
  text-decoration: none;
  display: block;
  height: 100%;
  border-radius: 12px;
}

.tool-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.15s;
  cursor: pointer;
}

.tool-card-link:hover .tool-card,
.tool-card-link:focus-visible .tool-card {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tool-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.tool-card-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
}

.tool-card-desc {
  color: var(--muted);
  font-size: 13px;
}

.max-w-420 {
  max-width: 420px;
}

.max-w-480 {
  max-width: 480px;
}

.max-w-520 {
  max-width: 520px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.toolbar-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.note {
  margin-top: 4px;
}

.panel-muted {
  background: var(--surface2);
  border-radius: 8px;
  padding: 12px;
}

.panel-muted.center {
  text-align: center;
}

.panel-success {
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.panel-neutral {
  border: 1px solid rgba(107, 114, 128, 0.2);
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.15s ease;
}

.modal-icon {
  font-size: 36px;
  text-align: center;
  margin-bottom: 12px;
}

.modal-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  color: var(--text);
  margin-bottom: 8px;
}

.modal-message {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-close-btn {
  width: 100%;
  justify-content: center;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ───────── Guia "Como funciona" ───────── */
.modal-card-wide {
  max-width: 640px;
  padding: 24px 24px 22px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  text-align: left;
}

.modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-x:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.guia-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.guia-icon { font-size: 34px; line-height: 1; }
.guia-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 4px;
}
.guia-resumo { color: var(--muted); font-size: 13px; line-height: 1.5; }

.guia-section { margin-bottom: 16px; }
.guia-section h4 {
  font-size: 13px;
  letter-spacing: 0.3px;
  color: var(--text);
  margin: 0 0 8px;
  font-weight: 600;
}
.guia-section ul,
.guia-section ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.guia-section ul li,
.guia-section ol li { margin-bottom: 4px; }
.guia-section p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; }

.guia-exemplo-entrada {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.guia-kv { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.guia-kv .guia-k { color: var(--text); font-weight: 600; margin-right: 4px; }
.guia-kv .guia-v { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.guia-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.guia-table th,
.guia-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.guia-table th {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  text-align: left;
  font-weight: 600;
}
.guia-table tr:last-child td { border-bottom: 0; }
.guia-table td:first-child { color: var(--muted); }
.guia-table td:last-child { color: var(--success); }

/* Botão "Como funciona" / "Guia rápido" no topo das telas */
.btn-guia {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.btn-guia:hover {
  background: rgba(59, 130, 246, 0.22);
  color: #bfdbfe;
}

/* Página de guia consolidado */
.guia-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.guia-accordion { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.guia-accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.03);
  font-weight: 600;
  color: var(--text);
}
.guia-accordion summary::-webkit-details-marker { display: none; }
.guia-accordion summary::after {
  content: '▸';
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.guia-accordion[open] summary::after { transform: rotate(90deg); }
.guia-accordion .guia-ico { font-size: 20px; }
.guia-accordion .guia-sub { color: var(--muted); font-weight: 400; font-size: 12.5px; margin-left: 6px; }
.guia-accordion-body { padding: 16px 18px 18px; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid rgba(232, 56, 47, 0.9);
  outline-offset: 2px;
}

.is-submitting {
  cursor: progress;
}

@media (max-width: 900px) {
  .grid-2,
  .tools-grid-compact {
    grid-template-columns: 1fr;
  }

  .flex-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  nav {
    padding: 0 12px;
  }

  .nav-brand {
    margin-right: 16px;
  }
}

/* ── Utilitários extraídos de inline styles ── */
.clr-accent2 { color: var(--accent2); }
.clr-muted { color: var(--muted); }
.clr-success { color: var(--success); }
.clr-danger { color: var(--danger); }
.clr-warning { color: var(--warning); }
.clr-text { color: var(--text); }
.m-0 { margin: 0; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.d-none { display: none; }
.d-flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.align-center { align-items: center; }
.font-mono { font-family: 'DM Mono', monospace; }
.font-heading { font-size: 22px; font-weight: 700; font-family: 'Syne', sans-serif; }
.text-center { text-align: center; }
.sticky-top { position: sticky; top: 0; z-index: 1; }
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.tbl-compact { width: 100%; border-collapse: collapse; font-size: 12px; }
.btn-flex { padding: 7px 12px; cursor: pointer; flex: 1; }
.empty-msg { color: var(--muted); font-size: 13px; padding: 20px 0; text-align: center; }
.stat-card { background: var(--surface2); border-radius: 8px; padding: 12px; text-align: center; }
.stat-card-success { background: var(--surface2); border-radius: 8px; padding: 12px; text-align: center; border: 1px solid rgba(34,197,94,.2); }
.stat-card-warning { background: var(--surface2); border-radius: 8px; padding: 12px; text-align: center; border: 1px solid rgba(245,158,11,.2); }
.stat-card-muted { background: var(--surface2); border-radius: 8px; padding: 12px; text-align: center; border: 1px solid rgba(107,114,128,.2); }
.scroll-box { max-height: 340px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; }
.mb-4 { margin-bottom: 4px; }
.nowrap { white-space: nowrap; }
.font-mono-12 { font-family: 'DM Mono', monospace; font-size: 12px; }
.grid-4col { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }
