:root{
  --bg:#0b1220;
  --card:#0f1a33;
  --muted:#95a2c7;
  --text:#eaf0ff;
  --primary:#6d5efc;
  --primary2:#22c55e;
  --border:rgba(255,255,255,.10);
  --shadow: 0 18px 60px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 800px at 20% -10%, rgba(109,94,252,.35), transparent 60%),
              radial-gradient(1000px 600px at 90% 10%, rgba(34,197,94,.22), transparent 55%),
              linear-gradient(180deg, var(--bg), #070b13 70%);
  color: var(--text);
}
a{color:inherit; text-decoration:none}
.container{width:min(1150px, 92%); margin:0 auto}
.nav{
  position:sticky; top:0; z-index:40;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,.55);
  border-bottom:1px solid var(--border);
}
.nav-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
  gap:16px;
}
.brand{display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:.2px}
.logo{
  width:36px; height:36px; border-radius:12px;
  background: linear-gradient(135deg, rgba(109,94,252,1), rgba(34,197,94,1));
  box-shadow: 0 10px 35px rgba(109,94,252,.25);
  display:grid; place-items:center;
}
.logo svg{width:20px; height:20px}
.nav-cta{display:flex; gap:10px; align-items:center}
.btn{
  border:1px solid var(--border);
  padding:10px 12px;
  border-radius:12px;
  background: rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
  display:inline-flex; gap:8px; align-items:center; justify-content:center;
  transition: transform .08s ease, background .2s ease, border-color .2s ease;
  user-select:none;
}
.btn:hover{background:rgba(255,255,255,.09); border-color: rgba(255,255,255,.18)}
.btn:active{transform: translateY(1px)}
.btn.primary{
  background: linear-gradient(135deg, rgba(109,94,252,1), rgba(109,94,252,.75));
  border-color: rgba(109,94,252,.7);
  box-shadow: 0 12px 40px rgba(109,94,252,.22);
}
.btn.primary:hover{border-color: rgba(109,94,252,1)}
.btn.success{
  background: linear-gradient(135deg, rgba(34,197,94,1), rgba(34,197,94,.72));
  border-color: rgba(34,197,94,.7);
  box-shadow: 0 12px 40px rgba(34,197,94,.16);
}
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-size:12px;
}
.hero{padding:46px 0 26px;}
.hero-grid{display:grid; grid-template-columns: 1.2fr .8fr; gap:24px; align-items:stretch;}
.h1{font-size: clamp(30px, 4vw, 52px); line-height:1.05; margin:12px 0 12px; letter-spacing:-.8px;}
.lead{color:var(--muted); font-size:16px; line-height:1.7; max-width:58ch}
.hero-actions{display:flex; gap:12px; flex-wrap:wrap; margin-top:18px}
.card{background: rgba(15,26,51,.72); border:1px solid var(--border); border-radius:18px; box-shadow: var(--shadow);}
.card.pad{padding:18px}
.stat-grid{display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px;}
.stat{padding:14px; border-radius:16px; border:1px solid var(--border); background: rgba(255,255,255,.04);}
.stat .k{font-size:22px; font-weight:800}
.stat .v{color:var(--muted); font-size:12px; margin-top:6px}
.section{padding:22px 0}
.section h2{margin:0 0 10px; font-size:22px; letter-spacing:-.2px}
.grid3{display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px;}
.feature{padding:16px; border-radius:18px; border:1px solid var(--border); background: rgba(255,255,255,.04);}
.feature h3{margin:10px 0 6px; font-size:16px}
.feature p{margin:0; color:var(--muted); line-height:1.65; font-size:13px}
.icon{width:42px; height:42px; border-radius:14px; display:grid; place-items:center; border:1px solid var(--border); background: rgba(109,94,252,.16);}
.split{display:grid; grid-template-columns: 1fr 1fr; gap:14px; align-items:start;}
.table{width:100%; border-collapse: collapse; overflow:hidden; border-radius:16px; border:1px solid var(--border); background: rgba(255,255,255,.03);}
.table th,.table td{padding:12px 12px; border-bottom:1px solid rgba(255,255,255,.06); text-align:left; font-size:13px; color:var(--muted);}
.table th{color:var(--text); font-weight:700}
.table tr:last-child td{border-bottom:none}
.product-grid{display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px;}
.product{padding:16px; border-radius:18px; border:1px solid var(--border); background: rgba(255,255,255,.04); display:flex; flex-direction:column; gap:10px; min-height:240px;}
.product .top{display:flex; align-items:center; justify-content:space-between; gap:12px}
.product .name{font-weight:800; letter-spacing:-.2px}
.product .desc{color:var(--muted); font-size:13px; line-height:1.6}
.product .price{font-size:22px; font-weight:900}
.product .price small{font-size:12px; color:var(--muted); font-weight:600}
.product ul{margin:0; padding-left:18px; color:var(--muted); font-size:13px; line-height:1.7}
.product .actions{margin-top:auto; display:flex; gap:10px; flex-wrap:wrap}
.footer{padding:28px 0; border-top:1px solid var(--border); color:var(--muted); font-size:13px;}
.footer .cols{display:flex; gap:18px; justify-content:space-between; flex-wrap:wrap}
.muted{color:var(--muted)}
.pill{padding:6px 10px; border-radius:999px; background: rgba(34,197,94,.16); border:1px solid rgba(34,197,94,.35); color:#c7f9d7; font-size:12px; font-weight:700; text-transform: lowercase;}
.input, select, textarea{width:100%; padding:12px 12px; border-radius:14px; border:1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text); outline:none;}
textarea{min-height:110px; resize:vertical}
.form-row{display:grid; grid-template-columns: 1fr 1fr; gap:12px}
.form-actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}
.notice{padding:12px 14px; border-radius:16px; border:1px solid rgba(109,94,252,.35); background: rgba(109,94,252,.10); color:#d9d6ff; font-size:13px; line-height:1.6;}
.cart-item{display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:12px; border-radius:16px; border:1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03);}
.cart-item .meta{display:flex; flex-direction:column; gap:6px}
.qty{display:flex; gap:6px; align-items:center; border:1px solid rgba(255,255,255,.10); border-radius:12px; padding:6px 8px; background: rgba(255,255,255,.03);}
.qty button{width:28px; height:28px; border-radius:10px; border:1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: var(--text); cursor:pointer;}
.qty span{min-width:18px; text-align:center; color:var(--muted); font-size:13px}
.right{display:flex; flex-direction:column; gap:8px; align-items:flex-end}
.kpi{display:flex; gap:10px; flex-wrap:wrap}
.kpi .stat{flex:1; min-width:180px}
.chips{display:flex; gap:8px; flex-wrap:wrap}
.chip{padding:8px 10px; border-radius:999px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); color: var(--muted); font-size:12px; cursor:pointer;}
.chip.active{background: rgba(109,94,252,.18); border-color: rgba(109,94,252,.35); color:#d9d6ff;}

/* dropdown kebab */
.menu-wrap{position:relative}
.kebab{width:42px; height:42px; border-radius:14px; padding:0;}
.dropdown[hidden]{display:none !important}
.dropdown{
  position:absolute; right:0; top:calc(100% + 10px);
  min-width:220px; border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(15,26,51,.92);
  box-shadow: var(--shadow);
  padding:8px; display:none;
}
.dropdown.open{display:block}
.dropdown a{display:flex; align-items:center; justify-content:space-between; padding:10px 10px; border-radius:12px; color:var(--muted);}
.dropdown a:hover{background:rgba(255,255,255,.06); color:var(--text);}

/* whatsapp fab */
.wa-fab{
  position:fixed; right:18px; bottom:18px;
  width:54px; height:54px; border-radius:18px;
  display:grid; place-items:center; z-index:9998;
  border:1px solid rgba(34,197,94,.45);
  background: rgba(34,197,94,.16);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  cursor:pointer;
}
.wa-fab:hover{background: rgba(34,197,94,.22);}

@media (max-width: 900px){
  .hero-grid{grid-template-columns:1fr}
  .grid3{grid-template-columns:1fr}
  .product-grid{grid-template-columns:1fr}
  .split{grid-template-columns:1fr}
  .form-row{grid-template-columns:1fr}
}


/* v4 navbar improvements */
.nav-cta{flex-wrap:wrap}
@media (max-width: 900px){
  .nav-inner{align-items:center}
  .nav-cta{gap:10px}
  #navUser{display:none !important;} /* move auth into dropdown on mobile */
}


/* v5 nav inline cart + hamburger */
.nav-cta{flex-wrap:nowrap}
.nav-cta .menu-wrap{order:3}
.nav-cta .cart-btn{order:2}
.nav-cta .reg-btn{order:1}
@media (max-width: 900px){
  .nav-inner{gap:10px}
  .nav-cta{flex-wrap:nowrap}
}


/* v6 mobile-safe */
.nav-inner{min-height:64px}
.nav-cta{gap:10px}
.btn{white-space:nowrap}
.brand{min-width: 140px}
.nav-cta{overflow:visible}
.menu-wrap{position:relative}

/* dropdown: fixed on mobile to avoid clipping */
@media (max-width: 900px){
  .brand{max-width: 48vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
  .nav-cta{max-width: 52vw}
  .dropdown{
    position: fixed !important;
    right: 12px !important;
    top: 70px !important;
    left: 12px !important;
    min-width: auto !important;
    max-height: calc(100vh - 90px);
    overflow:auto;
  }
}

/* tokopedia-ish payment */
.pay-wrap{display:flex; flex-direction:column; gap:12px}
.pay-head{display:flex; justify-content:space-between; align-items:flex-start; gap:10px; flex-wrap:wrap}
.pay-title{font-weight:900; font-size:18px; margin:0}
.pay-sub{color:var(--muted); font-size:13px; margin-top:6px; line-height:1.6}
.pay-timer{
  padding:10px 12px; border-radius:16px; border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  display:flex; gap:10px; align-items:center;
}
.pay-timer .t{font-weight:900; font-size:16px}
.pay-timer .l{color:var(--muted); font-size:12px}
.pay-box{padding:14px; border-radius:18px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04)}
.pay-row{display:flex; justify-content:space-between; align-items:center; gap:10px}
.pay-row .k{color:var(--muted); font-size:12px}
.pay-row .v{font-weight:900}
.pay-list{display:flex; flex-direction:column; gap:10px; margin-top:10px}
.pay-item{
  padding:12px; border-radius:16px; border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  cursor:pointer;
}
.pay-item:hover{background:rgba(255,255,255,.05)}
.pay-item.active{border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.10)}
.pay-item .left{display:flex; flex-direction:column; gap:4px}
.pay-item .name{font-weight:900}
.pay-item .desc{color:var(--muted); font-size:12px}
.pay-actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:10px}
.btn[disabled]{opacity:.55; cursor:not-allowed}


