/* ═══ INTEGRATION PAGE STYLES ═══ */

/* ---- STEP INDICATOR ---- */
.steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  padding: 24px 0;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}
.step.active { opacity: 1; }
.step.completed { opacity: 0.7; }
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--border); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  transition: all 0.3s ease;
}
.step.active .step-num { background: var(--primary); color: white; }
.step.completed .step-num { background: var(--success); color: white; }
.step-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.step.active .step-label { color: var(--text); }
.step-line { width: 48px; height: 2px; background: var(--border); margin: 0 12px; }

/* ---- STEP CONTENT ---- */
.step-content { display: none; animation: fadeIn 0.3s ease; }
.step-content.active { display: block; }

/* ---- HOW IT WORKS ---- */
.how-it-works-grid { display: flex; flex-direction: column; gap: 20px; }
.hiw-item { display: flex; align-items: flex-start; gap: 16px; }
.hiw-num {
  width: 36px; height: 36px; min-width: 36px; border-radius: 50%;
  background: rgba(139, 26, 26, 0.08); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700;
}
.hiw-item strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.hiw-item p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

/* ---- PRICING ---- */
.pricing-box { text-align: center; padding: 24px 0; }
.pricing-amount {
  display: flex; align-items: baseline; justify-content: center;
  gap: 2px; margin-bottom: 24px;
}
.pricing-currency { font-size: 1.5rem; font-weight: 600; color: var(--text-muted); align-self: flex-start; margin-top: 8px; }
.pricing-value { font-size: 4rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; line-height: 1; }
.pricing-period { font-size: 1.1rem; color: var(--text-muted); font-weight: 500; }
.pricing-features { list-style: none; text-align: left; max-width: 420px; margin: 0 auto; }
.pricing-features li {
  padding: 8px 0; font-size: 0.92rem; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.pricing-features li::before {
  content: ""; display: inline-block; width: 20px; height: 20px; min-width: 20px;
  background: var(--success-bg); border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23059669' stroke-width='2.5' viewBox='0 0 24 24'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 12px;
}

/* ---- PIMS GRID ---- */
.pims-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pims-item { text-align: center; padding: 24px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); }
.pims-item.available { border-color: var(--success); background: var(--success-bg); }
.pims-name { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.pims-status { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.pims-item.available .pims-status { color: var(--success); }
.pims-item.coming-soon .pims-status { color: var(--text-muted); }

/* ---- BUTTONS ---- */
.btn-lg { padding: 16px 40px; font-size: 1.05rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.checkout-hint { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; }
.checkout-hint a { color: var(--primary); }

/* ---- EXISTING LOGIN BAR ---- */
.existing-login-bar {
  text-align: center; padding: 20px; font-size: 0.88rem; color: var(--text-muted);
  border-top: 1px solid var(--border); margin-top: 32px;
}
.existing-login-bar a { color: var(--primary); font-weight: 600; }

/* ---- FORM STACK (vertical) ---- */
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-stack .form-group { position: relative; }
.form-stack .form-group input,
.form-stack .form-group select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: inherit;
  color: var(--text); background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-stack .form-group input:focus,
.form-stack .form-group select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.1);
}
.toggle-vis {
  position: absolute; right: 12px; top: 50%; transform: translateY(20%);
  background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px;
}
.toggle-vis:hover { color: var(--text); }

/* ---- INSTRUCTIONS ACCORDION ---- */
.instructions-box { margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.instructions-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg); border: none; cursor: pointer;
  font-size: 0.88rem; font-weight: 600; font-family: inherit; color: var(--primary);
  transition: background 0.15s;
}
.instructions-toggle:hover { background: rgba(139, 26, 26, 0.05); }
.instructions-toggle .chevron { transition: transform 0.2s ease; }
.instructions-box.open .instructions-toggle .chevron { transform: rotate(180deg); }
.instructions-body { display: none; padding: 16px; border-top: 1px solid var(--border); }
.instructions-box.open .instructions-body { display: block; }
.instructions-body ol { padding-left: 20px; font-size: 0.88rem; color: var(--text); line-height: 1.8; }
.instructions-note { margin-top: 12px; font-size: 0.82rem; color: var(--text-muted); }
.instructions-note a { color: var(--primary); }

