/**
 * Auto SL/TP Cloud Styling — SUPPER AI
 * Đồng bộ màu sắc Dark Fintech & Font chữ Plus Jakarta Sans
 */
html,
body.lp-auto-sltp {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch !important;
  position: relative !important;
}

body.lp-auto-sltp * {
  box-sizing: border-box !important;
}

.sltp-shell {
  max-width: 58rem;
  width: 100% !important;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.sltp-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.sltp-hero h1 {
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0.75rem 0 1rem;
  letter-spacing: -0.02em;
}

.sltp-hero h1 span {
  background: linear-gradient(135deg, var(--lp-green) 0%, var(--lp-green-dark) 50%, #a7f3d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sltp-hero__lead {
  font-size: 1.05rem;
  color: var(--lp-text-2);
  max-width: 40rem;
  margin: 0 auto;
  line-height: 1.6;
}

/* Card chính */
.sltp-card {
  background: rgba(18, 21, 26, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.sltp-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lp-green), transparent);
}

.sltp-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.sltp-card__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sltp-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lp-green-dark);
}

.sltp-card__title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.sltp-card__title p {
  font-size: 0.85rem;
  color: var(--lp-text-3);
  margin: 0.2rem 0 0;
}

/* Badge trạng thái live */
.sltp-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.sltp-status-badge--ready {
  background: rgba(255, 255, 255, 0.06);
  color: var(--lp-text-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sltp-status-badge--active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.sltp-status-badge--paused {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.sltp-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: sltpPulseAnim 2s infinite;
}

@keyframes sltpPulseAnim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Form Styles */
.sltp-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.sltp-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sltp-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--lp-text);
  display: flex;
  justify-content: space-between;
}

.sltp-field label span.hint {
  font-weight: 400;
  color: var(--lp-text-3);
  font-size: 0.8rem;
}

.sltp-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sltp-input {
  width: 100%;
  background: #090c10;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 16px !important;
  color: #fff;
  font-family: inherit;
  transition: all 0.2s ease;
}

.sltp-input:focus {
  outline: none;
  border-color: var(--lp-green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  background: #0d1117;
}

.sltp-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239aa3ad' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 18px;
}

.sltp-select option {
  background-color: #0d1117;
  color: #fff;
}

.sltp-pw-toggle {
  position: absolute;
  right: 0.85rem;
  background: transparent;
  border: 0;
  color: var(--lp-text-3);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sltp-pw-toggle:hover {
  color: #fff;
}

/* 3 Mức Lựa Chọn SL/TP Cố Định */
.sltp-preset-section {
  margin-bottom: 2.25rem;
}

.sltp-section-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sltp-section-desc {
  font-size: 0.85rem;
  color: var(--lp-text-3);
  margin-bottom: 1.15rem;
}

.sltp-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .sltp-presets-grid {
    grid-template-columns: 1fr;
  }
}

.sltp-preset-card {
  position: relative;
  background: #0a0d13;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sltp-preset-card:hover {
  border-color: rgba(34, 197, 94, 0.35);
  background: #0f141d;
  transform: translateY(-2px);
}

.sltp-preset-card.is-selected {
  border-color: var(--lp-green);
  background: rgba(34, 197, 94, 0.08);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.15);
}

.sltp-preset-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--lp-text-2);
  margin-bottom: 0.75rem;
  width: fit-content;
}

.sltp-preset-card.is-selected .sltp-preset-tag {
  background: rgba(34, 197, 94, 0.2);
  color: var(--lp-green-dark);
}

.sltp-preset-tag--recommended {
  background: rgba(34, 197, 94, 0.18) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.sltp-preset-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.sltp-preset-card.is-selected .sltp-preset-title {
  color: #4ade80;
}

.sltp-preset-desc {
  font-size: 0.8rem;
  color: var(--lp-text-3);
  line-height: 1.45;
}

.sltp-preset-radio {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sltp-preset-card.is-selected .sltp-preset-radio {
  border-color: var(--lp-green);
  background: var(--lp-green);
}

.sltp-preset-card.is-selected .sltp-preset-radio::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #070809;
}

/* Nút Submit */
.sltp-btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--lp-green) 0%, #16a34a 100%);
  color: #041009;
  border: 0;
  border-radius: 14px;
  padding: 1.05rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
  transition: all 0.2s ease;
  font-family: inherit;
}

.sltp-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.5);
  filter: brightness(1.08);
}

.sltp-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Dashboard khi đã kích hoạt (Active State Panel) */
.sltp-active-panel {
  background: #090d13;
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sltp-active-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sltp-active-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sltp-active-info-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.sltp-active-info-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--lp-text-3);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sltp-active-info-item strong {
  font-size: 1.05rem;
  color: #fff;
  font-weight: 700;
}

.sltp-active-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Security Callout Grid */
.sltp-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.sltp-feat-card {
  background: rgba(18, 21, 26, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.35rem 1.25rem;
  transition: all 0.2s ease;
}

.sltp-feat-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(18, 21, 26, 0.8);
}

.sltp-feat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lp-green-dark);
  margin-bottom: 0.85rem;
}

.sltp-feat-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: #fff;
}

.sltp-feat-card p {
  font-size: 0.85rem;
  color: var(--lp-text-3);
  margin: 0;
  line-height: 1.5;
}

/* Alert Notification */
.sltp-alert {
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sltp-alert.hidden {
  display: none !important;
}

.sltp-alert--success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.sltp-alert--error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

/* Plan Banner & Custom Preset Styling */
.sltp-plan-banner {
  border-radius: 16px;
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.sltp-plan-banner--locked {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(249, 115, 22, 0.1) 100%);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #fef08a;
}

.sltp-plan-banner--active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.sltp-plan-banner__title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sltp-plan-banner__desc {
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.45;
}

.sltp-custom-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 1.15rem;
  margin-top: 1rem;
}

.sltp-custom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.sltp-chips-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.sltp-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--lp-text-2);
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sltp-chip:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--lp-green-dark);
  color: #fff;
}

.sltp-gold-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #facc15;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.5rem;
}
