/* ============ GLOBAL ============ */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: #f3f4f6;
  color: #111827;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============ NAVBAR ============ */
.navbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.6rem 1rem;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}
.navbar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.navbar-brand {
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
}
.navbar-brand span {
  color: #2563eb;
}
.navbar-menu {
  display: flex;
  gap: 0.9rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-link {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  color: #4b5563;
}
.nav-link:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
.nav-link.active {
  background: #1d4ed8;
  color: #ffffff;
  font-weight: 600;
}

/* Tombol hamburger (HP) */
.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 16px;
  height: 2px;
  background: #4b5563;
  border-radius: 999px;
  position: relative;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: #4b5563;
  border-radius: 999px;
}
.nav-toggle-bar::before { top: -5px; }
.nav-toggle-bar::after  { top: 5px; }

/* Mode HP: navbar jadi dropdown */
@media (max-width: 640px) {
  .navbar-menu {
    position: absolute;
    top: 48px;
    right: 0;
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.16);
    padding: 0.45rem 0.5rem;
    flex-direction: column;
    align-items: flex-start;
    min-width: 170px;
    display: none;        /* default: hidden */
    z-index: 20;
  }
  .navbar-menu.show {
    display: flex;        /* muncul saat toggle */
  }
  .nav-toggle {
    display: inline-flex; /* tombol hamburger aktif di HP */
  }
}

/* ============ LAYOUT UMUM ============ */
.container {
  max-width: 900px;
  margin: 1.5rem auto 2.5rem;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}
h1 {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
  text-align: center;
}
.subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}
label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
}
input[type="date"],
select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  box-sizing: border-box;
}
button {
  margin-top: 0.8rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 0.7rem;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: white;
  transition: transform 0.05s ease, box-shadow 0.05s ease, opacity 0.15s ease;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
}
button:hover {
  opacity: 0.95;
}
button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.section {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px dashed #e5e7eb;
}
.section-title-main {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.result {
  margin-top: 1.1rem;
  display: none;
}
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.card {
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}
.card-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.card-value {
  font-size: 1rem;
  font-weight: 600;
}
.card-sub {
  font-size: 0.82rem;
  color: #6b7280;
  margin-top: 0.15rem;
}

.section-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 1.1rem;
  margin-bottom: 0.3rem;
}
.char-text {
  font-size: 0.94rem;
  line-height: 1.5;
  margin-top: 0.2rem;
}
.footer-note {
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: center;
}
.two-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  margin-left: 0.25rem;
}
.highlight {
  font-weight: 600;
}

