*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Arial, sans-serif;
}

body{
  background:#030b18;
  color:white;
  padding:0;
  display:flex;
  flex-direction:column;
  min-height:100vh;
  max-width:100vw;
  overflow-x:hidden;
}

h1{
  display:none;
}

.hidden{
  display:none !important;
}

.auth-screen{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(37,99,235,0.22), transparent 34%),
    radial-gradient(circle at 80% 20%, rgba(147,51,234,0.14), transparent 32%),
    #030b18;
}

.auth-card{
  width:min(460px, 100%);
  border:1px solid rgba(59,130,246,0.32);
  border-radius:16px;
  padding:24px;
  background:rgba(7,18,36,0.96);
  box-shadow:0 30px 80px rgba(0,0,0,0.35);
}

.auth-brand{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:22px;
  color:#f8fafc;
}

.auth-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:14px;
}

.auth-tab,
.auth-form button{
  border:1px solid rgba(59,130,246,0.28);
  background:#0f1d34;
  color:#dbeafe;
  border-radius:10px;
  padding:12px 14px;
  cursor:pointer;
  font-weight:700;
}

.auth-tab.active,
.auth-form button[type="submit"]{
  background:linear-gradient(135deg, #1d4ed8, #2563eb);
  color:#fff;
}

.auth-form{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.auth-form label{
  font-size:13px;
  font-weight:700;
  color:#e5e7eb;
}

.auth-form input{
  width:100%;
  border:1px solid #60a5fa;
  border-radius:10px;
  background:#15243a;
  color:#fff;
  padding:13px 14px;
  outline:none;
}

.password-field{
  position:relative;
  display:flex;
  align-items:center;
}

.password-field input{
  padding-right:48px;
}

.password-toggle{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border:0 !important;
  border-radius:8px !important;
  background:transparent !important;
  color:#93c5fd !important;
  padding:0 !important;
  box-shadow:none !important;
}

.password-toggle:hover{
  background:rgba(96,165,250,0.14) !important;
  color:#dbeafe !important;
}

.password-toggle svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.auth-link{
  background:transparent !important;
  border-color:transparent !important;
  color:#93c5fd !important;
}

.auth-message{
  min-height:22px;
  margin-bottom:8px;
  color:#67e8f9;
  font-size:13px;
}

.auth-message.error{
  color:#fca5a5;
}

.password-rules{
  color:#a5b4fc;
  font-size:12px;
  margin-top:-4px;
}

.container{
  display:flex;
  gap:0;
  flex:1;
  width:100%;
  min-width:0;
}

.sidebar{
  width:275px;
  flex:0 0 275px;
  min-height:100vh;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.16), transparent 46%),
    linear-gradient(180deg, #061326 0%, #020916 100%);
  border-radius:0;
  padding:18px 10px;
  border-right:1px solid rgba(59,130,246,0.22);
  box-shadow:14px 0 42px rgba(0,0,0,0.28);
  display:flex;
  flex-direction:column;
}

.sidebar-brand{
  display:flex;
  align-items:center;
  gap:9px;
  padding:2px 8px 22px;
  color:#f8fafc;
  font-size:15px;
  font-weight:700;
  white-space:nowrap;
}

.brand-mark{
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:8px;
  color:#3b82f6;
  border:1px solid rgba(59,130,246,0.42);
}

.tabs-nav{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.tab-btn{
  background:none;
  border:none;
  color:white;
  text-align:left;
  padding:14px 16px;
  margin:0;
  border-radius:8px;
  border-left:none;
  cursor:pointer;
  font-weight:normal;
  transition:all 0.2s;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  color:#cbd5e1;
}

.tab-btn:hover{
  background:rgba(30,41,59,0.9);
}

.tab-btn.active{
  background:linear-gradient(135deg, #1d4ed8, #2563eb);
  border-left-color:transparent;
  font-weight:bold;
  color:#fff;
  box-shadow:0 12px 30px rgba(37,99,235,0.28);
}

.tab-icon{
  color:#93c5fd;
  width:16px;
  min-width:16px;
  text-align:center;
}

.tab-icon svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.sidebar-profile{
  margin:0 2px 18px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid rgba(148,163,184,0.18);
  border-radius:10px;
  background:rgba(15,23,42,0.76);
  color:#fff;
  cursor:pointer;
  text-align:left;
  width:calc(100% - 4px);
}

.profile-avatar{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:999px;
  background:#059669;
  font-weight:800;
}

.profile-copy{
  display:flex;
  flex-direction:column;
  min-width:0;
  flex:1;
}

.profile-copy strong{
  font-size:12px;
}

.profile-copy small{
  color:#94a3b8;
  font-size:10px;
}

.profile-chevron{
  color:#cbd5e1;
}

.profile-menu{
  margin:-10px 2px 16px;
  border:1px solid rgba(148,163,184,0.2);
  border-radius:10px;
  background:#0b1528;
  padding:8px;
}

.profile-menu button{
  width:100%;
  border:0;
  border-radius:8px;
  background:#ef4444;
  color:#fff;
  padding:9px 10px;
  cursor:pointer;
  font-weight:700;
}

.sidebar-action-wrap{
  padding: 16px;
}

.sidebar-action{
  display:block;
  width:100%;
  text-align:center;
  background:#2563eb;
  color:#fff;
  border-radius:12px;
  padding:14px 12px;
  text-decoration:none;
  font-weight:bold;
  transition: background 0.2s ease;
}

.sidebar-action:hover{
  background:#1d4ed8;
}

.main-content{
  flex:1;
  min-width:0;
  max-width:100%;
  padding:30px 28px 24px;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,0.13), transparent 36%),
    #040b18;
}

.tab-content{
  display:none;
}

.tab-content.active{
  display:block;
}

.top{
  display:flex;
  gap:10px;
  margin-bottom:20px;
  flex-wrap:wrap;
  align-items:center;
}

button{
  background:#2563eb;
  border:none;
  padding:12px 18px;
  border-radius:8px;
  color:white;
  cursor:pointer;
  font-weight:bold;
}

button:hover{
  background:#1d4ed8;
}

.date-range{
  display:flex;
  gap:10px;
  align-items:center;
}

.leads-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:20px;
  flex-wrap:wrap;
}

.lead-form{
  background:#1f2937;
  border:1px solid #374151;
  border-radius:14px;
  padding:22px;
  margin-top:20px;
}

.form-row{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:16px;
}

.form-row label{
  color:#d1d5db;
  font-size:14px;
}

.form-row input,
.form-row select{
  width:100%;
  padding:12px 14px;
  border-radius:10px;
  border:1px solid #374151;
  background:#111827;
  color:white;
}

.form-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

button.secondary{
  background:#374151;
}

button.secondary:hover{
  background:#4b5563;
}

.hidden{
  display:none;
}

.lead-success,
.lead-error{
  padding:14px 16px;
  border-radius:12px;
  margin-bottom:16px;
}

.lead-success{
  background:#064e3b;
  color:#d1fae5;
}

.lead-error{
  background:#7f1d1d;
  color:#fee2e2;
}

.vendas-page-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin:0 0 18px;
}

.vendas-page-header h2{
  font-size:24px;
  margin-bottom:6px;
}

.vendas-page-header p{
  color:#94a3b8;
  font-size:14px;
}

.vendas-header-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.vendas-add-btn{
  border-radius:8px;
  background:#155dfc;
  box-shadow:0 10px 24px rgba(21,93,252,0.26);
  padding:12px 18px;
}

.vendas-export-btn{
  border-radius:8px;
  background:#16a34a;
  box-shadow:0 10px 24px rgba(22,163,74,0.22);
  padding:12px 18px;
}

.vendas-export-btn:hover{
  background:#15803d;
}

.vendas-summary-cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-bottom:22px;
}

.vendas-summary-card{
  display:flex;
  align-items:center;
  gap:18px;
  min-height:92px;
  padding:20px 24px;
  border:1px solid rgba(96,165,250,0.18);
  border-radius:12px;
  background:linear-gradient(145deg, rgba(15,23,42,0.94), rgba(10,23,43,0.96));
  box-shadow:0 18px 50px rgba(0,0,0,0.22);
  position:relative;
  overflow:hidden;
}

.vendas-summary-card::after{
  content:"";
  position:absolute;
  right:24px;
  bottom:18px;
  width:96px;
  height:42px;
  opacity:.7;
  background:linear-gradient(135deg, transparent 15%, rgba(96,165,250,0.16) 16%, transparent 18%, transparent 34%, rgba(96,165,250,0.28) 35%, transparent 38%);
}

.summary-icon{
  display:grid;
  place-items:center;
  width:50px;
  height:50px;
  border-radius:999px;
  color:#fff;
  font-weight:800;
}

.summary-green .summary-icon{ background:#16a34a; }
.summary-blue .summary-icon{ background:#2563eb; }
.summary-purple .summary-icon{ background:#9333ea; }
.summary-orange .summary-icon{ background:#c97706; }

.summary-items-card{
  align-items:flex-start;
}

.summary-items-card > div{
  min-width:0;
  flex:1;
}

.vendas-summary-card small{
  display:block;
  color:#cbd5e1;
  margin-bottom:6px;
}

.vendas-summary-card strong{
  display:block;
  color:#f8fafc;
  font-size:20px;
  margin-bottom:4px;
}

.vendas-summary-card em{
  color:#94a3b8;
  font-size:13px;
  font-style:normal;
}

.top-products-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
  max-height:164px;
  overflow:auto;
  padding-right:4px;
  position:relative;
  z-index:1;
}

.top-product-row{
  display:grid;
  grid-template-columns:24px minmax(0, 1fr) auto;
  align-items:center;
  gap:8px;
  padding:7px 9px;
  border:1px solid rgba(168,85,247,0.22);
  border-radius:8px;
  background:rgba(15,23,42,0.44);
}

.top-product-row span{
  color:#c084fc;
  font-size:12px;
  font-weight:800;
}

.top-product-row strong{
  margin:0;
  font-size:13px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.top-product-row em{
  color:#67e8f9;
  font-size:11px;
  font-weight:700;
  white-space:nowrap;
}

.vendas-search-wrap{
  flex:1;
  min-width:280px;
  max-width:none;
}

.vendas-search-wrap input{
  width:100%;
  padding:13px 16px;
  border-radius:10px;
  border:1px solid rgba(96,165,250,0.24);
  background:rgba(15,23,42,0.76);
  color:white;
}

.vendas-filters{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:28px;
  padding:28px;
  border:1px solid rgba(59,130,246,0.18);
  border-radius:12px;
  background:linear-gradient(180deg, rgba(15,23,42,0.92), rgba(12,24,43,0.96));
}

.vendas-filters-label{
  color:#9ca3af;
  font-size:14px;
}

.vendas-filter-btn{
  background:#374151;
  padding:10px 16px;
  font-size:14px;
}

.vendas-filter-btn.active{
  background:#2563eb;
}

.vendas-filter-btn:hover{
  background:#4b5563;
}

.vendas-filter-btn.active:hover{
  background:#1d4ed8;
}

.produto-filter-wrap{
  position:relative;
}

.produto-filter-button,
.produto-filter-clear,
.date-filter-button{
  background:rgba(51,65,85,0.88);
  padding:12px 16px;
  font-size:13px;
  border:1px solid rgba(148,163,184,0.28);
}

.produto-filter-button,
.date-filter-button{
  min-width:150px;
  text-align:left;
}

.produto-filter-button:hover,
.produto-filter-clear:hover,
.date-filter-button:hover{
  background:#4b5563;
}

.produto-filter-panel,
.date-filter-panel{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  z-index:30;
  width:min(360px, calc(100vw - 32px));
  background:#111827;
  border:1px solid #374151;
  border-radius:10px;
  box-shadow:0 16px 40px rgba(0,0,0,0.35);
  padding:10px;
}

.date-filter-wrap{
  position:relative;
}

.date-filter-panel{
  width:310px;
}

.produto-filter-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
  color:#e5e7eb;
}

.produto-filter-options{
  display:flex;
  flex-direction:column;
  gap:6px;
  max-height:260px;
  overflow-y:auto;
}

.produto-filter-search{
  width:100%;
  min-height:42px;
  margin-bottom:10px;
  padding:10px 12px;
  border-radius:9px;
  border:1px solid var(--rj-line);
  background:var(--rj-input);
  color:var(--rj-input-text);
  font-size:14px;
}

.produto-filter-empty{
  padding:14px 10px;
  color:var(--rj-muted);
  font-size:14px;
  line-height:1.35;
}

.produto-filter-result{
  width:100%;
  display:grid;
  grid-template-columns:74px minmax(0, 1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid var(--rj-line);
  border-radius:9px;
  background:var(--rj-input);
  color:var(--rj-input-text);
  box-shadow:none;
  text-align:left;
}

.produto-filter-result:hover{
  background:var(--rj-filter-hover);
}

.produto-filter-result strong{
  color:var(--rj-blue-dark);
  font-size:13px;
}

.produto-filter-result span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--rj-ink);
  font-size:13px;
}

.produto-filter-result em{
  color:var(--rj-muted);
  font-style:normal;
  font-size:12px;
  white-space:nowrap;
}

.produto-filter-option{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px;
  border-radius:8px;
  color:#f9fafb;
  font-size:14px;
  cursor:pointer;
}

.produto-filter-option:hover{
  background:#1f2937;
}

.produto-filter-option input{
  width:16px;
  height:16px;
  accent-color:#2563eb;
}

.date-filter-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:10px;
  color:#e5e7eb;
  text-transform:capitalize;
}

.calendar-nav-btn{
  padding:8px 10px;
  background:#1e293b;
}

.calendar-weekdays,
.calendar-days{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:6px;
}

.calendar-weekdays{
  color:#94a3b8;
  font-size:12px;
  text-align:center;
  margin-bottom:6px;
}

.calendar-day,
.calendar-empty{
  min-height:34px;
  border-radius:8px;
}

.calendar-day{
  padding:0;
  background:#0f172a;
  border:1px solid #1e293b;
  color:#e5e7eb;
  font-size:13px;
}

.calendar-day:hover{
  background:#1d4ed8;
}

.calendar-day.is-range{
  background:#1e3a8a;
  border-color:#3b82f6;
}

.calendar-day.is-start,
.calendar-day.is-end{
  background:#2563eb;
  color:#fff;
  font-weight:800;
}

.date-filter-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:10px;
}

