/* =========================================
   1. SETUP GLOBAL & VARIABEL
   ========================================= */
:root {
  --primary: #4f46e5; /* Indigo 600 */
  --primary-hover: #4338ca; /* Indigo 700 */
  --bg-app: #f3f4f6; /* Slate 100 */
  --bg-sidebar: #ffffff;
  --text-main: #1f2937; /* Slate 800 */
  --text-muted: #6b7280; /* Slate 500 */
  --border: #e5e7eb;
}

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

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  /* Default untuk App: height 100vh agar tidak scroll double */
  height: 100vh;
  overflow: hidden;
}

/* =========================================
   2. STYLE KHUSUS APLIKASI (app.html)
   ========================================= */

/* Layout Utama Aplikasi */
.app-container {
  display: flex;
  height: 100vh;
}

/* --- Sidebar (Kiri) --- */
.sidebar {
  width: 400px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 30px;
}

.brand h2 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 5px;
}
.brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 30px;
}

/* Form Styling */
.form-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  margin: 20px 0 10px 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
}

.input-group {
  margin-bottom: 15px;
}
.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: #374151;
}

.input-group input,
.input-group textarea,
.input-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  transition: all 0.2s;
  background-color: #f9fafb;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-group textarea {
  height: 100px;
  resize: vertical;
}

.row {
  display: flex;
  gap: 15px;
}
.row .input-group {
  flex: 1;
}

/* --- Preview Stage (Kanan) --- */
.preview-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-app);
}

