/* =========================================================
   CuanKu - Stylesheet Utama
   Palet: Navy #1B2A4A · Gold #D4A24C · BG #F5F6FA · WA Green #25D366
   Font: Poppins (heading) + Inter (body)
========================================================= */

:root{
  --navy: #1B2A4A;
  --navy-light: #2C3E63;
  --gold: #D4A24C;
  --gold-light: #E8C687;
  --bg: #F5F6FA;
  --white: #FFFFFF;
  --text: #1F2937;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --green: #25D366;
  --red: #DC2626;
  --success-bg: #ECFDF5;
  --success-text: #059669;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(27,42,74,.08);
  --shadow-hover: 0 14px 36px rgba(27,42,74,.14);
}

*{ box-sizing: border-box; }

html{ -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading{
  font-family: 'Poppins', sans-serif;
  color: var(--navy);
  line-height: 1.3;
  margin: 0 0 12px;
}

a{ color: var(--navy); text-decoration: none; }

img{ max-width: 100%; display: block; }

.container{
  max-width: 480px;
  margin: 0 auto;
  padding: 0 18px;
  width: 100%;
}

.container-wide{
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ---------- Topbar ---------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner{
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand{ display: flex; align-items: center; gap: 10px; }
.brand-badge{
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 16px;
}
.brand-name{ font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 17px; color: var(--navy); }
.topbar-actions a{ font-size: 13.5px; font-weight: 600; }
.avatar-mini{
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; font-family: 'Poppins', sans-serif;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 22px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
  min-height: 48px;
}
.btn:active{ transform: scale(.98); }
.btn-block{ width: 100%; }
.btn-primary{ background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover{ box-shadow: var(--shadow-hover); opacity: .95; }
.btn-gold{ background: var(--gold); color: var(--navy); box-shadow: 0 10px 24px rgba(212,162,76,.35); }
.btn-gold:hover{ opacity: .93; }
.btn-outline{ background: #fff; color: var(--navy); border: 1.5px solid var(--border); }
.btn-outline:hover{ border-color: var(--navy); }
.btn-wa{ background: var(--green); color: #fff; box-shadow: 0 10px 24px rgba(37,211,102,.32); }
.btn-wa:hover{ opacity: .93; }
.btn-sm{ padding: 10px 16px; font-size: 13.5px; min-height: 38px; border-radius: 10px; }
.btn-danger{ background: #FEF2F2; color: var(--red); border: 1.5px solid #FCA5A5; }
.btn:disabled{ opacity: .5; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card{
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(27,42,74,.04);
}
.card-flat{ background:#fff; border-radius: var(--radius-md); padding: 18px; border: 1px solid var(--border); }

/* ---------- Hero ---------- */
.hero{
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 48px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::after{
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,162,76,.25), transparent 70%);
}
.hero-eyebrow{
  display: inline-block;
  background: rgba(212,162,76,.18);
  color: var(--gold-light);
  font-size: 12.5px; font-weight: 600;
  padding: 6px 14px; border-radius: 99px;
  margin-bottom: 16px;
}
.hero h1{ color: #fff; font-size: 30px; margin-bottom: 14px; }
.hero p{ color: rgba(255,255,255,.82); font-size: 15.5px; margin-bottom: 26px; }
.hero-actions{ display: flex; flex-direction: column; gap: 12px; }
.hero-stats{ display: flex; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.hero-stat b{ display: block; font-family: 'Poppins', sans-serif; font-size: 20px; color: var(--gold-light); }
.hero-stat span{ font-size: 12.5px; color: rgba(255,255,255,.7); }

/* ---------- Benefit / Feature grid ---------- */
.section{ padding: 44px 0; }
.section-title{ font-size: 22px; text-align: center; margin-bottom: 8px; }
.section-sub{ text-align: center; color: var(--text-muted); font-size: 14.5px; margin-bottom: 28px; }
.grid{ display: grid; gap: 16px; }
.feature-card{
  background: #fff; border-radius: var(--radius-md); padding: 20px;
  box-shadow: var(--shadow); border: 1px solid rgba(27,42,74,.04);
}
.feature-icon{
  width: 46px; height: 46px; border-radius: 14px;
  background: rgba(212,162,76,.14); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.feature-card h3{ font-size: 16px; margin-bottom: 6px; }
.feature-card p{ font-size: 13.8px; color: var(--text-muted); margin: 0; }

/* ---------- Forms ---------- */
.form-group{ margin-bottom: 18px; }
label{ display: block; font-size: 13.5px; font-weight: 600; color: var(--navy); margin-bottom: 7px; }
input, select, textarea{
  width: 100%;
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus{
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212,162,76,.14);
}
.hint{ font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }
.error-text{ font-size: 12.5px; color: var(--red); margin-top: 6px; }

/* ---------- Alerts / Flash ---------- */
.alert{ padding: 14px 16px; border-radius: var(--radius-sm); font-size: 13.8px; margin-bottom: 18px; line-height: 1.55; }
.alert-error{ background: #FEF2F2; color: #991B1B; border: 1px solid #FCA5A5; }
.alert-success{ background: var(--success-bg); color: var(--success-text); border: 1px solid #A7F3D0; }
.alert-info{ background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }

/* ---------- Empty / Success states ---------- */
.state-box{
  text-align: center; padding: 40px 20px; background: #fff;
  border-radius: var(--radius-lg); border: 1.5px dashed var(--border);
}
.state-icon{ font-size: 34px; margin-bottom: 12px; }
.state-box h3{ font-size: 16px; margin-bottom: 6px; }
.state-box p{ color: var(--text-muted); font-size: 13.8px; margin-bottom: 18px; }

/* ---------- Badges ---------- */
.badge{ display: inline-block; padding: 4px 11px; border-radius: 99px; font-size: 11.5px; font-weight: 600; }
.badge-gold{ background: rgba(212,162,76,.16); color: #92700F; }
.badge-navy{ background: rgba(27,42,74,.08); color: var(--navy); }
.badge-green{ background: var(--success-bg); color: var(--success-text); }
.badge-gray{ background: #F3F4F6; color: var(--text-muted); }

/* ---------- Progress bar ---------- */
.progress-track{ height: 8px; background: #EEF0F5; border-radius: 99px; overflow: hidden; }
.progress-fill{ height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 99px; transition: width .3s ease; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav{
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; padding: 8px 4px calc(env(safe-area-inset-bottom, 0) + 8px);
  box-shadow: 0 -6px 20px rgba(0,0,0,.05);
}
.bottom-nav a{
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; color: var(--text-muted); font-weight: 600; padding: 4px 10px; border-radius: 10px;
}
.bottom-nav a.active{ color: var(--navy); }
.bottom-nav .icon{ font-size: 19px; }
.page-with-nav{ padding-bottom: 84px; }

/* ---------- Testimoni ---------- */
.testi-card{ background: #fff; border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow); }
.testi-stars{ color: var(--gold); margin-bottom: 10px; font-size: 14px; }
.testi-text{ font-size: 13.8px; color: var(--text); margin-bottom: 14px; }
.testi-who{ display: flex; align-items: center; gap: 10px; }
.testi-avatar{ width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--gold-light); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; font-family: 'Poppins', sans-serif; }
.testi-name{ font-weight: 600; font-size: 13px; }
.testi-role{ font-size: 11.5px; color: var(--text-muted); }

/* ---------- Footer ---------- */
footer{ background: var(--navy); color: rgba(255,255,255,.75); padding: 34px 0 90px; margin-top: 20px; }
footer .container-wide{ text-align: center; }
footer .brand-name{ color: #fff; }
footer p{ font-size: 12.5px; margin: 6px 0 0; }
footer a{ color: var(--gold-light); }

/* ---------- Table (admin) ---------- */
table{ width: 100%; border-collapse: collapse; font-size: 13.8px; }
th, td{ text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
th{ color: var(--text-muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.table-wrap{ overflow-x: auto; border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow); padding: 6px 16px; }

/* ---------- Utilities ---------- */
.flex{ display: flex; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-center{ display: flex; align-items: center; justify-content: center; }
.gap-8{ gap: 8px; } .gap-12{ gap: 12px; } .gap-16{ gap: 16px; }
.mt-8{margin-top:8px;} .mt-16{margin-top:16px;} .mt-24{margin-top:24px;} .mt-32{margin-top:32px;}
.mb-0{margin-bottom:0;} .mb-8{margin-bottom:8px;} .mb-16{margin-bottom:16px;}
.text-muted{ color: var(--text-muted); }
.text-center{ text-align: center; }
.text-sm{ font-size: 13px; }
.w-full{ width: 100%; }
.no-wrap{ white-space: nowrap; }
.divider{ height: 1px; background: var(--border); margin: 20px 0; border: none; }

/* ---------- Responsive: tablet & up ---------- */
@media (min-width: 640px){
  .grid-2{ grid-template-columns: 1fr 1fr; }
  .grid-3{ grid-template-columns: repeat(3, 1fr); }
  .hero-actions{ flex-direction: row; }
  .hero h1{ font-size: 36px; }
}
@media (min-width: 960px){
  .grid-3-desktop{ grid-template-columns: repeat(3, 1fr); }
  .bottom-nav{ display: none; }
  .page-with-nav{ padding-bottom: 0; }
}

/* Prevent horizontal scroll & zoom issues on small phones */
@media (max-width: 360px){
  .hero h1{ font-size: 25px; }
  .container{ padding: 0 14px; }
}
