/* 1PX admin — matches Commerce7 dashboard visual language */
.onepx-shell {
  --bg: #F7F6FF;
  --surface: #FFFFFF;
  --surface-2: #FAF9FF;
  --surface-3: #F0EEFF;
  --indigo: #1E1B4B;
  --violet: #5B21B6;
  --purple: #7C6FF7;
  --purple-mid: #A599F5;
  --purple-pale: #EDE9FE;
  --purple-faint: #F5F3FF;
  --t1: #18172E;
  --t2: #4A4868;
  --t3: #9592B0;
  --t4: #C4C2D6;
  --green: #059669;
  --green-bg: #ECFDF5;
  --green-border: #A7F3D0;
  --amber: #B45309;
  --amber-bg: #FFFBEB;
  --amber-border: #FDE68A;
  --red: #DC2626;
  --red-bg: #FEF2F2;
  --red-border: #FECACA;
  --border: #EAE8F5;
  --border-2: #D5D2EC;
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-sm: 6px;
  --r-md: 10px;
  --r-xl: 18px;
  --shadow-sm: 0 1px 3px rgba(30, 27, 75, 0.06), 0 2px 8px rgba(30, 27, 75, 0.03);
  --t-fast: 120ms ease;
  max-width: 920px;
  margin: 12px 0 40px;
  font-family: var(--font);
  color: var(--t1);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.onepx-shell *,
.onepx-shell *::before,
.onepx-shell *::after {
  box-sizing: border-box;
}

.onepx-shell h1,
.onepx-shell h2,
.onepx-shell h3,
.onepx-shell p,
.onepx-shell ul,
.onepx-shell ol,
.onepx-shell li {
  margin: 0;
  padding: 0;
}

.onepx-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.onepx-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.onepx-header-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--t1);
}

.onepx-header-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--t3);
  margin-top: 2px;
}

.onepx-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}

.onepx-pill.ok {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.onepx-pill.warn {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.onepx-pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.onepx-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .onepx-layout {
    grid-template-columns: 1fr;
  }
}

.onepx-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.onepx-card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.onepx-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--t1);
}

.onepx-card-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--t4);
}

.onepx-card-body {
  padding: 20px;
}

.onepx-progress-wrap {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.onepx-progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
}

.onepx-progress-label,
.onepx-progress-val {
  font-family: var(--mono);
  font-size: 10px;
}

.onepx-progress-label {
  color: var(--t3);
}

.onepx-progress-val {
  color: var(--violet);
}

.onepx-progress-track {
  height: 3px;
  background: var(--border-2);
  border-radius: 100px;
  overflow: hidden;
}

.onepx-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4F46E5, #7C3AED);
  border-radius: 100px;
}

.onepx-next {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.03), rgba(91, 33, 182, 0.06));
  border-bottom: 1px solid var(--purple-pale);
}

.onepx-next-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 6px;
}

.onepx-next-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 6px;
}

.onepx-next-desc {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.6;
  margin-bottom: 14px;
}

.onepx-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.onepx-step {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.onepx-step:last-child {
  border-bottom: none;
}

.onepx-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  margin-top: 1px;
}

.onepx-step-icon.done {
  background: var(--green-bg);
  border: 1.5px solid var(--green-border);
  color: var(--green);
}

.onepx-step-icon.active {
  background: var(--purple-pale);
  border: 1.5px solid var(--purple-mid);
  color: var(--violet);
}

.onepx-step-icon.pending {
  background: var(--surface-2);
  border: 1.5px solid var(--border-2);
  color: var(--t4);
}

.onepx-step-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--t1);
  margin-bottom: 3px;
}

.onepx-step-title.muted {
  color: var(--t3);
  font-weight: 400;
}

.onepx-step-desc {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.6;
}

.onepx-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--purple-pale);
  color: var(--violet);
  border: 1px solid var(--purple-mid);
  margin-left: 8px;
  white-space: nowrap;
}

.onepx-hint {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--t3);
  line-height: 1.5;
}

