
/*
 * Loja de testes — Painel Administrativo V2
 * Camada visual isolada da versão oficial 2.
 */

body.admin-theme-v2 {
  --admin-bg: #f5f5f1;
  --admin-surface: #ffffff;
  --admin-surface-soft: #faf9f6;
  --admin-ink: #1d211d;
  --admin-muted: #676d67;
  --admin-line: #e3e3dc;
  --admin-line-strong: #d2d4cc;
  --admin-green: #35663a;
  --admin-green-dark: #234f2a;
  --admin-green-soft: #edf4ed;
  --admin-red: #bd4035;
  --admin-red-dark: #982f27;
  --admin-red-soft: #fff0ed;
  --admin-amber: #9a6500;
  --admin-amber-soft: #fff7e6;
  --admin-blue: #315f9a;
  --admin-blue-soft: #f0f5fb;
  --admin-radius-sm: 11px;
  --admin-radius: 16px;
  --admin-radius-lg: 20px;
  --admin-shadow-sm: 0 4px 14px rgba(32, 39, 32, 0.05);
  --admin-shadow-md: 0 14px 34px rgba(32, 39, 32, 0.08);
  min-width: 320px;
  color: var(--admin-ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(189, 64, 53, 0.055), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(53, 102, 58, 0.065), transparent 30%),
    var(--admin-bg);
}

.admin-theme-v2 * {
  scrollbar-color: #c5c8c1 transparent;
  scrollbar-width: thin;
}

.admin-theme-v2 button,
.admin-theme-v2 .btn,
.admin-theme-v2 a,
.admin-theme-v2 input,
.admin-theme-v2 select,
.admin-theme-v2 textarea {
  -webkit-tap-highlight-color: transparent;
}

.admin-theme-v2 button,
.admin-theme-v2 .btn,
.admin-theme-v2 a {
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

.admin-theme-v2 button:focus-visible,
.admin-theme-v2 .btn:focus-visible,
.admin-theme-v2 a:focus-visible,
.admin-theme-v2 input:focus-visible,
.admin-theme-v2 select:focus-visible,
.admin-theme-v2 textarea:focus-visible,
.admin-theme-v2 summary:focus-visible {
  outline: 3px solid rgba(53, 102, 58, 0.2);
  outline-offset: 3px;
}

.admin-theme-v2 .wrap {
  width: min(1320px, calc(100% - 40px));
  padding: 20px 0 48px;
}

/* Acesso */

.admin-theme-v2 .login {
  width: min(430px, 100%);
  margin: 10vh auto;
  padding: 28px;
  text-align: left;
}

.admin-theme-v2 .login h1 {
  margin: 0 0 8px;
  color: var(--admin-ink);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.admin-theme-v2 .login p {
  margin: 0 0 22px;
  color: var(--admin-muted);
  line-height: 1.5;
}

.admin-theme-v2 .login label {
  color: var(--admin-ink);
  font-size: 13px;
  font-weight: 800;
}

.admin-theme-v2 .login input {
  margin-top: 7px;
  border-color: var(--admin-line-strong);
}

.admin-theme-v2 .login .btn-primary {
  width: 100%;
}

/* Cabeçalho e navegação */

.admin-theme-v2 .demo-banner {
  margin-bottom: 12px;
  padding: 11px 15px;
  border: 1px solid #e5bd62;
  border-radius: 13px;
  color: #694707;
  background: #fff3cc;
  box-shadow: none;
}

.admin-theme-v2 .demo-banner strong {
  font-size: 13px;
}

.admin-theme-v2 .demo-banner span {
  font-size: 11px;
}

.admin-theme-v2 .top {
  min-height: 58px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--admin-shadow-sm);
}

.admin-theme-v2 .top.is-actions-only {
  justify-content: flex-end;
}

.admin-theme-v2 .top-actions {
  gap: 7px;
}

.admin-theme-v2 .top-actions form {
  margin: 0;
}

.admin-theme-v2 button,
.admin-theme-v2 .btn {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--admin-radius-sm);
  overflow-wrap: normal;
  word-break: normal;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.admin-theme-v2 .btn-primary {
  color: #fff;
  background: var(--admin-green);
  box-shadow: none;
}

.admin-theme-v2 .btn-primary:hover {
  background: var(--admin-green-dark);
  transform: translateY(-1px);
}

.admin-theme-v2 .btn-light {
  border: 1px solid var(--admin-line);
  color: var(--admin-ink);
  background: var(--admin-surface);
}

.admin-theme-v2 .btn-light:hover {
  border-color: var(--admin-line-strong);
  color: var(--admin-green-dark);
  background: var(--admin-green-soft);
}

.admin-theme-v2 .btn-amber {
  color: #fff;
  background: #8a5c05;
}

.admin-theme-v2 .btn-blue {
  color: #fff;
  background: var(--admin-blue);
}

.admin-theme-v2 .btn-red {
  color: #fff;
  background: var(--admin-red);
}

.admin-theme-v2 .tabs {
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  width: 100%;
  max-width: none;
  gap: 4px;
  margin-bottom: 14px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--admin-shadow-sm);
  backdrop-filter: blur(12px);
}

.admin-theme-v2 .tabs a {
  min-height: 44px;
  padding: 9px 13px;
  border-radius: 11px;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.admin-theme-v2 .tabs a:hover {
  color: var(--admin-green-dark);
  background: var(--admin-green-soft);
}

.admin-theme-v2 .tabs a.active {
  color: #fff;
  background: var(--admin-green);
  box-shadow: 0 5px 12px rgba(53, 102, 58, 0.18);
}

/* Superfícies e mensagens */

.admin-theme-v2 .card {
  padding: 18px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow-sm);
}