/* v7 mobile fit (no overflow, no cut-off) */
html, body { overflow-x: hidden; }

/* Make navbar always fit on small screens */
@media (max-width: 520px){
  .container{padding-left:12px; padding-right:12px;}
  .nav-inner{gap:8px;}
  .brand{min-width:0; max-width:46vw;}
  .brand span:nth-child(2){ /* brand text */
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }

  .nav-cta{gap:8px; max-width:54vw; flex-wrap:nowrap;}
  .nav-cta .btn{padding:10px 10px; border-radius:16px;}
  .nav-cta .btn .muted{display:none;} /* hide labels, keep icon */
  .nav-cta .btn.kebab{padding:10px 12px; min-width:44px;}
  .nav-cta .cart-btn{min-width:86px;}
  .nav-cta .reg-btn{min-width:54px;}

  /* ensure badges never push width */
  .badge{max-width:100%;}

  /* dropdown should not create any layout width */
  .menu-wrap{flex:0 0 auto;}
}


/* v8 payment tidy */
.pay-wrap{gap:14px}
.pay-head{align-items:center}
.pay-title{font-size:20px}
.pay-sub{margin-top:4px}
.pay-timer{min-width:170px}
.pay-box{background:rgba(255,255,255,.035)}
.pay-actions{margin-top:4px}
.pay-actions .btn{flex:1 1 auto}
@media (max-width: 520px){
  .pay-timer{width:100%; justify-content:space-between}
  .pay-actions{flex-direction:column}
  .pay-actions .btn{width:100%}
}


