@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg-deep: #f0f2f8;
  --bg-primary: #f5f7fb;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.6);
  --border: rgba(0, 0, 0, 0.08);
  --border-active: rgba(99, 102, 241, 0.4);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --indigo: #6366f1;
  --violet: #7c3aed;
  --purple: #9333ea;
  --cyan: #0891b2;
  --emerald: #059669;
  --amber: #d97706;
  --rose: #e11d48;
  --sky: #0284c7;
  --grad-hero: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --grad-emerald: linear-gradient(135deg, #059669, #0891b2);
  --grad-amber: linear-gradient(135deg, #d97706, #e11d48);
  --grad-sky: linear-gradient(135deg, #0284c7, #6366f1);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.08);
  --shadow-glow-indigo: 0 8px 30px rgba(99, 102, 241, 0.12);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Soft gradient background */
.bg-effects {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f2f8 0%, #e8eaf6 50%, #f0f2f8 100%);
}

.bg-effects .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  animation: orbFloat 25s ease-in-out infinite;
}

.bg-effects .orb:nth-child(1) {
  width: 600px; height: 600px;
  background: rgba(99, 102, 241, 0.08);
  top: -200px; left: -100px;
}
.bg-effects .orb:nth-child(2) {
  width: 500px; height: 500px;
  background: rgba(168, 85, 247, 0.06);
  bottom: -150px; right: -100px;
  animation-delay: -8s;
  animation-duration: 30s;
}
.bg-effects .orb:nth-child(3) {
  width: 400px; height: 400px;
  background: rgba(6, 182, 212, 0.05);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -15s;
  animation-duration: 35s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.container { max-width: 1100px; margin: 0 auto; padding: 16px; }

/* Header */
.header {
  text-align: center;
  padding: 48px 20px 32px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--indigo);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.header h1 {
  font-size: 2.8rem;
  font-weight: 900;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  letter-spacing: -1px;
  line-height: 1.1;
}

.header p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 550px;
  margin: 0 auto;
}

/* Countdown */
.countdown-bar {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.06), rgba(249, 115, 22, 0.06));
  border: 1px solid rgba(225, 29, 72, 0.15);
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 10px;
  backdrop-filter: blur(10px);
}
.countdown-bar .cl { font-size: 0.8rem; color: var(--rose); font-weight: 600; }
.countdown-bar .cv {
  font-size: 1.5rem; font-weight: 800; color: var(--rose);
  font-family: 'JetBrains Mono', monospace;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.6; } }

/* Score Row */
.score-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.score-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.score-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.score-card:nth-child(1)::before { background: var(--grad-emerald); }
.score-card:nth-child(2)::before { background: var(--grad-hero); }
.score-card:nth-child(3)::before { background: var(--grad-amber); }
.score-card:nth-child(4)::before { background: var(--grad-sky); }

.score-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow-indigo);
  border-color: var(--border-active);
}

.score-card .label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.score-card .value {
  font-size: 2.2rem;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}
.score-card .sub { font-size: 0.7rem; color: var(--text-muted); margin-top: 6px; }

.v-green { color: var(--emerald); }
.v-purple { background: var(--grad-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.v-gold { color: var(--amber); }
.v-blue { color: var(--sky); }

/* Tabs Wrapper */
.tabs-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
}

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: rgba(241, 245, 249, 0.5);
}

.tab-btn {
  flex: 1;
  padding: 18px 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
}

.tab-btn:hover {
  color: var(--text-secondary);
  background: rgba(99, 102, 241, 0.04);
}

.tab-btn.active {
  color: var(--indigo);
  background: rgba(99, 102, 241, 0.06);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%; width: 70%; height: 2px;
  background: var(--grad-hero);
  border-radius: 2px 2px 0 0;
}

.tab-content { display: none; padding: 32px; }
.tab-content.active { display: block; animation: fadeSlide 0.5s cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section */
.section-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.5px; color: var(--text-primary); }
.section-sub { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 24px; }

/* PDF Groups */
.pdf-group {
  background: rgba(241, 245, 249, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  transition: border-color 0.3s;
}
.pdf-group:hover { border-color: rgba(99, 102, 241, 0.2); }

.pdf-group-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }

