/* Modo IA Estoque — layout premium */

.estoque-ia-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

.estoque-ia-ico-sm { width: 14px; height: 14px; }
.estoque-ia-ico-xs { width: 12px; height: 12px; }
.estoque-ia-ico-lg { width: 36px; height: 36px; opacity: 0.35; margin: 0 auto 0.5rem; }

.estoque-ia-badge,
.estoque-ia-panel-head,
.estoque-ia-conferencia-head h4,
.estoque-ia-uso-head h4,
.estoque-ia-btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.estoque-ia-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-secondary, #b0b0b0);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition, all 0.2s ease);
}

.estoque-ia-mode-btn.active .estoque-ia-ico {
  stroke: #111;
}

.estoque-ia-btn-icon .estoque-ia-ico {
  width: 16px;
  height: 16px;
}

.estoque-ia-btn-audio.listening {
  border-color: rgba(255, 80, 80, 0.65);
  background: rgba(255, 80, 80, 0.15);
  color: #ff8a8a;
  animation: estoque-ia-pulse-mic 1.2s ease-in-out infinite;
}

@keyframes estoque-ia-pulse-mic {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 80, 80, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(255, 80, 80, 0); }
}

.estoque-ia-composer-left {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

#tabEstoqueIa .content-header,
#tabLojaEstoqueIa .content-header {
  display: none;
}

.estoque-ia-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1180px;
}

.estoque-ia-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 215, 0, 0.18);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.06) 0%, rgba(0, 0, 0, 0.35) 100%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.estoque-ia-topbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  min-width: 0;
}

.estoque-ia-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.28);
  color: var(--primary, #ffd700);
  white-space: nowrap;
}

.estoque-ia-status {
  font-size: 0.82rem;
  color: var(--text-muted, #999);
}

.estoque-ia-status.ok { color: #6ee7a0; }
.estoque-ia-status.warn { color: #fbbf24; }

/* Modos — pills */
.estoque-ia-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.estoque-ia-mode-btn:hover {
  border-color: rgba(255, 215, 0, 0.35);
  color: #fff;
}

.estoque-ia-mode-btn.active {
  background: linear-gradient(135deg, #ffd700 0%, #e6c200 100%);
  border-color: transparent;
  color: #111;
  box-shadow: 0 2px 12px rgba(255, 215, 0, 0.25);
}

.estoque-ia-modo-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Loja */
.estoque-ia-loja-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.estoque-ia-loja-row label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted, #888);
}

.estoque-ia-loja-row select {
  min-width: 150px;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-color, #333);
  background: var(--bg-card, #1a1a1a);
  color: var(--text-primary, #fff);
  font-size: 0.88rem;
}

/* Grid principal */
.estoque-ia-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1rem;
  align-items: start;
}

.estoque-ia-panel {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.estoque-ia-grid-loja {
  grid-template-columns: 1fr minmax(280px, 360px);
}

.estoque-ia-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.12);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 215, 0, 0.85);
}

.estoque-ia-panel-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Chat */
.estoque-ia-chat {
  min-height: 260px;
  max-height: 380px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  scroll-behavior: smooth;
}

.estoque-ia-msg {
  max-width: 90%;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.estoque-ia-msg.user {
  align-self: flex-end;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.28);
}

.estoque-ia-msg.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.estoque-ia-msg.system {
  align-self: center;
  font-size: 0.78rem;
  color: var(--text-muted, #888);
  background: transparent;
  border: none;
  padding: 0.2rem;
}

.estoque-ia-msg img {
  max-width: 160px;
  border-radius: 8px;
  margin-top: 0.35rem;
  display: block;
}

/* Composer */
.estoque-ia-composer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.estoque-ia-composer textarea {
  width: 100%;
  min-height: 64px;
  max-height: 140px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-primary, #fff);
  font-family: inherit;
  font-size: 0.92rem;
}

.estoque-ia-composer textarea:focus {
  outline: none;
  border-color: rgba(255, 215, 0, 0.4);
}

.estoque-ia-composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.estoque-ia-preview-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.estoque-ia-preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.28);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.estoque-ia-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.estoque-ia-preview-rm {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.estoque-ia-preview-rm:hover {
  background: rgba(220, 53, 69, 0.9);
}

.estoque-ia-conferencia-empty {
  padding: 1.25rem 0.85rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted, #888);
}

.estoque-ia-conferencia-empty p {
  margin: 0;
}

.estoque-ia-conferencia-head h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.estoque-ia-conferencia-count {
  font-size: 0.75rem;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.15);
  color: var(--primary, #ffd700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.estoque-ia-rm-item {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted, #999);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.estoque-ia-rm-item:hover {
  background: rgba(220, 53, 69, 0.2);
  color: #f87171;
}

.estoque-ia-uso-lojas {
  padding: 0 0.85rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.estoque-ia-uso-lojas-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #888);
  margin-bottom: 0.35rem;
}

.estoque-ia-conferencia {
  border-radius: 14px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.05) 0%, rgba(0, 0, 0, 0.25) 100%);
  overflow: hidden;
}

.estoque-ia-conferencia-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.12);
}

