/**
 * Client dashboard (account/index2.php) — styles for the v2 shell + legacy order table HTML.
 */

/* ===== Border radius (anchored to orders table / .cd-section-card) =====
 * --r-lg     Primary surfaces: section cards, KPIs, modals, alerts, lightbox
 * --r-md     Nested panels, menus, buttons, field blocks, media tiles
 * --r-sm     Menu rows, compact icon controls, file-type badges
 * --r-pill   Pills and status bars; 50% for avatars / play buttons
 */

/* ===== New design notice banner ===== */
.cd-design-banner {
  background: linear-gradient(90deg, var(--brand-700) 0%, var(--brand-600) 55%, var(--brand-500) 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  animation: bp-fade-in 220ms var(--ease-out) both;
}
.cd-design-banner.is-closing {
  animation: cd-banner-out 200ms var(--ease-out) forwards;
  overflow: hidden;
}
@keyframes cd-banner-out {
  from { opacity: 1; max-height: 80px; }
  to { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
}
.cd-design-banner-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cd-design-banner-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cd-design-banner-text {
  flex: 1;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}
.cd-design-banner-text strong {
  font-weight: 600;
  color: #fff;
}
.cd-design-banner-text a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 4px;
  white-space: nowrap;
}
.cd-design-banner-text a:hover {
  color: rgba(255, 255, 255, 0.9);
}
.cd-design-banner-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.cd-design-banner-close:hover {
  background: rgba(255, 255, 255, 0.22);
}
.cd-design-banner-close svg {
  width: 16px;
  height: 16px;
}
@media (max-width: 767px) {
  .cd-design-banner-inner {
    padding: 10px 16px;
    align-items: flex-start;
  }
  .cd-design-banner-text a {
    display: inline-block;
    margin-left: 0;
    margin-top: 4px;
  }
}

/* ===== Layout helpers ===== */
.cd-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  position: relative;
  z-index: 5;
}
.cd-page-header h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ink-900);
}
.cd-page-header p {
  margin: 0;
  color: var(--ink-500);
  font-size: 14px;
  max-width: 520px;
}
.cd-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.cd-templates-dropdown {
  position: relative;
  z-index: 10;
}
.cd-templates-dropdown .dropdown-menu {
  z-index: 100;
  margin-top: 4px;
  padding: 6px;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  min-width: 15rem;
  max-height: 360px;
  overflow-y: auto;
}
.cd-templates-dropdown .dropdown-item {
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  padding: 8px 12px;
}
.cd-templates-dropdown .dropdown-item:hover,
.cd-templates-dropdown .dropdown-item:focus {
  background: var(--ink-50);
  color: var(--ink-900);
}
.cd-templates-dropdown .dropdown-divider {
  margin: 4px 0;
  border-color: var(--ink-100);
}
.cd-templates-dropdown .cd-templates-see-all {
  font-weight: 600;
  color: var(--brand-600);
}
.cd-templates-dropdown .cd-templates-see-all:hover,
.cd-templates-dropdown .cd-templates-see-all:focus {
  color: var(--brand-700);
  background: var(--brand-50);
}
.cd-page-header .btn,
.cd-section-card .btn,
.cd-bootstrap-modal .btn,
.cd-order-detail .btn {
  border-radius: var(--r-md);
}

/* VAT alert */
.cd-vat-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--r-lg);
  font-size: 14px;
  color: var(--ink-700);
}
.cd-vat-alert img { width: 32px; height: auto; flex-shrink: 0; }
.cd-vat-alert.is-hidden { display: none !important; }

