body.admin-body {
  min-height: 100vh;
}

/* ---------- Login ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.login-logo img { height: 30px; width: auto; }

.login-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.login-field { margin-bottom: 16px; }
.login-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.login-field input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.login-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-submit {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.login-submit:hover { opacity: 0.9; }
.login-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.login-feedback {
  min-height: 20px;
  margin-top: 14px;
  text-align: center;
  font-size: 0.85rem;
  color: #d3455b;
}

.login-back {
  display: block;
  text-align: center;
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.login-back:hover { color: var(--accent); }

/* ---------- Dashboard shell ---------- */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 32px;
  padding: 0 6px;
}
.admin-logo img { height: 28px; width: auto; }

.admin-nav { list-style: none; flex: 0 0 auto; }
.admin-nav li { margin-bottom: 4px; }

.admin-nav a,
.admin-nav .admin-nav-disabled {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
}

.admin-nav a:hover { background: var(--bg-alt); color: var(--text); }
.admin-nav a.active { background: var(--accent); color: #fff !important; }

.admin-nav .admin-nav-disabled {
  color: var(--text-muted);
  opacity: 0.5;
  cursor: not-allowed;
}
.admin-nav-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 10px 6px;
}

.admin-nav-soon {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 999px;
}

.admin-nav-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
}
.admin-nav-toggle:hover { background: var(--bg-alt); color: var(--text); }
.admin-nav-toggle.active { color: var(--accent); font-weight: 700; }
.admin-nav-caret { margin-left: auto; transition: transform 0.15s; font-size: 0.75rem; }
.admin-nav-group.is-open .admin-nav-caret { transform: rotate(180deg); }

.admin-nav-sub {
  list-style: none;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.2s ease;
}
.admin-nav-group.is-open .admin-nav-sub { max-height: none; } /* altura real vem do admin-auth.js (cresce com qualquer nº de itens) */
.admin-nav-sub li { margin: 2px 0 2px 14px; }
.admin-nav-sub a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
  border-left: 2px solid var(--border);
}
.admin-nav-sub a:hover { background: var(--bg-alt); color: var(--text); }
.admin-nav-sub a.active { border-left-color: var(--accent); color: var(--accent) !important; font-weight: 700; background: transparent; }

.admin-sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
}