.btn-editar-lead{
  background:#2563eb;
  padding:8px 16px;
  font-size:13px;
  font-weight:600;
  letter-spacing:0.02em;
  white-space:nowrap;
}

.btn-editar-lead:hover{
  background:#1d4ed8;
}

.btn-excluir-lead{
  background:#dc2626;
  padding:8px 16px;
  font-size:13px;
  font-weight:600;
  letter-spacing:0.02em;
  white-space:nowrap;
}

.btn-excluir-lead:hover{
  background:#b91c1c;
}

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

.btn-enviar-lead{
  background:#16a34a;
  padding:8px 16px;
  font-size:13px;
  font-weight:600;
  letter-spacing:0;
  white-space:nowrap;
}

.btn-enviar-lead:hover{
  background:#15803d;
}

#vendasLeadsTable tbody tr.status-envio-preparando,
#vendasLeadsTable tbody tr.status-envio-etiquetando,
#vendasLeadsTable tbody tr.status-envio-coletado{
  background:rgba(15,23,42,0.58);
}

#vendasLeadsTable tbody tr.status-envio-preparando:hover,
#vendasLeadsTable tbody tr.status-envio-etiquetando:hover,
#vendasLeadsTable tbody tr.status-envio-coletado:hover{
  background:rgba(30,41,59,0.74);
}

.btn-icon-edit,
.btn-icon-send,
.btn-icon-delete{
  width:28px;
  height:28px;
  min-width:28px;
  padding:0;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  line-height:1;
  font-weight:800;
}

.btn-icon-edit{
  background:#2563eb;
  color:#fff;
}

.btn-icon-edit:hover{
  background:#1d4ed8;
}

.btn-icon-send{
  background:#16a34a;
  color:#fff;
}

.btn-icon-send:hover{
  background:#15803d;
}

.btn-icon-delete{
  background:#dc2626;
  color:#fff;
}

.btn-icon-delete:hover{
  background:#b91c1c;
}

.table-action-stack{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  white-space:nowrap;
}

.col-row-actions{
  text-align:center;
  vertical-align:middle;
  white-space:nowrap;
}

.status-envio-filter,
.status-envio-select{
  background:rgba(15,23,42,0.86);
  color:#e5e7eb;
  border:1px solid rgba(148,163,184,0.26);
  border-radius:8px;
}

.status-envio-filter{
  padding:12px 16px;
  min-width:170px;
}

.status-envio-select{
  width:100%;
  padding:6px 7px;
  font-size:10px;
  font-weight:700;
  min-height:28px;
  cursor:pointer;
  border-color:transparent;
  color:#fff;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.status-envio-select.status-envio-preparando{
  background:#f8fafc;
  color:#0f172a;
}

.status-envio-select.status-envio-etiquetando{
  background:#d8a200;
  color:#fff;
}

.status-envio-select.status-envio-coletado{
  background:#f97316;
  color:#fff;
}

.status-envio-select.status-envio-entregue{
  background:#16a34a;
  color:#fff;
}

.status-envio-select option[value="Sem etiqueta"]{ background:#f8fafc; color:#0f172a; }
.status-envio-select option[value="Etiquetado"]{ background:#d8a200; color:#fff; }
.status-envio-select option[value="Enviado"]{ background:#f97316; color:#fff; }
.status-envio-select option[value="Entregue"]{ background:#16a34a; color:#fff; }

.status-atendimento-select{
  border:1px solid #d1d5db;
  border-radius:8px;
  padding:7px 10px;
  font-weight:700;
  min-width:130px;
}

.status-atendimento-pendente{
  background:#fff;
  color:#0f172a;
}

.status-atendimento-atendimento{
  background:#facc15;
  color:#3f2f00;
}

.status-atendimento-select option[value="Pendente"]{ background:#fff; color:#0f172a; }
.status-atendimento-select option[value="Atendimento"]{ background:#facc15; color:#3f2f00; }

.status-logistica-select{
  width:100%;
  min-height:30px;
  padding:6px 8px;
  border:none;
  border-radius:999px;
  color:#fff;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  text-align:center;
}

.status-logistica-sem-etiqueta{
  background:#f8fafc;
  color:#0f172a;
}

.status-logistica-etiquetado{
  background:#d8a200;
  color:#fff;
}

.status-logistica-enviado{
  background:#f97316;
  color:#fff;
}

.status-logistica-entregue{
  background:#16a34a;
  color:#fff;
}

.status-logistica-select option[value="Sem etiqueta"]{ background:#f8fafc; color:#0f172a; }
.status-logistica-select option[value="Etiquetado"]{ background:#d8a200; color:#fff; }
.status-logistica-select option[value="Enviado"]{ background:#f97316; color:#fff; }
.status-logistica-select option[value="Entregue"]{ background:#16a34a; color:#fff; }

.logistica-table-wrapper{
  margin-top:18px;
  width:100%;
  max-width:100%;
  overflow-x:auto !important;
  overflow-y:visible;
  -webkit-overflow-scrolling:touch;
}

.logistica-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  margin:8px 0 12px;
}

.logistica-tools input,
.logistica-tools select{
  width:min(340px, 100%);
  padding:10px 12px;
  border:1px solid rgba(96,165,250,0.24);
  border-radius:10px;
  background:rgba(15,23,42,0.76);
  color:#fff;
  font-size:12px;
}

.logistica-tools select{
  width:min(240px, 100%);
  cursor:pointer;
}

.logistica-filter-th{
  position:relative;
}

.logistica-th-filter{
  padding:0;
  background:transparent;
  color:#fff;
  font-size:inherit;
  line-height:inherit;
  border-radius:0;
}

.logistica-th-filter:hover{
  background:transparent;
  color:#93c5fd;
}

.logistica-filter-panel{
  top:calc(100% + 8px);
}

.logistica-status-panel{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  z-index:35;
  display:flex;
  flex-direction:column;
  width:180px;
  padding:8px;
  border:1px solid #374151;
  border-radius:10px;
  background:#111827;
  box-shadow:0 16px 40px rgba(0,0,0,0.35);
}

.logistica-status-panel.hidden,
.logistica-filter-panel.hidden{
  display:none;
}

.logistica-status-panel button{
  justify-content:flex-start;
  padding:9px 10px;
  border-radius:8px;
  background:transparent;
  font-size:12px;
}

.logistica-status-panel button:hover{
  background:#1f2937;
}

.logistica-status-panel button.active{
  background:#2563eb;
}

.logistica-shopee-panel{
  min-width:220px;
}

.logistica-shopee-add{
  margin-top:6px;
  color:#67e8f9 !important;
  border-top:1px solid rgba(96,165,250,0.18) !important;
}

.logistica-shopee-select{
  width:100%;
  min-height:34px;
  border:1px solid rgba(96,165,250,0.34);
  border-radius:8px;
  background:#111827;
  color:#fff;
  padding:7px 9px;
  font-size:12px;
}

#logisticaTable{
  width:max-content;
  min-width:1500px;
  table-layout:fixed;
}

#logisticaTable th,
#logisticaTable td{
  font-size:12px;
}

#logisticaTable th:nth-child(1),
#logisticaTable td:nth-child(1){
  width:190px;
}

#logisticaTable th:nth-child(2),
#logisticaTable td:nth-child(2),
#logisticaTable th:nth-child(3),
#logisticaTable td:nth-child(3){
  width:140px;
}

#logisticaTable th:nth-child(4),
#logisticaTable td:nth-child(4){
  width:150px;
}

#logisticaTable th:nth-child(5),
#logisticaTable td:nth-child(5){
  width:150px;
}

#logisticaTable th:nth-child(6),
#logisticaTable td:nth-child(6){
  width:150px;
}

#logisticaTable th:nth-child(7),
#logisticaTable td:nth-child(7){
  width:150px;
  text-align:center;
}

#logisticaTable th:nth-child(8),
#logisticaTable td:nth-child(8){
  width:180px;
  text-align:center;
}

#logisticaTable th:nth-child(9),
#logisticaTable td:nth-child(9){
  width:170px;
}

.logistica-extra-field{
  width:100%;
  min-height:32px;
  padding:7px 9px;
  border:1px solid rgba(96,165,250,0.34);
  border-radius:8px;
  background:#334155;
  color:#fff;
  font-size:12px;
}

.logistica-extra-text{
  display:block;
  color:#cbd5e1;
  font-size:12px;
  white-space:normal;
  text-align:center;
}

.logistica-extra-cell{
  text-align:center;
}

.logistica-actions{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
}

.btn-logistica-add,
.btn-logistica-save,
.btn-logistica-send{
  min-height:30px;
  padding:7px 12px;
  font-size:12px;
  border-radius:8px;
}

.btn-logistica-add{
  background:#2563eb;
}

.btn-logistica-save{
  background:#16a34a;
}

.btn-logistica-send{
  background:#0ea5e9;
}

.btn-logistica-add:hover{
  background:#1d4ed8;
}

.btn-logistica-save:hover{
  background:#15803d;
}

.btn-logistica-send:hover{
  background:#0284c7;
}

.btn-spx-track{
  margin-top:6px;
  border:1px solid rgba(96,165,250,0.45);
  border-radius:8px;
  background:#2563eb;
  color:#fff;
  padding:6px 10px;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}