/* Section cards */
.cd-section-card {
  background: var(--surface);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.cd-section-card .cd-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--ink-100);
}
.cd-section-card .cd-section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.cd-section-card .cd-section-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-500);
}
.cd-section-head-with-action {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

/* Section cards — no hover lift (KPI + guide link cards keep their own) */
.cd-section-card.bp-lift {
  transition: none;
}
@media (hover: hover) and (pointer: fine) {
  .cd-section-card.bp-lift:hover {
    box-shadow: var(--shadow-sm);
    transform: none;
  }
}

/* Help guide sections */
.cd-guides-row {
  margin-top: 24px;
}
.cd-guides-row > .section {
  margin-top: 0;
}
.cd-help-section-card {
  height: 100%;
}
.cd-help-section--writing .cd-section-head {
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--surface) 100%);
}
.cd-help-section--ranking .cd-section-head {
  background: linear-gradient(180deg, var(--green-50) 0%, var(--surface) 100%);
}
.cd-help-section-intro {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.cd-help-section-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  font-size: 16px;
}
.cd-help-section--writing .cd-help-section-icon {
  background: var(--surface);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
  box-shadow: var(--shadow-sm);
}
.cd-help-section--ranking .cd-help-section-icon {
  background: var(--surface);
  color: var(--green-700, #15803d);
  border: 1px solid rgba(22, 163, 74, 0.18);
  box-shadow: var(--shadow-sm);
}
.cd-help-section-more {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 6px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--ink-100);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
  text-decoration: none;
  transition:
    background-color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    color var(--dur-fast) ease;
}
.cd-help-section-more:hover,
.cd-help-section-more:focus {
  background: var(--surface-2);
  border-color: var(--ink-200);
  color: var(--ink-900);
  text-decoration: none;
}
.cd-help-section-more .fa-arrow-right {
  font-size: 10px;
  opacity: 0.8;
}
.cd-help-section--strip {
  --cd-help-bleed: 32px;
}
@media (max-width: 767px) {
  .cd-help-section--strip {
    --cd-help-bleed: 16px;
  }
}
.cd-help-section--strip .cd-help-section-icon {
  background: var(--surface);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
  box-shadow: var(--shadow-sm);
}
.cd-help-strip-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.cd-help-strip-header-with-action {
  flex-wrap: wrap;
}
.cd-help-strip-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.cd-help-strip-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.45;
  max-width: 560px;
}
.cd-help-strip-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}
.cd-help-card-bleed {
  position: relative;
  width: calc(100% + var(--cd-help-bleed));
  margin-right: calc(-1 * var(--cd-help-bleed));
}
.cd-help-guide-body {
  padding: 24px 0 24px 24px;
  background: var(--surface-2);
  border-top: 1px solid var(--ink-100);
}
.cd-help-card-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  padding: 4px 0 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cd-help-card-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.cd-help-card-fade {
  position: absolute;
  top: 4px;
  right: 0;
  bottom: 10px;
  width: min(112px, 20vw);
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(246, 247, 251, 0) 0%,
    var(--bg) 58%,
    var(--bg) 100%
  );
  z-index: 2;
  opacity: 1;
  transition: opacity 220ms var(--ease-out);
}
.cd-help-card-bleed.is-at-end .cd-help-card-fade {
  opacity: 0;
}
.cd-help-card-track {
  display: flex;
  gap: 14px;
  width: max-content;
  padding-right: calc(var(--cd-help-bleed) + 40px);
}
.cd-help-card-track .cd-help-card {
  flex: 0 0 auto;
  width: min(300px, 78vw);
  min-height: 176px;
  scroll-snap-align: start;
}
.cd-help-scroll-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding-left: 2px;
  min-height: 8px;
}
.cd-help-scroll-dots[hidden] {
  display: none !important;
}
.cd-help-scroll-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: var(--r-pill);
  background: var(--ink-200);
  cursor: pointer;
  transition:
    background-color var(--dur-fast) ease,
    transform var(--dur-fast) var(--ease-out);
}
.cd-help-scroll-dot:hover,
.cd-help-scroll-dot:focus-visible {
  background: var(--ink-400);
  outline: none;
}
.cd-help-scroll-dot.is-active {
  background: var(--brand-600);
  transform: scale(1.2);
}
.cd-help-card-grid {
  display: grid;
  gap: 12px;
}
.cd-help-card-grid--stack {
  grid-template-columns: minmax(0, 1fr);
}
.cd-help-card-grid--four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cd-help-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: 16px 16px 14px;
  background: var(--surface);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--dur-base) ease,
    box-shadow var(--dur-base) ease,
    transform var(--dur-base) var(--ease-out);
}
.cd-help-card-label {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}
.cd-help-card--writing .cd-help-card-label {
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
}
.cd-help-card--ranking .cd-help-card-label {
  background: var(--green-50);
  color: var(--green-700, #15803d);
  border: 1px solid rgba(22, 163, 74, 0.18);
}
.cd-help-section--writing .cd-help-card:hover,
.cd-help-section--writing .cd-help-card:focus,
.cd-help-card--writing:hover,
.cd-help-card--writing:focus {
  border-color: var(--brand-200);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}
.cd-help-section--ranking .cd-help-card:hover,
.cd-help-section--ranking .cd-help-card:focus,
.cd-help-card--ranking:hover,
.cd-help-card--ranking:focus {
  border-color: rgba(22, 163, 74, 0.28);
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.08);
}
.cd-help-card:hover,
.cd-help-card:focus {
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.cd-help-card-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  font-size: 14px;
}
.cd-help-section--writing .cd-help-card-icon,
.cd-help-card--writing .cd-help-card-icon {
  background: var(--brand-50);
  color: var(--brand-700);
}
.cd-help-section--ranking .cd-help-card-icon,
.cd-help-card--ranking .cd-help-card-icon {
  background: var(--green-50);
  color: var(--green-700, #15803d);
}
.cd-help-card-title {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.cd-help-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  margin-top: auto;
  border-top: 1px solid var(--ink-100);
}
.cd-help-card-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  transition: color var(--dur-fast) ease;
}
.cd-help-section--writing .cd-help-card:hover .cd-help-card-meta,
.cd-help-section--writing .cd-help-card:focus .cd-help-card-meta,
.cd-help-card--writing:hover .cd-help-card-meta,
.cd-help-card--writing:focus .cd-help-card-meta {
  color: var(--brand-700);
}
.cd-help-section--ranking .cd-help-card:hover .cd-help-card-meta,
.cd-help-section--ranking .cd-help-card:focus .cd-help-card-meta,
.cd-help-card--ranking:hover .cd-help-card-meta,
.cd-help-card--ranking:focus .cd-help-card-meta {
  color: var(--green-700, #15803d);
}
.cd-help-card-arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-400);
  font-size: 11px;
  transition:
    background-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    transform var(--dur-fast) var(--ease-out);
}
.cd-help-section--writing .cd-help-card:hover .cd-help-card-arrow,
.cd-help-section--writing .cd-help-card:focus .cd-help-card-arrow,
.cd-help-card--writing:hover .cd-help-card-arrow,
.cd-help-card--writing:focus .cd-help-card-arrow {
  background: var(--brand-600);
  color: #fff;
  transform: translateX(2px);
}
.cd-help-section--ranking .cd-help-card:hover .cd-help-card-arrow,
.cd-help-section--ranking .cd-help-card:focus .cd-help-card-arrow,
.cd-help-card--ranking:hover .cd-help-card-arrow,
.cd-help-card--ranking:focus .cd-help-card-arrow {
  background: var(--green-600, #16a34a);
  color: #fff;
  transform: translateX(2px);
}
@media (max-width: 900px) {
  .cd-help-card-track .cd-help-card {
    width: min(280px, 82vw);
  }
  .cd-help-section-more {
    margin-top: 0;
  }
}
.cd-section-body { padding: 0; }
.cd-section-note {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-500) !important;
}
.cd-empty-state {
  padding: 28px 20px;
  text-align: center;
  color: var(--ink-500);
  font-size: 14px;
}
.cd-empty-state p { margin: 0 0 8px; }
.cd-empty-state p:last-child { margin-bottom: 0; }
.cd-empty-state p + p { color: var(--ink-500); font-size: 13px; }
.cd-inline-form { display: inline; }

.cd-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
@media (max-width: 900px) {
  .cd-two-col { grid-template-columns: 1fr; }
}

/* KPI accent variants */
.kpi.kpi-accent-total { --kpi-accent: var(--brand-600); }
.kpi.kpi-accent-progress { --kpi-accent: var(--amber-500); }
.kpi.kpi-accent-done { --kpi-accent: var(--green-500); }
.kpi.kpi-accent-canceled { --kpi-accent: var(--ink-400); }
.kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--kpi-accent, var(--brand-600));
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.kpi { position: relative; overflow: hidden; }

/* FAQ accordion */
.cd-faq { padding: 4px 20px 16px; }
.cd-faq-item { border-top: 1px solid var(--ink-100); }
.cd-faq-item:first-child { border-top: none; }
.cd-faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  background: none;
  border: none;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-800);
  cursor: pointer;
}
.cd-faq-trigger:hover { color: var(--brand-600); }
.cd-faq-trigger .bp-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--ink-400);
}
.cd-faq-panel {
  padding: 0 0 14px;
  font-size: 13px;
  color: var(--ink-600);
  line-height: 1.55;
}
.cd-faq-panel p { margin: 0 0 8px; }
.cd-faq-panel p:last-child { margin-bottom: 0; }
.cd-faq-panel ul {
  margin: 0 0 8px;
  padding-left: 20px;
}
.cd-faq-panel li {
  margin: 0 0 4px;
}
.cd-faq-panel li:last-child {
  margin-bottom: 0;
}

/* Scroll-reveal sections — animation class added by JS on intersect */
.cd-reveal:not(.is-revealed) { opacity: 0; }

/* AJAX-loaded table row stagger */
.cd-row-enter {
  animation: bp-slide-up var(--dur-base) var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}

/* Status timeline — each bar grows left-to-right in sequence */
table.cd-client-orders .status-timeline .status-step {
  display: inline-block;
  vertical-align: middle;
  transform-origin: left center;
  backface-visibility: hidden;
}
.status-timeline.cd-timeline-animate .status-step.cd-step-enter {
  transform: scaleX(0);
  animation: cd-step-grow 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--step-delay, 0ms);
}
@keyframes cd-step-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .cd-reveal:not(.is-revealed) { opacity: 1; }
  .cd-row-enter,
  .status-timeline.cd-timeline-animate .status-step.cd-step-enter { animation: none; }
  .status-timeline.cd-timeline-animate .status-step.cd-step-enter {
    transform: none;
  }
}

/* User menu (client variant) */
.cd-user-menu { min-width: 240px; }
.cd-user-menu .bp-menu-divider {
  height: 1px;
  background: var(--ink-100);
  margin: 6px 0;
}
.cd-user-menu .bp-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-700);
  font-size: 13px;
  text-decoration: none;
}
.cd-user-menu .bp-menu-item:hover {
  background: var(--hover);
  color: var(--ink-900);
  text-decoration: none;
}
.cd-user-menu .bp-menu-item svg { width: 15px; height: 15px; opacity: 0.75; }
.cd-user-menu .bp-menu-logout { color: var(--rose-600); }