/* Badge hari baik */
.badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.3rem;
}
.badge-good {
  background: #dcfce7;
  color: #16a34a;
}
.badge-medium {
  background: #fef9c3;
  color: #b45309;
}
.badge-bad {
  background: #fee2e2;
  color: #b91c1c;
}

        /* ===== Kompas Arah Rejeki ===== */
    .compass-wrapper {
      display: flex;
      gap: 1rem;
      margin-top: 0.75rem;
      flex-wrap: wrap;
      align-items: center;
    }
    .compass {
      width: 180px;
      height: 180px;
      border-radius: 999px;
      border: 2px solid #d1d5db;
      position: relative;
      background: radial-gradient(circle at center, #ffffff 0, #f9fafb 40%, #e5e7eb 100%);
      box-shadow: 0 8px 18px rgba(15,23,42,0.12);
      margin-bottom: 0.5rem;
    }
    .compass-center {
      position: absolute;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      width: 32px; height: 32px;
      border-radius: 999px;
      background: #2563eb;
      box-shadow: 0 0 0 4px rgba(37,99,235,0.25);
    }
    .compass-dir {
      position: absolute;
      font-size: 0.75rem;
      font-weight: 600;
      color: #6b7280;
      text-transform: uppercase;
    }
    .compass-dir.n { top: 8px; left: 50%; transform: translateX(-50%); }
    .compass-dir.s { bottom: 8px; left: 50%; transform: translateX(-50%); }
    .compass-dir.e { right: 8px; top: 50%; transform: translateY(-50%); }
    .compass-dir.w { left: 8px; top: 50%; transform: translateY(-50%); }

    .compass-dir.active {
      color: #1d4ed8;
      font-weight: 700;
    }

    .compass-note {
      font-size: 0.82rem;
      color: #6b7280;
      flex: 1;
      min-width: 220px;
    }
	
	    /* COMPASS NAGA HARI */
    .compass-wrapper {
      display: flex;
      justify-content: center;
      align-items: center;
      margin-top: 0.5rem;
    }
    .compass {
      position: relative;
      width: 220px;
      height: 220px;
      border-radius: 999px;
      border: 3px solid #e5e7eb;
      background: radial-gradient(circle at 30% 30%, #ffffff, #e5e7eb);
      box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    }
    .compass-center {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 14px;
      height: 14px;
      background: #1d4ed8;
      border-radius: 999px;
      transform: translate(-50%, -50%);
      box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
    }
    .compass-arrow {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 4px;
      height: 80px;
      background: linear-gradient(to bottom, #1d4ed8, #60a5fa);
      transform-origin: 50% 85%;
      transform: translate(-50%, -85%) rotate(0deg);
      border-radius: 999px;
      transition: transform 0.3s ease-out;
    }
    .compass-arrow::after {
      content: "";
      position: absolute;
      bottom: -8px;
      left: 50%;
      transform: translateX(-50%);
      border-left: 7px solid transparent;
      border-right: 7px solid transparent;
      border-top: 10px solid #1d4ed8;
    }
    .compass-label {
      position: absolute;
      font-size: 0.78rem;
      font-weight: 700;
      color: #374151;
    }
    .label-N { top: 8px; left: 50%; transform: translateX(-50%); }
    .label-S { bottom: 8px; left: 50%; transform: translateX(-50%); }
    .label-E { right: 8px; top: 50%; transform: translateY(-50%); }
    .label-W { left: 8px; top: 50%; transform: translateY(-50%); }
    .label-NE { top: 24px; right: 40px; }
    .label-SE { bottom: 24px; right: 40px; }
    .label-SW { bottom: 24px; left: 40px; }
    .label-NW { top: 24px; left: 40px; }
    .compass-caption {
      margin-top: 0.5rem;
      font-size: 0.8rem;
      color: #6b7280;
      text-align: center;
    }

    /* TABLE NAGA */
    .table-wrapper {
      margin-top: 0.8rem;
      overflow-x: auto;
    }
    .table-naga {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.85rem;
      min-width: 420px;
    }
    .table-naga th,
    .table-naga td {
      border: 1px solid #e5e7eb;
      padding: 0.35rem 0.5rem;
      text-align: left;
    }
    .table-naga th {
      background: #f3f4f6;
      font-weight: 700;
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: #6b7280;
    }
    .table-naga tbody tr:nth-child(even) {
      background: #f9fafb;
    }

    /* PRINT STYLES */
    @media print {
      body {
        background: #ffffff;
      }
      .navbar,
      .nav-toggle,
      #btnPrint {
        display: none !important;
      }
      button {
        display: none !important;
      }
      .container {
        box-shadow: none;
        margin: 0;
        border-radius: 0;
      }
      
      /* ==========================
   BADGE WARNA BULAT
========================== */
.color-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.color-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 0 6px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #111;
  text-transform: capitalize;
}

/* Warna spesifik */
.badge-putih { background: #f5f5f5; color:#111; }
.badge-hitam { background: #111; color:#fff; }
.badge-merah { background: #c62828; color:#fff; }
.badge-kuning { background: #f9a825; }
.badge-abu-abu { background: #9e9e9e; }
.badge-emas {
  background: linear-gradient(135deg, #d4af37, #ffeb3b);
}
