/* Dashboard — advertiser / publisher views */

.dashboard-page {
  padding: 48px 0 90px;
  min-height: calc(100vh - var(--header-h));
  background: var(--bg-muted);
}

.dashboard-container {
  max-width: 880px;
}

.dashboard-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 0;
}

.dashboard-banner {
  margin: 0 0 24px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
}

.dashboard-banner--success {
  background: var(--green-light);
  color: var(--green-dark);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.dashboard-view[hidden] {
  display: none;
}

.dashboard-title {
  margin: 0 0 20px;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dashboard-section-title {
  margin: 36px 0 16px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 36px 0 16px;
}

.dashboard-section-title--inline {
  margin: 0;
}

/* Cards (My site / Pending approvals) */
.dashboard-card {
  margin-top: 24px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.dashboard-card__title {
  margin: 0 0 16px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}

.dashboard-earn-card {
  margin-top: 24px;
}

.dashboard-earn-card__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple-dark);
}

.dashboard-earn-card__stat {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--purple-dark);
}

.dashboard-earn-card__detail {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.referral-center__title {
  margin-bottom: 12px;
}

.referral-center__lead {
  margin: 0 0 20px;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 40rem;
}

.referral-center__highlight {
  margin: 0 0 20px;
  padding: 24px 20px;
  border-radius: var(--radius-xl, 16px);
  border: 2px solid var(--purple);
  background: #fff;
  text-align: center;
  max-width: 28rem;
}

.referral-center__highlight .hiw-referral-highlight__stat,
.referral-center__highlight p:first-child {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--purple-dark);
}

