/* Mercado Livre Afiliados IA - Style System */

:root {
  --ml-yellow: #FFE600;
  --ml-blue-dark: #2D3277;
  --ml-blue-link: #3483FA;
  --ml-green: #00A650;
  --ml-red: #E63946;
  --ml-orange: #FF6B00;
  --ml-bg: #EDEDED;
  --ml-card-bg: #FFFFFF;
  --ml-text-dark: #333333;
  --ml-text-muted: #666666;
  --ml-border: #E6E6E6;
  --ml-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --ml-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--ml-bg);
  color: var(--ml-text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* CABEÇALHO MERCADO LIVRE */
.ml-header {
  background-color: var(--ml-yellow);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.ml-header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ml-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ml-blue-dark);
}

.ml-logo-icon {
  font-size: 32px;
}

.ml-logo-text {
  display: flex;
  flex-direction: column;
}

.ml-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.ml-brand-sub {
  color: var(--ml-blue-dark);
}

.ml-badge-afiliados {
  font-size: 10px;
  font-weight: 700;
  background-color: var(--ml-blue-dark);
  color: #FFF;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  margin-top: -3px;
  align-self: flex-start;
}

/* BUSCA NO CABEÇALHO */
.ml-search-area {
  flex: 1;
  max-width: 560px;
}

.ml-search-bar {
  display: flex;
  background: #FFF;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  overflow: hidden;
}

.ml-search-bar input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
}

.ml-search-btn {
  background: transparent;
  border: none;
  border-left: 1px solid #E6E6E6;
  padding: 0 16px;
  color: #666;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s;
}

.ml-search-btn:hover {
  background: #F5F5F5;
  color: var(--ml-blue-dark);
}

/* ÁREA DE USUÁRIO */
.ml-user-area {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ml-meli-plus-badge {
  background-color: var(--ml-blue-dark);
  color: var(--ml-yellow);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ml-user-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ml-balance-label {
  font-size: 11px;
  color: #555;
  font-weight: 500;
}

.ml-balance-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--ml-blue-dark);
}

.ml-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ml-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ml-blue-dark);
}

.ml-user-info {
  display: flex;
  flex-direction: column;
}

.ml-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ml-text-dark);
}

.ml-user-level {
  font-size: 11px;
  color: #555;
}

/* SUB-NAVEGAÇÃO COM TABS */
.ml-nav-bar {
  background-color: var(--ml-yellow);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.ml-nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ml-nav-location {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #444;
  padding: 8px 0;
}

.ml-loc-sub {
  display: block;
  font-size: 10px;
  color: #666;
}

.ml-loc-main {
  font-weight: 600;
  color: var(--ml-text-dark);
}

.ml-nav-tabs {
  display: flex;
  list-style: none;
  gap: 6px;
}

.nav-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab:hover {
  background-color: rgba(255, 255, 255, 0.4);
  color: var(--ml-blue-dark);
}

.nav-tab.active {
  background-color: var(--ml-bg);
  color: var(--ml-blue-dark);
  font-weight: 700;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

/* STATUS STRIP */
.ml-status-strip {
  background-color: #FFF;
  border-bottom: 1px solid var(--ml-border);
  padding: 8px 0;
}

.ml-status-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ml-text-muted);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* CONTEÚDO PRINCIPAL E TABS */
.ml-main-content {
  max-width: 1240px;
  margin: 20px auto 50px auto;
  padding: 0 20px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

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

.section-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--ml-text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header p {
  font-size: 13px;
  color: var(--ml-text-muted);
}

.stats-pills {
  display: flex;
  gap: 10px;
}

.pill-stat {
  background: #FFF;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid var(--ml-border);
}

/* FILTROS DE PRODUTOS */
.filter-card {
  background: #FFF;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--ml-shadow);
}

.filter-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ml-text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ml-select, .ml-input {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  border: 1px solid var(--ml-border);
  border-radius: var(--radius-sm);
  outline: none;
  background-color: #FFF;
  font-family: inherit;
  transition: border-color 0.2s;
}

.ml-select:focus, .ml-input:focus {
  border-color: var(--ml-blue-link);
}

.ml-range {
  width: 100%;
  accent-color: var(--ml-green);
}

.button-group {
  flex: 0 0 auto;
}

/* BOTÕES PADRÃO MERCADO LIVRE */
.btn-ml-primary {
  background-color: var(--ml-blue-link);
  color: #FFF;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-ml-primary:hover {
  background-color: #2968C8;
  box-shadow: 0 3px 8px rgba(52, 131, 250, 0.3);
}

.btn-ml-secondary {
  background-color: rgba(65, 137, 230, 0.15);
  color: var(--ml-blue-link);
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-ml-secondary:hover {
  background-color: rgba(65, 137, 230, 0.25);
}

.btn-ml-success {
  background-color: var(--ml-green);
  color: #FFF;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-ml-success:hover {
  background-color: #008D43;
  box-shadow: 0 3px 8px rgba(0, 166, 80, 0.3);
}

.btn-ml-danger {
  background-color: var(--ml-red);
  color: #FFF;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* GRID DE PRODUTOS */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: #FFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--ml-border);
  overflow: hidden;
  box-shadow: var(--ml-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ml-shadow-hover);
}

.prod-img-container {
  position: relative;
  width: 100%;
  height: 200px;
  background-color: #F8F8F8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.prod-clickable {
  cursor: pointer;
  transition: opacity 0.2s, color 0.2s;
}

.prod-clickable:hover {
  opacity: 0.9;
  color: var(--ml-blue-link);
}

.prod-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.prod-commission-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #FFE600, #FFB700);
  color: var(--ml-blue-dark);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.prod-full-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: var(--ml-green);
  color: #FFF;
  font-size: 10px;
  font-weight: 800;
  font-style: italic;
  padding: 2px 8px;
  border-radius: 4px;
}

.prod-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.prod-category {
  font-size: 11px;
  text-transform: uppercase;
  color: #888;
  font-weight: 600;
  margin-bottom: 4px;
}

.prod-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ml-text-dark);
  line-height: 1.3;
  height: 38px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 10px;
}