.cd-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  font-weight: 600;
  object-fit: cover;
}

/* ===== Legacy table wrappers (from ajax / create_table_extended) ===== */
.cd-legacy-table section,
.cd-legacy-table > section {
  margin: 0;
}
.cd-legacy-table .card,
.cd-legacy-table section .card {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}
.cd-legacy-table .card-header {
  display: none;
}
.cd-legacy-table .card-content,
.cd-legacy-table .card-body {
  padding: 0;
}
.cd-legacy-table .table-responsive {
  overflow-x: auto;
}
.cd-legacy-table table {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
}
.cd-legacy-table #dt-promotions tbody tr td:last-of-type,
.cd-legacy-table #dt-abandoned_carts tbody tr td:last-of-type,
.cd-legacy-table #dt-orders tbody tr td:last-of-type {
  text-align: right;
}

/* Promotions table */
#promotions-container .cd-orders-table-wrap {
  border-top: 1px solid var(--ink-100);
}
table.cd-promotions-table {
  width: 100%;
  min-width: 520px;
}
table.cd-promotions-table tbody tr {
  cursor: default;
}
table.cd-promotions-table tbody tr:hover {
  background: var(--surface-2);
}
table.cd-promotions-table td {
  vertical-align: middle;
}
.cd-coupon-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-800);
  white-space: nowrap;
}
.cd-promo-offer {
  color: var(--ink-700);
  font-size: 13px;
  line-height: 1.45;
  max-width: 280px;
  white-space: normal;
}
.cd-promo-used {
  font-size: 13px;
  color: var(--ink-500);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cd-promotions-table .cd-inline-form {
  display: inline-block;
  margin: 0;
}

/* Resume ordering table */
#abandoned-container .cd-orders-table-wrap {
  border-top: 1px solid var(--ink-100);
}
table.cd-resume-table td.cd-col-order {
  white-space: normal;
  vertical-align: top;
  min-width: 132px;
}
table.cd-resume-table {
  width: 100%;
  min-width: 720px;
}
table.cd-resume-table tbody tr {
  cursor: default;
}
table.cd-resume-table tbody tr:hover {
  background: var(--surface-2);
}
.cd-resume-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: 320px;
}
.cd-resume-brand-name {
  font-weight: 600;
  color: var(--ink-900);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cd-resume-brand-url {
  font-size: 12px;
  color: var(--ink-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cd-muted { color: var(--ink-400) !important; }
.cd-upper {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.brand-name, .url {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* ===== Client orders table (admin-v2 style) ===== */
.cd-orders-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#order-container .cd-orders-table-wrap {
  border-top: 1px solid var(--ink-100);
  overflow-x: hidden;
}
table.cd-client-orders {
  width: 100%;
}
#order-container table.cd-client-orders {
  table-layout: fixed;
}
#order-container table.cd-client-orders col.cd-col-w-order { width: 10%; }
#order-container table.cd-client-orders col.cd-col-w-updated { width: 6%; }
#order-container table.cd-client-orders col.cd-col-w-status { width: 17%; }
#order-container table.cd-client-orders col.cd-col-w-brand { width: 14%; }
#order-container table.cd-client-orders col.cd-col-w-team { width: 8%; }
#order-container table.cd-client-orders col.cd-col-w-package { width: 14%; }
#order-container table.cd-client-orders col.cd-col-w-payment { width: 11%; }
#order-container table.cd-client-orders col.cd-col-w-actions { width: 20%; }
#order-container table.cd-client-orders td.col-updated {
  overflow: hidden;
  text-overflow: ellipsis;
}
#order-container table.cd-client-orders .updated-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#order-container table.cd-client-orders td.cd-col-order,
#order-container table.cd-client-orders td.cd-col-status {
  white-space: normal;
  overflow: hidden;
}
#order-container table.cd-client-orders .status-stack {
  min-width: 0;
  max-width: 100%;
}
#order-container table.cd-client-orders .biz-link {
  max-width: 100%;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
#order-container table.cd-client-orders .cd-pkg-cell,
#order-container table.cd-client-orders .cd-pay-cell {
  min-width: 0;
}
#order-container table.cd-client-orders th.cd-col-actions,
#order-container table.cd-client-orders td.cd-col-actions {
  overflow: visible;
  white-space: nowrap;
}
table.cd-client-orders tbody tr {
  cursor: default;
}
table.cd-client-orders tbody tr:hover {
  background: var(--surface-2);
}
table.cd-client-orders tbody tr[data-order-id] {
  cursor: pointer;
}
table.cd-client-orders tbody tr[data-order-id] .cd-col-actions {
  cursor: default;
}
table.cd-client-orders td.cd-col-order {
  white-space: normal;
  vertical-align: top;
  min-width: 132px;
}
.cd-order-id-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  line-height: 1.35;
}
.cd-order-id-cell > * {
  display: block;
}
.cd-order-uuid {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  word-break: break-all;
}
.cd-order-date {
  font-size: 11px;
  color: var(--ink-500);
  line-height: 1.3;
}
.cd-col-actions {
  text-align: right !important;
  width: 1%;
  white-space: nowrap;
}
.cd-order-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  position: relative;
}
.cd-order-actions .btn-group.dropdown {
  display: inline-flex;
  flex-shrink: 0;
  position: relative;
}
.cd-order-actions .btn-group > .btn-primary:not(.dropdown-toggle-split) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.cd-order-actions .btn-primary.dropdown-toggle-split {
  padding-left: 8px;
  padding-right: 8px;
  min-width: 30px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left-color: rgba(255, 255, 255, 0.28);
}
.cd-order-actions .dropdown-menu {
  z-index: 200;
  margin-top: 4px;
  padding: 6px;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  min-width: 12rem;
}
/* Let action menus escape the orders card while open */
#orders.cd-orders-dropdown-open .cd-section-card,
#orders.cd-orders-dropdown-open .cd-section-body,
#orders.cd-orders-dropdown-open .cd-orders-table-wrap {
  overflow: visible !important;
}
.cd-order-actions .dropdown-item {
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  padding: 8px 12px;
}
.cd-order-actions .dropdown-item:hover,
.cd-order-actions .dropdown-item:focus {
  background: var(--ink-50);
  color: var(--ink-900);
}
.cd-order-actions .dropdown-divider {
  margin: 4px 0;
  border-color: var(--ink-100);
}
table.cd-client-orders tbody tr.cd-row-menu-open {
  position: relative;
  z-index: 100;
}
table.cd-client-orders tbody tr.cd-row-menu-open > td {
  overflow: visible;
}
table.cd-client-orders tbody tr.cd-row-menu-open:hover {
  background: var(--surface-2);
}
.cd-review-link {
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.cd-review-link:hover {
  text-decoration: underline;
}
.status-issue a.cd-review-link {
  color: var(--brand-600);
}
.cd-pkg-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}
.cd-pkg-icon {
  font-size: 18px;
  line-height: 1;
}
.cd-pkg-name {
  font-weight: 600;
  color: var(--ink-800);
  font-size: 13px;
}
.cd-pkg-sub {
  font-size: 11px;
  color: var(--ink-500);
}
.cd-pay-cell {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 90px;
}
.cd-pay-icon {
  font-size: 18px;
  margin-top: 2px;
}
.cd-pay-currency {
  font-size: 11px;
  color: var(--ink-400);
}
.cd-pay-status {
  font-size: 11px;
  color: var(--green-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cd-team-cell {
  min-width: 88px;
}
.cd-team-cell img {
  width: 30px;
  height: 30px;
}

.inline-reviews {
  display: inline-flex;
  align-items: center;
  min-width: 94px;
  margin-right: 8px;
}
.inline-reviews img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  margin-right: -10px;
  background: var(--surface);
  object-fit: cover;
}
.inline-reviews img:hover {
  z-index: 5;
  position: relative;
  transform: scale(1.08);
}

.fa-cc-stripe { color: #635bff; }
.fa-cc-paypal { color: #253b80; }
.icon-margin { margin-right: 4px; }

/* ===== Modals (Bootstrap 4 — isolated from admin-v2 dashboard.css .modal grid) ===== */
.cd-bootstrap-modal.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  max-width: none;
  max-height: none;
  flex-direction: unset;
  animation: none;
  transform: none;
}
.cd-bootstrap-modal.modal.show {
  display: block;
}
.cd-bootstrap-modal .modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem auto;
  pointer-events: none;
  max-width: 500px;
}
#client_details_modal .modal-dialog {
  max-width: 640px;
}
#order_modal .modal-dialog.modal-lg {
  max-width: 900px;
}
.cd-bootstrap-modal .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background: var(--surface);
  background-clip: padding-box;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  outline: 0;
  padding: 0;
  border-right: none;
  overflow: hidden;
}
.cd-bootstrap-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink-100);
  padding: 18px 22px;
  flex-shrink: 0;
}
.cd-bootstrap-modal .modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0;
}
.cd-bootstrap-modal .modal-body {
  display: block;
  grid-template-columns: none;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 22px;
  font-size: 14px;
  color: var(--ink-700);
}
.cd-bootstrap-modal .modal-body .row {
  margin-left: -12px;
  margin-right: -12px;
}
.cd-bootstrap-modal .modal-body [class*="col-"] {
  padding-left: 12px;
  padding-right: 12px;
}
.cd-bootstrap-modal .modal-body .form-control {
  width: 100%;
}
.cd-bootstrap-modal .modal-body p { line-height: 1.5; margin-bottom: 8px; }
.cd-bootstrap-modal .modal-body .bp-sk-block {
  border-radius: var(--r-md);
}
.cd-bootstrap-modal .modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid var(--ink-100);
  padding: 14px 22px;
  gap: 10px;
  flex-shrink: 0;
}
/* Bootstrap modal backdrop — undo admin-v2 dashboard.css grid centering */
body .modal-backdrop {
  z-index: 1040 !important;
  display: block !important;
  grid-template: none !important;
  place-items: unset !important;
  align-content: unset !important;
  padding: 0 !important;
  overflow: visible !important;
  animation: none !important;
}
.modal-backdrop.fade {
  display: block;
  opacity: 0;
}
.modal-backdrop.show {
  opacity: 0.5;
}