.spx-tracker-modal{
  position:fixed;
  inset:0;
  z-index:50;
  background:rgba(2,6,23,0.78);
  padding:28px;
  display:grid;
  place-items:center;
}

.spx-tracker-panel{
  width:min(1180px, 96vw);
  height:min(760px, 90vh);
  border:1px solid rgba(96,165,250,0.35);
  border-radius:14px;
  background:#071225;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto 1fr auto;
  box-shadow:0 30px 90px rgba(0,0,0,0.45);
}

.spx-tracker-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  border-bottom:1px solid rgba(96,165,250,0.25);
  background:#0b172a;
}

.spx-tracker-head h3{
  margin-bottom:4px;
}

.spx-tracker-head p{
  color:#cbd5e1;
}

.spx-tracker-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.spx-tracker-actions button,
.spx-tracker-actions a{
  border:0;
  border-radius:9px;
  background:#2563eb;
  color:#fff;
  padding:9px 12px;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
}

.spx-tracker-actions .spx-close{
  width:38px;
  height:38px;
  padding:0;
  background:#ef4444;
  font-size:22px;
}

#spxTrackerFrame{
  width:100%;
  height:100%;
  border:0;
  background:#fff;
}

.spx-tracker-note{
  padding:9px 14px;
  color:#94a3b8;
  font-size:12px;
  border-top:1px solid rgba(96,165,250,0.18);
}

.admin-grid{
  display:grid;
  gap:18px;
}

.admin-panel{
  border:1px solid rgba(59,130,246,0.24);
  border-radius:12px;
  background:rgba(15,23,42,0.55);
  padding:16px;
}

.admin-panel h3{
  margin-bottom:12px;
}

.role-select{
  min-width:150px;
  border:1px solid rgba(96,165,250,0.55);
  border-radius:8px;
  background:#111c30;
  color:#fff;
  padding:8px 10px;
}

.user-status-select.status-user-pendente{
  color:#854d0e;
  background:#fff7d6;
  border-color:#facc15;
}

.user-status-select.status-user-ativo{
  color:#166534;
  background:#dcfce7;
  border-color:#22c55e;
}

.user-status-select.status-user-rejeitado{
  color:#991b1b;
  background:#fee2e2;
  border-color:#ef4444;
}

.user-status-select option{
  color:#0f172a;
  background:#fff;
}

.btn-approve,
.btn-resolve-reset,
.btn-delete-user{
  border:0;
  border-radius:8px;
  padding:9px 12px;
  color:#fff;
  background:#16a34a;
  cursor:pointer;
  font-weight:700;
}

.btn-resolve-reset{
  background:#2563eb;
}

.btn-delete-user{
  background:#c10013;
}

.user-action-stack{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.user-active-label{
  color:var(--rj-muted);
  font-weight:800;
}

.status-user-pendente{
  color:#facc15;
  font-weight:800;
}

.status-user-ativo{
  color:#22c55e;
  font-weight:800;
}

.status-user-rejeitado{
  color:#ef4444;
  font-weight:800;
}

.chat-shell{
  height:calc(100vh - 72px);
  min-height:620px;
  display:grid;
  grid-template-columns:330px minmax(0, 1fr);
  border:1px solid rgba(59,130,246,0.28);
  border-radius:14px;
  overflow:hidden;
  background:#071225;
}

.chat-sidebar{
  border-right:1px solid rgba(59,130,246,0.22);
  background:#09182d;
  min-width:0;
  display:flex;
  flex-direction:column;
}

.chat-sidebar-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px;
}

.chat-sidebar-head h2{
  font-size:24px;
}

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

.chat-sidebar-head button{
  width:34px;
  height:34px;
  border:1px solid rgba(96,165,250,0.35);
  border-radius:9px;
  background:#10213b;
  color:#dbeafe;
  cursor:pointer;
}

.chat-contact-form{
  margin:0 14px 14px;
  padding:12px;
  border:1px solid rgba(96,165,250,0.28);
  border-radius:12px;
  background:#0b172a;
  display:grid;
  gap:8px;
}

.chat-contact-form input{
  width:100%;
  border:1px solid rgba(96,165,250,0.36);
  border-radius:9px;
  background:#0d1a2f;
  color:#fff;
  padding:10px 11px;
  outline:none;
}

.chat-contact-form div{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.chat-contact-form button{
  border:0;
  border-radius:9px;
  padding:9px 10px;
  background:#2563eb;
  color:#fff;
  cursor:pointer;
  font-weight:800;
}

.chat-contact-form button[type="button"]{
  background:#334155;
}

.chat-search{
  margin:0 14px 14px;
  border:1px solid rgba(96,165,250,0.36);
  border-radius:10px;
  background:#0d1a2f;
  color:#fff;
  padding:12px 14px;
  outline:none;
}

.chat-section-title{
  padding:10px 18px 8px;
  color:#93c5fd;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
}

.chat-contact-list{
  overflow:auto;
}

.chat-contact{
  width:100%;
  border:0;
  border-top:1px solid rgba(148,163,184,0.1);
  background:transparent;
  color:#fff;
  padding:12px 14px;
  display:grid;
  grid-template-columns:42px minmax(0, 1fr) auto;
  gap:10px;
  text-align:left;
  cursor:pointer;
}

.chat-contact:hover,
.chat-contact.active{
  background:#10213b;
}

.chat-avatar{
  width:38px;
  height:38px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg, #2563eb, #9333ea);
  color:#fff;
  font-weight:900;
}

.chat-contact-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.chat-contact-copy strong,
.chat-contact-copy small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.chat-contact-copy small,
.chat-time,
.chat-group-note,
.chat-message-status{
  color:#94a3b8;
  font-size:12px;
}

.chat-group-note,
.chat-empty{
  margin:0 14px 14px;
  padding:14px;
  border:1px dashed rgba(148,163,184,0.25);
  border-radius:10px;
  color:#94a3b8;
}

.chat-error{
  color:#fca5a5;
}

.chat-panel{
  min-width:0;
  display:grid;
  grid-template-rows:auto 1fr auto auto;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,0.13), transparent 32%),
    #061123;
}

.chat-header{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 18px;
  border-bottom:1px solid rgba(59,130,246,0.22);
  background:#09182d;
}

