/* ===== Global ===== */
* { box-sizing: border-box; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }

/* ===== Navigation ===== */
.nav-item { transition: all 0.2s; cursor: pointer; }
.nav-item:hover { transform: translateY(-1px); }
.nav-item.active { background: linear-gradient(135deg, #16a34a, #15803d); color: white; box-shadow: 0 4px 12px rgba(22,163,74,0.3); }
.nav-item.completed { border-left: 3px solid #22c55e; }

/* ===== Cards ===== */
.card { background: white; border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06); transition: box-shadow 0.2s; }
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* ===== Inputs ===== */
.form-input {
  width: 100%; padding: 10px 14px; border: 1.5px solid #e5e7eb; border-radius: 10px;
  font-size: 14px; transition: all 0.2s; background: #f9fafb;
}
.form-input:focus { outline: none; border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.15); background: white; }
.form-input-sm { padding: 6px 10px; font-size: 13px; }

/* ===== Buttons ===== */
.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a); color: white;
  padding: 12px 28px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: none; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(22,163,74,0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(22,163,74,0.35); }
.btn-secondary {
  background: white; color: #374151; padding: 10px 20px; border-radius: 10px;
  font-weight: 500; border: 1.5px solid #e5e7eb; cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { border-color: #22c55e; color: #16a34a; }
.btn-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.btn-danger:hover { background: #fee2e2; }

/* ===== Section Headers ===== */
.section-header {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-left: 4px solid #22c55e; padding: 16px 20px; border-radius: 0 12px 12px 0;
  margin-bottom: 24px;
}

/* ===== Status Badges ===== */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red { background: #fef2f2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f3f4f6; color: #4b5563; }

/* ===== Level Indicator ===== */
.level-step { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.level-step.active { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; box-shadow: 0 2px 8px rgba(22,163,74,0.3); }
.level-step.done { background: #dcfce7; color: #166534; }
.level-step.future { background: #f3f4f6; color: #9ca3af; }
.level-connector { width: 60px; height: 3px; }
.level-connector.done { background: #22c55e; }
.level-connector.future { background: #e5e7eb; }

/* ===== Tooltip ===== */
.tooltip { position: relative; }
.tooltip::after {
  content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: #1f2937; color: white; padding: 4px 10px; border-radius: 6px; font-size: 12px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.tooltip:hover::after { opacity: 1; }

/* ===== Slider ===== */
input[type="range"] { -webkit-appearance: none; width: 100%; height: 6px; border-radius: 5px; background: #e5e7eb; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #22c55e; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }

/* ===== Animations ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.slide-up { animation: slideUp 0.5s ease; }
@keyframes pulse-green { 0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); } 50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }
.pulse-green { animation: pulse-green 2s infinite; }

/* ===== AI Modal ===== */
#ai-modal .backdrop-blur-sm { backdrop-filter: blur(4px); }
#ai-stream-text h2, #ai-stream-text h3, #ai-stream-text h4 { margin-top: 1rem; }
#ai-stream-text ul { list-style: none; padding: 0; }
#ai-stream-text strong { color: #1f2937; }

/* ===== AI sparkle button ===== */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.ai-shimmer {
  background: linear-gradient(90deg, #9333ea 0%, #6366f1 25%, #a855f7 50%, #6366f1 75%, #9333ea 100%);
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .sidebar.open { display: flex; position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: 280px; }
  .mobile-menu { display: flex !important; }
}
