* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Arial, sans-serif;
  background: #f1f5f9;
  color: #0f172a;
  display: flex;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 240px;
  background: #14532d;
  color: #dcfce7;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid #166534;
}
.logo { font-size: 32px; }
.brand h1 { font-size: 20px; color: #fff; }
.brand small { font-size: 11px; color: #a7f3d0; }
nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 4px; }
nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  color: #bbf7d0; text-decoration: none; font-size: 15px;
  transition: background .2s;
}
nav a:hover { background: #166534; }
nav a.active { background: #16a34a; color: #fff; font-weight: bold; }
.footer { padding: 14px 18px; font-size: 11px; color: #86efac; border-top: 1px solid #166534; }

/* ===== Konten ===== */
.content { margin-left: 240px; flex: 1; padding: 24px 28px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px;
}
.topbar h2 { font-size: 22px; }
.date { color: #64748b; font-size: 13px; }

.view { display: none; }
.view.active { display: block; }

/* ===== Kartu ===== */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: #fff; border-radius: 14px; padding: 20px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
  margin-bottom: 18px;
}
.card h3 { font-size: 16px; margin-bottom: 14px; }
.card p { color: #475569; line-height: 1.6; }
.stat { display: flex; align-items: center; gap: 14px; }
.stat-ico { font-size: 30px; }
.stat-val { font-size: 26px; font-weight: bold; }
.stat-label { font-size: 13px; color: #64748b; }

/* ===== Form ===== */
.form { display: flex; flex-wrap: wrap; gap: 10px; }
.form input, .form select {
  padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 14px; flex: 1; min-width: 140px;
}
.btn {
  background: #16a34a; color: #fff; border: none; border-radius: 8px;
  padding: 10px 20px; font-size: 14px; cursor: pointer;
}
.btn:hover { background: #15803d; }
.btn-danger {
  background: #ef4444; color: #fff; border: none; border-radius: 6px;
  padding: 6px 12px; cursor: pointer;
}
.btn-small {
  background: #e2e8f0; color: #0f172a; border: none; border-radius: 6px;
  padding: 6px 12px; cursor: pointer; font-size: 13px;
}

/* ===== Tabel ===== */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e2e8f0; }
th { color: #64748b; font-weight: 600; font-size: 13px; }
tr:hover td { background: #f8fafc; }

/* ===== Grafik ===== */
.chart { width: 100%; height: auto; }
.chart .bar { fill: #22c55e; }
.chart .bar2 { fill: #3b82f6; }
.chart .axis { fill: #64748b; font-size: 11px; }

/* ===== Laporan ===== */
.lap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.lap-item { background: #f8fafc; border-radius: 10px; padding: 14px; text-align: center; }
.lap-item .v { font-size: 22px; font-weight: bold; }
.lap-item .l { font-size: 12px; color: #64748b; }

.btn-pres {
  background: #7c3aed; color: #fff; border: none; border-radius: 8px;
  padding: 10px 18px; font-size: 14px; cursor: pointer;
}
.btn-pres:hover { background: #6d28d9; }

/* ===== Mode Presentasi ===== */
.pres {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #022c22, #14532d 60%, #052e16);
  color: #ecfdf5; display: none; flex-direction: column;
  padding: 28px 40px;
}
.pres.active { display: flex; }
.pres-top { display: flex; justify-content: space-between; align-items: flex-start; }
.pres-brand { font-size: 30px; font-weight: bold; color: #4ade80; }
.pres-sub { font-size: 14px; color: #86efac; margin-top: 2px; }
.pres-slide { flex: 1; display: flex; align-items: center; justify-content: center; }
.pres-slide h2 { font-size: 40px; color: #bbf7d0; margin-bottom: 28px; text-align: center; }
.pres-dots { display: flex; justify-content: center; gap: 10px; padding-top: 8px; }
.pres-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: #166534; }
.pres-dots .dot.on { background: #4ade80; }

.pres-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; width: 100%; }
.pres-stat { text-align: center; background: rgba(255,255,255,.06);
             border: 2px solid rgba(74,222,128,.3); border-radius: 18px; padding: 34px 16px; }
.pres-stat .ico { font-size: 56px; }
.pres-stat .num { font-size: 74px; font-weight: bold; color: #fff; line-height: 1.1; }
.pres-stat .lbl { font-size: 20px; color: #a7f3d0; margin-top: 8px; }
.pres-stat.wide { grid-column: span 1; }

.pres-table { width: 100%; font-size: 34px; border-collapse: collapse; }
.pres-table th { font-size: 20px; color: #86efac; text-align: left; padding: 10px 16px;
                 border-bottom: 2px solid rgba(74,222,128,.3); }
.pres-table td { padding: 16px; border-bottom: 1px solid rgba(74,222,128,.15); }
.pres-rank { font-size: 40px; }
.pres-chart { width: 90%; height: auto; }

/* ===== Progress bar ===== */
.progress {
  height: 22px; background: #e2e8f0; border-radius: 20px;
  overflow: hidden; margin-top: 12px;
}
.progress-fill {
  height: 100%; background: #22c55e; border-radius: 20px;
  transition: width .6s ease;
}
.progress-fill.fill-blue { background: #3b82f6; }
.progress-fill.fill-purple { background: #7c3aed; }

/* ===== Modal QR ===== */
.modal {
  position: fixed; inset: 0; z-index: 9998; background: rgba(2, 6, 23, .7);
  display: none; align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-box {
  background: #fff; border-radius: 16px; padding: 24px; width: 320px;
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
}
.modal-box h3 { color: #0f172a; }

@media print {
  .sidebar, .topbar, .btn { display: none !important; }
  .content { margin-left: 0; padding: 0; }
}
