/* ============================================================
   ProfitWise — Design System CSS
   Inspired by Stripe × Notion × Mekari
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Custom Properties (Tokens) ── */
:root {
  /* Colors */
  --primary: #F97316;
  --primary-50: #FFF7ED;
  --primary-100: #FFEDD5;
  --primary-200: #FED7AA;
  --primary-500: #F97316;
  --primary-600: #EA6806;
  --primary-700: #C2560B;

  --success: #22C55E;
  --success-50: #F0FDF4;
  --success-100: #DCFCE7;
  --success-700: #15803D;

  --warning: #F59E0B;
  --warning-50: #FFFBEB;
  --warning-100: #FEF3C7;
  --warning-700: #B45309;

  --danger: #EF4444;
  --danger-50: #FEF2F2;
  --danger-100: #FEE2E2;
  --danger-700: #B91C1C;

  --neutral-50: #F8FAFC;
  --neutral-100: #F1F5F9;
  --neutral-200: #E2E8F0;
  --neutral-300: #CBD5E1;
  --neutral-400: #94A3B8;
  --neutral-500: #64748B;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1E293B;
  --neutral-900: #0F172A;

  /* Status Colors */
  --status-aman-bg: #F0FDF4;
  --status-aman-text: #15803D;
  --status-aman-border: #86EFAC;

  --status-revisi-bg: #FFFBEB;
  --status-revisi-text: #B45309;
  --status-revisi-border: #FCD34D;

  --status-berisiko-bg: #FFF7ED;
  --status-berisiko-text: #C2560B;
  --status-berisiko-border: #FDBA74;

  --status-rugi-bg: #FEF2F2;
  --status-rugi-text: #B91C1C;
  --status-rugi-border: #FCA5A5;

  /* Layout */
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --border-radius-lg: 24px;
  --border-radius-xl: 32px;

  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-bg: #0F172A;
  --sidebar-text: #CBD5E1;
  --sidebar-active: #F97316;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);

  /* Transitions */
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--neutral-800);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
}

input, textarea, select, button {
  font-family: var(--font);
}

/* ── Typography ── */
.text-xs   { font-size: 0.75rem; }
.text-sm   { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-3xl  { font-size: 1.875rem; }
.text-4xl  { font-size: 2.25rem; }
.text-5xl  { font-size: 3rem; }
.text-6xl  { font-size: 3.75rem; }

.font-normal  { font-weight: 400; }
.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }
.font-extrabold{font-weight: 800;}

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--neutral-500); }
.text-dark    { color: var(--neutral-800); }

/* ── Layout Utilities ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Spacing ── */
.p-0  { padding: 0; }
.p-2  { padding: 8px; }
.p-3  { padding: 12px; }
.p-4  { padding: 16px; }
.p-5  { padding: 20px; }
.p-6  { padding: 24px; }
.p-8  { padding: 32px; }

.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-auto { margin-top: auto; }

.w-full { width: 100%; }

/* ── Card ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-hover:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--neutral-300);
  transform: translateY(-1px);
  transition: all var(--transition);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 1px 2px rgb(249 115 22 / 0.3);
}

.btn-primary:hover {
  background: var(--primary-600);
  box-shadow: 0 4px 12px rgb(249 115 22 / 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--neutral-100);
  color: var(--neutral-700);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--neutral-200);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-50);
}

.btn-ghost {
  background: transparent;
  color: var(--neutral-600);
  border: none;
}

.btn-ghost:hover {
  background: var(--neutral-100);
  color: var(--neutral-800);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: var(--danger-700);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.8125rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: 12px;
}

.btn-xl {
  padding: 18px 36px;
  font-size: 1.0625rem;
  font-weight: 700;
  border-radius: 14px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-primary {
  background: var(--primary-100);
  color: var(--primary-700);
}

.badge-success {
  background: var(--success-100);
  color: var(--success-700);
}

.badge-warning {
  background: var(--warning-100);
  color: var(--warning-700);
}

.badge-danger {
  background: var(--danger-100);
  color: var(--danger-700);
}

.badge-neutral {
  background: var(--neutral-100);
  color: var(--neutral-600);
}

/* ── Status Badges (Large) ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1.5px solid;
}

.status-aman {
  background: var(--status-aman-bg);
  color: var(--status-aman-text);
  border-color: var(--status-aman-border);
}

.status-revisi {
  background: var(--status-revisi-bg);
  color: var(--status-revisi-text);
  border-color: var(--status-revisi-border);
}

.status-berisiko {
  background: var(--status-berisiko-bg);
  color: var(--status-berisiko-text);
  border-color: var(--status-berisiko-border);
}

.status-rugi {
  background: var(--status-rugi-bg);
  color: var(--status-rugi-text);
  border-color: var(--status-rugi-border);
}

/* ── Forms ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neutral-700);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--neutral-500);
}

.form-input {
  width: 100%;
  padding: 14px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--border-radius-sm);
  font-size: 0.9375rem;
  font-family: var(--font);
  color: var(--neutral-800);
  background: white;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(249 115 22 / 0.12);
}

.form-input:hover:not(:focus) {
  border-color: var(--neutral-300);
}

.form-input::placeholder {
  color: var(--neutral-400);
}

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

.input-prefix .prefix-text {
  position: absolute;
  left: 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--neutral-500);
  pointer-events: none;
}

.input-prefix .form-input {
  padding-left: 56px;
}

.input-prefix .suffix-text {
  position: absolute;
  right: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-500);
  pointer-events: none;
}

.input-prefix.has-suffix .form-input {
  padding-right: 64px;
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 42px;
}

/* Range slider */
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 100px;
  background: var(--neutral-200);
  outline: none;
  border: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgb(249 115 22 / 0.4);
  border: 3px solid white;
  transition: box-shadow var(--transition);
}

