/*
 * XpressBoost dashboard contrast and shell stabilization — v1.4.1.1
 *
 * This file is intentionally limited to presentation. It does not change
 * order creation, wallet accounting, WooCommerce, PayTech or PayPal flows.
 */
.xpb-dashboard-claude {
  color-scheme: light;
  isolation: isolate;
}

.xpb-dashboard-claude[data-theme="dark"] {
  color-scheme: dark;
}

/* Keep the application shell independent from theme and page-builder styles. */
.xpb-dashboard-claude .main,
.xpb-dashboard-claude .content {
  background: var(--panel-bg) !important;
}

.xpb-dashboard-claude .side {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.xpb-dashboard-claude .side .brand-name,
.xpb-dashboard-claude .side .brand-name b,
.xpb-dashboard-claude .side .brand-name span,
.xpb-dashboard-claude .side .nav a,
.xpb-dashboard-claude .side .nav a svg,
.xpb-dashboard-claude .side .side-foot a {
  color: inherit;
}

.xpb-dashboard-claude .side .brand-name,
.xpb-dashboard-claude .side .brand-name b,
.xpb-dashboard-claude .side .nav a.active {
  color: #fff !important;
}

.xpb-dashboard-claude .side .brand-name span {
  color: #b9c6e6 !important;
}

/* Light mode: readable neutral surfaces without recolouring dark hero content. */
.xpb-dashboard-claude:not([data-theme="dark"]) {
  background: #eef2f9 !important;
  color: #0c1426 !important;
}

.xpb-dashboard-claude:not([data-theme="dark"]) .card,
.xpb-dashboard-claude:not([data-theme="dark"]) .stat,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-panel,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-wizard-shell,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-service-catalog-card,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-services-intro,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-profile-card,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-api-box,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-api-endpoints article {
  background: #fff !important;
  border-color: #e4eaf4 !important;
  color: #0c1426 !important;
}

.xpb-dashboard-claude:not([data-theme="dark"]) .section-title,
.xpb-dashboard-claude:not([data-theme="dark"]) .card-h h3,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-panel h2,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-panel h3,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-service-catalog-card b,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-service-combo-name,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-step-title,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-wizard-title {
  color: #0c1426 !important;
  opacity: 1 !important;
}

.xpb-dashboard-claude:not([data-theme="dark"]) p,
.xpb-dashboard-claude:not([data-theme="dark"]) small,
.xpb-dashboard-claude:not([data-theme="dark"]) .muted,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-muted,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-field-help,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-wizard-subtitle,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-service-catalog-meta,
.xpb-dashboard-claude:not([data-theme="dark"]) .xpb-services-intro p {
  color: #64748b !important;
}

/* Hero and branded actions must remain light on dark backgrounds. */
.xpb-dashboard-claude .hero,
.xpb-dashboard-claude .hero h1,
.xpb-dashboard-claude .hero h2,
.xpb-dashboard-claude .hero strong,
.xpb-dashboard-claude .hero b {
  color: #fff !important;
}

.xpb-dashboard-claude .hero .eyebrow {
  color: #9fb6f2 !important;
}

.xpb-dashboard-claude .hero p:not(.eyebrow) {
  color: #c3cee8 !important;
}

.xpb-dashboard-claude .hero-cta {
  background: #fff !important;
  color: #0c1426 !important;
}

.xpb-dashboard-claude .xpb-btn-primary,
.xpb-dashboard-claude button[type="submit"],
.xpb-dashboard-claude .xpb-order-pay-now,
.xpb-dashboard-claude .btn-primary {
  color: #fff !important;
}

/* Form controls inherit the active dashboard palette. */
.xpb-dashboard-claude input,
.xpb-dashboard-claude select,
.xpb-dashboard-claude textarea {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border-color: var(--line-strong) !important;
}

.xpb-dashboard-claude input::placeholder,
.xpb-dashboard-claude textarea::placeholder {
  color: var(--ink-3) !important;
  opacity: 1;
}

.xpb-dashboard-claude select option {
  background: var(--surface);
  color: var(--ink);
}

/* Topbar preferences stay compact and readable. */
.xpb-dashboard-claude .topbar {
  min-height: 68px;
}

.xpb-dashboard-claude .pref-pill {
  min-height: 40px;
}

.xpb-dashboard-claude .pref-pill select {
  width: auto;
  min-width: 78px;
}

.xpb-dashboard-claude .seg a {
  min-width: 34px;
  text-align: center;
}

.xpb-dashboard-claude .seg a:not(.on):hover {
  background: var(--surface-2);
  color: var(--ink);
}

.xpb-dashboard-claude .icon-btn:hover,
.xpb-dashboard-claude .avatar:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.xpb-dashboard-claude .avatar {
  text-decoration: none !important;
}

/* Dark mode: remove hard-coded white catalogue/form surfaces. */
.xpb-dashboard-claude[data-theme="dark"] .card,
.xpb-dashboard-claude[data-theme="dark"] .stat,
.xpb-dashboard-claude[data-theme="dark"] .xpb-panel,
.xpb-dashboard-claude[data-theme="dark"] .xpb-wizard-shell,
.xpb-dashboard-claude[data-theme="dark"] .xpb-service-catalog-card,
.xpb-dashboard-claude[data-theme="dark"] .xpb-services-intro,
.xpb-dashboard-claude[data-theme="dark"] .xpb-profile-card,
.xpb-dashboard-claude[data-theme="dark"] .xpb-api-box,
.xpb-dashboard-claude[data-theme="dark"] .xpb-api-endpoints article,
.xpb-dashboard-claude[data-theme="dark"] .xpb-services-search input {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

.xpb-dashboard-claude[data-theme="dark"] .xpb-service-catalog-card b,
.xpb-dashboard-claude[data-theme="dark"] .xpb-services-intro h3,
.xpb-dashboard-claude[data-theme="dark"] .section-title,
.xpb-dashboard-claude[data-theme="dark"] .card-h h3 {
  color: var(--ink) !important;
}

.xpb-dashboard-claude[data-theme="dark"] .xpb-services-intro p,
.xpb-dashboard-claude[data-theme="dark"] .xpb-service-catalog-meta,
.xpb-dashboard-claude[data-theme="dark"] .xpb-service-catalog-head small,
.xpb-dashboard-claude[data-theme="dark"] .xpb-service-catalog-price span,
.xpb-dashboard-claude[data-theme="dark"] .xpb-service-catalog-price small {
  color: var(--ink-2) !important;
}

/* Responsive shell: keep controls visible without creating unreadable rows. */
@media (max-width: 1080px) {
  .xpb-dashboard-claude .topbar {
    align-items: center;
  }

  .xpb-dashboard-claude .pref {
    gap: 8px;
  }
}

@media (max-width: 720px) {
  .xpb-dashboard-claude .topbar {
    gap: 9px;
  }

  .xpb-dashboard-claude .crumb {
    min-width: 0;
    flex: 1;
  }

  .xpb-dashboard-claude .crumb b {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .xpb-dashboard-claude .topbar-spacer {
    display: none;
  }

  .xpb-dashboard-claude .pref {
    order: 4;
  }

  .xpb-dashboard-claude .pref-pill {
    min-width: 0;
  }

  .xpb-dashboard-claude .pref-pill select {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .xpb-dashboard-claude .seg {
    display: flex !important;
  }

  .xpb-dashboard-claude .avatar {
    display: grid !important;
  }

  .xpb-dashboard-claude .pref .pref-pill:first-child {
    display: flex !important;
  }

  .xpb-dashboard-claude .pref {
    grid-template-columns: 1fr 1fr !important;
  }
}
