/* ═══════════════════════════════════════════════════════
   SalstudioZ.Pakar — Stylesheet
   Theme: Professional diagnosis / blue dark
   Font: Archivo (display) + Instrument Sans (body)
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800;900&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg:         #0d0d0d;
  --bg-2:       #131313;
  --bg-3:       #1a1a1a;
  --bg-4:       #222222;
  --border:     rgba(255,255,255,0.07);
  --border-2:   rgba(255,255,255,0.12);

  --blue:       #3b82f6;
  --blue-dim:   rgba(59,130,246,0.12);
  --blue-glow:  rgba(59,130,246,0.2);
  --green:      #22c55e;
  --green-dim:  rgba(34,197,94,0.1);
  --red:        #f87171;
  --red-dim:    rgba(248,113,113,0.1);
  --purple:     #a78bfa;
  --purple-dim: rgba(167,139,250,0.1);
  --sky:        #38bdf8;
  --sky-dim:    rgba(56,189,248,0.1);

  --txt-1:  #f5f0e8;
  --txt-2:  #a89880;
  --txt-3:  #6b5d4f;

  --r-sm:  6px;
  --r:     12px;
  --r-lg:  18px;
  --r-xl:  24px;

  --shadow:    0 8px 24px rgba(0,0,0,0.6);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.7);

  --font-display: 'Archivo', sans-serif;
  --font-body:    'Instrument Sans', sans-serif;
  --ease:         cubic-bezier(.16,1,.3,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--txt-1);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.5;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }

/* ════════════════════════════════════
   NAVBAR
   ════════════════════════════════════ */
.navbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(13,13,13,0.9);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center;
  height: 60px; gap: 1.5rem;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; flex-shrink: 0;
}
.nav-brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--blue), #60a5fa);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 20px var(--blue-glow);
  flex-shrink: 0;
}
.nav-brand-icon img { width: 22px; height: 22px; object-fit: contain; filter: brightness(0); }
.nav-brand-icon i { font-size: 0.85rem; color: var(--bg); }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1; }
.nav-brand-name {
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 800;
  color: var(--txt-1); letter-spacing: -0.02em;
}
.nav-brand-name span { color: var(--blue); }
.nav-brand-sub {
  font-size: 0.65rem; font-weight: 400;
  color: var(--txt-3); letter-spacing: 0.04em; margin-top: 1px;
}
.nav-divider { width: 1px; height: 28px; background: var(--border-2); flex-shrink: 0; }
.nav-pill {
  background: var(--blue-dim);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--blue);
  font-size: 0.7rem; font-weight: 700;
  padding: 0.3rem 0.75rem; border-radius: 999px;
  letter-spacing: 0.06em; text-transform: uppercase; flex-shrink: 0;
}
.nav-spacer { flex: 1; }
.nav-link-ext {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--txt-2); text-decoration: none;
  font-size: 0.8rem; font-weight: 500;
  padding: 0.4rem 0.85rem; border-radius: var(--r-sm);
  border: 1px solid var(--border); transition: all 0.2s; flex-shrink: 0;
}
.nav-link-ext img { width: 14px; height: 14px; object-fit: contain; filter: brightness(0) saturate(0) invert(60%); }
.nav-link-ext i { font-size: 0.75rem; }
.nav-link-ext:hover { color: var(--txt-1); border-color: var(--border-2); background: var(--bg-3); }
.nav-link-ext:hover img { filter: brightness(0) saturate(0) invert(90%); }

/* ════════════════════════════════════
   HERO
   ════════════════════════════════════ */
.hero {
  padding: 4rem 0 3rem;
  position: relative; overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; top: -80px; right: -120px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle at center, rgba(59,130,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 2rem; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 600; color: var(--blue);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1rem;
}
.hero-eyebrow::before {
  content: ''; width: 24px; height: 2px;
  background: var(--blue); border-radius: 2px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900; line-height: 1.1;
  letter-spacing: -0.03em; color: var(--txt-1); margin-bottom: 1rem;
}
.hero-title span { color: var(--blue); }
.hero-desc {
  font-size: 0.925rem; color: var(--txt-2);
  line-height: 1.8; max-width: 520px; font-weight: 400;
}
.hero-stats {
  display: flex; flex-direction: column; gap: 0.75rem; flex-shrink: 0;
}
.stat-card {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  min-width: 160px; transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-2); }
.stat-icon-wrap {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0; overflow: hidden;
}
.stat-icon-wrap img { width: 20px; height: 20px; object-fit: contain; }
.stat-icon-wrap.blue  { background: var(--blue-dim);  color: var(--blue); }
.stat-icon-wrap.blue img { filter: brightness(0) saturate(100%) invert(45%) sepia(80%) saturate(2000%) hue-rotate(210deg); }
.stat-icon-wrap.green  { background: var(--green-dim);  color: var(--green); }
.stat-icon-wrap.purple { background: var(--purple-dim); color: var(--purple); }
.stat-info { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--txt-1); line-height: 1; }
.stat-lbl { font-size: 0.7rem; font-weight: 500; color: var(--txt-3); margin-top: 2px; }