.chat-header div{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.chat-header small{
  color:#94a3b8;
}

.chat-messages{
  padding:20px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.chat-welcome{
  margin:auto;
  color:#94a3b8;
}

.chat-bubble{
  max-width:min(620px, 76%);
  border-radius:12px;
  padding:10px 12px;
  line-height:1.45;
  box-shadow:0 8px 22px rgba(0,0,0,0.16);
}

.chat-bubble.in{
  align-self:flex-start;
  background:#17243a;
  color:#e5e7eb;
}

.chat-bubble.out{
  align-self:flex-end;
  background:#075e54;
  color:#fff;
}

.chat-bubble small{
  display:block;
  margin-top:5px;
  color:rgba(255,255,255,0.62);
  text-align:right;
  font-size:10px;
}

.chat-compose{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  padding:14px;
  border-top:1px solid rgba(59,130,246,0.22);
  background:#09182d;
}

.chat-compose textarea{
  resize:none;
  min-height:46px;
  max-height:120px;
  border:1px solid rgba(96,165,250,0.35);
  border-radius:12px;
  background:#0d1a2f;
  color:#fff;
  padding:12px 14px;
  outline:none;
}

.chat-compose button{
  border:0;
  border-radius:12px;
  padding:0 20px;
  background:#16a34a;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

.chat-message-status{
  min-height:24px;
  padding:0 16px 10px;
}

.col-produtos{
  min-width:0;
  max-width:none;
  font-size:12px;
  color:#d1d5db;
  line-height:1.4;
}

.col-endereco{
  min-width:0;
  max-width:none;
  color:#e5e7eb;
  font-size:9.5px;
  line-height:1.3;
  display:table-cell;
  white-space:normal;
  word-break:keep-all;
  word-break:normal;
  overflow-wrap:normal;
  hyphens:none;
}

#vendasLeadsTable td:nth-child(3),
#vendasLeadsTable td:nth-child(4),
#vendasLeadsTable td:nth-child(5),
#vendasLeadsTable td:nth-child(8),
#vendasLeadsTable td:nth-child(9),
#vendasLeadsTable td:nth-child(10){
  white-space:nowrap;
}

.produto-items{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.produto-item{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:4px;
  align-items:center;
  padding:6px 8px;
  border:1px solid rgba(96,165,250,0.22);
  border-radius:8px;
  background:rgba(15,31,59,0.78);
}

.produto-item-name{
  color:#f8fafc;
  font-weight:600;
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
  font-size:10px;
}

.produto-item-value{
  color:#67e8f9;
  font-weight:700;
  white-space:nowrap;
  font-size:10px;
}

.lead-name-cell{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.lead-avatar{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  min-width:30px;
  border-radius:999px;
  background:linear-gradient(135deg, #2563eb, #a855f7);
  color:#fff;
  font-weight:800;
  font-size:12px;
}

.lead-name-text{
  min-width:0;
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
  font-weight:700;
  color:#fff;
}

.btn-icon-edit svg,
.btn-icon-send svg,
.btn-icon-delete svg{
  width:14px;
  height:14px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.th-icon{
  display:inline-flex;
  vertical-align:-3px;
  color:#3b82f6;
  margin-right:6px;
}

.th-icon svg{
  width:14px;
  height:14px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.col-valor-total{
  font-weight:600;
  color:#6ee7b7;
  white-space:nowrap;
}

.lead-badge{
  display:inline-block;
  padding:7px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.badge-lead{
  background:#374151;
  color:#e5e7eb;
}

.badge-venda{
  background:rgba(5,150,105,0.72);
  color:#d1fae5;
}

.form-section-title{
  margin:22px 0 12px;
  padding-top:8px;
  border-top:1px solid #374151;
  color:#93c5fd;
  font-size:15px;
  font-weight:600;
}

.venda-form-panel.is-editing{
  border-color:#3b82f6;
  box-shadow:0 0 0 1px rgba(59,130,246,0.35);
}

.venda-fields-readonly{
  background:#0a0f1a;
  border:1px solid #1f2937;
  border-radius:12px;
  padding:16px 18px;
  margin-bottom:20px;
  opacity:0.92;
}

.venda-fields-editable{
  background:#1e293b;
  border:1px solid #3b82f6;
  border-radius:12px;
  padding:16px 18px;
  margin-bottom:8px;
}

.form-section-readonly{
  border-top:none;
  padding-top:0;
  margin-top:0;
  color:#6b7280;
}

.form-section-editable{
  border-top:none;
  padding-top:0;
  margin-top:0;
  color:#93c5fd;
}

.form-row-readonly label{
  color:#6b7280;
}

.form-row-readonly input[readonly]{
  background:#05080f;
  color:#6b7280;
  border-color:#1f2937;
  cursor:not-allowed;
  opacity:0.95;
}

.form-row-editable label{
  color:#f3f4f6;
  font-weight:600;
}

.form-row-editable input,
.form-row-editable select{
  background:#334155;
  color:#f9fafb;
  border-color:#60a5fa;
}

.form-row-editable input:focus,
.form-row-editable select:focus{
  outline:none;
  border-color:#93c5fd;
  box-shadow:0 0 0 2px rgba(147,197,253,0.25);
}

.venda-form-note{
  color:#9ca3af;
  font-size:14px;
  margin:0 0 18px;
}

.produto-row{
  border:1px dashed #60a5fa;
  border-radius:12px;
  padding:10px 12px;
  margin-bottom:10px;
  background:#273549;
}

.produto-row-editable{
  display:grid;
  grid-template-columns:minmax(260px, 1fr) 110px 160px auto;
  gap:8px;
  align-items:end;
}

.produto-row-editable .form-row-editable{
  margin-bottom:0;
}

.produto-row-editable .form-row-editable label{
  margin-bottom:4px;
  font-size:13px;
}

.produto-row-editable .form-row-editable input{
  background:#3d4f66;
}

.produto-row-editable .form-row-editable input,
.produto-row-editable .form-row-editable select{
  min-height:38px;
  padding:8px 10px;
}

.add-produto-btn,
.remove-produto-btn{
  margin-top:0;
  margin-bottom:0;
  min-height:38px;
  padding:8px 14px;
}

.lead-cadastro-form.is-editing{
  border-color:#3b82f6;
  box-shadow:0 0 0 1px rgba(59,130,246,0.35);
}

.lead-cadastro-form .lead-fields-editable{
  background:#1e293b;
  border:1px solid #3b82f6;
  border-radius:12px;
  padding:12px 12px;
  margin-bottom:12px;
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px 12px;
}

.lead-cadastro-form .form-row{
  margin-bottom:0;
}

.lead-cadastro-form .form-row-editable input,
.lead-cadastro-form .form-row-editable select{
  padding:7px 10px;
  min-height:34px;
  height:36px;
  border-radius:9px;
  font-size:15px;
}

.lead-cadastro-form .form-row-editable label{
  margin-bottom:4px;
  font-size:16px;
  line-height:1.15;
}

.lead-cadastro-form .form-section-title{
  grid-column:1 / -1;
}

.form-section-recepcao{ order:0; }
.lead-row-nome{ order:1; }
.lead-row-recepcao-numero{ order:2; }
.lead-row-observacao{ order:3; }
.lead-row-origem{ order:4; }
.lead-row-vendedor{ order:5; }

.form-section-vendedor{ order:10; }
.lead-row-nome-completo{ order:11; }
.lead-row-contato{ order:12; }
.lead-row-nascimento{ order:13; }
.lead-row-cep{ order:14; }
.lead-row-endereco{ order:15; }
.lead-row-complemento{ order:16; }
.lead-row-referencia{ order:17; }
.lead-row-prazo{ order:18; }
.lead-row-entrega{ order:19; }
.lead-row-pagamento{ order:20; }
.lead-row-cpf{ order:21; }
.lead-row-produto{ order:24; }
.lead-row-produto-valor{ order:25; }
.lead-row-status-venda{ order:30; }
.lead-row-shopee-conta{ order:31; }

.vendedores-podio{
  display:grid;
  grid-template-columns:minmax(220px, .55fr) 1fr;
  gap:16px;
  align-items:stretch;
  margin:0 0 18px;
}

.podio-title,
.podio-card{
  border:1px solid rgba(9,57,134,0.18);
  border-radius:14px;
  background:var(--rj-surface);
  box-shadow:0 16px 36px rgba(9,57,134,0.10);
}

.podio-title{
  padding:18px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  color:var(--rj-ink);
}

.podio-title span{
  color:var(--rj-red);
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
}

.podio-title strong{
  font-size:24px;
  line-height:1.05;
}

.podio-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.podio-card{
  min-width:0;
  padding:16px;
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  align-items:center;
  gap:14px;
}

.podio-card.gold{
  border-color:rgba(234,179,8,0.50);
}

.podio-card.silver{
  border-color:rgba(100,116,139,0.40);
}

.podio-medal{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:76px;
  min-height:42px;
  border-radius:999px;
  color:#fff;
  background:linear-gradient(135deg, var(--rj-red), #ef3347);
  font-weight:900;
}

.podio-card.gold .podio-medal{
  background:linear-gradient(135deg, #f59e0b, #c10013);
}

.podio-card.silver .podio-medal{
  background:linear-gradient(135deg, #64748b, var(--rj-blue));
}

.podio-card strong,
.podio-card small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.podio-card strong{
  color:var(--rj-ink);
  font-size:18px;
}

.podio-card small{
  color:var(--rj-muted);
  font-weight:800;
}

.podio-card em{
  color:var(--rj-red);
  font-style:normal;
  font-size:18px;
  font-weight:900;
  white-space:nowrap;
}

.vendedores-cards-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  gap:16px;
}

.vendedores-empty{
  grid-column:1 / -1;
  border:1px solid rgba(59,130,246,0.24);
  border-radius:12px;
  background:rgba(15,23,42,0.72);
  color:#94a3b8;
  padding:24px;
  text-align:center;
}

.vendedores-empty.error{
  color:#fca5a5;
}

.vendedor-card{
  min-width:0;
  min-height:0;
  border:1px solid rgba(59,130,246,0.26);
  border-radius:12px;
  background:linear-gradient(180deg, rgba(9,28,57,0.96), rgba(5,19,40,0.98));
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.02), 0 18px 42px rgba(0,0,0,0.22);
  padding:clamp(14px, 1.4vw, 20px);
}

.vendedor-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:20px;
}

.vendedor-profile{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}

.vendedor-avatar{
  width:56px;
  height:56px;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:24px;
  font-weight:900;
  background:linear-gradient(135deg,#7c3aed,#2563eb);
  box-shadow:0 10px 24px rgba(37,99,235,.28);
  flex:0 0 auto;
}

.vendedor-profile h3{
  margin:0 0 8px;
  color:#f8fafc;
  font-size:clamp(17px, 1.5vw, 20px);
  line-height:1.15;
  text-transform:uppercase;
  overflow-wrap:anywhere;
}

.vendedor-phone-cell{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#cbd5e1;
  font-size:13px;
  white-space:nowrap;
}

.vendedor-phone-cell svg,
.vendedor-card-actions svg,
.vendedor-metric-icon svg,
.vendedor-products-title svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.vendedor-card-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}

.vendedor-card-actions button{
  width:auto;
  min-width:38px;
  height:38px;
  border:1px solid rgba(96,165,250,0.35);
  border-radius:8px;
  background:#2563eb;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 11px;
  font-size:0;
  font-weight:900;
  cursor:pointer;
}

.vendedor-card-actions button span{
  display:none;
  font-size:11px;
}

.vendedor-card-actions button.delete{
  background:#ef3347;
  border-color:rgba(248,113,113,0.46);
}

.vendedor-metrics{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  margin-bottom:22px;
}

.vendedor-metric-card{
  min-width:0;
  min-height:86px;
  border:1px solid rgba(59,130,246,0.22);
  border-radius:8px;
  background:linear-gradient(180deg, rgba(10,37,73,0.86), rgba(7,26,53,0.92));
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  align-items:center;
  gap:9px;
  padding:clamp(10px, 1vw, 12px);
}

.vendedor-metric-card:last-child{
  grid-column:1 / -1;
  grid-template-columns:auto minmax(0, 1fr);
}

.vendedor-metric-content{
  min-width:0;
}

.vendedor-metric-icon{
  width:clamp(30px, 3vw, 36px);
  height:clamp(30px, 3vw, 36px);
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#2f80ff;
  background:rgba(37,99,235,0.16);
}

.vendedor-metric-icon.box{
  color:#a78bfa;
  background:rgba(124,58,237,0.18);
}

.vendedor-metric-icon.money{
  color:#22c55e;
  background:rgba(34,197,94,0.16);
}

.vendedor-metric-card small{
  display:block;
  color:#cbd5e1;
  font-size:clamp(9px, .85vw, 11px);
  font-weight:900;
  line-height:1.2;
  text-transform:uppercase;
}

.vendedor-metric-card strong{
  display:block;
  margin-top:8px;
  color:#f8fafc;
  font-size:clamp(18px, 1.7vw, 22px);
  line-height:1;
  white-space:nowrap;
  max-width:100%;
}

.vendedor-metric-card:last-child strong{
  font-size:clamp(16px, 1.45vw, 20px);
  overflow:visible;
  text-overflow:clip;
  white-space:nowrap;
}

.vendedor-origin-breakdown{
  margin-top:14px;
  padding:14px;
  border:1px solid rgba(37,99,235,0.14);
  border-radius:10px;
  background:rgba(37,99,235,0.06);
}

.vendedor-origin-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.vendedor-origin-head span{
  color:var(--rj-muted);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}

.vendedor-origin-head strong{
  color:var(--rj-blue-dark);
  font-size:13px;
  font-weight:900;
}

.vendedor-origin-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}

.vendedor-origin-pill{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
  padding:9px 10px;
  border:1px solid rgba(9,57,134,0.12);
  border-radius:9px;
  background:var(--rj-surface);
}

.vendedor-origin-pill em{
  min-width:0;
  color:var(--rj-muted);
  font-size:11px;
  font-style:normal;
  font-weight:800;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.vendedor-origin-pill strong{
  color:var(--rj-red);
  font-size:16px;
  font-weight:950;
}

.vendedor-products-title{
  display:flex;
  align-items:center;
  gap:8px;
  color:#f8fafc;
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  margin-bottom:12px;
}

.vendedor-produtos-list{
  display:flex;
  flex-direction:column;
  gap:0;
  width:100%;
  max-width:none;
  margin:0;
  border:1px solid rgba(59,130,246,0.24);
  border-radius:8px;
  overflow:hidden;
  background:rgba(5,18,37,0.36);
}

.vendedor-produto-row{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  gap:10px;
  border-bottom:1px solid rgba(59,130,246,0.14);
  background:rgba(15,23,42,0.12);
  color:#e5e7eb;
  padding:10px 12px;
  font-size:12px;
  line-height:1.1;
}

.vendedor-produto-row:last-child{
  border-bottom:0;
}

.vendedor-produto-row strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  font-weight:600;
  text-align:left;
}

.vendedor-produto-row em{
  color:#67e8f9;
  font-style:normal;
  font-weight:900;
  white-space:nowrap;
}

.vendedor-produtos-empty{
  color:#94a3b8;
  display:block;
  border:1px solid rgba(59,130,246,0.24);
  border-radius:8px;
  padding:12px;
}

.lead-cadastro-form .lead-date-readonly{
  margin-bottom:8px;
}

.top input[type="date"]{
  background:#1f2937;
  color:white;
  border:1px solid #374151;
  border-radius:8px;
  padding:12px 14px;
  min-width:160px;
}

.top button,
.top input[type="date"]{
  height:44px;
}

.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:15px;
  margin-bottom:25px;
}

.card{
  background:#1f2937;
  padding:20px;
  border-radius:12px;
}

.card h2{
  font-size:15px;
  color:#9ca3af;
  margin-bottom:10px;
}

.card p{
  font-size:28px;
  font-weight:bold;
}

table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 7px;
  background:transparent;
  border-radius:0;
  overflow:visible;
  table-layout:fixed;
  border:none;
}

th{
  background:rgba(8,19,39,0.92);
  text-align:left;
  padding:10px 7px;
  font-size:10px;
  line-height:1.2;
  color:#f8fafc;
  border-top:1px solid rgba(59,130,246,0.18);
  border-bottom:1px solid rgba(59,130,246,0.18);
}

td{
  padding:9px 7px;
  border-top:1px solid rgba(59,130,246,0.13);
  border-bottom:1px solid rgba(59,130,246,0.13);
  font-size:10px;
  line-height:1.3;
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
  vertical-align:middle;
  color:#e5e7eb;
  background:rgba(11,27,52,0.86);
}

#vendasLeadsTable td:nth-child(1),
#vendasLeadsTable td:nth-child(2),
#vendasLeadsTable td:nth-child(7){
  vertical-align:top;
}

th:first-child,
td:first-child{
  border-left:1px solid rgba(59,130,246,0.13);
  border-top-left-radius:12px;
  border-bottom-left-radius:12px;
}

th:last-child,
td:last-child{
  border-right:1px solid rgba(59,130,246,0.13);
  border-top-right-radius:12px;
  border-bottom-right-radius:12px;
}

.table-wrapper{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:visible;
  -webkit-overflow-scrolling:touch;
  padding:0;
}

#vendedor-lead .table-wrapper,
#caixa-finalizacao .table-wrapper{
  overflow-x:auto;
  overflow-y:visible;
  -webkit-overflow-scrolling:touch;
  padding-bottom:8px;
}

#vendedorLeadsTable,
#caixaLeadsTable{
  table-layout:fixed;
}

#vendedorLeadsTable{
  min-width:980px;
}

#caixaLeadsTable{
  min-width:1180px;
}