/* Top Bar */
.top-bar {
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.status {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.badge {
  background: #d1fae5;
  color: #065f46;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Tombol Global */
.actions .btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Tombol Primary (Unduh/CTA) */
.btn-primary,
.btn-cta {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
  border: none;
  text-decoration: none;
}

.btn-primary:hover,
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

/* Tombol Secondary (Salin) */
.btn-secondary {
  background-color: white;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-secondary:hover {
  border-color: #6366f1;
  color: #4f46e5;
  background-color: #f5f7ff;
}

/* Tombol Template (Chips) */
.btn-tiny {
  background: #f3f4f6;
  border: 1px solid transparent;
  color: #4b5563;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-tiny:hover {
  background: #e0e7ff;
  color: #4338ca;
  border-color: #c7d2fe;
  transform: scale(1.05);
}

/* Tombol Hapus */
.btn-text-danger {
  margin-top: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  width: 100%;
  transition: 0.2s;
}
.btn-text-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* Viewport Kertas (Updated Fix Scroll Desktop) */
.document-viewport {
  flex: 1;
  padding: 40px;

  /* 1. Tambah ruang scroll bawah yang luas */
  padding-bottom: 200px;

  /* 2. Scroll vertikal aktif */
  overflow-y: auto;

  /* 3. Setup Layout */
  display: flex;
  justify-content: center;

  /* 4. PENTING: Agar konten panjang mulai dari atas dan bisa di-scroll sampai habis */
  align-items: flex-start;
}

/* Kertas Surat Fisik */
/* Update class .paper agar bisa memanjang lebih dari 1 halaman */
.paper {
  background: white;
  width: 210mm;
  min-height: 297mm; /* Minimal setinggi A4 */
  height: auto; /* PENTING: Biarkan memanjang jika isi banyak */
  padding: 25mm 25mm;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  margin-bottom: 50px;
  color: #000;
  font-family: "Times New Roman", serif;
  font-size: 12pt;
  line-height: 1.5;
  overflow: visible; /* Jangan sembunyikan konten yang lewat */
}

.paper p {
  text-align: justify;
  margin-bottom: 10px;
}

.paper p[style*="text-align: right"] {
  text-align: right;
}

/* Canvas Tanda Tangan */
.signature-pad {
  border: 2px dashed var(--border);
  border-radius: 6px;
  background-color: #fff;
  cursor: crosshair;
  overflow: hidden;
  margin-bottom: 5px;
  touch-action: none;
}
.signature-pad canvas {
  display: block;
  width: 100%;
}

/* =========================================
   3. STYLE KHUSUS LANDING PAGE (index.html)
   ========================================= */

/* Reset khusus body landing page */
.landing-body {
  overflow-y: auto !important;
  height: auto !important;
  background-color: #ffffff;
}

/* Navbar */
.navbar {
  padding: 20px 0;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid #f3f4f6;
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
}

.btn-nav {
  text-decoration: none;
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.9rem;
}
.btn-nav:hover {
  color: var(--primary);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
  max-width: 800px;
  margin: 0 auto;
}

.tagline {
  background: #e0e7ff;
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #111827;
  font-weight: 800;
}

.text-gradient {
  background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.btn-cta {
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  display: inline-block;
}

.btn-outline {
  background: white;
  color: var(--text-main);
  border: 1px solid #d1d5db;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: 0.2s;
}
.btn-outline:hover {
  background: #f9fafb;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Features Section */
.features {
  background: #f9fafb;
  padding: 80px 20px;
}

.feature-container {
  max-width: 1000px;
  margin: 0 auto;
}

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

.section-title h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #111827;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.feature-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  transition: 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  border-color: var(--primary);
}

.feature-card .icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: block;
}
.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #111827;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Footer */
.landing-footer {
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid #e5e7eb;
  background: white;
}

/* =========================================
   4. RESPONSIF MOBILE
   ========================================= */
@media (max-width: 850px) {
  /* Umum & Landing Page Mobile */
  body {
    height: auto;
    overflow: auto;
    overflow-x: hidden;
  }

  .hero h1 {
    font-size: 2rem;
  }
  .hero-buttons {
    flex-direction: column;
  }
  .btn-cta,
  .btn-outline {
    width: 100%;
    text-align: center;
  }

  /* App Mobile Logic */
  .app-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    height: auto;
    padding: 20px;
    overflow: visible;
  }

  .preview-stage {
    height: auto;
    overflow: visible;
    padding-bottom: 50px;
  }

  .top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 10px;
  }

  .document-viewport {
    padding: 15px;
    display: block;
  }

  .paper {
    width: 100%;
    min-height: auto;
    padding: 20px;
    font-size: 11pt;
  }
}

/* =========================================
   5. FITUR SOSIAL MEDIA (SIDEBAR)
   ========================================= */

.social-box {
  background-color: #f9fafb;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.social-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  margin-bottom: 4px;
  background: white;
  border: 1px solid transparent;
}

.social-link:hover {
  background-color: #fff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(3px); /* Efek geser sedikit ke kanan */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.social-icon {
  font-size: 1rem;
}

/* Responsif Mobile untuk Social Box */
@media (max-width: 850px) {
  .social-box {
    margin-bottom: 20px;
  }
}

/* =========================================
   8. UPDATE LANDING PAGE (VISUAL BOOSTER)
   ========================================= */

/* Background Grid Pattern (Biar tidak putih polos) */
.landing-body {
  background-color: #f8fafc;
  background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 20px 20px; /* Ukuran kotak-kotak */
}

/* Update Navbar */
.nav-links {
  display: flex;
  gap: 20px;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
}
.nav-links a:hover {
  color: var(--primary);
}

.btn-nav-primary {
  background: var(--text-main);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: 0.2s;
}
.btn-nav-primary:hover {
  background: black;
}

/* HERO SECTION BARU (Split Layout) */
.hero-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 20px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr; /* Kiri lebih lebar sedikit */
  gap: 40px;
  align-items: center;
}

/* Kolom Teks */
.badge-new {
  background: #dbeafe;
  color: #1e40af;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.hero-text h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.user-count {
  margin-top: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Kolom Visual (CSS Mockup) */
.mockup-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  border: 1px solid #e2e8f0;
  position: relative;
  transform: rotate(2deg); /* Miring sedikit biar artistik */
  transition: 0.3s;
}

.mockup-card:hover {
  transform: rotate(0deg) scale(1.02);
}

.mockup-header {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.red {
  background: #ef4444;
}
.yellow {
  background: #f59e0b;
}
.green {
  background: #22c55e;
}

/* Skeleton Loading Effect untuk Mockup */
.skeleton-line {
  height: 10px;
  background: #f1f5f9;
  border-radius: 4px;
  margin-bottom: 8px;
}
.title {
  height: 16px;
  width: 40%;
  background: #cbd5e1;
  margin-bottom: 15px;
}
.w-90 {
  width: 90%;
}
.w-80 {
  width: 80%;
}
.w-70 {
  width: 70%;
}
.w-50 {
  width: 50%;
}
.skeleton-signature {
  height: 40px;
  width: 30%;
  background: #e2e8f0;
  margin-top: 20px;
  border-radius: 4px;
}

/* Badge Melayang */
.float-badge {
  position: absolute;
  background: white;
  padding: 8px 15px;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  border: 1px solid #f1f5f9;
  animation: float 3s ease-in-out infinite;
}
.badge-1 {
  top: -15px;
  right: -10px;
  animation-delay: 0s;
}
.badge-2 {
  bottom: 20px;
  left: -20px;
  animation-delay: 1.5s;
}

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

/* STATS BAR */
.stats-bar {
  background: white;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 20px;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.stat-item {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--text-main);
  font-size: 0.9rem;
}
.stat-item i {
  color: var(--primary);
}

/* --- STEPS SECTION (MODERN REDESIGN) --- */
.steps-section {
  padding: 80px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.step-card {
  background: white;
  padding: 35px;
  border-radius: 16px; /* Lebih rounded */
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Bayangan halus */
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Efek Hover: Naik ke atas & bayangan menebal */
.step-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: var(--primary); /* Border jadi ungu saat hover */
}

/* Header Kartu (Icon + Badge) */
.step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

/* Ikon Langkah dengan Background Warna-warni */
.step-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Warna-warni ikon */
.icon-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.icon-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}
.icon-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Badge "Langkah X" */
.step-pill {
  background: #f1f5f9;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.step-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: #111827;
  font-weight: 700;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* FOOTER UPDATE */
.landing-footer {
  background: white;
  padding: 40px 20px 20px;
  margin-top: 60px;
}
.footer-content {
  max-width: 1000px;
  margin: 0 auto 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: 20px;
}
.copyright {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 20px;
}

/* RESPONSIVE UPDATE */
@media (max-width: 850px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-buttons {
    justify-content: center;
  }
  .user-count {
    justify-content: center;
  }
  .hero-visual {
    display: none; /* Sembunyikan mockup di HP biar tidak penuh */
  }
  .nav-links {
    display: none; /* Sembunyikan menu di HP */
  }
}

/* --- FOOTER SOCIAL MEDIA PILLS --- */

.social-pills-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap; /* Agar rapi di HP */
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px; /* Bentuk Pil */
  text-decoration: none;
  background: white;
  border: 1px solid #e2e8f0;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

/* Efek Hover Spesifik per Platform */

/* Youtube (Merah) */
.btn-yt:hover {
  color: #ef4444;
  border-color: #ef4444;
  background-color: #fef2f2;
  transform: translateY(-3px);
}

/* Instagram (Pink/Ungu) */
.btn-ig:hover {
  color: #d946ef;
  border-color: #d946ef;
  background-color: #fdf4ff;
  transform: translateY(-3px);
}

/* Blogger (Oranye) */
.btn-blog:hover {
  color: #f97316;
  border-color: #f97316;
  background-color: #fff7ed;
  transform: translateY(-3px);
}

/* =========================================
   9. MEGA FOOTER (DENSE & PROFESSIONAL)
   ========================================= */

.landing-footer {
  background-color: #fff; /* Atau ganti #f8fafc untuk abu-abu sangat muda */
  border-top: 1px solid #e2e8f0;
  padding: 60px 20px 20px;
  margin-top: 60px;
  font-size: 0.9rem;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* Grid Layout 4 Kolom */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr; /* Kolom brand lebih lebar */
  gap: 40px;
  margin-bottom: 40px;
}

/* Kolom Styling */
.footer-col h4 {
  color: #111827;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-desc {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

/* List Link Navigasi */
.footer-links-list {
  list-style: none;
}
.footer-links-list li {
  margin-bottom: 12px;
}
.footer-links-list a {
  text-decoration: none;
  color: var(--text-muted);
  transition: 0.2s;
}
.footer-links-list a:hover {
  color: var(--primary);
  padding-left: 5px; /* Efek geser saat hover */
}

/* Social Media Vertical Rows */
.social-links-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-row {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  background: #f8fafc;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.social-row:hover {
  background: white;
  border-color: var(--primary);
  transform: translateX(5px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Bottom Bar */
.footer-bottom {
  border-top: 1px solid #e2e8f0;
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Responsif Mobile untuk Footer */
@media (max-width: 850px) {
  .footer-grid {
    grid-template-columns: 1fr; /* Jadi 1 kolom memanjang ke bawah */
    gap: 30px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* =========================================
   10. HALAMAN DOKUMEN (Legal, Guide, Support)
   ========================================= */

/* Container khusus artikel agar tidak terlalu lebar */
.doc-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 20px;
  min-height: 60vh; /* Agar footer tidak naik ke tengah layar */
}

.doc-header {
  text-align: center;
  margin-bottom: 50px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 30px;
}

.doc-header h1 {
  font-size: 2.5rem;
  color: #111827;
  margin-bottom: 10px;
}
.doc-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.doc-content h2 {
  font-size: 1.5rem;
  color: #111827;
  margin-top: 40px;
  margin-bottom: 15px;
  border-left: 4px solid var(--primary);
  padding-left: 15px;
}

.doc-content h3 {
  font-size: 1.2rem;
  color: #374151;
  margin-top: 25px;
  margin-bottom: 10px;
}
.doc-content p {
  line-height: 1.8;
  color: #4b5563;
  margin-bottom: 15px;
  text-align: justify;
}
.doc-content ul {
  margin-left: 20px;
  margin-bottom: 20px;
  color: #4b5563;
  line-height: 1.7;
}
.doc-content li {
  margin-bottom: 8px;
}

/* Kotak Kontak (Support) */
.contact-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  margin-top: 30px;
}
.contact-btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 10px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 15px;
  transition: 0.2s;
}
.contact-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* =========================================
   11. STYLE TAMBAHAN HALAMAN SUPPORT
   ========================================= */

/* FAQ Section */
.faq-container {
  margin-bottom: 50px;
}
.faq-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 20px;
  transition: all 0.2s;
}
.faq-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.faq-question {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq-answer {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-left: 28px; /* Indentasi agar sejajar teks pertanyaan */
}

/* Contact Grid */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.support-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  transition: 0.3s;
}
.support-card:hover {
  background: white;
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.support-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: inline-block;
}

.support-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-bug {
  background: #fee2e2;
  color: #991b1b;
}
.btn-bug:hover {
  background: #fecaca;
}

.btn-idea {
  background: #fef3c7;
  color: #92400e;
}
.btn-idea:hover {
  background: #fde68a;
}

.btn-collab {
  background: #e0e7ff;
  color: #3730a3;
}
.btn-collab:hover {
  background: #c7d2fe;
}

/* Notice Box */
.notice-box {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 15px;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #1e3a8a;
  margin-bottom: 30px;
}

/* =========================================
   12. PRINT STYLE (Agar bisa Ctrl+P dengan rapi)
   ========================================= */
@media print {
  /* Sembunyikan semua elemen KECUALI kertas surat */
  .sidebar,
  .top-bar,
  .navbar,
  .landing-footer,
  .brand,
  .btn-text-danger,
  .social-box {
    display: none !important;
  }

  /* Reset layout agar kertas memenuhi halaman cetak */
  body,
  .app-container,
  .preview-stage,
  .document-viewport {
    background: white;
    height: auto;
    overflow: visible;
    display: block;
    padding: 0;
    margin: 0;
  }

  /* Atur Kertas Surat */
  .paper {
    box-shadow: none; /* Hilangkan bayangan */
    margin: 0;
    padding: 0; /* Margin dikontrol oleh settingan printer user */
    width: 100%;
    page-break-inside: avoid;
  }

  /* Sembunyikan scrollbar */
  ::-webkit-scrollbar {
    display: none;
  }
}

/* =========================================
   13. UPDATE POSISI TANDA TANGAN (KANAN)
   ========================================= */

.signature-wrapper {
  display: flex;
  justify-content: flex-end; /* Mendorong konten ke Kanan */
  margin-top: 50px; /* Jarak dari paragraf atas */
  padding-right: 20px; /* Jarak aman dari pinggir kertas */
}

.signature-box {
  text-align: center; /* Teks di tengah kotak tanda tangan */
  width: 250px; /* Lebar area tanda tangan */
}

/* Memastikan teks di dalam kotak tanda tangan Rata Tengah (bukan Justify) */
.signature-box p {
  text-align: center !important;
  margin-bottom: 5px;
}

/* =========================================
   14. CUSTOM MODAL (REPLACE NATIVE ALERT)
   ========================================= */

/* Latar Belakang Gelap (Overlay) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Hitam transparan */
  backdrop-filter: blur(4px); /* Efek blur di belakang */
  z-index: 9999; /* Paling atas */
  display: none; /* Default sembunyi */
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Class untuk memunculkan modal */
.modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* Kotak Modal */
.modal-box {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efek membal (bounce) */
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

/* Ikon Peringatan */
.modal-icon {
  font-size: 3rem;
  color: #f59e0b; /* Kuning Peringatan */
  margin-bottom: 15px;
}

.modal-box h3 {
  font-size: 1.25rem;
  color: #111827;
  margin-bottom: 10px;
}

.modal-box p {
  color: #6b7280;
  font-size: 0.95rem;
  margin-bottom: 25px;
  line-height: 1.5;
}

/* Tombol Aksi */
.modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-cancel {
  background: white;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  flex: 1;
}
.btn-cancel:hover {
  background: #f3f4f6;
}

.btn-confirm-delete {
  background: #ef4444;
  border: 1px solid #ef4444;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  flex: 1;
  box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}
.btn-confirm-delete:hover {
  background: #dc2626;
}

/* =========================================
   15. UPDATE MOCKUP REALISTIS (HERO SECTION)
   ========================================= */

/* Address Bar Palsu (Hiasan di atas kertas) */
.address-bar {
  background: #f1f5f9;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.6rem;
  color: #64748b;
  margin-left: 10px;
  flex: 1;
  text-align: center;
  font-family: monospace;
}

/* Kertas Surat Mini */
.real-letter {
  padding: 0 !important; /* Reset padding card */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.real-letter .mockup-header {
  padding: 15px;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0;
}

.mini-letter-content {
  padding: 25px 30px;
  font-family: "Times New Roman", serif; /* Font surat resmi */
  font-size: 0.65rem; /* Ukuran font mini */
  line-height: 1.4;
  color: #333;
  background: #fff;
  flex: 1;
  cursor: default;
}

.mini-date {
  text-align: right;
}

.mini-justify {
  text-align: justify;
  margin-bottom: 8px;
  color: #555;
}

.mini-signature {
  font-family: "Inter", sans-serif;
  font-size: 1.5rem; /* Tanda tangan agak besar */
  color: #000;
  margin: 5px 0;
}

/* Efek Hover: Zoom in sedikit biar terbaca */
.mockup-card:hover .mini-letter-content {
  background: #fafafa;
}

/* =========================================
   16. TOAST NOTIFICATION (Micro-interaction)
   ========================================= */

.toast {
  visibility: hidden; /* Default sembunyi */
  min-width: 250px;
  background-color: #333; /* Warna gelap elegan */
  color: #fff;
  text-align: center;
  border-radius: 50px; /* Bentuk kapsul */
  padding: 16px;
  position: fixed;
  z-index: 10000;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%); /* Posisi tengah bawah */
  font-size: 0.9rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s, bottom 0.3s;
}

/* Class untuk memunculkan toast */
.toast.show {
  visibility: visible;
  opacity: 1;
  bottom: 50px; /* Efek naik sedikit saat muncul */
}

/* Responsif Toast di HP */
@media (max-width: 600px) {
  .toast {
    min-width: 80%;
    bottom: 20px;
  }
  .toast.show {
    bottom: 30px;
  }
}

/* =========================================
   17. STYLE LAMPIRAN & BIODATA
   ========================================= */

/* Checkbox Grid (Agar rapi 2 kolom di sidebar) */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.check-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  background: #f9fafb;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  transition: 0.2s;
}

.check-box:hover {
  border-color: var(--primary);
  background: #fff;
}

/* Custom Lampiran Tags (Pill) */
.custom-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.attach-tag {
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.attach-tag button {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
  padding: 0;
  line-height: 1;
}

/* Tabel di Preview agar rapi */
.paper table td {
  padding-bottom: 6px;
  vertical-align: top; /* Agar alamat panjang teksnya rata atas */
}

/* =========================================
   RESPONSIF MOBILE (FIX SCROLL & POTONGAN)
   ========================================= */
@media (max-width: 850px) {
  /* 1. Reset Body & HTML agar bisa scroll bebas */
  html,
  body {
    height: auto !important;
    min-height: 100%;
    overflow-y: auto !important; /* Paksa scroll vertikal aktif */
    overflow-x: hidden; /* Cegah geser samping */
  }

  /* 2. Container Utama menjadi kolom memanjang ke bawah */
  .app-container {
    display: flex;
    flex-direction: column;
    height: auto !important; /* Jangan dipatok 100vh */
    overflow: visible;
  }

  /* 3. Sidebar (Form Input) */
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    height: auto;
    padding: 20px;
    overflow: visible;
    flex: none; /* Jangan menyusut/membesar otomatis */
  }

  /* 4. Area Preview (Kertas) */
  .preview-stage {
    flex: none; /* Penting: agar tidak memotong konten */
    height: auto;
    overflow: visible;
    background-color: #e5e7eb; /* Warna abu sedikit lebih gelap biar kontras sama kertas */
  }

  /* Sticky Top Bar (Menu Salin/Unduh Nempel di Atas) */
  .top-bar {
    position: sticky;
    top: 0;
    z-index: 999; /* Pastikan di atas elemen lain */
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 15px;
    background: white;
    border-bottom: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

  .status {
    font-size: 0.8rem; /* Perkecil sedikit font status */
  }

  /* 5. Viewport Kertas */
  .document-viewport {
    padding: 20px 15px 100px 15px; /* PENTING: Padding bawah 100px agar tidak mentok */
    display: block;
    height: auto;
    overflow: visible;
  }

  /* 6. Kertas Surat Fisik di HP */
  .paper {
    width: 100%;
    min-height: auto; /* Tinggi menyesuaikan isi surat */
    height: auto !important; /* Paksa auto agar memanjang */
    padding: 20px; /* Margin dalam kertas diperkecil di HP */
    font-size: 10.5pt; /* Font sedikit lebih kecil agar muat banyak */
    margin-bottom: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Shadow lebih tipis */
  }

  /* Penyesuaian Tabel & Font di HP */
  .paper table {
    font-size: 10.5pt;
  }
  .paper table td {
    padding-bottom: 4px;
  }

  /* Toast Notification posisi di HP */
  .toast {
    bottom: 20px !important;
    width: 90%;
    left: 5%;
    transform: none;
  }
}
/* =========================================
   18. TANDA TANGAN (ALIGN RIGHT FIX)
   ========================================= */

/* Pastikan container tanda tangan mengambil lebar penuh agar bisa rata kanan */
.signature-section {
  width: 100%;
  display: block;
  text-align: right; /* Kunci utama preview */
  padding-right: 10px; /* Jarak aman dari pinggir kertas */
}

/* Paksa semua teks di dalamnya rata kanan */
.signature-section p {
  text-align: right !important;
  margin-bottom: 5px;
}

/* Pastikan gambar tanda tangan tidak melar */
.signature-section img {
  max-width: 200px; /* Batasi lebar tanda tangan */
  object-fit: contain;
}
/* =========================================
   19. TANDA TANGAN (TABLE FLOAT FIX)
   ========================================= */

.signature-table {
  float: right; /* Mengapung ke kanan */
  width: auto; /* Lebar menyesuaikan isi (nama/tanda tangan) */
  margin-right: 10px; /* Jarak aman dari pinggir kertas */
}

/* Pastikan teks di dalam tabel rata tengah */
.signature-table td {
  text-align: center !important;
}

.signature-table p {
  text-align: center !important;
  margin-bottom: 5px;
}

/* Responsif HP: Tanda tangan tetap rapi */
@media (max-width: 850px) {
  .signature-table {
    float: none; /* Di HP jangan float, biar block biasa */
    width: 100%; /* Penuhi lebar */
  }
  .signature-table td {
    text-align: right; /* Di HP boleh rata kanan atau tengah, opsional */
    padding-right: 0;
  }
  /* Kalau mau di HP tetap di kanan: */
  .signature-table {
    display: flex;
    justify-content: flex-end;
  }
}
/* =========================================
   UPDATE MOCKUP REALISTIS (Tanda Tangan Kanan)
   ========================================= */

/* ... kode .mini-letter-content dll biarkan yang lama ... */

/* Wrapper Tanda Tangan Miniatur */
.mini-signature-section {
  margin-top: 15px;

  /* Trik agar kotak ini pindah ke Kanan */
  margin-left: auto;
  width: fit-content; /* Lebar menyesuaikan isi */

  /* Isi di dalamnya Rata Tengah */
  text-align: center;

  /* Sedikit jarak dari pinggir kanan kertas */
  margin-right: 10px;
}

.mini-sign-icon {
  font-family: "Inter", sans-serif;
  font-size: 1.5rem;
  color: #000;
  margin: 2px 0;
}

/* =========================================
   20. STYLE MODAL AI
   ========================================= */
#aiModal .modal-box {
  width: 95%; /* Lebih lebar sedikit dari reset modal */
  max-width: 500px;
}

#aiModal textarea {
  resize: vertical; /* Biar bisa diresize user */
  font-family: "Inter", sans-serif;
}

#aiModal input[type="password"] {
  letter-spacing: 2px; /* Biar titik-titik password agak lega */
  color: var(--primary);
  font-weight: bold;
}

/* =========================================
   FIX AI MODAL SCROLL
   ========================================= */
#aiPrompt {
  height: 100px !important; /* Tinggi tetap */
  overflow-y: auto !important; /* Paksa scrollbar muncul */
  resize: none !important; /* Matikan resize manual */
}

#aiOutput {
  overflow-y: auto !important; /* Hasil AI juga bisa di-scroll */
}

/* =========================================
   FIX MODAL SCROLLING (Agar tidak terpotong)
   ========================================= */

.modal-box {
  /* Batasi tinggi modal maksimal 85% dari tinggi layar */
  max-height: 85vh;

  /* Munculkan scrollbar jika kontennya panjang */
  overflow-y: auto;

  /* Pastikan padding bawah cukup agar tombol tidak mepet */
  padding-bottom: 30px;
}

/* Khusus Textarea Hasil (Readonly) */
#aiResultText {
  background-color: #f0fdf4; /* Latar hijau muda */
  border: 1px solid #bbf7d0;
  color: #166534;

  /* Ganti height fix dengan min/max agar fleksibel */
  height: auto !important;
  min-height: 140px; /* Tinggi minimal */
  max-height: 300px; /* Maksimal tinggi sebelum scroll muncul */

  /* PENTING: Scrollbar Vertikal */
  overflow-y: auto !important;

  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  cursor: default;
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  white-space: pre-wrap; /* Agar paragraf rapi */
}

