/* ========================================
   RewardHub Admin — Phase 2
   ======================================== */

:root {
  --admin-sidebar: #0f172a;
  --admin-sidebar-hover: #1e293b;
  --admin-accent: #14b8a6;
  --admin-accent-soft: rgba(20, 184, 166, 0.15);
  --admin-bg: #f1f5f9;
  --admin-card: #ffffff;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  --admin-border: #e2e8f0;
  --admin-danger: #e11d48;
  --admin-success: #059669;
  --admin-warn: #d97706;
  --admin-radius: 12px;
  --admin-sidebar-w: 240px;
  --admin-font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.admin-body {
  margin: 0;
  font-family: var(--admin-font);
  background: var(--admin-bg);
  color: var(--admin-text);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.admin-shell {
  display: grid;
  grid-template-columns: var(--admin-sidebar-w) 1fr;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.admin-sidebar {
  background: var(--admin-sidebar);
  color: #e2e8f0;
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.75rem 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.75rem;
}

.admin-brand__sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: #94a3b8;
  margin-top: 0.1rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.admin-nav__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.15s, color 0.15s;
}

.admin-nav__link:hover {
  background: var(--admin-sidebar-hover);
  color: #fff;
}

.admin-nav__link.is-active {
  background: var(--admin-accent-soft);
  color: #5eead4;
}

.admin-nav__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.admin-nav__link--external {
  color: #94a3b8;
  font-size: 0.85rem;
}

.admin-nav__group {
  margin: 1rem 0.85rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.admin-page-desc {
  margin: 0 0 1rem;
  color: var(--admin-muted);
  font-size: 0.9rem;
}

.admin-list-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-list-bar input,
.admin-list-bar select {
  min-width: 10rem;
}

.admin-pager {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  color: var(--admin-muted);
  font-size: 0.85rem;
}

.stat-card--link {
  display: block;
  color: inherit;
}

.stat-card--link:hover {
  outline: 1px solid var(--admin-accent);
}

.cell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  white-space: nowrap;
}

.admin-more {
  display: inline-block;
}
.admin-more summary {
  cursor: pointer;
  font-size: 0.8rem;
}

.admin-pre {
  overflow: auto;
  max-height: 20rem;
  font-size: 0.8rem;
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 8px;
}

.cc-section {
  margin-bottom: 1.5rem;
}

.cc-section h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

/* ---- Main ---- */
.admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: var(--admin-card);
  border-bottom: 1px solid var(--admin-border);
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.admin-topbar__meta {
  color: var(--admin-muted);
  font-size: 0.85rem;
}

.admin-content {
  padding: 1.5rem 1.75rem 2.5rem;
}

/* ---- Cards / stats ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 1.15rem 1.25rem;
}

.stat-card__label {
  font-size: 0.8rem;
  color: var(--admin-muted);
  margin-bottom: 0.35rem;
}

.stat-card__value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.panel {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.panel__head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel__head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.panel__body {
  padding: 0;
}

.panel__body--pad {
  padding: 1.25rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.25rem;
}

/* ---- Table ---- */
.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--admin-border);
  vertical-align: middle;
}

.admin-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-muted);
  font-weight: 700;
  background: #f8fafc;
  white-space: nowrap;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: #f8fafc;
}

.cell-task {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 200px;
}

.cell-task img {
  width: 52px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
  background: #e2e8f0;
}

.cell-task strong {
  display: block;
  font-size: 0.92rem;
}

.cell-task span {
  font-size: 0.78rem;
  color: var(--admin-muted);
}

.cell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  white-space: nowrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.15s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: #0d9488;
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  background: #0f766e;
}

.btn--ghost {
  background: #fff;
  border: 1px solid var(--admin-border);
  color: var(--admin-text);
}

.btn--ghost:hover:not(:disabled) {
  background: #f8fafc;
}

.btn--danger {
  background: #fff1f2;
  color: var(--admin-danger);
  border: 1px solid #fecdd3;
}

.btn--danger:hover:not(:disabled) {
  background: #ffe4e6;
}

.btn--sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  border-radius: 7px;
}

.btn--block {
  width: 100%;
}