body .cd-bootstrap-modal.modal {
  z-index: 1050 !important;
  max-width: none !important;
  max-height: none !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  animation: none !important;
  transform: none !important;
  overflow: hidden !important;
}
body .cd-bootstrap-modal.modal.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}
/* ===== Review article modal — redesign ===== */
#order_modal [hidden] { display: none !important; }
#order_modal.cd-bootstrap-modal .modal-dialog,
#order_modal.cd-bootstrap-modal .modal-dialog.cd-review-modal-dialog {
  position: relative;
  width: auto;
  margin: 1.5rem auto;
  pointer-events: auto;
  max-width: min(1240px, calc(100vw - 3rem));
  transform: none !important;
}
#order_modal.cd-bootstrap-modal .modal-dialog.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 3rem);
}
#order_modal.cd-bootstrap-modal.fade .modal-dialog {
  transform: none !important;
  transition: none !important;
}
#order_modal.cd-bootstrap-modal .modal-content,
#order_modal.cd-bootstrap-modal .cd-review-modal-content {
  position: relative;
  width: 100%;
  height: min(860px, calc(100vh - 3rem));
  max-height: calc(100vh - 3rem);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
#order_modal .cd-rev-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--ink-100);
}
#order_modal .cd-rev-header-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
#order_modal .cd-rev-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-900);
}
#order_modal .cd-rev-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-500);
}
#order_modal .cd-rev-brand {
  font-weight: 600;
  color: var(--ink-700);
  text-decoration: none;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#order_modal .cd-rev-brand:hover { color: var(--brand-600); text-decoration: underline; }
#order_modal .cd-rev-meta-sep { color: var(--ink-300); }
#order_modal .cd-rev-id {
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-500);
}
#order_modal .cd-rev-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--amber-50);
  color: var(--amber-700);
  border: 1px solid var(--amber-100);
  font-size: 11px;
  font-weight: 600;
}
#order_modal .cd-rev-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: -3px;
}
#order_modal .cd-rev-close {
  font-size: 20px;
  line-height: 1;
  opacity: 0.5;
  padding: 5px 7px;
  margin-right: -3px;
  border-radius: var(--r-sm);
  color: var(--ink-500);
  text-shadow: none;
}
#order_modal .cd-rev-close:hover { opacity: 1; background: var(--hover); }
#order_modal .cd-rev-primary-btn,
#order_modal .cd-rev-secondary-btn,
#order_modal .cd-rev-outline-btn,
#order_modal .cd-rev-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
#order_modal .cd-rev-primary-btn { background: var(--brand-600); color: #fff; }
#order_modal .cd-rev-primary-btn:hover { background: var(--brand-700); color: #fff; }
#order_modal .cd-rev-secondary-btn { background: var(--surface); color: var(--ink-700); border-color: var(--ink-200); }
#order_modal .cd-rev-secondary-btn:hover { background: var(--hover); color: var(--ink-900); }
#order_modal .cd-rev-outline-btn { background: var(--surface); color: var(--ink-600); border-color: var(--ink-200); padding: 7px 12px; }
#order_modal .cd-rev-outline-btn:hover { background: var(--hover); color: var(--ink-900); border-color: var(--ink-300); }
#order_modal .cd-rev-ghost-btn { background: transparent; color: var(--ink-600); border-color: transparent; padding: 7px 10px; }
#order_modal .cd-rev-ghost-btn:hover { background: var(--hover); color: var(--ink-900); }
#order_modal .cd-rev-block-btn { width: 100%; padding: 11px 16px; font-size: 14px; }
#order_modal .cd-rev-primary-btn:disabled,
#order_modal .cd-rev-secondary-btn:disabled { opacity: 0.5; cursor: not-allowed; }
#order_modal.cd-bootstrap-modal .modal-body.cd-rev-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 384px;
  gap: 0;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}
