/**
 * account/client-dashboard3.css
 * Index3-only layer on top of client-dashboard.css. Grey canvas, redesigned
 * orders table (tabs + search), simplified drafts, coupon cards, guides grid,
 * and order-details modal enhancements. Loaded only by index3.php.
 *
 * Border radius scale (uses brandpush.css tokens):
 *   --r-lg   outer surfaces — section cards, modals, standalone guide tiles
 *   --r-md   nested panels — inputs, coupons, alerts, summary chips, sheets
 *   --r-sm   compact controls — icon wells, focus rings, file badges
 *   --r-pill progress segments, count pills, circular badges
 */

/* ============================ Radius continuity ============================ */
/* Standalone guide tiles match section cards on the grey canvas. */
.cd3-page .cd3-guides-grid .cd-help-card {
  border-radius: var(--r-lg);
}

/* All modals share the same outer corner radius on index3. */
.cd3-page .cd-bootstrap-modal .modal-content {
  border-radius: var(--r-lg);
}
.cd3-page #order_modal.cd-bootstrap-modal .modal-content,
.cd3-page #order_modal.cd-bootstrap-modal .cd-review-modal-content {
  border-radius: var(--r-lg);
}

/* Article preview sheets are nested inside the review modal. */
.cd3-page #order_modal .cd-rev-frame,
.cd3-page #order_modal .cd-rev-preview-loading,
.cd3-page #order_modal .cd-rev-empty {
  border-radius: var(--r-xl);
}

/* Your account modal inputs match index3 field styling. */
.cd3-page #client_details_modal .form-control {
  border-radius: var(--r-md);
  border-color: var(--ink-200);
}
.cd3-page #client_details_modal .form-control:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(61, 99, 235, 0.12);
}

/* Progress segments use pill caps everywhere on index3. */
.cd3-page .status-step,
.cd3-page .cd3-c-status .status-step {
  border-radius: var(--r-pill);
}

/* ============================ Buttons ============================ */
/* Match the index3 mock: 8px corners, 13px type, blue primary + white secondary. */
.cd3-page .btn {
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  line-height: 1.35;
}
.cd3-page .btn.btn-sm {
  padding: 6px 12px !important;
  font-size: 13px !important;
}
.cd3-page .btn-primary {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}
.cd3-page .btn-primary:hover,
.cd3-page .btn-primary:focus {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: #fff;
}
.cd3-page .btn-secondary,
.cd3-page .btn-outline-secondary {
  background: var(--surface);
  border: 1px solid var(--ink-200);
  color: var(--ink-800);
}
.cd3-page .btn-secondary:hover,
.cd3-page .btn-secondary:focus,
.cd3-page .btn-outline-secondary:hover,
.cd3-page .btn-outline-secondary:focus {
  background: var(--ink-50);
  border-color: var(--ink-300);
  color: var(--ink-900);
}
.cd3-page .cd3-hero-actions .cd-templates-dropdown > .btn {
  background: var(--surface);
  border: 1px solid var(--ink-200);
  color: var(--ink-800);
}
.cd3-page .cd3-hero-actions .cd-templates-dropdown > .btn:hover,
.cd3-page .cd3-hero-actions .cd-templates-dropdown > .btn:focus {
  background: var(--ink-50);
  border-color: var(--ink-300);
  color: var(--ink-900);
}

/* ============================ Topbar (white header) ============================ */
.cd3-page .topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--ink-100);
}
.cd3-page .cd3-topbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
}
.cd3-page .cd3-topbar-left {
  display: flex;
  align-items: center;
  min-width: 0;
  justify-self: start;
}
.cd3-page .cd3-brand .brand-logo {
  display: block;
  height: 24px;
  width: auto;
}
.cd3-page .cd3-topbar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  justify-self: center;
}
.cd3-page .cd3-topbar-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-500);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.cd3-page .cd3-topbar-nav a:hover {
  color: var(--ink-900);
}
.cd3-page .cd3-topbar-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  justify-self: end;
}