/* ---- SECURITY NOTE ---- */
.security-note {
  display: flex; align-items: center; gap: 8px; margin-top: 16px;
  padding: 10px 14px; background: var(--success-bg); border-radius: var(--radius-sm);
  font-size: 0.8rem; color: var(--success); font-weight: 500;
}

/* ---- WRITE-BACK OPTION ---- */
.write-back-option { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ---- EMAIL RECIPIENTS ---- */
.email-recipients-area { }
.email-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; min-height: 36px; }
.email-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 20px;
  padding: 6px 12px; font-size: 0.85rem;
}
.email-chip button {
  background: none; border: none; cursor: pointer; font-size: 1.1rem;
  color: var(--text-muted); line-height: 1; padding: 0 2px;
}
.email-chip button:hover { color: var(--danger); }
.add-email-row { display: flex; gap: 8px; }
.add-email-row input {
  flex: 1; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; font-family: inherit; color: var(--text); background: var(--bg);
}
.add-email-row input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.1);
}

/* ---- NOTIFICATION PREFERENCES ---- */
.notif-option { padding: 4px 0; }
.notif-divider { height: 1px; background: var(--border); margin: 16px 0; }

.toggle-row {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  padding: 8px 0; user-select: none;
}
.toggle-row input[type="checkbox"] { display: none; }
.toggle-switch {
  width: 44px; height: 24px; min-width: 44px; border-radius: 12px;
  background: var(--border); position: relative;
  transition: background 0.2s ease; margin-top: 2px;
}
.toggle-switch::after {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: white;
  box-shadow: var(--shadow-sm); transition: transform 0.2s ease;
}
.toggle-row input[type="checkbox"]:checked + .toggle-switch { background: var(--primary); }
.toggle-row input[type="checkbox"]:checked + .toggle-switch::after { transform: translateX(20px); }
.toggle-content strong { display: block; font-size: 0.92rem; margin-bottom: 2px; }
.toggle-content p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; }

.notif-sub-option { margin-left: 56px; margin-top: 8px; }
.radio-row {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
  cursor: pointer; font-size: 0.88rem; user-select: none;
}
.radio-row input[type="radio"] { accent-color: var(--primary); }

.time-picker-row { display: flex; gap: 12px; align-items: flex-end; }
.time-picker-row select {
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; font-family: inherit; color: var(--text); background: var(--bg);
  cursor: pointer;
}
.time-picker-row select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.1);
}

/* ---- COMPLETE PAGE ---- */
.complete-card { text-align: center; padding: 48px 32px; }
.complete-icon { margin-bottom: 20px; }
.complete-card h1 { font-size: 2rem; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.complete-desc { font-size: 0.95rem; color: var(--text-muted); max-width: 560px; margin: 0 auto; line-height: 1.6; }
.what-happens-next { margin-top: 36px; text-align: left; max-width: 520px; margin-left: auto; margin-right: auto; }
.what-happens-next h3 {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 16px;
}
.next-items { display: flex; flex-direction: column; gap: 16px; }
.next-item { display: flex; align-items: flex-start; gap: 14px; }
.next-icon {
  width: 36px; height: 36px; min-width: 36px; border-radius: 50%;
  background: var(--info-bg); color: var(--info);
  display: flex; align-items: center; justify-content: center;
}
.next-item strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.next-item p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }
.next-item a { color: var(--primary); }

/* ---- DASHBOARD ---- */
.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.dash-header h1 { font-size: 1.5rem; font-weight: 700; }

.subscription-info { }
.sub-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.sub-row:last-child { border-bottom: none; }
.sub-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.sub-value { font-size: 0.9rem; color: var(--text); }
.sub-value a { color: var(--primary); }
.sub-value.badge { padding: 4px 12px; border-radius: 12px; font-size: 0.8rem; font-weight: 600; }

/* ---- SUCCESS MESSAGE ---- */
.success-msg {
  display: none; padding: 12px 16px;
  background: var(--success-bg); color: var(--success);
  border-radius: var(--radius-sm); font-size: 0.9rem; margin-top: 16px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .steps-bar { margin-bottom: 24px; }
  .step-label { display: none; }
  .step-line { width: 32px; margin: 0 6px; }
  .pims-grid { grid-template-columns: 1fr; gap: 10px; }
  .pricing-value { font-size: 3rem; }
  .complete-card { padding: 32px 16px; }
  .form-grid { grid-template-columns: 1fr !important; }
  .time-picker-row { flex-direction: column; }
  .dash-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}