.onepx-warn {
  margin-top: 12px;
  padding: 9px 12px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--amber);
  line-height: 1.5;
  font-family: var(--mono);
}

.onepx-blockers {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.onepx-blocker {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
  font-size: 12px;
  line-height: 1.5;
}

.onepx-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.onepx-checklist li {
  font-size: 13px;
  color: var(--t2);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.onepx-check {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--t4);
  min-width: 16px;
}

.onepx-check.ok {
  color: var(--green);
}

.onepx-findings {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}

.onepx-findings li {
  font-size: 12px;
  color: var(--t2);
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--mono);
  line-height: 1.5;
}

.onepx-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.onepx-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--t1);
  margin-bottom: 5px;
}

.onepx-input,
.onepx-select {
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--t1);
  outline: none;
  min-width: 220px;
}

.onepx-input:focus,
.onepx-select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 111, 247, 0.1);
}

.onepx-check-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 12px 0;
}

.onepx-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--t1);
}

.onepx-check-item:hover {
  background: var(--surface-2);
}

.onepx-check-item input {
  margin-top: 2px;
}

.onepx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}

.onepx-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.onepx-btn-primary {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
  box-shadow: 0 2px 8px rgba(91, 33, 182, 0.2);
}

.onepx-btn-primary:hover:not(:disabled) {
  opacity: 0.92;
}

.onepx-btn-outline {
  background: transparent;
  color: var(--violet);
  border: 1.5px solid var(--border-2);
}

.onepx-btn-outline:hover:not(:disabled) {
  border-color: var(--purple-mid);
  background: var(--purple-faint);
}

.onepx-btn-ghost {
  background: transparent;
  color: var(--t2);
  border: 1.5px solid var(--border);
}

.onepx-btn-danger {
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red-border);
}

.onepx-btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.onepx-kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.onepx-kpi {
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.onepx-kpi-val {
  font-size: 18px;
  font-weight: 500;
  color: var(--t1);
  letter-spacing: -0.3px;
  line-height: 1.1;
  word-break: break-word;
}

.onepx-kpi-val.dim {
  color: var(--t4);
  font-size: 13px;
}

.onepx-kpi-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--t3);
  margin-top: 4px;
}

.onepx-side-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px 20px;
}

.onepx-side-actions form {
  margin: 0;
}

.onepx-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--t4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.onepx-divider::before,
.onepx-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.onepx-muted {
  color: var(--t3);
}

.onepx-steps-list {
  list-style: none;
  display: none;
}

.onepx-health-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 14px;
}

.onepx-health-list li {
  font-size: 12px;
  color: var(--t2);
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  line-height: 1.45;
}

.onepx-health-list li.ok {
  border-color: var(--green-border);
  background: var(--green-bg);
  color: var(--green);
}

.onepx-health-list li.bad {
  border-color: var(--amber-border);
  background: var(--amber-bg);
  color: var(--amber);
}

.onepx-details {
  border-top: 1px solid var(--border);
}

.onepx-details > summary {
  cursor: pointer;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
  list-style: none;
}

.onepx-details > summary::-webkit-details-marker {
  display: none;
}

.onepx-details > summary::before {
  content: '▶';
  font-size: 9px;
  color: var(--t4);
  margin-right: 8px;
}

.onepx-details[open] > summary::before {
  content: '▼';
}

.onepx-details-body {
  padding: 0 20px 20px;
}

.onepx-inline-forms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.onepx-inline-forms form {
  margin: 0;
}

.onepx-shell .onepx-guide {
  list-style: decimal;
  margin: 0 0 14px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--t2);
  line-height: 1.5;
}

.onepx-shell .onepx-checklist-row {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 14px;
}

.onepx-issues {
  margin: 0 0 14px;
}

.onepx-details-flat {
  border-top: none;
}

.onepx-details-flat > summary {
  padding: 2px 0 10px;
}

.onepx-details-flat .onepx-details-body {
  padding: 0;
}
