/* ==========================================================================
   CALCULADORA & PRECIFICADOR 3D — DESIGN SYSTEM LOJA SJ 3D (TAXAS 2026)
   ========================================================================== */

:root {
  --sj-carbon-bg: #07070a;
  --sj-card-bg: #111117;
  --sj-card-sub: #161622;
  --sj-input-bg: #0d0d14;
  --sj-hover-bg: #1a1a26;

  --sj-orange: #FF5500;
  --sj-orange-deep: #F04E23;
  --sj-orange-hover: #e0451a;
  --sj-orange-glow: rgba(255, 85, 0, 0.28);
  --sj-orange-bg: rgba(255, 85, 0, 0.08);
  --sj-orange-border: rgba(255, 85, 0, 0.32);

  --sj-green: #10b981;
  --sj-green-bg: rgba(16, 185, 129, 0.1);
  --sj-green-glow: rgba(16, 185, 129, 0.25);

  --sj-blue: #38bdf8;
  --sj-purple: #c084fc;
  --sj-yellow: #facc15;
  --sj-red: #ef4444;

  --border-subtle: #20202e;
  --border-light: #2b2b3d;
  --border-focus: #FF5500;

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

  --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(255, 85, 0, 0.25);
}

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

body.calc-page-body {
  background-color: var(--sj-carbon-bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Glow Ambiance */
.bg-ambient-1 {
  position: fixed;
  top: -150px;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 85, 0, 0.09) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.bg-ambient-2 {
  position: fixed;
  top: 350px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(240, 78, 35, 0.06) 0%, transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: -0.2px;
}

/* Header & Barra Superior Loja SJ */
.calc-header {
  position: sticky;
  top: 0;
  background: rgba(10, 10, 14, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0;
}

.calc-header-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calc-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.calc-brand-logo-img {
  height: 26px;
  width: auto;
  display: block;
}

.calc-brand-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  display: block;
}

.calc-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.calc-brand-title {
  font-size: 0.92rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.1;
  white-space: nowrap;
}

.calc-brand-title span {
  color: var(--sj-orange);
}

.calc-brand-sub {
  font-size: 0.68rem;
  color: #a1a1aa;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
  white-space: nowrap;
  text-transform: uppercase;
}

.calc-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.calc-nav-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #14141a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e4e4e7;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.calc-nav-btn svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.calc-nav-btn:hover {
  background: #1c1c24;
  border-color: rgba(255, 85, 0, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

.calc-nav-btn:hover svg {
  opacity: 1;
  color: var(--sj-orange);
}

.calc-nav-btn.primary {
  background: linear-gradient(135deg, #FF5500 0%, #D93814 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(255, 85, 0, 0.35);
}

.calc-nav-btn.primary svg {
  opacity: 1;
  color: #ffffff;
}

.calc-nav-btn.primary:hover {
  background: linear-gradient(135deg, #FF661A 0%, #E84520 100%);
  box-shadow: 0 4px 14px rgba(255, 85, 0, 0.45);
}

.calc-nav-btn.admin-btn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.calc-nav-btn.admin-btn svg {
  opacity: 1;
  color: #fbbf24;
}

.calc-nav-btn.admin-btn:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #000000;
  font-weight: 800;
}

.calc-nav-btn.admin-btn:hover svg {
  color: #000000;
}

.calc-nav-btn.btn-logout-nav:hover svg {
  color: #ef4444;
}

.calc-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.74rem;
  font-weight: 800;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.calc-user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 12px #10b981;
  }
}

.calc-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 1;
}

/* ==========================================================================
   MODAL DE GESTÃO DE ACESSOS (EXCLUSIVO ADMINISTRADOR)
   ========================================================================== */
.modal-content-admin {
  max-width: 680px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.admin-modal-body {
  overflow-y: auto;
  max-height: calc(85vh - 100px);
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-modal-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.admin-modal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.btn-admin-refresh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-admin-refresh:hover {
  color: #ffffff;
  border-color: var(--sj-orange);
}

.admin-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #111116;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
}

.admin-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.admin-item-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
}

.admin-item-email {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  word-break: break-all;
}

.admin-item-meta {
  font-size: 0.70rem;
  color: #71717a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-admin-action {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-admin-action.approve {
  background: #10b981;
  color: #ffffff;
}

.btn-admin-action.approve:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-admin-action.reject {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.btn-admin-action.reject:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-admin-action.wa {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.btn-admin-action.wa:hover {
  background: #22c55e;
  color: #ffffff;
}

.admin-empty-state {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Métricas de Leads no Painel */
.admin-leads-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-lead-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
}

.admin-lead-stat-val {
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
  font-family: var(--font-mono);
}

.admin-lead-stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Toolbar de Exportação de Contatos */
.admin-export-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.btn-export-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  color: #ffffff;
  text-decoration: none;
}

.btn-export-tool.wa {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.25);
}

.btn-export-tool.wa:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  transform: translateY(-1px);
}

