.reports-v2 {
  display: grid;
  gap: 16px;
  width: 100%;
  min-width: 0;
  color: #06122b;
}

.reports-v2-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 0.8fr);
  gap: 24px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 26px;
  padding: clamp(20px, 3vw, 34px);
  background:
    radial-gradient(circle at 88% 14%, rgba(0, 217, 121, 0.22), transparent 30%),
    linear-gradient(135deg, #06172f 0%, #08253a 56%, #063527 100%);
  color: #fff;
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.14);
}

.reports-v2-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(65, 255, 166, 0.26);
  border-radius: 999px;
  background: rgba(0, 217, 121, 0.12);
  padding: 7px 10px;
  color: #72ffc0;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reports-v2-eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00e784;
  box-shadow: 0 0 0 5px rgba(0, 231, 132, 0.12);
  content: "";
}

.reports-v2-hero h1 {
  margin: 14px 0 5px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 1;
}

.reports-v2-hero-copy > p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.5;
}

.reports-v2-period {
  display: block;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.72rem;
  font-weight: 800;
}

.reports-v2-filters {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  padding: 14px;
  backdrop-filter: blur(14px);
}

.reports-v2-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.reports-v2-presets button,
.reports-v2-export {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.reports-v2-presets button:hover {
  border-color: rgba(0, 231, 132, 0.5);
  background: rgba(0, 217, 121, 0.14);
}

.reports-v2-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.reports-v2-date-grid label {
  display: grid;
  gap: 5px;
}

.reports-v2-date-grid span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reports-v2-date-grid input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 11px;
  background: rgba(3, 13, 28, 0.5);
  padding: 0 11px;
  color: #fff;
  color-scheme: dark;
  font-size: 0.78rem;
  font-weight: 800;
  outline: none;
}

.reports-v2-export {
  border: 0;
  background: #00d979;
  color: #032116;
  box-shadow: 0 10px 26px rgba(0, 217, 121, 0.2);
}

.reports-v2-export:disabled {
  opacity: 0.6;
  cursor: wait;
}

.reports-v2-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.reports-v2-metric {
  --metric: #00c873;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  border: 1px solid rgba(203, 213, 225, 0.74);
  border-radius: 19px;
  background: linear-gradient(145deg, #fff, #f8fbfd);
  padding: 17px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.055);
}

.reports-v2-metric.tone-blue { --metric: #1686f4; }
.reports-v2-metric.tone-purple { --metric: #7c5cff; }
.reports-v2-metric.tone-amber { --metric: #f59e0b; }

.reports-v2-metric-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--metric) 12%, white);
  color: var(--metric);
  font-size: 1.05rem;
  font-weight: 950;
}

.reports-v2-metric-label,
.reports-v2-metric small {
  display: block;
  color: #64748b;
  font-size: 0.67rem;
  font-weight: 900;
}

.reports-v2-metric-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reports-v2-metric strong {
  display: block;
  overflow: hidden;
  margin: 4px 0;
  color: #06122b;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 950;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-v2-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
}

.reports-v2-card {
  min-width: 0;
  border: 1px solid rgba(203, 213, 225, 0.76);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  padding: 20px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.reports-v2-panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.reports-v2-panel-title h2 {
  margin: 0;
  color: #06122b;
  font-size: 1.05rem;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.reports-v2-panel-title p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.reports-v2-panel-title > span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #dcfaeb;
  padding: 7px 10px;
  color: #008b50;
  font-size: 0.7rem;
  font-weight: 950;
}

.reports-v2-finance {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px 20px;
}

.reports-v2-finance > .reports-v2-panel-title {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.reports-v2-finance-hero {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 82% 18%, rgba(0, 229, 128, 0.32), transparent 36%),
    linear-gradient(145deg, #06182d, #063626);
  padding: 20px;
  color: #fff;
}

.reports-v2-finance-hero span,
.reports-v2-finance-hero small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.7rem;
  font-weight: 850;
}

.reports-v2-finance-hero strong {
  margin: 6px 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 950;
  letter-spacing: -0.05em;
}

.reports-v2-finance-lines {
  display: grid;
  align-content: center;
}

.reports-v2-finance-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eef2f6;
  padding: 11px 2px;
  color: #526177;
  font-size: 0.76rem;
  font-weight: 750;
}

.reports-v2-finance-line strong {
  color: #13213b;
  white-space: nowrap;
}