#vendedorLeadsTable th,
#vendedorLeadsTable td,
#caixaLeadsTable th,
#caixaLeadsTable td{
  overflow:hidden;
  text-overflow:ellipsis;
}

#vendedorLeadsTable th,
#caixaLeadsTable th{
  white-space:normal;
}

#vendedorLeadsTable td,
#caixaLeadsTable td{
  white-space:nowrap;
}

#vendedorLeadsTable th:nth-child(1),
#vendedorLeadsTable td:nth-child(1){
  width:17%;
}

#vendedorLeadsTable th:nth-child(2),
#vendedorLeadsTable td:nth-child(2){
  width:14%;
}

#vendedorLeadsTable th:nth-child(3),
#vendedorLeadsTable td:nth-child(3),
#vendedorLeadsTable th:nth-child(4),
#vendedorLeadsTable td:nth-child(4){
  width:14%;
}

#vendedorLeadsTable th:nth-child(5),
#vendedorLeadsTable td:nth-child(5){
  width:15%;
}

#vendedorLeadsTable th:nth-child(6),
#vendedorLeadsTable td:nth-child(6){
  width:16%;
}

#vendedorLeadsTable th:nth-child(7),
#vendedorLeadsTable td:nth-child(7){
  width:10%;
  text-align:center;
}

#vendasLeadsTable th:nth-child(1),
#vendasLeadsTable td:nth-child(1){
  width:10%;
}

#vendasLeadsTable th:nth-child(2),
#vendasLeadsTable td:nth-child(2){
  width:12%;
}

#vendasLeadsTable th:nth-child(3),
#vendasLeadsTable td:nth-child(3){
  width:10%;
}

#vendasLeadsTable th:nth-child(4),
#vendasLeadsTable td:nth-child(4){
  width:7%;
}

#vendasLeadsTable th:nth-child(5),
#vendasLeadsTable td:nth-child(5){
  width:6%;
}

#vendasLeadsTable th:nth-child(6),
#vendasLeadsTable td:nth-child(6){
  width:8%;
}

#vendasLeadsTable th:nth-child(7),
#vendasLeadsTable td:nth-child(7){
  width:14%;
}

#vendasLeadsTable th:nth-child(8),
#vendasLeadsTable td:nth-child(8){
  width:9%;
}

#vendasLeadsTable th:nth-child(9),
#vendasLeadsTable td:nth-child(9){
  width:6%;
}

#vendasLeadsTable th:nth-child(10),
#vendasLeadsTable td:nth-child(10){
  width:8%;
}

#vendasLeadsTable th:nth-child(11),
#vendasLeadsTable td:nth-child(11){
  width:10%;
}

#vendasLeadsTable .lead-badge{
  white-space:normal;
}

.green{
  color:#22c55e;
  font-weight:bold;
}

.red{
  color:#ef4444;
  font-weight:bold;
}

.disabled-account{
  opacity:.55;
}

.account-sm-btn{
  background:#2563eb;
  border:none;
  padding:6px 12px;
  border-radius:6px;
  color:white;
  cursor:pointer;
  font-size:12px;
  font-weight:bold;
}

.account-sm-btn:hover{
  background:#1d4ed8;
}

.account-sm-btn.off{
  background:#6b7280;
}

.account-sm-btn.off:hover{
  background:#4b5563;
}

.account-note{
  font-size:12px;
  color:#9ca3af;
  margin-top:4px;
}

.dashboard-note{
  background:#1f2937;
  padding:12px 16px;
  border-radius:8px;
  margin-bottom:15px;
  border-left:4px solid #2563eb;
  font-size:14px;
  color:#d1d5db;
}

#accountsTable .original-only,
#accountsTable .brl-only {
  display: table-cell;
}

#accountsTable.show-brl .original-only {
  display: none;
}

#accountsTable:not(.show-brl) .brl-only {
  display: none;
}

.kpi-filter-bar{
  display:flex;
  gap:12px;
  align-items:flex-start;
  margin-bottom:15px;
  flex-wrap:wrap;
}

.filter-toggle{
  background:#111827;
  border:1px solid #374151;
  color:white;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
}

.filter-toggle:hover{
  background:#1f2937;
}

.kpi-filters-panel{
  display:none;
  background:#111827;
  border:1px solid #374151;
  border-radius:12px;
  padding:14px;
  width:100%;
  max-width:720px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:10px;
}

.kpi-filters-panel.visible{
  display:grid;
}

.kpi-filter-item{
  display:flex;
  gap:10px;
  align-items:center;
  background:#1f2937;
  padding:10px 12px;
  border-radius:10px;
  font-size:14px;
}

#campaignsTable .kpi-column{
  display:none;
}

#campaignsTable.show-kpi-clicks .kpi-clicks,
#campaignsTable.show-kpi-impressions .kpi-impressions,
#campaignsTable.show-kpi-cpc .kpi-cpc,
#campaignsTable.show-kpi-cpm .kpi-cpm,
#campaignsTable.show-kpi-ctr .kpi-ctr,
#campaignsTable.show-kpi-resultados .kpi-resultados,
#campaignsTable.show-kpi-cpr .kpi-cpr {
  display: table-cell;
}

/* Bolinha de carregamento pequena */
.loading-dot{
  position:fixed;
  top:24px;
  right:24px;
  width:12px;
  height:12px;
  background:linear-gradient(90deg,#60a5fa,#2563eb);
  border-radius:50%;
  box-shadow:0 0 8px rgba(37,99,235,0.6);
  display:none;
  z-index:9999;
  transform-origin:center;
}

.loading-dot.visible{
  display:block;
  animation: pulseDot 1s infinite ease-in-out;
}

@keyframes pulseDot{
  0%{ transform: scale(0.9); opacity:0.8 }
  50%{ transform: scale(1.3); opacity:1 }
  100%{ transform: scale(0.9); opacity:0.8 }
}

@media (max-width:1200px){
  body{
    padding:12px;
  }

  .container{
    flex-direction:column;
  }

  .sidebar{
    width:100%;
    flex:0 0 auto;
    min-height:auto;
    padding:12px;
    border-right:none;
    border-bottom:1px solid rgba(59,130,246,0.22);
  }

  .sidebar-brand{
    padding:0 4px 12px;
  }

  .tabs-nav{
    flex-direction:row;
    flex-wrap:wrap;
    gap:8px;
  }

  .tab-btn{
    flex:1 1 150px;
    border-left:none;
    border-bottom:3px solid transparent;
    padding:12px 14px;
  }

  .tab-btn.active{
    border-left-color:transparent;
    border-bottom-color:#60a5fa;
  }

  .sidebar-profile{
    margin-top:12px;
  }

  .main-content{
    padding:20px 16px;
  }

  .produto-row-editable{
    grid-template-columns:minmax(220px, 1fr) 100px 140px;
  }

  .produto-row-editable .remove-produto-btn{
    grid-column:1 / -1;
    justify-self:start;
  }

  #vendasLeadsTable th,
  #vendasLeadsTable td{
    padding:8px 6px;
    font-size:9px;
  }

  .vendas-summary-cards{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .vendas-filters{
    padding:18px;
  }

  .vendedores-cards-grid{
    grid-template-columns:repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  }

  .vendedores-podio{
    grid-template-columns:1fr;
  }
}

@media (max-width:900px){
  .vendas-page-header{
    align-items:stretch;
  }

  .vendas-header-actions{
    width:100%;
    justify-content:stretch;
  }

  .vendas-header-actions button{
    flex:1 1 180px;
  }

  .vendas-add-btn{
    width:100%;
  }

  .vendas-search-wrap,
  .produto-filter-wrap,
  .date-filter-wrap,
  .produto-filter-button,
  .date-filter-button,
  .status-envio-filter{
    width:100%;
    min-width:0;
  }

  .produto-filter-panel,
  .date-filter-panel{
    width:100%;
    max-width:none;
  }

  .table-wrapper{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    padding-bottom:8px;
  }

  #vendasLeadsTable{
    min-width:1180px;
  }

  #vendedorLeadsTable{
    min-width:980px;
  }

  #caixaLeadsTable{
    min-width:1180px;
  }

  .col-endereco{
    display:table-cell;
    font-size:9px;
    line-height:1.25;
  }

  .col-produtos{
    font-size:10px;
  }

  .produto-item{
    grid-template-columns:minmax(0, 1fr);
  }

  .table-action-stack{
    justify-content:center;
  }

  .lead-cadastro-form .lead-fields-editable{
    grid-template-columns:1fr;
  }

  .podio-grid,
  .podio-card{
    grid-template-columns:1fr;
  }

  .podio-card{
    align-items:start;
  }
}

@media (max-width:720px){
  .admin-grid{
    gap:14px;
  }

  .admin-panel{
    padding:12px;
    border-radius:10px;
  }

  .admin-panel .table-wrapper{
    overflow:visible;
    padding-bottom:0;
  }

  .admin-panel table,
  .admin-panel thead,
  .admin-panel tbody,
  .admin-panel tr,
  .admin-panel td{
    display:block;
    width:100%;
  }

  .admin-panel thead{
    display:none;
  }

  .admin-panel tr{
    margin-bottom:12px;
    padding:12px;
    border:1px solid var(--rj-line);
    border-radius:10px;
    background:var(--rj-table-row);
    box-shadow:0 8px 18px rgba(16,24,40,0.06);
  }

  .admin-panel td{
    display:grid;
    grid-template-columns:minmax(92px, 34%) minmax(0, 1fr);
    align-items:center;
    gap:10px;
    padding:8px 0;
    border:0;
    background:transparent !important;
    text-align:left;
  }

  .admin-panel td::before{
    content:attr(data-label);
    color:var(--rj-muted);
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
  }

  .admin-panel td[colspan]{
    display:block;
    text-align:center;
  }

  .admin-panel td[colspan]::before{
    content:'';
    display:none;
  }

  .role-select,
  .user-action-stack,
  .btn-approve,
  .btn-resolve-reset,
  .btn-delete-user{
    width:100%;
    min-width:0;
  }

  .user-action-stack{
    justify-content:stretch;
  }

  .user-action-stack > *{
    flex:1 1 130px;
    text-align:center;
  }

  .produto-row-editable{
    grid-template-columns:1fr;
  }

  .produto-row-editable .remove-produto-btn{
    width:100%;
  }

  .vendas-page-header{
    flex-direction:column;
  }

  .vendas-summary-cards{
    grid-template-columns:1fr;
  }

  .vendas-summary-card{
    min-height:82px;
    padding:16px;
  }

  .vendas-summary-card::after{
    right:12px;
    opacity:.45;
  }

  .summary-icon{
    width:44px;
    height:44px;
  }

  .vendas-filters{
    padding:14px;
    gap:10px;
  }

  .vendas-filters-label{
    width:100%;
  }

  .lead-form,
  .venda-fields-readonly,
  .venda-fields-editable{
    padding:14px;
  }
}