.range-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 4px 12px rgb(249 115 22 / 0.5);
}

/* ── App Layout ── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  padding: 28px 20px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
}

.logo-text span {
  color: var(--primary);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-section {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--neutral-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 8px 6px;
  margin-top: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  position: relative;
}

.menu-item:hover {
  background: rgb(255 255 255 / 0.06);
  color: white;
}

.menu-item.active {
  background: rgb(249 115 22 / 0.15);
  color: var(--primary);
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.menu-item.active svg,
.menu-item:hover svg {
  opacity: 1;
}

.menu-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.menu-item .nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
  min-width: 18px;
  text-align: center;
}

.nav-sub-item {
  padding-left: 40px;
  font-size: 0.8125rem;
  color: var(--neutral-500);
}

.nav-sub-item:hover {
  color: var(--sidebar-text);
}

.nav-sub-item.active {
  color: var(--primary);
  background: rgb(249 115 22 / 0.08);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgb(255 255 255 / 0.06);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
}

.sidebar-user:hover {
  background: rgb(255 255 255 / 0.06);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info .user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
}

.user-info .user-role {
  font-size: 0.6875rem;
  color: var(--neutral-500);
}

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Topbar ── */
.topbar {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-xs);
}

.topbar-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--neutral-800);
  flex: 1;
}

.topbar-breadcrumb {
  font-size: 0.875rem;
  color: var(--neutral-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-breadcrumb .sep { color: var(--neutral-300); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--neutral-500);
  transition: all var(--transition);
  position: relative;
}

.topbar-icon-btn:hover {
  background: var(--neutral-50);
  color: var(--neutral-700);
  border-color: var(--neutral-300);
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid white;
}

/* ── Page Body ── */
.page-body {
  flex: 1;
  padding: 32px;
}

/* ── Section Headers ── */
.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--neutral-900);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.9375rem;
  color: var(--neutral-500);
  margin-top: 4px;
}

/* ── Stats Cards ── */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--stat-accent, var(--primary));
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.stat-card.accent-success { --stat-accent: var(--success); }
.stat-card.accent-warning { --stat-accent: var(--warning); }
.stat-card.accent-danger  { --stat-accent: var(--danger); }

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--neutral-500);
  letter-spacing: 0.01em;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--neutral-900);
  letter-spacing: -0.03em;
  margin: 4px 0;
  line-height: 1.1;
}

.stat-change {
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

.stat-icon-wrap {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--stat-icon-bg, var(--primary-50));
}

/* ── Simulator Cards ── */
.sim-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 24px;
  cursor: pointer;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
}

.sim-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--sim-color, var(--primary-50)) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.sim-card:hover {
  border-color: var(--sim-color, var(--primary-200));
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.sim-card:hover::after {
  opacity: 1;
}

.sim-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sim-icon-bg, var(--primary-50));
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.sim-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--neutral-800);
  position: relative;
  z-index: 1;
}

.sim-card-desc {
  font-size: 0.875rem;
  color: var(--neutral-500);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.sim-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.sim-card-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--neutral-400);
}

/* ── AI Insight Card ── */
.ai-card {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: var(--border-radius);
  padding: 28px;
  color: white;
  position: relative;
  overflow: hidden;
}

.ai-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgb(249 115 22 / 0.15) 0%, transparent 70%);
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgb(249 115 22 / 0.15);
  border: 1px solid rgb(249 115 22 / 0.3);
  color: #FDBA74;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.ai-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.ai-content {
  font-size: 0.9375rem;
  color: rgb(203 213 225);
  line-height: 1.7;
}