.cd3-page .cd3-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
  border-radius: var(--r-md);
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
}
.cd3-page .cd3-user-trigger:hover {
  background: var(--surface-2);
}
.cd3-page .cd3-user-meta {
  text-align: right;
  line-height: 1.3;
}
.cd3-page .cd3-user-meta .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
  white-space: nowrap;
}
.cd3-page .cd3-user-meta .role {
  font-size: 12px;
  color: var(--ink-500);
  white-space: nowrap;
}
.cd3-page .cd3-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}
.cd3-page .cd3-user-chevron {
  width: 14px;
  height: 14px;
  color: var(--ink-400);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.cd3-page .cd3-user-trigger[aria-expanded="true"] .cd3-user-chevron {
  transform: rotate(180deg);
}

/* Account dropdown */
.cd3-page .cd-user-menu {
  min-width: 250px;
  padding: 6px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}
.cd3-page .cd-user-menu .bp-user-menu-head {
  padding: 10px 12px 8px;
  margin-bottom: 6px;
}
.cd3-page .cd-user-menu .bp-user-menu-head .name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}
.cd3-page .cd-user-menu .bp-user-menu-head .role {
  font-size: 12.5px;
  color: var(--ink-500);
  margin-top: 2px;
}
.cd3-page .cd-user-menu .bp-menu-item {
  padding: 9px 12px;
  font-size: 14px;
  border-radius: var(--r-sm);
  color: var(--ink-800);
}
.cd3-page .cd-user-menu .bp-menu-item:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}
.cd3-page .cd-user-menu .bp-menu-item svg {
  width: 16px;
  height: 16px;
  opacity: 1;
  stroke-width: 1.8;
}
.cd3-page .cd-user-menu .bp-menu-divider {
  margin: 6px 0;
  padding-top: 6px;
  border-top: 1px solid var(--ink-100);
  height: 0;
  background: none;
}
.cd3-page .cd-user-menu .bp-menu-logout {
  font-weight: 500;
  color: var(--rose-600);
}
.cd3-page .cd-user-menu .bp-menu-logout:hover {
  background: var(--rose-50);
  color: var(--rose-700);
}

@media (max-width: 820px) {
  .cd3-page .cd3-topbar-nav { gap: 16px; }
  .cd3-page .cd3-topbar-nav a { font-size: 13px; }
}
@media (max-width: 640px) {
  .cd3-page .cd3-topbar-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
  }
  .cd3-page .cd3-topbar-nav { display: none; }
  .cd3-page .cd3-topbar-left {
    flex: 0 1 auto;
    min-width: 0;
  }
  .cd3-page .cd3-topbar-right {
    flex: 0 0 auto;
    margin-left: auto;
  }
  .cd3-page .cd3-brand .brand-logo {
    height: 20px;
    width: auto;
    max-width: min(168px, 46vw);
  }
  .cd3-page .cd3-user-meta {
    display: none;
  }
  .cd3-page .cd3-user-trigger {
    gap: 6px;
    padding: 4px;
  }
  .cd3-page .cd3-user-avatar {
    width: 32px;
    height: 32px;
  }
}

/* ============================ Canvas ============================ */
body.cd3-page { background: var(--bg); }
.cd3-page .page.cd3-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 48px;
  background: transparent;
}
.cd3-page .cd3-section { margin-top: 26px; }

/* ============================ Hero ============================ */
.cd3-page .cd3-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
}
.cd3-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-600);
}
.cd3-hero-title {
  margin: 8px 0 6px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  line-height: 1.1;
}
.cd3-hero-sub { margin: 0; font-size: 15px; color: var(--ink-500); }
.cd3-hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Keep hero actions (Story Templates menu) above the cards below. */
.cd3-page #overview {
  position: relative;
  z-index: 5;
}
.cd3-page .cd-templates-dropdown .dropdown-menu {
  z-index: 20;
}

/* ============================ Card shell ============================ */
.cd3-card {
  background: var(--surface);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.cd3-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 20px 22px 14px;
}
.cd3-card-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink-900); }
.cd3-card-sub { margin: 4px 0 0; font-size: 13px; color: var(--ink-500); }
.cd3-card-body { padding: 10px 22px 20px; }
.cd3-card-body--flush { padding: 0; }
.cd3-inline-empty { padding: 2px 22px 18px; font-size: 13px; color: var(--ink-500); }

/* ============================ Orders: search + tabs ============================ */
.cd3-orders-tools { display: flex; align-items: center; gap: 8px; flex: 1 1 240px; max-width: 340px; }
.cd3-search { position: relative; flex: 1; }
.cd3-search i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-400); font-size: 13px;
}
.cd3-search input {
  width: 100%; height: 38px; padding: 0 12px 0 34px;
  font-size: 14px; color: var(--ink-900);
  border: 1px solid var(--ink-200); border-radius: var(--r-md); background: var(--surface);
}
.cd3-search input::placeholder { color: var(--ink-400); }
.cd3-search input:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(61, 99, 235, 0.12); }

