/* =========================================================
   FORNO & BRASA - PAINEL EXECUTIVO DO GERENTE
   Estética Corporativa, Sóbria e Estruturada (Padrão Enterprise SaaS)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
  --bg-main: #070a10;
  --bg-panel: #0d121d;
  --bg-card: #0f1422;
  --bg-card-hover: #141c2d;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-ui: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-ui);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.35);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: #f97316;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Executivo */
.hub-header {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hub-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.hub-title h1 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.hub-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hub-title p {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.hub-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Botões do Top Header & Design System Hub */
.hub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  line-height: 1.2;
  white-space: nowrap;
  font-family: inherit;
  box-sizing: border-box;
}

.hub-btn svg {
  flex-shrink: 0;
}

.hub-btn-back {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}
.hub-btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-2px);
}

.hub-btn-secondary {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}
.hub-btn-secondary:hover {
  background: rgba(51, 65, 85, 0.85);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: translateY(-1px);
}

.hub-btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
.hub-btn-primary:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
  transform: translateY(-1px);
  color: #fff;
}

.hub-btn-accent {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
.hub-btn-accent:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

.hub-btn-export {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.hub-btn-export:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.55);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.rep-btn-refresh {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #38bdf8;
  padding: 6px 14px;
  font-size: 0.78rem;
}
.rep-btn-refresh:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.5);
  color: #fff;
  transform: translateY(-1px);
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #34d399;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #34d399;
}

.user-manager-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.user-manager-card strong {
  color: #f1f5f9;
}

.hub-header-actions .pwa-header-install-btn,
.pwa-header-install-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: rgba(224, 86, 36, 0.15) !important;
  border: 1px solid rgba(224, 86, 36, 0.45) !important;
  color: #ff9466 !important;
  height: 32px !important;
  max-height: 32px !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  font-family: var(--font-body, sans-serif) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  outline: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
  user-select: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  box-sizing: border-box !important;
}

.hub-header-actions .pwa-header-install-btn:hover,
.pwa-header-install-btn:hover {
  background: rgba(224, 86, 36, 0.3) !important;
  border-color: rgba(224, 86, 36, 0.8) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.hub-header-actions .pwa-header-install-btn svg,
.pwa-header-install-btn svg {
  width: 14px !important;
  height: 14px !important;
  stroke: currentColor !important;
  fill: none !important;
  flex-shrink: 0 !important;
}

/* Container */
.hub-container {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* KPI Banner */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.16s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.kpi-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.kpi-info h4 {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.kpi-info .kpi-val {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.kpi-info small {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Seção de Módulos & Accordion de Categorias */
.section-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2px;
}

.section-title-wrap h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.section-title-wrap p {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.section-actions {
  display: flex;
  gap: 8px;
}

.btn-acc-ctrl {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-acc-ctrl:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  color: #fff;
}

.hub-categories-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.hub-cat-accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hub-cat-accordion-item:hover {
  border-color: var(--border-hover);
}

.hub-cat-accordion-item.open {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  background: #0e1422;
}

.hub-cat-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: background-color 0.16s ease;
  user-select: none;
}

.hub-cat-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.hub-cat-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hub-cat-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cat-accent, #94a3b8);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.hub-cat-header:hover .hub-cat-icon-box {
  transform: scale(1.05);
}

.hub-cat-icon-box svg {
  width: 22px;
  height: 22px;
}

.hub-cat-text h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 0 0 3px 0;
}

.hub-cat-text p {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0;
}

.hub-cat-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hub-cat-count {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.hub-cat-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-dim);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
  flex-shrink: 0;
}

.hub-cat-header:hover .hub-cat-chevron {
  color: #fff;
}

.hub-cat-accordion-item.open .hub-cat-chevron {
  transform: rotate(180deg);
  color: #fff;
}

/* Corpo do Accordion (Nativamente Fechado) */
.hub-cat-body {
  display: none;
  padding: 0 22px 22px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.hub-cat-accordion-item.open .hub-cat-body {
  display: block;
}

.hub-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  padding-top: 20px;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.mod-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.16s ease;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mod-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.mod-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.mod-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mod-tag {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mod-content h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.mod-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 16px;
}

.mod-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.mod-pill {
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--text-dim);
  font-weight: 500;
}

.btn-open-mod {
  background: #182236;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-open-mod:hover {
  background: #22304d;
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Quick Tools */
.quick-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tool-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.tool-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f1f5f9;
}

.tool-info p {
  font-size: 0.72rem;
  color: var(--text-dim);
}


/* =========================================================
   INTELIGÊNCIA GEOGRÁFICA & HEAT MAP DE PEDIDOS
   ========================================================= */
.heatmap-grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-top: 16px;
}

