* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.26), transparent 34%),
    linear-gradient(135deg, #07101f, #101827 55%, #0b1220);
  color: #f8fafc;
  min-height: 100vh;
}

.onboarding-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.onboarding-card {
  width: min(920px, 100%);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.38);
  padding: 30px;
  overflow: hidden;
}

.onboarding-top {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0b63ce, #38bdf8);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.42);
  position: relative;
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 9px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
}

.brand-mark::before { top: 20px; width: 20px; }
.brand-mark::after { top: 31px; width: 30px; }

.brand-f {
  font-style: italic;
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -0.08em;
  transform: translateX(5px);
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

h1, h2 { margin: 0; letter-spacing: -0.04em; }
h1 { font-size: 38px; }

p { color: #94a3b8; line-height: 1.55; }

.progress-wrap { margin-bottom: 26px; }

#progressText {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.progress-bar {
  height: 9px;
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  width: 14.28%;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.step-body { min-height: 380px; }

.step-title {
  font-size: 34px;
  margin-bottom: 10px;
}

.step-copy {
  max-width: 680px;
  font-size: 17px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 800;
}

input, select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(2, 6, 23, 0.62);
  color: #f8fafc;
  border-radius: 15px;
  padding: 14px 15px;
  font-size: 15px;
  outline: none;
}

input:focus, select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

.full { grid-column: 1 / -1; }

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  margin-top: 26px;
}

.feature {
  padding: 17px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.feature strong {
  display: block;
  margin-bottom: 5px;
}

.preview-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 24px;
}

.system-card-preview {
  width: 360px;
  border-radius: 18px;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #dbe4ef;
  box-shadow: 0 18px 45px rgba(0,0,0,0.25);
  overflow: hidden;
}

.system-card-preview .preview-brand {
  height: 54px;
  display: grid;
  place-items: center;
  font-weight: 950;
  color: #0b63ce;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.system-card-preview .preview-brand img {
  max-height: 42px;
  max-width: 280px;
  object-fit: contain;
}

.system-card-preview .preview-band {
  background: #0b63ce;
  color: white;
  text-align: center;
  padding: 12px 8px;
}