.admin-user {
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.admin-user-name { font-weight: 700; display: block; }
/* Temporário (superadmin): taxa de sucesso do organizar envio na Shopee, acima da tag do perfil. */
.admin-taxa-shopee { display: block; margin-top: 6px; font-size: 0.72rem; font-weight: 600; line-height: 1.3; color: var(--text-muted, var(--text)); text-decoration: none; padding: 4px 6px; border-radius: 6px; background: var(--bg-alt); border-left: 3px solid var(--border); }
.admin-taxa-shopee.is-ok { border-left-color: #16a34a; }
.admin-taxa-shopee.is-atencao { border-left-color: #f59e0b; }
.admin-taxa-shopee.is-ruim { border-left-color: #dc2626; color: #dc2626; }
.admin-user-role {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 999px;
}

.admin-theme-toggle {
  width: 100%;
  justify-content: center;
  margin-bottom: 10px;
}

.admin-logout {
  width: 100%;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.admin-logout:hover { border-color: var(--accent); color: var(--accent); }

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 32px clamp(24px, 3vw, 56px);
  /* Ocupa a largura disponível; só limita em telas gigantes (ultrawide) pra não esticar demais. */
  max-width: 2200px;
}

.admin-main h1 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.admin-main .admin-welcome-sub {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.admin-card h3 { font-size: 1rem; margin-bottom: 6px; }
.admin-card p { color: var(--text-muted); font-size: 0.88rem; }

.admin-card-link {
  display: block;
  transition: border-color 0.15s, transform 0.15s;
}
.admin-card-link:hover { border-color: var(--accent); transform: translateY(-2px); }

.admin-card-disabled { opacity: 0.55; cursor: not-allowed; position: relative; }
.admin-card-disabled .admin-card-soon {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-alt);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 999px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.admin-table th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.admin-table tr:last-child td { border-bottom: none; }

/* Browser surfaces themed to the palette, not left as defaults */
.admin-body ::selection { background: var(--accent); color: #fff; }
.admin-body { scrollbar-color: var(--border) transparent; scrollbar-width: thin; }
.admin-body ::-webkit-scrollbar { width: 10px; height: 10px; }
.admin-body ::-webkit-scrollbar-track { background: transparent; }
.admin-body ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.admin-body ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.admin-body :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Precificação ---------- */
/* largura fluida: ver .admin-main acima */

.admin-section { margin-bottom: 36px; }
.admin-section-head { margin-bottom: 14px; }
.admin-section-head h2 { font-size: 1.05rem; font-weight: 700; }
.admin-section-head p { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }

.pricing-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.pricing-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pricing-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pricing-input-wrap .pricing-affix {
  position: absolute;
  left: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.pricing-input-wrap.suffix .pricing-affix { left: auto; right: 14px; }

.pricing-field input[type="number"] {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s;
  /* Remove as setas nativas do input number: elas ficavam por baixo do sufixo (h/min/kg) e quebravam o layout */
  -moz-appearance: textfield;
}
.pricing-field input[type="number"]::-webkit-outer-spin-button,
.pricing-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pricing-input-wrap:not(.suffix) input[type="number"] { padding-left: 32px; }
.pricing-input-wrap.suffix input[type="number"] { padding-right: 40px; }
.pricing-input-wrap.suffix .pricing-affix { min-width: 26px; text-align: left; }
.pricing-field input[type="number"]:hover { border-color: var(--text-muted); }
.pricing-field input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
}
.pricing-field input[type="number"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Devolução fácil: campo condicional ao toggle */
.pricing-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  grid-column: 1 / -1;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.pricing-toggle-text label {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 0.9rem;
}
.pricing-toggle-text p {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.pricing-toggle-combo { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.pricing-toggle-combo .pricing-field { width: 130px; }
.pricing-toggle-combo .pricing-field label { display: none; }

.pricing-switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.pricing-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.pricing-switch-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background-color 0.2s ease;
}
.pricing-switch-track::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pricing-switch input:checked ~ .pricing-switch-track { background: var(--accent); }
.pricing-switch input:checked ~ .pricing-switch-track::before { transform: translateX(18px); }
.pricing-switch input:focus-visible ~ .pricing-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Tabela de faixas — editável */
.pricing-table-wrap { overflow-x: auto; }

.sku-combo { position: relative; }
.sku-combo-list {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
  width: max(100%, 420px); max-width: 90vw; max-height: 280px; overflow-y: auto;
  background: var(--bg-card, var(--bg)); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.35); padding: 4px;
}
.sku-combo-list[hidden] { display: none; }
.sku-combo-option {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text); font: inherit; font-size: 0.85rem; cursor: pointer;
}
.sku-combo-option:hover, .sku-combo-option.is-active { background: var(--accent); color: #fff; }
.sku-combo-empty { padding: 10px; font-size: 0.85rem; color: var(--text-muted); }

.products-search-bar { margin-bottom: 20px; display: flex; align-items: flex-end; gap: 12px; }
.products-search-bar .pricing-field { flex: 1; }
.products-search-bar .search-mode-field { flex: 0 0 170px; }
.products-search-bar #exportAllBtn { flex-shrink: 0; }

.pricing-table-footer {
  padding: 10px 4px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}
.pricing-table th, .pricing-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.pricing-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table tbody tr:hover { background: var(--bg-alt); }

.pricing-cell-input {
  width: 100%;
  min-width: 90px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, background-color 0.15s;
}
.pricing-cell-input:hover { border-color: var(--border); }
.pricing-cell-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}

.pricing-row-remove {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.pricing-row-remove:hover { border-color: #d3455b; color: #d3455b; }

.pricing-table-actions {
  display: flex;
  justify-content: flex-end;
  padding: 12px 4px 0;
}

.pricing-add-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.pricing-add-row:hover { border-color: var(--accent); color: var(--accent); }

/* Barra de ações fixa ao rodapé do conteúdo */
.pricing-save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
}

.pricing-save-btn {
  padding: 11px 22px;
  border: none;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pricing-save-btn:hover { opacity: 0.92; }
.pricing-save-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.pricing-save-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: pricing-spin 0.7s linear infinite;
  display: none;
}
.pricing-save-btn.is-saving .pricing-save-spinner { display: inline-block; }
.pricing-save-btn.is-saving .pricing-save-label { opacity: 0.85; }

@keyframes pricing-spin {
  to { transform: rotate(360deg); }
}

.pricing-save-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.pricing-save-status.is-visible { opacity: 1; transform: translateY(0); }
.pricing-save-status.is-success { color: #2fa876; }
.pricing-save-status.is-error { color: #d3455b; }

.pricing-skeleton {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 4px 0;
}

/* ---------- Calculadora ---------- */
.calc-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 4px;
  margin-bottom: 20px;
}
.calc-tab {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.calc-tab:hover { color: var(--text); }
.calc-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }

.calc-form-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.calc-time-field { grid-column: span 2; min-width: 280px; }
.calc-time-inputs { display: flex; gap: 10px; }
.calc-time-inputs .pricing-input-wrap { flex: 1; min-width: 120px; }

.calc-select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.calc-select:focus { outline: none; border-color: var(--accent); }

.calc-run-btn { align-self: flex-start; }

.calc-status {
  min-height: 20px;
  margin-top: 14px;
  font-size: 0.85rem;
}
.calc-status.is-error { color: #d3455b; }
.calc-status.is-success { color: #2fa876; }

.calc-result {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  animation: calc-result-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes calc-result-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.calc-result-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-alt);
  border-radius: 10px;
}
.calc-result-label { font-weight: 600; color: var(--text-muted); font-size: 0.9rem; }
.calc-result-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.calc-result-note { margin-top: 10px; font-size: 0.8rem; color: var(--text-muted); }

.calc-breakdown { margin-bottom: 20px; }
.calc-breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.calc-breakdown-row span:last-child { font-variant-numeric: tabular-nums; color: var(--text); }
.calc-breakdown-total {
  border-bottom: none;
  padding-top: 12px;
  font-weight: 700;
  color: var(--text);
}
.calc-breakdown-total span:last-child { color: var(--accent); font-size: 1rem; }

.calc-venda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.calc-venda-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-radius: 10px;
}
.calc-venda-pct { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.calc-venda-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.calc-venda-sub { font-size: 0.78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; line-height: 1.3; }
.calc-venda-sub strong { color: var(--text); }
.calc-venda-sub.is-negative, .calc-venda-sub.is-negative strong { color: #dc2626; }

/* ---------- Produtos / SKUs ---------- */
.products-main { max-width: 2200px; }

select.pricing-cell-input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) center, calc(100% - 9px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.sku-table { min-width: 0; width: 100%; }

/* Cartão de 2 linhas por SKU, em vez de colunas de tabela apertadas */
.sku-row-cell { padding: 14px 16px; }
.sku-row-line {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}
.sku-row-line + .sku-row-line { margin-top: 12px; }
.sku-row-line .pricing-field { margin-bottom: 0; }
.sku-row-line .pricing-field label { margin-bottom: 4px; }
.sku-row-field-code-full { flex: 1 1 100%; }
.sku-row-field-code-half, .sku-row-field-alias-half { flex: 1 1 260px; min-width: 0; }
.sku-row-field-code-half .suggested-sku { width: 100%; }
.sku-row-field-code-half .suggested-sku input { flex: 1; min-width: 0; }
.sku-row-field-alias-half label small { font-weight: 400; color: var(--text-muted); }
.sku-row-field-code-full .suggested-sku { width: 100%; }
.sku-row-field-code-full .suggested-sku input { flex: 1; min-width: 0; }
.sku-row-field-nome { flex: 1 1 200px; }
.sku-row-field-listing { flex: 1 1 220px; }
.sku-row-field-valor { flex: 0 0 150px; }
.sku-row-field-presencial { flex: 0 0 150px; }
.sku-row-field-pct { flex: 0 0 64px; text-align: center; }
.sku-row-field-pct label { text-align: center; }
.sku-row-valor-input { color: var(--accent); font-weight: 700; }
.sku-row-actions-group { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sku-row-actions-group [data-sku-actions]:hover { border-color: var(--text-muted); color: var(--text-muted); }

/* Mesmo padrão de cartão de 2 linhas, genérico (usado por Produtos e Anúncios também) */
.admin-row-cell { padding: 14px 16px; }
.admin-row-line {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}
.admin-row-line + .admin-row-line { margin-top: 12px; }
.admin-row-line .pricing-field { margin-bottom: 0; }
.admin-row-line .pricing-field label { margin-bottom: 4px; }
.admin-row-field-wide { flex: 1 1 220px; }
.admin-row-field-medium { flex: 1 1 160px; }
.admin-row-field-narrow { flex: 0 0 140px; }
.admin-row-field-xnarrow { flex: 0 0 100px; }
.admin-row-actions-group { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.admin-row-actions-group [data-product-actions]:hover,
.admin-row-actions-group [data-listing-actions]:hover { border-color: var(--text-muted); color: var(--text-muted); }

.suggested-sku {
  display: flex;
  align-items: center;
  gap: 6px;
}
.suggested-sku code {
  font-size: 0.78rem;
  font-family: 'Courier New', monospace;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.suggested-sku-copy {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.suggested-sku-copy:hover { border-color: var(--accent); color: var(--accent); }

.admin-row-actions-group [data-duplicate-product] {
  padding: 7px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.sku-toggle-items {
  white-space: nowrap;
  padding: 7px 12px;
  font-size: 0.78rem;
}

.sku-components-row td {
  padding: 0;
  border-bottom: 1px solid var(--border);
}

.sku-components-panel {
  background: var(--bg-alt);
  padding: 16px 20px;
  border-radius: 0 0 10px 10px;
}

.sku-components-table { min-width: 0; margin-bottom: 12px; }
.sku-components-table th, .sku-components-table td { padding: 8px 10px; }
.sku-components-table td:first-child { width: 60%; }

.sku-fin-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.sku-fin-detail strong { color: var(--text); font-variant-numeric: tabular-nums; }

.sku-fin-lucro { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.sku-fin-pct { font-variant-numeric: tabular-nums; color: var(--text-muted); }

/* ---------- Pedidos ---------- */
.order-items-editor { margin-top: 20px; }
.order-items-editor .sku-components-table td:first-child { width: 34%; }
.order-items-editor .sku-components-table td:nth-child(2) { width: 34%; }

.orders-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.order-card-num { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.order-card-num-wrap { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-card-unidades { font-size: 0.78rem; font-weight: 700; color: #b45309; white-space: nowrap; }
.order-card-canal {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: var(--bg-alt);
  padding: 3px 8px;
  border-radius: 999px;
}

.order-card-plataforma { font-size: 0.8rem; color: var(--text-muted); }

.order-card-items { list-style: none; font-size: 0.85rem; }
.order-card-items li { padding: 6px 0; }

.order-item-comment {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.78rem;
  transition: border-color 0.15s;
}
.order-item-comment, .order-comment-autogrow {
  resize: none;
  overflow: hidden;
  min-height: 0;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.order-item-comment::placeholder { color: var(--text-muted); }
.order-item-comment:hover { border-color: var(--border); }
.order-item-comment:focus { outline: none; border-color: var(--accent); background: var(--bg); }

.order-item-components {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--accent-2);
  font-weight: 600;
}

.order-item-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent-2);
  background: var(--bg-alt);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
}

.order-items-table { min-width: 1080px; }
.order-items-checkbox-cell { text-align: center; }
.order-items-checkbox-cell input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }

.order-card-fin {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}
.order-card-fin strong { color: var(--text); font-variant-numeric: tabular-nums; }
.order-card-fin-centered { justify-content: center; }

.order-card-obs { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }
.order-card-separado-por { font-size: 0.76rem; color: var(--text-muted); }

/* Checklist do pedido: no card, marcado = texto riscado */
.order-card-checklist { list-style: none; font-size: 0.82rem; display: flex; flex-direction: column; gap: 4px; }
.order-card-checklist label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; line-height: 1.35; }
.order-card-checklist input { margin-top: 2px; flex: 0 0 auto; cursor: pointer; }
.order-card-checklist label.is-done span { text-decoration: line-through; opacity: 0.6; }
.order-checklist-hint { font-weight: 400; color: var(--text-muted); font-size: 0.8rem; }
.order-checklist-editor { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.order-checklist-editor:empty { display: none; }
.order-checklist-row { display: flex; align-items: center; gap: 8px; }
.order-checklist-row input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; cursor: pointer; }

.order-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}
.order-card-actions button {
  min-width: 0;
  justify-content: center;
  white-space: normal;
  line-height: 1.2;
  padding: 8px 8px;
  font-size: 0.8rem;
}

.order-card-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.order-card-btn-danger:hover { border-color: #d3455b; color: #d3455b; }

@media (max-width: 780px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-main { padding: 24px; }
  .pricing-toggle-row { flex-direction: column; align-items: flex-start; }
  .pricing-toggle-combo { width: 100%; justify-content: space-between; }
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 18, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  z-index: 100;
}
.modal-overlay[hidden] { display: none; }

.modal-panel {
  width: 100%;
  max-width: 880px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.modal-head h2 { font-size: 1.25rem; margin-bottom: 4px; }
.modal-head p { color: var(--text-muted); font-size: 0.85rem; }

.modal-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Botão "+ Lançar pedido" ---------- */
.admin-section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-section-head-row .admin-section-head { flex: 1; min-width: 220px; }

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

/* ---------- Itens do pedido: cartões em grade, não tabela ---------- */
.order-item-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
  position: relative;
}
.order-item-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.order-item-card-grid .pricing-field label { margin-bottom: 6px; }
.order-item-card-grid .order-item-checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 26px;
}
.order-item-checkbox-field label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin: 0; }
.order-item-checkbox-field input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
.order-item-card-comments { grid-column: 1 / -1; }
.order-item-card-suggestions { grid-column: 1 / -1; }
.order-item-suggest-list { display: flex; flex-wrap: wrap; gap: 8px; }
.order-item-suggest-chip { font-size: 0.8rem; padding: 6px 12px; }
.order-item-suggest-chip-picked { border-style: solid; border-color: var(--accent); color: var(--accent); }

.order-item-card-remove {
  position: absolute;
  top: 12px;
  right: 12px;
}

/* ---------- Cards de pedido: fundo por status ---------- */
.order-card.status-pendente_separacao {
  background: #fdf3d0;
  border-color: #e8d68a;
  color: #4a3c00;
}
.order-card.status-pendente_separacao .order-card-canal { background: rgba(0, 0, 0, 0.08); color: #7a5f00; }
.order-card.status-pendente_separacao .order-card-plataforma,
.order-card.status-pendente_separacao .order-card-fin,
.order-card.status-pendente_separacao .order-card-obs,
.order-card.status-pendente_separacao .order-card-separado-por { color: #6b5a1f; }
.order-card.status-pendente_separacao .order-card-fin { border-top-color: #e8d68a; border-bottom-color: #e8d68a; }
.order-card.status-pendente_separacao .order-card-fin strong { color: #3a2f00; }
.order-card.status-pendente_separacao .order-item-comment { background: rgba(255, 255, 255, 0.5); color: #3a2f00; }

.order-card.status-aguardando_envio {
  background: #d9f2e3;
  border-color: #9bd9b3;
  color: #10402a;
}
.order-card.status-aguardando_envio .order-card-canal { background: rgba(0, 0, 0, 0.08); color: #1c6b41; }
.order-card.status-aguardando_envio .order-card-plataforma,
.order-card.status-aguardando_envio .order-card-fin,
.order-card.status-aguardando_envio .order-card-obs,
.order-card.status-aguardando_envio .order-card-separado-por { color: #2a5c3f; }
.order-card.status-aguardando_envio .order-card-fin { border-top-color: #9bd9b3; border-bottom-color: #9bd9b3; }
.order-card.status-aguardando_envio .order-card-fin strong { color: #0d3320; }
.order-card.status-aguardando_envio .order-item-comment { background: rgba(255, 255, 255, 0.5); color: #0d3320; }

.order-card.status-enviado {
  background: var(--surface);
}

/* ---------- Botão voltar ao topo ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  z-index: 40;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent); }
.back-to-top svg { width: 20px; height: 20px; }

@media (max-width: 780px) {
  .back-to-top { right: 16px; bottom: 16px; }
}

/* ---------- Selo de canal em destaque nos cards de pedido ---------- */
.order-card .order-card-canal.canal-shopee, .order-card-canal.canal-shopee {
  background: #ff6a00;
  color: #fff;
  font-weight: 800;
}
.order-card .order-card-canal.canal-mercado_livre, .order-card-canal.canal-mercado_livre {
  background: #ffe600;
  color: #2b2b2b;
  font-weight: 800;
}

/* ---------- Relatórios ---------- */
.report-period-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.report-custom-dates { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; max-width: 420px; }
.report-custom-dates .pricing-field { flex: 1 1 160px; }

.report-stats { display: flex; flex-wrap: wrap; gap: 14px; }
.report-stat-card {
  flex: 1 1 160px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.report-stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.report-stat-value { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.report-stat-bruto .report-stat-value { color: var(--accent); }
.report-stat-liquido .report-stat-value { color: #2ecc71; }
.report-period-label { margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); }

.report-heat-zero { background: rgba(211, 69, 91, 0.16); }
.report-heat-low { background: rgba(255, 145, 0, 0.14); }
.report-heat-mid { background: rgba(255, 214, 0, 0.14); }
.report-heat-high { background: rgba(46, 204, 113, 0.18); }

.report-year-head { margin: 20px 0 10px; }

.report-marketplace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.report-chart-wrap { max-width: 360px; margin: 16px auto 0; }
@media (max-width: 780px) { .report-marketplace-grid { grid-template-columns: 1fr; } }

.fora-padrao-banner {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.fora-padrao-banner a { color: var(--accent); font-weight: 700; margin-left: 6px; }

.merge-action-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.merge-action-bar .report-period-label { margin: 0; }

.merge-tag-same {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ff6a00;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.merge-base-input { display: inline-block; width: auto; min-width: 220px; font-weight: 700; }

.merge-search-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.merge-search-row .pricing-field { flex: 1 1 280px; margin-bottom: 0; }
.merge-hide-grouped-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-bottom: 10px;
  white-space: nowrap;
  cursor: pointer;
}
.merge-hide-grouped-toggle input { width: 16px; height: 16px; cursor: pointer; }

.admin-section-count { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); margin-left: 6px; }
.report-year-head:first-child { margin-top: 0; }


/* ---------- Marketplaces: Shopee sempre laranja, Mercado Livre sempre amarelo ---------- */
:root { --mk-shopee: #e85d00; --mk-ml: #a88300; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --mk-shopee: #ff7a1a; --mk-ml: #ffe600; }
}
:root[data-theme="dark"] { --mk-shopee: #ff7a1a; --mk-ml: #ffe600; }
.mk-shopee { color: var(--mk-shopee); font-weight: 700; }
.mk-ml { color: var(--mk-ml); font-weight: 700; }
.order-card-canal .mk-shopee, .order-card-canal .mk-ml { color: inherit; }

/* ---------- Relatorio de produtos ---------- */
.rp-controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.rp-table small { color: var(--text-muted); }
.rp-table td { vertical-align: middle; }
.rp-bar-cell { min-width: 130px; }
.rp-bar { height: 6px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; margin-bottom: 4px; }
.rp-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.rp-good { color: #2fb56a; font-weight: 700; }
.rp-warn { color: #d9a300; font-weight: 700; }
.rp-bad { color: #e0505f; font-weight: 700; }

/* ---------- Navegação de mês nos relatórios ---------- */
.report-month-head { display: flex; align-items: center; gap: 16px; }
.report-month-head h2, .report-month-head p { margin: 0; }
.report-month-arrow {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.report-month-arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.report-month-arrow:disabled { opacity: 0.35; cursor: not-allowed; }
.report-custom-dates[hidden] { display: none; }
.report-custom-dates .report-today-btn { align-self: flex-end; margin-bottom: 2px; }
#monthSummary { margin-bottom: 18px; }

.rp-tabs { flex-wrap: wrap; margin-bottom: 16px; }
.rp-panel[hidden] { display: none; }

.dd-row { cursor: pointer; }
.dd-row:hover td { background: var(--bg-alt); }
.dd-caret { display: inline-block; width: 1em; color: var(--text-muted); }
.dd-detail > td { background: var(--bg-alt); padding: 8px 16px 16px; }
.dd-top-table small { color: var(--text-muted); }

/* Rodapé do card em 3 colunas: Editar | Pedido criado em <data> | Apagar */
.order-card-bottom { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 2px; margin-bottom: -4px; }
.order-card-bottom-date { text-align: center; font-size: 0.72rem; }
.order-card-meta { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.order-card-btn-small { padding: 4px 10px; font-size: 0.74rem; flex: 0 0 auto; }

/* Botão "Produzindo": alterna o card pra azul enquanto a peça está sendo feita */
.order-card-btn-producao { display: inline-flex; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.order-card-btn-producao-icon { display: inline-block; }
.order-card-btn-producao.is-active { border-color: #3b82f6; color: #1d4ed8; background: rgba(59, 130, 246, 0.12); }
.order-card-btn-producao.is-active .order-card-btn-producao-icon { animation: order-producao-spin 1.4s linear infinite; }
@keyframes order-producao-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---------- Card "Produzindo": fundo azul enquanto a peça está sendo feita ---------- */
.order-card.order-em-producao {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1e3a5f;
}
.order-card.order-em-producao .order-card-canal { background: rgba(0, 0, 0, 0.08); color: #1d4ed8; }
.order-card.order-em-producao .order-card-plataforma,
.order-card.order-em-producao .order-card-fin,
.order-card.order-em-producao .order-card-obs,
.order-card.order-em-producao .order-card-separado-por { color: #2d5286; }
.order-card.order-em-producao .order-card-fin { border-top-color: #60a5fa; border-bottom-color: #60a5fa; }
.order-card.order-em-producao .order-card-fin strong { color: #16305c; }
.order-card.order-em-producao .order-item-comment { background: rgba(255, 255, 255, 0.5); color: #16305c; }
.order-card.order-em-producao .order-card-btn-producao.is-active { background: rgba(255, 255, 255, 0.55); border-color: #1d4ed8; color: #16305c; }

/* ---------- Exportar pedidos enviados ---------- */
.export-wrap { position: relative; flex-shrink: 0; }
.export-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 300px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35); padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.export-menu[hidden] { display: none; }
.export-menu h3 { font-size: 0.95rem; margin: 0; }
.export-custom { display: flex; gap: 10px; }
.export-custom[hidden] { display: none; }
.export-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Cadastrar produto ---------- */
.pn-form { display: flex; flex-direction: column; gap: 20px; }
.pn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pn-span-2 { grid-column: span 2; }
.pn-preview { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; color: var(--text-muted); padding: 12px 14px; border-radius: 10px; background: var(--bg-alt); }
.pn-preview strong { color: var(--text); font-variant-numeric: tabular-nums; }
.pn-listing-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; margin-top: 10px; }
.pn-listing-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 0.88rem; }
.pn-listing-item:last-child { border-bottom: none; }
.pn-listing-item:hover { background: var(--bg-alt); }
.pn-listing-item small { color: var(--text-muted); margin-left: 6px; }
.pn-newlisting { margin-top: 12px; }
.pn-newlisting summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.pn-actions { display: flex; align-items: center; gap: 14px; }
@media (max-width: 640px) { .pn-grid { grid-template-columns: 1fr; } .pn-span-2 { grid-column: auto; } }

/* ---------- Pedido sem SKU vinculado: card laranja + ❗ entre o número e a plataforma ---------- */
.order-card-warn { font-size: 1rem; line-height: 1; }
.order-card.order-no-sku {
  background: #ffd9b0;
  border-color: #f29a3c;
  color: #5a2d00;
}
.order-card.order-no-sku .order-card-canal { background: rgba(0, 0, 0, 0.08); color: #8a4200; }
.order-card.order-no-sku .order-card-plataforma,
.order-card.order-no-sku .order-card-fin,
.order-card.order-no-sku .order-card-obs,
.order-card.order-no-sku .order-card-separado-por { color: #7a3d00; }
.order-card.order-no-sku .order-card-fin { border-top-color: #f29a3c; border-bottom-color: #f29a3c; }
.order-card.order-no-sku .order-card-fin strong { color: #4a2400; }
.order-card.order-no-sku .order-item-comment { background: rgba(255, 255, 255, 0.5); color: #4a2400; }

/* ---------- Pedido orçamento: card rosa pra chamar atenção (vai pro fim da fila) ---------- */
.order-card.order-orcamento:not(.order-em-producao) {
  background: #fcdcec;
  border-color: #ec7fb3;
  color: #5c1238;
}
.order-card.order-orcamento:not(.order-em-producao) .order-card-canal { background: #ec4899; color: #fff; }
.order-card.order-orcamento:not(.order-em-producao) .order-card-plataforma,
.order-card.order-orcamento:not(.order-em-producao) .order-card-fin,
.order-card.order-orcamento:not(.order-em-producao) .order-card-obs,
.order-card.order-orcamento:not(.order-em-producao) .order-card-separado-por { color: #7d2150; }
.order-card.order-orcamento:not(.order-em-producao) .order-card-fin { border-top-color: #ec7fb3; border-bottom-color: #ec7fb3; }
.order-card.order-orcamento:not(.order-em-producao) .order-card-fin strong { color: #4a0d2d; }
.order-card.order-orcamento:not(.order-em-producao) .order-item-comment { background: rgba(255, 255, 255, 0.5); color: #4a0d2d; }

/* ---------- Calculadora: lucro líquido esperado ---------- */
.calc-profit-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 10px; padding: 12px 20px; border-radius: 12px; background: var(--bg-alt); cursor: help;
}
.calc-profit-label { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }
.calc-profit-value { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: #22c55e; font-variant-numeric: tabular-nums; }
.calc-profit-value.is-negative { color: #ef4444; }

/* ---------- Calculadora: abas de marketplace + parâmetros do ML ---------- */
.calc-mk-tabs { margin-bottom: 16px; }
#mlParamsNote { margin: -6px 0 14px; }
#mlParamsNote a { color: var(--accent); }

/* ---------- Menu de ações do SKU (⋯) ---------- */
.sku-actions-menu { position: relative; display: inline-flex; }
.sku-actions-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 150px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35); padding: 6px; display: flex; flex-direction: column;
}
.sku-actions-list[hidden] { display: none; }
.sku-actions-list button {
  background: none; border: none; color: var(--text); text-align: left; cursor: pointer;
  padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 0.88rem; white-space: nowrap;
}
.sku-actions-list button:hover { background: var(--bg-alt); }

/* ---------- Custo de produção editável no SKU ---------- */
.sku-fin-custo { display: inline-flex; align-items: center; gap: 6px; }
.sku-fin-custo-wrap { display: inline-flex; align-items: center; gap: 2px; }
.sku-fin-custo-input {
  width: 84px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-alt); color: var(--text); font: inherit; font-weight: 700; font-variant-numeric: tabular-nums;
}
.sku-fin-custo-input[readonly] { border-color: transparent; background: transparent; cursor: help; }
.sku-fin-rest { display: contents; }

/* ---------- Perfil Convidado (somente leitura) ---------- */
.guest-banner {
  margin-bottom: 14px; padding: 8px 14px; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
  background: rgba(59, 130, 246, 0.14); color: var(--text); border: 1px dashed rgba(59, 130, 246, 0.5);
}
.guest-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 1000; opacity: 0; pointer-events: none;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 16px; font-size: 0.9rem; box-shadow: 0 10px 30px rgba(0,0,0,0.4); transition: opacity 0.2s, transform 0.2s;
}
.guest-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
body.is-guest #openLaunchOrderBtn, body.is-guest #bulkSepararBtn, body.is-guest #bulkEnviarBtn, body.is-guest #launchOrderBtn,
body.is-guest [data-delete-order], body.is-guest [data-edit-order], body.is-guest [data-set-status], body.is-guest [data-restore-order],
body.is-guest #saveBtn, body.is-guest #pnSaveBtn, body.is-guest #addSkuBtn, body.is-guest #addProductBtn, body.is-guest #addListingBtn,
body.is-guest #addTierBtn, body.is-guest #addFilamentBtn, body.is-guest [data-add-component], body.is-guest [data-remove-component],
body.is-guest [data-remove-listing], body.is-guest [data-remove-product], body.is-guest [data-remove-sku], body.is-guest [data-remove-member],
body.is-guest [data-dissolve-group], body.is-guest [data-suggest-sku-code], body.is-guest [data-suggest-group-sku], body.is-guest [data-copy-sku],
body.is-guest [data-duplicate-product], body.is-guest [data-product-actions], body.is-guest [data-sku-actions], body.is-guest .sku-actions-menu,
body.is-guest [data-clone-sku], body.is-guest #mergeBtn, body.is-guest [aria-label="Remover faixa"], body.is-guest [aria-label="Remover filamento"] {
  display: none !important;
}

/* ---------- Usuários: cadastro, redefinir senha, perfil ---------- */
.usr-pass-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.usr-pass-field { grid-column: span 2; }
.usr-pass-row .pricing-cell-input { flex: 1 1 220px; min-width: 200px; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.usr-pass-row .pricing-add-row { white-space: nowrap; }
.usr-form { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; max-width: 900px; }
.usr-form .pricing-grid { width: 100%; }
.usr-actions { text-align: right; white-space: nowrap; }
.usr-role-select { min-width: 170px; }
.usr-credentials {
  margin: 0 0 16px; padding: 16px 18px; border-radius: 12px; display: flex; flex-direction: column; gap: 10px;
  background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.45);
}
.usr-credentials[hidden] { display: none; }
.usr-cred-lines { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.usr-credentials code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; font-weight: 700; user-select: all; }
.usr-cred-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.usr-credentials small { color: var(--text-muted); }
/* Convidado: sem exportação de CSV */
body.is-guest #exportAllBtn, body.is-guest #exportMenuBtn, body.is-guest .export-wrap { display: none !important; }

.usr-delete-btn:hover { border-color: #ef4444; color: #ef4444; }

/* ---------- Calculadora Presencial: imposto + simulador de lote ---------- */
.calc-presencial-opts { margin-bottom: 16px; }
.calc-imposto-options { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.calc-radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9rem; }
.calc-radio input[type="radio"] { width: 16px; height: 16px; cursor: pointer; }
.calc-imposto-custom { width: 110px; }
.calc-sim { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.calc-sim-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; }
.calc-sim-head h3 { font-size: 1rem; margin: 0 auto 6px 0; }
.calc-sim-piso { width: 130px; }
.calc-sim-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-sim-desc { width: 92px; }
.calc-sim-desc input:disabled { opacity: 0.5; }
.calc-sim-lucro { color: #22c55e; font-weight: 600; }
.calc-sim-table tr.is-negative .calc-sim-lucro { color: #ef4444; }
.calc-sim-desc input {
  width: 100%; padding: 7px 28px 7px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 0.88rem; font-variant-numeric: tabular-nums;
}
.calc-sim-desc input:focus { outline: none; border-color: var(--accent); }
.calc-sim-desc .pricing-affix { right: 10px; }
.calc-tabs[hidden], .calc-presencial-opts[hidden], .calc-sim[hidden] { display: none; }
.pricing-field .calc-radio { display: inline-flex; align-items: center; margin: 0; font-weight: 500; color: var(--text); text-transform: none; letter-spacing: 0; }
.calc-imposto-custom input[type="number"] { padding: 8px 30px 8px 12px; }
.calc-presencial-opts { display: flex; flex-direction: column; gap: 14px; }
.calc-presencial-opts[hidden] { display: none; }
.calc-sim-piso input[type="number"] { padding: 9px 12px; }
.calc-preco-custom { width: 130px; }
.calc-preco-custom input[type="number"] { padding: 8px 12px 8px 38px; }
.calc-imposto-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 10px; padding: 10px 20px; border-radius: 12px; background: var(--bg-alt);
}
.calc-imposto-row[hidden] { display: none; }
.calc-imposto-value { font-weight: 700; color: #d97706; font-variant-numeric: tabular-nums; }

/* ---------- Gerar orçamento ---------- */
.orc-panel { margin-bottom: 18px; }
.orc-h2 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.orc-h3 { font-size: 0.9rem; font-weight: 700; margin: 20px 0 12px; color: var(--text-muted); }
.orc-hint { font-size: 0.8rem; font-weight: 400; color: var(--text-muted); }
.orc-editing { font-size: 0.78rem; font-weight: 600; color: var(--accent); background: var(--bg-alt); padding: 2px 10px; border-radius: 999px; }
.orc-editing[hidden] { display: none; }
.orc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; }
.orc-span-all { grid-column: 1 / -1; }
.orc-input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 0.92rem;
}
textarea.orc-input { resize: none; overflow: hidden; line-height: 1.35; }
.orc-input:focus { outline: none; border-color: var(--accent); }
.orc-input:disabled { opacity: 0.7; }
.orc-items-table td { vertical-align: top; }
.orc-items-table .orc-input { padding: 7px 9px; font-size: 0.86rem; min-width: 80px; }
.orc-items-table td:nth-child(2) .orc-input { min-width: 220px; }
.orc-items-table .orc-num { min-width: 70px; max-width: 110px; text-align: right; }
.orc-item-n { font-weight: 700; color: var(--text-muted); padding-top: 14px !important; }
.orc-item-total { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 14px !important; }
.orc-totals { margin-top: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 0.9rem; }
.orc-totals div { display: flex; gap: 18px; }
.orc-totals strong { font-variant-numeric: tabular-nums; min-width: 110px; text-align: right; }
.orc-total-main { font-size: 1.05rem; color: var(--accent); }
.orc-details summary { cursor: pointer; list-style: none; }
.orc-details summary::-webkit-details-marker { display: none; }
.orc-details summary .orc-h2 { margin-bottom: 0; }
.orc-details summary .orc-h2::before { content: '▸ '; }
.orc-details[open] summary .orc-h2::before { content: '▾ '; }
.orc-details[open] summary { margin-bottom: 6px; }
.orc-fotos { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.orc-foto { position: relative; width: 120px; height: 120px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.orc-foto img { width: 100%; height: 100%; object-fit: cover; }
.orc-foto button { position: absolute; top: 4px; right: 4px; background: var(--surface); }
.orc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 36px; }
.orc-history-actions { display: flex; gap: 6px; justify-content: flex-end; }
.calc-sim-orc { text-decoration: none; white-space: nowrap; display: inline-block; }
/* Histórico de orçamentos: linha verde (aprovado) / vermelha (rejeitado) */
.pricing-table tbody tr.orc-row-aprovado, .pricing-table tbody tr.orc-row-aprovado:hover { background: rgba(34, 197, 94, 0.18); }
.pricing-table tbody tr.orc-row-rejeitado, .pricing-table tbody tr.orc-row-rejeitado:hover { background: rgba(239, 68, 68, 0.18); }
.orc-status-btn.is-active[data-status="aprovado"] { border-color: #22c55e; background: rgba(34, 197, 94, 0.2); }
.orc-status-btn.is-active[data-status="rejeitado"] { border-color: #ef4444; background: rgba(239, 68, 68, 0.2); }

/* Convidado em Orçamentos: só consulta e baixa o PDF dos já emitidos (sem criar, abrir/editar nem mudar status) */
body.is-guest .orc-panel, body.is-guest .orc-actions, body.is-guest #orcNovoBtn,
body.is-guest .orc-history [data-status], body.is-guest .orc-history [data-abrir] { display: none !important; }

/* Pedido Orçamento: prazos abaixo das tags do item */
.order-card-prazos { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 2px; font-size: 0.78rem; }
.order-card-prazos strong { font-variant-numeric: tabular-nums; }

/* Prazo de despacho vindo do marketplace (ML/Shopee) */
.order-card-prazo-envio { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.order-prazo { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; font-variant-numeric: tabular-nums; background: rgba(0, 0, 0, 0.08); color: inherit; }
.order-prazo.is-hoje { background: #f59e0b; color: #1f1300; }
.order-prazo.is-atrasado { background: #dc2626; color: #fff; }
.order-card-btn-travado, .order-card-btn-travado:hover { opacity: 0.75; cursor: not-allowed; }
.order-prazo-nota { background: rgba(37, 99, 235, 0.15); }

/* Checklist de Orçamento com quantidade: "prontas / total" + barra de progresso */
.order-checklist-row .order-checklist-meta { width: 76px; min-width: 76px; flex: 0 0 76px; text-align: center; }
.order-checklist-row [data-checklist-texto] { flex: 1 1 0; min-width: 0; }
.order-checklist-editor:not(.is-orcamento) .order-checklist-meta { display: none; }
.order-card-checklist li.order-check-qty { display: flex; flex-direction: column; gap: 4px; }
.order-check-qty-line { display: flex; align-items: center; gap: 6px; line-height: 1.35; }
.order-check-qty-line input { width: 58px; padding: 2px 6px; border-radius: 6px; border: 1px solid rgba(0,0,0,0.25); background: rgba(255,255,255,0.6); color: inherit; font: inherit; font-weight: 700; text-align: center; }
.order-check-bar { position: relative; height: 16px; border-radius: 999px; background: rgba(0,0,0,0.14); overflow: hidden; }
.order-check-bar-fill { height: 100%; border-radius: 999px; background: #22c55e; transition: width 0.25s; }
.order-check-qty.is-done .order-check-qty-text { text-decoration: line-through; opacity: 0.6; }
.order-check-bar-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 700; color: #0b1a10; text-shadow: 0 0 3px rgba(255,255,255,0.7); pointer-events: none; }

/* ---------- Controle de estoque (filamentos) ---------- */
.stk-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .stk-layout { grid-template-columns: 1fr; } }
.stk-entry { display: flex; flex-direction: column; gap: 16px; }
.stk-panel { padding: 18px; }
.stk-h2 { font-size: 1rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.stk-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stk-mode-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 10px; border-radius: 12px; border: 2px solid var(--border); background: var(--bg-alt); color: var(--text); font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.stk-mode-btn small { font-weight: 400; color: var(--text-muted); font-size: 0.75rem; }
#modeEntrada.is-active { border-color: #22c55e; background: rgba(34,197,94,0.14); }
#modeSaida.is-active { border-color: #f97316; background: rgba(249,115,22,0.14); }
.stk-mode-tag { font-size: 0.72rem; padding: 3px 10px; border-radius: 999px; font-weight: 700; }
.stk-mode-tag.is-entrada, .stk-badge.is-entrada { background: rgba(34,197,94,0.18); color: #16a34a; }
.stk-mode-tag.is-saida, .stk-badge.is-saida { background: rgba(249,115,22,0.18); color: #ea580c; }
.stk-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 0.78rem; white-space: nowrap; }
.stk-scan-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.stk-file-btn { cursor: pointer; }
.stk-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 8px; }
.stk-fields .pricing-field:first-child { grid-column: span 2; }
.stk-video { width: 100%; max-height: 60vh; background: #000; border-radius: 12px; margin-bottom: 12px; }
.stk-cam-panel { max-width: 720px; }
.stk-rel-panel { max-width: 460px; }
.stk-rel-form { display: grid; gap: 8px; }
.stk-rel-form label { font-weight: 600; font-size: 0.9rem; }
.stk-rel-form input[type="date"] { max-width: 220px; }
.stk-multi-cell, .stk-multi-th { text-align: center; }
.stk-multi-total { text-align: left; white-space: nowrap; }
.stk-multi-cell input { width: 18px; height: 18px; cursor: pointer; accent-color: #d97757; }
.stk-rel-emb { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px 10px; display: grid; gap: 6px; }
.stk-rel-emb legend { font-weight: 600; font-size: 0.88rem; padding: 0 4px; }
.stk-rel-emb-row { display: grid; grid-template-columns: 1fr 90px; align-items: center; gap: 10px; font-size: 0.88rem; }
.stk-rel-emb-row small { color: var(--text-muted); }
#relEmb { display: grid; gap: 6px; }
.stk-neg { color: #ef4444; }
.stk-zero { color: var(--text-muted); }
.stk-color-row { cursor: pointer; }
.stk-color-row:hover td, .stk-color-row.is-selected td { background: var(--bg-alt); }
.stk-color-row.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.stk-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--bg-alt); }
.stk-filter[hidden] { display: none; }
.stk-undo { margin-left: 8px; }
.stk-saldo td:last-child, .stk-saldo th:last-child { text-align: right; }
body.is-guest .stk-entry-panel { display: none !important; }

/* Câmera contínua: pilha de leituras */
.stk-stack-opt { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; font-size: 0.88rem; }
.stk-stack { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; margin: 8px 0 12px; padding: 0; }
.stk-stack li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(34,197,94,0.12); font-size: 0.88rem; }
.stk-stack li.is-undone { background: var(--bg-alt); color: var(--text-muted); }

.stk-tipo { color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.stk-edit-cell { text-align: right; white-space: nowrap; }
.stk-saldo td:last-child, .stk-saldo th:last-child { text-align: right; }
.stk-saldo td:nth-child(2), .stk-saldo th:nth-child(2) { text-align: center; }

/* Lista de cores cabe na coluna (a tabela padrão tem min-width 560px e escondia o botão Editar) */
.stk-saldo { min-width: 0; table-layout: auto; }
.stk-saldo td, .stk-saldo th { padding-left: 10px; padding-right: 10px; }

body.is-guest .stk-remove-btn, body.is-guest .stk-edit-btn { display: none !important; }

.stk-register-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stk-troca-btn { justify-content: center; }
.stk-log { display: flex; flex-direction: column; gap: 16px; }

/* Quadradinho da cor */
.stk-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; margin-right: 8px; vertical-align: -3px; border: 1px solid rgba(128,128,128,0.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.stk-swatch-unknown { background: repeating-linear-gradient(45deg, transparent 0 3px, rgba(128,128,128,0.45) 3px 5px); }
.stk-swatch-clear { background: conic-gradient(#ccc 25%, #fff 0 50%, #ccc 0 75%, #fff 0) 0 0 / 8px 8px; }
.stk-swatch-troca { background: conic-gradient(#ef4444, #facc15, #22c55e, #3b82f6, #a855f7, #ef4444); }

/* Cor com estoque zerado: vai pro fim da lista e fica em destaque */
.stk-color-row.is-empty td { background: rgba(239, 68, 68, 0.13); }
.stk-color-row.is-empty td:first-child { box-shadow: inset 4px 0 0 #ef4444; }
.stk-color-row.is-empty:hover td { background: rgba(239, 68, 68, 0.2); }
.stk-color-row.is-empty td strong { color: #f87171; }

.stk-export-btn { margin-left: auto; }
body.is-guest .stk-export-btn { display: none !important; }

.stk-sortable { cursor: pointer; user-select: none; }
.stk-sortable:hover { color: var(--text); }
.stk-sort-ind { font-size: 0.7rem; color: var(--accent); }

/* ---------- Menu lateral recolhível ---------- */
.admin-sidebar { transition: width 0.2s ease, padding 0.2s ease; overflow: hidden; }
.sidebar-toggle {
  position: fixed; top: 50%; left: 240px; transform: translateY(-50%); z-index: 60;
  width: 18px; height: 72px; padding: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-left: none; border-radius: 0 10px 10px 0;
  background: var(--surface); color: var(--text-muted); font-size: 1.2rem; line-height: 1; cursor: pointer;
  transition: left 0.2s ease, color 0.15s, background 0.15s;
}
.sidebar-toggle:hover { color: var(--accent); background: var(--bg-alt); }
body.sidebar-collapsed .admin-sidebar { width: 0; padding-left: 0; padding-right: 0; border-right: none; }
body.sidebar-collapsed .sidebar-toggle { left: 0; }
@media (max-width: 780px) { .sidebar-toggle { display: none; } }

/* Usuários: log de acesso */
.usr-log-summary { padding: 14px 18px; margin-bottom: 12px; }
.usr-log-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.usr-status { font-weight: 700; font-size: 0.82rem; white-space: nowrap; }
.usr-status.is-online { color: #22c55e; }
.usr-status.is-idle { color: var(--text-muted); }
.usr-nosession td { color: var(--text-muted); }
#panelUsersLog code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; }

/* Convidado: nada de "Produzindo" nem ações de escrita restantes */
body.is-guest [data-toggle-producao], body.is-guest [data-remove-mov], body.is-guest [data-edit-color], body.is-guest #trocaBtn, body.is-guest #registerBtn { display: none !important; }

/* ---------- Tela de boas-vindas: 2/3 atalhos + 1/3 novidades ---------- */
.home-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.home-cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.home-changelog { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.home-changelog h2 { font-size: 1.05rem; margin-bottom: 12px; }
.home-changelog-entry { padding: 12px 0; border-top: 1px solid var(--border); }
.home-changelog-entry:first-of-type { border-top: none; padding-top: 0; }
.home-changelog-date { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; margin-bottom: 2px; }
.home-changelog-new { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(34,197,94,0.18); color: #16a34a; font-size: 0.68rem; text-transform: uppercase; }
.home-changelog-entry h3 { font-size: 0.95rem; margin-bottom: 6px; }
.home-changelog-entry ul { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 0.84rem; color: var(--text-muted); }
@media (max-width: 1000px) { .home-layout { grid-template-columns: 1fr; } .home-changelog { position: static; max-height: none; } }

/* Quadradinho da cor clicável (escolher a cor) */
.stk-swatch-btn { background: none; border: none; padding: 0; margin: 0; cursor: pointer; display: inline-block; line-height: 1; }
.stk-swatch-btn:hover .stk-swatch { outline: 2px solid var(--accent); outline-offset: 1px; }
.stk-color-picker { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
body.is-guest .stk-swatch-btn { pointer-events: none; cursor: default; }

/* Seletor de cor invisível por cima do quadradinho (abre ancorado nele) */
.stk-swatch-btn { position: relative; }
.stk-swatch-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: none; }

/* Merge SKU's: sugestões automáticas por proximidade de nome/preço */
.merge-suggestions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.merge-suggestion-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2, rgba(255,255,255,0.02)); }
.merge-suggestion-pair { display: flex; align-items: center; gap: 10px; }
.merge-suggestion-sku { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.merge-suggestion-sku strong { font-size: 0.85rem; word-break: break-word; }
.merge-suggestion-sku span { font-size: 0.82rem; color: var(--text-muted); }
.merge-suggestion-sku small { font-size: 0.72rem; color: var(--text-muted); }
.merge-suggestion-vs { color: var(--text-muted); font-weight: 700; }
.merge-suggestion-score { font-size: 0.72rem; font-weight: 700; color: var(--accent); text-transform: uppercase; }
.merge-suggestion-actions { display: flex; gap: 8px; }
.merge-suggestion-actions button { flex: 1; }

/* Estoque de filamentos: filtro de tipo de movimentação (ambos/entrada/retirada) */
.stk-mov-filter { display: inline-flex; gap: 4px; margin-left: 10px; vertical-align: middle; }
.stk-mov-filter-btn { font-size: 0.72rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; }
.stk-mov-filter-btn:hover { color: var(--text); }
.stk-mov-filter-btn.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Estoque de filamentos: badge com o total de rolos em estoque */
.stk-total-badge { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); background: var(--border); padding: 3px 10px; border-radius: 999px; vertical-align: middle; }

/* Relatórios > Meta: barra de progresso e tabela resumo */
.meta-goal-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.meta-goal-row .pricing-field { min-width: 220px; }
.meta-table { margin-top: 10px; }
.meta-table td { padding: 10px 14px; }
.meta-table-label { font-weight: 700; text-align: right; width: 22%; }
.meta-table-value { font-weight: 800; font-variant-numeric: tabular-nums; width: 16%; }
.meta-table-note { color: var(--text-muted); font-size: 0.85rem; }
.meta-table-pct { font-weight: 700; color: var(--accent); text-align: right; white-space: nowrap; }
.meta-table-bar-cell { width: 30%; }
.meta-bar { position: relative; height: 18px; border-radius: 999px; background: rgba(0,0,0,0.14); overflow: hidden; min-width: 140px; }
.meta-bar-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width 0.25s; }
@media (max-width: 800px) {
  .meta-table-label, .meta-table-value { text-align: left; width: auto; }
  .meta-table-note, .meta-table-pct { display: none; }
}

/* Relatórios > Shopee: upload e barra de filtros */
.shopee-upload-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.shopee-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 10px; }
.shopee-toolbar #shopeeSearch { max-width: 260px; }
.shopee-toolbar .pricing-save-btn { margin-left: auto; }

/* Relatórios > Shopee: linha "não encontrado no sistema" e caixa de aplicar */
.pricing-table tr.is-empty td { background: rgba(234, 179, 8, 0.12); }
.pricing-table tr.is-empty:hover td { background: rgba(234, 179, 8, 0.2); }
.shopee-apply-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.shopee-apply-btn { background: #16a34a; }
.shopee-apply-btn:hover { background: #15803d; }

/* Pedidos Enviados: tag de conciliação Shopee (reembolsado / pedido concluído) */
.order-item-badge-refund { background: rgba(239, 68, 68, 0.16); color: #f87171; margin-top: 4px; }
.order-item-badge-done { background: rgba(34, 197, 94, 0.16); color: #4ade80; margin-top: 4px; }

/* Pedidos Enviados: lucro bruto com diferença ≥10% (recebido x esperado) em vermelho */
.order-fin-neg { color: #ef4444; font-weight: 700; }
.order-fin-pos { color: #22c55e; font-weight: 700; }

/* Pedidos Enviados: filtro de status ao lado da busca */
.products-search-bar { flex-wrap: wrap; }
#shippedStatusFilter { flex-shrink: 0; }

/* Relatórios > Por marketplace: linha de total */
.report-total-row { font-weight: 800; border-top: 2px solid var(--border); }
.report-total-row td { background: var(--bg-alt); }

/* Pedidos Enviados: sub-filtro da divergência (só aparece com "Apenas concluídos com divergência") */
.shipped-subfilter { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shipped-subfilter[hidden] { display: none; }
.shipped-subfilter-label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.shipped-subfilter [data-div-filter="positivas"].active { color: #22c55e; }
.shipped-subfilter [data-div-filter="negativas"].active { color: #ef4444; }

/* ---------- Relatórios · Rentabilidade real (curva ABC) ---------- */
.rr-classe { display: inline-block; min-width: 26px; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; text-align: center; }
.rr-a { background: rgba(46, 204, 113, 0.2); color: #2fb56a; }
.rr-b { background: rgba(255, 214, 0, 0.18); color: #c99a00; }
.rr-c { background: rgba(148, 163, 184, 0.22); color: var(--text-muted); }
.rr-p { background: rgba(224, 80, 95, 0.18); color: #e0505f; }
.rr-abc-summary { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.rr-abc-card { flex: 1 1 150px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--border); }
.rr-abc-card strong { font-size: 1.1rem; }
.rr-abc-card small { color: var(--text-muted); }
.rr-table td { white-space: nowrap; }
.rr-table td:nth-child(3) { white-space: normal; min-width: 200px; }
/* Rentabilidade real → vincular SKU (autocompletar) */
.rr-link-btn { white-space: nowrap; }
.rr-link-panel { max-width: 760px; }
.rr-ac-wrap { position: relative; }
.rr-ac-input { border: 1px solid var(--border) !important; background: var(--bg) !important; }
.rr-ac-input.is-picked { border-color: #2fb56a !important; }
.rr-ac-list {
  position: fixed; z-index: 1000; max-height: 260px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}
.rr-ac-list[hidden] { display: none; }
.rr-ac-opt { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: transparent; color: var(--text); font-family: var(--font-body); font-size: 0.86rem; cursor: pointer; }
.rr-ac-opt.is-active, .rr-ac-opt:hover { background: var(--bg-alt); }
.rr-ac-empty { padding: 10px 12px; font-size: 0.85rem; color: var(--text-muted); }
.rr-link-orders { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.rr-link-order { display: grid; grid-template-columns: 200px 1fr 28px; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--bg-alt); }
.rr-link-order-info { display: flex; flex-direction: column; font-size: 0.85rem; }
.rr-link-order-info small { color: var(--text-muted); }
.rr-link-ok { font-size: 1rem; text-align: center; }
@media (max-width: 640px) { .rr-link-order { grid-template-columns: 1fr 28px; } .rr-link-order-info { grid-column: 1 / -1; } }
/* Cartões da curva ABC viram filtro */
button.rr-abc-card { cursor: pointer; font: inherit; color: inherit; text-align: left; transition: border-color 0.15s, box-shadow 0.15s; }
button.rr-abc-card:hover { border-color: var(--text-muted); }
.rr-abc-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.rr-abc-a.is-active { border-color: #2fb56a; box-shadow: 0 0 0 2px #2fb56a inset; }
.rr-abc-b.is-active { border-color: #c99a00; box-shadow: 0 0 0 2px #c99a00 inset; }
.rr-abc-c.is-active { border-color: #94a3b8; box-shadow: 0 0 0 2px #94a3b8 inset; }
.rr-abc-p.is-active { border-color: #e0505f; box-shadow: 0 0 0 2px #e0505f inset; }
.rr-todos { background: rgba(26, 115, 232, 0.16); color: var(--accent); }
.rr-th-dica { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }

/* ---------- Relatórios · Tendências ---------- */
.td-up { color: #2fb56a; font-weight: 700; white-space: nowrap; }
.td-down { color: #e0505f; font-weight: 700; white-space: nowrap; }
.td-flat { color: var(--text-muted); font-weight: 600; }
.td-muted { color: var(--text-muted); }
.td-table td { white-space: nowrap; vertical-align: middle; }
.td-table td:nth-child(2) { white-space: normal; min-width: 200px; }
.td-spark-cell { padding-top: 6px !important; padding-bottom: 6px !important; }
.td-spark { display: block; overflow: visible; cursor: crosshair; }
.td-spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.td-spark-area { fill: var(--accent); opacity: 0.12; }
.td-spark-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.td-spark-cross { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 2 2; }
.td-tip {
  position: fixed; z-index: 1000; pointer-events: none; padding: 7px 10px; border-radius: 8px; font-size: 0.8rem; line-height: 1.35;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 8px 22px rgba(0,0,0,0.25);
}
.td-tip[hidden] { display: none; }
.td-datas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.td-data-card { padding: 14px 16px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.td-data-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.td-data-dias { font-size: 0.78rem; font-weight: 700; color: var(--accent); cursor: help; }
.td-data-card ol { margin: 2px 0 0 18px; font-size: 0.85rem; }

/* Pedidos Enviados: número do pedido clicável (abre visualização só-leitura) */
.order-view-link { background: none; border: none; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.order-view-link:hover { color: var(--accent-2, var(--accent)); }
.order-view-value { margin: 0; padding: 8px 0; font-weight: 600; }

/* Estoque de filamentos: botão "Informar retirada" empilhado acima do "Remover" */
.stk-edit-cell-stack { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.stk-edit-cell-stack button { white-space: nowrap; }

/* ---------- Pedidos: botão "Atenção" (card laranja + ! pra alertar o time) ---------- */
.order-card-bottom-right { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.order-card-bottom-right .order-card-btn-small { white-space: nowrap; }
.order-card-btn-atencao.is-active { background: #ff8a1f; border-style: solid; border-color: #c25e00; color: #fff; }
.order-card-warn-atencao { font-size: 1.5rem; }
.order-card.order-atencao[data-order-id] {
  background: #ffb25e;
  border-color: #e66a00;
  box-shadow: 0 0 0 2px rgba(230, 106, 0, 0.35);
  color: #4a2200;
}
.order-card.order-atencao[data-order-id] .order-card-canal { background: rgba(0, 0, 0, 0.1); color: #7a3300; }
.order-card.order-atencao[data-order-id] .order-card-plataforma,
.order-card.order-atencao[data-order-id] .order-card-fin,
.order-card.order-atencao[data-order-id] .order-card-obs,
.order-card.order-atencao[data-order-id] .order-card-separado-por { color: #6b3000; }
.order-card.order-atencao[data-order-id] .order-card-fin { border-top-color: #e66a00; border-bottom-color: #e66a00; }
.order-card.order-atencao[data-order-id] .order-card-fin strong { color: #3a1a00; }
.order-card.order-atencao[data-order-id] .order-item-comment { background: rgba(255, 255, 255, 0.5); color: #3a1a00; }
body.is-guest [data-toggle-atencao] { display: none !important; }


/* Banner "META DIÁRIA BATIDA!!!" (dispensável, todas as páginas do admin) */
.meta-batida-banner { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 20px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #16a34a, #22c55e 55%, #facc15); box-shadow: 0 10px 30px rgba(34, 197, 94, 0.45); animation: metaBatidaIn 0.5s ease-out; max-width: calc(100vw - 24px); }
.meta-batida-text { display: flex; flex-direction: column; line-height: 1.2; text-align: center; }
.meta-batida-text strong { font-size: 1.15rem; letter-spacing: 0.03em; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.meta-batida-text small { font-size: 0.78rem; opacity: 0.95; }
.meta-batida-emoji { font-size: 1.6rem; }
.meta-batida-close { background: rgba(0, 0, 0, 0.2); color: #fff; border: none; width: 26px; height: 26px; border-radius: 50%; font-size: 1.1rem; line-height: 1; cursor: pointer; margin-left: 4px; }
.meta-batida-close:hover { background: rgba(0, 0, 0, 0.35); }
@keyframes metaBatidaIn { from { opacity: 0; transform: translate(-50%, -20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 600px) { .meta-batida-emoji { display: none; } .meta-batida-text strong { font-size: 1rem; } }
@media (prefers-reduced-motion: reduce) { .meta-batida-banner { animation: none; } }

/* Bloco da meta diária (tela inicial, primeiro cartão de "Atenção do dia") */
.meta-home-card .report-chart-wrap-bar { height: 230px; max-width: none; position: relative; margin-top: 4px; }
.meta-home-resumo { margin-top: 10px; font-size: 0.9rem; display: grid; gap: 6px; }
.meta-home-resumo div { display: flex; justify-content: space-between; gap: 12px; }
.meta-home-resumo .is-ok { color: #22c55e; font-weight: 700; }

/* ---------- Pedidos Cancelados ---------- */
.cancel-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.cancel-antes { background: rgba(224, 80, 95, 0.16); color: #e0505f; }
.cancel-depois { background: rgba(245, 158, 11, 0.18); color: #d97706; }
.order-item-badge-cancel { background: rgba(224, 80, 95, 0.16); color: #e0505f; }

/* ---------- Gerador: editar .scad ---------- */
.gen-scad-btn { margin-left: 12px; vertical-align: middle; font-size: 0.8rem; }
.gen-scad-panel { max-width: 900px; width: 100%; }
.gen-scad-text {
  width: 100%; min-height: 420px; resize: vertical; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem; line-height: 1.45; tab-size: 4;
}
.gen-scad-text:focus { outline: none; border-color: var(--accent); }
.gen-scad-vars { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 4px; font-size: 0.8rem; color: var(--text-muted); }
.gen-scad-vars strong { color: var(--text); }
.gen-scad-miss strong { color: #e0505f; }
.gen-scad-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.gen-scad-btn[hidden] { display: none; }
/* Gerador: slider da curvatura */
.gen-slider { width: 100%; accent-color: var(--accent); cursor: pointer; margin: 6px 0 2px; }
.gen-slider-scale { position: relative; height: 18px; font-size: 0.72rem; color: var(--text-muted); }
.gen-slider-scale > * { position: absolute; top: 0; white-space: nowrap; }
.gen-slider-sugerido { transform: translateX(-50%); padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; }
.gen-slider-sugerido:hover { text-decoration: underline; }
.gen-btn.is-3mf { background: #2fb56a; border-color: #2fb56a; }

/* Integrações (API Mercado Livre / Shopee) */
.int-acoes { flex-wrap: wrap; gap: 8px; align-items: center; }
.int-dias { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.int-dias select { width: auto; }
.int-small { font-size: 0.85rem; }
.int-itens { min-width: 220px; font-size: 0.82rem; }
.int-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.int-tag-falta { background: #fde2e2; color: #b42318; }
.int-row-diverge td { background: rgba(245, 158, 11, 0.12); }
.int-diff { color: #b45309; }

/* Relatório Unificado */
.uni-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 16px; }
.uni-periodo, .uni-dir { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.uni-periodo input[type="date"] { width: auto; }
.uni-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.uni-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.uni-card-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.uni-card strong { font-size: 1.45rem; font-weight: 700; }
.uni-card small { font-size: 0.78rem; color: var(--text-muted); }
.uni-pos { color: #16a34a; }
.uni-neg { color: #dc2626; }
.uni-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin-bottom: 16px; }
.uni-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; min-width: 0; }
.uni-grid .uni-box { margin-bottom: 0; }
.uni-box-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.uni-box-head h2 { font-size: 1.05rem; margin: 0; }
.uni-legenda { font-size: 0.8rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.uni-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.uni-dot-real { background: #3b82f6; }
.uni-dot-prev { background: #d4a017; }
.uni-chart { position: relative; height: 300px; }
.uni-din { margin-bottom: 14px; }
.uni-din-top { display: flex; justify-content: space-between; gap: 8px; font-size: 0.88rem; margin-bottom: 6px; }
.uni-din-top span:last-child { color: var(--text-muted); white-space: nowrap; }
.uni-din-bar { height: 8px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; }
.uni-din-bar i { display: block; height: 100%; background: #3b82f6; border-radius: 999px; }
.uni-din-bar i.uni-bar-lucro { background: #16a34a; }
.uni-din-bar i.uni-bar-neg { background: #dc2626; }
@media (max-width: 900px) {
  .uni-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uni-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .uni-cards { grid-template-columns: minmax(0, 1fr); }
}

/* Etiquetas (teste): ícone de impressão no card e janela do lote */
.order-card-print { border: 0; background: transparent; cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 4px; border-radius: 6px; filter: grayscale(1); opacity: 0.45; }
.order-card-print:hover { opacity: 0.7; }
.order-card-print.is-on { filter: none; opacity: 1; background: rgba(22, 163, 74, 0.18); }
.etiquetas-panel { max-width: 640px; }
.etq-ok { margin: 4px 0 10px; }
.etq-erro { color: #dc2626; font-weight: 600; }
.etq-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.etq-acoes a { text-decoration: none; }
.etq-confirmar { border-top: 1px solid var(--border, rgba(0, 0, 0, 0.1)); padding-top: 12px; margin-top: 14px; }
.etq-lista ul, .etq-falhas ul { margin: 6px 0 0 18px; font-size: 0.85rem; }
.etq-falhas summary { color: #b45309; cursor: pointer; }
.etq-lista summary { cursor: pointer; }
.order-card-head-dir { display: inline-flex; align-items: center; gap: 4px; }

/* Tela Imprimir etiquetas */
.etq-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.etq-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-muted); }
.etq-resumo { font-size: 0.85rem; color: var(--text-muted); margin: 4px 0 10px; }
.etq-tabela td { vertical-align: middle; }
.etq-tabela small { color: var(--text-muted); }
.etq-sub { font-size: 0.75rem; }
.etq-linha-impressa { opacity: 0.6; }
.etq-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: rgba(0, 0, 0, 0.06); }
.etq-tag-ok { background: rgba(22, 163, 74, 0.15); color: #15803d; }
.etq-tag-organizar { background: rgba(238, 77, 45, 0.15); color: #c2410c; }
.etq-tag-espera { background: rgba(37, 99, 235, 0.13); color: #1d4ed8; }
.etq-tag-falha { background: rgba(180, 83, 9, 0.12); color: #b45309; font-weight: 500; max-width: 260px; white-space: normal; }
.etq-nf { font-size: 0.82rem; white-space: nowrap; }
.etq-dica { font-size: 0.85rem; color: var(--text-muted); }
.etq-ajuda { margin-top: 18px; font-size: 0.9rem; }
.etq-ajuda summary { cursor: pointer; font-weight: 600; }
.etq-ajuda ol { margin: 8px 0 0 20px; display: grid; gap: 6px; }

/* Avaliações Shopee */
.av-status { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.av-switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.av-switch input { width: 18px; height: 18px; }
.av-status-linha { font-size: 0.85rem; color: var(--text-muted); }
.av-lista { display: grid; gap: 12px; }
.av-lista-compacta .av-card { padding: 10px 14px; }
.av-card { border: 1px solid var(--border, rgba(0, 0, 0, 0.1)); border-radius: 12px; padding: 14px 16px; background: var(--surface, #fff); }
.av-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.av-estrelas { letter-spacing: 1px; font-size: 1.05rem; color: #f59e0b; }
.av-estrelas.av-n1, .av-estrelas.av-n2 { color: #dc2626; }
.av-meta { font-size: 0.78rem; color: var(--text-muted); margin: 2px 0 6px; }
.av-texto { margin: 4px 0 8px; white-space: pre-wrap; }
.av-fotos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.av-fotos img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.av-resposta { font-size: 0.88rem; background: rgba(22, 163, 74, 0.08); border-radius: 8px; padding: 6px 10px; }
.av-erro { color: #b45309; font-size: 0.85rem; }
.av-responder textarea, .av-frase textarea { width: 100%; font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border, rgba(0, 0, 0, 0.15)); background: var(--bg, #fff); color: inherit; resize: vertical; }
.av-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.av-outras { margin-top: 14px; }
.av-outras summary, .av-sub { cursor: pointer; font-weight: 700; }
.av-sub { margin: 14px 0 4px; font-size: 1rem; }
.av-ajuda { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.av-frases { display: grid; gap: 8px; }
.av-frase { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; }
.av-frase small { color: var(--text-muted); min-width: 28px; text-align: right; }
.av-config { margin-bottom: 6px; }

/* Menu: número de alertas não lidos */
.nav-badge { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 6px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 0.72rem; font-weight: 700; text-align: center; line-height: 1.5; }

/* Alertas */
.al-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.al-toolbar .calc-tabs { margin: 0; }
.al-lista { display: grid; gap: 10px; }
.al-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; border: 1px solid var(--border, rgba(0, 0, 0, 0.1)); border-left: 4px solid #dc2626; border-radius: 12px; padding: 12px 14px; background: var(--surface, #fff); }
.al-item.is-lido, .al-item.is-resumo.is-lido { border-left-color: var(--border, rgba(0, 0, 0, 0.15)); opacity: 0.65; }
.al-icone { font-size: 1.3rem; line-height: 1; }
.al-item h3 { font-size: 0.98rem; margin: 0 0 2px; }
.al-item p { margin: 2px 0; font-size: 0.88rem; }
.al-meta { font-size: 0.76rem; color: var(--text-muted); }
.al-item.is-resumo { border-left-color: #3b82f6; }

/* Impressão automática de etiquetas (admin/etiquetas.html) */
.etq-auto { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-alt); }
.etq-auto.is-ligado { border-color: #16a34a; }
.etq-auto-txt { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 0.88rem; }
.etq-auto-txt input[type="number"] { width: 56px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); }
.etq-auto-status { flex-basis: 100%; font-size: 0.8rem; color: var(--text-muted); }
.etq-auto-status ul { margin: 4px 0 0; padding-left: 18px; }
#autoImpressaoArea { display: none; }
@media print {
  @page { size: 100mm 150mm; margin: 0; }
  body.auto-imprimindo > *:not(#autoImpressaoArea) { display: none !important; }
  body.auto-imprimindo { background: #fff !important; margin: 0 !important; }
  body.auto-imprimindo #autoImpressaoArea { display: block !important; }
  .auto-folha { width: 100mm; height: 150mm; page-break-after: always; break-after: page; overflow: hidden; }
  .auto-folha:last-child { page-break-after: auto; break-after: auto; }
  .auto-folha img { width: 100mm; height: 150mm; display: block; }
}
