.ads-dashboard {
  display: grid;
  gap: 18px;
}

.ads-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(18px);
}

.ads-kicker {
  display: block;
  margin-bottom: 8px;
  color: #17484d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ads-hero h2 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 26px;
}

.ads-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.ads-status,
.ads-mini-status {
  border: 1px solid rgba(23,72,77,0.2);
  border-radius: 8px;
  color: #17484d;
  font-size: 13px;
  font-weight: 800;
  background: rgba(23,72,77,0.08);
}

.ads-status {
  min-width: 150px;
  padding: 10px 12px;
  text-align: center;
}

.ads-mini-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  white-space: nowrap;
}

.ads-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ads-card {
  border-left: 3px solid #17484d;
}

.ads-card .card-compare {
  min-height: 20px;
}

.ads-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ads-section,
.ads-split-card {
  overflow: hidden;
}

.ads-table-wrap {
  overflow-x: auto;
}

.ads-mini-table,
.ads-top-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ads-mini-table {
  min-width: 460px;
}

.ads-top-table {
  min-width: 900px;
}

.ads-mini-table th,
.ads-top-table th,
.ads-mini-table td,
.ads-top-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  color: var(--text-secondary);
  text-align: left;
  vertical-align: top;
}

.ads-mini-table th,
.ads-top-table th {
  color: var(--text);
  background: #f3f6f7;
  font-size: 12px;
  font-weight: 900;
}

.ads-mini-table tbody tr:hover,
.ads-top-table tbody tr:hover,
.gmv-truth-table tbody tr:hover {
  background: rgba(23,72,77,0.04);
}

.ads-top-table .campaign-name {
  max-width: 300px;
  color: var(--text);
  font-size: 12px;
}

.ads-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.ads-type-badge.product {
  color: #17484d;
  background: rgba(23,72,77,0.10);
}

.ads-type-badge.live {
  color: #047857;
  background: rgba(16,185,129,0.12);
}

.ads-mini-table .share-pct {
  display: inline-block;
  margin-left: 6px;
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--text-secondary);
  background: rgba(60,75,100,0.08);
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}

.roas-good {
  color: #047857;
  font-weight: 800;
}

.roas-mid {
  color: #9a5b00;
  font-weight: 800;
}

.roas-bad {
  color: #b42318;
  font-weight: 800;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: 1px;
  background: #94a3b8;
}

.status-dot.status-enable {
  background: #10b981;
  box-shadow: 0 0 4px rgba(16,185,129,0.5);
}

.status-dot.status-disable {
  background: #94a3b8;
}

.ads-alerts {
  display: grid;
  gap: 8px;
}

.ads-alert,
.ads-empty-inline {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.ads-alert {
  border-left: 3px solid #f59e0b;
}

.ads-alert-warn,
.ads-empty-inline.is-error {
  color: #9a3412;
  background: #fff7ed;
  border-color: rgba(245,158,11,0.5);
}

.ads-alert-ok {
  color: #047857;
  background: #ecfdf5;
  border-color: rgba(16,185,129,0.5);
}

.ads-empty-inline {
  border: 1px solid rgba(148,163,184,0.28);
  color: var(--text-secondary);
  background: rgba(248,250,252,0.82);
}

.gmv-truth-table {
  min-width: 980px;
}

.gmv-truth-table td:first-child b,
.gmv-truth-table td:first-child small,
.gmv-truth-table td:last-child small {
  display: block;
}

.gmv-truth-table td:first-child small,
.gmv-truth-table td:last-child small {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 11px;
}

.gmv-truth-detail div {
  gap: 8px 14px;
}

.sku-inventory-tight,
.cogs-freshness-warning {
  color: #b42318;
  font-weight: 800;
}

.ads-notes {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

.ads-notes li::marker {
  color: #17484d;
}

@media (max-width: 1100px) {
  .ads-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ads-split-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ads-hero {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .ads-hero h2 {
    font-size: 22px;
  }

  .ads-status {
    width: 100%;
  }

  .ads-kpi-grid {
    grid-template-columns: 1fr;
  }

  .ads-top-table .campaign-name {
    max-width: 160px;
  }

  .phase-ad-card-head {
    grid-template-columns: 32px 1fr 20px;
  }

  .phase-ad-kpi {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .phase-kpi {
    align-items: flex-start;
  }
}