@media (max-width:520px){
  body{
    padding:0;
  }

  .main-content{
    padding:16px 10px;
  }

  .sidebar{
    padding:10px;
  }

  .sidebar-brand{
    font-size:14px;
  }

  .tab-btn{
    flex:1 1 calc(50% - 8px);
    padding:10px;
    font-size:12px;
  }

  .sidebar-profile{
    padding:8px;
  }

  .vendas-page-header h2{
    font-size:22px;
  }

  .vendas-add-btn,
  .produto-filter-button,
  .date-filter-button,
  .status-envio-filter,
  .vendas-search-wrap input{
    padding:11px 12px;
    font-size:12px;
  }

  .date-filter-panel{
    position:fixed;
    left:10px;
    right:10px;
    top:96px;
    width:auto;
    max-height:calc(100vh - 116px);
    overflow:auto;
  }

  .calendar-days,
  .calendar-weekdays{
    gap:5px;
  }

  .calendar-day,
  .calendar-empty{
    min-height:32px;
  }

  #vendasLeadsTable td{
    font-size:9px;
    padding:8px 6px;
  }

  #vendedorLeadsTable th,
  #vendedorLeadsTable td,
  #caixaLeadsTable th,
  #caixaLeadsTable td{
    font-size:11px;
    padding:9px 10px;
  }

  #vendedorLeadsTable .status-atendimento-select,
  #caixaLeadsTable .status-envio-select{
    min-width:124px;
    font-size:10px;
  }

  .lead-name-cell{
    gap:8px;
  }

  .lead-avatar{
    width:28px;
    height:28px;
    min-width:28px;
    font-size:11px;
  }

  .status-envio-select{
    max-width:180px;
  }

  .produto-item{
    grid-template-columns:minmax(0, 1fr);
  }

  .form-actions{
    flex-direction:column;
  }

  .form-actions button{
    width:100%;
  }

  .vendedor-card{
    min-height:auto;
    padding:16px;
  }

  .vendedor-card-head{
    align-items:flex-start;
  }

  .vendedor-avatar{
    width:48px;
    height:48px;
    font-size:20px;
  }

  .vendedor-profile h3{
    font-size:17px;
  }

  .vendedor-metrics{
    grid-template-columns:1fr;
  }

  .vendedor-origin-list{
    grid-template-columns:1fr;
  }

  .vendedor-metric-card:last-child{
    grid-column:auto;
  }

  .vendedor-metric-card{
    min-height:70px;
  }

  .logistica-tools{
    margin-bottom:10px;
  }

  .logistica-tools input,
  .logistica-tools select{
    width:100%;
    min-width:0;
    min-height:42px;
    font-size:12px;
  }

  .logistica-table-wrapper{
    margin:0 -10px;
    padding:0 10px 10px;
    overflow-x:auto !important;
    overflow-y:visible;
    -webkit-overflow-scrolling:touch;
  }

  #logisticaTable{
    width:max-content;
    min-width:1380px;
    table-layout:fixed;
  }

  #logisticaTable th,
  #logisticaTable td{
    padding:8px 6px;
    font-size:10px;
    line-height:1.25;
    vertical-align:middle;
  }

  #logisticaTable th:nth-child(1),
  #logisticaTable td:nth-child(1){
    width:170px;
  }

  #logisticaTable th:nth-child(2),
  #logisticaTable td:nth-child(2){
    width:130px;
  }

  #logisticaTable th:nth-child(3),
  #logisticaTable td:nth-child(3){
    width:125px;
  }

  #logisticaTable th:nth-child(4),
  #logisticaTable td:nth-child(4){
    width:130px;
  }

  #logisticaTable th:nth-child(5),
  #logisticaTable td:nth-child(5){
    width:135px;
  }

  #logisticaTable th:nth-child(6),
  #logisticaTable td:nth-child(6){
    width:130px;
  }

  #logisticaTable th:nth-child(7),
  #logisticaTable td:nth-child(7){
    width:130px;
  }

  #logisticaTable th:nth-child(8),
  #logisticaTable td:nth-child(8){
    width:165px;
  }

  #logisticaTable th:nth-child(9),
  #logisticaTable td:nth-child(9){
    width:145px;
  }

  .status-logistica-select,
  .logistica-shopee-select{
    min-width:96px;
    min-height:34px;
    padding:7px 22px 7px 8px;
    font-size:10px;
  }

  .logistica-extra-text{
    font-size:10px;
    line-height:1.25;
  }

  .logistica-extra-field{
    min-height:30px;
    padding:6px 7px;
    font-size:10px;
  }

  .logistica-actions{
    gap:6px;
  }

  .btn-logistica-add,
  .btn-logistica-save,
  .btn-logistica-send,
  .btn-spx-track{
    min-height:30px;
    padding:6px 8px;
    font-size:10px;
    border-radius:7px;
  }

  .btn-spx-track{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-top:5px;
    width:100%;
  }

  .spx-tracker-modal{
    padding:0;
    align-items:stretch;
    justify-items:stretch;
  }

  .spx-tracker-panel{
    width:100vw;
    height:100dvh;
    max-height:100dvh;
    border-radius:0;
    border-left:0;
    border-right:0;
  }

  .spx-tracker-head{
    align-items:flex-start;
    gap:10px;
    padding:12px;
  }

  .spx-tracker-head h3{
    font-size:16px;
  }

  .spx-tracker-head p,
  .spx-tracker-note{
    font-size:11px;
  }

  .spx-tracker-actions{
    justify-content:flex-end;
    gap:6px;
  }

  .spx-tracker-actions button,
  .spx-tracker-actions a{
    padding:8px 9px;
    font-size:11px;
    border-radius:8px;
  }

  .spx-tracker-actions .spx-close{
    width:34px;
    height:34px;
    font-size:20px;
  }
}

/* RJ Moveis visual theme */
:root{
  --rj-blue:#003ea8;
  --rj-blue-dark:#062862;
  --rj-blue-soft:#eaf2ff;
  --rj-red:#c60d15;
  --rj-red-dark:#9f0710;
  --rj-ink:#111827;
  --rj-muted:#667085;
  --rj-line:#dbe4f0;
  --rj-panel:#ffffff;
  --rj-bg:#f5f7fb;
}

body{
  background:var(--rj-bg);
  color:var(--rj-ink);
}

.auth-screen{
  background:linear-gradient(120deg, rgba(0,62,168,0.10), rgba(198,13,21,0.08)), var(--rj-bg);
}

.auth-card{
  background:#fff;
  border:1px solid var(--rj-line);
  box-shadow:0 24px 60px rgba(16,24,40,0.16);
}

.auth-brand-logo{
  justify-content:center;
  margin-bottom:22px;
}

.auth-brand-logo img{
  width:min(320px, 100%);
  height:auto;
  display:block;
  border-radius:10px;
  border:1px solid rgba(17,24,39,0.10);
  box-shadow:0 12px 28px rgba(17,24,39,0.12);
}

.auth-tab,
.auth-form button{
  background:#fff;
  color:var(--rj-blue-dark);
  border:1px solid #b8c8e3;
}

.auth-tab.active,
.auth-form button[type="submit"],
button,
.sidebar-action,
.vendas-add-btn,
.vendas-export-btn,
.filter-toggle,
.btn-icon-edit,
.btn-logistica-save,
.btn-spx-track{
  background:linear-gradient(135deg, var(--rj-red), var(--rj-red-dark));
  color:#fff;
  box-shadow:0 8px 18px rgba(198,13,21,0.18);
}

.auth-tab.active:hover,
.auth-form button[type="submit"]:hover,
button:hover,
.sidebar-action:hover,
.vendas-add-btn:hover,
.vendas-export-btn:hover,
.filter-toggle:hover,
.btn-icon-edit:hover,
.btn-logistica-save:hover,
.btn-spx-track:hover{
  background:linear-gradient(135deg, #df1b24, var(--rj-red));
}

.auth-form label,
.form-row label,
.form-row-editable label{
  color:var(--rj-ink);
}

.auth-form input,
.form-row input,
.form-row select,
.form-row textarea,
.form-row-editable input,
.form-row-editable select,
.vendas-search-wrap input,
.logistica-tools input,
.logistica-tools select,
.top input[type="date"],
.date-filter-button,
.produto-filter-button,
.status-atendimento-select,
.status-envio-select,
.status-logistica-select,
.logistica-shopee-select{
  background:#fff;
  color:var(--rj-ink);
  border-color:#b8c8e3;
}

.auth-form input:focus,
.form-row input:focus,
.form-row select:focus,
.form-row-editable input:focus,
.form-row-editable select:focus,
.vendas-search-wrap input:focus,
.logistica-tools input:focus{
  border-color:var(--rj-blue);
  box-shadow:0 0 0 3px rgba(0,62,168,0.12);
}

.auth-link,
.password-toggle,
.tab-icon{
  color:var(--rj-blue) !important;
}

.password-toggle:hover{
  background:var(--rj-blue-soft) !important;
  color:var(--rj-blue-dark) !important;
}

.auth-message{
  color:var(--rj-blue);
}

.password-rules,
.dashboard-note,
.venda-form-note,
.vendas-page-header p,
.card h2,
.profile-copy small{
  color:var(--rj-muted);
}

.sidebar{
  background:#fff;
  border-right:1px solid var(--rj-line);
  box-shadow:10px 0 30px rgba(16,24,40,0.08);
}

.sidebar-brand-logo{
  padding:0 6px 20px;
}

.sidebar-brand-logo img{
  width:100%;
  max-width:238px;
  height:auto;
  display:block;
  border-radius:9px;
  border:1px solid rgba(17,24,39,0.10);
}

.sidebar-profile{
  background:#f8fbff;
  color:var(--rj-ink);
  border:1px solid var(--rj-line);
}

.profile-avatar{
  background:var(--rj-blue);
}

.profile-chevron{
  color:var(--rj-blue);
}

.profile-menu{
  background:#fff;
  border:1px solid var(--rj-line);
  box-shadow:0 12px 24px rgba(16,24,40,0.14);
}

.tab-btn{
  color:#263145;
}

.tab-btn:hover{
  background:var(--rj-blue-soft);
  color:var(--rj-blue-dark);
}

.tab-btn.active{
  background:linear-gradient(135deg, var(--rj-blue), #0759d6);
  color:#fff;
  box-shadow:0 12px 26px rgba(0,62,168,0.20);
}

.tab-btn.active .tab-icon{
  color:#fff !important;
}

.main-content{
  background:linear-gradient(180deg, rgba(255,255,255,0.82), rgba(245,247,251,0.96)), var(--rj-bg);
}

.lead-form,
.venda-fields-editable,
.card,
.vendas-summary-card,
.vendedor-card,
.vendedor-metric-card,
.produto-filter-panel,
.date-filter-panel,
.logistica-status-panel{
  background:var(--rj-panel);
  border:1px solid var(--rj-line);
  color:var(--rj-ink);
  box-shadow:0 12px 28px rgba(16,24,40,0.08);
}

.lead-cadastro-form .lead-fields-editable,
.produto-row-editable,
.send-lead-panel .venda-fields-editable{
  background:#f8fbff;
  border-color:var(--rj-line);
}

.form-section-title,
.form-section-editable,
.vendas-page-header h2,
.lead-form h3,
.vendedor-profile h3,
.chat-sidebar-head h2{
  color:var(--rj-blue-dark);
}

.card p,
.vendas-summary-card strong,
.vendedor-metric-card strong{
  color:var(--rj-red);
}

.lead-success{
  background:#e8f7ee;
  color:#126b35;
  border:1px solid #b8e4c8;
}

.lead-error{
  background:#fff0f1;
  color:#9f0710;
  border:1px solid #f3bec2;
}

button.secondary,
.auth-form button.auth-link,
.btn-logistica-add,
.btn-logistica-send{
  background:#eef3fb !important;
  color:var(--rj-blue-dark) !important;
  border:1px solid #c9d7ec;
  box-shadow:none;
}

button.secondary:hover,
.auth-form button.auth-link:hover,
.btn-logistica-add:hover,
.btn-logistica-send:hover{
  background:#dfeafa !important;
}

th{
  background:var(--rj-blue-dark);
  color:#fff;
  border-color:rgba(255,255,255,0.08);
}

td{
  background:#fff;
  color:#263145;
  border-color:var(--rj-line);
}

.table-wrapper{
  border-radius:12px;
}

.vendas-filters,
.logistica-tools,
.dashboard-note{
  background:#fff;
  border:1px solid var(--rj-line);
  color:var(--rj-ink);
  box-shadow:0 8px 22px rgba(16,24,40,0.06);
}

.produto-filter-panel button,
.logistica-status-panel button{
  color:var(--rj-ink);
}

.produto-filter-option:hover,
.logistica-status-panel button:hover{
  background:var(--rj-blue-soft);
}

.produto-filter-clear,
.calendar-nav-btn{
  background:#eef3fb;
  color:var(--rj-blue-dark);
  box-shadow:none;
}

.status-atendimento-select.status-pendente,
.status-envio-select.status-envio-pendente,
.status-logistica-select.status-logistica-sem-etiqueta{
  background:#fff;
  color:var(--rj-ink);
}

.status-atendimento-select.status-atendimento,
.status-envio-select.status-envio-finalizado,
.status-logistica-select.status-logistica-entregue{
  background:#e8f7ee;
  color:#126b35;
}

.loading-dot{
  background:var(--rj-red);
  box-shadow:0 0 0 6px rgba(198,13,21,0.15);
}

#recepcao-cadastro #vendasLeadsTable{
  border-spacing:0 10px;
  table-layout:auto;
}

#recepcao-cadastro #vendasLeadsTable th{
  padding:13px 14px;
  font-size:14px;
  line-height:1.25;
}