/* Mempercantik Scrollbar di dalam modal (Opsional, khusus Chrome/Safari) */
.modal-box::-webkit-scrollbar {
  width: 8px;
}
.modal-box::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.modal-box::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.modal-box::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* =========================================
   22. NEW AI MODAL LAYOUT (CLEAN LOOK)
   ========================================= */

/* Styling Textarea Input & Output di Modal AI */
#promptModal textarea {
  width: 100%;
  resize: none; /* User gabisa tarik-tarik */
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: all 0.2s;
}

#promptModal textarea:focus {
  border-color: #d946ef;
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.1);
  outline: none;
}

/* Khusus Textarea Hasil (Readonly) */
#aiResultText {
  background-color: #f0fdf4; /* Latar hijau muda segar */
  border-color: #bbf7d0;
  color: #166534;
  height: 140px; /* Tinggi fix agar rapi */
  overflow-y: auto; /* Scroll jika panjang */
  margin-bottom: 15px;
  cursor: default;
}

/* Tombol "Buat Tulisan Sekarang" (Gradient Pink/Ungu) */
.btn-cta-ai {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-cta-ai:hover {
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
  transform: translateY(-1px);
}

/* Tombol "Masukkan ke Surat" (Hijau Segar) */
.btn-primary-ai {
  width: 100%;
  padding: 12px;
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-primary-ai:hover {
  background-color: #059669;
}

/* Tombol "Ulangi" (Teks Kecil) */
.btn-text-retry {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-text-retry:hover {
  background-color: #f3f4f6;
  color: #374151;
}

/* =========================================
   23. SIGNATURE TABS & UPLOAD STYLE
   ========================================= */

/* Tab Switcher */
.sig-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.sig-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sig-tab:hover:not(.active) {
  background: #e5e7eb;
}

/* Custom File Upload Box */
.file-upload-box {
  position: relative;
  height: 100px;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  transition: all 0.2s;
  cursor: pointer;
  overflow: hidden;
}

.file-upload-box:hover {
  border-color: var(--primary);
  background: #f0fdf4;
}

/* Input file asli disembunyikan tapi memenuhi kotak */
.file-upload-box input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

/* Tampilan Dummy di tengah kotak */
.file-dummy {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #94a3b8;
  z-index: 1;
}

.file-dummy i {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 5px;
}

.file-dummy span {
  font-size: 0.8rem;
  font-weight: 600;
}

/* =========================================
   24. UPDATE LANDING PAGE (FITUR BARU)
   ========================================= */

/* Grid Fitur */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 0 20px;
}

.feature-card {
  background: white;
  padding: 30px;
  border-radius: 16px;
  border: 1px solid #f3f4f6;
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  border-color: var(--primary);
}

/* Icon Box Umum */
.icon-box {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

/* KHUSUS KARTU AI (Highlight) */
.feature-card.highlight-ai {
  background: linear-gradient(to bottom right, #fff, #fdf4ff);
  border: 1px solid #f0abfc;
}

.icon-box.ai-glow {
  background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
  color: white;
  box-shadow: 0 4px 10px rgba(217, 70, 239, 0.4);
}

/* Badge "BARU" */
.badge-new {
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =========================================
   25. STYLE SUPER AI MODAL
   ========================================= */

#aiModeSelector {
  cursor: pointer;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231f2937%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px top 50%;
  background-size: 12px auto;
  appearance: none; /* Hilangkan panah default browser */
}

#aiModeSelector:focus {
  border-color: #d946ef;
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.1);
}

/* Style khusus textarea job description */
#jobDescInput:focus {
  border-color: #d946ef;
  outline: none;
}

/* =========================================
   26. FIX SCROLLING JOB MATCHER (PENTING)
   ========================================= */

/* 1. Pastikan Modal Box selalu bisa discroll jika isinya panjang */
.modal-box {
  max-height: 85vh !important; /* Batasi tinggi maks 85% layar */
  overflow-y: auto !important; /* Paksa scrollbar muncul */
  display: flex;
  flex-direction: column;
}

/* 2. Atur area input di dalam modal agar rapi */
.ai-input-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px; /* Jarak antar elemen */
}

