.creative-account {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding-inline-start: 10px;
  gap: 6px;
  border: 1px solid #a2b4c1;
  border-radius: 5px;
  background: #fff;
}
.creative-account:focus-within { outline: 2px solid #0877cb; outline-offset: 2px; }
.creative-account select {
  padding-inline-start: 0;
  min-width: 0;
  max-width: 225px;
  border: 0;
  outline: none;
  background: transparent;
  font-weight: 650;
}
.creative-account > .mf-icon { flex: none; }

.statistics .creative-controls {
  align-items: center;
  min-height: 48px;
  padding-block: 7px;
}
.creative-controls .stats-table-actions { flex-wrap: wrap; }
.creative-controls label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--quiet);
}
.creative-controls select { background-color: #fff; font-size: 13px; }
.creative-controls .stats-segment .mf-icon { width: 16px; height: 16px; }
.creatives .stats-search-clear[hidden] { display: none; }
.creative-filter-chips { display: contents; }
.creative-filter-trigger {
  flex: none;
  min-width: 30px;
  min-height: 30px;
  padding: 3px 6px;
  margin-inline-start: auto;
  border: 0;
  background: transparent;
  color: var(--quiet);
}
.creative-filter-trigger .mf-icon { width: 12px; height: 12px; }
.creative-filter-trigger[aria-expanded="true"] .mf-icon { rotate: 180deg; }
.creative-object-condition { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.creative-object-condition > :last-child { grid-column: 1 / -1; }
#creative-search-filters .stats-filter-values .stats-check { padding: 4px 2px; }
#creative-search-filters .stats-filter-values input { flex: none; }

.creative-columns { position: relative; }
.creative-columns summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 5px 10px;
  border: 1px solid #a2b4c1;
  border-radius: 5px;
  background: #fff;
  font-weight: 650;
  cursor: pointer;
}
.creative-columns summary::-webkit-details-marker { display: none; }
.creative-columns[open] summary { background: #e8f5fc; color: #095c87; }
.creative-columns > div {
  position: absolute;
  inset: calc(100% + 6px) 0 auto auto;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 9px 16px;
  padding: 13px;
  border: 1px solid var(--stats-border);
  border-radius: 8px;
  background: var(--stats-panel);
  box-shadow: 0 8px 20px #20374726;
}
.creative-columns label { cursor: pointer; }
.creative-columns input { margin: 0; }

.creative-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.creative-cards .stats-card > strong { font-size: clamp(20px, 2vw, 28px); }
.creative-cards .stats-card { min-height: 138px; }
.creative-cards .stats-card:first-child .stats-trend-empty { height: 44px; }

.creative-status {
  color: var(--quiet);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.creative-issues {
  margin: 3px 14px 10px;
  padding: 7px 10px;
  border: 1px solid #efdfbd;
  border-radius: 7px;
  background: #fff6e6;
  color: #754c17;
  font-size: 12px;
}

.creative-issues summary { cursor: pointer; font-weight: 600; }
.creative-issues ul { margin: 6px 0 1px; padding-inline-start: 18px; }

.creative-scroll {
  max-width: 100%;
  max-height: max(300px, calc(100dvh - 380px));
  overflow: auto;
  border-top: 1px solid var(--stats-border);
  scrollbar-gutter: stable;
}

.creative-scroll table {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  white-space: nowrap;
}

.creative-scroll > table > thead { position: sticky; z-index: 3; top: 0; }

.creative-scroll :is(th, td) {
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #e2ebf1;
  text-align: start;
  font-variant-numeric: tabular-nums;
}

.creative-scroll th {
  background: #edf4f8;
  font-size: 12px;
  color: var(--ink);
}

.creative-scroll th:has(button) { padding: 0; }
.creative-scroll td { background: var(--row-bg, #fff); }
.creative-row:hover > td { background: #eaf4fa; }
.creative-scroll .creative-geo-group td { background: #eaf3f8; color: #205978; font-weight: 650; }

.creative-scroll :is(.creative-row > td:first-child, table > thead th:first-child):not(.creative-detail-scroll th) {
  position: sticky;
  z-index: 1;
  inset-inline-start: 0;
  box-shadow: 1px 0 #dae5ed;
}

.creative-scroll > table > thead th:first-child { z-index: 2; }

.creative-scroll thead button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  font: inherit;
  background: transparent;
  color: inherit;
  text-align: start;
}

.creative-scroll thead button:hover { background: #e0edf5; }
.creative-scroll th[aria-sort] button { color: #08699d; }
.creative-scroll .creative-number { text-align: end; }
.creative-scroll tfoot :is(th, td) { background: #f1f7fa; font-weight: 700; }

.creative-name {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 205px;
  max-width: 290px;
}

.creative-name button {
  display: flex;
  align-items: center;
  max-width: 100%;
  gap: 5px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #08638e;
  text-align: start;
}

.creative-name button:hover span { text-decoration: underline; }
.creative-name button .mf-icon { flex-shrink: 0; width: 13px; height: 13px; }
.creative-name button span { overflow: hidden; text-overflow: ellipsis; }
.creative-name small { display: block; color: var(--quiet); }

.creative-thumbnail {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #d6e4ec;
  border-radius: 7px;
  overflow: hidden;
  background: #edf4f8;
  color: #5a7c90;
}

.creative-thumbnail img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creative-expanded > td { background: #f4f8fb; padding: 10px 15px 14px; }
.creative-details { width: min(1220px, calc(100vw - 46px)); max-width: 100%; white-space: normal; }
.creative-details h3 { margin: 0 0 8px; font-size: 14px; }
.creative-detail-scroll { overflow: auto; border: 1px solid #dce7ee; border-radius: 7px; }
.creative-detail-scroll table { font-size: 12px; }
.creative-detail-scroll th { background: #e7eff5; }
.creative-detail-scroll td { background: #fff; }
.creative-detail-scroll tbody tr:last-child td { border-bottom: 0; }
.creative-detail-scroll .creative-detail-spend { color: #0a658f; }
.creative-detail-campaign { min-width: 210px; max-width: 475px; white-space: normal; overflow-wrap: anywhere; }

.creative-footer {
  justify-content: space-between;
  padding: 8px 14px;
}

.creatives .creative-empty { margin: 0; padding: 40px 14px; text-align: center; }

@media (max-width: 1050px) {
  .creative-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .creative-cards .stats-card { grid-column: auto; }
}

@media (max-width: 660px) {
  .creative-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creatives .stats-date { margin-inline-start: auto; }
  .creative-controls .stats-table-actions { width: 100%; }
  .creative-columns { margin-inline-start: auto; }
  .creative-name { min-width: 140px; max-width: 170px; }
  .creative-scroll :is(.creative-row > td:first-child, thead th:first-child) {
    position: static;
    box-shadow: none;
  }
}