#order_modal .cd-rev-preview {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  border-right: 1px solid var(--ink-100);
  background: var(--bg);
}
#order_modal .cd-rev-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--ink-100);
  background: var(--surface);
  flex-shrink: 0;
}
#order_modal .cd-rev-toolbar-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
}
#order_modal .cd-rev-toolbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
#order_modal .cd-rev-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--ink-100);
  cursor: help;
  flex-shrink: 0;
}
#order_modal .cd-rev-banner--verified { background: var(--green-50); border-bottom-color: var(--green-100); }
#order_modal .cd-rev-banner--assisted { background: var(--brand-50); border-bottom-color: var(--brand-100); }
#order_modal .cd-rev-banner-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
}
#order_modal .cd-rev-banner--verified .cd-rev-banner-icon { background: var(--green-500); box-shadow: 0 0 0 4px var(--green-100); }
#order_modal .cd-rev-banner--assisted .cd-rev-banner-icon { background: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-100); }
#order_modal .cd-rev-banner-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#order_modal .cd-rev-banner-label { font-size: 13px; font-weight: 700; color: var(--ink-900); }
#order_modal .cd-rev-banner--verified .cd-rev-banner-label { color: var(--green-700); }
#order_modal .cd-rev-banner-meta { font-size: 12px; color: var(--ink-500); }
#order_modal .cd-rev-banner-meta a { color: var(--brand-600); font-weight: 600; text-decoration: none; }
#order_modal .cd-rev-banner-meta a:hover { text-decoration: underline; }
#order_modal .cd-rev-banner-badge {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--green-500);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
#order_modal .cd-rev-scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  padding: 48px;
}
#order_modal .cd-rev-frame,
#order_modal #order_review_preview_frame {
  display: block;
  width: 100%;
  max-width: 820px;
  height: auto;
  min-height: 0;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  vertical-align: top;
}
#order_modal .cd-rev-preview-loading,
#order_modal .cd-rev-empty {
  max-width: 820px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}
#order_modal .cd-rev-preview-loading { padding: 32px 36px; }
#order_modal .cd-rev-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px 36px;
}
#order_modal .cd-rev-empty-title { margin: 0 0 6px; font-size: 15px; color: var(--ink-900); }
#order_modal .cd-rev-empty-hint { margin: 0 0 14px; font-size: 13px; color: var(--ink-500); }
#order_modal .cd-rev-aside {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
  min-width: 0;
  background: var(--surface);
}
#order_modal .cd-rev-rail {
  overflow-y: auto;
  min-height: 0;
  padding: 22px 22px 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#order_modal .cd-rev-block { display: flex; flex-direction: column; gap: 10px; }
#order_modal .cd-rev-block-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink-900); }
#order_modal .cd-rev-block-hint { margin: 0; font-size: 13px; color: var(--ink-500); line-height: 1.45; }
#order_modal .cd-rev-block-hint a { color: var(--brand-600); text-decoration: none; }
#order_modal .cd-rev-block-hint a:hover { text-decoration: underline; }
#order_modal .cd-rev-textarea {
  min-height: 116px;
  resize: none;
  overflow-y: hidden;
  font-size: 14px;
  line-height: 1.5;
  border-radius: var(--r-md);
  border-color: var(--ink-200);
}
#order_modal .cd-rev-textarea:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(61, 99, 235, 0.12); }
#order_modal .cd-rev-note { margin: 0; font-size: 12px; color: var(--ink-400); text-align: center; }
#order_modal .cd-rev-revision-error {
  margin: 0;
  font-size: 12px;
  color: var(--rose-600);
  font-weight: 600;
  text-align: center;
}
#order_modal .cd-rev-revision-default { display: flex; flex-direction: column; gap: 10px; }
#order_modal .cd-rev-revision-confirm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
#order_modal .cd-rev-attach-btn {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-600);
  cursor: pointer;
}
#order_modal .cd-rev-attach-btn:hover { text-decoration: underline; }
#order_modal .cd-rev-dropzone-wrap { display: flex; flex-direction: column; gap: 6px; }
#order_modal .cd-rev-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 22px 16px;
  border: 1.5px dashed var(--ink-200);
  border-radius: var(--r-md);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
#order_modal .cd-rev-dropzone:hover { border-color: var(--brand-300); background: var(--brand-50); }
#order_modal .cd-rev-dropzone.is-dragging { border-color: var(--brand-500); background: var(--brand-50); }
#order_modal .cd-rev-dropzone > span { pointer-events: none; }
#order_modal .cd-rev-dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
#order_modal .cd-rev-dropzone-icon { color: var(--brand-500); font-size: 22px; line-height: 1; }
#order_modal .cd-rev-dropzone-title { font-size: 13px; font-weight: 600; color: var(--ink-900); }
#order_modal .cd-rev-dropzone-hint { font-size: 12px; color: var(--ink-500); }
#order_modal .cd-rev-dropzone-cancel {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  cursor: pointer;
}
#order_modal .cd-rev-dropzone-cancel:hover { color: var(--ink-700); text-decoration: underline; }
#order_modal .cd-rev-upload-error {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--rose-600, #e11d48);
  line-height: 1.4;
}
#order_modal .cd-rev-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
#order_modal .cd-rev-image-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--ink-100);
  background: var(--surface-2);
}
#order_modal .cd-rev-image-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#order_modal .cd-rev-image-thumb.is-uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
}
#order_modal .cd-rev-image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: var(--r-pill);
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
#order_modal .cd-rev-image-remove:hover { background: rgba(17, 24, 39, 0.9); }
#order_modal .cd-rev-file-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--r-md);
}
#order_modal .cd-rev-file-pill > i { color: var(--brand-600); flex: none; }
#order_modal .cd-rev-file-pill-name {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
#order_modal .cd-rev-file-pill-name:disabled { color: var(--ink-700); -webkit-text-fill-color: var(--ink-700); opacity: 1; }
#order_modal .cd-rev-file-remove {
  margin-left: auto;
  flex: none;
  background: none;
  border: none;
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
#order_modal .cd-rev-file-remove:hover { text-decoration: underline; }
#order_modal .cd-rev-divider { border: 0; border-top: 1px solid var(--ink-100); margin: 0; }
#order_modal .cd-rev-writer-block .order_modal_writer_container {
  margin: 0;
  position: static;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}
#order_modal .cd-rev-writer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#order_modal .cd-rev-writer-head,
#order_modal #order_modal_writer {
  display: flex;
  align-items: center;
  gap: 12px;
}
#order_modal #order_modal_writer .avatar {
  float: none !important;
  margin: 0 !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: var(--r-pill);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}
#order_modal .writer-title {
  padding-top: 0;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
#order_modal .writer-title h7,
#order_modal .writer-title b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}
#order_modal .writer-title .text-muted,
#order_modal .writer-title .cd-rev-writer-badges {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none !important;
  color: var(--ink-500) !important;
}
#order_modal .cd-rev-writer-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#order_modal .cd-rev-writer-rating form {
  margin: 0;
}
#order_modal .cd-rev-writer-rating-status {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}
#order_modal .cd-rev-writer-rating-status strong {
  font-weight: 600;
  color: var(--ink-800);
}
#order_modal .cd-rev-writer-rating-status.is-saved {
  color: var(--green-700, #15803d);
  font-weight: 500;
}
#order_modal .cd-rev-writer-rating-status .cd-rev-writer-rating-saved-note {
  color: var(--green-700, #15803d);
  font-weight: 600;
}
#order_modal .cd-rev-writer-rating-status.is-rated strong {
  color: var(--ink-800);
}
#order_modal .cd-rev-writer-rating-status:empty {
  display: none;
}
#order_modal .cd-rev-writer-rating-hint::before {
  content: '← Click the stars to rate';
}
@media (max-width: 1140px) {
  #order_modal .cd-rev-writer-rating-hint::before {
    content: '← Tap the stars to rate';
  }
}
#order_modal .order_modal_writer_container .rating {
  float: none;
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 2px;
  margin: 0;
  border: none;
  padding: 0;
}
#order_modal .order_modal_writer_container .rating .star-text { display: none; }
#order_modal .order_modal_writer_container .rating > label {
  float: none;
  display: inline-block;
  margin: 0;
  color: var(--ink-300);
  cursor: pointer;
  transition: color .12s ease;
}
#order_modal .order_modal_writer_container .rating > label:before {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
}
/* Fill is driven entirely by the .is-lit class (managed in JS) so a hover preview
   can show fewer stars than the saved rating. Do not colour via input:checked ~ label
   or :hover here — that reintroduces the specificity conflict this replaced. */
