/* Gerencial Visual — sandbox design tokens (local only) */
:root,
html.gv-theme[data-theme="light"],
html.gv-theme:not([data-theme="dark"]) {
  --gv-bg: #f4f5f7;
  --gv-surface: #ffffff;
  --gv-surface-muted: #f8f9fb;
  --gv-border: #e4e6eb;
  --gv-border-strong: #d0d4dc;
  --gv-text: #1a1d23;
  --gv-text-secondary: #5c6370;
  --gv-text-muted: #8b929e;
  --gv-accent: #2c3e5a;
  --gv-accent-soft: #eef1f5;
  --gv-accent-hover: #243348;
  --gv-on-accent: #ffffff;
  --gv-status-pos: #3d7a55;
  --gv-status-pos-bg: #eef6f1;
  --gv-status-neg: #a33b3b;
  --gv-status-neg-bg: #f8efef;
  --gv-status-warn: #9a6b2f;
  --gv-status-warn-bg: #f7f1e8;
  --gv-sandbox: #6b7280;
  --gv-sandbox-bg: #eceef2;
  --gv-radius: 5px;
  --gv-radius-sm: 4px;
  --gv-shadow: none;
  --gv-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gv-font-size: 13.5px;
  --gv-row-h: 36px;
  --gv-space-1: 4px;
  --gv-space-2: 8px;
  --gv-space-3: 12px;
  --gv-space-4: 16px;
  --gv-chart-1: #2c3e5a;
  --gv-chart-2: #8b929e;
  --gv-chart-grid: #eceef2;
  --gv-overlay: rgba(26, 29, 35, 0.35);
}

html.gv-theme[data-theme="dark"] {
  --gv-bg: #0f1217;
  --gv-surface: #171b22;
  --gv-surface-muted: #1e242e;
  --gv-border: #2a313c;
  --gv-border-strong: #3a4352;
  --gv-text: #e8eaed;
  --gv-text-secondary: #b0b8c6;
  --gv-text-muted: #8a93a3;
  /* Azul e verde um pouco mais fortes (ainda sóbrios) */
  --gv-accent: #5b84bc;
  --gv-accent-soft: #1c2838;
  --gv-accent-hover: #6d94c8;
  --gv-on-accent: #ffffff;
  --gv-status-pos: #4ecf80;
  --gv-status-pos-bg: #163024;
  --gv-status-neg: #e07070;
  --gv-status-neg-bg: #2e1c1c;
  --gv-status-warn: #d4a85a;
  --gv-status-warn-bg: #2c2416;
  --gv-sandbox: #8b929e;
  --gv-sandbox-bg: #171b22;
  --gv-chart-1: #5b84bc;
  --gv-chart-2: #7aa08a;
  --gv-chart-grid: #2a313c;
  --gv-overlay: rgba(0, 0, 0, 0.55);
}

html.gv-theme,
html.gv-theme body {
  background: var(--gv-bg) !important;
  color: var(--gv-text) !important;
  font-family: var(--gv-font) !important;
  font-size: var(--gv-font-size) !important;
}

.gv-theme .font-outfit,
.gv-theme .font-sans {
  font-family: var(--gv-font) !important;
}

/* --- Surfaces: dark → light --- */
.gv-theme [class*="bg-slate-950"],
.gv-theme [class*="bg-[#080d16]"],
.gv-theme [class*="bg-[#060a12]"],
.gv-theme .bg-slate-900,
.gv-theme [class*="bg-slate-900"] {
  background-color: var(--gv-surface) !important;
  background-image: none !important;
}

.gv-theme [class*="bg-slate-800"] {
  background-color: var(--gv-surface-muted) !important;
  background-image: none !important;
}

.gv-theme .glass-panel,
.gv-theme .glass-card {
  background: var(--gv-surface) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid var(--gv-border) !important;
  border-radius: var(--gv-radius) !important;
  box-shadow: var(--gv-shadow) !important;
}