/* v9 tokopedia-like method */
.pay-statusbar{
  display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap;
  padding:12px 14px; border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}
.pay-statusbar .left{display:flex; align-items:center; gap:10px}
.method-badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  font-weight:900;
}
.method-ico{
  width:28px; height:28px; border-radius:10px;
  display:grid; place-items:center;
  background: rgba(99,102,241,.20);
  border:1px solid rgba(99,102,241,.30);
  flex:0 0 auto;
}
.pay-steps{
  padding:12px 14px; border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}
.pay-steps ol{margin:0; padding-left:18px; display:flex; flex-direction:column; gap:8px}
.pay-steps li{color:var(--text); line-height:1.6}
.copy-row{
  display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap;
  padding:12px 14px; border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}
.copy-row .val{
  font-weight:900; font-size:16px; letter-spacing:.3px;
  color:var(--text);
  word-break:break-all;
}
.copy-row .hint{color:var(--muted); font-size:12px; margin-top:4px}
.btn.copy{flex:0 0 auto}
@media (max-width:520px){
  .copy-row{align-items:flex-start}
  .btn.copy{width:100%}
}


/* v11 invoice */
.invoice-toolbar{display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:space-between; margin-bottom:12px}
.invoice{
  background:#fff; color:#0b1220;
  border-radius:18px; padding:18px;
  border:1px solid rgba(15,23,42,.12);
  box-shadow: 0 10px 30px rgba(2,6,23,.08);
}
.inv-head{display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; align-items:flex-start}
.inv-brand{display:flex; align-items:center; gap:10px}
.inv-logo{
  width:42px; height:42px; border-radius:14px;
  background: linear-gradient(135deg, #6366f1, #22c55e);
  display:grid; place-items:center; color:white; font-weight:900;
}
.inv-title{font-size:18px; font-weight:900; margin:0}
.inv-meta{font-size:12px; color:#334155; line-height:1.6}
.inv-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:12px}
.inv-box{border:1px solid rgba(15,23,42,.10); border-radius:14px; padding:12px}
.inv-box .k{font-size:12px; color:#475569}
.inv-box .v{font-weight:800; margin-top:4px}
.inv-table{width:100%; border-collapse:collapse; margin-top:12px}
.inv-table th, .inv-table td{border-bottom:1px solid rgba(15,23,42,.10); padding:10px 6px; text-align:left; font-size:12px}
.inv-table th{color:#334155}
.inv-total{display:flex; justify-content:flex-end; margin-top:12px}
.inv-total .box{min-width:260px; border:1px solid rgba(15,23,42,.10); border-radius:14px; padding:12px}
.inv-total .row{display:flex; justify-content:space-between; gap:10px; font-size:12px; color:#334155}
.inv-total .row strong{color:#0b1220}
.inv-footer{margin-top:14px; font-size:12px; color:#475569; line-height:1.6}
.invoice-page .notice{color:#0b1220; background:rgba(2,6,23,.06); border-color:rgba(2,6,23,.12)}
/* Hide site chrome during print */
@media print{
  body{background:#fff !important}
  header.nav, footer.footer, .wa-fab, .invoice-toolbar, .notice {display:none !important}
  main{padding:0 !important}
  .container{max-width:none !important; padding:0 !important}
  .invoice{box-shadow:none !important; border:none !important; border-radius:0 !important; padding:0 !important}
  @page{ size: A4; margin: 14mm; }
}