/* ════════════════════════════════════
   PAGE BODY
   ════════════════════════════════════ */
.page-body { padding-bottom: 4rem; }
.main-grid {
  display: grid; grid-template-columns: 460px 1fr;
  gap: 1.5rem; align-items: start;
}

/* ── Panel ── */
.panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.panel-sticky {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-sticky .panel-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}
.panel-head-icon {
  width: 32px; height: 32px;
  background: var(--blue-dim); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue); font-size: 0.8rem; flex-shrink: 0;
}
.panel-head h2 {
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 700; color: var(--txt-1);
}
.panel-body { padding: 1.5rem; }

/* ── Selected count bar ── */
.count-bar {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--blue-dim);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: var(--r-sm);
  padding: 0.6rem 1rem; margin-bottom: 1.25rem;
  font-size: 0.8rem; font-weight: 600; color: var(--blue);
}
.count-bar i { font-size: 0.85rem; }
.clear-btn {
  margin-left: auto; display: flex; align-items: center; gap: 0.35rem;
  background: none; border: none; color: var(--red);
  font-size: 0.72rem; font-weight: 700; cursor: pointer;
  padding: 0.2rem 0.5rem; border-radius: var(--r-sm);
  font-family: var(--font-body); transition: background 0.15s;
}
.clear-btn:hover { background: var(--red-dim); }

/* ── Symptom Groups ── */
.sym-groups {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Scrollbar styling */
.sym-groups::-webkit-scrollbar {
  width: 4px;
}
.sym-groups::-webkit-scrollbar-track {
  background: var(--bg-4);
  border-radius: 4px;
}
.sym-groups::-webkit-scrollbar-thumb {
  background: var(--blue-dim);
  border-radius: 4px;
}
.sym-groups::-webkit-scrollbar-thumb:hover {
  background: var(--blue);
}

.sym-group {
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-left: 3px solid var(--group-color, var(--blue));
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color 0.2s;
}

.group-head {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}
.group-icon { font-size: 0.8rem; color: var(--group-color, var(--blue)); }
.group-title {
  font-size: 0.72rem; font-weight: 700;
  color: var(--txt-2); text-transform: uppercase; letter-spacing: 0.06em;
}

.sym-list { 
  padding: 0.4rem 0.75rem;
  max-height: 200px;
  overflow-y: auto;
}

/* Scrollbar untuk sym-list */
.sym-list::-webkit-scrollbar {
  width: 3px;
}
.sym-list::-webkit-scrollbar-track {
  background: var(--bg-4);
  border-radius: 3px;
}
.sym-list::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 3px;
}

.sym-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.45rem 0.5rem; border-radius: var(--r-sm);
  cursor: pointer; transition: background 0.15s;
}
.sym-item:hover { background: var(--bg-3); }
.sym-item input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }

.chk {
  width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px;
  border: 1.5px solid var(--border-2);
  border-radius: 4px; background: var(--bg-4);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; position: relative;
}
.sym-item input:checked + .chk {
  background: var(--group-color, var(--blue));
  border-color: var(--group-color, var(--blue));
}
.sym-item input:checked + .chk::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid var(--bg);
  border-bottom: 2px solid var(--bg);
  transform: rotate(-45deg) translate(1px, -1px);
  display: block;
}
.sym-label {
  font-size: 0.8rem; font-weight: 400;
  color: var(--txt-2); line-height: 1.5;
}
.sym-item input:checked ~ .sym-label { color: var(--txt-1); font-weight: 500; }

/* ── Button ── */
.btn-diag {
  width: 100%; display: flex; align-items: center;
  justify-content: center; gap: 0.65rem;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #2563eb, var(--blue));
  color: var(--bg); border: none; border-radius: var(--r);
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 800;
  letter-spacing: -0.01em; cursor: pointer;
  transition: all 0.25s var(--ease); margin-top: 1.25rem;
  box-shadow: 0 4px 16px var(--blue-glow);
}
.btn-diag:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59,130,246,0.35);
  background: linear-gradient(135deg, #1d4ed8, #93c5fd);
}
.btn-diag:active:not(:disabled) { transform: translateY(0); }
.btn-diag:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-spin { display: none; }

/* ── Error ── */
.err-box {
  margin-top: 0.75rem; background: var(--red-dim);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--r-sm); padding: 0.65rem 0.9rem;
  font-size: 0.8rem; color: var(--red);
  display: none; align-items: center; gap: 0.5rem;
}

/* ════════════════════════════════════
   RESULTS
   ════════════════════════════════════ */
.results-col {
  display: flex; flex-direction: column; gap: 1rem;
}