.admin-theme-v2 .flash {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.admin-theme-v2 .flash.ok {
  padding: 0;
  border: 0;
  color: var(--admin-green-dark);
  background: transparent;
}

.admin-theme-v2 .flash.ok a {
  color: var(--admin-green-dark);
  font-weight: 900;
}

.admin-theme-v2 .flash.error {
  border-color: #efc1ba;
  color: #782b24;
  background: var(--admin-red-soft);
}

.admin-theme-v2 .store-alert,
.admin-theme-v2 .store-alert.ok {
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

/* Indicadores */

.admin-theme-v2 .kpis {
  gap: 10px;
  margin-bottom: 14px;
}

.admin-theme-v2 .kpi {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border-radius: 14px;
  box-shadow: none;
}

.admin-theme-v2 .kpi strong {
  color: var(--admin-green-dark);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.admin-theme-v2 .kpi span {
  max-width: 150px;
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.admin-theme-v2 .kpi-link:hover {
  border-color: #c9cec6;
  box-shadow: var(--admin-shadow-md);
  transform: translateY(-2px);
}

/* Filtros */

.admin-theme-v2 .filter-card {
  margin-bottom: 14px;
}

.admin-theme-v2 .filter-card h2 {
  color: var(--admin-ink);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.admin-theme-v2 .quick-filters {
  gap: 6px;
  margin-bottom: 13px;
}

.admin-theme-v2 .quick-filters a,
.admin-theme-v2 .quick-filters .period-filter,
.admin-theme-v2 .product-category-tabs a {
  min-width: 0;
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 11px;
  color: var(--admin-muted);
  background: var(--admin-surface);
  transform: none;
}

.admin-theme-v2 .quick-filters .period-filter:hover,
.admin-theme-v2 .product-category-tabs a:hover {
  border-color: #c2c7c0;
  color: var(--admin-green-dark);
  background: var(--admin-green-soft);
  transform: translateY(-1px);
}

.admin-theme-v2 .quick-filters .period-filter > span,
.admin-theme-v2 .product-category-tabs a > span {
  transform: none;
}

.admin-theme-v2 .quick-filters .period-filter.active,
.admin-theme-v2 .product-category-tabs a.active {
  border-color: var(--admin-green);
  color: #fff;
  background: var(--admin-green);
}

.admin-theme-v2 .quick-filters .attention {
  border-color: #ecc7bf;
  color: var(--admin-red-dark);
  background: var(--admin-red-soft);
}

.admin-theme-v2 .search-row {
  gap: 8px;
}

.admin-theme-v2 .advanced-filters {
  border-color: var(--admin-line);
}

.admin-theme-v2 .field {
  gap: 6px;
}

.admin-theme-v2 .field span {
  color: #4e554e;
  font-size: 11px;
  font-weight: 750;
}

.admin-theme-v2 .field input,
.admin-theme-v2 .field select,
.admin-theme-v2 .field textarea,
.admin-theme-v2 .entry-input,
.admin-theme-v2 .more-actions input[type="text"] {
  min-height: 44px;
  border: 1px solid var(--admin-line-strong);
  border-radius: var(--admin-radius-sm);
  color: var(--admin-ink);
  background: var(--admin-surface);
  box-shadow: none;
}

.admin-theme-v2 .field input:hover,
.admin-theme-v2 .field select:hover,
.admin-theme-v2 .field textarea:hover,
.admin-theme-v2 .entry-input:hover {
  border-color: #b9bdb7;
}

.admin-theme-v2 .field input:focus,
.admin-theme-v2 .field select:focus,
.admin-theme-v2 .field textarea:focus,
.admin-theme-v2 .entry-input:focus {
  border-color: var(--admin-green);
  box-shadow: 0 0 0 3px rgba(53, 102, 58, 0.1);
  outline: 0;
}

/* Operação e pedidos */

.admin-theme-v2 .orders {
  gap: 12px;
}

.admin-theme-v2 .order {
  gap: 11px;
  padding: 17px;
  overflow: hidden;
  box-shadow: none;
}

.admin-theme-v2 .order:hover {
  border-color: #cfd2cb;
  box-shadow: var(--admin-shadow-md);
}

.admin-theme-v2 .order.is-warning {
  border-left: 5px solid #d29a27;
}

.admin-theme-v2 .order.is-critical {
  border-left: 5px solid var(--admin-red);
}

.admin-theme-v2 .attention-banner {
  border: 1px solid #ecd29d;
  border-radius: 10px;
  color: #6c490b;
  background: var(--admin-amber-soft);
}

.admin-theme-v2 .attention-banner.critical {
  border-color: #efc1ba;
  color: #782b24;
  background: var(--admin-red-soft);
}

.admin-theme-v2 .order-head {
  gap: 18px;
}

.admin-theme-v2 .order h2 {
  color: var(--admin-ink);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.admin-theme-v2 .order-head p {
  margin-top: 5px;
  font-size: 12px;
}

.admin-theme-v2 .order-status {
  font-size: 11px;
}

.admin-theme-v2 .badge {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
}

.admin-theme-v2 .grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
}

.admin-theme-v2 .items {
  color: var(--admin-ink);
  font-size: 13px;
  line-height: 1.6;
}

.admin-theme-v2 .item-flavors {
  color: var(--admin-muted);
}

.admin-theme-v2 .compact-meta,
.admin-theme-v2 .meta {
  gap: 7px;
}

.admin-theme-v2 .compact-meta div,
.admin-theme-v2 .meta div {
  padding: 10px;
  border-color: var(--admin-line);
  border-radius: 11px;
  background: var(--admin-surface-soft);
}

.admin-theme-v2 .compact-meta span,
.admin-theme-v2 .meta span {
  color: var(--admin-muted);
  font-size: 10px;
}

.admin-theme-v2 .compact-meta strong,
.admin-theme-v2 .meta strong {
  color: var(--admin-ink);
  font-size: 12px;
}

.admin-theme-v2 .order-details {
  border-color: var(--admin-line);
}

.admin-theme-v2 .order-details summary,
.admin-theme-v2 .more-actions summary {
  color: #545b54;
  font-size: 12px;
  font-weight: 850;
}

.admin-theme-v2 .order-details-body {
  padding-top: 10px;
}

.admin-theme-v2 .stock-impact {
  border-color: #cfdaea;
  color: var(--admin-ink);
  background: var(--admin-blue-soft);
}

.admin-theme-v2 .stock-impact-item {
  border-color: #dbe3ee;
  border-radius: 10px;
  background: var(--admin-surface);
}

.admin-theme-v2 .actions,
.admin-theme-v2 .links {
  gap: 8px;
}

.admin-theme-v2 .actions button,
.admin-theme-v2 .actions .btn,
.admin-theme-v2 .links a {
  min-height: 44px;
}

.admin-theme-v2 .more-actions {
  border-color: var(--admin-line);
}

.admin-theme-v2 .empty {
  padding: 34px 20px;
  border: 1px dashed var(--admin-line-strong);
  border-radius: 13px;
  color: var(--admin-muted);
  background: var(--admin-surface-soft);
  box-shadow: none;
}

/* Resumo */

.admin-theme-v2 .production-summary {
  margin-bottom: 14px;
}

.admin-theme-v2 .production-kpis {
  gap: 8px;
}

.admin-theme-v2 .production-kpi {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px;
  border-color: var(--admin-line);
  border-radius: 12px;
  background: var(--admin-surface-soft);
}

.admin-theme-v2 .production-kpi strong {
  color: var(--admin-green-dark);
  font-size: 20px;
}

.admin-theme-v2 .production-kpi span {
  font-size: 10px;
  line-height: 1.35;
}

.admin-theme-v2 .production-table,
.admin-theme-v2 .inventory-table {
  border-color: var(--admin-line);
  border-radius: 13px;
  background: var(--admin-surface);
}

.admin-theme-v2 table th {
  padding: 11px 10px;
  color: #565d56;
  background: var(--admin-surface-soft);
}

.admin-theme-v2 table td {
  border-color: var(--admin-line);
}

.admin-theme-v2 .channel-pill {
  border-color: #d5dce7;
  color: #36567f;
  background: var(--admin-blue-soft);
}

/* Estoque */

.admin-theme-v2 .week-toolbar {
  gap: 12px;
  margin-bottom: 14px;
}

.admin-theme-v2 .week-title h2 {
  color: var(--admin-ink);
  font-size: 20px;
  font-weight: 900;
}

.admin-theme-v2 .week-title p {
  font-size: 11px;
}

.admin-theme-v2 .stock-movement-card,
.admin-theme-v2 .mode-card {
  box-shadow: none;
}

.admin-theme-v2 .movement-controls {
  gap: 10px;
  padding: 12px 0 14px;
}

.admin-theme-v2 .stock-selection-bar {
  padding: 2px 0 10px;
}

.admin-theme-v2 .stock-select-all input,
.admin-theme-v2 .product-select-line input,
.admin-theme-v2 .switch-card input,
.admin-theme-v2 .schedule-day input {
  accent-color: var(--admin-green);
}

.admin-theme-v2 .movement-table tr.is-selected {
  background: var(--admin-green-soft);
}

.admin-theme-v2 .movement-table tr.is-selected .entry-input {
  border-color: var(--admin-green);
}

.admin-theme-v2 .stock-row-details summary {
  color: var(--admin-muted);
}

.admin-theme-v2 .history {
  box-shadow: none;
}

.admin-theme-v2 .movement {
  border-color: var(--admin-line);
  background: var(--admin-surface-soft);
}

/* Produtos */

.admin-theme-v2 .product-manager {
  gap: 14px;
}

.admin-theme-v2 .product-category-tabs {
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: var(--admin-surface);
}

.admin-theme-v2 .product-category-tabs a {
  flex: 0 1 150px;
}

.admin-theme-v2 .product-editor-grid {
  gap: 12px;
}

.admin-theme-v2 .product-editor-card {
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-color: var(--admin-line);
  border-radius: 15px;
  background: var(--admin-surface);
  box-shadow: none;
}

.admin-theme-v2 .product-editor-card:hover {
  border-color: #c8ccc5;
  box-shadow: var(--admin-shadow-md);
}

.admin-theme-v2 .product-editor-preview {
  width: 138px;
  aspect-ratio: 4 / 3;
  border-color: var(--admin-line);
  border-radius: 12px;
  background: #ecebe6;
}

.admin-theme-v2 .product-editor-fields h3 {
  color: var(--admin-green-dark);
  font-size: 16px;
  font-weight: 900;
}

.admin-theme-v2 .product-editor-fields input[type="number"],
.admin-theme-v2 .product-editor-fields input[type="file"],
.admin-theme-v2 .product-editor-fields textarea {
  border-color: var(--admin-line-strong);
  border-radius: 10px;
}

.admin-theme-v2 .product-editor-fields textarea {
  min-height: 84px;
}

.admin-theme-v2 .product-editor-fields small {
  color: var(--admin-muted);
  font-size: 10px;
}

/* Configurações */

.admin-theme-v2 .settings-stack {
  gap: 14px;
}

.admin-theme-v2 .settings-stack .card {
  box-shadow: none;
}

.admin-theme-v2 .settings-stack h2 {
  margin-top: 0;
  color: var(--admin-ink);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.015em;
}

.admin-theme-v2 .switch-card,
.admin-theme-v2 .schedule-row {
  border-color: var(--admin-line);
  border-radius: 12px;
  background: var(--admin-surface-soft);
}

.admin-theme-v2 .advanced-settings {
  border-color: var(--admin-line);
}

.admin-theme-v2 .settings-notice {
  border-color: #d5dce7;
  color: #36567f;
  background: var(--admin-blue-soft);
}

.admin-theme-v2 .override-row {
  border-color: var(--admin-line);
}

/* Responsividade */

@media (max-width: 1100px) {
  .admin-theme-v2 .wrap {
    width: min(100% - 28px, 1040px);
  }

  .admin-theme-v2 .order-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-theme-v2 .product-editor-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .admin-theme-v2 .product-editor-preview {
    width: 120px;
  }
}

@media (max-width: 800px) {
  .admin-theme-v2 .wrap {
    width: min(100% - 20px, 720px);
    padding-top: 12px;
  }

  .admin-theme-v2 .top {
    display: block;
  }

  .admin-theme-v2 .top-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-top: 0;
  }

  .admin-theme-v2 .top-actions > *,
  .admin-theme-v2 .top-actions form,
  .admin-theme-v2 .top-actions button,
  .admin-theme-v2 .top-actions .btn {
    width: 100%;
  }

  .admin-theme-v2 .tabs {
    display: flex;
    gap: 4px;
    border-radius: 14px;
  }

  .admin-theme-v2 .tabs a {
    flex: 0 0 auto;
    min-width: 108px;
  }

  .admin-theme-v2 .grid,
  .admin-theme-v2 .meta {
    grid-template-columns: 1fr;
  }

  .admin-theme-v2 .order-head {
    display: block;
  }

  .admin-theme-v2 .badges {
    margin-top: 9px;
    justify-content: flex-start;
  }

  .admin-theme-v2 .inventory-table tr {
    border-color: var(--admin-line);
    background: var(--admin-surface);
  }

  .admin-theme-v2 .inventory-table td {
    border-color: var(--admin-line);
  }

  .admin-theme-v2 .product-editor-card {
    grid-template-columns: 138px minmax(0, 1fr);
  }

  .admin-theme-v2 .product-editor-preview {
    width: 138px;
  }
}

@media (max-width: 560px) {
  .admin-theme-v2 .wrap {
    width: calc(100% - 16px);
  }

  .admin-theme-v2 .card {
    padding: 14px;
    border-radius: 14px;
  }

  .admin-theme-v2 .top {
    padding: 7px;
  }

  .admin-theme-v2 .top-actions {
    grid-template-columns: 1fr 1fr;
  }

  .admin-theme-v2 .top-actions button,
  .admin-theme-v2 .top-actions .btn {
    padding-inline: 8px;
    font-size: 11px;
  }

  .admin-theme-v2 .order-kpis,
  .admin-theme-v2 .stock-kpis,
  .admin-theme-v2 .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .admin-theme-v2 .kpi {
    min-height: 84px;
    padding: 11px 8px;
  }

  .admin-theme-v2 .kpi strong {
    font-size: 21px;
  }

  .admin-theme-v2 .quick-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-theme-v2 .quick-filters a,
  .admin-theme-v2 .quick-filters .period-filter {
    justify-content: center;
    width: 100%;
    padding-inline: 8px;
    text-align: center;
    font-size: 11px;
  }

  .admin-theme-v2 .search-row,
  .admin-theme-v2 .order-filters,
  .admin-theme-v2 .production-kpis {
    grid-template-columns: 1fr;
  }

  .admin-theme-v2 .order {
    padding: 14px;
  }

  .admin-theme-v2 .actions form,
  .admin-theme-v2 .actions button,
  .admin-theme-v2 .actions .btn,
  .admin-theme-v2 .links a {
    width: 100%;
  }

  .admin-theme-v2 .week-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .admin-theme-v2 .week-nav .btn {
    width: 100%;
    padding-inline: 8px;
    text-align: center;
  }

  .admin-theme-v2 .product-category-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-theme-v2 .product-category-tabs a {
    min-width: 0;
    padding-inline: 7px;
    font-size: 11px;
  }

  .admin-theme-v2 .product-editor-card {
    grid-template-columns: 1fr;
  }

  .admin-theme-v2 .product-editor-preview {
    width: 100%;
    max-width: 260px;
    justify-self: center;
  }

  .admin-theme-v2 .settings-grid,
  .admin-theme-v2 .schedule-row,
  .admin-theme-v2 .override-grid {
    grid-template-columns: 1fr;
  }

  .admin-theme-v2 .schedule-day,
  .admin-theme-v2 .override-grid .wide {
    grid-column: auto;
  }
}

@media (max-width: 380px) {
  .admin-theme-v2 .top-actions {
    grid-template-columns: 1fr;
  }

  .admin-theme-v2 .quick-filters {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-theme-v2 *,
  .admin-theme-v2 *::before,
  .admin-theme-v2 *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Cadastro de novos produtos */

.admin-theme-v2 .product-manager-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-theme-v2 .product-manager-toolbar .product-category-tabs {
  flex: 1 1 auto;
  margin: 0;
}

.admin-theme-v2 .product-create-toggle {
  flex: 0 0 auto;
  min-height: 46px;
  padding-inline: 18px;
  white-space: nowrap;
}

.admin-theme-v2 .product-create-panel[hidden],
.admin-theme-v2 [data-product-combo-fields][hidden],
.admin-theme-v2 [data-product-frozen-fields][hidden],
.admin-theme-v2 .product-create-preview img[hidden] {
  display: none !important;
}

.admin-theme-v2 .product-create-panel {
  padding: 20px;
  border: 1px solid #ccd9cd;
  border-radius: var(--admin-radius);
  background:
    linear-gradient(135deg, rgba(53, 102, 58, 0.055), transparent 44%),
    var(--admin-surface);
  box-shadow: var(--admin-shadow-sm);
}

.admin-theme-v2 .product-create-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-theme-v2 .product-create-heading h2 {
  margin: 3px 0 0;
  color: var(--admin-ink);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.admin-theme-v2 .product-create-eyebrow {
  color: var(--admin-green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-theme-v2 .product-create-close {
  min-height: 40px;
  padding: 8px 13px;
}

.admin-theme-v2 .product-create-form {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.admin-theme-v2 .product-create-preview {
  position: relative;
  width: 100%;
  max-width: 250px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px dashed var(--admin-line-strong);
  border-radius: 14px;
  background: var(--admin-surface-soft);
}

.admin-theme-v2 .product-create-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 18px;
  color: var(--admin-muted);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.admin-theme-v2 .product-create-placeholder svg {
  width: 38px;
  height: 38px;
  fill: var(--admin-green);
  opacity: 0.82;
}

.admin-theme-v2 .product-create-preview.has-image .product-create-placeholder {
  display: none;
}

.admin-theme-v2 .product-create-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-theme-v2 .product-create-fields {
  min-width: 0;
}

.admin-theme-v2 .product-create-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.admin-theme-v2 .product-create-field-grid .field {
  min-width: 0;
}

.admin-theme-v2 .product-create-field-grid input,
.admin-theme-v2 .product-create-field-grid select,
.admin-theme-v2 .product-create-field-grid textarea {
  width: 100%;
  min-height: 44px;
  border-color: var(--admin-line-strong);
  border-radius: 10px;
  background: var(--admin-surface);
}

.admin-theme-v2 .product-create-field-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-theme-v2 .product-create-description,
.admin-theme-v2 .product-create-image-field,
.admin-theme-v2 .product-create-stock-field {
  grid-column: 1 / -1;
}

.admin-theme-v2 .product-create-stock-field small {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: 11px;
}

.admin-theme-v2 .product-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.admin-theme-v2 .product-create-actions button {
  min-width: 140px;
  min-height: 44px;
}

@media (max-width: 800px) {
  .admin-theme-v2 .product-manager-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-theme-v2 .product-create-toggle {
    width: 100%;
  }

  .admin-theme-v2 .product-create-form {
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .admin-theme-v2 .product-create-panel {
    padding: 16px;
  }

  .admin-theme-v2 .product-create-heading h2 {
    font-size: 19px;
  }

  .admin-theme-v2 .product-create-form,
  .admin-theme-v2 .product-create-field-grid {
    grid-template-columns: 1fr;
  }

  .admin-theme-v2 .product-create-preview {
    max-width: 280px;
    margin-inline: auto;
  }

  .admin-theme-v2 .product-create-description,
  .admin-theme-v2 .product-create-image-field,
  .admin-theme-v2 .product-create-stock-field {
    grid-column: auto;
  }

  .admin-theme-v2 .product-create-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .admin-theme-v2 .product-create-actions button {
    min-width: 0;
  }
}

/* ===== Loja de testes Admin V3 — dashboard vinho 2026-08-23 ===== */
/*
 * Nova composição aprovada para a área administrativa.
 * Somente apresentação: não altera formulários, APIs, estados ou dados.
 */

body.admin-theme-v2 {
  --admin-bg: #f7f4f2;
  --admin-surface: #ffffff;
  --admin-surface-soft: #fcfaf9;
  --admin-ink: #241b1f;
  --admin-muted: #746a6e;
  --admin-line: #eadfe3;
  --admin-line-strong: #dacbd1;
  --admin-green: #791936;
  --admin-green-dark: #5d1028;
  --admin-green-soft: #faedf1;
  --admin-red: #e33d43;
  --admin-red-dark: #ba272f;
  --admin-red-soft: #fff0f1;
  --admin-amber: #a46808;
  --admin-amber-soft: #fff7e8;
  --admin-blue: #4d5f8f;
  --admin-blue-soft: #f1f3fa;
  --admin-radius-sm: 10px;
  --admin-radius: 15px;
  --admin-radius-lg: 20px;
  --admin-shadow-sm: 0 4px 18px rgba(67, 24, 40, .055);
  --admin-shadow-md: 0 14px 36px rgba(67, 24, 40, .10);
  min-height: 100vh;
  background: var(--admin-bg);
}

/* Estrutura desktop com menu lateral */
.admin-theme-v2 .wrap {
  width: auto;
  max-width: none;
  margin: 0 0 0 246px;
  padding: 24px 28px 52px;
}

.admin-theme-v2 .tabs {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: 246px;
  max-width: 246px;
  gap: 5px;
  margin: 0;
  padding: 110px 12px 24px;
  overflow: hidden auto;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 15% 12%, rgba(255,255,255,.10), transparent 24%),
    linear-gradient(180deg, #851735 0%, #71122e 54%, #5c0e27 100%);
  box-shadow: 8px 0 28px rgba(72, 13, 37, .12);
  backdrop-filter: none;
}

.admin-theme-v2 .tabs::before {
  position: absolute;
  top: 31px;
  left: 24px;
  right: 20px;
  content: "Loja de testes";
  white-space: pre;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-style: italic;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.admin-theme-v2 .tabs::after {
  position: absolute;
  top: 72px;
  left: 25px;
  content: "GESTÃO DA LOJA";
  color: rgba(255,255,255,.64);
  font-family: Inter, Arial, sans-serif;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .16em;
}

.admin-theme-v2 .tabs a {
  position: relative;
  flex: 0 0 auto;
  justify-content: flex-start;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px 11px 48px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: rgba(255,255,255,.78);
  font-size: 14px;
  font-weight: 750;
  text-align: left;
}

.admin-theme-v2 .tabs a::before {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 22px;
  color: currentColor;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  transform: translateY(-50%);
}

.admin-theme-v2 .tabs a:nth-child(1)::before { content: "▣"; }
.admin-theme-v2 .tabs a:nth-child(2)::before { content: "◇"; }
.admin-theme-v2 .tabs a:nth-child(3)::before { content: "◈"; }
.admin-theme-v2 .tabs a:nth-child(4)::before { content: "▥"; }
.admin-theme-v2 .tabs a:nth-child(5)::before { content: "♙"; }
.admin-theme-v2 .tabs a:nth-child(6)::before { content: "⚙"; }

.admin-theme-v2 .tabs a:hover {
  color: #fff;
  background: rgba(255,255,255,.10);
}

.admin-theme-v2 .tabs a.active {
  border-color: rgba(255,255,255,.08);
  color: #fff;
  background: rgba(255,255,255,.15);
  box-shadow: inset 3px 0 0 #ff7477, 0 8px 20px rgba(45, 4, 20, .13);
}

/* Cabeçalho */
.admin-theme-v2 .top,
.admin-theme-v2 .top.is-actions-only {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 0 0 18px;
  padding: 0 0 17px;
  border: 0;
  border-bottom: 1px solid var(--admin-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-theme-v2 .admin-title small {
  display: block;
  margin-bottom: 4px;
  color: #9a7c87;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.admin-theme-v2 .admin-title h1 {
  margin: 0;
  color: var(--admin-ink);
  font-size: clamp(27px, 2.3vw, 36px);
  font-weight: 900;
  letter-spacing: -.045em;
}

.admin-theme-v2 .top-actions {
  justify-content: flex-end;
  gap: 8px;
}

.admin-theme-v2 .top-actions > a:first-child::before {
  content: "↗";
  margin-right: 7px;
}

.admin-theme-v2 #enableAdminNotifications::before {
  content: "●";
  margin-right: 7px;
  color: #29a35a;
  font-size: 10px;
}

.admin-theme-v2 button,
.admin-theme-v2 .btn {
  border-radius: 9px;
}

.admin-theme-v2 .btn-primary {
  background: linear-gradient(135deg, #861a3a, #6c112d);
  box-shadow: 0 6px 14px rgba(121,25,54,.16);
}

.admin-theme-v2 .btn-primary:hover {
  background: #5d1028;
}

.admin-theme-v2 .btn-red {
  background: #df3a41;
}

.admin-theme-v2 .card {
  border-color: var(--admin-line);
  border-radius: 15px;
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow-sm);
}

/* Indicadores com hierarquia visual */
.admin-theme-v2 .order-kpis {
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  gap: 11px;
}

.admin-theme-v2 .order-kpis .kpi {
  position: relative;
  min-height: 112px;
  align-items: flex-start;
  padding: 17px 15px 15px 62px;
  text-align: left;
}

.admin-theme-v2 .order-kpis .kpi::before {
  position: absolute;
  top: 17px;
  left: 15px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #8a1838;
  background: #fbe8ed;
  font-size: 17px;
  font-weight: 900;
}

.admin-theme-v2 .order-kpis .kpi:nth-child(1)::before { content: "▦"; }
.admin-theme-v2 .order-kpis .kpi:nth-child(2)::before { content: "◷"; }
.admin-theme-v2 .order-kpis .kpi:nth-child(3)::before { content: "$"; }
.admin-theme-v2 .order-kpis .kpi:nth-child(4)::before { content: "✓"; }
.admin-theme-v2 .order-kpis .kpi:nth-child(5)::before { content: "♨"; }
.admin-theme-v2 .order-kpis .kpi:nth-child(6)::before { content: "✓"; }

.admin-theme-v2 .order-kpis .kpi strong {
  margin-top: 35px;
  color: var(--admin-ink);
  font-size: 28px;
}

.admin-theme-v2 .order-kpis .kpi span {
  max-width: none;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 750;
}

.admin-theme-v2 .order-kpis .kpi:last-child::before {
  color: #26814b;
  background: #eaf7ef;
}

.admin-theme-v2 .order-kpis .kpi-link:hover {
  border-color: #d5bcc5;
}

/* Busca e filtros */
.admin-theme-v2 .filter-card {
  padding: 16px;
}

.admin-theme-v2 .filter-card h2 {
  font-size: 18px;
}

.admin-theme-v2 .quick-filters a,
.admin-theme-v2 .quick-filters .period-filter,
.admin-theme-v2 .product-category-tabs a {
  border-color: var(--admin-line);
  border-radius: 999px;
  color: #675b60;
  background: #fff;
}

.admin-theme-v2 .quick-filters .period-filter.active,
.admin-theme-v2 .product-category-tabs a.active {
  border-color: #791936;
  color: #fff;
  background: #791936;
}

.admin-theme-v2 .field input,
.admin-theme-v2 .field select,
.admin-theme-v2 .field textarea,
.admin-theme-v2 .entry-input,
.admin-theme-v2 .more-actions input[type="text"] {
  border-color: var(--admin-line-strong);
  background: #fff;
}

.admin-theme-v2 .field input:focus,
.admin-theme-v2 .field select:focus,
.admin-theme-v2 .field textarea:focus,
.admin-theme-v2 .entry-input:focus {
  border-color: #8a1838;
  box-shadow: 0 0 0 3px rgba(121,25,54,.10);
}

/* Cartões de pedido */
.admin-theme-v2 .orders {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 13px;
}

.admin-theme-v2 .order {
  align-content: start;
  border-color: var(--admin-line);
  border-top: 3px solid #851735;
  border-left-width: 1px;
  border-radius: 15px;
  background: #fff;
}

.admin-theme-v2 .order.is-warning {
  border-top-color: #d39b2a;
  border-left-width: 1px;
}

.admin-theme-v2 .order.is-critical {
  border-top-color: #e33d43;
  border-left-width: 1px;
  background: linear-gradient(180deg, #fff7f7 0, #fff 92px);
}

.admin-theme-v2 .order-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-theme-v2 .order h2 {
  font-size: 18px;
}

.admin-theme-v2 .badge {
  padding: 6px 9px;
}

.admin-theme-v2 .grid {
  grid-template-columns: 1fr;
}

.admin-theme-v2 .compact-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-theme-v2 .compact-meta div,
.admin-theme-v2 .meta div {
  background: var(--admin-surface-soft);
}

.admin-theme-v2 .actions {
  margin-top: 2px;
}

.admin-theme-v2 .actions form,
.admin-theme-v2 .actions button,
.admin-theme-v2 .actions .btn {
  flex: 1 1 170px;
}

.admin-theme-v2 .actions button,
.admin-theme-v2 .actions .btn {
  width: 100%;
}

.admin-theme-v2 .attention-banner.critical {
  border-color: #f0b8bc;
  background: #fff0f1;
}

/* Demais abas */
.admin-theme-v2 .production-kpi strong,
.admin-theme-v2 .customer-name,
.admin-theme-v2 .stock-ok,
.admin-theme-v2 .product-editor-fields h3,
.admin-theme-v2 .week-title h2 {
  color: #6e1632;
}

.admin-theme-v2 .production-kpi,
.admin-theme-v2 .switch-card,
.admin-theme-v2 .schedule-row,
.admin-theme-v2 .movement {
  background: #fcfaf9;
}

.admin-theme-v2 table th {
  color: #675b60;
  background: #f9f4f6;
}

.admin-theme-v2 .product-category-tabs {
  border-color: var(--admin-line);
  background: #fff;
}

/* Entrada do painel continua centralizada e sem menu */
.admin-theme-v2:not([data-admin-logged="1"]) .wrap {
  width: min(430px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

/* Tablet: conteúdo em uma coluna, menu ainda lateral */
@media (max-width: 1180px) and (min-width: 901px) {
  .admin-theme-v2 .order-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-theme-v2 .orders {
    grid-template-columns: 1fr;
  }
}

/* Celular: navegação horizontal e conteúdo livre */
@media (max-width: 900px) {
  .admin-theme-v2 .wrap {
    width: min(100% - 20px, 780px);
    margin: 0 auto;
    padding: 12px 0 40px;
  }

  .admin-theme-v2 .tabs {
    position: sticky;
    inset: auto;
    top: 0;
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: none;
    gap: 4px;
    margin-bottom: 13px;
    padding: 5px;
    overflow-x: auto;
    border: 1px solid var(--admin-line);
    border-radius: 13px;
    background: rgba(255,255,255,.96);
    box-shadow: var(--admin-shadow-sm);
  }

  .admin-theme-v2 .tabs::before,
  .admin-theme-v2 .tabs::after {
    display: none;
  }

  .admin-theme-v2 .tabs a {
    flex: 0 0 auto;
    justify-content: center;
    width: auto;
    min-width: 110px;
    min-height: 44px;
    padding: 9px 13px;
    color: var(--admin-muted);
    text-align: center;
  }

  .admin-theme-v2 .tabs a::before {
    display: none;
  }

  .admin-theme-v2 .tabs a:hover {
    color: #6e1632;
    background: #faedf1;
  }

  .admin-theme-v2 .tabs a.active {
    color: #fff;
    background: #791936;
    box-shadow: none;
  }

  .admin-theme-v2 .top,
  .admin-theme-v2 .top.is-actions-only {
    align-items: flex-start;
  }

  .admin-theme-v2 .order-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-theme-v2 .orders {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .admin-theme-v2 .top,
  .admin-theme-v2 .top.is-actions-only {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-theme-v2 .top-actions {
    justify-content: stretch;
  }

  .admin-theme-v2 .order-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-theme-v2 .order-kpis .kpi {
    min-height: 98px;
    padding: 13px 10px 12px 49px;
  }

  .admin-theme-v2 .order-kpis .kpi::before {
    top: 13px;
    left: 11px;
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .admin-theme-v2 .order-kpis .kpi strong {
    margin-top: 28px;
    font-size: 23px;
  }
}

@media (max-width: 390px) {
  .admin-theme-v2 .order-kpis {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== Barra lateral branca — 2026-08-25 ===== */
@media (min-width: 901px) {
  .admin-theme-v2 .tabs {
    border-right: 1px solid #eadde2;
    background: #ffffff;
    box-shadow: 8px 0 28px rgba(67, 24, 40, 0.07);
  }

  .admin-theme-v2 .tabs::before {
    color: #71122e;
  }

  .admin-theme-v2 .tabs::after {
    color: #9a7c87;
  }

  .admin-theme-v2 .tabs a {
    color: #6b1733;
  }

  .admin-theme-v2 .tabs a:hover {
    color: #5d1028;
    background: #fbf2f5;
  }

  .admin-theme-v2 .tabs a.active {
    border-color: #efd9e1;
    color: #6b1733;
    background: #faedf1;
    box-shadow:
      inset 3px 0 0 #d85f72,
      0 6px 18px rgba(86, 20, 46, 0.08);
  }
}

/* ===== Financeiro e fluxo de caixa — 2026-08-25 ===== */
.admin-theme-v2 .tabs a:nth-child(6)::before { content: "R$"; font-size: 12px; font-weight: 900; }
.admin-theme-v2 .tabs a:nth-child(7)::before { content: "⚙"; }

.admin-theme-v2 .finance-intro {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-bottom: 14px; padding: 22px 24px;
  background: linear-gradient(125deg, rgba(121,25,54,.07), transparent 45%), #fff;
}
.admin-theme-v2 .finance-intro h2,
.admin-theme-v2 .finance-card-heading h2 {
  margin: 4px 0 5px; color: var(--admin-ink); font-size: 22px;
  font-weight: 900; letter-spacing: -.025em;
}
.admin-theme-v2 .finance-intro p,
.admin-theme-v2 .finance-card-heading p {
  max-width: 720px; margin: 0; color: var(--admin-muted);
  font-size: 13px; line-height: 1.5;
}
.admin-theme-v2 .finance-eyebrow {
  color: #8a1838; font-size: 10px; font-weight: 900; letter-spacing: .13em;
}
.admin-theme-v2 .finance-period-label {
  flex: 0 0 auto; min-width: 175px; padding: 13px 15px;
  border: 1px solid #ead5dc; border-radius: 12px; text-align: right; background: #fff7f9;
}
.admin-theme-v2 .finance-period-label span {
  display: block; color: var(--admin-muted); font-size: 10px; font-weight: 800;
}
.admin-theme-v2 .finance-period-label strong {
  display: block; margin-top: 4px; color: #6b1733; font-size: 14px;
}
.admin-theme-v2 .finance-periods { margin-bottom: 10px; }
.admin-theme-v2 .finance-date-filter {
  display: grid; grid-template-columns: minmax(160px,220px) minmax(160px,220px) auto;
  align-items: end; gap: 10px; margin-bottom: 14px; padding: 14px;
}
.admin-theme-v2 .finance-kpis { grid-template-columns: repeat(6,minmax(128px,1fr)); gap: 10px; }
.admin-theme-v2 .finance-kpis .kpi { min-height: 104px; padding: 16px 13px; }
.admin-theme-v2 .finance-kpis .kpi strong { color: #241b1f; font-size: 22px; }
.admin-theme-v2 .finance-kpis .finance-kpi-income strong,
.admin-theme-v2 .cashflow-income { color: #237248; }
.admin-theme-v2 .finance-kpis .finance-kpi-expense strong,
.admin-theme-v2 .cashflow-expense { color: #c3313a; }
.admin-theme-v2 .finance-kpis .finance-kpi-balance strong,
.admin-theme-v2 .cashflow-balance { color: #6b1733; }

.admin-theme-v2 .finance-grid {
  display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr);
  gap: 14px; margin-bottom: 14px;
}
.admin-theme-v2 .finance-card-heading {
  display: flex; justify-content: space-between; gap: 14px; margin-bottom: 15px;
}
.admin-theme-v2 .finance-card-heading h2 { font-size: 20px; }
.admin-theme-v2 .finance-insight-grid {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px;
}
.admin-theme-v2 .finance-insight-grid > div {
  min-height: 104px; padding: 13px; border: 1px solid var(--admin-line);
  border-radius: 12px; background: var(--admin-surface-soft);
}
.admin-theme-v2 .finance-insight-grid span,
.admin-theme-v2 .finance-insight-grid small {
  display: block; color: var(--admin-muted); font-size: 10px;
  font-weight: 750; line-height: 1.35;
}
.admin-theme-v2 .finance-insight-grid strong {
  display: block; margin: 8px 0 5px; color: #6b1733; font-size: 17px; line-height: 1.25;
}
.admin-theme-v2 .finance-rankings {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px;
  margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--admin-line);
}
.admin-theme-v2 .finance-rankings h3 { margin: 0 0 9px; font-size: 14px; }
.admin-theme-v2 .finance-ranking-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--admin-line); font-size: 12px;
}
.admin-theme-v2 .finance-ranking-row:last-child { border-bottom: 0; }
.admin-theme-v2 .finance-ranking-row span { color: var(--admin-muted); }
.admin-theme-v2 .finance-ranking-row strong { color: var(--admin-ink); text-align: right; }
.admin-theme-v2 .finance-empty { color: var(--admin-muted); font-size: 12px; }

.admin-theme-v2 .finance-entry-form {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px;
}
.admin-theme-v2 .finance-entry-form .finance-wide { grid-column: 1 / -1; }
.admin-theme-v2 .finance-entry-form textarea {
  width: 100%; min-height: 82px; padding: 11px 12px;
  border: 1px solid var(--admin-line-strong); border-radius: 10px;
  resize: vertical; background: #fff;
}
.admin-theme-v2 .finance-cashflow { padding: 18px; }
.admin-theme-v2 .cashflow-table {
  overflow-x: auto; border: 1px solid var(--admin-line); border-radius: 12px; background: #fff;
}
.admin-theme-v2 .cashflow-table table { min-width: 1020px; }
.admin-theme-v2 .cashflow-table td strong,
.admin-theme-v2 .cashflow-table td small { display: block; }
.admin-theme-v2 .cashflow-table td small {
  max-width: 270px; margin-top: 3px; color: var(--admin-muted); font-size: 10px;
}
.admin-theme-v2 .cashflow-income,
.admin-theme-v2 .cashflow-expense,
.admin-theme-v2 .cashflow-balance { font-weight: 900; white-space: nowrap; }
.admin-theme-v2 .finance-delete {
  min-height: 36px; padding: 7px 10px; color: #a32934; font-size: 11px;
}
.admin-theme-v2 .finance-auto { color: var(--admin-muted); font-size: 10px; font-weight: 800; }

@media (max-width: 1240px) and (min-width: 901px) {
  .admin-theme-v2 .finance-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .admin-theme-v2 .finance-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .admin-theme-v2 .finance-intro { align-items: stretch; flex-direction: column; }
  .admin-theme-v2 .finance-period-label { min-width: 0; text-align: left; }
  .admin-theme-v2 .finance-date-filter,
  .admin-theme-v2 .finance-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-theme-v2 .finance-date-filter button { grid-column: 1 / -1; }
  .admin-theme-v2 .finance-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .admin-theme-v2 .finance-date-filter,
  .admin-theme-v2 .finance-kpis,
  .admin-theme-v2 .finance-insight-grid,
  .admin-theme-v2 .finance-rankings,
  .admin-theme-v2 .finance-entry-form { grid-template-columns: 1fr; }
  .admin-theme-v2 .finance-date-filter button,
  .admin-theme-v2 .finance-entry-form .finance-wide { grid-column: auto; }
  .admin-theme-v2 .finance-kpis .kpi { min-height: 88px; }
  .admin-theme-v2 .cashflow-table { overflow: visible; border: 0; background: transparent; }
  .admin-theme-v2 .cashflow-table table,
  .admin-theme-v2 .cashflow-table tbody { display: block; min-width: 0; }
  .admin-theme-v2 .cashflow-table thead { display: none; }
  .admin-theme-v2 .cashflow-table tbody { display: grid; gap: 10px; }
  .admin-theme-v2 .cashflow-table tr {
    display: grid; gap: 7px; padding: 13px;
    border: 1px solid var(--admin-line); border-radius: 12px; background: #fff;
  }
  .admin-theme-v2 .cashflow-table td {
    display: flex; justify-content: space-between; gap: 14px;
    padding: 5px 0; border: 0; text-align: right;
  }
  .admin-theme-v2 .cashflow-table td::before {
    content: attr(data-label); color: var(--admin-muted);
    font-size: 10px; font-weight: 800; text-align: left;
  }
  .admin-theme-v2 .cashflow-table td strong,
  .admin-theme-v2 .cashflow-table td small { text-align: right; }
}

/* ===== Estoque atual e capacidade futura — 2026-08-25 ===== */
.admin-theme-v2 .stock-kpis {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}
.admin-theme-v2 .current-stock-week {
  display: block;
  grid-template-columns: none;
  padding: 18px 20px;
}
.admin-theme-v2 .stock-week-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #8a1838;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}
.admin-theme-v2 .current-stock-week .week-title p {
  margin: 6px 0 0;
  color: var(--admin-muted);
  font-size: 12px;
}
.admin-theme-v2 .future-production-card {
  margin-bottom: 14px;
}
.admin-theme-v2 .future-production-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}
.admin-theme-v2 .future-production-heading h2 {
  margin: 4px 0;
  color: var(--admin-ink);
  font-size: 21px;
  font-weight: 900;
}
.admin-theme-v2 .future-production-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.5;
}
.admin-theme-v2 .future-capacity-badge {
  flex: 0 0 auto;
  min-width: 170px;
  padding: 12px 14px;
  border: 1px solid #ead5dc;
  border-radius: 11px;
  text-align: right;
  background: #fff7f9;
}
.admin-theme-v2 .future-capacity-badge span {
  display: block;
  color: var(--admin-muted);
  font-size: 10px;
  font-weight: 800;
}
.admin-theme-v2 .future-capacity-badge strong {
  display: block;
  margin-top: 4px;
  color: #6b1733;
  font-size: 18px;
}
.admin-theme-v2 .future-week-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-top: 14px;
}
.admin-theme-v2 .future-week-card {
  padding: 14px;
  border: 1px solid var(--admin-line);
  border-radius: 13px;
  background: var(--admin-surface-soft);
}
.admin-theme-v2 .future-week-card.is-over-capacity {
  border-color: #efb7bc;
  background: #fff5f5;
}
.admin-theme-v2 .future-week-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.admin-theme-v2 .future-week-card header div span {
  display: block;
  color: var(--admin-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.admin-theme-v2 .future-week-card header div strong {
  display: block;
  margin-top: 3px;
  color: var(--admin-ink);
  font-size: 12px;
}
.admin-theme-v2 .future-usage {
  color: #6b1733;
  font-size: 14px;
  font-weight: 900;
}
.admin-theme-v2 .future-capacity-bar {
  height: 7px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #eadfe3;
}
.admin-theme-v2 .future-capacity-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8a1838, #d85f72);
}
.admin-theme-v2 .future-week-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.admin-theme-v2 .future-week-kpis div {
  padding: 9px 7px;
  border: 1px solid var(--admin-line);
  border-radius: 9px;
  text-align: center;
  background: #fff;
}
.admin-theme-v2 .future-week-kpis span {
  display: block;
  color: var(--admin-muted);
  font-size: 9px;
}
.admin-theme-v2 .future-week-kpis strong {
  display: block;
  margin-top: 3px;
  color: #6b1733;
  font-size: 17px;
}
.admin-theme-v2 .future-shortage {
  margin-top: 9px;
  padding: 8px 9px;
  border-radius: 9px;
  color: #a32934;
  background: #ffe8ea;
  font-size: 11px;
  font-weight: 900;
}
.admin-theme-v2 .future-week-card details {
  margin-top: 10px;
  border-top: 1px solid var(--admin-line);
  padding-top: 9px;
}
.admin-theme-v2 .future-week-card summary {
  cursor: pointer;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 850;
}
.admin-theme-v2 .future-product-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.admin-theme-v2 .future-product-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}
.admin-theme-v2 .future-product-list span {
  color: var(--admin-muted);
}
.admin-theme-v2 .future-product-list p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 11px;
}
.admin-theme-v2 .weekly-capacity-settings > p {
  margin: -2px 0 14px;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.5;
}
.admin-theme-v2 .settings-notice a {
  color: inherit;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .admin-theme-v2 .future-week-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 800px) {
  .admin-theme-v2 .stock-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-theme-v2 .future-production-heading {
    flex-direction: column;
  }
  .admin-theme-v2 .future-capacity-badge {
    width: 100%;
    min-width: 0;
    text-align: left;
  }
}
@media (max-width: 460px) {
  .admin-theme-v2 .stock-kpis,
  .admin-theme-v2 .future-week-kpis {
    grid-template-columns: 1fr;
  }
}


/* ===== Edição e exclusão de categorias/produtos — 2026-08-25 ===== */
.admin-theme-v2 .product-category-manager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #fffafb;
}

.admin-theme-v2 .product-category-edit-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.admin-theme-v2 .product-category-manager form,
.admin-theme-v2 .product-category-manager .field {
  margin: 0;
}

.admin-theme-v2 .product-editor-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.admin-theme-v2 .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid #c7354c;
  border-radius: 10px;
  color: #a31632;
  background: #fff4f6;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.admin-theme-v2 .btn-danger:hover {
  color: #fff;
  background: #a31632;
}

.admin-theme-v2 .product-editor-card .product-editor-fields > h3 {
  margin-bottom: 2px;
}

@media (max-width: 760px) {
  .admin-theme-v2 .product-category-manager,
  .admin-theme-v2 .product-category-edit-form,
  .admin-theme-v2 .product-editor-actions {
    grid-template-columns: 1fr;
  }

  .admin-theme-v2 .product-category-manager .btn-danger,
  .admin-theme-v2 .product-category-edit-form button,
  .admin-theme-v2 .product-editor-actions button {
    width: 100%;
  }
}

/* Mesmo padrão tipográfico da loja, restrito ao painel administrativo. */
:root body.admin-theme-v2 {
  --admin-font-ui: "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-family: var(--admin-font-ui);
  font-weight: 400;
}

:root body.admin-theme-v2 :is(
  h1, h2, h3, h4, h5, h6, button, input, select, textarea
) {
  font-family: var(--admin-font-ui);
}

:root body.admin-theme-v2 :is(input, select, textarea) {
  font-weight: 400;
}

:root body.admin-theme-v2 :is(
  h1, h2, h3, h4, h5, h6, strong, b, th, label, legend,
  button, .btn, .btn-danger, summary, .tabs a, .quick-filters a, .links a,
  .product-category-tabs a, .field span, .bulk-toolbar label,
  .batch-products label, .stock-selection-bar > span,
  .filter-result, .channel-pill, .customer-name,
  .order-status, .badge, .flash,
  .production-warning, .attention-banner, .store-alert,
  .settings-notice, .settings-notice a, .movement-hint, .schedule-day,
  .product-create-eyebrow, .product-create-placeholder,
  .admin-title small, .finance-eyebrow, .finance-auto,
  .stock-week-eyebrow, .future-usage, .future-shortage
) {
  font-weight: 500;
  letter-spacing: normal;
}

:root body.admin-theme-v2 .flash.ok a {
  font-weight: 500;
}

:root body.admin-theme-v2 :is(
  h1, h2, .kpi strong, .production-kpi strong,
  .finance-insight-grid strong, .cashflow-income,
  .cashflow-expense, .cashflow-balance, .future-capacity-badge strong,
  .future-week-kpis strong, .future-usage, .future-shortage,
  .attention-banner.critical, .production-table .pending,
  .production-table .confirmed, .stock-zero, .stock-ok
) {
  font-weight: 600;
  letter-spacing: normal;
}

:root body.admin-theme-v2 :is(
  .kpi span, .order-kpis .kpi span,
  .finance-period-label span, .finance-insight-grid span,
  .finance-insight-grid small, .future-capacity-badge span,
  .future-week-card header div span
) {
  font-weight: 400;
}

/* O nome em itálico de .tabs::before continua como assinatura da marca. */
:root body.admin-theme-v2 .tabs::after {
  font-family: var(--admin-font-ui);
  font-weight: 500;
  letter-spacing: .04em;
}

:root body.admin-theme-v2 .tabs a:nth-child(6)::before {
  font-weight: 600;
}

:root body.admin-theme-v2 :is(
  .inventory-table td, .cashflow-table td
)::before {
  font-weight: 500;
}

/* ===== Painel limpo — 2026-09-07 ===== */
:root body.admin-theme-v2 {
  --admin-bg: #ffffff;
  background: #ffffff;
}

.admin-theme-v2 .tabs > a {
  padding-inline: 14px;
}

.admin-theme-v2 .tabs a::before,
.admin-theme-v2 .order-kpis .kpi::before {
  display: none !important;
  content: none !important;
}

.admin-theme-v2 .order-kpis .kpi {
  min-height: 96px;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  text-align: center;
}

.admin-theme-v2 .order-kpis .kpi strong {
  margin-top: 0;
}

.admin-theme-v2 .order-kpis .kpi span {
  max-width: 150px;
  text-align: center;
}

.admin-theme-v2 #enableAdminNotifications,
.admin-theme-v2 .finance-intro,
.admin-theme-v2 .filter-card .search-row .field > span {
  display: none !important;
}

@media (min-width: 901px) {
  .admin-theme-v2 .tabs {
    padding-bottom: 106px;
  }

  .admin-theme-v2 .top-actions {
    position: fixed;
    left: 12px;
    bottom: 24px;
    z-index: 102;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 222px;
    padding-top: 12px;
    border-top: 1px solid var(--admin-line);
  }

  .admin-theme-v2 .top-actions > a:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .admin-theme-v2 .top-actions > form:last-child {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-theme-v2 .top-actions > form:not(:last-child) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .admin-theme-v2 .top-actions > form {
    min-width: 0;
    margin: 0;
  }

  .admin-theme-v2 .top-actions > a:first-child,
  .admin-theme-v2 .top-actions > form:last-child > button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px;
    border: 1px solid #eadde2;
    border-radius: 9px;
    color: #6b1733;
    background: #ffffff;
    box-shadow: none;
    font-family: var(--admin-font-ui);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
  }

  .admin-theme-v2 .top-actions > a:first-child::before {
    display: none;
    content: none;
  }

  .admin-theme-v2 .top-actions > a:first-child:hover,
  .admin-theme-v2 .top-actions > form:last-child > button:hover {
    border-color: #d9b9c5;
    color: #5d1028;
    background: #fbf2f5;
  }

  .admin-theme-v2 .top-actions > a:first-child:focus-visible,
  .admin-theme-v2 .top-actions > form:last-child > button:focus-visible {
    outline: 3px solid rgba(121, 25, 54, .22);
    outline-offset: 2px;
  }
}

/* Remove o título repetido do topo em todas as abas administrativas. */
.admin-theme-v2 .admin-title {
  display: none !important;
}

.admin-theme-v2 .top,
.admin-theme-v2 .top.is-actions-only {
  display: contents;
}

/* Usa no painel a mesma marca transparente exibida na loja. */
@media (min-width: 901px) {
  .admin-theme-v2 .tabs::before {
    top: 15px;
    left: 24px;
    right: auto;
    display: block;
    width: 190px;
    height: 76px;
    content: "";
    background: url("assets/img/loja.svg") left center / contain no-repeat;
  }

  .admin-theme-v2 .tabs::after {
    display: none;
    content: none;
  }
}