/* Decorative ambient / glow blobs */
.gv-theme .blur-\[120px\],
.gv-theme .blur-\[150px\],
.gv-theme [class*="blur-[120"],
.gv-theme [class*="blur-[150"] {
  display: none !important;
}

/* Kill rainbow top bars & decorative gradients on cards */
.gv-theme .glass-card > .absolute.top-0,
.gv-theme .glass-panel > .absolute.top-0,
.gv-theme [class*="bg-gradient-to-"] {
  background-image: none !important;
}
.gv-theme .glass-card > div.absolute.top-0.left-0.w-full.h-1,
.gv-theme .absolute.top-0.left-0.w-full.h-1 {
  display: none !important;
}

/* Borders */
.gv-theme [class*="border-slate-"],
.gv-theme [class*="border-cobal-"],
.gv-theme [class*="border-indigo-"],
.gv-theme [class*="border-rose-"],
.gv-theme [class*="border-amber-"],
.gv-theme [class*="border-emerald-"],
.gv-theme [class*="border-sky-"],
.gv-theme [class*="border-cyan-"],
.gv-theme [class*="border-purple-"],
.gv-theme [class*="border-yellow-"],
.gv-theme [class*="border-orange-"] {
  border-color: var(--gv-border) !important;
}

/* Text hierarchy — NÃO remapar text-white em botões/accent (contraste) */
.gv-theme .text-slate-200,
.gv-theme .text-slate-300 {
  color: var(--gv-text) !important;
}
.gv-theme .text-slate-400,
.gv-theme .text-slate-500 {
  color: var(--gv-text-secondary) !important;
}
.gv-theme .text-slate-600 {
  color: var(--gv-text-muted) !important;
}
/* Valores/títulos: text-white do tema antigo → texto do tema
   (não aplicar em chips/botões com fundo accent/cobal) */
.gv-theme .glass-card .text-white:not([class*="bg-cobal"]):not([class*="bg-[var(--gv-accent)"]):not([class*="bg-cyan-"]),
.gv-theme .glass-panel .text-white:not([class*="bg-cobal"]):not([class*="bg-[var(--gv-accent)"]):not([class*="bg-cyan-"]),
.gv-theme h2.text-white,
.gv-theme h3.text-white,
.gv-theme td.text-white,
.gv-theme span.text-white:not(.gv-on-accent) {
  color: var(--gv-text) !important;
}
.gv-theme .glass-panel a[class*="bg-cobal"],
.gv-theme .glass-panel a[class*="bg-[var(--gv-accent)]"],
.gv-theme .glass-panel a[class*="bg-cyan-7"],
.gv-theme .glass-card a[class*="bg-cobal"],
.gv-theme .glass-card a[class*="bg-[var(--gv-accent)]"],
.gv-theme a.bg-cobal-700,
.gv-theme a[class*="bg-cobal-700"],
.gv-theme a[class*="bg-[var(--gv-accent)]"] {
  color: var(--gv-on-accent) !important;
}

/* Mute colorful text accents (keep status classes below) */
.gv-theme .text-indigo-300,
.gv-theme .text-indigo-400,
.gv-theme .text-cobal-300,
.gv-theme .text-cobal-400,
.gv-theme .text-sky-300,
.gv-theme .text-sky-400,
.gv-theme .text-cyan-300,
.gv-theme .text-cyan-400,
.gv-theme .text-purple-400,
.gv-theme .text-violet-300,
.gv-theme .text-violet-400,
.gv-theme .text-yellow-400,
.gv-theme .text-orange-400,
.gv-theme .text-rose-300,
.gv-theme .text-rose-400,
.gv-theme .text-amber-300,
.gv-theme .text-amber-400,
.gv-theme .text-emerald-300,
.gv-theme .text-emerald-400,
.gv-theme .text-green-400,
.gv-theme .text-lime-300,
.gv-theme .text-lime-400,
.gv-theme .text-pink-400 {
  color: var(--gv-text-secondary) !important;
}

