/* =========================================================
   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);
}

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: 14px;
}

.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;
}

/* 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 */
.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);
}

.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);
}

@media (max-width: 768px) {
  .hub-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
  }
  .modules-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   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
   ========================================================= */
.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;
}

.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(56, 189, 248, 0.15);
  overflow: hidden;
  animation: modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s ease;
}

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

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

.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.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sec:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: none;
  color: #fff;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #075985);
  transform: translateY(-2px);
}

/* 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;
}



