/* ═══════════════════════════════════════════════════════════════
   Decision Engine — Premium Dark UI Styles
   ═══════════════════════════════════════════════════════════════ */

/* ─── Input Section ──────────────────────────────────────────── */

.de-input-wrap {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  transition: border-color 0.3s ease;
}
.de-input-wrap:focus-within {
  border-color: rgba(124,92,252,0.3);
}

.de-input-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.de-input-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124,92,252,0.1);
  border-radius: 12px;
  flex-shrink: 0;
}
.de-input-title {
  font-size: 16px;
  font-weight: 800;
  color: #E8E8ED;
  font-family: 'Outfit', sans-serif;
}
.de-input-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}

.de-input-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.de-input-field {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #E8E8ED;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  resize: none;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}
.de-input-field:focus {
  border-color: rgba(124,92,252,0.4);
  box-shadow: 0 0 0 3px rgba(124,92,252,0.08);
}
.de-input-field::placeholder {
  color: rgba(255,255,255,0.25);
}

.de-category-select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(12,12,18,0.95);
  color: #E8E8ED;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  cursor: pointer;
}

.de-submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #7C5CFC 0%, #A78BFA 50%, #7C5CFC 100%);
  background-size: 200% 200%;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: de-grad-shift 3s ease infinite;
}
.de-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(124,92,252,0.3);
}
.de-submit-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
@keyframes de-grad-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ─── Result Card ────────────────────────────────────────────── */

.de-result-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.de-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.de-result-rec {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
}
.de-result-risk {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.de-result-summary {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* Score Rings */
.de-result-scores {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 24px;
}
.de-score-ring {
  position: relative;
  width: 90px;
  text-align: center;
}
.de-score-ring svg {
  width: 80px;
  height: 80px;
}
.de-score-value {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: 800;
  color: #E8E8ED;
  font-family: 'Outfit', sans-serif;
}
.de-score-label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}

/* Reasoning Columns */
.de-result-reasoning {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.de-reason-col {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
}
.de-reason-col.support { border-left: 3px solid #22C55E; }
.de-reason-col.risk { border-left: 3px solid #FC5C7C; }
.de-reason-head {
  font-size: 12px;
  font-weight: 700;
  color: #E8E8ED;
  margin-bottom: 8px;
}
.de-reason-item {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
  margin-bottom: 4px;
}

/* Timing */
.de-timing {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(224,165,38,0.04);
  border: 1px solid rgba(224,165,38,0.1);
  margin-bottom: 16px;
}
.de-timing-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.de-timing-text {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

/* Action Steps */
.de-steps {
  margin-bottom: 16px;
}
.de-steps-title {
  font-size: 14px;
  font-weight: 700;
  color: #E8E8ED;
  margin-bottom: 12px;
}
.de-step-item {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: border-color 0.2s ease;
}
.de-step-item:hover {
  border-color: rgba(124,92,252,0.15);
}
.de-step-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(124,92,252,0.1);
  color: #A78BFA;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.de-step-action {
  font-size: 13px;
  font-weight: 600;
  color: #E8E8ED;
  margin-bottom: 2px;
}
.de-step-timing {
  font-size: 11px;
  color: #E0A526;
}
.de-step-why {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}

/* Emotional Insight */
.de-emotional {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(167,139,250,0.04);
  border: 1px solid rgba(167,139,250,0.1);
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Remedy */
.de-remedy {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(224,165,38,0.04);
  border: 1px solid rgba(224,165,38,0.08);
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Optimal Window */
.de-window {
  padding: 14px;
  border-radius: 12px;
  background: rgba(34,197,94,0.04);
  border: 1px solid rgba(34,197,94,0.1);
}
.de-window-title {
  font-size: 13px;
  font-weight: 700;
  color: #22C55E;
  margin-bottom: 6px;
}
.de-window-dates {
  font-size: 14px;
  font-weight: 600;
  color: #E8E8ED;
  margin-bottom: 4px;
}
.de-window-reason {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

/* ─── Life Snapshot ──────────────────────────────────────────── */

.de-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .de-snapshot-grid { grid-template-columns: repeat(2, 1fr); }
}

.de-snapshot-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.3s ease, transform 0.2s ease;
}
.de-snapshot-card:hover {
  border-color: rgba(124,92,252,0.15);
  transform: translateY(-2px);
}
.de-snap-emoji { font-size: 24px; margin-bottom: 8px; }
.de-snap-value {
  font-size: 24px;
  font-weight: 800;
  color: #E8E8ED;
  font-family: 'Outfit', sans-serif;
}
.de-snap-value span {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.3);
}
.de-snap-label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}

.de-snapshot-card.mood { border-top: 2px solid #7C5CFC; }
.de-snapshot-card.confidence { border-top: 2px solid #E0A526; }
.de-snapshot-card.decisions { border-top: 2px solid #4CDBC4; }
.de-snapshot-card.health { border-top: 2px solid #FC5C7C; }

.de-snapshot-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  text-align: center;
  margin-top: 8px;
}

.de-snapshot-loading {
  text-align: center;
  padding: 30px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}
.de-snapshot-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}
.de-snapshot-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7C5CFC;
  animation: de-dot-pulse 1.2s ease infinite;
}
.de-snapshot-dots span:nth-child(2) { animation-delay: 0.2s; }
.de-snapshot-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes de-dot-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.de-snapshot-empty {
  text-align: center;
  padding: 30px;
}
.de-snapshot-empty-icon { font-size: 32px; margin-bottom: 8px; }
.de-snapshot-empty-text {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

/* ─── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  .de-result-reasoning { grid-template-columns: 1fr; }
  .de-result-scores { gap: 24px; }
}