.pdf-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.pdf-icon.f1 { background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08)); }
.pdf-icon.f2 { background: linear-gradient(135deg, rgba(5,150,105,0.12), rgba(8,145,178,0.08)); }
.pdf-icon.f3 { background: linear-gradient(135deg, rgba(217,119,6,0.12), rgba(225,29,72,0.08)); }

.pdf-group-header h3 { font-size: 0.95rem; font-weight: 700; }
.pdf-group-header > div > span { font-size: 0.72rem; color: var(--text-muted); display: block; margin-top: 2px; }

.doc-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.doc-item:last-child { border-bottom: none; }

.doc-check {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(0,0,0,0.15);
  cursor: pointer;
  flex-shrink: 0; margin-top: 1px;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  color: transparent;
}
.doc-check:hover { border-color: var(--indigo); }
.doc-check.checked {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #fff;
  transform: scale(1.1);
}

.doc-info h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 3px; }
.doc-info p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; }

.doc-tag {
  display: inline-block; padding: 2px 8px;
  border-radius: 5px; font-size: 0.6rem; font-weight: 700;
  margin-left: 6px; letter-spacing: 0.3px;
}
.tag-required { background: rgba(225,29,72,0.08); color: var(--rose); }
.tag-optional { background: rgba(217,119,6,0.08); color: var(--amber); }
.tag-max { background: rgba(5,150,105,0.08); color: var(--emerald); }

/* Data Tables */
.data-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.8rem; }
.data-table th {
  text-align: left; padding: 12px 14px;
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); border-bottom: 2px solid var(--border); font-weight: 700;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  color: var(--text-secondary);
}
.data-table tr { transition: background 0.2s; }
.data-table tbody tr:hover td { background: rgba(99, 102, 241, 0.03); }

/* Info Card */
.info-card {
  background: rgba(241, 245, 249, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.info-card h3 {
  font-size: 0.95rem; font-weight: 700;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.info-card p, .info-card li { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.7; }
.info-card ul { list-style: none; padding: 0; }
.info-card li { padding: 5px 0 5px 20px; position: relative; }
.info-card li::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--indigo); font-weight: 700;
}

/* Progress */
.progress-wrapper { margin: 18px 0; }
.progress-label {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--text-secondary);
  margin-bottom: 8px; font-weight: 500;
}
.progress-bar {
  height: 10px;
  background: rgba(0,0,0,0.06);
  border-radius: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 6px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  animation: shimmer 2s ease-in-out infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.fill-green { background: var(--grad-emerald); }
.fill-purple { background: var(--grad-hero); }
.fill-gold { background: var(--grad-amber); }

/* Alerts */
.alert {
  border-radius: var(--radius-sm);
  padding: 16px 18px; margin: 14px 0;
  font-size: 0.8rem;
  display: flex; align-items: flex-start; gap: 12px;
  line-height: 1.6;
}
.alert-success { background: rgba(5,150,105,0.06); border: 1px solid rgba(5,150,105,0.15); color: var(--emerald); }
.alert-warning { background: rgba(217,119,6,0.06); border: 1px solid rgba(217,119,6,0.15); color: var(--amber); }
.alert-danger { background: rgba(225,29,72,0.06); border: 1px solid rgba(225,29,72,0.15); color: var(--rose); }
.alert-info { background: rgba(2,132,199,0.06); border: 1px solid rgba(2,132,199,0.15); color: var(--sky); }

/* Scenario Grid */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin: 20px 0;
}
.scenario-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-sm);
}
.scenario-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-indigo);
  border-color: var(--border-active);
}
.scenario-card h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 14px; }
.scenario-card .big-number {
  font-size: 3rem; font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1; margin-bottom: 10px;
}
.scenario-card .detail { font-size: 0.75rem; color: var(--text-muted); line-height: 1.6; }

