* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --danger: #ef4444;
  --success: #10b981;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
}
html { scroll-behavior: smooth; }
body { font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
       background: var(--bg); color: var(--text); line-height: 1.5; }
.navbar { display: flex; align-items: center; justify-content: space-between;
          background: var(--card); border-bottom: 1px solid var(--border);
          padding: 0.9rem 2rem; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.nav-brand { font-weight: 700; font-size: 1.25rem; color: var(--primary); letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 1.2rem; }
.nav-links a { color: var(--text); text-decoration: none; font-size: 0.95rem; font-weight: 500; padding: 0.35rem 0.75rem;
               border-radius: 6px; transition: all .2s; }
.nav-links a:hover { background: var(--bg); color: var(--primary); }
.container { max-width: 1300px; margin: 0 auto; padding: 1.6rem 1rem; }
.hero { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
        padding: 2.4rem 2rem; border-radius: 12px; margin-bottom: 1.6rem; box-shadow: 0 10px 25px -5px rgba(79,70,229,0.35); }
.hero h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.hero p { opacity: 0.95; font-size: 1.05rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.1rem;
       box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.kpi-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.35rem; }
.kpi-value { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 1.3rem; margin-bottom: 1.8rem; }
.chart-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.chart-card .js-plotly-plot { width: 100% !important; }
.table-section { background: var(--card); border: 1px solid var(--border); border-radius: 10px;
                 padding: 1.3rem; margin-bottom: 1.4rem; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.table-section h2 { font-size: 1.15rem; margin-bottom: 0.8rem; color: var(--primary-dark); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th { background: #f1f5f9; text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); font-weight: 600; color: var(--muted); }
.data-table td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }
.insight-section { background: var(--card); border: 1px solid var(--border); border-radius: 10px;
                   padding: 1.3rem; margin-bottom: 1.4rem; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.insight-section h2 { font-size: 1.15rem; margin-bottom: 0.7rem; color: var(--primary-dark); }
.insight-list { list-style: disc inside; color: var(--text); font-size: 0.95rem; }
.insight-list li { margin-bottom: 0.5rem; padding-left: 0.4rem; border-left: 3px solid var(--primary); margin-left: 0.5rem; }
.sim-form { background: var(--card); border: 1px solid var(--border); border-radius: 10px;
            padding: 1.4rem; margin-bottom: 1.4rem; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.sim-form h2 { margin-bottom: 1rem; color: var(--primary-dark); font-size: 1.15rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; align-items: end; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
input, select { padding: 0.55rem 0.75rem; border: 1px solid var(--border); border-radius: 8px;
                font-size: 0.95rem; background: #fff; color: var(--text); }
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.btn { padding: 0.6rem 1.3rem; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600;
       cursor: pointer; transition: all .2s; color: #fff; }
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.result-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px;
               padding: 1.6rem; box-shadow: 0 4px 12px rgba(0,0,0,0.08); animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.result-card h2 { margin-bottom: 0.9rem; color: var(--primary-dark); font-size: 1.2rem; }
.result-badge { display: inline-block; padding: 0.55rem 1.2rem; border-radius: 999px; font-weight: 700;
                font-size: 1.1rem; letter-spacing: 0.4px; margin-bottom: 1rem; }
.badge-menunggak { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.badge-aman { background: #f0fdf4; color: #14532d; border: 1px solid #bbf7d0; }
.result-detail { margin-bottom: 1rem; font-size: 0.98rem; color: var(--text); }
.result-detail strong { color: var(--primary-dark); }
.result-note { font-size: 0.82rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 0.7rem; margin-top: 1rem; }
.footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.82rem;
          padding: 1.2rem 1rem; text-align: center; margin-top: 1rem; background: var(--card); }
