:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --primary: #2563eb;
  --danger: #dc2626;
  --muted: #64748b;
}

body.dark {
  --bg: #020617;
  --card: #0f172a;
  --text: #e5e7eb;
  --primary: #3b82f6;
  --muted: #94a3b8;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: all 0.3s ease;
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* =====================
   NAVBAR
===================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-logo {
  height: 36px;
  width: auto;
}

.navbar-title {
  font-weight: 600;
  font-size: 1rem;
}

/* Light mode */
body:not(.dark) .navbar {
  background: rgba(219, 234, 254, 0.9); /* biru muda */
}

/* Dark mode */
body.dark .navbar {
  background: rgba(17, 24, 39, 0.85);
}

.logo {
  height: 48px;
  width: auto;
  transition: opacity 0.3s ease;
}


.toggle-theme {
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

/* =====================
   HERO SECTION
===================== */
.hero {
  padding: 80px 20px 60px;
  display: flex;
  justify-content: center;
  text-align: center;
}

.hero-content {
  max-width: 720px;
}

.hero-logo {
  width: 140px;
  height: auto;
  margin-bottom: 20px;
}

.hero h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 12px;
}

.hero p {
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.85;
}

/* Dark mode support */
body.dark .hero p {
  opacity: 0.9;
}

/* LAYOUT */
.container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* GLASS EFFECT */
.glass {
  backdrop-filter: blur(10px);
}

/* FORM */
.form-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

input, select {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #cbd5f5;
  font-size: 14px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* TABLE */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px;
  text-align: center;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.btn-delete {
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

/* SUMMARY */
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.highlight {
  text-align: center;
  font-size: 18px;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 14px;
  color: var(--muted);
}

.footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.socials {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 18px;
}

.socials a {
  font-size: 20px;
  color: var(--muted);
  transition: 0.3s;
}

.socials a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/* RESPONSIVE HP */
@media (max-width: 640px) {
  h1 {
    font-size: 18px;
  }

  .header {
    flex-direction: column;
    gap: 12px;
  }

  .header-left {
    flex-direction: column;
  }

  .logo {
    width: 48px;
    height: 48px;
  }

  table th, table td {
    font-size: 12px;
    padding: 6px;
  }

  .summary {
    grid-template-columns: 1fr;
  }

  canvas {
    max-height: 260px;
  }
}