@media (max-width: 1024px) {
  .heatmap-grid-layout {
    grid-template-columns: 1fr;
  }
}

.heatmap-map-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.leaflet-map-canvas {
  width: 100%;
  height: 460px;
  background: #0b0f19;
}

/* Filtro Dark Mode Nativo sobre OpenStreetMap (100% Livre e Gratuito) */
.heatmap-map-card .leaflet-tile {
  filter: brightness(0.65) invert(100%) contrast(140%) hue-rotate(200deg) saturate(0.35);
}

.map-overlay-legend {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(13, 18, 29, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  pointer-events: none;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.legend-dot.cold { background: #38bdf8; }
.legend-dot.mid { background: #fbbf24; }
.legend-dot.hot { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

.heat-badge-points {
  background: rgba(255, 87, 34, 0.12);
  border: 1px solid rgba(255, 87, 34, 0.3);
  color: #ff7043;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.heatmap-ranking-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.ranking-header h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.ranking-header .ranking-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.ranking-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 380px;
}

.ranking-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  user-select: none;
}

.ranking-item:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ranking-item.active-selected {
  background: rgba(56, 189, 248, 0.14) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3) !important;
  transform: translateX(6px);
}

.ranking-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.ranking-name {
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ranking-pos {
  color: #38bdf8;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.ranking-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #38bdf8;
  font-weight: 700;
}

.ranking-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.ranking-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #0284c7, #ff5722);
}

.ranking-item-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 2px;
}

.ranking-click-hint {
  font-size: 0.70rem;
  color: #64748b;
  font-weight: 600;
  transition: color 0.15s ease;
}

.ranking-item:hover .ranking-click-hint,
.ranking-item.active-selected .ranking-click-hint {
  color: #38bdf8;
}

.active-delivery-item {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.active-delivery-item:hover {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.45);
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.15);
}

.active-delivery-item.active-selected {
  background: rgba(168, 85, 247, 0.22) !important;
  border-color: #a855f7 !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35) !important;
  transform: translateX(6px);
}

/* Pulsing Leaflet Circle for Focused Map Location */
@keyframes mapRingPulse {
  0% {
    stroke-opacity: 0.9;
    fill-opacity: 0.25;
  }
  50% {
    stroke-opacity: 0.4;
    fill-opacity: 0.1;
  }
  100% {
    stroke-opacity: 0.9;
    fill-opacity: 0.25;
  }
}

.pulsing-map-focus-ring {
  animation: mapRingPulse 1.6s infinite ease-in-out;
}

/* =========================================================
   ESTÚDIO 3D & GERADOR WEBAR DE PRODUTOS REAIS
   ========================================================= */
.badge-studio-pulse {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  margin-right: 8px;
  vertical-align: middle;
  animation: pulseBadge 2s infinite ease-in-out;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.05); opacity: 1; box-shadow: 0 0 14px rgba(245, 158, 11, 0.6); }
}

.studio-header-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.meta-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.studio-3d-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  margin-top: 18px;
}

@media (max-width: 1024px) {
  .studio-3d-grid {
    grid-template-columns: 1fr;
  }
}

.studio-controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.form-group-studio {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group-studio label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.02em;
}

.studio-select {
  width: 100%;
  background: #0b111e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 11px 14px;
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s;
  cursor: pointer;
}

.studio-select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.studio-hint-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: all 0.25s;
}

.hint-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.hint-text strong {
  display: block;
  font-size: 0.8rem;
  color: #fbbf24;
  margin-bottom: 2px;
}

.hint-text p {
  font-size: 0.77rem;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0;
}

/* Dropzone de Upload */
.studio-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 22px 16px;
  background: rgba(11, 17, 30, 0.6);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.studio-dropzone:hover, .studio-dropzone.dragover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
}

.dropzone-content svg {
  stroke: #f59e0b;
}