.estoque-ia-conferencia-head h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.estoque-ia-conferencia-count {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.15);
  color: var(--primary, #ffd700);
}

.estoque-ia-pendente-list {
  list-style: none;
  margin: 0;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 320px;
  overflow-y: auto;
}

.estoque-ia-pendente-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 0.65rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.estoque-ia-pendente-item.baixa-confianca {
  border-color: rgba(251, 191, 36, 0.45);
}

.estoque-ia-pendente-item.sem-produto {
  border-color: rgba(248, 113, 113, 0.45);
}

.estoque-ia-pendente-nome {
  font-weight: 600;
  font-size: 0.88rem;
}

.estoque-ia-pendente-meta {
  font-size: 0.72rem;
  color: var(--text-muted, #999);
  margin-top: 0.15rem;
}

.estoque-ia-pendente-row2 {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  justify-content: space-between;
}

.estoque-ia-pendente-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 0.15rem;
}

.estoque-ia-pendente-qty button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.estoque-ia-pendente-qty button:hover {
  background: rgba(255, 215, 0, 0.2);
}

.estoque-ia-pendente-qty span[data-qty-val] {
  min-width: 2rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
}

.estoque-ia-pendente-prod select {
  flex: 1;
  min-width: 120px;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #444;
  background: #111;
  color: #fff;
  font-size: 0.8rem;
}

.estoque-ia-conferencia-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid rgba(255, 215, 0, 0.1);
}

.estoque-ia-conferencia-empty {
  padding: 1.25rem 0.85rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted, #888);
}

/* Relatório de consumo */
.estoque-ia-uso {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #181818 0%, #121212 100%);
  overflow: hidden;
}

.estoque-ia-uso-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.estoque-ia-uso-head h4 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.estoque-ia-uso-period {
  display: flex;
  gap: 0.25rem;
}

.estoque-ia-uso-period button {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--text-muted, #999);
  font-size: 0.72rem;
  cursor: pointer;
}

.estoque-ia-uso-period button.active {
  border-color: rgba(255, 215, 0, 0.4);
  color: var(--primary, #ffd700);
  background: rgba(255, 215, 0, 0.08);
}

.estoque-ia-uso-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
}

.estoque-ia-uso-stat {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.estoque-ia-uso-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #888);
}

.estoque-ia-uso-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary, #ffd700);
  margin-top: 0.15rem;
}

.estoque-ia-uso-stat-value small {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted, #999);
}

.estoque-ia-uso-note {
  padding: 0 0.85rem 0.65rem;
  font-size: 0.72rem;
  color: var(--text-muted, #777);
  line-height: 1.4;
}

.estoque-ia-uso-recent {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.55rem 0.85rem 0.75rem;
  max-height: 160px;
  overflow-y: auto;
}

.estoque-ia-uso-recent-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #888);
  margin-bottom: 0.45rem;
}

.estoque-ia-uso-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.estoque-ia-uso-row:last-child {
  border-bottom: none;
}

.estoque-ia-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary, #e6c200);
  font-size: 0.88rem;
}