.cd3-tabs {
  display: flex; gap: 0; padding: 0 22px;
  border-bottom: 1px solid var(--ink-100);
  overflow-x: auto; scrollbar-width: none;
}
.cd3-tabs::-webkit-scrollbar { display: none; }
.cd3-tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer;
  padding: 13px 2px; margin-right: 20px; margin-bottom: -1px;
  font-size: 14px; font-weight: 600; color: var(--ink-500);
  white-space: nowrap; border-bottom: 2px solid transparent;
}
.cd3-tab:hover { color: var(--ink-800, var(--ink-900)); }
.cd3-tab.is-active { color: var(--brand-600); border-bottom-color: var(--brand-600); }
.cd3-tab-count {
  font-size: 11px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--ink-100);
  border-radius: var(--r-pill); padding: 1px 7px; color: var(--ink-500);
}
.cd3-tab.is-active .cd3-tab-count { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-600); }

/* ============================ Orders: rows ============================ */
.cd3-orders-body { padding: 0; }
.cd3-orders-head,
.cd3-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1.9fr) minmax(0, 1.2fr) minmax(0, 1.1fr) 110px 138px;
  gap: 16px;
  align-items: center;
  padding: 13px 22px;
}
.cd3-orders-head {
  border-bottom: 1px solid var(--ink-100);
  background: var(--surface-2);
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-500);
}
.cd3-orders-head .cd3-h-action { text-align: right; }
.cd3-row {
  border-bottom: 1px solid var(--ink-100);
  cursor: pointer;
  transition: background 0.12s ease;
}
.cd3-row:last-of-type { border-bottom: none; }
.cd3-row:hover { background: var(--surface-2); }
.cd3-row:focus-visible { outline: 2px solid var(--brand-400); outline-offset: -2px; border-radius: var(--r-sm); }

.cd3-oid {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  word-break: break-all;
}
.cd3-osub { font-size: 12px; color: var(--ink-400); margin-top: 3px; }
.cd3-osub-estimate {
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 4px;
  line-height: 1.35;
}
.cd3-osub-estimate--warn { color: var(--amber-700); font-weight: 500; }
.cd3-osub-estimate--review { color: var(--brand-600); font-weight: 500; }
.cd3-brand { font-size: 14px; font-weight: 600; color: var(--ink-900); text-decoration: none; display: inline-block; }
a.cd3-brand:hover { color: var(--brand-600); text-decoration: underline; }
.cd3-site { font-size: 12px; color: var(--ink-500); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd3-c-action { display: flex; justify-content: flex-end; }
.cd3-c-action .btn { white-space: nowrap; }

/* Reuse the shared status stack, tightened for the grid cell. */
.cd3-c-status .status-stack { gap: 6px; }
.cd3-page .cd3-c-status .status-issue {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 400;
  margin-top: 2px;
  line-height: 1.35;
}
.cd3-page .cd3-c-status .status-issue--warn {
  color: var(--amber-700);
  font-weight: 500;
}
.cd3-page .cd3-c-status .status-issue--action a.cd-review-link {
  color: var(--brand-600);
  font-weight: 600;
  text-decoration: none;
}
.cd3-page .cd3-c-status .status-issue--action a.cd-review-link:hover {
  text-decoration: underline;
}
.cd3-c-status .status-timeline { max-width: 220px; }
.cd3-c-pkg .cd-pkg-cell,
.cd3-c-pay .cd-pay-cell { margin: 0; }
.cd3-c-pay .cd-pay-status {
  text-transform: none;
  letter-spacing: normal;
}

.cd3-orders-empty { padding: 44px 22px; text-align: center; font-size: 14px; color: var(--ink-500); }

/* ============================ Trustpilot banner ============================ */
.cd3-orders-card .cd3-trustpilot-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0;
  padding: 14px 22px;
  border-top: 1px solid rgba(22, 163, 74, 0.18);
  background: var(--green-50);
}
.cd3-trustpilot-copy {
  margin: 0;
  font-size: 14px;
  color: var(--ink-700);
  line-height: 1.45;
}
.cd3-trustpilot-copy strong { color: var(--ink-900); font-weight: 600; }