#order_modal .order_modal_writer_container .rating > label.is-lit {
  color: var(--amber-500);
}
#order_modal .cd-rev-footer {
  padding: 16px 22px 20px;
  border-top: 1px solid var(--ink-100);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#order_modal .cd-rev-footer-default { display: flex; flex-direction: column; gap: 8px; }
#order_modal .cd-rev-footer-confirm { display: flex; flex-direction: column; gap: 8px; }
#order_modal .cd-rev-confirm-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-900); text-align: center; }
#order_modal .cd-rev-confirm-sub { margin: 0; font-size: 12px; color: var(--ink-500); line-height: 1.45; text-align: center; }
#order_modal .cd-rev-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-600);
  line-height: 1.4;
  cursor: pointer;
}
#order_modal .cd-rev-check input { margin-top: 2px; flex: none; }
#order_modal .cd-rev-check a { color: var(--brand-600); font-weight: 600; }
#order_modal .cd-rev-check-error { color: var(--rose-600); font-weight: 600; }
#order_modal .cd-rev-confirm-actions { display: flex; gap: 8px; margin-top: 2px; }
#order_modal .cd-rev-confirm-actions .cd-rev-secondary-btn { flex: 1; }
#order_modal .cd-rev-confirm-actions .cd-rev-confirm-yes { flex: 2; }
#order_modal .cd-rev-mobile-preview {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
#order_modal .cd-rev-mobile-preview-head { display: flex; flex-direction: column; gap: 2px; }
#order_modal .cd-rev-mobile-headline { font-size: 14px; font-weight: 700; color: var(--ink-900); }
#order_modal .cd-rev-mobile-downloads { display: flex; gap: 8px; }

/* ===== Upload article modal (Write Your Own Story) — single-column reuse of the review styles ===== */
#upload_article_modal.cd-bootstrap-modal .cd-ua-dialog { max-width: 560px; width: 100%; }
#upload_article_modal.cd-bootstrap-modal .modal-content {
  max-height: calc(100vh - 3.5rem);
  overflow: hidden;
  border: none;
  border-radius: var(--r-lg, 16px);
}
#upload_article_modal [hidden] { display: none !important; }
#upload_article_modal .cd-rev-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--ink-100);
  flex: none;
}
#upload_article_modal .cd-rev-header-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#upload_article_modal .cd-rev-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink-900); }
#upload_article_modal .cd-rev-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--ink-500); }
#upload_article_modal .cd-rev-brand { font-weight: 600; color: var(--ink-700); text-decoration: none; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#upload_article_modal .cd-rev-brand:hover { color: var(--brand-600); text-decoration: underline; }
#upload_article_modal .cd-rev-meta-sep { color: var(--ink-300); }
#upload_article_modal .cd-rev-id { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-500); }
#upload_article_modal .cd-rev-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--amber-50);
  color: var(--amber-700);
  border: 1px solid var(--amber-100);
  font-size: 11px;
  font-weight: 600;
}
#upload_article_modal .cd-rev-header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-top: -3px; }
#upload_article_modal .cd-rev-close { font-size: 20px; line-height: 1; opacity: 0.5; padding: 5px 7px; margin-right: -3px; border-radius: var(--r-sm); color: var(--ink-500); text-shadow: none; }
#upload_article_modal .cd-rev-close:hover { opacity: 1; background: var(--hover); }
#upload_article_modal .cd-rev-primary-btn,
#upload_article_modal .cd-rev-secondary-btn,
#upload_article_modal .cd-rev-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
#upload_article_modal .cd-rev-primary-btn { background: var(--brand-600); color: #fff; }
#upload_article_modal .cd-rev-primary-btn:hover { background: var(--brand-700); color: #fff; }
#upload_article_modal .cd-rev-secondary-btn { background: var(--surface); color: var(--ink-700); border-color: var(--ink-200); }
#upload_article_modal .cd-rev-secondary-btn:hover { background: var(--hover); color: var(--ink-900); }
#upload_article_modal .cd-rev-ghost-btn { background: transparent; color: var(--ink-600); border-color: transparent; padding: 7px 10px; }
#upload_article_modal .cd-rev-ghost-btn:hover { background: var(--hover); color: var(--ink-900); }
#upload_article_modal .cd-rev-block-btn { width: 100%; padding: 11px 16px; font-size: 14px; }
#upload_article_modal .cd-rev-primary-btn:disabled,
#upload_article_modal .cd-rev-secondary-btn:disabled { opacity: 0.5; cursor: not-allowed; }
#upload_article_modal .cd-ua-body { padding: 0; display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; overflow: hidden; }
#upload_article_modal #upload_article_form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
#upload_article_modal .cd-ua-rail {
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  padding: 22px 22px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#upload_article_modal .cd-ua-intro { margin: 0; font-size: 13px; color: var(--ink-500); line-height: 1.5; }
#upload_article_modal .cd-rev-block { display: flex; flex-direction: column; gap: 10px; }
#upload_article_modal .cd-rev-block-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink-900); }
#upload_article_modal .cd-ua-optional { font-weight: 500; color: var(--ink-400); font-size: 13px; }
#upload_article_modal .cd-rev-dropzone-wrap { display: flex; flex-direction: column; gap: 6px; }
#upload_article_modal .cd-rev-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 18px;
  border: 1.5px dashed var(--ink-200);
  border-radius: var(--r-md);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