.btn-export-tool.csv {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.25);
}

.btn-export-tool.csv:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
}

.btn-export-tool.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e4e4e7;
}

.btn-export-tool.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Barra de Filtro e Busca */
.admin-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-search-input {
  flex: 1;
  min-width: 200px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.admin-search-input:focus {
  border-color: var(--sj-orange);
}

.admin-pill-tabs {
  display: flex;
  gap: 4px;
}

.admin-pill-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-pill-tab.active {
  background: var(--sj-orange);
  color: #ffffff;
  border-color: var(--sj-orange);
}

/* ==========================================================================
   GATE DE LOGIN EXCLUSIVO DA CALCULADORA (ACESSO RESTRITO)
   ========================================================================== */
.calc-auth-gate-wrapper {
  position: fixed;
  inset: 0;
  background: rgba(7, 7, 10, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.calc-auth-gate-card {
  width: 100%;
  max-width: 440px;
  background: var(--sj-card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-card), 0 0 40px rgba(255, 85, 0, 0.18);
  position: relative;
  overflow: hidden;
}

.calc-auth-gate-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #FF5500, #F04E23, #FF8800);
}

.calc-gate-header {
  text-align: center;
  margin-bottom: 24px;
}

.calc-gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--sj-orange-bg);
  color: var(--sj-orange);
  border: 1px solid var(--sj-orange-border);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.calc-gate-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 6px;
}

.calc-gate-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.calc-gate-tabs {
  display: flex;
  background: var(--sj-input-bg);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  gap: 4px;
}