#recepcao-cadastro #vendasLeadsTable td{
  padding:12px 14px;
  font-size:14px;
  line-height:1.35;
  font-weight:600;
}

#recepcao-cadastro #vendasLeadsTable th:nth-child(1),
#recepcao-cadastro #vendasLeadsTable td:nth-child(1){
  width:18%;
}

#recepcao-cadastro #vendasLeadsTable th:nth-child(2),
#recepcao-cadastro #vendasLeadsTable td:nth-child(2){
  width:14%;
  text-align:center;
  vertical-align:middle;
}

#recepcao-cadastro #vendasLeadsTable th:nth-child(3),
#recepcao-cadastro #vendasLeadsTable td:nth-child(3){
  width:15%;
}

#recepcao-cadastro #vendasLeadsTable th:nth-child(4),
#recepcao-cadastro #vendasLeadsTable td:nth-child(4){
  width:19%;
}

#recepcao-cadastro #vendasLeadsTable th:nth-child(5),
#recepcao-cadastro #vendasLeadsTable td:nth-child(5){
  width:15%;
}

#recepcao-cadastro #vendasLeadsTable th:nth-child(6),
#recepcao-cadastro #vendasLeadsTable td:nth-child(6){
  width:10%;
}

#recepcao-cadastro #vendasLeadsTable th:nth-child(7),
#recepcao-cadastro #vendasLeadsTable td:nth-child(7){
  width:9%;
  text-align:center;
}

#recepcao-cadastro .lead-name-cell{
  gap:12px;
}

#recepcao-cadastro .lead-avatar{
  width:40px;
  height:40px;
  min-width:40px;
  font-size:15px;
}

#recepcao-cadastro .lead-name-text{
  color:var(--rj-ink);
  font-size:14px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

#recepcao-cadastro .status-atendimento-select{
  min-height:38px;
  font-size:14px;
  font-weight:800;
  padding:8px 34px 8px 14px;
}

#recepcao-cadastro #vendasLeadsTable td:nth-child(2),
#recepcao-cadastro #vendasLeadsTable td:nth-child(4),
#recepcao-cadastro #vendasLeadsTable td:nth-child(5),
#recepcao-cadastro #vendasLeadsTable td:nth-child(6){
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

#recepcao-cadastro #vendasLeadsTable td:nth-child(2){
  font-size:13px;
  font-weight:800;
  line-height:1.2;
}

#recepcao-cadastro .table-action-stack{
  justify-content:center;
}

#recepcao-cadastro .btn-icon-edit,
#recepcao-cadastro .btn-icon-delete{
  width:42px;
  height:42px;
  min-width:42px;
  border-radius:999px;
}

#recepcao-cadastro .btn-icon-edit svg,
#recepcao-cadastro .btn-icon-delete svg{
  width:20px;
  height:20px;
}

#estoque .table-wrapper{
  overflow-x:auto;
}

#estoqueTable{
  border-spacing:0 10px;
  table-layout:auto;
}

#estoqueTable th{
  padding:15px 18px;
  font-size:15px;
  line-height:1.25;
}

#estoqueTable td{
  padding:18px 18px;
  font-size:17px;
  line-height:1.35;
  font-weight:600;
}

#estoqueTable th:nth-child(1),
#estoqueTable td:nth-child(1){
  width:16%;
}

#estoqueTable th:nth-child(2),
#estoqueTable td:nth-child(2){
  width:58%;
}

#estoqueTable th:nth-child(3),
#estoqueTable td:nth-child(3){
  width:12%;
  text-align:center;
}

#estoqueTable th:nth-child(4),
#estoqueTable td:nth-child(4){
  width:14%;
  text-align:center;
}

#estoqueTable .btn-icon-edit{
  width:42px;
  height:42px;
  min-width:42px;
  padding:0;
  border-radius:999px;
}

#estoqueTable .btn-icon-edit svg{
  width:20px;
  height:20px;
}

.lead-name-button,
.lead-inline-link{
  border:0;
  background:transparent !important;
  color:var(--rj-ink) !important;
  box-shadow:none !important;
  padding:0;
  margin:0;
  text-align:left;
  cursor:pointer;
  font:inherit;
}

.lead-name-button:hover .lead-name-text,
.lead-inline-link:hover{
  color:var(--rj-ink) !important;
  text-decoration:underline;
}

.lead-inline-link{
  display:inline-block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:800;
}

.lead-details-modal{
  position:fixed;
  inset:0;
  z-index:1200;
  display:grid;
  place-items:center;
  padding:22px;
  background:rgba(2,6,23,0.58);
}

.lead-details-panel{
  width:min(920px, 100%);
  max-height:min(86vh, 760px);
  overflow:auto;
  border:1px solid var(--rj-line);
  border-radius:14px;
  background:var(--rj-panel);
  color:var(--rj-ink);
  box-shadow:0 28px 80px rgba(2,6,23,0.32);
}

.lead-details-head{
  position:sticky;
  top:0;
  z-index:1;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  border-bottom:1px solid var(--rj-line);
  background:var(--rj-panel);
}

.lead-details-head h3{
  margin:0;
  color:var(--rj-blue-dark);
  font-size:20px;
}

.lead-details-head p{
  margin:4px 0 0;
  color:var(--rj-muted);
  font-size:13px;
}

.lead-details-close{
  width:36px;
  height:36px;
  min-width:36px;
  border-radius:999px;
  padding:0;
  font-size:24px;
  line-height:1;
}

.lead-details-body{
  display:grid;
  gap:14px;
  padding:18px 20px 22px;
}

.lead-detail-section{
  border:1px solid var(--rj-line);
  border-radius:12px;
  padding:14px;
  background:var(--rj-filter-panel);
}

.lead-detail-section h4{
  margin:0 0 12px;
  color:var(--rj-blue-dark);
  font-size:15px;
}

.lead-detail-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
}

.lead-detail-item{
  min-width:0;
  border:1px solid var(--rj-line);
  border-radius:9px;
  padding:10px 11px;
  background:var(--rj-input);
}

.lead-detail-item span{
  display:block;
  color:var(--rj-muted);
  font-size:12px;
  margin-bottom:4px;
}

.lead-detail-item strong{
  display:block;
  color:var(--rj-ink);
  font-size:14px;
  line-height:1.25;
  overflow-wrap:anywhere;
}

#vendedorLeadsTable th,
 #vendedorLeadsTable td,
#caixaLeadsTable th,
#caixaLeadsTable td,
#logisticaTable th,
#logisticaTable td{
  font-size:12px;
  line-height:1.25;
}

#vendedorLeadsTable th{
  padding:13px 12px;
  font-size:14px;
}

#vendedorLeadsTable td{
  padding:14px 12px;
  font-size:14px;
  line-height:1.3;
  font-weight:600;
}

#vendedorLeadsTable .status-atendimento-select{
  min-height:40px;
  font-size:14px;
  font-weight:800;
}

#vendedorLeadsTable td,
#caixaLeadsTable td{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media (max-width:520px){
  #vendedorLeadsTable th,
  #vendedorLeadsTable td,
  #caixaLeadsTable th,
  #caixaLeadsTable td{
    font-size:11px;
    padding:9px 10px;
  }

  #vendedorLeadsTable .status-atendimento-select,
  #caixaLeadsTable .status-envio-select{
    min-width:124px;
    min-height:34px;
    font-size:10px;
  }
}

@media (max-width:760px){
  .lead-details-modal{
    padding:10px;
    align-items:stretch;
  }

  .lead-details-panel{
    max-height:calc(100vh - 20px);
  }

  .lead-detail-grid{
    grid-template-columns:1fr;
  }

  .sidebar-brand-logo{
    width:170px;
    min-width:170px;
    padding:0;
  }

  .sidebar-brand-logo img{
    max-width:170px;
  }
}

/* Theme contrast layer */
html[data-theme="light"]{
  --rj-blue:#003ea8;
  --rj-blue-dark:#062862;
  --rj-blue-soft:#eaf2ff;
  --rj-red:#c60d15;
  --rj-red-dark:#9f0710;
  --rj-ink:#111827;
  --rj-muted:#667085;
  --rj-line:#dbe4f0;
  --rj-panel:#ffffff;
  --rj-bg:#f5f7fb;
  --rj-input:#ffffff;
  --rj-input-text:#111827;
  --rj-filter-panel:#ffffff;
  --rj-filter-hover:#eaf2ff;
  --rj-table-row:#ffffff;
  --rj-table-head:#062862;
  --rj-secondary:#eef3fb;
  --rj-secondary-hover:#dfeafa;
}

html[data-theme="dark"]{
  --rj-blue:#4f8cff;
  --rj-blue-dark:#8db7ff;
  --rj-blue-soft:#15294f;
  --rj-red:#ef3347;
  --rj-red-dark:#bd0f20;
  --rj-ink:#f8fafc;
  --rj-muted:#cbd5e1;
  --rj-line:#31445f;
  --rj-panel:#101b2d;
  --rj-bg:#06101f;
  --rj-input:#17243a;
  --rj-input-text:#f8fafc;
  --rj-filter-panel:#101b2d;
  --rj-filter-hover:#1f3658;
  --rj-table-row:#101b2d;
  --rj-table-head:#071a3d;
  --rj-secondary:#1f2f49;
  --rj-secondary-hover:#2b4267;
}

html[data-theme] body{
  background:var(--rj-bg);
  color:var(--rj-ink);
}

html[data-theme] .auth-screen,
html[data-theme] .main-content{
  background:
    linear-gradient(120deg, rgba(0,62,168,0.08), rgba(198,13,21,0.06)),
    var(--rj-bg);
}

html[data-theme] .auth-card,
html[data-theme] .sidebar,
html[data-theme] .lead-form,
html[data-theme] .venda-fields-editable,
html[data-theme] .card,
html[data-theme] .vendas-summary-card,
html[data-theme] .vendedor-card,
html[data-theme] .vendedor-metric-card,
html[data-theme] .produto-filter-panel,
html[data-theme] .date-filter-panel,
html[data-theme] .logistica-filter-panel,
html[data-theme] .logistica-status-panel,
html[data-theme] .profile-menu,
html[data-theme] .vendas-filters,
html[data-theme] .logistica-tools,
html[data-theme] .dashboard-note{
  background:var(--rj-panel);
  color:var(--rj-ink);
  border-color:var(--rj-line);
}

