/* ============================================
   SURATKU.ID — PREMIUM DESIGN SYSTEM
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --primary: #0F4C3A;
  --primary-light: #1A6B52;
  --primary-dark: #0A3328;
  --primary-50: #E8F5F0;
  --primary-100: #C6E6D9;
  --primary-200: #A0D4BF;
  --primary-600: #0F4C3A;
  --primary-700: #0A3B2D;
  --accent: #C8A96E;
  --accent-light: #DFC89A;
  --accent-dark: #B08D4E;
  --accent-glow: rgba(200, 169, 110, 0.25);
  --bg-body: #F8FAF9;
  --bg-card: #FFFFFF;
  --bg-dark: #0A0E0D;
  --bg-section-alt: #F0F5F3;
  --text-primary: #1A1A2E;
  --text-secondary: #4A5568;
  --text-muted: #8B95A5;
  --text-on-dark: #F0F5F3;
  --border-light: #E2E8F0;
  --border-card: rgba(15, 76, 58, 0.08);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 30px rgba(15, 76, 58, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1200px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-body);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: color var(--transition-fast); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Navbar ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-base);
  height: var(--header-height);
}

.header.scrolled {
  background: rgba(255,255,255,0.95);
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
  box-shadow: 0 2px 8px rgba(15,76,58,0.3);
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-50);
}

.nav-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
  color: white !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(15,76,58,0.3);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(15,76,58,0.4) !important;
  background: linear-gradient(135deg, var(--primary-light), var(--primary)) !important;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.mobile-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ---------- Hero Section ---------- */
.hero {
  padding: calc(var(--header-height) + 60px) 0 80px;
  background: linear-gradient(160deg, #E8F5F0 0%, #F0F8F5 40%, #FDF8F0 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,169,110,0.1) 0%, transparent 70%);
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15,76,58,0.06) 0%, transparent 70%);
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(15,76,58,0.08);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  border: 1px solid rgba(15,76,58,0.12);
  animation: fadeInUp 0.6s ease-out;
}

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

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
  animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.hero-stat h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-stat p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.hero-visual {
  position: relative;
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.hero-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-card);
  position: relative;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: calc(var(--radius-xl) + 2px);
  background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary));
  z-index: -1;
  opacity: 0.15;
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.hero-card-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.hero-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.hero-card-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.hero-card-body .field-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 12px;
  margin-bottom: 2px;
}

.hero-card-body .field-value {
  font-weight: 600;
  color: var(--text-primary);
}

.hero-floating-badge {
  position: absolute;
  bottom: -20px;
  right: -10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 8px 25px rgba(200,169,110,0.4);
  animation: bounce 3s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 15px rgba(15,76,58,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15,76,58,0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(200,169,110,0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(200,169,110,0.4);
}

.btn-ghost {
  background: var(--primary-50);
  color: var(--primary);
}

.btn-ghost:hover {
  background: var(--primary-100);
}

.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-lg { padding: 18px 36px; font-size: 1.05rem; }

/* ---------- Search Bar ---------- */
.search-section {
  padding: 24px 0;
  background: linear-gradient(to bottom, #FDF8F0 0%, #F8FAF9 100%);
  position: relative;
  z-index: 10;
}

.search-bar {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 8px;
  border: 1px solid var(--border-card);
  max-width: 700px;
  margin: 0 auto;
}

.search-bar input {
  flex: 1;
  padding: 16px 24px;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text-primary);
  background: transparent;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar .btn {
  border-radius: var(--radius-lg);
  padding: 14px 32px;
}

/* ---------- Sections ---------- */
.section {
  padding: 80px 0;
}

.section-alt { background: var(--bg-section-alt); }

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.section-header .overline {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ---------- Category Grid ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  border: 1px solid var(--border-card);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-100);
}

.category-card:hover::before { transform: scaleX(1); }

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.category-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.category-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Template Cards ---------- */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.template-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.template-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.template-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
  width: fit-content;
}

.badge-free {
  background: var(--primary-50);
  color: var(--primary);
}

.badge-premium {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
}

.template-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.template-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.template-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.template-price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
}

.template-price.premium-price { color: var(--accent-dark); }

/* ---------- Ebook Grid ---------- */
.ebook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.ebook-card {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  overflow: hidden;
  transition: all var(--transition-base);
}

.ebook-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.ebook-cover {
  width: 120px;
  min-height: 160px;
  object-fit: cover;
  flex-shrink: 0;
}

.ebook-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.ebook-info h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.ebook-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex: 1;
  margin-bottom: 12px;
}

/* ---------- Detail Page ---------- */
.detail-hero {
  padding: calc(var(--header-height) + 40px) 0 40px;
  background: linear-gradient(160deg, var(--primary-dark), var(--primary));
  color: white;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--primary-100);
  margin-bottom: 24px;
}