/* 3. Khusus Input Lowongan (Job Matcher) */
/* Kita batasi tingginya agar tidak memenuhi layar HP */
#jobDescInput {
  min-height: 80px;
  max-height: 150px; /* Jangan terlalu panjang */
  overflow-y: auto; /* Biar teks lowongan bisa discroll sendiri */
  resize: vertical;
}

/* 4. Pastikan tombol Action tidak tertutup */
#btnGenerateAI {
  margin-top: 10px;
  margin-bottom: 5px;
  flex-shrink: 0; /* Tombol dilarang menyusut/gepeng */
}

/* =========================================
   27. REDESIGN SIDEBAR (BENTO / SAAS STYLE)
   ========================================= */

/* Sidebar Layout */
.sidebar {
  background-color: #f8fafc; /* Latar belakang abu-abu sangat muda */
  border-right: 1px solid #e2e8f0;
  padding: 20px 15px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e2e8f0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

/* Form Card (Kotak-kotak Pengelompokan) */
.form-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s, box-shadow 0.2s;
}

.form-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.form-card.highlight-card {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.card-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

/* Input Fields dengan Icon di Dalam */
.input-with-icon {
  position: relative;
  margin-bottom: 10px;
}

.input-with-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none; /* Klik tembus ke input */
}

.input-with-icon input,
.input-with-icon textarea {
  width: 100%;
  padding: 10px 10px 10px 38px; /* Padding kiri besar untuk icon */
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  transition: all 0.2s;
  font-family: "Inter", sans-serif;
}

