/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1e3a5f;
  --primary-light: #2a5a8f;
  --accent: #c9a84c;
  --accent-hover: #b8952f;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #5a6078;
  --border: #e2e5ea;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bg-gradient {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f2640 50%, #1a3050 100%);
}

.hidden { display: none !important; }

/* ===== Registration Page ===== */
.container { max-width: 520px; margin: 0 auto; padding: 40px 20px; }

.hero-card {
  background: var(--card);
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.logo-sultra { margin-bottom: 16px; }

.hero-card h1 {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-card h2 {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 4px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.hero-card h3 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  text-align: left;
}

.field { margin-bottom: 16px; text-align: left; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafbfc;
}

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
  background: white;
}

button[type="submit"], .btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 8px;
}

button[type="submit"]:hover, .btn:hover {
  background: var(--primary-light);
}

button[type="submit"]:active, .btn:active { transform: scale(0.98); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.error-msg {
  margin-top: 12px;
  padding: 10px 16px;
  background: #fef2f2;
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  text-align: left;
}

footer {
  text-align: center;
  padding: 24px 0;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
}

/* ===== Naskah Page ===== */
.page-bg { background: var(--bg); min-height: 100vh; }

.topbar {
  background: var(--primary);
  color: white;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.topbar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.topbar-title {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.topbar-user .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.naskah-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.naskah-header {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.naskah-header h1 { font-size: 1rem; color: var(--primary); margin-bottom: 6px; }
.naskah-header h2 { font-size: 0.9rem; color: var(--text); font-weight: 600; margin-bottom: 4px; }
.naskah-header p { font-size: 0.8rem; color: var(--text-secondary); }

/* Tree Structure */
.tree-node {
  margin-bottom: 4px;
}

.node-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  border: 1px solid transparent;
  user-select: none;
}

.node-header:hover {
  background: #f0f4ff;
  border-color: #d0d8f0;
}

.node-header.expanded {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.node-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.node-header.expanded .node-chevron { transform: rotate(90deg); }

.node-chevron svg { width: 16px; height: 16px; }
.node-header.expanded .node-chevron svg { fill: white; }

.node-type {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.type-bab { background: #dbeafe; color: #1e40af; }
.type-bagian { background: #dcfce7; color: #166534; }
.type-paragraf { background: #fef3c7; color: #92400e; }
.type-pasal { background: #fae8ff; color: #7e22ce; }

.node-header.expanded .type-bab,
.node-header.expanded .type-bagian,
.node-header.expanded .type-paragraf,
.node-header.expanded .type-pasal { background: rgba(255,255,255,0.2); color: white; }

.node-text { flex: 1; min-width: 0; line-height: 1.4; }
.node-label { font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.node-title { font-size: 0.85rem; color: var(--text-secondary); }
.node-header.expanded .node-title { color: rgba(255,255,255,0.8); }

.node-comment-count {
  margin-left: auto;
  background: var(--accent);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

.node-children {
  display: none;
  padding-left: 20px;
  border-left: 2px solid var(--border);
  margin-left: 24px;
}

.node-children.open { display: block; padding-top: 4px; padding-bottom: 4px; }

.node-content {
  display: none;
  background: white;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 20px;
  font-size: 0.9rem;
  line-height: 1.8;
}

.node-content.open { display: block; }
.node-content ol { padding-left: 24px; }
.node-content ol li { margin-bottom: 8px; }
.node-content ol ol { margin-top: 8px; }

/* Comment Section */
.comment-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dashed var(--border);
}

.comment-section h4 {
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-input-area {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.comment-input-area textarea {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  background: #fafbfc;
  transition: border-color 0.2s;
}

.comment-input-area textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
}

.comment-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-send, .btn-voice {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
}

.btn-send {
  background: var(--primary);
  color: white;
}

.btn-send:hover { background: var(--primary-light); }

.btn-voice {
  background: #fef3c7;
  color: #92400e;
}

.btn-voice:hover { background: #fde68a; }
.btn-voice.recording { background: var(--danger); color: white; animation: pulse 1s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.comment-list { display: flex; flex-direction: column; gap: 8px; }

.comment-item {
  padding: 12px;
  background: #f7f8fa;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.75rem;
}

.comment-author {
  font-weight: 700;
  color: var(--primary);
}

.comment-utusan {
  color: var(--text-secondary);
  font-style: italic;
}

.comment-time {
  color: var(--text-secondary);
}

.comment-text {
  font-size: 0.85rem;
  line-height: 1.6;
}

.comment-badge-voice {
  display: inline-block;
  font-size: 0.65rem;
  background: #fef3c7;
  color: #92400e;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

/* ===== Admin Page ===== */
.admin-bg { background: var(--bg); min-height: 100vh; }

.admin-container { max-width: 1100px; margin: 0 auto; padding: 20px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: white;
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: var(--shadow);
}

.admin-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.admin-tab.active {
  background: var(--primary);
  color: white;
}

.admin-panel {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.admin-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-panel th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg);
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px solid var(--border);
}

.admin-panel td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.admin-panel tr:hover td { background: #f7f8fa; }

/* ===== Admin: Rekap Komentar per Pasal ===== */
.admin-panel.rk-card { position: relative; margin-bottom: 24px; overflow: visible; }
.rk-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.rk-title { font-size: 1rem; font-weight: 700; color: var(--primary); }
.rk-sub { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }

.rk-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg); border-radius: var(--radius-sm); }
.rk-seg button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.rk-seg button[aria-pressed="true"] { background: white; color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,0.1); }

.rk-group + .rk-group { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.rk-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; padding: 0 8px; }
.rk-group-name { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.rk-group-total { font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; }

.rk-row {
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 6px;
}
.rk-row.compact { grid-template-columns: 88px 1fr; }
.rk-row:hover, .rk-row:focus-visible { background: #f7f8fa; outline: none; }
.rk-label { min-width: 0; }
.rk-pasal { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.rk-bab { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.35; }
.rk-track { display: flex; align-items: center; gap: 8px; min-width: 0; height: 24px; border-left: 1px solid #c3c2b7; }
.rk-bar { flex: none; height: 16px; min-width: 4px; background: var(--primary-light); border-radius: 0 4px 4px 0; transition: filter 0.15s; }
.rk-row:hover .rk-bar, .rk-row:focus-visible .rk-bar { filter: brightness(1.3); }
.rk-val { font-size: 0.8rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.rk-table-wrap { overflow-x: auto; }
.rk-table-wrap td.num, .rk-table-wrap th.num { text-align: right; }

.rk-tip {
  position: absolute;
  z-index: 5;
  max-width: 280px;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 0.78rem;
  pointer-events: none;
}
.rk-tip-val { display: flex; align-items: center; gap: 6px; font-size: 0.95rem; font-weight: 800; color: var(--text); }
.rk-tip-key { width: 12px; height: 3px; border-radius: 2px; background: var(--primary-light); }
.rk-tip-name { margin-top: 2px; font-weight: 600; color: var(--text); }
.rk-tip-bab { color: var(--text-secondary); line-height: 1.35; }

@media (max-width: 640px) {
  .rk-row, .rk-row.compact { grid-template-columns: 1fr; gap: 2px; }
  .rk-seg { width: 100%; }
  .rk-seg button { flex: 1; }
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--success);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 16px;
}

.btn-export:hover { background: #16a34a; }

.section-filter {
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.section-filter select {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  background: white;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: white;
  display: flex;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 0;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item svg {
  transition: transform 0.15s;
}

.bottom-nav-item.active svg {
  transform: scale(1.1);
}

/* ===== View Panels ===== */
.view-panel {
  display: none;
  padding-bottom: 80px;
}

.view-panel.active {
  display: block;
}

/* ===== Download Page ===== */
.unduh-card {
  background: white;
  border-radius: var(--radius);
  padding: 40px 28px;
  box-shadow: var(--shadow);
  text-align: center;
  margin-top: 10px;
}

.unduh-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #f0f4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.unduh-card h2 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.unduh-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.unduh-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.unduh-meta span {
  background: var(--bg);
  padding: 4px 14px;
  border-radius: 20px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  margin-bottom: 20px;
}

.btn-download:hover { background: var(--primary-light); }
.btn-download:active { transform: scale(0.98); }

.unduh-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto;
}

/* ===== Panduan Page ===== */
.panduan-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  margin-top: 10px;
}

.panduan-card h2 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.panduan-intro {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.panduan-step {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.step-number {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.step-content h3 {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 6px;
}

.step-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-visual {
  margin-top: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.mock-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.mock-node.child {
  margin-left: 24px;
  margin-bottom: 0;
}

.mock-chevron { color: var(--text-secondary); font-size: 0.7rem; }

.mock-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: #dbeafe;
  color: #1e40af;
}

.mock-badge.green {
  background: #fae8ff;
  color: #7e22ce;
}

.mock-input-area {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.mock-textarea {
  flex: 1;
  padding: 10px 12px;
  background: white;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.mock-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-btn.send {
  background: var(--primary);
}

.panduan-voice-steps {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.voice-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  width: 100%;
  font-size: 0.85rem;
}

.voice-step-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 8px;
  background: #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-step-icon.recording-demo {
  background: var(--danger);
}

.voice-step-arrow {
  color: var(--text-secondary);
  font-size: 1rem;
}

.panduan-tip {
  margin-top: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #1e40af;
  line-height: 1.5;
}

.inline-icon.mic-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #fef3c7;
  border-radius: 4px;
  vertical-align: middle;
}

.panduan-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
  text-align: center;
}

.panduan-footer p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.btn-go-telaah {
  display: inline-block;
  padding: 12px 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-go-telaah:hover { background: var(--primary-light); }

/* ===== Flipbook ===== */
.flipbook-wrapper {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 10px;
}

.flipbook-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.flipbook-header h3 {
  font-size: 0.9rem;
  color: var(--primary);
}

.flipbook-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fb-btn {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: all 0.2s;
}

.fb-btn:hover {
  background: #f0f4ff;
  border-color: var(--primary);
}

.fb-page-info {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 120px;
  text-align: center;
}

.flipbook-container {
  background: #e8eaed;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-x: auto;
}

.flipbook-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.flipbook-loading p { font-size: 0.85rem; margin-top: 12px; }

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.flipbook {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-page-canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
  border-radius: 4px;
  background: white;
  animation: pageFlip 0.3s ease-out;
}

@keyframes pageFlip {
  from { opacity: 0; transform: perspective(800px) rotateY(15deg) scale(0.95); }
  to { opacity: 1; transform: perspective(800px) rotateY(0deg) scale(1); }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .container { padding: 20px 12px; }
  .hero-card { padding: 28px 20px; }
  .naskah-container, .admin-container { padding: 12px; }
  .node-children { margin-left: 12px; padding-left: 12px; }
  .node-header { padding: 10px 12px; }
  .topbar-title { font-size: 0.8rem; }
  .comment-input-area { flex-direction: column; }
  .comment-actions { flex-direction: row; }
  .btn-send, .btn-voice { width: auto; flex: 1; height: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-panel { overflow-x: auto; }
  .unduh-card { padding: 28px 20px; }
  .unduh-meta { flex-direction: column; gap: 8px; }
  .panduan-step { gap: 12px; }
  .step-number { width: 30px; height: 30px; min-width: 30px; font-size: 0.85rem; }
  .voice-step { flex-direction: column; text-align: center; padding: 12px; }
}