/* ---- Badges / filters ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge--active {
  background: #d1fae5;
  color: #047857;
}

.badge--disabled {
  background: #f1f5f9;
  color: #64748b;
}

.badge--inactive {
  background: #f1f5f9;
  color: #475569;
}

.badge--archived {
  background: #e2e8f0;
  color: #334155;
}

.badge--platform {
  background: #ecfeff;
  color: #0e7490;
}

.badge--pending {
  background: #fef3c7;
  color: #b45309;
}

.badge--revoked {
  background: #fee2e2;
  color: #b91c1c;
}

.badge--risk-low {
  background: #d1fae5;
  color: #047857;
}

.badge--risk-med {
  background: #ffedd5;
  color: #c2410c;
}

.badge--risk-high {
  background: #fee2e2;
  color: #b91c1c;
}

.badge--flag {
  background: #e2e8f0;
  color: #334155;
  margin-right: 0.25rem;
}

.btn--danger {
  background: #be123c;
  color: #fff;
  border: none;
}

.btn--danger:hover {
  background: #9f1239;
}

.btn--sm {
  padding: 0.3rem 0.55rem;
  font-size: 0.75rem;
}

.modal[hidden] {
  display: none !important;
}

.modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: min(100% - 2rem, 520px);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
  z-index: 1;
}

.modal__dialog--wide {
  width: min(100% - 2rem, 720px);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--admin-border);
}

.modal__head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.modal__close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal__body {
  padding: 1.25rem;
}

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--admin-border);
}

.review-detail h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.95rem;
}

.review-proof {
  margin: 0;
  padding-left: 1.1rem;
}

.review-feedback {
  background: #f8fafc;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 0.75rem;
  white-space: pre-wrap;
}

.review-history {
  margin: 0;
  padding-left: 1.1rem;
}

.review-history li {
  margin-bottom: 0.45rem;
}

.table-actions {
  white-space: nowrap;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.filter-btn {
  border: 1px solid var(--admin-border);
  background: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--admin-muted);
}

.filter-btn.is-active,
.filter-btn:hover {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* ---- Forms ---- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.form-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--admin-muted);
  margin-bottom: 0.35rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  background: #fff;
  color: var(--admin-text);
}

.form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid rgba(13, 148, 136, 0.25);
  border-color: #0d9488;
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-border);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--admin-muted);
  margin-top: 0.35rem;
}

.rh-app-admin-form {
  display: grid;
  gap: 0.85rem;
  max-width: 36rem;
}

.rh-app-admin-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  background: #fff;
  font-weight: 600;
}

.rh-app-admin-check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #0d9488;
}

.rh-app-admin-warn {
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 9px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

/* ---- Activity / lists ---- */
.activity-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--admin-border);
  font-size: 0.9rem;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item__meta {
  font-size: 0.78rem;
  color: var(--admin-muted);
  margin-top: 0.15rem;
}

.activity-item__pts {
  font-weight: 800;
  white-space: nowrap;
}

.activity-item__pts--pos {
  color: var(--admin-success);
}

.activity-item__pts--neg {
  color: var(--admin-danger);
}

.empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--admin-muted);
}

.user-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: box-shadow 0.15s;
  margin-bottom: 1rem;
}

.user-card:hover,
.user-card.is-open {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.user-card__top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #0f172a);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.user-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.user-stats div {
  background: #f8fafc;
  border-radius: 9px;
  padding: 0.75rem;
}

.user-stats strong {
  display: block;
  font-size: 1.1rem;
}

.user-stats span {
  font-size: 0.72rem;
  color: var(--admin-muted);
}

.user-detail {
  display: none;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-border);
}

.user-card.is-open .user-detail {
  display: block;
}

.user-detail h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.detail-block + .detail-block {
  margin-top: 1.25rem;
}

.thumb-sm {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
}

.rh-admin-image-field {
  position: relative;
}
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--admin-muted);
  margin-bottom: 0.45rem;
}

.rh-admin-image-field__drop {
  border: 1px dashed var(--admin-border);
  border-radius: var(--admin-radius);
  background: #f8fafc;
  padding: 0.85rem;
  margin-bottom: 0.85rem;
}

.rh-admin-image-field__drop.is-drag {
  border-color: #0d9488;
  background: #ecfeff;
}