.prod-price-area {
  margin-bottom: 12px;
}

.prod-old-price {
  font-size: 12px;
  text-decoration: line-through;
  color: #888;
}

.prod-main-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.prod-price-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--ml-text-dark);
}

.prod-discount {
  font-size: 12px;
  font-weight: 700;
  color: var(--ml-green);
}

.prod-earning-highlight {
  background-color: #FFF9E6;
  border: 1px dashed #FFD000;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: #8A6D00;
  margin-bottom: 14px;
  text-align: center;
}

.prod-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.prod-actions button {
  flex: 1;
  font-size: 12px;
  padding: 8px 4px;
}

/* TAB 2: WORKSPACE DA IA */
.ia-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card-box {
  background: #FFF;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--ml-shadow);
  border: 1px solid var(--ml-border);
}

.card-box.no-padding {
  padding: 0;
}

.card-box h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ml-text-dark);
}

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

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ml-text-dark);
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.target-channels {
  display: flex;
  gap: 8px;
}

.channel-chip {
  flex: 1;
  border: 1px solid var(--ml-border);
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #FAFAFA;
}

.channel-chip input {
  display: none;
}

.channel-chip.active {
  border-color: var(--ml-blue-link);
  background-color: #EBF3FF;
  color: var(--ml-blue-link);
}

.tab-header-box {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--ml-border);
  margin-bottom: 16px;
  padding-bottom: 10px;
}

.sub-tab-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #777;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
}

.sub-tab-btn.active {
  color: var(--ml-blue-link);
  background-color: #EBF3FF;
}

.sub-tab-content {
  display: none;
}

.sub-tab-content.active {
  display: block;
}

.ml-textarea {
  width: 100%;
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  border: 1px solid var(--ml-border);
  border-radius: 6px;
  resize: vertical;
  background-color: #FAFAFA;
}

.action-buttons-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.action-buttons-row button {
  flex: 1;
}

/* BANNER PREVIEW VISUAL IA */
.banner-preview-box {
  background: linear-gradient(180deg, #FFE600 0%, #FFF 35%);
  border: 2px solid #FFE600;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  padding: 15px;
  text-align: center;
  position: relative;
}

.banner-ml-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--ml-blue-dark);
  margin-bottom: 10px;
}

.banner-full-badge {
  background: var(--ml-green);
  color: #FFF;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
}

.banner-product-img-wrapper {
  position: relative;
  height: 180px;
  background: #FFF;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.banner-product-img-wrapper img {
  max-height: 90%;
  max-width: 90%;
  object-fit: contain;
}

.banner-discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--ml-red);
  color: #FFF;
  font-size: 14px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
}