html[data-theme] .lead-cadastro-form .lead-fields-editable,
html[data-theme] .produto-row-editable,
html[data-theme] .send-lead-panel .venda-fields-editable,
html[data-theme] .sidebar-profile{
  background:var(--rj-filter-panel);
  color:var(--rj-ink);
  border-color:var(--rj-line);
}

html[data-theme] .theme-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--rj-line);
  border-radius:12px;
  padding:12px;
  margin:0 0 12px;
  background:var(--rj-filter-panel);
  color:var(--rj-ink);
  box-shadow:0 8px 22px rgba(16,24,40,0.08);
}

html[data-theme] .theme-toggle:hover{
  background:var(--rj-filter-hover);
}

.theme-toggle-copy{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  min-width:0;
}

.theme-toggle-copy strong{
  font-size:13px;
  line-height:1.1;
}

.theme-toggle-copy small{
  color:var(--rj-muted);
  font-size:11px;
  line-height:1.1;
}

.theme-toggle-track{
  width:46px;
  height:26px;
  flex:0 0 46px;
  border-radius:999px;
  padding:3px;
  background:#c8d5e8;
  transition:background 0.2s ease;
}

.theme-toggle-thumb{
  display:block;
  width:20px;
  height:20px;
  border-radius:999px;
  background:#fff;
  box-shadow:0 2px 6px rgba(16,24,40,0.24);
  transform:translateX(0);
  transition:transform 0.2s ease;
}

.theme-toggle.is-dark .theme-toggle-track{
  background:var(--rj-blue);
}

.theme-toggle.is-dark .theme-toggle-thumb{
  transform:translateX(20px);
}

html[data-theme] .auth-tab,
html[data-theme] .auth-form button:not([type="submit"]),
html[data-theme] button.secondary,
html[data-theme] .produto-filter-clear,
html[data-theme] .produto-filter-result,
html[data-theme] .calendar-nav-btn,
html[data-theme] .date-filter-button,
html[data-theme] .produto-filter-button,
html[data-theme] .btn-logistica-add,
html[data-theme] .btn-logistica-send{
  background:var(--rj-secondary) !important;
  color:var(--rj-ink) !important;
  border-color:var(--rj-line);
  box-shadow:none;
}

html[data-theme] .auth-tab:hover,
html[data-theme] .auth-form button:not([type="submit"]):hover,
html[data-theme] button.secondary:hover,
html[data-theme] .produto-filter-clear:hover,
html[data-theme] .produto-filter-result:hover,
html[data-theme] .calendar-nav-btn:hover,
html[data-theme] .date-filter-button:hover,
html[data-theme] .produto-filter-button:hover,
html[data-theme] .btn-logistica-add:hover,
html[data-theme] .btn-logistica-send:hover{
  background:var(--rj-secondary-hover) !important;
}

html[data-theme] .auth-tab.active,
html[data-theme] .auth-form button[type="submit"],
html[data-theme] button:not(.secondary):not(.auth-link):not(.theme-toggle):not(.produto-filter-button):not(.date-filter-button):not(.calendar-nav-btn):not(.produto-filter-clear){
  color:#fff;
}

html[data-theme] .auth-tab.active,
html[data-theme] .auth-form button[type="submit"]{
  background:linear-gradient(135deg, var(--rj-red), var(--rj-red-dark)) !important;
  color:#fff !important;
}

html[data-theme] .password-toggle{
  background:transparent !important;
  color:var(--rj-blue) !important;
  border-color:transparent !important;
  box-shadow:none !important;
}

html[data-theme] input,
html[data-theme] select,
html[data-theme] textarea,
html[data-theme] .vendas-search-wrap input,
html[data-theme] .logistica-tools input,
html[data-theme] .logistica-tools select,
html[data-theme] .status-envio-filter,
html[data-theme] .status-envio-select,
html[data-theme] .status-atendimento-select,
html[data-theme] .status-logistica-select,
html[data-theme] .logistica-shopee-select,
html[data-theme] .role-select{
  background:var(--rj-input) !important;
  color:var(--rj-input-text) !important;
  border-color:var(--rj-line) !important;
}

html[data-theme] input::placeholder,
html[data-theme] textarea::placeholder{
  color:var(--rj-muted);
  opacity:1;
}

html[data-theme] label,
html[data-theme] .form-row label,
html[data-theme] .form-row-editable label,
html[data-theme] .produto-filter-panel-head,
html[data-theme] .date-filter-head,
html[data-theme] .produto-filter-option,
html[data-theme] .kpi-filter-item,
html[data-theme] .vendas-filters-label,
html[data-theme] .profile-copy strong,
html[data-theme] .tab-btn,
html[data-theme] td{
  color:var(--rj-ink);
}

html[data-theme] .tab-btn{
  color:var(--rj-ink) !important;
}

html[data-theme] .profile-copy small,
html[data-theme] .password-rules,
html[data-theme] .dashboard-note,
html[data-theme] .venda-form-note,
html[data-theme] .vendas-page-header p,
html[data-theme] .calendar-weekdays{
  color:var(--rj-muted);
}

html[data-theme] .produto-filter-option:hover,
html[data-theme] .logistica-status-panel button:hover,
html[data-theme] .calendar-day:hover,
html[data-theme] .tab-btn:hover{
  background:var(--rj-filter-hover);
}

html[data-theme] .produto-filter-option input,
html[data-theme] .kpi-filter-item input{
  accent-color:var(--rj-blue);
}

html[data-theme] .calendar-day,
html[data-theme] .logistica-status-panel button{
  background:var(--rj-input) !important;
  color:var(--rj-input-text) !important;
  border-color:var(--rj-line) !important;
  font-weight:800;
}

html[data-theme] .calendar-empty{
  background:var(--rj-input);
  border:1px solid var(--rj-line);
}

html[data-theme] .calendar-day.is-range{
  background:var(--rj-blue-soft) !important;
  color:var(--rj-ink) !important;
  border-color:var(--rj-blue) !important;
}

html[data-theme] .calendar-day.is-start,
html[data-theme] .calendar-day.is-end{
  background:var(--rj-blue) !important;
  color:#fff !important;
  border-color:var(--rj-blue) !important;
}

html[data-theme] th{
  background:var(--rj-table-head);
  color:#fff;
  border-color:var(--rj-table-head);
}

html[data-theme] td{
  background:var(--rj-table-row);
  border-color:var(--rj-line);
}

html[data-theme] .tab-btn.active{
  color:#fff !important;
}

html[data-theme] .tab-btn.active .tab-icon{
  color:#fff !important;
}

html[data-theme="dark"] .sidebar-brand-logo img,
html[data-theme="dark"] .auth-brand-logo img{
  border-color:#1f2937;
}

html[data-theme="dark"] .lead-success{
  background:#123d2a;
  color:#bdf7d0;
  border-color:#246b43;
}

html[data-theme="dark"] .lead-error{
  background:#4a1118;
  color:#ffd1d5;
  border-color:#7f1d2a;
}

@media (max-width:760px){
  html[data-theme] .theme-toggle{
    width:170px;
    min-width:170px;
    margin:0;
  }
}

/* Final hover contrast guard */
html[data-theme] button:hover,
html[data-theme] .vendas-add-btn:hover,
html[data-theme] .vendas-export-btn:hover,
html[data-theme] .filter-toggle:hover,
html[data-theme] .btn-icon-edit:hover,
html[data-theme] .btn-icon-send:hover,
html[data-theme] .btn-icon-delete:hover,
html[data-theme] .btn-logistica-save:hover,
html[data-theme] .btn-spx-track:hover,
html[data-theme] .lead-details-close:hover{
  color:#fff !important;
}

html[data-theme] .tab-btn:hover,
html[data-theme] .theme-toggle:hover,
html[data-theme] .produto-filter-button:hover,
html[data-theme] .date-filter-button:hover,
html[data-theme] .produto-filter-clear:hover,
html[data-theme] .produto-filter-result:hover,
html[data-theme] .calendar-nav-btn:hover,
html[data-theme] button.secondary:hover{
  color:var(--rj-ink) !important;
}

html[data-theme] .tab-btn.active:hover{
  background:linear-gradient(135deg, var(--rj-blue), #0759d6) !important;
  color:#fff !important;
}

html[data-theme] .tab-btn.active:hover .tab-icon{
  color:#fff !important;
}

html[data-theme] .password-toggle:hover,
html[data-theme] .lead-name-button:hover{
  color:var(--rj-ink) !important;
}

html[data-theme] .lead-name-button:hover,
html[data-theme] .lead-name-button:hover .lead-name-text,
html[data-theme] .lead-inline-link:hover{
  color:var(--rj-ink) !important;
}

html[data-theme="dark"] .tab-btn,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .produto-filter-button,
html[data-theme="dark"] .date-filter-button,
html[data-theme="dark"] .produto-filter-clear,
html[data-theme="dark"] .produto-filter-result,
html[data-theme="dark"] .calendar-nav-btn,
html[data-theme="dark"] button.secondary{
  color:#f8fafc !important;
}

html[data-theme="dark"] .tab-btn:hover,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .produto-filter-button:hover,
html[data-theme="dark"] .date-filter-button:hover,
html[data-theme="dark"] .produto-filter-clear:hover,
html[data-theme="dark"] .produto-filter-result:hover,
html[data-theme="dark"] .calendar-nav-btn:hover,
html[data-theme="dark"] button.secondary:hover{
  color:#f8fafc !important;
  background:#1f3658 !important;
}

html[data-theme="light"] .tab-btn:hover,
html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .produto-filter-button:hover,
html[data-theme="light"] .date-filter-button:hover,
html[data-theme="light"] .produto-filter-clear:hover,
html[data-theme="light"] .produto-filter-result:hover,
html[data-theme="light"] .calendar-nav-btn:hover,
html[data-theme="light"] button.secondary:hover{
  color:#111827 !important;
  background:#dfeafa !important;
}

html[data-theme] .vendedor-card{
  background:linear-gradient(180deg, var(--rj-panel), var(--rj-filter-panel));
  border-color:var(--rj-line);
  box-shadow:0 18px 42px rgba(16,24,40,0.10);
}

html[data-theme] .vendedor-profile h3,
html[data-theme] .vendedor-products-title{
  color:var(--rj-blue-dark);
}

html[data-theme] .vendedor-phone-cell,
html[data-theme] .vendedor-produtos-empty{
  color:var(--rj-muted);
}

html[data-theme] .vendedor-metric-card{
  background:var(--rj-input);
  border-color:var(--rj-line);
  box-shadow:0 8px 18px rgba(16,24,40,0.05);
}

html[data-theme] .vendedor-metric-card small{
  color:var(--rj-muted);
}

html[data-theme] .vendedor-metric-card strong{
  color:var(--rj-red);
}

html[data-theme] .vendedor-metric-icon.lead{
  color:#0ea5e9;
  background:rgba(14,165,233,0.14);
}

html[data-theme] .vendedor-metric-icon.cart{
  color:#2563eb;
  background:rgba(37,99,235,0.14);
}

html[data-theme] .vendedor-metric-icon.box{
  color:#7c3aed;
  background:rgba(124,58,237,0.14);
}

html[data-theme] .vendedor-metric-icon.money{
  color:#16a34a;
  background:rgba(22,163,74,0.14);
}

html[data-theme="dark"] .vendedor-card{
  background:linear-gradient(180deg, #101b2d, #0b1526);
  box-shadow:0 18px 42px rgba(0,0,0,0.26);
}

html[data-theme="dark"] .vendedor-profile h3,
html[data-theme="dark"] .vendedor-products-title{
  color:#dbeafe;
}

html[data-theme="dark"] .vendedor-metric-card{
  background:#17243a;
}