.results-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1rem; min-height: 320px;
  background: var(--bg-2);
  border: 1px dashed var(--border-2);
  border-radius: var(--r-xl); text-align: center; padding: 3rem;
}
.results-empty-icon {
  width: 64px; height: 64px; background: var(--bg-3);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--txt-3); overflow: hidden;
}
.results-empty-icon img { width: 36px; height: 36px; object-fit: contain; filter: brightness(0) saturate(0) invert(40%); }
.results-empty h3 { font-size: 0.95rem; font-weight: 600; color: var(--txt-2); }
.results-empty p  { font-size: 0.8rem; color: var(--txt-3); line-height: 1.7; max-width: 260px; }

/* Result header */
.res-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0 0.25rem;
}
.res-header-icon { font-size: 0.85rem; color: var(--blue); }
.res-header h2 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700; color: var(--txt-1);
}
.res-count {
  margin-left: auto;
  background: var(--blue-dim);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--blue);
  font-size: 0.7rem; font-weight: 700;
  padding: 0.25rem 0.75rem; border-radius: 999px;
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* Diagnosis Card */
.diag-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  animation: fadeUp 0.4s var(--ease) both;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.diag-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-2);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.diag-card-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1.25rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}
.diag-rule-tag {
  font-size: 0.68rem; font-weight: 800;
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid rgba(59,130,246,0.2);
  padding: 0.2rem 0.6rem; border-radius: 999px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.diag-num { font-size: 0.7rem; font-weight: 600; color: var(--txt-3); }

.diag-diagnosis {
  padding: 1rem 1.25rem;
  background: rgba(59,130,246,0.04);
  border-bottom: 1px solid rgba(59,130,246,0.08);
}
.diag-saran {
  padding: 1rem 1.25rem;
  background: rgba(34,197,94,0.03);
}

.diag-section-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 0.5rem;
}
.diag-diagnosis .diag-section-label { color: #1e40af; }
.diag-diagnosis .diag-section-label i { color: var(--blue); }
.diag-saran .diag-section-label { color: #166534; }
.diag-saran .diag-section-label i { color: var(--green); }

.diag-diagnosis p { font-size: 0.875rem; color: #60a5fa; font-weight: 500; line-height: 1.65; }
.diag-saran p     { font-size: 0.875rem; color: #16a34a; line-height: 1.65; }

/* No result */
.no-result-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 3rem 2rem; text-align: center;
}
.no-result-icon {
  width: 72px; height: 72px; background: var(--green-dim);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem; font-size: 1.75rem; color: var(--green);
}
.no-result-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--txt-1); }
.no-result-card p  { font-size: 0.82rem; color: var(--txt-2); max-width: 360px; margin: 0 auto; line-height: 1.7; }

/* ════════════════════════════════════
   FOOTER
   ════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border); padding: 1.5rem 0; background: var(--bg);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.footer-brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 600; color: var(--txt-2);
}
.footer-brand img { width: 16px; height: 16px; object-fit: contain; filter: brightness(0) saturate(100%) invert(45%) sepia(80%) saturate(2000%) hue-rotate(210deg); }
.footer-brand i { color: var(--blue); }
.footer-brand span { color: var(--blue); font-family: var(--font-display); }
.footer-right {
  font-size: 0.72rem; color: var(--txt-3);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.footer-right a { color: var(--txt-3); text-decoration: none; }
.footer-right a:hover { color: var(--blue); }
.footer-dot { width: 3px; height: 3px; background: var(--txt-3); border-radius: 50%; }

/* ════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════ */
@media (max-width: 1100px) {
  .main-grid { grid-template-columns: 400px 1fr; }
}

@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .panel-sticky {
    position: static;
    max-height: none;
    display: block;
  }
  .panel-sticky .panel-body {
    display: block;
    overflow: visible;
  }
  .sym-groups {
    max-height: 500px;
    min-height: auto;
  }
  .hero-row { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: row; flex-wrap: wrap; }
  .stat-card { flex: 1; min-width: 140px; }
}

@media (max-width: 640px) {
  .container { padding: 0 1rem; }
  .hero { padding: 2rem 0 1.75rem; }
  .hero-title { font-size: 1.75rem; }
  .hero-stats { gap: 0.6rem; }
  .stat-card { padding: 0.75rem 1rem; flex: 1 1 calc(50% - 0.3rem); }
  .stat-num { font-size: 1.2rem; }
  .nav-brand-sub { display: none; }
  .nav-link-ext span { display: none; }
  .nav-link-ext { padding: 0.4rem 0.6rem; }
  .nav-pill { display: none; }
  .panel-body { padding: 1rem; }
  .sym-list { 
    max-height: 150px;
  }
}

@media (max-width: 400px) {
  .hero-stats { flex-direction: column; }
  .stat-card { flex: none; width: 100%; }
}