.reports-v2-finance-line.positive strong { color: #008c51; }
.reports-v2-finance-line.negative strong { color: #d13a4a; }

.reports-v2-finance-line.emphasized {
  margin-top: 5px;
  border: 0;
  border-radius: 12px;
  background: #f1f8f5;
  padding: 11px;
  color: #163c2d;
  font-weight: 900;
}

.reports-v2-operation-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 17px;
  background: #f5f8fb;
  padding: 15px;
}

.reports-v2-operation-main span,
.reports-v2-operation-main small {
  display: block;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 800;
}

.reports-v2-operation-main strong {
  display: block;
  margin: 3px 0;
  font-size: 2rem;
  font-weight: 950;
}

.reports-v2-ring {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(#00d979 var(--progress), #dce7e2 0);
}

.reports-v2-ring::before {
  grid-area: 1 / 1;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.reports-v2-ring span {
  z-index: 1;
  grid-area: 1 / 1;
  color: #073726;
  font-size: 0.78rem;
  font-weight: 950;
}

.reports-v2-operation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.reports-v2-operation-item {
  --operation: #00c873;
  border: 1px solid #e4eaf0;
  border-radius: 14px;
  padding: 10px;
}

.reports-v2-operation-item.tone-blue { --operation: #1686f4; }
.reports-v2-operation-item.tone-red { --operation: #ef476f; }
.reports-v2-operation-item.tone-amber { --operation: #f59e0b; }

.reports-v2-operation-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #5c6b7f;
  font-size: 0.7rem;
  font-weight: 850;
}

.reports-v2-operation-item strong {
  color: #06122b;
  font-size: 1rem;
}

.reports-v2-operation-item > i,
.reports-v2-flavor-copy > i {
  display: block;
  height: 5px;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 999px;
  background: #edf1f5;
}

.reports-v2-operation-item > i b,
.reports-v2-flavor-copy > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--operation);
}

.reports-v2-secondary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.reports-v2-secondary-stats > div {
  border-radius: 12px;
  background: #f7f9fb;
  padding: 10px;
}

.reports-v2-secondary-stats span,
.reports-v2-secondary-stats strong {
  display: block;
}

.reports-v2-secondary-stats span {
  color: #718096;
  font-size: 0.62rem;
  font-weight: 850;
}

.reports-v2-secondary-stats strong {
  overflow: hidden;
  margin-top: 3px;
  font-size: 0.82rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-v2-flavor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}

.reports-v2-flavor-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid #e8edf2;
  border-radius: 15px;
  background: #f9fbfc;
  padding: 10px 12px;
}

.reports-v2-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: #00d979;
  color: #032116;
  font-size: 0.7rem;
  font-weight: 950;
}

.reports-v2-flavor-copy {
  min-width: 0;
}

.reports-v2-flavor-copy strong,
.reports-v2-flavor-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-v2-flavor-copy strong {
  font-size: 0.76rem;
  font-weight: 950;
}

.reports-v2-flavor-copy span {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 750;
}

.reports-v2-flavor-copy > i {
  --operation: #00c873;
  height: 4px;
  max-width: 220px;
  margin-top: 6px;
}

.reports-v2-flavor-value {
  text-align: right;
  white-space: nowrap;
}

.reports-v2-flavor-value strong,
.reports-v2-flavor-value span {
  display: block;
}

.reports-v2-flavor-value strong {
  font-size: 0.72rem;
  font-weight: 950;
}

.reports-v2-flavor-value span {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 800;
}

.reports-v2-rank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.reports-v2-compact-ranking {
  display: grid;
  gap: 7px;
}

.reports-v2-compact-ranking > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #edf1f4;
  padding: 8px 2px;
}

.reports-v2-compact-ranking > div:last-child {
  border-bottom: 0;
}

.reports-v2-compact-ranking > div > div {
  min-width: 0;
}

.reports-v2-compact-ranking > div > div:last-child {
  text-align: right;
}

.reports-v2-compact-ranking strong,
.reports-v2-compact-ranking small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-v2-compact-ranking strong {
  font-size: 0.75rem;
  font-weight: 950;
}

.reports-v2-compact-ranking small {
  margin-top: 2px;
  color: #718096;
  font-size: 0.62rem;
  font-weight: 750;
}

.reports-v2-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 22px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
}

.reports-v2-table-wrap {
  position: relative;
  max-height: min(620px, 70vh);
  overflow: auto;
  margin-top: 6px;
  border: 1px solid #e5eaf0;
  border-radius: 15px;
}