#upload_article_modal .cd-rev-dropzone:hover { border-color: var(--brand-300); background: var(--brand-50); }
#upload_article_modal .cd-rev-dropzone.is-dragging { border-color: var(--brand-500); background: var(--brand-50); }
#upload_article_modal .cd-rev-dropzone > span { pointer-events: none; }
#upload_article_modal .cd-rev-dropzone-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
#upload_article_modal .cd-rev-dropzone-icon { color: var(--brand-500); font-size: 22px; line-height: 1; }
#upload_article_modal .cd-rev-dropzone-title { font-size: 13px; font-weight: 600; color: var(--ink-900); }
#upload_article_modal .cd-rev-dropzone-hint { font-size: 12px; color: var(--ink-500); }
#upload_article_modal .cd-rev-dropzone-cancel {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--ink-500);
  cursor: pointer;
}
#upload_article_modal .cd-rev-dropzone-cancel:hover { color: var(--ink-700); text-decoration: underline; }
#upload_article_modal .cd-rev-upload-error { margin: 0; font-size: 12px; font-weight: 600; color: var(--rose-600, #e11d48); line-height: 1.4; }
#upload_article_modal .cd-rev-image-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
#upload_article_modal .cd-rev-image-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--ink-100);
  background: var(--surface-2);
}
#upload_article_modal .cd-rev-image-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
#upload_article_modal .cd-rev-image-thumb.is-uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
}
#upload_article_modal .cd-rev-image-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.7);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#upload_article_modal .cd-rev-image-remove:hover { background: rgba(17, 24, 39, 0.9); }
#upload_article_modal .cd-rev-attach-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-600);
  cursor: pointer;
}
#upload_article_modal .cd-rev-attach-btn:hover { text-decoration: underline; }
#upload_article_modal .cd-rev-file-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
#upload_article_modal .cd-rev-file-pill > i { color: var(--brand-600); flex: none; }
#upload_article_modal .cd-rev-file-pill-name {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--ink-800);
  overflow: hidden;
  text-overflow: ellipsis;
}
#upload_article_modal .cd-rev-file-pill-name:disabled { color: var(--ink-700); -webkit-text-fill-color: var(--ink-700); opacity: 1; }
#upload_article_modal .cd-rev-file-remove {
  flex: none;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--ink-500);
  cursor: pointer;
}
#upload_article_modal .cd-rev-file-remove:hover { text-decoration: underline; }
#upload_article_modal .cd-rev-footer {
  padding: 16px 22px 20px;
  border-top: 1px solid var(--ink-100);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none;
}
#upload_article_modal .cd-rev-footer-default,
#upload_article_modal .cd-rev-footer-confirm { display: flex; flex-direction: column; gap: 8px; }
#upload_article_modal .cd-rev-note { margin: 0; font-size: 12px; color: var(--ink-400); text-align: center; }
#upload_article_modal .cd-rev-revision-error { margin: 0; font-size: 12px; color: var(--rose-600); font-weight: 600; text-align: center; }
#upload_article_modal .cd-rev-confirm-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-900); text-align: center; }
#upload_article_modal .cd-rev-confirm-sub { margin: 0; font-size: 12px; color: var(--ink-500); line-height: 1.45; text-align: center; }
#upload_article_modal .cd-rev-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-600);
  line-height: 1.4;
  cursor: pointer;
}
#upload_article_modal .cd-rev-check input { margin-top: 2px; flex: none; }
#upload_article_modal .cd-rev-check a { color: var(--brand-600); font-weight: 600; }
#upload_article_modal .cd-rev-check-error { color: var(--rose-600); font-weight: 600; }
#upload_article_modal .cd-rev-confirm-actions { display: flex; gap: 8px; margin-top: 2px; }
#upload_article_modal .cd-rev-confirm-actions .cd-rev-secondary-btn { flex: 1; }
#upload_article_modal .cd-rev-confirm-actions .cd-rev-confirm-yes { flex: 2; }
@media (max-width: 600px) {
  #upload_article_modal.cd-bootstrap-modal .modal-content { max-height: 100vh; border-radius: 0; }
  #upload_article_modal .cd-ua-rail { padding: 16px 16px 8px; }
  #upload_article_modal .cd-rev-footer { position: sticky; bottom: 0; }
}

/* Tablet: preview column is narrow — stack the toolbar and lay out actions in a grid. */
@media (min-width: 901px) and (max-width: 1140px) {
  #order_modal.cd-bootstrap-modal .modal-body.cd-rev-body {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  #order_modal .cd-rev-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px;
  }
  #order_modal .cd-rev-toolbar-label {
    margin: 0;
  }
  #order_modal .cd-rev-toolbar-actions {
    margin-left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    justify-content: stretch;
  }
  #order_modal .cd-rev-toolbar-actions .cd-rev-outline-btn {
    width: 100%;
    justify-content: center;
    padding: 7px 10px;
    font-size: 12px;
  }
  #order_modal .cd-rev-toolbar-actions .cd-rev-newtab {
    grid-column: 1 / -1;
    justify-self: start;
    width: auto;
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  #order_modal.cd-bootstrap-modal .modal-dialog,
  #order_modal.cd-bootstrap-modal .modal-dialog.cd-review-modal-dialog { max-width: 100%; margin: 0; }
  #order_modal.cd-bootstrap-modal .modal-dialog.modal-dialog-centered { min-height: 100%; align-items: stretch; }
  #order_modal.cd-bootstrap-modal .modal-content,
  #order_modal.cd-bootstrap-modal .cd-review-modal-content {
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }
  #order_modal.cd-bootstrap-modal .modal-body.cd-rev-body { display: block; overflow-y: auto; min-height: 0; }
  #order_modal .cd-rev-preview { display: none; }
  #order_modal .cd-rev-aside { display: block; }
  #order_modal .cd-rev-rail { overflow: visible; }
  #order_modal .cd-rev-mobile-preview { display: flex; }
  #order_modal .cd-rev-footer { position: sticky; bottom: 0; box-shadow: var(--shadow-lg); }
}
@media (max-width: 480px) {
  #order_modal .cd-rev-header { padding: 14px 16px; }
  #order_modal .cd-rev-rail { padding: 16px 16px 8px; }
  #order_modal .cd-rev-toolbar-actions { width: 100%; }
}

/* Star rating in writer box (legacy pages) */
.rating { border: none; float: left; margin-top: -6px; }
.rating > input { display: none; }
.rating > label:before {
  margin: 4px;
  font-size: 1.5em;
  font-family: "Font Awesome 5 Free";
  display: inline-block;
  content: "\f005";
}
.rating > label { color: var(--ink-200); float: right; }
.rating > input:checked ~ label,
.rating:not(:checked) > label:hover,
.rating:not(:checked) > label:hover ~ label { color: #ffd700; }

/* Client details modal avatar */
#client_details_modal .round {
  border-radius: 50%;
  object-fit: cover;
}
#client_details_modal .form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-600);
  margin-bottom: 4px;
}

/* Skeleton overrides for client sections */
.cd-orders-skeleton .orders-skeleton-row .bp-sk-block:nth-child(1) { flex: 0 0 90px; }
.cd-orders-skeleton .orders-skeleton-row .bp-sk-block:nth-child(2) { flex: 1 1 auto; }
.cd-orders-skeleton .orders-skeleton-row .bp-sk-block:nth-child(3) { flex: 0 0 120px; }
.cd-orders-skeleton .orders-skeleton-row .bp-sk-block:nth-child(4) { flex: 0 0 80px; }