.gv-theme .text-cyan-300,
.gv-theme .text-sky-300,
.gv-theme .text-violet-300,
.gv-theme .text-lime-300,
.gv-theme .text-amber-300,
.gv-theme .text-emerald-300 {
  color: var(--gv-text) !important;
}

/* Status values — only when marked (must beat muted accent rules) */
.gv-theme .gv-status-pos,
.gv-theme span.gv-status-pos,
.gv-theme td.gv-status-pos,
.gv-theme .text-emerald-400.gv-keep-status,
.gv-theme .text-green-400.gv-keep-status {
  color: var(--gv-status-pos) !important;
}
.gv-theme .gv-status-neg,
.gv-theme span.gv-status-neg,
.gv-theme td.gv-status-neg,
.gv-theme .text-rose-400.gv-keep-status,
.gv-theme .text-red-400.gv-keep-status {
  color: var(--gv-status-neg) !important;
}
.gv-theme .gv-status-warn,
.gv-theme span.gv-status-warn {
  color: var(--gv-status-warn) !important;
}

/* Compact radius everywhere (incl. bare .rounded) */
.gv-theme .rounded-full,
.gv-theme .rounded-3xl,
.gv-theme .rounded-2xl,
.gv-theme .rounded-xl,
.gv-theme .rounded-lg,
.gv-theme .rounded-md,
.gv-theme .rounded {
  border-radius: var(--gv-radius) !important;
}
.gv-theme .rounded-sm,
.gv-theme .rounded-\[var\(--gv-radius-sm\)\] {
  border-radius: var(--gv-radius-sm) !important;
}
.gv-theme * {
  --tw-ring-shadow: 0 0 #0000;
}

/* Density: scale down oversized type */
.gv-theme .text-5xl,
.gv-theme .text-4xl,
.gv-theme .text-3xl {
  font-size: 1.25rem !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
}
.gv-theme .text-2xl {
  font-size: 1.125rem !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
}
.gv-theme .text-xl {
  font-size: 1rem !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
}
.gv-theme .text-lg {
  font-size: 0.9375rem !important;
}
.gv-theme .font-black,
.gv-theme .font-extrabold {
  font-weight: 600 !important;
}

/* Soften heavy shadows */
.gv-theme [class*="shadow-"] {
  box-shadow: none !important;
}

/* Colored icon wells → neutral */
.gv-theme [class*="bg-cobal-950"],
.gv-theme [class*="bg-indigo-950"],
.gv-theme [class*="bg-rose-950"],
.gv-theme [class*="bg-amber-950"],
.gv-theme [class*="bg-emerald-950"],
.gv-theme [class*="bg-sky-950"],
.gv-theme [class*="bg-cyan-950"],
.gv-theme [class*="bg-purple-950"],
.gv-theme [class*="bg-yellow-950"],
.gv-theme [class*="bg-orange-950"],
.gv-theme [class*="bg-violet-950"],
.gv-theme [class*="bg-green-950"],
.gv-theme [class*="bg-pink-950"],
.gv-theme [class*="bg-pink-900"],
.gv-theme [class*="bg-fuchsia-950"],
.gv-theme [class*="bg-teal-950"],
.gv-theme [class*="bg-lime-950"] {
  background-color: var(--gv-accent-soft) !important;
  background-image: none !important;
  color: var(--gv-accent) !important;
  border-color: var(--gv-border) !important;
}