.hiw-referral-highlight__label {
  margin: 6px 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.hiw-referral-highlight__detail {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.hiw-referral-highlight__clarify {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}

.referral-center__follow {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  max-width: 40rem;
}

.referral-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.referral-link-input {
  flex: 1 1 12rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.referral-center__copied {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-dark, #047857);
}

.referral-center__count {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.referral-center__learn {
  margin: 16px 0 0;
  font-size: 14px;
}

.referral-center__learn a {
  font-weight: 600;
  color: var(--purple-dark);
}

.referral-center__payout-note {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 40rem;
}

.referral-center-page.dashboard-container {
  max-width: var(--container);
}

.referral-center-page .referral-center__link-card,
.referral-center-page .referral-payouts,
.referral-center-page .referral-empty {
  max-width: 42rem;
}

.referral-payouts {
  margin: 28px 0 0;
}

.referral-payouts__status {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.referral-payouts .install-guide__intro {
  margin: 0 0 8px;
}

/* `.btn { display: inline-flex }` otherwise wins over the HTML hidden attribute. */
.referral-payouts .btn[hidden],
.referral-payouts__status[hidden] {
  display: none !important;
}

.referral-payouts__note {
  margin: 10px 0 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 40rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.referral-summary {
  margin: 28px 0 0;
}

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

.referral-summary__card {
  margin: 0;
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.referral-summary__label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.referral-summary__value {
  margin: 8px 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.referral-summary__hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted);
}

.referral-empty {
  margin: 28px 0 0;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.referral-empty__title {
  margin: 8px 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
}

.referral-empty__copy {
  margin: 0 0 16px;
  max-width: 36rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.referral-websites,
.referral-history {
  margin: 32px 0 0;
}

.referral-websites-table-wrap,
.referral-history-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Beat later `.dashboard-table th, td { white-space: nowrap }` so 7-column
   ledgers wrap inside the rounded card instead of painting outside it. */
.dashboard-table.referral-websites-table,
.dashboard-table.referral-history-table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
}

.dashboard-table.referral-websites-table th,
.dashboard-table.referral-websites-table td,
.dashboard-table.referral-history-table th,
.dashboard-table.referral-history-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
  padding: 12px 14px;
}

.dashboard-table.referral-websites-table th:first-child,
.dashboard-table.referral-websites-table td:first-child,
.dashboard-table.referral-history-table th:first-child,
.dashboard-table.referral-history-table td:first-child {
  min-width: 8rem;
}

.dashboard-table.referral-websites-table th:nth-child(n + 6),
.dashboard-table.referral-websites-table td:nth-child(n + 6),
.dashboard-table.referral-history-table th:nth-child(3),
.dashboard-table.referral-history-table td:nth-child(3) {
  white-space: nowrap;
  overflow-wrap: normal;
}

.referral-website-cards,
.referral-history-cards {
  display: none;
}

.referral-site-card,
.referral-history-card {
  margin: 0 0 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.referral-site-card__domain {
  margin: 0 0 12px;
  font-size: 1.0625rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.referral-site-card__rows {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
}

.referral-site-card__rows dt {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.referral-site-card__rows dd {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.referral-history__empty {
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .referral-summary__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .referral-websites-table-wrap,
  .referral-history-table-wrap {
    display: none;
  }

  .referral-website-cards,
  .referral-history-cards {
    display: block;
  }
}

@media (max-width: 390px) {
  .referral-summary__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .header__inner {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .header__actions {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
  }

  .referral-link-row {
    flex-direction: column;
  }

  .referral-link-input {
    width: 100%;
  }

  .referral-link-row .btn {
    width: 100%;
  }

  .referral-center__highlight {
    max-width: none;
  }
}

.dashboard-site-info {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0;
}

.dashboard-site-info dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-site-info dd {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

.dashboard-site-info--plain dd {
  font-family: var(--font);
  word-break: normal;
}

.dashboard-site-info__value--empty {
  color: var(--text-light);
  font-style: italic;
}

/* My site info (audience details) */
.site-info__hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.site-info-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.site-info-form__textarea {
  resize: vertical;
  min-height: 72px;
  font-family: var(--font);
}

.site-info-form__counter {
  margin: -4px 0 0;
  font-size: 12px;
  color: var(--text-light);
  text-align: right;
}

.site-info-form__actions {
  display: flex;
  gap: 10px;
}

/* Marketplace Preview (cover image) */

.cover-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 16 / 10;
  margin-bottom: 16px;
  overflow: hidden;
  background: var(--brand-gradient-soft);
  border-radius: var(--radius-md);
}

.cover-preview__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.cover-preview__placeholder {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.cover-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cover-actions__upload {
  cursor: pointer;
}

.badge-soon {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: var(--bg-muted);
  border-radius: 999px;
}

.dashboard-snippet__code {
  display: block;
  padding: 10px 14px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text);
  word-break: break-all;
  white-space: pre-wrap;
}

/* Install guide (Step 1: install the script) */
.install-guide {
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.install-guide__title {
  margin: 0 0 4px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}

.install-guide__intro {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Three big help-option cards (developer / AI agent / myself) */
.help-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.help-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 22px 14px;
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-family: var(--font);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.help-card:hover {
  border-color: var(--purple);
  transform: translateY(-1px);
}

.help-card--active {
  background: var(--brand-gradient-soft);
  border-color: var(--purple);
}

.help-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.help-card__icon svg {
  width: 100%;
  height: 100%;
}

.help-card__title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.help-card__desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.install-guide__self {
  margin-top: 4px;
  margin-bottom: 20px;
  padding: 18px;
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
}

.install-guide__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.install-guide__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.install-guide__tab:hover {
  border-color: var(--purple);
  color: var(--text);
}

.install-guide__tab--active,
.install-guide__tab--active:hover {
  background: var(--purple-tint);
  border-color: var(--purple);
  color: var(--purple-dark);
}

.install-guide__tab-icon {
  flex-shrink: 0;
}

.install-guide__tab-icon--wp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.install-guide__steps {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
}

.install-guide__steps--text {
  padding-left: 0;
  list-style: none;
}

.install-guide__steps code {
  padding: 1px 6px;
  background: var(--bg-muted);
  border-radius: 4px;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.install-guide__wp-plugin-btn {
  margin-bottom: 4px;
}

.install-guide__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Big connection-status block below the help cards */
.connection-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}

.connection-status__icon {
  font-size: 22px;
  line-height: 1;
}

.connection-status--pending {
  color: var(--text-muted);
  background: var(--bg-muted);
}

.connection-status--connected {
  color: var(--green-dark);
  background: var(--green-light);
}

/* Revealed once the script is detected — leads into the visual picker */
.next-step[hidden] {
  display: none;
}

.next-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 18px 20px;
  background: var(--brand-gradient-soft);
  border-radius: var(--radius-lg);
}

.next-step__text {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

/* AI-agent prompt modal */
.ai-prompt__text {
  margin: 0 0 14px;
  padding: 14px 16px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 640px) {
  .help-cards {
    grid-template-columns: 1fr;
  }

  .next-step {
    flex-direction: column;
    align-items: stretch;
  }

  .next-step .btn {
    width: 100%;
  }
}

/* Payouts */
.dashboard-payouts {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dashboard-payouts__cta {
  padding: 8px 18px;
  font-size: 13px;
}

.dashboard-payouts__hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 13px;
  color: var(--text-muted, #64748b);
}

/* Pending approvals */
.dashboard-approvals {
  display: grid;
  gap: 12px;
}

.approval-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
}

.approval-item__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.approval-item__site {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.approval-item__meta {
  font-size: 13px;
  color: var(--text-muted);
}

.approval-item__warn {
  font-size: 12px;
  color: #b45309;
}

.approval-item__creative {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.03);
}

.approval-item__creative-thumb {
  width: 120px;
  height: 80px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--border);
}

.approval-item__actions {
  display: flex;
  gap: 8px;
}

.approval-item__actions .btn {
  padding: 8px 16px;
  font-size: 13px;
}

/* Offer cards carry a lot more content (image, tags, description) than a
   plain approval row, so they stack instead of sitting side-by-side. */
.approval-item--offer {
  flex-direction: column;
  align-items: stretch;
}

.approval-item--offer .approval-item__actions {
  justify-content: flex-end;
}

.offer-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.offer-details__image {
  width: 100%;
  max-width: 220px;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.offer-details__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.offer-details__tag {
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.offer-details__tag--link {
  color: var(--purple);
  border-color: var(--purple);
}

.offer-details__description {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
}

.offer-details__note {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* Tables */
.dashboard-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.dashboard-table th,
.dashboard-table td {
  text-align: left;
  padding: 14px 20px;
  white-space: nowrap;
}

.dashboard-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.dashboard-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--border);
}

.dashboard-table td {
  color: var(--text);
}

.dashboard-table__link {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
}

.dashboard-table__link:hover {
  text-decoration: underline;
}

.dashboard-cell--code {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--text-muted);
}

.dashboard-empty {
  margin: 16px 0 0;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--bg-muted);
  color: var(--text-muted);
}

.status-pill--live,
.status-pill--payout_released,
.status-pill--completed {
  background: var(--green-light);
  color: var(--green-dark);
}

.status-pill--pending_approval,
.status-pill--created,
.status-pill--paid_escrow,
.status-pill--pending,
.status-pill--held,
.status-pill--awaiting_publisher_approval,
.status-pill--awaiting_payment {
  background: #fef3c7;
  color: #b45309;
}

.status-pill--rejected,
.status-pill--disputed,
.status-pill--refunded,
.status-pill--expired,
.status-pill--cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

/* Slot statuses (separate enum from deal statuses, reuses the same
   .status-pill base) */
.status-pill--active {
  background: var(--green-light);
  color: var(--green-dark);
}

.status-pill--draft {
  background: var(--bg-muted);
  color: var(--text-muted);
}

.status-pill--booked {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-pill--paused {
  background: #fef3c7;
  color: #b45309;
}

/* Booking creative aggregate + version statuses */
.status-pill--in_review,
.status-pill--pending_review,
.status-pill--changes_requested {
  background: #fef3c7;
  color: #b45309;
}

.status-pill--approved {
  background: var(--green-light);
  color: var(--green-dark);
}

.status-pill--withdrawn,
.status-pill--superseded,
.status-pill--archived {
  background: var(--bg-muted);
  color: var(--text-muted);
}

.status-pill--paid,
.status-pill--payment_verification_pending {
  background: #dbeafe;
  color: #1d4ed8;
}

.dashboard-card__hint {
  margin: -4px 0 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.dashboard-table__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.booking-creatives-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.booking-creatives-summary__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.approval-item--creative {
  align-items: flex-start;
  flex-direction: column;
}

.creative-review__preview {
  margin-top: 10px;
  max-width: 280px;
  max-height: 180px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}

.creative-review__url {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--purple);
  word-break: break-all;
}

.creative-review__note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  white-space: pre-wrap;
}

.creative-review__history {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle, #f8f7fc);
}

.creative-review__history-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.creative-review__comment {
  width: 100%;
  margin-top: 10px;
  min-height: 72px;
  resize: vertical;
}

.creative-review__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}

.creative-body-input {
  resize: vertical;
  min-height: 72px;
}

.form-field__hint {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.creative-editor__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.creative-preview {
  margin: 4px 0 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
}

.creative-preview__label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.creative-preview__img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
}

.creative-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.creative-section-title {
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.creative-publisher-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13.5px;
  white-space: pre-wrap;
}

.creative-list {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.creative-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
}

.creative-list__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.creative-list__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.creative-versions-list,
.creative-events-list {
  display: grid;
  gap: 8px;
}

.creative-version-row,
.creative-event-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 13px;
}

.creative-version-row__main,
.creative-event-row__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.creative-version-row__title {
  font-weight: 600;
  color: var(--text);
}

.creative-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  background: var(--green-light);
  color: var(--green-dark);
}

.creative-event-row__comment {
  margin: 4px 0 0;
  color: var(--text);
  white-space: pre-wrap;
}

.approval-item--booking {
  align-items: flex-start;
}

.approval-item__status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.approval-item__countdown {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--purple-dark);
}

.approval-item__countdown--expired {
  color: #b91c1c;
}

.approval-item__link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--purple-dark);
  word-break: break-all;
}

.approval-item__actions--stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 180px;
}

.booking-reject {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.booking-reject__select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--text);
}

.modal--wide {
  max-width: 640px;
}

.pricing-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.pricing-discounts {
  margin-bottom: 18px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.pricing-discounts__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 4px;
}

.pricing-discounts__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.pricing-discounts__hint {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.pricing-discount-list {
  display: grid;
  gap: 8px;
}

.pricing-discount-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.pricing-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-field__optional {
  font-weight: 400;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .pricing-form-grid,
  .pricing-discount-row {
    grid-template-columns: 1fr;
  }
}

/* This page has no hamburger nav, so keep Log out visible at every width. */
@media (max-width: 900px) {
  .header__actions {
    display: flex;
  }
}

.approval-item--highlight,
tr.dashboard-booking-row.approval-item--highlight {
  outline: 2px solid #c2410c;
  outline-offset: 2px;
  background: #fff7ed;
}

@keyframes nc-highlight-pulse {
  from { background-color: #ffedd5; }
  to { background-color: transparent; }
}

.approval-item--highlight {
  animation: nc-highlight-pulse 1.6s ease-out 1;
}

@media (max-width: 640px) {
  .dashboard-page {
    padding: 32px 0 56px;
  }

  .approval-item {
    flex-direction: column;
    align-items: stretch;
  }

  .approval-item__actions {
    justify-content: stretch;
  }

  .approval-item__actions .btn {
    flex: 1;
  }

  .dashboard-table__actions {
    justify-content: stretch;
  }

  .dashboard-table__actions .btn {
    flex: 1;
  }

  .creative-review__actions .btn,
  .creative-form-actions .btn {
    flex: 1;
  }
}