.ai-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* ── Activity Feed ── */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-700);
}

.activity-meta {
  font-size: 0.8125rem;
  color: var(--neutral-400);
  margin-top: 2px;
}

/* ── Health Bar ── */
.health-bar-wrap {
  margin-bottom: 14px;
}

.health-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.health-bar-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-700);
}

.health-bar-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neutral-800);
}

.health-bar-track {
  height: 8px;
  background: var(--neutral-100);
  border-radius: 100px;
  overflow: hidden;
}

.health-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Form Pages ── */
.sim-form-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.form-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.form-section-header {
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--border);
}

.form-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--neutral-800);
}

.form-section-subtitle {
  font-size: 0.875rem;
  color: var(--neutral-500);
  margin-top: 3px;
}

.form-section-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }

.form-section-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  background: var(--neutral-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Preview Panel ── */
.preview-panel {
  position: sticky;
  top: 88px;
}

.preview-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.preview-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neutral-700);
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-body {
  padding: 20px;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-100);
}

.preview-row:last-child {
  border-bottom: none;
}

.preview-label {
  font-size: 0.8125rem;
  color: var(--neutral-500);
}

.preview-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--neutral-800);
}

.preview-value.highlight {
  color: var(--primary);
  font-size: 1.0625rem;
}

.preview-value.success-text {
  color: var(--success);
}

.preview-value.danger-text {
  color: var(--danger);
}

/* ── Result Page ── */
.result-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.result-status-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
}

.result-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--neutral-900);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.result-subtitle {
  font-size: 1rem;
  color: var(--neutral-500);
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* ── Recommendation Cards ── */
.rec-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all var(--transition);
}

.rec-card:hover {
  border-color: var(--neutral-300);
  box-shadow: var(--shadow-sm);
}

.rec-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rec-content .rec-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 3px;
}

.rec-content .rec-desc {
  font-size: 0.875rem;
  color: var(--neutral-500);
  line-height: 1.5;
}

/* ── Comparison Table ── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th {
  padding: 12px 16px;
  background: var(--neutral-50);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--neutral-600);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table td {
  padding: 14px 16px;
  font-size: 0.9375rem;
  color: var(--neutral-700);
  border-bottom: 1px solid var(--neutral-100);
}

.compare-table tr:hover td {
  background: var(--neutral-50);
}

.compare-table tr.highlighted td {
  background: var(--primary-50);
}

/* ── History Table ── */
.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th {
  padding: 12px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--neutral-500);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.history-table td {
  padding: 15px 16px;
  font-size: 0.875rem;
  color: var(--neutral-700);
  border-bottom: 1px solid var(--neutral-100);
  vertical-align: middle;
}

.history-table tr:hover td {
  background: var(--neutral-50);
}

/* ── Progress Steps ── */
.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: calc(16px + 8px);
  top: 16px;
  width: calc(100% - 32px - 8px);
  height: 2px;
  background: var(--border);
}

.step.completed::after,
.step.active::after {
  background: var(--primary-200);
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 2px solid var(--border);
  background: white;
  color: var(--neutral-400);
  flex-shrink: 0;
  z-index: 1;
}

.step.completed .step-number {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step.active .step-number {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--neutral-400);
}

.step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

.step.completed .step-label {
  color: var(--neutral-600);
}

/* ── Tooltip ── */
.tooltip-wrap {
  position: relative;
  display: inline-flex;
}

.tooltip-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--neutral-200);
  color: var(--neutral-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  cursor: help;
}

.tooltip-text {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--neutral-800);
  color: white;
  font-size: 0.75rem;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  max-width: 220px;
  white-space: normal;
  z-index: 999;
  box-shadow: var(--shadow-lg);
}

.tooltip-wrap:hover .tooltip-text {
  display: block;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--neutral-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--neutral-400);
}

.empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 0.875rem;
  color: var(--neutral-500);
  margin-bottom: 20px;
}

/* ── Chip / Tag ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: white;
  color: var(--neutral-600);
  cursor: pointer;
  transition: all var(--transition);
}

.chip:hover, .chip.active {
  border-color: var(--primary-200);
  background: var(--primary-50);
  color: var(--primary);
}

/* ── Chart ── */
.chart-container {
  position: relative;
  height: 200px;
  padding: 10px 0;
}

/* ── Landing Page ── */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 80px;
  height: 68px;
  background: rgba(255 255 255 / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226 232 240 / 0.8);
}

.landing-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--neutral-900);
  letter-spacing: -0.02em;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: 48px;
  flex: 1;
}

.landing-nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--neutral-600);
  transition: color var(--transition);
}