/* Active filter / primary chip / botões navy — texto sempre legível */
.gv-theme a.bg-cobal-700,
.gv-theme .bg-cobal-700,
.gv-theme [class*="bg-cobal-600"],
.gv-theme [class*="bg-cobal-700"],
.gv-theme [class*="from-cobal-600"],
.gv-theme button[class*="from-cobal"],
.gv-theme a[class*="bg-[var(--gv-accent)]"],
.gv-theme [class*="bg-[var(--gv-accent)]"],
.gv-theme .bg-cyan-700,
.gv-theme [class*="bg-cyan-700"],
.gv-theme .gv-btn-primary,
.gv-theme button.gv-btn-primary {
  background-color: var(--gv-accent) !important;
  background-image: none !important;
  color: var(--gv-on-accent) !important;
  border-color: var(--gv-accent) !important;
}
.gv-theme a.bg-cobal-700 *,
.gv-theme .bg-cobal-700 *,
.gv-theme [class*="bg-cobal-700"] *,
.gv-theme a[class*="bg-[var(--gv-accent)]"] *,
.gv-theme [class*="bg-[var(--gv-accent)]"] *,
.gv-theme .bg-cyan-700 *,
.gv-theme .gv-btn-primary * {
  color: var(--gv-on-accent) !important;
}

/* Hover surfaces */
.gv-theme [class*="hover:bg-slate-900"]:hover,
.gv-theme [class*="hover:bg-slate-800"]:hover {
  background-color: var(--gv-surface-muted) !important;
}

/* Tables denser */
.gv-theme table th,
.gv-theme table td {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: 12.5px !important;
  border-color: var(--gv-border) !important;
  height: var(--gv-row-h);
  vertical-align: middle;
}
.gv-theme table thead th {
  background: var(--gv-surface-muted) !important;
  color: var(--gv-text-secondary) !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px !important;
}
.gv-theme .tabular-nums,
.gv-theme td.num,
.gv-theme .font-mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Inputs / buttons compact */
.gv-theme input,
.gv-theme select,
.gv-theme textarea {
  border-radius: var(--gv-radius-sm) !important;
  border-color: var(--gv-border) !important;
  background: var(--gv-surface) !important;
  color: var(--gv-text) !important;
  font-size: 13px !important;
}
.gv-theme button,
.gv-theme .btn,
.gv-theme a[class*="px-4"][class*="py-"] {
  border-radius: var(--gv-radius-sm) !important;
}

/* Scrollbar */
.gv-theme ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.gv-theme ::-webkit-scrollbar-track {
  background: var(--gv-bg);
}
.gv-theme ::-webkit-scrollbar-thumb {
  background: var(--gv-border-strong);
  border-radius: var(--gv-radius-sm);
}

/* --- Shell components --- */
.gv-sandbox-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gv-sandbox);
  background: var(--gv-sandbox-bg);
  border-bottom: 1px solid var(--gv-border);
  pointer-events: none;
}

.gv-shell {
  padding-top: 22px;
  height: 100%;
  display: flex;
  background: var(--gv-bg);
  color: var(--gv-text);
}

.gv-sidebar {
  width: 220px;
  background: var(--gv-surface);
  border-right: 1px solid var(--gv-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 40;
  transition: width 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.gv-sidebar.collapsed {
  width: 56px;
}

.gv-sidebar-brand {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 10px;
  border-bottom: 1px solid var(--gv-border);
  flex-shrink: 0;
}
.gv-sidebar-brand .logo-text {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.gv-sidebar-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gv-border);
  border-radius: var(--gv-radius-sm);
  background: var(--gv-surface);
  color: var(--gv-text-secondary);
  cursor: pointer;
  padding: 0;
}
.gv-sidebar-toggle:hover {
  color: var(--gv-text);
  background: var(--gv-surface-muted);
}
.gv-sidebar.collapsed .gv-sidebar-brand {
  justify-content: center;
  padding: 0 6px;
}
.gv-sidebar.collapsed .gv-sidebar-brand .logo-text {
  display: none;
}
.gv-sidebar.collapsed .gv-sidebar-toggle {
  margin: 0 auto;
}

.gv-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--gv-radius-sm);
  background: var(--gv-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.gv-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.gv-brand-text strong {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--gv-text);
}
.gv-brand-text span {
  font-size: 10px;
  color: var(--gv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gv-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
}
.gv-nav-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--gv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px 8px;
}
.gv-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  margin-bottom: 2px;
  border-radius: var(--gv-radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gv-text-secondary);
  border-left: 2px solid transparent;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.gv-nav a i {
  font-size: 14px;
  width: 16px;
  text-align: center;
  color: var(--gv-text-muted);
}
.gv-nav a:hover {
  background: var(--gv-surface-muted);
  color: var(--gv-text);
}
.gv-nav a.active {
  background: var(--gv-accent-soft);
  color: var(--gv-accent);
  border-left-color: var(--gv-accent);
  font-weight: 600;
}
.gv-nav a.active i {
  color: var(--gv-accent);
}

