.vendor-statistics {
  width: min(1380px, calc(100% - 40px));
  margin: 2px auto 70px;
  color: #171717;
}
.vendor-statistics * {
  box-sizing: border-box;
}
.vendor-statistics-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}
.vendor-statistics-header h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.2;
  margin-top: 30px;
}
.vendor-statistics-header p {
  margin: 0;
  color: #666;
  font-size: 16px;
}
.vendor-statistics-filter {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.vendor-statistics-filter label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #666;
  font-size: 12px;
  font-weight: 600;
}
.vendor-statistics-filter input,
.vendor-statistics-filter select,
.vendor-statistics-filter button,
.vendor-statistics-top select {
  height: 42px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: #222;
  font: inherit;
}
.vendor-statistics-filter button {
  border-color: #fbc342;
  background: #fbc342;
  padding: 0 20px;
  font-weight: 700;
  cursor: pointer;
}
.vendor-statistics-filter .select2-container {
  width: 145px !important;
}
.vendor-statistics-filter .select2-container .select2-selection--single,
.vendor-statistics-top .select2-container .select2-selection--single {
  height: auto;
  border: 1px solid #dedede;
  border-radius: 8px;
}
.vendor-statistics-top .select2-container .select2-selection--single {
  height: 36px !important;
}
/* .vendor-statistics-filter .select2-selection__rendered,
.vendor-statistics-top .select2-selection__rendered {
  line-height: 40px !important;
} */
.vendor-statistics-filter .select2-selection__arrow,
.vendor-statistics-top .select2-selection__arrow {
  height: 40px !important;
}
.vendor-statistics-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 28px;
}
.vendor-statistics-card {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 132px;
  padding: 26px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 25px rgba(0, 0, 0, 0.035);
}
.vendor-statistics-icon {
  display: flex;
  flex: 0 0 62px;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #fff8e5;
  color: #f5b900;
  font-size: 29px;
}
.vendor-statistics-label {
  margin-bottom: 5px;
  font-size: 15px;
  font-weight: 700;
}
.vendor-statistics-value {
  font-size: 31px;
  font-weight: 800;
  line-height: 1;
}
.vendor-statistics-content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
  gap: 28px;
}
.vendor-statistics-panel {
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 25px rgba(0, 0, 0, 0.03);
}
.vendor-statistics-panel h2 {
  margin: 0;
  font-size: 20px;
}
.vendor-statistics-chart-panel {
  min-width: 0;
  padding: 24px 26px 18px;
}
.vendor-statistics-chart {
  width: 100%;
  margin-top: 18px;
  overflow: hidden;
}
.vendor-statistics-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 260px;
}
.vendor-statistics-chart .chart-grid {
  stroke: #ededed;
  stroke-width: 1;
}
.vendor-statistics-chart .chart-area {
  fill: url(#vendor-statistics-gradient);
}
.vendor-statistics-chart .chart-line {
  fill: none;
  stroke: #f5b900;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.vendor-statistics-chart .chart-point {
  fill: #f5b900;
  stroke: #fff;
  stroke-width: 3;
}
.vendor-statistics-chart .chart-axis-label,
.vendor-statistics-chart .chart-date-label {
  fill: #777;
  font-size: 12px;
}
.vendor-statistics-top {
  padding: 24px;
}
.vendor-statistics-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.vendor-statistics-top-header form {
  width: 165px;
}
.vendor-statistics-top-header .select2-container {
  width: 100% !important;
}
.vendor-statistics-top-label {
  margin-bottom: 7px;
  color: #777;
  font-size: 11px;
  text-align: right;
}
.vendor-statistics-top-list {
  display: flex;
  flex-direction: column;
}
.vendor-statistics-product {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border-top: 1px solid #f0f0f0;
  color: #222;
  text-decoration: none;
}
.vendor-statistics-product:first-child {
  border-top: 0;
}
.vendor-statistics-product img {
  width: 44px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
}
.vendor-statistics-product span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vendor-statistics-product strong {
  font-size: 14px;
}
.vendor-statistics-empty {
  padding: 45px 15px;
  color: #777;
  text-align: center;
}
.vendor-statistics-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.vendor-statistics-tables > section {
  min-width: 0;
}
.vendor-statistics-articles,
.vendor-statistics-ads {
  margin-top: 20px;
}
.vendor-statistics-articles-panel,
.vendor-statistics-ads-panel {
  padding: 25px 28px;
  height: 100%;
  box-sizing: border-box;
}
.vendor-statistics-articles-header,
.vendor-statistics-ads-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.vendor-statistics-articles-header h2,
.vendor-statistics-ads-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}
.vendor-statistics-articles-header a,
.vendor-statistics-ads-header a {
  font-size: 12px;
  color: #e5a900;
  text-decoration: none;
}
.vendor-statistics-articles-header a:hover,
.vendor-statistics-ads-header a:hover {
  text-decoration: underline;
}
/* Article + Ad tables */
.vendor-statistics-article-table,
.vendor-statistics-ad-table {
  width: 100%;
  border-collapse: collapse;
}
.vendor-statistics-article-table th,
.vendor-statistics-ad-table th {
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.vendor-statistics-article-table th:not(:first-child),
.vendor-statistics-ad-table th:not(:first-child) {
  text-align: center;
}
.vendor-statistics-article-table td,
.vendor-statistics-ad-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  color: #555;
}
.vendor-statistics-article-table td:not(:first-child),
.vendor-statistics-ad-table td:not(:first-child) {
  text-align: center;
  font-weight: 600;
}
.vendor-statistics-article-table tr:last-child td,
.vendor-statistics-ad-table tr:last-child td {
  border-bottom: 0;
}
.vendor-statistics-article-table td:first-child,
.vendor-statistics-ad-table td:first-child {
  width: 55%;
}
.vendor-statistics-article-table td:first-child a,
.vendor-statistics-ad-table td:first-child a {
  color: #444;
  text-decoration: none;
}
/* Empty state */
.vendor-statistics-empty {
  padding: 25px 10px;
  text-align: center;
  font-size: 13px;
  color: #999;
}
.vendor-statistics-articles-button {
  margin-top: 2px;
  text-align: center;
}
.vendor-statistics-articles-button a {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 12px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
  color: #444;
  font-size: 18px;
  text-decoration: none;
  font-weight: bold;
}
.vendor-statistics-articles-button a:hover {
  color: #e5a900;
  border-color: #ddd;
}
.vendor-statistics-article-row.is-hidden {
  display: none;
}
.vendor-statistics-chart-filter, .vendor-statistics-top-filter {
  height: 40px;
}
/* Responsive */
@media (max-width: 900px) {
  .vendor-statistics-tables {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1100px) {
  .vendor-statistics {
    width: min(100% - 30px, 1380px);
  }
  .vendor-statistics-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vendor-statistics-content {
    grid-template-columns: 1fr;
  }
  .vendor-statistics-top {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .vendor-statistics {
    width: calc(100% - 24px);
    margin: 25px auto 45px;
  }
  .vendor-statistics-header {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 22px;
  }
  .vendor-statistics-header h1 {
    font-size: 27px;
  }
  .vendor-statistics-header p {
    font-size: 14px;
  }
  .vendor-statistics-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .vendor-statistics-filter label {
    min-width: 0;
  }
  .vendor-statistics-filter input {
    width: 100%;
    min-width: 0;
  }
  .vendor-statistics-filter button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .vendor-statistics-cards {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 18px;
  }
  .vendor-statistics-card {
    min-height: 105px;
    padding: 20px;
    gap: 16px;
  }
  .vendor-statistics-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    font-size: 24px;
  }
  .vendor-statistics-label {
    font-size: 14px;
  }
  .vendor-statistics-value {
    font-size: 27px;
  }
  .vendor-statistics-content {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .vendor-statistics-chart-panel {
    padding: 20px 16px 15px;
  }
  .vendor-statistics-chart-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .vendor-statistics-chart-header h2 {
    font-size: 18px;
  }
  .vendor-statistics-chart-filter,
  .vendor-statistics-group {
    width: 100%;
  }
  .vendor-statistics-group {
    height: 40px;
  }
  .vendor-statistics-chart {
    margin-top: 14px;
    overflow-x: auto;
  }
  .vendor-statistics-chart svg {
    min-width: 500px;
    min-height: 230px;
  }
  .vendor-statistics-top {
    padding: 20px 16px;
  }
  .vendor-statistics-top-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .vendor-statistics-top-header h2 {
    font-size: 18px;
  }
  .vendor-statistics-top-header .select2-container,
  .vendor-statistics-top select {
    width: 100% !important;
  }
  .vendor-statistics-product {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
  }
  .vendor-statistics-product img {
    width: 42px;
    height: 38px;
  }
  .vendor-statistics-product span {
    font-size: 13px;
  }
  .vendor-statistics-articles {
    margin-top: 18px;
  }
  .vendor-statistics-articles-panel {
    padding: 20px 16px;
    overflow: hidden;
  }
  .vendor-statistics-articles-header h2 {
    font-size: 18px;
  }
  .vendor-statistics-articles-panel {
    overflow: hidden;
  }
  .vendor-statistics-article-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .vendor-statistics-article-table th,
  .vendor-statistics-article-table td {
    padding: 10px 6px;
    font-size: 12px;
    vertical-align: middle;
  }

  .vendor-statistics-article-table th:first-child,
  .vendor-statistics-article-table td:first-child {
    width: 55%;
    text-align: left;
  }

  .vendor-statistics-article-table th:nth-child(2),
  .vendor-statistics-article-table td:nth-child(2),
  .vendor-statistics-article-table th:nth-child(3),
  .vendor-statistics-article-table td:nth-child(3) {
    width: 22.5%;
    text-align: center;
  }

  /* Header-ul coloanelor numerice */
  .vendor-statistics-article-table th:nth-child(2),
  .vendor-statistics-article-table th:nth-child(3) {
    white-space: nowrap;
    font-size: 11px;
  }

  .vendor-statistics-article-table td:first-child a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .vendor-statistics-articles-button {
    min-width: 0;
    width: 100%;
  }
  .vendor-statistics-articles-button a {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .vendor-statistics {
    width: calc(100% - 20px);
    margin-top: 20px;
  }
  .vendor-statistics-header h1 {
    font-size: 24px;
  }
  .vendor-statistics-filter {
    grid-template-columns: 1fr;
  }
  .vendor-statistics-filter button {
    grid-column: auto;
  }
  .vendor-statistics-card {
    min-height: 95px;
    padding: 16px;
  }
  .vendor-statistics-icon {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
  .vendor-statistics-value {
    font-size: 25px;
  }
  .vendor-statistics-change {
    font-size: 12px;
  }
  .vendor-statistics-change span {
    display: block;
    margin-top: 3px;
  }
  .vendor-statistics-chart-panel,
  .vendor-statistics-top,
  .vendor-statistics-articles-panel {
    border-radius: 10px;
  }
  .vendor-statistics-product {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }
  .vendor-statistics-product strong {
    font-size: 13px;
  }
}