.estoque-ia-loading .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(230, 194, 0, 0.25);
  border-top-color: var(--primary, #e6c200);
  border-radius: 50%;
  animation: estoqueIaSpin 0.7s linear infinite;
}

@keyframes estoqueIaSpin {
  to { transform: rotate(360deg); }
}

/* Loja — cards selecionáveis */
.estoque-ia-loja-row-admin,
.estoque-ia-loja-row-fixed {
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
}

.estoque-ia-loja-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.estoque-ia-loja-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #888);
}

.estoque-ia-loja-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.estoque-ia-loja-card {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 140px;
  max-width: 100%;
  flex: 1 1 160px;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-primary, #fff);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
}

.estoque-ia-loja-card:hover:not(.locked) {
  border-color: rgba(255, 215, 0, 0.45);
  background: rgba(255, 215, 0, 0.06);
}

.estoque-ia-loja-card.active {
  border-color: var(--primary, #ffd700);
  background: rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.2);
}

.estoque-ia-loja-card.locked {
  cursor: default;
}

.estoque-ia-loja-card-name {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.estoque-ia-loja-card-check {
  opacity: 0;
  color: var(--primary, #ffd700);
  transition: opacity 0.15s ease;
}

.estoque-ia-loja-card.active .estoque-ia-loja-card-check {
  opacity: 1;
}

.estoque-ia-loja-card-icon {
  color: rgba(255, 215, 0, 0.75);
}

.estoque-ia-loja-select {
  width: 100%;
  max-width: 320px;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-primary, #fff);
  font-size: 0.9rem;
}

.estoque-ia-panel-head-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.estoque-ia-head-link,
.estoque-ia-historico-nova {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-secondary, #bbb);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.estoque-ia-head-link:hover,
.estoque-ia-historico-nova:hover {
  border-color: rgba(255, 215, 0, 0.35);
  color: var(--primary, #ffd700);
}

/* Anexos / fotos */
.estoque-ia-attach-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s ease;
}

.estoque-ia-attach-zone.has-images {
  border-style: solid;
  border-color: rgba(255, 215, 0, 0.25);
}

.estoque-ia-attach-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 88px;
  min-height: 72px;
  padding: 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 0, 0.22);
  background: rgba(255, 215, 0, 0.06);
  color: var(--primary, #ffd700);
  cursor: pointer;
  transition: all 0.15s ease;
}

.estoque-ia-attach-btn:hover {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.45);
}

.estoque-ia-attach-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.9;
}

.estoque-ia-attach-zone .estoque-ia-preview-imgs {
  flex: 1;
  min-width: 0;
}

.estoque-ia-preview-item {
  width: 88px;
  height: 88px;
}

.estoque-ia-msg-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.estoque-ia-msg-gallery img,
.estoque-ia-msg img {
  max-width: 120px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.estoque-ia-msg-gallery img:hover {
  border-color: rgba(255, 215, 0, 0.4);
}

/* Histórico de conversas */
.estoque-ia-historico {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #181818 0%, #121212 100%);
  overflow: hidden;
}

.estoque-ia-historico-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.estoque-ia-historico-head h4 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.estoque-ia-historico-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.estoque-ia-historico-empty {
  padding: 0.85rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted, #888);
}

.estoque-ia-historico-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary, #fff);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.estoque-ia-historico-item:hover {
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.05);
}

.estoque-ia-historico-item.active {
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.1);
}

.estoque-ia-historico-item-title {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.estoque-ia-historico-item-meta {
  font-size: 0.7rem;
  color: var(--text-muted, #999);
}

@media (max-width: 640px) {
  .estoque-ia-loja-card {
    flex: 1 1 100%;
  }

  .estoque-ia-historico-list {
    max-height: 180px;
  }
}

@media (max-width: 960px) {
  .estoque-ia-grid {
    grid-template-columns: 1fr;
  }

  .estoque-ia-panel-side {
    order: 2;
  }
}

@media (max-width: 640px) {
  .estoque-ia-uso-stats {
    grid-template-columns: 1fr;
  }

  .estoque-ia-topbar {
    flex-direction: column;
    align-items: stretch;
  }
}