.dropzone-text strong {
  display: block;
  font-size: 0.85rem;
  color: #f1f5f9;
}

.dropzone-text small {
  font-size: 0.72rem;
  color: #64748b;
}

.dropzone-thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 8px;
}

.dropzone-thumb::after {
  content: 'Alterar foto';
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Bases Gastronômicas */
.bases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.btn-base {
  background: #0b111e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.btn-base:hover {
  background: #141d30;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-base.active {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.base-emoji {
  font-size: 1.15rem;
}

.base-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f8fafc;
}

.base-tag {
  font-size: 0.68rem;
  color: #94a3b8;
}

/* Câmera e Enquadramento */
.label-with-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.camera-curr-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
}

.camera-presets-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.btn-cam-preset {
  background: #0b111e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-cam-preset:hover {
  background: #141d30;
  color: #fff;
}

.btn-cam-preset.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 700;
}

.camera-lock-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.btn-cam-lock {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #f1f5f9;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-cam-lock:hover {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #38bdf8;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.lock-hint {
  font-size: 0.68rem;
  color: #64748b;
  text-align: center;
}

/* Botão Salvar */
.studio-action-row {
  margin-top: 6px;
}

.btn-studio-save {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b0f19;
  border: none;
  padding: 13px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
  transition: all 0.2s;
}

.btn-studio-save:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(245, 158, 11, 0.5);
}

.btn-studio-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Coluna do Visor 3D */
.studio-viewer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
}

.viewer-top-bar {
  padding: 14px 18px;
  background: #0b111e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.viewer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
}

.viewer-chips {
  display: flex;
  gap: 6px;
}