.input-with-icon input:focus,
.input-with-icon textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

.input-with-icon input::placeholder {
  color: #cbd5e1;
}

/* Compact Row (Dua kolom) */
.row-compact {
  display: flex;
  gap: 10px;
}
.row-compact .input-with-icon {
  flex: 1;
}

/* Segmented Control (Ganti Select Font) */
.segmented-control {
  display: flex;
  background: #e0e7ff;
  padding: 4px;
  border-radius: 8px;
}

.segmented-control input[type="radio"] {
  display: none;
}

.segmented-control label {
  flex: 1;
  text-align: center;
  padding: 6px;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: #4b5563;
  transition: all 0.2s;
}

.segmented-control input[type="radio"]:checked + label {
  background: white;
  color: #2563eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Tombol AI Baru */
.ai-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.btn-ai-main {
  flex: 1;
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  color: white;
  border: none;
  padding: 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.btn-ai-sub {
  width: 36px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #4b5563;
  cursor: pointer;
}

/* Mini Template Nav */
.mini-template-nav {
  display: flex;
  gap: 5px;
}
.mini-template-nav span {
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 5px;
  border-radius: 4px;
  transition: background 0.2s;
}
.mini-template-nav span:hover {
  background: #e5e7eb;
}

/* Checkbox Grid Compact */
.checkbox-grid-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.checkbox-grid-compact label {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  cursor: pointer;
}

/* Lain-lain */
.btn-tiny-icon {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-left: none;
  border-radius: 0 6px 6px 0;
  padding: 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}
.btn-add-mini {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  background: #22c55e;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 0.75rem;
  cursor: pointer;
}
.draw-box {
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.btn-reset-sig {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  cursor: pointer;
}

/* Footer Reset */
.sidebar-footer {
  margin-top: 20px;
}
.btn-reset-all {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px dashed #ef4444;
  color: #ef4444;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-reset-all:hover {
  background: #fef2f2;
}
.copyright-text {
  text-align: center;
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 15px;
}
/* =========================================
   28. FIX TOMBOL LAMA (AGAR RAPI DI CARD)
   ========================================= */

/* Tombol kecil (Fresh Grad, Admin, dll) */
.btn-tiny {
  padding: 8px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: white;
  cursor: pointer;
  color: #475569;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-tiny:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.btn-tiny i {
  color: #64748b; /* Warna ikon agak abu */
}

/* =========================================
   29. STYLE BADGE PRO
   ========================================= */
.badge-pro {
  background-color: #dbeafe; /* Biru muda lembut */
  color: #1e40af; /* Biru tua tegas */
  font-size: 0.5em; /* Ukuran kecil */
  padding: 3px 6px;
  border-radius: 6px;
  vertical-align: middle;
  margin-left: 5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: 1px solid #bfdbfe;
  text-transform: uppercase;
}
/* =========================================
   30. REDESIGN LAMPIRAN (ATTACHMENT CARDS)
   ========================================= */

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 Kolom */
  gap: 8px;
}

.attach-card {
  position: relative;
  cursor: pointer;
}

/* Sembunyikan Checkbox Asli */
.attach-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Tampilan Visual Kartu */
.attach-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 500;
}

.attach-content i {
  font-size: 1rem;
  color: #94a3b8; /* Warna ikon mati */
  transition: color 0.2s;
}

/* Efek Hover */
.attach-card:hover .attach-content {
  border-color: #cbd5e1;
  background: #f8fafc;
}

/* STATUS: TERPILIH (CHECKED) - Magic happens here! */
.attach-card input:checked + .attach-content {
  background: #f0fdf4; /* Latar Hijau Muda */
  border-color: #16a34a; /* Garis Hijau */
  color: #15803d; /* Teks Hijau Tua */
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.1);
}