.rh-admin-image-field__preview {
  width: 100%;
  max-width: 280px;
  height: 160px;
  display: grid;
  place-items: center;
  background: #eef2f6;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.rh-admin-image-field__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.rh-admin-image-field__placeholder {
  color: var(--admin-muted);
  font-size: 0.88rem;
}

.rh-admin-image-field__file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rh-admin-image-field__status {
  min-height: 1.2em;
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
}

.rh-admin-image-field__status--ok {
  color: var(--admin-success);
}

.rh-admin-image-field__status--error {
  color: var(--admin-danger);
}

.rh-admin-image-field__status--muted {
  color: var(--admin-muted);
}

/* Reuse front toast/modal classes if admin.css loaded alone */
.toast-host {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.25s;
  font-weight: 600;
  font-size: 0.9rem;
  max-width: 320px;
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

.toast--success {
  background: #047857;
}

.toast--error {
  background: #be123c;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 1rem;
}

.modal-overlay.is-open {
  opacity: 1;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  width: min(100%, 420px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}

.modal__title {
  margin: 0 0 0.5rem;
}

.modal__body {
  color: var(--admin-muted);
  margin: 0 0 1.25rem;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

@media (max-width: 1100px) {
  .stat-grid,
  .dashboard-grid,
  .user-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
    overflow-x: auto;
  }

  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-table-wrap {
    overflow-x: auto;
  }

  .cell-actions {
    white-space: nowrap;
  }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.creative-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 1rem;
}
.creative-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.creative-kpi-row--platforms {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.creative-stat {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  min-width: 0;
}
.creative-stat span {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
}
.creative-stat strong {
  font-size: 1.05rem;
}
.creative-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.creative-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}
.creative-card .platform-chip,
.creative-card .platform-chip--static,
#creativePoolList .platform-chip {
  position: static;
}
.creative-card__thumb,
.creative-row__media {
  position: relative;
  width: 100%;
  height: 180px;
  max-height: 180px;
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  overflow: hidden;
  flex: 0 0 180px;
}
.creative-card__thumb img,
.creative-card__thumb .creative-card__img,
.creative-card__thumb svg,
.creative-card__thumb iframe,
.creative-card__thumb video,
.creative-card__thumb .instagram-media,
.creative-row__media img,
.creative-row__media svg,
.creative-row__media iframe,
.creative-row__media video {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain;
  display: block;
}
.creative-card__thumb iframe,
.creative-card__thumb video,
.creative-card__thumb .instagram-media,
.creative-card__thumb blockquote,
.creative-row__media iframe,
.creative-row__media video,
.creative-row__media .instagram-media,
.creative-row__media blockquote,
#creativePoolList iframe,
#creativePoolList video,
#creativePoolList blockquote.instagram-media,
#creativePoolList .instagram-media,
#creativePoolList .fb-video,
#creativePoolList .tiktok-embed {
  display: none !important;
}
.creative-card__ph {
  width: 100%;
  height: 100%;
  max-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  background: #e2e8f0;
}
.creative-card__ph-icon {
  width: 40px;
  height: 40px;
  max-width: 48px;
  max-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
}
.creative-card__ph-icon svg {
  width: 40px !important;
  height: 40px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  fill: currentColor;
}
.creative-card__ph-ver {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
}
.creative-card__body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.creative-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.creative-card__title {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.creative-card__brand {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
}
.creative-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.creative-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px 0 0;
  flex-wrap: wrap;
}
.creative-pager__btns {
  display: flex;
  gap: 8px;
}
.creative-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  margin-bottom: 0.75rem;
}
#cpSearch {
  min-width: 220px;
  flex: 1;
}
@media (max-width: 1279px) {
  .creative-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 899px) {
  .creative-grid {
    grid-template-columns: 1fr;
  }
  .creative-kpi-row,
  .creative-kpi-row--platforms {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1280px) {
  .creative-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.creative-import-result {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
}
.creative-card__pick {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 22px;
  height: 22px;
  margin: 0;
  background: rgba(255,255,255,0.92);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.creative-card.is-selected {
  outline: 2px solid #2563eb;
}
.creative-card__desc {
  margin: 0;
  font-size: 0.78rem;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.creative-bulk-bar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: #0f172a;
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0;
}
.creative-bulk-bar[hidden] {
  display: none;
}
.creative-bulk-bar .btn {
  background: #fff;
}