/* ============================ Drafts ============================ */
.cd3-drafts { display: flex; flex-direction: column; }
.cd3-draft-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 16px; padding: 14px 22px; border-top: 1px solid var(--ink-100);
}
.cd3-draft-row:first-child { border-top: none; }
.cd3-draft-brand { font-size: 14px; font-weight: 600; color: var(--ink-900); }
.cd3-draft-sub { font-size: 12.5px; color: var(--ink-500); margin-top: 2px; }
.cd3-draft-side { display: flex; align-items: center; gap: 16px; }
.cd3-draft-price { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink-700); }

/* ============================ Coupons ============================ */
.cd3-coupons { display: flex; flex-direction: column; gap: 10px; }
.cd3-coupon {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px dashed var(--ink-300); border-radius: var(--r-md); padding: 12px 14px;
}
.cd3-coupon-code { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--ink-900); }
.cd3-coupon-sub { font-size: 12.5px; color: var(--ink-500); margin-top: 2px; }
.cd3-inline-form { margin: 0; }

/* ============================ Quick answers ============================ */
.cd3-help-center-btn {
  align-self: flex-start;
  flex-shrink: 0;
}
.cd3-page .cd3-card-body .cd3-faq {
  padding: 2px 0 0;
}
.cd3-faq-foot { margin: 32px 0 0; font-size: 13px; color: var(--ink-500); }
.cd3-faq-foot a { color: var(--brand-600); font-weight: 600; }

/* ============================ Two column ============================ */
.cd3-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}
.cd3-two-col > .section {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.cd3-two-col .cd3-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.cd3-two-col .cd3-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.cd3-two-col .cd3-faq {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.cd3-two-col .cd3-faq-foot {
  margin-top: auto;
  padding-top: 20px;
}

/* ============================ Guides grid ============================ */
.cd3-guides-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.cd3-guides-more { font-size: 13px; font-weight: 600; color: var(--brand-600); text-decoration: none; white-space: nowrap; }
.cd3-guides-more:hover { text-decoration: underline; }
.cd3-guides-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cd3-guides-grid .cd-help-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  gap: 10px 12px;
  align-items: start;
  min-width: 0;
  width: auto;
  max-width: none;
  margin: 0;
  scroll-snap-align: none;
}
.cd3-guides-grid .cd-help-card-label {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
}
.cd3-guides-grid .cd-help-card-icon {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
}
.cd3-guides-grid .cd-help-card-title {
  grid-column: 1 / -1;
  grid-row: 2;
}
.cd3-guides-grid .cd-help-card-footer {
  grid-column: 1 / -1;
  grid-row: 3;
}
@media (max-width: 767px) {
  .cd3-guides-grid .cd-help-card:nth-child(n + 4) {
    display: none;
  }
}

/* ============================ Order details modal ============================ */
.cd3-page #order_details_modal.cd3-od-modal .cd3-od-dialog {
  max-width: 720px;
}

/* Status header: label + updated timestamp above the progress bar. */
#order_details_body .cd-order-detail--v3 .cd-od-status-banner {
  padding-bottom: 0;
}
#order_details_body .cd3-od-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#order_details_body .cd3-od-status-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
#order_details_body .cd3-od-status-label {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
#order_details_body .cd3-od-status-updated {
  font-size: 12px;
  color: var(--ink-500);
  white-space: nowrap;
}
#order_details_body .cd3-tone-review { color: var(--brand-600); }
#order_details_body .cd3-tone-issue { color: var(--rose-600); }
#order_details_body .cd3-tone-hold { color: var(--amber-700); }
#order_details_body .cd3-tone-success { color: var(--green-700); }
#order_details_body .cd3-tone-progress { color: var(--ink-800); }

#order_details_body .cd3-od-status .status-timeline {
  width: 100%;
  gap: 5px;
  margin-top: 0;
}
#order_details_body .cd3-od-status .status-step {
  flex: 1 1 0;
  height: 6px;
  border-radius: var(--r-pill);
}

#order_details_body .cd3-od-stages {
  display: flex;
  justify-content: space-between;
  margin-top: -2px;
  font-size: 11px;
  color: var(--ink-400);
}
#order_details_body .cd3-od-stages span { flex: 1; text-align: center; }
#order_details_body .cd3-od-stages span:first-child { text-align: left; }
#order_details_body .cd3-od-stages span:last-child { text-align: right; }