.reports-v2-orders .admin-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #f7f9fb;
  color: #65748a;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reports-v2-orders .admin-table td {
  font-size: 0.72rem;
  vertical-align: middle;
}

.reports-v2-orders .admin-table tbody tr:hover td {
  background: #f8fcfa;
}

.reports-v2-orders .admin-table td:last-child .btn,
.reports-v2-orders .admin-table td:last-child button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 10px;
}

.reports-v2-tag {
  display: inline-flex;
  border-radius: 999px;
  background: #e9f8f1;
  padding: 5px 8px;
  color: #087649;
  font-size: 0.63rem;
  font-weight: 900;
  text-transform: capitalize;
}

.reports-v2-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid #dce4ec;
  border-radius: 999px;
  background: #f1f5f9;
  padding: 4px 8px;
  color: #46566d;
  font-size: 0.62rem;
  font-weight: 900;
  white-space: nowrap;
}

.reports-v2-status.status-entregue,
.reports-v2-status.status-pago {
  border-color: #b7ecd2;
  background: #e8fbf1;
  color: #057247;
}

.reports-v2-status.status-cancelado {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.reports-v2-status.status-em_rota,
.reports-v2-status.status-saiu_entrega {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.reports-v2-status.status-em_separacao,
.reports-v2-status.status-preparando {
  border-color: #fde68a;
  background: #fffbeb;
  color: #a16207;
}

.reports-v2-order-date strong,
.reports-v2-order-date small {
  display: block;
  white-space: nowrap;
}

.reports-v2-order-date small {
  margin-top: 2px;
  color: #718096;
  font-size: 0.61rem;
  font-weight: 750;
}

.reports-v2-orders-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 28px 12px;
  color: #64748b;
  text-align: center;
}

.reports-v2-orders-empty > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 3px;
  border-radius: 12px;
  background: #edf7f2;
  color: #00a761;
  font-size: 1rem;
}

.reports-v2-orders-empty strong {
  color: #26354c;
  font-size: 0.78rem;
}

.reports-v2-orders-empty small {
  font-size: 0.66rem;
  font-weight: 700;
}

.reports-v2-orders-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 12px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff7f7;
  padding: 11px 12px;
}

.reports-v2-orders-error strong,
.reports-v2-orders-error span {
  display: block;
}

.reports-v2-orders-error strong {
  color: #9f1239;
  font-size: 0.73rem;
}

.reports-v2-orders-error span {
  margin-top: 2px;
  color: #8b5a67;
  font-size: 0.64rem;
  font-weight: 700;
}

.reports-v2-orders-error button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  background: #9f1239;
  padding: 8px 11px;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .reports-v2-hero {
    grid-template-columns: 1fr;
  }

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

  .reports-v2-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .reports-v2 {
    gap: 10px;
  }

  .reports-v2-hero {
    gap: 18px;
    border-radius: 19px;
    padding: 18px 14px;
  }

  .reports-v2-hero h1 {
    margin-top: 12px;
    font-size: 2rem;
  }

  .reports-v2-period {
    line-height: 1.45;
  }

  .reports-v2-filters {
    border-radius: 15px;
    padding: 10px;
  }

  .reports-v2-date-grid {
    grid-template-columns: 1fr;
  }

  .reports-v2-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .reports-v2-metric {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    border-radius: 15px;
    padding: 12px 10px;
  }

  .reports-v2-metric-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .reports-v2-metric strong {
    font-size: 1rem;
  }

  .reports-v2-metric small {
    font-size: 0.58rem;
    line-height: 1.3;
  }

  .reports-v2-card {
    border-radius: 17px;
    padding: 14px;
  }

  .reports-v2-finance {
    grid-template-columns: 1fr;
  }

  .reports-v2-finance > .reports-v2-panel-title {
    grid-column: auto;
  }

  .reports-v2-finance-hero {
    min-height: 145px;
  }

  .reports-v2-secondary-stats {
    grid-template-columns: 1fr;
  }

  .reports-v2-flavor-grid,
  .reports-v2-rank-grid {
    grid-template-columns: 1fr;
  }

  .reports-v2-flavor-row {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 9px;
  }

  .reports-v2-flavor-value {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
    text-align: left;
  }

  .reports-v2-table-wrap { max-height: 70vh; }

  .reports-v2-orders .admin-table {
    min-width: 900px;
  }
}

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

  .reports-v2-presets {
    grid-template-columns: 1fr;
  }
}

