/* NotifKita - GitBook Style Documentation */
:root {
  --sidebar-width: 260px;
  --primary: #2563eb;
  --primary-light: #eff6ff;
  --primary-dark: #1d4ed8;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #ffffff;
  --bg-sidebar: #f8fafc;
  --border: #e2e8f0;
  --code-bg: #f1f5f9;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --radius: 8px;
  --header-height: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}

/* ── TOP HEADER ── */
.top-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
}
.top-header .logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 17px; color: var(--text);
  text-decoration: none;
}
.logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px; font-weight: 900;
}
.logo-badge {
  font-size: 11px; background: #ecfdf5; color: #059669;
  padding: 2px 7px; border-radius: 20px; font-weight: 600;
  border: 1px solid #a7f3d0;
}
.header-spacer { flex: 1; }
.header-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; width: 220px;
  color: var(--text-muted); font-size: 13px; cursor: pointer;
}
.header-search kbd {
  margin-left: auto; background: var(--border); border-radius: 4px;
  padding: 1px 5px; font-size: 11px; font-family: inherit;
}
.header-link {
  color: var(--text-muted); text-decoration: none; font-size: 13px;
  padding: 6px 10px; border-radius: 6px; display: flex; align-items: center; gap: 5px;
  transition: background .15s;
}
.header-link:hover { background: var(--code-bg); color: var(--text); }

/* ── LAYOUT ── */
.layout { display: flex; min-height: 100vh; padding-top: var(--header-height); }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: fixed; top: var(--header-height); bottom: 0; left: 0;
  overflow-y: auto; padding: 20px 0 40px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.nav-section { margin-bottom: 4px; }
.nav-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted);
  padding: 12px 20px 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 20px; color: var(--text-muted);
  text-decoration: none; font-size: 13.5px;
  border-left: 2px solid transparent;
  transition: all .15s; line-height: 1.4;
}
.nav-link:hover { color: var(--text); background: rgba(0,0,0,.04); }
.nav-link.active {
  color: var(--primary); background: var(--primary-light);
  border-left-color: var(--primary); font-weight: 600;
}
.nav-link .icon { width: 16px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-divider { height: 1px; background: var(--border); margin: 8px 12px; }

/* ── MAIN CONTENT ── */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  justify-content: center; /* Membantu konten tetap di tengah secara horizontal */
  min-width: 0; 
}

.content {
  flex: 1;
  max-width: 800px;
  padding: 48px 56px 80px;
  min-width: 0;
  margin: 0 auto; /* Kunci agar konten berada di tengah */
}

/* ── TOC (right sidebar) ── */
.toc {
  width: 240px; /* Sedikit diperlebar agar proporsional */
  flex-shrink: 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  padding: 40px 20px 40px 0;
  overflow-y: auto;
  display: none; /* Default sembunyi di layar kecil */
}

@media (min-width: 1200px) {
  .toc {
    display: block; /* Muncul hanya di layar lebar */
  }
}

.toc-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 10px; }
.toc a { display: block; font-size: 12.5px; color: var(--text-muted); text-decoration: none; padding: 3px 0 3px 10px; border-left: 2px solid var(--border); margin-bottom: 2px; transition: all .15s; }
.toc a:hover { color: var(--primary); border-left-color: var(--primary); }
.toc a.active { color: var(--primary); border-left-color: var(--primary); font-weight: 600; }

/* ── TYPOGRAPHY ── */
.content h1 {
  font-size: 30px; font-weight: 800; color: var(--text);
  margin-bottom: 8px; line-height: 1.25;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.content h2 {
  font-size: 20px; font-weight: 700; color: var(--text);
  margin: 40px 0 12px; line-height: 1.3;
}
.content h3 {
  font-size: 16px; font-weight: 600; color: var(--text);
  margin: 28px 0 10px;
}
.content p { margin-bottom: 16px; color: var(--text); }
.page-subtitle { color: var(--text-muted); font-size: 16px; margin-bottom: 32px; margin-top: 4px; }
.content a { color: var(--primary); text-decoration: none; }
.content a:hover { text-decoration: underline; }

/* ── STEPS ── */
.steps { counter-reset: step; list-style: none; margin: 16px 0; }
.steps li {
  counter-increment: step; position: relative;
  padding: 0 0 28px 52px;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: white;
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.steps li::after {
  content: ''; position: absolute; left: 15px; top: 30px; bottom: 0;
  width: 1px; background: var(--border);
}
.steps li:last-child::after { display: none; }
.steps li strong { display: block; font-weight: 600; margin-bottom: 4px; }

/* ── FEATURE GRID ── */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 20px 0; }
.feature-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; background: white;
  display: flex; align-items: flex-start; gap: 10px;
  transition: box-shadow .15s, border-color .15s;
}
.feature-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); border-color: var(--primary); }
.feature-card .fc-icon { font-size: 20px; flex-shrink: 0; }
.feature-card h4 { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.feature-card p { font-size: 12px; color: var(--text-muted); margin: 0; }

/* ── CALLOUTS ── */
.callout {
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; gap: 12px; margin: 20px 0;
  border: 1px solid;
}
.callout-info { background: #eff6ff; border-color: #bfdbfe; }
.callout-warning { background: #fffbeb; border-color: #fcd34d; }
.callout-success { background: #f0fdf4; border-color: #bbf7d0; }
.callout-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.callout-content p { margin: 0; font-size: 13.5px; }
.callout-content strong { display: block; margin-bottom: 3px; }

/* ── SCREENSHOTS ── */
.screenshot-wrap {
  margin: 20px 0; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.screenshot-label {
  background: var(--code-bg); padding: 6px 14px;
  font-size: 12px; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-family: monospace;
}
.screenshot-wrap img { width: 100%; display: block; }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; margin: 20px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { background: var(--code-bg); padding: 10px 14px; text-align: left; font-weight: 600; border: 1px solid var(--border); }
td { padding: 10px 14px; border: 1px solid var(--border); vertical-align: top; }
tr:hover td { background: var(--bg-sidebar); }

/* ── BADGE ── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }

/* ── PAGE NAV ── */
.page-nav { display: flex; gap: 12px; margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--border); }
.page-nav a {
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; text-decoration: none; color: var(--text);
  transition: all .15s;
}
.page-nav a:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.page-nav a.prev { text-align: left; }
.page-nav a.next { text-align: right; }
.page-nav .nav-dir { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.page-nav .nav-title { font-size: 14px; font-weight: 600; }

/* ── CODE ── */
code {
  background: var(--code-bg); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 4px; font-size: 13px;
  font-family: 'Fira Code', 'Courier New', monospace;
}
pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow-x: auto; margin: 16px 0; }
pre code { background: none; border: none; padding: 0; }

/* ── FAQ ── */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.faq-q { padding: 14px 18px; font-weight: 600; cursor: pointer; background: var(--bg-sidebar); font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.faq-a { padding: 14px 18px; font-size: 14px; color: var(--text-muted); border-top: 1px solid var(--border); display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q { background: var(--primary-light); color: var(--primary); }

/* ── BREADCRUMB ── */
.breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; display: flex; align-items: center; gap: 6px; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { opacity: .5; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .content { padding: 24px 20px 60px; }
}