.attach-card input:checked + .attach-content i {
  color: #16a34a; /* Ikon jadi Hijau */
}

/* =========================================
   31. REDESIGN INFORMASI PRIBADI (IDENTITY CARD)
   ========================================= */

/* Wadah Utama (Kotak Abu-abu Halus) */
.identity-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
}

/* Wrapper untuk Input + Ikon */
.input-icon-wrapper {
  position: relative;
  margin-bottom: 12px;
}

/* Style Ikon di dalam Input */
.input-icon-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8; /* Abu-abu soft */
  font-size: 0.9rem;
  pointer-events: none; /* Agar klik tembus ke input */
  transition: color 0.2s;
}

/* Modifikasi Input agar teks tidak menabrak ikon */
.input-icon-wrapper input,
.input-icon-wrapper textarea {
  width: 100%;
  padding-left: 38px !important; /* Ruang untuk ikon */
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  transition: all 0.2s;
}

/* Efek Fokus (Ikon ikut berubah warna) */
.input-icon-wrapper input:focus,
.input-icon-wrapper textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

.input-icon-wrapper input:focus + i,
.input-icon-wrapper textarea:focus + i,
.input-icon-wrapper:focus-within i {
  color: var(--primary); /* Ikon jadi biru saat mengetik */
}

/* Hilangkan margin bawah elemen terakhir di dalam box */
.identity-box .input-icon-wrapper:last-child {
  margin-bottom: 0;
}