.gv-sidebar.collapsed .gv-brand-text,
.gv-sidebar.collapsed .sidebar-text,
.gv-sidebar.collapsed .profile-name,
.gv-sidebar.collapsed .profile-role,
.gv-sidebar.collapsed .gv-nav-label,
.gv-sidebar.collapsed .gv-profile-meta,
.gv-sidebar.collapsed .gv-logout span {
  display: none !important;
}
.gv-sidebar.collapsed .gv-nav a {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  border-left-width: 0;
}
.gv-sidebar.collapsed .gv-nav a i {
  margin: 0;
  font-size: 15px;
}
.gv-sidebar.collapsed .gv-profile {
  justify-content: center;
  padding: 10px 6px;
}
.gv-sidebar.collapsed .gv-profile > .flex {
  justify-content: center;
}

.gv-profile {
  border-top: 1px solid var(--gv-border);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
.gv-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--gv-radius-sm);
  background: var(--gv-accent-soft);
  color: var(--gv-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  flex-shrink: 0;
}
.gv-profile-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.gv-profile-meta .name {
  font-size: 12px;
  font-weight: 600;
  color: var(--gv-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gv-profile-meta .role {
  font-size: 10px;
  color: var(--gv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.gv-logout {
  color: var(--gv-text-muted);
  padding: 4px;
  border-radius: var(--gv-radius-sm);
}
.gv-logout:hover {
  color: var(--gv-status-neg);
  background: var(--gv-status-neg-bg);
}

.gv-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gv-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.gv-content > * {
  flex-shrink: 0;
}

/* KPI / card polish */
.gv-theme .glass-card {
  padding: 8px 10px !important;
}
.gv-theme .glass-panel {
  padding: 10px 12px !important;
  overflow: visible !important;
}
#desempenho-geral {
  flex-shrink: 0 !important;
  overflow: visible !important;
  max-height: none !important;
}
#desempenho-geral .overflow-x-auto {
  overflow-x: auto;
  overflow-y: visible;
}
.gv-theme .glass-card .text-xl,
.gv-theme .glass-card .text-2xl,
.gv-theme .glass-card .text-lg {
  font-size: 14.5px !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.gv-theme .glass-card .w-7.h-7,
.gv-theme .glass-card .w-8.h-8,
.gv-theme .glass-card .w-9.h-9,
.gv-theme .glass-card .w-12.h-12 {
  width: 28px !important;
  height: 28px !important;
  border-radius: var(--gv-radius-sm) !important;
  background: var(--gv-accent-soft) !important;
  color: var(--gv-accent) !important;
  border: 1px solid var(--gv-border) !important;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.gv-theme .glass-card .w-7.h-7 i,
.gv-theme .glass-card .w-8.h-8 i,
.gv-theme .glass-card .w-9.h-9 i,
.gv-theme .glass-card .w-12.h-12 i {
  font-size: 14px !important;
}

/* Hover suave — cards KPI, gráfico, listagem */
.gv-theme .glass-card {
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}
.gv-theme .glass-card:hover {
  border-color: var(--gv-accent) !important;
  transform: translateY(-1px);
}
.gv-theme .glass-card:hover .w-7.h-7,
.gv-theme .glass-card:hover .w-8.h-8,
.gv-theme .glass-card:hover .w-9.h-9 {
  transform: scale(1.06);
  color: var(--gv-accent-hover) !important;
}
.gv-theme #topRentaveisChart,
.gv-theme .glass-panel:has(#topRentaveisChart) {
  transition: border-color 0.2s ease;
}
.gv-theme .glass-panel:has(#topRentaveisChart):hover {
  border-color: var(--gv-border-strong) !important;
}
#desempenho-geral tbody tr {
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
#desempenho-geral tbody tr:hover {
  background: var(--gv-surface-muted) !important;
  box-shadow: inset 2px 0 0 var(--gv-accent);
}
#desempenho-geral tbody tr:hover td {
  color: var(--gv-text);
}

/* Filtros de período — recolher / expandir */
.gv-theme .gv-filtros-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--gv-radius-sm);
  border: 1px solid var(--gv-border);
  background: var(--gv-surface-muted);
  color: var(--gv-text-secondary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}
.gv-theme .gv-filtros-toggle:hover {
  border-color: var(--gv-accent);
  color: var(--gv-accent);
  background: var(--gv-accent-soft);
}
.gv-theme .gv-filtros-body {
  overflow: hidden;
  max-height: 120px;
  opacity: 1;
  transition: max-height 0.22s ease, opacity 0.18s ease, margin 0.18s ease;
  margin-top: 2px;
}
.gv-theme .gv-filtros.is-collapsed .gv-filtros-body {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}
.gv-theme .gv-filtros-resumo {
  max-width: 220px;
}
.gv-theme .gv-filtros.is-collapsed {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}
.gv-theme .gv-content .grid {
  gap: 8px !important;
}
.gv-theme .gv-content .gap-3 {
  gap: 8px !important;
}
.gv-theme h2 {
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}
.gv-theme h3 {
  font-size: 12px !important;
  font-weight: 600 !important;
}

/* Login page */
.gv-login-page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gv-bg);
  padding: 24px;
  padding-top: 40px;
}
.gv-login-card {
  width: 100%;
  max-width: 360px;
  background: var(--gv-surface);
  border: 1px solid var(--gv-border);
  border-radius: var(--gv-radius);
  padding: 24px;
}
.gv-login-card h1 {
  font-size: 16px;
  font-weight: 650;
  color: var(--gv-text);
  margin: 0;
}
.gv-login-card .sub {
  font-size: 11px;
  color: var(--gv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.gv-field {
  margin-top: 14px;
}
.gv-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gv-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.gv-field-control {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--gv-border);
  border-radius: var(--gv-radius-sm);
  padding: 8px 10px;
  background: var(--gv-surface);
}
.gv-field-control:focus-within {
  border-color: var(--gv-accent);
}
.gv-field-control input {
  border: none !important;
  outline: none;
  width: 100%;
  background: transparent !important;
  font-size: 13px;
  color: var(--gv-text);
}
.gv-btn-primary {
  width: 100%;
  margin-top: 16px;
  background: var(--gv-accent) !important;
  color: var(--gv-on-accent) !important;
  border: 1px solid var(--gv-accent) !important;
  border-radius: var(--gv-radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.gv-btn-primary:hover {
  background: var(--gv-accent-hover) !important;
  color: var(--gv-on-accent) !important;
}

/* Alinhamento */
.gv-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.gv-page-header h2 {
  margin: 0;
  line-height: 1.3;
}
.gv-page-header p {
  margin: 2px 0 0;
  color: var(--gv-text-secondary);
  font-size: 12px;
}
.gv-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.gv-card-head h3,
.gv-card-head .title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.gv-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
}
.gv-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.gv-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.gv-theme table {
  width: 100%;
  border-collapse: collapse;
}
.gv-theme .glass-card .mt-2\.5 {
  margin-top: 6px !important;
}

/* Configurações */
.gv-config-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gv-config-section h3 {
  margin: 0;
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gv-text-secondary);
}
.gv-theme-switch {
  display: inline-flex;
  border: 1px solid var(--gv-border);
  border-radius: var(--gv-radius);
  overflow: hidden;
  background: var(--gv-surface-muted);
}
.gv-theme-switch button {
  border: 0;
  background: transparent;
  color: var(--gv-text-secondary);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 !important;
}
.gv-theme-switch button.active {
  background: var(--gv-accent) !important;
  color: var(--gv-on-accent) !important;
}
.gv-doc-item {
  border: 1px solid var(--gv-border);
  border-radius: var(--gv-radius);
  padding: 10px 12px;
  background: var(--gv-surface-muted);
}
.gv-doc-item strong {
  display: block;
  font-size: 13px;
  color: var(--gv-text);
  margin-bottom: 2px;
}
.gv-doc-item p {
  margin: 0;
  font-size: 12px;
  color: var(--gv-text-secondary);
  line-height: 1.45;
}
.gv-sync-table td,
.gv-sync-table th {
  text-align: left;
}
.gv-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--gv-radius-sm);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--gv-border);
}
.gv-badge-ok {
  color: var(--gv-status-pos);
  background: var(--gv-status-pos-bg);
}
.gv-badge-late {
  color: var(--gv-status-warn);
  background: var(--gv-status-warn-bg);
}
.gv-badge-fail {
  color: var(--gv-status-neg);
  background: var(--gv-status-neg-bg);
}