.banner-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

.banner-prices {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.banner-old-price {
  font-size: 13px;
  text-decoration: line-through;
  color: #888;
}

.banner-new-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--ml-blue-dark);
}

.banner-footer-strip {
  background: #E8F5E9;
  color: var(--ml-green);
  font-weight: 800;
  font-size: 12px;
  padding: 6px;
  border-radius: 6px;
}

/* TAB 3: GRUPOS DO FACEBOOK */
.niche-bar-card {
  background: #FFF;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid var(--ml-border);
}

.niche-bar-card span {
  font-size: 12px;
  font-weight: 700;
  color: #555;
}

.niche-chip {
  background: #F0F2F5;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.niche-chip.active {
  background: var(--ml-blue-link);
  color: #FFF;
}

.ml-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ml-table th {
  background-color: #F7F7F7;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: #555;
  border-bottom: 1px solid var(--ml-border);
}

.ml-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ml-border);
  vertical-align: middle;
}

.ml-table tbody tr:hover {
  background-color: #FAFAFA;
}

.badge-tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.badge-green { background: #E8F5E9; color: var(--ml-green); }
.badge-blue { background: #E3F2FD; color: var(--ml-blue-link); }

/* TAB 4: ENCURTADOR DE LINKS */
.link-converter-card {
  padding: 20px 0;
}

.width-medium {
  max-width: 600px;
}

.margin-auto {
  margin: 0 auto;
}

.link-result-box {
  margin-top: 15px;
}

.qr-code-preview {
  display: flex;
  align-items: center;
  gap: 20px;
  background-color: #F8F9FA;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
}

.qr-dummy {
  color: var(--ml-blue-dark);
}

.qr-info p {
  font-size: 12px;
  color: #666;
}

/* TAB 5: DASHBOARD FINANCEIRO */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.metric-card {
  background: #FFF;
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--ml-shadow);
  border: 1px solid var(--ml-border);
}

.metric-card.bg-card-yellow {
  background: linear-gradient(135deg, #FFFDF0, #FFF);
  border-left: 5px solid var(--ml-yellow);
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFF9E6;
  color: #B28E00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.icon-blue { background: #EBF3FF; color: var(--ml-blue-link); }
.icon-green { background: #E8F5E9; color: var(--ml-green); }
.icon-purple { background: #F3E5F5; color: #8E24AA; }

.metric-lbl {
  font-size: 12px;
  color: var(--ml-text-muted);
  display: block;
}

.metric-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--ml-text-dark);
}

.metric-sub {
  font-size: 11px;
  font-weight: 600;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.col-span-2 {
  grid-column: span 1;
}

@media(min-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.chart-container {
  height: 260px;
  position: relative;
}

.category-progress-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prog-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.prog-bar-bg {
  height: 8px;
  background: #EFEFEF;
  border-radius: 4px;
  overflow: hidden;
}

.prog-bar-fill {
  height: 100%;
  border-radius: 4px;
}

.bg-blue { background: var(--ml-blue-link); }
.bg-yellow { background: var(--ml-yellow); }
.bg-green { background: var(--ml-green); }
.bg-purple { background: #8E24AA; }

/* MODAIS */
.ml-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.ml-modal-content {
  background: #FFF;
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: modalPop 0.25s ease-out;
}

.ml-modal-content.width-large {
  max-width: 700px;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.ml-modal-header {
  padding: 16px 20px;
  background-color: #F5F5F5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--ml-border);
}

.bg-facebook {
  background-color: #1877F2;
  color: #FFF;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.ml-modal-body {
  padding: 20px;
}

.ml-modal-footer {
  padding: 16px 20px;
  background-color: #F9F9F9;
  border-top: 1px solid var(--ml-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-product-summary {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #F9F9F9;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.modal-product-summary img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  background: #FFF;
  border-radius: 6px;
}

.price-highlight {
  font-weight: 800;
  font-size: 16px;
}

.commission-badge {
  font-size: 11px;
  background: #FFF9E6;
  color: #B28E00;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 6px;
}

.modal-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
}

.step-num {
  background: var(--ml-blue-dark);
  color: #FFF;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

/* TERMINAL DE POSTAGEM EM MASSA */
.poster-progress-box {
  margin-bottom: 16px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.ml-progress-bg {
  height: 12px;
  background: #EFEFEF;
  border-radius: 6px;
  overflow: hidden;
}

.ml-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1877F2, #00A650);
  transition: width 0.3s ease;
}

.terminal-log {
  background-color: #1E1E1E;
  color: #00FF66;
  font-family: monospace;
  font-size: 12px;
  padding: 12px;
  border-radius: 6px;
  height: 200px;
  overflow-y: auto;
  line-height: 1.6;
}

.terminal-log .log-info { color: #81D4FA; }
.terminal-log .log-success { color: #A5D6A7; }
.terminal-log .log-warn { color: #FFE082; }

/* TOAST */
.ml-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--ml-blue-dark);
  color: #FFF;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  z-index: 2000;
  font-size: 13px;
  font-weight: 600;
  animation: slideUp 0.3s ease-out;
}

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

/* UTILITÁRIOS */
.hidden { display: none !important; }
.text-success { color: var(--ml-green) !important; }
.text-danger { color: var(--ml-red) !important; }
.text-warning { color: #FF9900 !important; }
.text-primary { color: var(--ml-blue-link) !important; }
.text-white { color: #FFF !important; }
.full-width { width: 100% !important; }
.font-bold { font-weight: 700 !important; }
.divider { border: 0; border-top: 1px solid var(--ml-border); margin: 15px 0; }
.margin-top-5 { margin-top: 5px; }
.margin-top-10 { margin-top: 10px; }
.margin-top-20 { margin-top: 20px; }
.margin-bottom-10 { margin-bottom: 10px; }

/* RESPONSIVIDADE */
@media (max-width: 768px) {
  .ml-header-container {
    flex-direction: column;
    align-items: stretch;
  }
  .ml-nav-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .ml-nav-tabs {
    overflow-x: auto;
    width: 100%;
  }
  .ia-workspace-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   ESTILOS PAINEL DE MÉTRICAS IDÊNTICO À FOTO (MÉTRICAS MELI)
   ========================================== */
.meli-metrics-container {
  background-color: #F5F5F5;
  min-height: 100vh;
  padding: 10px 20px 40px 20px;
  font-family: 'Proxima Nova', -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: #333;
}

.meli-metrics-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.meli-metrics-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meli-metrics-title-row h1 {
  font-size: 26px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.meli-live-badge {
  background: #FFF;
  border: 1px solid #E5E5E5;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meli-live-dot {
  width: 8px;
  height: 8px;
  background-color: #FF3B30;
  border-radius: 50%;
  display: inline-block;
}

/* SUB-NAV TABS (NEGÓCIO, PROMOÇÕES, ETC) */
.meli-subnav-row {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #E5E5E5;
  margin-bottom: 15px;
  font-size: 13px;
  overflow-x: auto;
}

.meli-subnav-item {
  padding: 10px 0;
  color: #666;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}

.meli-subnav-item.active {
  color: #3483FA;
  font-weight: 600;
}

.meli-subnav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #3483FA;
}

.meli-view-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 13px;
}

.meli-view-item {
  color: #666;
  cursor: pointer;
  padding: 4px 0;
}

.meli-view-item.active {
  color: #3483FA;
  font-weight: 600;
}

/* CONTROLES DE FILTRO (PERÍODO PRINCIPAL & COMPARAR COM) */
.meli-controls-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.meli-filter-inputs {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.meli-input-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meli-input-field label {
  font-size: 10px;
  font-weight: 700;
  color: #999;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.meli-dropdown-btn {
  background: #FFF;
  border: 1px solid #3483FA;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 180px;
  cursor: pointer;
  outline: none;
}

.meli-dropdown-btn.secondary {
  border-color: #E5E5E5;
}

.btn-filter-icon {
  background: #FFF;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  color: #3483FA;
  font-weight: 600;
  cursor: pointer;
}

.meli-help-link {
  color: #3483FA;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

/* SECTION RESUMO DE DESEMPENHO */
.meli-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.meli-summary-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.btn-download-report {
  background: #FFF;
  border: 1px solid #E5E5E5;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  color: #3483FA;
  font-weight: 600;
  cursor: pointer;
}

/* GRID DOS 8 CARDS DE MÉTRICAS DA FOTO */
.photo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}

@media (max-width: 1024px) {
  .photo-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .photo-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.photo-kpi-card {
  background: #FFF;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  position: relative;
  overflow: hidden;
}

.photo-kpi-card.pink-top {
  border-top: 3px solid #E91E63;
}

.photo-kpi-card.cyan-top {
  border-top: 3px solid #00BCD4;
}

.photo-kpi-lbl {
  font-size: 13px;
  color: #666;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.photo-kpi-val-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 10px;
}

.photo-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: #333;
}

.photo-kpi-badge {
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.photo-kpi-badge.up-green {
  color: #00A650;
}

.photo-kpi-badge.down-red {
  color: #FF3B30;
}

/* DESTAQUES ESPECIAIS AZUIS DA FOTO (CARDS 7 E 8) */
.blue-highlight-box {
  background-color: #3483FA;
  color: #FFF !important;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
}

.blue-highlight-box .photo-kpi-val {
  color: #FFF !important;
}

.blue-highlight-lbl {
  background-color: #3483FA;
  color: #FFF !important;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* GRÁFICO IDÊNTICO DA FOTO (COR DE ROSA #E91E63 & ROXO #C084FC) */
.photo-chart-card {
  background: #FFF;
  border-radius: 8px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 30px;
}

.photo-chart-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
}

.legend-pink {
  color: #E91E63;
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-purple {
  color: #C084FC;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot-pink {
  width: 8px;
  height: 8px;
  background-color: #E91E63;
  border-radius: 50%;
}

.dot-purple {
  width: 8px;
  height: 8px;
  background-color: #C084FC;
  border-radius: 50%;
}

/* ==========================================
   POPOVER DE PERÍODO PERSONALIZADO (EXATO DA FOTO 2)
   ========================================== */
.period-popover-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #FFF;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  border: 1px solid #E5E5E5;
  width: 240px;
  z-index: 1500;
  padding: 6px 0;
}

.period-popover-item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: background 0.15s;
}

.period-popover-item:hover {
  background-color: #F5F5F5;
}

.period-popover-item.active {
  background-color: #F0F7FF;
  border-left: 3px solid #3483FA;
}

.period-popover-title {
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

.period-popover-date {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

/* ==========================================
   LANDING PAGE DE VENDAS & PRICING (PLANOS ML AFILIADOS)
   ========================================== */
.landing-page-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #F4F6F9;
  z-index: 999999;
  overflow-y: auto;
  font-family: 'Proxima Nova', -apple-system, Roboto, sans-serif;
}

.landing-hero {
  background: linear-gradient(135deg, #FFE600 0%, #FFCC00 100%);
  padding: 50px 20px 80px 20px;
  text-align: center;
  color: #2D3277;
  position: relative;
}

.landing-hero-badge {
  background: #2D3277;
  color: #FFE600;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 15px;
}

.landing-hero h1 {
  font-size: 38px;
  font-weight: 800;
  max-width: 800px;
  margin: 0 auto 15px auto;
  line-height: 1.2;
}

.landing-hero p {
  font-size: 18px;
  max-width: 650px;
  margin: 0 auto 30px auto;
  opacity: 0.9;
}

.landing-pricing-container {
  max-width: 960px;
  margin: -50px auto 60px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .landing-pricing-container {
    grid-template-columns: 1fr;
  }
}

.pricing-card {
  background: #FFF;
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 2px solid #E5E5E5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.pricing-card.featured {
  border-color: #3483FA;
  box-shadow: 0 15px 35px rgba(52, 131, 250, 0.2);
}

.pricing-featured-badge {
  position: absolute;
  top: -14px;
  right: 20px;
  background: #3483FA;
  color: #FFF;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: uppercase;
}

.pricing-header h3 {
  font-size: 22px;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
}

.pricing-header p {
  font-size: 13px;
  color: #666;
  margin: 0 0 20px 0;
}

.pricing-price-box {
  margin-bottom: 24px;
}

.pricing-val {
  font-size: 38px;
  font-weight: 900;
  color: #333;
}

.pricing-period {
  font-size: 14px;
  color: #888;
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.pricing-features li {
  font-size: 14px;
  color: #444;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li i {
  color: #00A650;
}

/* PAINEL SECRETO ADMIN (CONFIGURAR VENDA FAKE E EDITAR MÉTRICAS) */
.secret-admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.secret-admin-box {
  background: #FFF;
  border-radius: 12px;
  width: 100%;
  max-width: 550px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.secret-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #EEE;
  padding-bottom: 12px;
}

.secret-admin-header h3 {
  font-size: 18px;
  color: #2D3277;
  margin: 0;
}