/* =========================================
   31. REDESIGN INFORMASI PRIBADI & KONTEN
   ========================================= */

/* Wadah Utama (Kotak Abu-abu Halus) */
.identity-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
}

/* Wrapper untuk Input + Ikon */
.input-icon-wrapper {
  position: relative;
  margin-bottom: 12px;
}

/* Style Ikon di dalam Input */
.input-icon-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8; /* Abu-abu soft */
  font-size: 0.9rem;
  pointer-events: none; /* Agar klik tembus ke input */
  transition: color 0.2s;
}

/* Modifikasi Input agar teks tidak menabrak ikon */
.input-icon-wrapper input,
.input-icon-wrapper textarea {
  width: 100%;
  padding-left: 38px !important; /* Ruang untuk ikon */
  padding-top: 10px;
  padding-bottom: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  transition: all 0.2s;
}

/* Efek Fokus (Ikon ikut berubah warna) */
.input-icon-wrapper input:focus,
.input-icon-wrapper textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

.input-icon-wrapper input:focus + i,
.input-icon-wrapper textarea:focus + i,
.input-icon-wrapper:focus-within i {
  color: var(--primary); /* Ikon jadi biru saat mengetik */
}

/* Hilangkan margin bawah elemen terakhir di dalam box */
.identity-box .input-icon-wrapper:last-child {
  margin-bottom: 0;
}