.btn-calc-gate-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 9px;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-calc-gate-tab.active {
  background: var(--sj-card-sub);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

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

.calc-gate-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.calc-gate-input {
  width: 100%;
  background: var(--sj-input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #ffffff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: all 0.2s;
}

.calc-gate-input:focus {
  outline: none;
  border-color: var(--sj-orange);
  box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.18);
  background: #11111a;
}

.btn-calc-gate-submit {
  width: 100%;
  background: linear-gradient(135deg, #FF5500 0%, #D93814 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(255, 85, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-calc-gate-submit:hover {
  background: linear-gradient(135deg, #FF661A 0%, #E84520 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 85, 0, 0.45);
}

.calc-gate-footer-links {
  margin-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.calc-gate-footer-links a {
  color: var(--sj-orange);
  text-decoration: none;
  font-weight: 700;
}

.calc-gate-footer-links a:hover {
  text-decoration: underline;
}

.calc-lock-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--sj-orange-bg);
  border: 1px solid var(--sj-orange-border);
  color: var(--sj-orange);
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.calc-btn-secondary {
  width: 100%;
  background: var(--sj-card-sub);
  color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.14s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.calc-btn-secondary:hover {
  background: var(--sj-hover-bg);
  border-color: var(--sj-orange-border);
  transform: translateY(-1px);
}

/* ==========================================================================
   CONTEÚDO PRINCIPAL DA CALCULADORA (WORKSPACE)
   ========================================================================== */
.calc-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 100px;
  position: relative;
  z-index: 10;
}

.calc-hero {
  text-align: center;
  margin-bottom: 28px;
}

.calc-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sj-orange-bg);
  border: 1px solid var(--sj-orange-border);
  color: var(--sj-orange);
  font-size: 0.74rem;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF5500;
  box-shadow: 0 0 8px #FF5500;
  animation: pulseDotAnim 1.8s infinite;
}

@keyframes pulseDotAnim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.calc-hero-title {
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 6px;
}

.calc-hero-title span {
  color: var(--sj-orange);
}

.calc-hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* Grid & Cards da Calculadora */
.calculator-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.card {
  background: var(--sj-card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--border-light);
}

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

.step-badge {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--sj-orange);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-ghost {
  background: var(--sj-hover-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  background: var(--sj-card-sub);
  color: #ffffff;
  border-color: var(--border-light);
}

/* G-Code & 3MF Dropzone */
.gcode-dropzone {
  border: 2px dashed rgba(255, 85, 0, 0.4);
  background: rgba(255, 85, 0, 0.03);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.gcode-dropzone:hover, .gcode-dropzone.dragover {
  border-color: var(--sj-orange);
  background: rgba(255, 85, 0, 0.08);
  box-shadow: 0 0 25px rgba(255, 85, 0, 0.15);
}

.dropzone-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sj-orange-bg);
  border: 1px solid var(--sj-orange-border);
  color: var(--sj-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropzone-title strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  display: block;
  margin-bottom: 2px;
}

.dropzone-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--sj-orange);
  background: var(--sj-orange-bg);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.dropzone-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.dropzone-btn {
  margin-left: auto;
  padding: 7px 14px;
}

.dropzone-status {
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropzone-tip-box {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--sj-card-sub);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* Forms & Inputs */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.label-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 600;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input, .form-select {
  width: 100%;
  background: var(--sj-input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--sj-orange);
  box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.18);
  background: #11111a;
}

.form-input.has-prefix {
  padding-left: 36px;
}

.form-input.has-suffix {
  padding-right: 64px;
}

.input-prefix {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 700;
  pointer-events: none;
}

.input-suffix {
  position: absolute;
  right: 12px;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  pointer-events: none;
}

/* Quick Pills */
.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.quick-pill {
  background: var(--sj-input-bg);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-pill:hover {
  background: var(--sj-card-sub);
  color: #ffffff;
  border-color: var(--border-light);
}

.quick-pill.active {
  background: var(--sj-orange-bg);
  border-color: var(--sj-orange);
  color: var(--sj-orange);
}

/* Custo Total de Fabricação Box */
.production-equation-box {
  background: var(--sj-card-sub);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-top: 18px;
}

.production-equation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.production-equation-title {
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.production-multiplier-badge {
  background: var(--sj-orange-bg);
  color: var(--sj-orange);
  border: 1px solid var(--sj-orange-border);
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.production-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.production-total-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
}

.production-total-value {
  font-size: 1.55rem;
  font-weight: 900;
  color: #ffffff;
  font-family: var(--font-mono);
}

.production-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.breakdown-item {
  background: var(--sj-input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.breakdown-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 4px;
}

.breakdown-value {
  font-size: 0.88rem;
  font-weight: 900;
  color: #ffffff;
  font-family: var(--font-mono);
}

/* Collapsible Settings */
.card-settings-collapsible {
  padding: 16px 22px;
}

.collapsible-trigger {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0;
}

.collapsible-icon {
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: transform 0.25s ease;
}

.collapsible-trigger.open .collapsible-icon {
  transform: rotate(180deg);
}

.collapsible-content {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.collapsible-content.open {
  display: block;
}

/* Marketplace Tabs */
.marketplace-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.mp-tab {
  background: var(--sj-input-bg);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mp-tab:hover {
  background: var(--sj-card-sub);
  border-color: var(--border-light);
}

.mp-tab.active {
  background: rgba(255, 85, 0, 0.08);
  border-color: var(--sj-orange);
  box-shadow: 0 0 15px rgba(255, 85, 0, 0.2);
}

.mp-tab-svg {
  width: 26px;
  height: 26px;
}

.mp-tab-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  display: block;
}

.mp-tab-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 600;
}

.mp-sub-options {
  background: var(--sj-card-sub);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-label, .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
  font-weight: 700;
}

/* Mode Toggle (Margem % vs Preço R$) */
.mode-toggle-container {
  display: flex;
  background: var(--sj-input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
}

.mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn.active {
  background: var(--sj-card-sub);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Recomendações Prontas (Bom Preço & Preço Ideal) */
.smart-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.smart-price-card {
  background: var(--sj-card-sub);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.smart-price-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.smart-price-card.card-good.active {
  border-color: var(--sj-green);
  background: rgba(16, 185, 129, 0.06);
}

.smart-price-card.card-ideal.active {
  border-color: var(--sj-orange);
  background: rgba(255, 85, 0, 0.06);
}

.smart-price-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.smart-price-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-dim);
}

.smart-price-active-tag {
  display: none;
  font-size: 0.65rem;
  font-weight: 900;
  color: #34d399;
}

.smart-price-title {
  font-size: 0.92rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 6px;
}

.smart-price-number {
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.smart-price-metrics {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.smart-price-btn {
  width: 100%;
  background: var(--sj-hover-bg);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.card-good .smart-price-btn:hover {
  background: var(--sj-green);
  color: #000;
}

.card-ideal .smart-price-btn:hover {
  background: var(--sj-orange);
  color: #fff;
}

/* Detalhamento em Cascata (Waterfall) */
.detalhamento-sale-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.detalhamento-sale-label {
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
}

.detalhamento-sale-value {
  font-size: 1.65rem;
  font-weight: 900;
  color: #ffffff;
}

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

.detalhamento-cascade-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cascade-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cascade-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.cascade-branch {
  color: var(--text-dim);
  margin-right: 4px;
}

.cascade-deduction.negative {
  color: #f87171;
  font-weight: 800;
}

.cascade-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
  padding-left: 20px;
}

.detalhamento-costs-summary {
  background: var(--sj-input-bg);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.detalhamento-costs-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
}

.detalhamento-costs-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 3px;
}

/* Caixa de Lucro Líquido Real */
.detalhamento-lucro-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 14px 0;
}

.detalhamento-lucro-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.lucro-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 900;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lucro-icon {
  width: 18px;
  height: 18px;
}

.detalhamento-lucro-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.detalhamento-lucro-val {
  font-size: 2.1rem;
  font-weight: 900;
  color: #34d399;
}

.detalhamento-lucro-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lucro-margin-pct {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
}

.lucro-badge {
  background: #34d399;
  color: #022c22;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.detalhamento-lucro-hourly {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Capacidade Produtiva */
.detalhamento-capacity-section, .detalhamento-channel-section {
  background: var(--sj-card-sub);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.section-micro-header {
  font-size: 0.68rem;
  font-weight: 900;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.capacity-row, .channel-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  padding: 3px 0;
}

.highlight-green {
  color: #34d399;
  font-weight: 900;
}

.btn-save-detalhamento {
  width: 100%;
  background: linear-gradient(135deg, #FF5500 0%, #D93814 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(255, 85, 0, 0.35);
}

.btn-save-detalhamento:hover {
  background: linear-gradient(135deg, #FF661A 0%, #E84520 100%);
  transform: translateY(-1px);
}

/* Donut Breakdown SVG */
.donut-breakdown-layout {
  display: flex;
  align-items: center;
  gap: 24px;
}

.donut-chart-container {
  position: relative;
  width: 170px;
  height: 170px;
  flex-shrink: 0;
}

.donut-center-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.donut-center-val {
  font-size: 1.05rem;
  font-weight: 900;
  color: #34d399;
}

.donut-center-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
}

.donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.legend-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

/* Matriz Multicanal */
.table-responsive {
  overflow-x: auto;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.matrix-table th {
  text-align: left;
  padding: 10px;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle);
}

.matrix-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 700;
}

/* Promo Card */
.promo-highlight-box {
  background: var(--sj-input-bg);
  border: 1.5px solid rgba(192, 132, 252, 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.promo-val-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #c084fc;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.promo-val-num {
  font-size: 1.45rem;
  font-weight: 900;
  color: #c084fc;
  font-family: var(--font-mono);
}

.promo-tagline {
  margin-top: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #c084fc;
  text-align: center;
}

/* Modais */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 7, 10, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--sj-card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card);
  position: relative;
}

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

.modal-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: #ffffff;
}

.modal-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.history-item {
  background: var(--sj-input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.history-item:hover {
  background: var(--sj-card-sub);
  border-color: var(--sj-orange-border);
}

/* Mobile Sticky Bar */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(17, 17, 23, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  padding: 12px 18px;
  z-index: 90;
  justify-content: space-between;
  align-items: center;
}

.mobile-bar-info {
  display: flex;
  flex-direction: column;
}

.mobile-bar-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-bar-numbers {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.mobile-profit-val {
  font-size: 1.35rem;
  font-weight: 900;
  color: #34d399;
  font-family: var(--font-mono);
}

.mobile-margin-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
}

.mobile-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-mobile-details {
  background: var(--sj-card-sub);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-mobile-save {
  background: var(--sj-orange);
  border: none;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #1e1e2d;
  color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: toastFadeIn 0.3s ease;
  pointer-events: auto;
}

@keyframes toastFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsividade */
@media (max-width: 900px) {
  .calc-brand-sub {
    display: none;
  }
}

@media (max-width: 768px) {
  .calc-header {
    height: 52px;
  }
  .calc-header-inner {
    padding: 0 10px;
    gap: 8px;
  }
  .calc-brand-logo-img {
    height: 22px;
  }
  .calc-brand-divider {
    display: none;
  }
  .calc-brand-title {
    display: none;
  }
  .calc-nav-group.actions {
    gap: 4px;
  }
  .calc-nav-group.session {
    gap: 4px;
  }
  .calc-nav-btn {
    height: 32px;
    padding: 0 8px;
    font-size: 0.72rem;
    gap: 4px;
  }
  .calc-btn-label {
    display: none;
  }
  .calc-user-pill {
    height: 32px;
    padding: 0 8px;
    font-size: 0.7rem;
    max-width: 95px;
  }
  .calculator-grid {
    padding: 0;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .marketplace-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .production-breakdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .donut-breakdown-layout {
    flex-direction: column;
    align-items: center;
  }
  .smart-pricing-grid {
    grid-template-columns: 1fr;
  }
  .mobile-sticky-bar {
    display: flex;
  }
}