@media (max-width: 767px) {
  .gv-sidebar {
    position: fixed !important;
    top: 22px;
    left: 0;
    bottom: 0;
    height: auto !important;
    width: 220px !important;
    transform: translateX(-105%);
    box-shadow: none;
    z-index: 50;
  }
  .gv-sidebar.collapsed {
    width: 220px !important;
  }
  .gv-sidebar.mobile-open {
    transform: translateX(0);
  }
  /* No mobile aberto, sempre mostrar textos */
  .gv-sidebar.mobile-open .gv-brand-text,
  .gv-sidebar.mobile-open .sidebar-text,
  .gv-sidebar.mobile-open .profile-name,
  .gv-sidebar.mobile-open .profile-role,
  .gv-sidebar.mobile-open .gv-nav-label,
  .gv-sidebar.mobile-open .gv-profile-meta,
  .gv-sidebar.mobile-open .gv-sidebar-brand .logo-text {
    display: flex !important;
  }
  .gv-sidebar.mobile-open .sidebar-text,
  .gv-sidebar.mobile-open .gv-nav-label {
    display: block !important;
  }
  .gv-sidebar.mobile-open .gv-nav a {
    justify-content: flex-start;
    padding-left: 8px;
    padding-right: 8px;
    border-left-width: 2px;
  }
  .gv-mobile-bar {
    display: flex !important;
  }
}
.gv-mobile-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 12px;
  border-bottom: 1px solid var(--gv-border);
  background: var(--gv-surface);
  flex-shrink: 0;
}
.gv-overlay {
  display: none;
  position: fixed;
  inset: 22px 0 0 0;
  background: var(--gv-overlay);
  z-index: 45;
}
.gv-overlay.show {
  display: block;
}

/* Última palavra: raio compacto em superfícies interativas */
.gv-theme .glass-card,
.gv-theme .glass-panel,
.gv-theme .gv-login-card,
.gv-theme button,
.gv-theme .gv-btn-primary,
.gv-theme input,
.gv-theme select,
.gv-theme textarea,
.gv-theme .gv-field-control,
.gv-theme a[class*="px-"][class*="py-"],
.gv-theme .gv-brand-mark,
.gv-theme .gv-avatar {
  border-radius: var(--gv-radius) !important;
}