/* Style untuk Grid Lampiran (Kartu Pilihan) */
.attachment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.attach-card {
  position: relative;
  cursor: pointer;
}
.attach-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}
.attach-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 500;
}
.attach-card:hover .attach-content {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.attach-card input:checked + .attach-content {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #15803d;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.1);
}
.attach-card input:checked + .attach-content i {
  color: #16a34a;
}

/* =========================================
   32. LOCKER SYSTEM (PENYIMPANAN SURAT)
   ========================================= */

/* Tombol Akses Loker di Sidebar */
.btn-locker {
  width: 100%;
  background: white;
  border: 2px dashed var(--primary);
  color: var(--primary);
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  position: relative;
}

.btn-locker:hover {
  background: #eff6ff;
  border-style: solid;
}

.locker-badge {
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Item List di dalam Modal */
.locker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border: 1px solid #e2e8f0;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.locker-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.locker-info h4 {
  margin: 0 0 5px 0;
  font-size: 0.95rem;
  color: #1e293b;
}

.locker-info p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}

.locker-actions {
  display: flex;
  gap: 8px;
}

.btn-load {
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
}

.btn-delete {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-load:hover {
  background: var(--primary);
  color: white;
}
.btn-delete:hover {
  background: #ef4444;
  color: white;
}
/* --- UPDATE: PERBAIKAN TAMPILAN LOKER --- */

/* 1. Paksa Teks Rata Kiri & Isi Ruang Kosong */
.locker-info {
  flex: 1; /* Mengambil sisa ruang agar tombol terdorong ke kanan */
  text-align: left; /* Pastikan rata kiri */
  padding-right: 15px; /* Jarak agar teks tidak menabrak tombol */
}

/* 2. Style Tombol Konfirmasi Baru (Biru) */
.btn-confirm-load {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-confirm-load:hover {
  background: #1d4ed8;
}
/* =========================================
   33. FIX TUMPUKAN MODAL (Z-INDEX LAYERS)
   ========================================= */

/* Level 1: Modal Biasa (Loker, Reset, API Key) */
.modal-overlay {
  z-index: 1000; /* Standar */
}

/* Level 2: Modal Konfirmasi (Harus di atas Level 1) */
#deleteLockerModal,
#loadLockerModal {
  z-index: 2000 !important; /* Paksa lebih tinggi */
  background: rgba(
    0,
    0,
    0,
    0.65
  ); /* Gelapkan latar belakang agar lebih fokus */
}
/* =========================================
   34. RESPONSIVE LOKER (MOBILE FIX)
   ========================================= */

@media (max-width: 480px) {
  /* 1. Perlebar Modal di HP */
  .modal-box {
    width: 95% !important;
    padding: 15px !important;
    max-height: 85vh; /* Hindari mentok atas-bawah */
  }

  /* 2. Area Simpan: Ubah jadi Atas-Bawah */
  .locker-save-area > div {
    flex-direction: column !important; /* Paksa tumpuk vertikal */
    gap: 8px;
  }

  .locker-save-area input {
    width: 100%; /* Input jadi lebar penuh */
  }

  .locker-save-area button {
    width: 100%; /* Tombol jadi lebar penuh */
    justify-content: center; /* Teks di tengah */
    padding: 10px; /* Lebih mudah ditekan */
  }

  /* 3. Daftar Surat: Info & Tombol jadi Atas-Bawah */
  .locker-item {
    flex-direction: column; /* Tumpuk vertikal */
    align-items: flex-start;
    gap: 12px;
  }

  .locker-info {
    width: 100%;
    padding-right: 0;
    border-bottom: 1px dashed #e2e8f0; /* Garis pemisah tipis */
    padding-bottom: 8px;
    margin-bottom: 0;
  }

  .locker-actions {
    width: 100%;
    display: flex;
    gap: 10px;
  }

  /* Tombol Aksi (Pakai/Hapus) jadi besar & memenuhi lebar */
  .locker-actions button {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    font-size: 0.9rem;
  }
}