.landing-nav-links a:hover {
  color: var(--neutral-900);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-section {
  padding: 140px 80px 100px;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  color: var(--primary-700);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 900;
  color: var(--neutral-900);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-title .highlight {
  color: var(--primary);
  position: relative;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--neutral-500);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 44px;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 16px;
}

.proof-avatars {
  display: flex;
}

.proof-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid white;
  background: linear-gradient(135deg, #F97316, #EF4444);
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.proof-avatar:first-child { margin-left: 0; }

.proof-text {
  font-size: 0.875rem;
  color: var(--neutral-600);
}

.proof-text strong {
  color: var(--neutral-800);
  font-weight: 700;
}

/* Hero Visual */
.hero-visual {
  position: relative;
}

.hero-mockup {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0,0,0,0.04);
  overflow: hidden;
}

.mockup-topbar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--neutral-50);
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mockup-body {
  padding: 20px;
}

/* Features section */
.features-section {
  padding: 80px;
  background: white;
  border-top: 1px solid var(--border);
}

.features-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Questions section */
.questions-section {
  padding: 80px;
  background: var(--neutral-50);
  border-top: 1px solid var(--border);
}

.questions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.question-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition);
}

.question-card:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md);
}

.q-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.q-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--neutral-700);
  line-height: 1.4;
}

.q-module {
  font-size: 0.8125rem;
  color: var(--neutral-400);
  margin-top: 4px;
}

/* CTA Section */
.cta-section {
  padding: 100px 80px;
  background: linear-gradient(135deg, var(--neutral-900) 0%, #1E293B 100%);
  text-align: center;
}

.cta-title {
  font-size: 2.75rem;
  font-weight: 900;
  color: white;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 1.0625rem;
  color: var(--neutral-400);
  margin-bottom: 36px;
}

/* ── Auth Pages ── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px;
}

.auth-visual {
  background: linear-gradient(135deg, var(--neutral-900) 0%, #1E293B 100%);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-visual::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgb(249 115 22 / 0.12) 0%, transparent 70%);
}

.auth-form-side {
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
}

.auth-form-wrap {
  width: 100%;
  max-width: 360px;
}

/* ── Alerts ── */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid;
}

.alert-info {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}

.alert-success {
  background: var(--success-50);
  border-color: var(--status-aman-border);
  color: var(--success-700);
}

.alert-warning {
  background: var(--warning-50);
  border-color: var(--warning-100);
  color: var(--warning-700);
}

.alert-danger {
  background: var(--danger-50);
  border-color: var(--danger-100);
  color: var(--danger-700);
}

/* ── Misc ── */
.separator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--neutral-400);
  font-size: 0.875rem;
}

.separator::before, .separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--neutral-300); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--neutral-400); }

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-ring {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgb(249 115 22 / 0.4); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 12px rgb(249 115 22 / 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgb(249 115 22 / 0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.animate-in {
  animation: fadeInUp 0.4s ease both;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }

.pulse {
  animation: pulse-ring 2s infinite;
}

.spin {
  animation: spin 1s linear infinite;
}

/* ── Footer ── */
.site-footer {
  background: var(--neutral-900);
  color: var(--neutral-400);
  padding: 60px 80px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

/* ── Number Input Stepper ── */
.number-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.stepper-btn {
  width: 40px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-50);
  border: none;
  cursor: pointer;
  color: var(--neutral-500);
  font-size: 1.125rem;
  transition: all var(--transition);
}

.stepper-btn:hover {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.stepper-input {
  flex: 1;
  border: none;
  outline: none;
  text-align: center;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--neutral-800);
  padding: 10px 8px;
}

/* ── Loading ── */
.skeleton {
  background: linear-gradient(90deg, var(--neutral-100) 25%, var(--neutral-200) 50%, var(--neutral-100) 75%);
  background-size: 200px 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: 6px;
}

/* Toggle switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--neutral-200);
  border-radius: 100px;
  transition: all var(--transition);
  cursor: pointer;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ── Mobile Menu ── */
.mobile-menu-toggle {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .hero-section {
    padding: 120px 48px 80px;
  }
  .features-section, .questions-section, .cta-section {
    padding: 60px 48px;
  }
  .landing-nav {
    padding: 0 48px;
  }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }
  .sim-form-layout {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .hero-section {
    grid-template-columns: 1fr;
    padding: 100px 24px 60px;
    gap: 40px;
  }
  .features-section, .questions-section, .cta-section {
    padding: 48px 24px;
  }
  .landing-nav {
    padding: 0 24px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .questions-grid {
    grid-template-columns: 1fr;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .page-body {
    padding: 20px;
  }
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-visual {
    display: none;
  }
}