.system-card-preview .preview-name {
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.system-card-preview .preview-role {
  font-size: 11px;
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.system-card-preview .preview-id {
  text-align: center;
  padding: 9px 0 5px;
  font-weight: 900;
}

.system-card-preview .preview-codes {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 5px 16px 10px;
}

.fake-qr {
  width: 62px;
  height: 62px;
  border: 2px solid #111;
  border-radius: 4px;

  background:
    linear-gradient(#111 0 0) 8px 8px/18px 18px no-repeat,
    linear-gradient(#111 0 0) 36px 8px/18px 18px no-repeat,
    linear-gradient(#111 0 0) 8px 36px/18px 18px no-repeat,

    linear-gradient(#111 0 0) 28px 18px/6px 6px no-repeat,
    linear-gradient(#111 0 0) 36px 28px/6px 6px no-repeat,
    linear-gradient(#111 0 0) 24px 32px/6px 6px no-repeat,
    linear-gradient(#111 0 0) 18px 24px/6px 6px no-repeat,
    linear-gradient(#111 0 0) 44px 40px/6px 6px no-repeat,
    linear-gradient(#111 0 0) 32px 44px/6px 6px no-repeat,

    #fff;
}

.fake-barcode {
  width: 150px;
  height: 42px;
  background: repeating-linear-gradient(
    90deg,
    #111 0 3px,
    transparent 3px 6px,
    #111 6px 8px,
    transparent 8px 12px
  );
}



.system-card-preview .preview-footer {
  text-align: center;
  font-size: 8px;
  color: #64748b;
  padding-bottom: 5px;
}

.success-box {
  margin-top: 24px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(22, 163, 74, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.onboarding-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.button {
  border: 0;
  border-radius: 14px;
  padding: 14px 22px;
  font-weight: 900;
  cursor: pointer;
  color: #f8fafc;
}

.button.primary { background: linear-gradient(135deg, #2563eb, #0284c7); }
.button.ghost { background: rgba(148, 163, 184, 0.12); }
.button:disabled { opacity: 0.45; cursor: not-allowed; }

.notice {
  margin-top: 16px;
  color: #fca5a5;
  font-size: 14px;
}

@media (max-width: 720px) {
  .onboarding-card { padding: 20px; border-radius: 20px; }
  .form-grid, .feature-list { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
  .step-title { font-size: 27px; }
  .brand-mark { width: 58px; height: 58px; }
  .system-card-preview { width: 100%; }
  .onboarding-actions {
    position: sticky;
    bottom: 0;
    padding-top: 12px;
    background: rgba(15, 23, 42, 0.9);
  }
}

/* ===== COMPLETION SCREEN POLISH ===== */
.launch-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.launch-panel {
  background: rgba(30, 41, 59, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 18px;
}

.launch-panel h3 {
  margin: 4px 0 6px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.launch-panel p {
  margin: 0;
}

.full-panel {
  grid-column: 1 / -1;
}

.launch-kicker {
  color: #38bdf8;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.check-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: #e2e8f0;
}

.check-list li::before {
  content: "✓";
  color: #22c55e;
  font-weight: 950;
  margin-right: 8px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.metric-row div {
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}

.metric-row strong {
  display: block;
  font-size: 18px;
  color: #f8fafc;
}

.metric-row span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  margin-top: 4px;
}

.quick-launch-note {
  margin-top: 18px;
  color: #cbd5e1;
  font-weight: 800;
}

.launch-ready {
  text-align: center;
}

.ready-icon {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
  font-size: 40px;
  font-weight: 950;
  box-shadow: 0 18px 45px rgba(34, 197, 94, 0.28);
}

.launch-ready .launch-summary-grid {
  text-align: left;
}

@media (max-width: 720px) {
  .launch-summary-grid,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .full-panel {
    grid-column: auto;
  }
}
.clickable-launch {
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.08);
}


/* Plant Access Sharing - Onboarding */

.plant-access-onboarding-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
  margin-top: 22px;
}

.plant-id-share-card,
.plant-links-share-card {
  border: 1px solid rgba(125, 211, 252, 0.45);
  border-radius: 22px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.64);
}

.plant-id-share-card h3 {
  word-break: break-all;
  margin: 8px 0;
  color: #ffffff;
}

.plant-link-share-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.plant-link-share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(125, 211, 252, 0.22);
}

.plant-link-share-row div:first-child {
  min-width: 0;
}

.plant-link-share-row strong {
  display: block;
  color: #ffffff;
  margin-bottom: 4px;
}

.plant-link-share-row span {
  display: block;
  opacity: 0.78;
  margin-bottom: 8px;
}

.plant-link-share-row code {
  display: block;
  overflow-wrap: anywhere;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  font-size: 0.78rem;
}

.plant-link-share-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.full-copy-button {
  width: 100%;
  margin-top: 14px;
}

@media (max-width: 800px) {
  .plant-access-onboarding-grid,
  .plant-link-share-row {
    grid-template-columns: 1fr;
  }

  .plant-link-share-actions {
    justify-content: stretch;
  }

  .plant-link-share-actions .button,
  .plant-link-share-actions a.button {
    width: 100%;
  }
}


/* Plant Access Links - Onboarding Contrast Fix */

.plant-link-share-actions .button.secondary,
.plant-id-share-card .button.secondary,
.full-copy-button.button.secondary {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #ffffff;
  font-weight: 900;
}

.plant-link-share-actions .button.primary,
.plant-link-share-actions a.button.primary {
  background: linear-gradient(135deg, #0f62fe, #2563eb);
  color: #ffffff;
  border: 1px solid rgba(96, 165, 250, 0.75);
  font-weight: 900;
}

.plant-link-share-row code {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.plant-link-share-row {
  background: rgba(2, 6, 23, 0.64);
}


/* Phase 5B: Integrated Demo / Production Onboarding */
.plant-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.plant-type-card {
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.66);
  color: #f8fafc;
  border-radius: 22px;
  padding: 22px;
  cursor: pointer;
  display: grid;
  gap: 12px;
  min-height: 280px;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.plant-type-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.55);
}

.plant-type-card.selected {
  border-color: #38bdf8;
  background: rgba(14, 116, 144, 0.22);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.13);
}

.plant-type-card h3 {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.plant-type-card p {
  margin: 0;
  color: #cbd5e1;
}

.plant-type-card ul {
  margin: 0;
  padding-left: 20px;
  color: #e2e8f0;
  line-height: 1.55;
}

.plant-type-badge {
  justify-self: start;
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: .75rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.plant-type-badge.demo {
  background: rgba(34, 197, 94, .15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, .25);
}

.plant-type-badge.production {
  background: rgba(245, 158, 11, .18);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, .28);
}

.activation-step-card {
  margin-top: 26px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.24), rgba(15, 23, 42, 0.72));
  border-radius: 24px;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.activation-step-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.activation-step-header h3 {
  margin: 4px 0 0;
  font-size: 1.55rem;
}

.activation-help {
  color: #cbd5e1;
  font-size: .95rem;
  line-height: 1.45;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.activation-help strong {
  color: #ffffff;
}

.activation-actions-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.selected-mode-strip {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.selected-mode-strip.demo {
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.22);
}

.selected-mode-strip.production {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
}

.selected-mode-strip span {
  color: #cbd5e1;
  font-weight: 750;
}

.preview-codes{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-top:8px;
}

.fake-barcode{
  width:120px;
  height:42px;
  background:repeating-linear-gradient(
    90deg,
    #111 0 3px,
    transparent 3px 6px,
    #111 6px 8px,
    transparent 8px 12px
  );
}






@media (max-width: 720px) {
  .plant-type-grid {
    grid-template-columns: 1fr;
  }

  .plant-type-card {
    min-height: 0;
  }

  .activation-step-header,
  .selected-mode-strip {
    flex-direction: column;
    align-items: flex-start;
  }
}

.onboarding-feature-list{
  margin-top:24px;
  padding:20px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.2);
  background:rgba(255,255,255,.03);
  display:grid;
  gap:10px;
}

.onboarding-feature-list div{
  font-weight:600;
  color:#e2e8f0;
}




/* =========================================================
   ONBOARDING CLEANUP - TRAINING READY
   ========================================================= */
.compact-ready .step-title {
  margin-bottom: 8px;
}

.compact-ready .ready-copy {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.ready-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px auto 18px;
  max-width: 680px;
  text-align: left;
}

.ready-check-grid > div {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.68);
  border: 1px solid rgba(125, 211, 252, 0.24);
  color: #f8fafc;
  font-weight: 900;
}

.ready-summary-card {
  max-width: 680px;
  margin: 18px auto 0;
  text-align: left;
}

.launch-admin-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  min-height: 56px;
  margin: 8px auto 16px;
  font-size: 1.05rem;
  font-weight: 950;
}

.plant-links-details {
  max-width: 820px;
  margin: 18px auto 0;
  text-align: left;
}

.plant-links-details summary {
  cursor: pointer;
  color: #dbeafe;
  font-weight: 900;
  text-align: center;
  padding: 12px;
}

.compact-links-grid {
  margin-top: 10px;
}

@media (max-width: 720px) {
  .ready-check-grid {
    grid-template-columns: 1fr;
  }

  .launch-admin-now {
    width: 100%;
  }
}