@media (max-width: 767px) {
  .topbar-inner { padding: 12px 16px; gap: 12px; }
  .page { padding: 16px 16px 60px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .anchor-nav { display: none; }
  .cd-page-header { flex-direction: column; }
  .cd-bootstrap-modal .modal-footer { flex-direction: column; }
  .cd-bootstrap-modal .modal-footer .w-50 { width: 100% !important; }
  .order-status-container { flex-direction: column; }
  .order-status { text-align: left !important; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .user .name, .user .role { display: none; }
}

/* ===== Page footer ===== */
.cd-footer {
  margin-top: 48px;
  background: var(--ink-900);
  color: rgba(255, 255, 255, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.cd-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 32px 28px;
}
.cd-footer-top {
  display: grid;
  grid-template-columns: minmax(200px, 1.1fr) minmax(0, 2fr);
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cd-footer-brand {
  max-width: 280px;
}
.cd-footer-logo {
  display: inline-flex;
  margin-bottom: 12px;
}
.cd-footer-logo img {
  display: block;
  height: 26px;
  width: auto;
  mix-blend-mode: lighten;
}
.cd-footer-tagline {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}
.cd-footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.cd-footer-heading {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}
.cd-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cd-footer-links li + li {
  margin-top: 8px;
}
.cd-footer-links a,
.cd-footer-form button {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.cd-footer-links a:hover,
.cd-footer-form button:hover {
  color: #fff;
  text-decoration: underline;
}
.cd-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
.cd-footer-copy,
.cd-footer-meta {
  margin: 0;
}
.cd-footer-meta {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .cd-footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .cd-footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .cd-footer-inner {
    padding: 32px 16px 24px;
  }
  .cd-footer-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cd-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Order details modal */
#order_details_modal .modal-body {
  padding-top: 16px;
}
#order_details_modal .cd-od-modal-header {
  display: block;
  padding-bottom: 16px;
}
#order_details_modal .cd-od-modal-header-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
#order_details_modal .cd-od-modal-header-text {
  min-width: 0;
  flex: 1;
}
#order_details_modal .cd-od-modal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 4px;
}
#order_details_modal .cd-od-modal-meta .cd-od-uuid {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
}
#order_details_modal .cd-od-modal-meta .cd-od-placed {
  font-size: 13px;
  color: var(--ink-500);
}
#order_details_modal .cd-od-modal-team {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}
#order_details_modal .cd-od-modal-team .inline-reviews {
  display: inline-flex;
  align-items: center;
}
#order_details_modal .cd-od-modal-team .inline-reviews img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  margin-right: -8px;
  background: var(--surface);
  object-fit: cover;
}
#order_details_modal .cd-od-modal-team .inline-reviews img:last-child {
  margin-right: 0;
}
.cd-order-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cd-od-status-banner {
  width: 100%;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.cd-od-status-banner .status-stack {
  min-width: 0;
  width: 100%;
  gap: 8px;
}
.cd-od-status-banner .status-label {
  font-size: 14px;
  font-weight: 600;
}
.cd-od-status-banner .status-timeline {
  width: 100%;
  gap: 4px;
}
.cd-od-status-banner .status-step {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 5px;
}
.cd-od-status-banner .status-issue {
  font-size: 13px;
  line-height: 1.4;
}
.cd-od-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.cd-od-summary-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
}
.cd-od-summary-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-500);
}
.cd-od-summary-card strong {
  font-size: 14px;
  color: var(--ink-900);
}
.cd-od-summary-sub {
  font-size: 12px;
  color: var(--ink-500);
  line-height: 1.35;
}
.cd-od-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cd-od-section {
  margin-bottom: 0;
}
.cd-order-detail .detail-section {
  margin-bottom: 0;
}
.cd-order-detail .detail-h {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-400);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cd-order-detail .detail-h-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cd-order-detail .detail-h-with-action {
  justify-content: space-between;
  width: 100%;
}
.cd-od-section-link {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand-600);
  text-decoration: none;
}
.cd-od-section-link:hover {
  color: var(--brand-700);
  text-decoration: underline;
}
.cd-od-payment-coupon-meta {
  font-size: 13px;
  color: var(--ink-500);
  font-weight: 500;
}
.cd-od-modal-footer {
  justify-content: flex-end;
}
.cd-od-stacked-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cd-od-article-file-standalone {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 0;
}
.cd-od-article-rejection {
  border: 1px solid rgba(225, 29, 72, 0.22);
  border-radius: var(--r-md);
  background: var(--rose-50, #fff1f2);
  overflow: hidden;
}
.cd-od-article-rejection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(225, 29, 72, 0.14);
}
.cd-od-article-rejection-head-main {
  flex: 1 1 auto;
  min-width: 0;
}
.cd-od-article-rejection-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rose-700, #be123c);
}
.cd-od-article-rejection-explainer {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--rose-700, #be123c);
  text-transform: none;
  letter-spacing: normal;
}
.cd-od-article-rejection-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--rose-700, #be123c);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 1px;
}
.cd-od-article-rejection-body {
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-800);
  white-space: normal;
}
table.cd-client-orders .status-label.tone-error,
.cd-od-status-banner .status-label.tone-error {
  color: var(--rose-600);
  font-weight: 700;
}
.cd-writing-field-block {
  min-width: 0;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  overflow: hidden;
}
.cd-writing-field-label {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 14px;
  margin: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--ink-100);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-700);
  line-height: 1.4;
}
.cd-writing-field-body {
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-900);
}
.cd-writing-field-body.is-muted,
.cd-od-placeholder {
  color: var(--ink-400);
  font-style: italic;
}
.cd-order-detail .contact-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  font-size: 14px;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  overflow: hidden;
}
.cd-order-detail .contact-table th,
.cd-order-detail .contact-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink-100);
  vertical-align: top;
  line-height: 1.45;
}
.cd-order-detail .contact-table th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-700);
  width: 160px;
  background: var(--surface-2);
  white-space: nowrap;
}
.cd-order-detail .contact-table td {
  color: var(--ink-900);
  background: var(--surface);
}
.cd-order-detail .contact-table tr:last-child th,
.cd-order-detail .contact-table tr:last-child td {
  border-bottom: none;
}
.cd-order-detail .contact-table td a {
  color: var(--brand-600);
  text-decoration: none;
  word-break: break-word;
}
.cd-order-detail .contact-table td a:hover {
  text-decoration: underline;
}
.cd-od-text {
  white-space: pre-wrap;
}
.cd-od-empty {
  color: var(--ink-400);
  font-size: 13px;
}
.cd-upload-file-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: start;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
}
.cd-upload-file-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.cd-upload-file-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cd-upload-file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-900);
  line-height: 1.35;
  word-break: break-word;
}
.cd-upload-file-meta {
  font-size: 11.5px;
  color: var(--ink-400);
}
.cd-upload-file-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.cd-upload-file-actions .btn {
  padding: 4px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cd-od-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  width: 100%;
}
.cd-od-image-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--ink-100);
  border: 1px solid var(--ink-100);
}
.cd-od-image-thumb .image-thumb-preview {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}
.cd-od-image-thumb .image-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cd-od-image-dl {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: rgba(11, 21, 48, 0.78);
  color: #fff;
  border: none;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: opacity var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.cd-od-image-dl:hover,
.cd-od-image-dl:focus {
  color: #fff;
  text-decoration: none;
  background: rgba(11, 21, 48, 0.92);
}
.cd-od-image-dl svg {
  display: block;
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.cd-od-image-thumb:hover .cd-od-image-dl,
.cd-od-image-thumb:focus-within .cd-od-image-dl {
  opacity: 1;
}
.cd-od-youtube-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cd-od-yt-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 168px;
}
.cd-od-yt-card {
  position: relative;
  width: 100%;
  padding: 0;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--ink-900);
  cursor: pointer;
  transition: box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.cd-od-yt-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.cd-od-yt-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.cd-od-yt-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
}
.cd-od-yt-item .cd-copy-url-btn,
.cd-od-yt-link-row .cd-copy-url-btn {
  width: 100%;
  justify-content: center;
  gap: 4px;
}
.cd-copy-url-btn.is-copied {
  color: var(--green-700);
  border-color: var(--green-200);
  background: var(--green-50);
}
.cd-od-yt-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.cd-od-yt-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cd-od-link-line {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  color: var(--brand-600);
  word-break: break-all;
  text-decoration: none;
}
.cd-od-link-line:hover {
  text-decoration: underline;
}
.cd-od-loading {
  padding: 4px 0;
}
.cd-media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.cd-media-lightbox[hidden] {
  display: none !important;
}
.cd-media-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 21, 48, 0.72);
  backdrop-filter: blur(4px);
}
.cd-media-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: 90vh;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.cd-media-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-700);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.cd-media-lightbox-body {
  padding: 0;
  background: #000;
}
.cd-media-lightbox-img {
  display: block;
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  margin: 0 auto;
}
.cd-media-lightbox-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  min-height: 320px;
}
@media (max-width: 640px) {
  .cd-od-summary {
    grid-template-columns: 1fr;
  }
  .cd-order-detail .contact-table th {
    width: 120px;
  }
  .cd-upload-file-card {
    grid-template-columns: 40px 1fr;
  }
}