/* Alert notices at the top of the order details body. */
#order_details_body .cd3-od-alert {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  border: 1px solid transparent;
  border-left-width: 3px;
  width: 100%;
}
#order_details_body .cd3-od-alert--action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
#order_details_body .cd3-od-alert-text {
  flex: 1 1 0;
  min-width: min(100%, 12rem);
}
#order_details_body .cd3-od-alert--action .btn {
  flex-shrink: 0;
  margin-left: auto;
}
#order_details_body .cd3-alert-brand {
  background: var(--brand-50);
  color: var(--ink-800);
  border-color: var(--brand-100);
  border-left-color: var(--brand-500);
}
#order_details_body .cd3-alert-danger {
  background: var(--rose-50);
  color: var(--ink-800);
  border-color: var(--rose-100);
  border-left-color: var(--rose-500);
}
#order_details_body .cd3-alert-warning {
  background: var(--amber-50);
  color: var(--ink-800);
  border-color: var(--amber-100);
  border-left-color: var(--amber-500);
}
#order_details_body .cd3-alert-success {
  background: var(--green-50);
  color: var(--ink-800);
  border-color: var(--green-100);
  border-left-color: var(--green-500);
}
#order_details_body .cd3-alert-muted {
  background: var(--surface-2);
  color: var(--ink-700);
  border-color: var(--border-subtle);
  border-left-color: var(--ink-300);
}

/* Legacy status-issue styling (index2 fallback). */
#order_details_body .cd-od-status-banner .status-issue {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
  border-left: 3px solid var(--brand-500);
}
#order_details_body .status-stack:has(.status-label.tone-warn) .status-issue {
  background: var(--amber-50); color: var(--amber-700); border-color: var(--amber-100); border-left-color: var(--amber-500);
}
#order_details_body .status-stack:has(.status-label.tone-error) .status-issue {
  background: var(--rose-50); color: var(--rose-700); border-color: var(--rose-100); border-left-color: var(--rose-500);
}
#order_details_body .status-stack:has(.status-label.tone-success) .status-issue {
  background: var(--green-50); color: var(--green-700); border-color: var(--green-100); border-left-color: var(--green-500);
}
#order_details_body .cd-od-status-banner .status-issue a { color: inherit; font-weight: 700; text-decoration: underline; }

#order_details_body .cd-order-detail--v3 .cd-od-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 900px) {
  /* One equal column per card so 3 or 4 cards always span the full width. */
  #order_details_body .cd-order-detail--v3 .cd-od-summary {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
}
#order_details_body .cd3-od-summary-estimate strong {
  color: var(--brand-700);
}

.cd3-od-footer { justify-content: space-between !important; }
.cd3-od-footer-right { display: flex; gap: 10px; align-items: center; }
.cd3-od-support-short { display: none; }