.breadcrumb a { color: var(--primary-100); opacity: 0.8; }
.breadcrumb a:hover { opacity: 1; }
.breadcrumb .sep { opacity: 0.5; }

.detail-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.detail-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 700px;
  line-height: 1.7;
}

.detail-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding: 48px 0;
}

.detail-main h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 16px;
}

.detail-main h2:first-child { margin-top: 0; }

.detail-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  align-self: start;
}

.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.sidebar-card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-align: left;
  transition: all var(--transition-fast);
  background: var(--bg-card);
}

.faq-question:hover { background: var(--primary-50); }

.faq-icon {
  font-size: 1.2rem;
  transition: transform var(--transition-fast);
  color: var(--primary);
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.faq-answer-inner {
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- Generator Page ---------- */
.generator-section {
  padding: calc(var(--header-height) + 40px) 0 60px;
}

.generator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.form-panel {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-card);
}

.form-panel h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-panel .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-body);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,76,58,0.1);
  background: white;
}

textarea.form-control { resize: vertical; min-height: 90px; }

.preview-panel {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-card);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

.preview-header h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}

.preview-body {
  padding: 48px 56px;
  min-height: 500px;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-primary);
  background: white;
  border: none;
  margin: 0;
  border-radius: 0;
  font-family: 'Times New Roman', serif;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 16px;
}

.footer-brand p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 20px;
  color: white;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.footer-col a:hover {
  color: var(--accent-light);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 24px 0;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
}

/* ---------- Admin Panel ---------- */
.admin-layout {
  display: flex !important;
  min-height: 100vh;
  width: 100%;
}

.admin-sidebar {
  background: var(--primary-dark);
  padding: 24px 0;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
  flex-shrink: 0;
}

.admin-sidebar .logo {
  color: white;
  padding: 0 24px;
  margin-bottom: 32px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255,255,255,0.08);
  color: white;
  border-left-color: var(--accent);
}

.admin-main {
  flex: 1;
  margin-left: 260px;
  padding: 32px 40px;
  background: var(--bg-body);
  min-height: 100vh;
  width: calc(100% - 260px);
  max-width: calc(100% - 260px);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-header h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.green { background: var(--primary-50); }
.stat-icon.gold { background: #FFF8E1; }
.stat-icon.blue { background: #E3F2FD; }
.stat-icon.purple { background: #F3E5F5; }

.stat-info h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Tables ---------- */
.data-table {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  overflow-x: auto;
  overflow-y: hidden;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-section-alt);
  border-bottom: 1px solid var(--border-light);
}

.data-table td {
  padding: 14px 20px;
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: var(--primary-50); }

.status-badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-paid { background: #E8F5E9; color: #2E7D32; }
.status-pending { background: #FFF3E0; color: #E65100; }
.status-failed { background: #FFEBEE; color: #C62828; }

/* ---------- Modal / Dialog ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

/* ---------- Alerts / Notices ---------- */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success { background: #E8F5E9; color: #2E7D32; border: 1px solid #C8E6C9; }
.alert-error { background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2; }
.alert-info { background: #E3F2FD; color: #1565C0; border: 1px solid #BBDEFB; }
.alert-warning { background: #FFF3E0; color: #E65100; border: 1px solid #FFE0B2; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; max-width: 500px; margin: 0 auto; }
  .detail-content { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .generator-layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border-light);
  }
  .hero h1 { font-size: 2.2rem; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .section-header h2 { font-size: 1.7rem; }
  .template-grid { grid-template-columns: 1fr; }
  .ebook-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .admin-sidebar {
    left: -260px;
    transition: left var(--transition-base);
    z-index: 100;
  }
  .admin-sidebar.open { left: 0; }
  .admin-main { margin-left: 0; width: 100%; max-width: 100%; }
  .stat-cards { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { padding-top: calc(var(--header-height) + 40px); padding-bottom: 60px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .search-bar { flex-direction: column; }
  .search-bar .btn { width: 100%; justify-content: center; }
  .form-panel { padding: 24px; }
  .preview-body { padding: 24px; }
  .container { padding: 0 16px; }
}

/* ---------- Print — Hanya tampilkan area preview ---------- */
@media print {
  /* Sembunyikan semua kecuali preview */
  body * {
    visibility: hidden;
  }
  #previewBody,
  #previewBody * {
    visibility: visible;
  }
  #previewBody {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 40px 60px;
    margin: 0;
    border: none;
    box-shadow: none;
    background: white;
    font-family: 'Times New Roman', serif;
    font-size: 12pt;
    line-height: 1.8;
    color: #000;
  }
  body {
    background: white;
    margin: 0;
    padding: 0;
  }
  @page {
    margin: 20mm;
    size: A4;
  }
}