.chip-tech {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.studio-canvas-container {
  width: 100%;
  height: 440px;
  position: relative;
  background: radial-gradient(circle at center, #1a2234 0%, #080c14 100%);
  overflow: hidden;
}

.studio-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.canvas-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 10;
  background: rgba(8, 12, 20, 0.9);
}

.canvas-overlay-guide {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
}

.viewer-bottom-bar {
  padding: 12px 18px;
  background: #0b111e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.viewer-stats {
  display: flex;
  gap: 16px;
  font-size: 0.72rem;
  color: #64748b;
}

.viewer-stats strong {
  color: #94a3b8;
}

.btn-reset-cam {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-reset-cam:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ==============================================================================
   MODAL: SCANNER DE CÂMERA AO VIVO COM RETÍCULO GUIADO
   ============================================================================== */
.scanner-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.scanner-modal-card {
  width: 100%;
  max-width: 520px;
  background: #0d131f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}

.scanner-header {
  padding: 14px 18px;
  background: #080c14;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scanner-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.scanner-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.scanner-viewfinder {
  position: relative;
  width: 100%;
  height: 380px;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-viewfinder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-target-reticle {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.reticle-circle-guide {
  width: 270px;
  height: 270px;
  border-radius: 50%;
  border: 2px dashed #f59e0b;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.48), 0 0 24px rgba(245, 158, 11, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: reticlePulse 3s infinite ease-in-out;
}

@keyframes reticlePulse {
  0% { transform: scale(0.98); border-color: rgba(245, 158, 11, 0.7); }
  50% { transform: scale(1.02); border-color: rgba(251, 191, 36, 1); }
  100% { transform: scale(0.98); border-color: rgba(245, 158, 11, 0.7); }
}

.reticle-crosshair-center {
  font-size: 1.4rem;
  color: #f59e0b;
  font-weight: 300;
  line-height: 1;
  opacity: 0.8;
}

.reticle-label {
  position: absolute;
  bottom: 16px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(11, 17, 30, 0.85);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scanner-footer {
  padding: 16px 20px;
  background: #080c14;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.scanner-btn-switch {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.scanner-btn-switch:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.scanner-btn-capture {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  border: none;
  color: #fff;
  padding: 11px 22px;
  border-radius: 24px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(234, 88, 12, 0.4);
  transition: all 0.2s;
}

.scanner-btn-capture:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(234, 88, 12, 0.6);
}

.scanner-btn-capture .shutter-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}

/* Upload Actions & PBR Sliders */
.studio-upload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-upload-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-upload-action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn-upload-action.primary-scan {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.btn-upload-action.primary-scan:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
}

.pbr-quality-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pbr-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #e2e8f0;
  cursor: pointer;
}

.pbr-toggle-row input[type="checkbox"] {
  accent-color: #f59e0b;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

.slider-header span:last-child {
  color: #fbbf24;
  font-family: monospace;
}

.pbr-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.pbr-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f59e0b;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

/* =========================================================
   MODAIS EXECUTIVOS: FECHAMENTO MOTOBOYS & GESTÃO ASAAS
   ========================================================= */
/* Trava de scroll para quando qualquer modal estiver aberto */
body.modal-open, html.modal-open {
  overflow: hidden !important;
  height: 100vh !important;
  overscroll-behavior: none !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overscroll-behavior: contain !important;
}

.modal-container {
  background: #0d131f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(249, 115, 22, 0.12);
  overflow: hidden;
  animation: modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overscroll-behavior: contain !important;
}

.modal-container-large {
  background: #0d131f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 950px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(249, 115, 22, 0.15);
  overflow: hidden;
  animation: modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overscroll-behavior: contain !important;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-modal:hover {
  color: #fff;
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain !important;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.btn-sec {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sec:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-primary {
  background: linear-gradient(135deg, #ea580c, #f97316);
  border: none;
  color: #fff;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(234, 88, 12, 0.35);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
  transform: translateY(-1px);
}

/* Formulários do Modal */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
}

.modal-input {
  width: 100%;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  padding: 10px 14px;
  font-size: 0.88rem;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
  font-family: inherit;
}

.modal-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.modal-input:read-only {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  cursor: not-allowed;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 540px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

/* Tabelas e Cards Financeiros */
.settlements-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.settlements-table th {
  text-align: left;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settlements-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}

.settlements-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.btn-pix-settle {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pix-settle:hover {
  filter: brightness(1.1);
  transform: scale(1.04);
}

.badge-settlement-paid {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.78rem;
}

.badge-settlement-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.78rem;
}

.finance-balance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.fin-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 20px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fin-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
}

.fin-val {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
}

.fin-card small {
  font-size: 0.75rem;
  color: #64748b;
}

.finance-columns-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

.fin-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
  border-radius: 14px;
}

.fin-box h4 {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 4px;
}

.form-group {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
}

.modal-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.modal-input:focus {
  border-color: #38bdf8;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

/* ==============================================================================
   CENTRAL DE ACESSOS & CREDENCIAIS MODAL STYLES
   ============================================================================== */
.access-modal-container {
  max-width: 1100px !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
}

.access-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: #fb923c;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.access-tabs-bar {
  display: flex;
  gap: 10px;
  padding: 12px 24px 0 24px;
  background: rgba(13, 18, 29, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.access-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 10px 18px;
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.access-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.access-tab-btn.active {
  background: #090d16;
  border-color: rgba(249, 115, 22, 0.5);
  color: #fb923c;
  border-top: 2px solid #f97316;
}

.access-tab-counter {
  padding: 2px 7px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.access-tab-btn.active .access-tab-counter {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
}

.access-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px !important;
}

.access-info-banner {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.access-info-banner.banner-smtp {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.25);
}

.access-info-banner .banner-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.access-info-banner strong {
  color: #fff;
  font-size: 0.92rem;
  display: block;
  margin-bottom: 3px;
}

.access-info-banner p {
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0;
}

/* Grid de Cards dos Terminais */
.terminals-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.terminal-card {
  background: #0f1420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.terminal-card:hover {
  border-color: rgba(249, 115, 22, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.terminal-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.terminal-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.terminal-emoji-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.terminal-card-title-wrap h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px 0;
}

.terminal-card-title-wrap small {
  font-size: 0.76rem;
  color: #94a3b8;
}

.terminal-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.terminal-online-badge.online {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.terminal-online-badge.offline {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.terminal-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Credenciais Box */
.terminal-cred-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.terminal-cred-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.terminal-cred-label {
  color: #94a3b8;
  font-weight: 600;
}

.terminal-cred-val-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-cred-val {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.terminal-cred-pass {
  color: #4ade80;
  letter-spacing: 1px;
}

.btn-copy-cred {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.btn-copy-cred:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-copy-cred.copied {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #34d399;
}

.terminal-card-foot {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-term-action {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-term-open {
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: #fb923c;
}

.btn-term-open:hover {
  background: rgba(249, 115, 22, 0.25);
  color: #fff;
}

.btn-term-restore {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.btn-term-restore:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Painel de Colaboradores Individuais */
.individuals-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.individuals-search-wrap {
  flex: 1;
  max-width: 400px;
  position: relative;
  display: flex;
  align-items: center;
}

.individuals-search-wrap svg {
  position: absolute;
  left: 12px;
  color: #64748b;
  pointer-events: none;
}

.individuals-search-wrap input {
  width: 100%;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 9px 12px 9px 36px;
  border-radius: 8px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.individuals-search-wrap input:focus {
  border-color: #f97316;
}

.individuals-table-wrap {
  background: #0f1420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow-x: auto;
}

.access-table {
  width: 100%;
  border-collapse: collapse;
}

.access-table th {
  background: rgba(13, 18, 29, 0.9);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.04em;
}

.access-table td {
  padding: 12px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.access-table th:last-child,
.access-table td:last-child {
  text-align: right;
  white-space: nowrap !important;
  min-width: 250px;
}

.btn-smtp-reset {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  height: 32px;
  box-sizing: border-box;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap !important;
  line-height: 1;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.btn-smtp-reset:hover {
  background: rgba(168, 85, 247, 0.32);
  color: #fff;
  border-color: #a855f7;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.3);
  transform: translateY(-1px);
}

.btn-smtp-reset:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.individuals-table-wrap::-webkit-scrollbar {
  height: 6px;
}
.individuals-table-wrap::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
}
.individuals-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: background 0.2s ease;
}
.individuals-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #f97316;
}

/* ==============================================================================
   RESPONSIVE MOBILE DESIGN SYSTEM - PAINEL DO GERENTE (IPHONE SE 375x667 & MOBILE)
   ============================================================================== */
@media (max-width: 768px) {
  /* Prevenção de rolagem horizontal em todo o painel */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  /* 1. Cabeçalho Executivo Mobile */
  .hub-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    padding: 12px 14px;
    width: 100%;
    box-sizing: border-box;
  }

  .hub-brand {
    gap: 10px;
    width: 100%;
    align-items: center;
  }

  .hub-logo {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
  }

  .hub-title {
    min-width: 0;
    flex: 1;
  }

  .hub-title h1 {
    font-size: 1.05rem;
    line-height: 1.25;
    flex-wrap: wrap;
    gap: 6px;
  }

  .hub-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  .hub-title p {
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--text-dim);
    margin-top: 2px;
  }

  /* Ações do Cabeçalho fluidas com quebra de linha elegante */
  .hub-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
  }

  .live-pill {
    padding: 4px 8px;
    font-size: 0.7rem;
    gap: 6px;
  }

  .pulse-dot {
    width: 6px;
    height: 6px;
  }

  .hub-header-actions .pwa-header-install-btn,
  .pwa-header-install-btn {
    height: 28px !important;
    max-height: 28px !important;
    padding: 0 8px !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
  }

  .user-manager-card {
    padding: 4px 8px;
    font-size: 0.72rem;
    gap: 6px;
    max-width: 100%;
  }

  .user-manager-card small {
    display: none !important; /* Oculta e-mail longo para evitar quebra horizontal no iPhone SE */
  }

  #fb-master-nav-trigger {
    height: 28px !important;
    padding: 0 8px !important;
    font-size: 0.72rem !important;
  }

  /* 2. Container Principal */
  .hub-container {
    padding: 14px 14px 44px;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
  }

  /* 3. Banner de KPIs em Coluna Única */
  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .kpi-card {
    padding: 12px 14px;
    gap: 12px;
    border-radius: 10px;
  }

  .kpi-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 8px;
  }

  .kpi-icon svg {
    width: 20px;
    height: 20px;
  }

  .kpi-info h4 {
    font-size: 0.7rem;
  }

  .kpi-info .kpi-val {
    font-size: 1.25rem;
    margin-top: 1px;
  }

  .kpi-info small {
    font-size: 0.7rem;
  }

  /* 4. Título da Seção e Botões de Ação */
  .section-title-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 6px;
  }

  .section-title-wrap h2 {
    font-size: 1.1rem;
  }

  .section-title-wrap p {
    font-size: 0.75rem;
  }

  .section-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .btn-acc-ctrl {
    text-align: center;
    padding: 8px 10px;
    font-size: 0.76rem;
    border-radius: 8px;
  }

  /* 5. Acordeões das Categorias */
  .hub-categories-wrap {
    gap: 10px;
    margin-top: 10px;
  }

  .hub-cat-accordion-item {
    border-radius: 10px;
  }

  .hub-cat-header {
    padding: 12px 14px;
    gap: 10px;
  }

  .hub-cat-header-left {
    gap: 10px;
    min-width: 0;
    flex: 1;
  }

  .hub-cat-icon-box {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
  }

  .hub-cat-icon-box svg {
    width: 18px;
    height: 18px;
  }

  .hub-cat-text {
    min-width: 0;
    flex: 1;
  }

  .hub-cat-text h3 {
    font-size: 0.9rem;
    line-height: 1.25;
    margin-bottom: 2px;
  }

  .hub-cat-text p {
    font-size: 0.72rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hub-cat-header-right {
    gap: 6px;
    flex-shrink: 0;
  }

  .hub-cat-count {
    font-size: 0.68rem;
    padding: 3px 6px;
    border-radius: 5px;
  }

  .hub-cat-chevron {
    width: 18px;
    height: 18px;
  }

  /* 6. Grid e Cards dos Módulos dentro do Acordeão */
  .hub-cat-body {
    padding: 0 12px 14px 12px;
  }

  .hub-cat-grid,
  .modules-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
    padding-top: 12px;
  }

  .mod-card {
    padding: 14px;
    border-radius: 10px;
  }

  .mod-header {
    margin-bottom: 10px;
  }

  .mod-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }

  .mod-icon-box svg {
    width: 20px;
    height: 20px;
  }

  .mod-tag {
    font-size: 0.64rem;
    padding: 2px 6px;
  }

  .mod-content h3 {
    font-size: 0.98rem;
    margin-bottom: 4px;
  }

  .mod-content p {
    font-size: 0.78rem;
    line-height: 1.4;
    margin-bottom: 10px;
  }

  .mod-features {
    gap: 4px;
    margin-bottom: 12px;
  }

  .mod-pill {
    font-size: 0.68rem;
    padding: 2px 6px;
  }

  .btn-open-mod {
    padding: 9px 12px;
    font-size: 0.82rem;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    display: block;
  }

  /* 7. Modais em Bottom Sheet no Mobile */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-container,
  .modal-container-large {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 18px 18px 0 0 !important;
    border-bottom: none !important;
    max-height: 90vh !important;
    margin: 0 !important;
    animation: sheetSlideUpGerente 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes sheetSlideUpGerente {
    from { transform: translateY(100%); opacity: 0.8; }
    to   { transform: translateY(0); opacity: 1; }
  }

  .modal-header {
    padding: 12px 16px;
  }

  .modal-header h3 {
    font-size: 0.98rem;
  }

  .modal-header p {
    font-size: 0.72rem !important;
  }

  .modal-body {
    padding: 14px 16px;
  }

  .modal-footer {
    padding: 12px 16px;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Modal Financeiro Asaas */
  .finance-balance-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .fin-card {
    padding: 12px 14px;
  }

  .fin-val {
    font-size: 1.3rem;
  }

  .finance-columns-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .fin-box {
    padding: 14px;
  }

  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Modal de Acessos e Credenciais */
  .access-tabs-bar {
    flex-direction: column;
    gap: 6px;
  }

  .access-tab-btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.78rem;
    justify-content: space-between;
  }

  .terminals-cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .individuals-actions-row {
    flex-direction: column;
    gap: 8px;
  }

  .individuals-actions-row button {
    width: 100%;
    justify-content: center;
  }

  .individuals-search-wrap {
    width: 100%;
  }

  /* Tabelas com Scroll Horizontal Touch */
  .individuals-table-wrap,
  #motoboysSettlementsTableContainer,
  #withdrawalsHistoryContainer {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: 8px;
  }

  .settlements-table,
  .access-table {
    min-width: 500px;
    font-size: 0.78rem;
  }

  .settlements-table th,
  .settlements-table td,
  .access-table th,
  .access-table td {
    padding: 8px 10px;
  }
}