@media (max-width: 767px) {
  .cd3-page #order_details_modal .cd3-od-footer {
    display: none;
  }
  .cd3-page #order_details_modal .modal-body {
    padding-bottom: 72px;
  }

  /* Nudge Intercom launcher closer to the bottom-right corner on mobile. */
  body.cd3-page .intercom-lightweight-app,
  body.cd3-page .intercom-lightweight-app-launcher,
  body.cd3-page #intercom-container,
  body.cd3-page #intercom-container .intercom-launcher,
  body.cd3-page .intercom-launcher {
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Footer */
.cd3-page .cd3-footer .cd-footer-inner {
  max-width: 1200px;
  padding-left: 24px;
  padding-right: 24px;
}
.cd3-footer .cd-footer-legal {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cd3-footer .cd-footer-disclaimer {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

/* ============================ SweetAlert confirmations (index3) ============================ */
body.cd3-page .swal2-container.cd-cdswal-container {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
body.cd3-page .cd-cdswal-popup.swal2-popup {
  border-radius: var(--r-lg) !important;
  border: 1px solid var(--ink-100);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.14),
    0 8px 16px rgba(15, 23, 42, 0.06);
  font-family: inherit;
}
body.cd3-page .cd-cdswal-icon-custom {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0.25rem auto 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  line-height: 1;
}
body.cd3-page .cd-cdswal-icon-custom--success {
  background: var(--green-50);
  color: var(--green-600);
  border: 2px solid rgba(22, 163, 74, 0.22);
}
body.cd3-page .cd-cdswal-icon-custom--error {
  background: #fef2f2;
  color: var(--rose-500, #ef4444);
  border: 2px solid rgba(239, 68, 68, 0.22);
}
/* Suppress SweetAlert's default animated icon (conflicts with iconHtml). */
body.cd3-page .cd-cdswal-popup .swal2-icon.cd-cdswal-icon {
  border: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0.25rem auto 0;
  background: transparent !important;
  color: inherit !important;
}
body.cd3-page .cd-cdswal-popup .swal2-icon.cd-cdswal-icon::before,
body.cd3-page .cd-cdswal-popup .swal2-icon.cd-cdswal-icon::after,
body.cd3-page .cd-cdswal-popup .swal2-icon.cd-cdswal-icon .swal2-success-ring,
body.cd3-page .cd-cdswal-popup .swal2-icon.cd-cdswal-icon .swal2-success-fix,
body.cd3-page .cd-cdswal-popup .swal2-icon.cd-cdswal-icon .swal2-success-circular-line-left,
body.cd3-page .cd-cdswal-popup .swal2-icon.cd-cdswal-icon .swal2-success-circular-line-right,
body.cd3-page .cd-cdswal-popup .swal2-icon.cd-cdswal-icon .swal2-success-line-tip,
body.cd3-page .cd-cdswal-popup .swal2-icon.cd-cdswal-icon .swal2-success-line-long,
body.cd3-page .cd-cdswal-popup .swal2-icon.cd-cdswal-icon .swal2-x-mark {
  display: none !important;
}
body.cd3-page .cd-cdswal-title.swal2-title {
  padding: 0;
  margin: 0.875rem 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
body.cd3-page .cd-cdswal-text.swal2-html-container {
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-500);
  font-weight: 400;
}
body.cd3-page .cd-cdswal-actions.swal2-actions {
  width: 100%;
  margin: 1.25rem 0 0;
  padding: 0;
}
body.cd3-page .cd-cdswal-confirm.swal2-confirm {
  width: 100%;
  margin: 0;
  padding: 9px 16px;
  border: none;
  border-radius: var(--r-sm);
  background: var(--brand-600);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: none;
  transition: background 0.12s ease;
}
body.cd3-page .cd-cdswal-confirm.swal2-confirm:hover,
body.cd3-page .cd-cdswal-confirm.swal2-confirm:focus {
  background: var(--brand-700);
  box-shadow: none;
}
body.cd3-page .cd-cdswal-confirm.swal2-confirm:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(61, 99, 235, 0.22);
}
@keyframes cd-cdswal-in {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes cd-cdswal-out {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to { opacity: 0; transform: scale(0.98) translateY(4px); }
}
body.cd3-page .cd-cdswal-show {
  animation: cd-cdswal-in 0.22s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)) both;
}
body.cd3-page .cd-cdswal-hide {
  animation: cd-cdswal-out 0.16s ease-in both;
}
body.cd3-page .cd-cdswal-backdrop-show {
  animation: bp-fade-in 0.2s var(--ease-out, ease-out) both;
}
@keyframes cd-cdswal-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
body.cd3-page .cd-cdswal-backdrop-hide {
  animation: cd-cdswal-backdrop-out 0.15s ease-in both;
}

/* ============================ Responsive ============================ */
@media (max-width: 980px) {
  .cd3-orders-head { display: none; }
  .cd3-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: flex-start;
    padding: 14px 16px;
  }
  .cd3-c-order { flex: 1 1 auto; min-width: 0; order: 1; }
  .cd3-c-action { margin-left: auto; order: 2; flex-shrink: 0; }
  .cd3-c-status {
    flex: 0 0 100%;
    width: 100%;
    order: 3;
  }
  .cd3-c-status .status-stack {
    width: 100%;
  }
  .cd3-c-status .status-timeline {
    width: 100%;
    max-width: none;
    gap: 4px;
  }
  .cd3-page .cd3-c-status .status-step {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }
  .cd3-c-brand {
    flex: 0 0 100%;
    width: 100%;
    order: 4;
  }
  .cd3-c-pkg {
    flex: 1 1 auto;
    min-width: 0;
    order: 5;
  }
  .cd3-c-pay {
    flex: 0 0 auto;
    order: 6;
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    text-align: right;
  }
  .cd3-c-pay .cd-pay-cell {
    align-items: flex-end;
  }
}
@media (max-width: 820px) {
  .cd3-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cd3-page .page.cd3-main { padding: 0 14px 40px; }
  .cd3-page .cd3-footer .cd-footer-inner {
    padding-left: 14px;
    padding-right: 14px;
  }
  .cd3-hero-title { font-size: 26px; }
}