/* Timeline */
.timeline { position: relative; padding-left: 28px; margin: 20px 0; }
.timeline::before {
  content: '';
  position: absolute; left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--indigo), var(--purple), var(--emerald));
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  padding: 14px 0 14px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item::before {
  content: '';
  position: absolute; left: -24px; top: 20px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--indigo);
}
.timeline-item.done::before { background: var(--emerald); border-color: var(--emerald); }
.timeline-item.current::before { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 8px rgba(217,119,6,0.4); }
.timeline-item.future::before { background: var(--bg-deep); border-color: var(--text-muted); }

.timeline-item .tl-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; font-weight: 600; color: var(--indigo);
}
.timeline-item .tl-title { font-size: 0.85rem; font-weight: 600; margin: 4px 0 2px; }
.timeline-item .tl-desc { font-size: 0.72rem; color: var(--text-muted); }

.divider { height: 1px; background: var(--border); margin: 28px 0; }

.footer {
  text-align: center; padding: 36px;
  color: var(--text-muted); font-size: 0.68rem; letter-spacing: 0.5px;
}

/* Formula Box */
.formula-box {
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(168,85,247,0.04));
  border: 1px solid rgba(99,102,241,0.15);
  padding: 20px; border-radius: 12px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem; font-weight: 700;
  color: var(--indigo);
  margin: 16px 0; letter-spacing: 0.5px;
}

/* Simulation */
.sim-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}
.sim-btn:hover { border-color: var(--indigo); color: var(--text-secondary); }
.sim-btn.active {
  background: rgba(99,102,241,0.08);
  border-color: var(--indigo);
  color: var(--indigo);
}

.sim-table td, .sim-table th { font-size: 0.75rem; padding: 10px 12px; }

.row-natiele {
  background: rgba(5, 150, 105, 0.06) !important;
  border-left: 3px solid var(--emerald);
}
.row-natiele td { color: var(--text-primary) !important; }
.row-cutoff { border-bottom: 2px dashed rgba(225, 29, 72, 0.3) !important; }

.status-badge {
  font-size: 0.6rem; font-weight: 700;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.st-green { background: rgba(5,150,105,0.08); color: var(--emerald); }
.st-blue { background: rgba(2,132,199,0.08); color: var(--sky); }
.st-muted { background: rgba(0,0,0,0.03); color: var(--text-muted); }

/* Table Container for Responsiveness */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  background: rgba(241, 245, 249, 0.3);
  scrollbar-width: thin;
  scrollbar-color: var(--indigo) transparent;
}
.table-container::-webkit-scrollbar { height: 4px; }
.table-container::-webkit-scrollbar-thumb { background: var(--indigo); border-radius: 4px; }

/* Expanded Mobile/Tablet adjustments */
@media (max-width: 900px) {
  .container { padding: 12px; }
  .score-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .header h1 { font-size: 2.2rem; }
}

@media (max-width: 600px) {
  .header { padding: 32px 10px 24px; }
  .header h1 { font-size: 1.8rem; }
  .header-badge { font-size: 0.6rem; padding: 6px 14px; letter-spacing: 1px; }
  
  .score-row { grid-template-columns: 1fr; }
  .score-card { padding: 18px 12px; }
  .score-card .value { font-size: 1.8rem; }
  
  .tab-nav {
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tab-nav::-webkit-scrollbar { display: none; }
  .tab-btn {
    padding: 16px 14px;
    flex: 0 0 auto;
    font-size: 0.75rem;
  }
  
  .tab-content { padding: 16px; }
  .pdf-group { padding: 16px; }
  .pdf-icon { width: 36px; height: 36px; font-size: 0.9rem; }
  
  .scenario-grid { grid-template-columns: 1fr; }
  .scenario-card { padding: 16px; }
  .scenario-card .big-number { font-size: 2.2rem; }
  
  .sim-table th:nth-child(4), .sim-table td:nth-child(4),
  .sim-table th:nth-child(5), .sim-table td:nth-child(5) { display: none; }
  
  .timeline { padding-left: 20px; }
  .timeline::before { left: 4px; }
  .timeline-item { padding-left: 15px; }
  .timeline-item::before { left: -20px; top: 18px; width: 8px; height: 8px; }
}

