:root{--bg:#f4f7fb;--panel:#fff;--text:#15233a;--muted:#667991;--line:#dbe4f0;--blue:#2d6fe8;--blue2:#164faa;--green:#16834d;--orange:#e77b20;--red:#c33d3d;--shadow:0 18px 40px rgba(23,49,88,.08)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}button,input,textarea{font:inherit}.hidden{display:none!important}button{cursor:pointer}
.shop-topbar{height:70px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 22px;position:sticky;top:0;z-index:50}.shop-brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--text)}.shop-logo{width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,#347bf2,#1a54ba);display:grid;place-items:center;color:#fff;font-weight:900}.shop-brand b{display:block}.shop-brand small{display:block;color:var(--muted);margin-top:2px}.shop-top-actions{display:flex;gap:8px}.mini-btn{border:1px solid #cbd8e7;background:#fff;border-radius:10px;padding:8px 13px;color:#244a78;font-weight:800}
.catalog-page,.admin-page{width:min(1160px,calc(100% - 28px));margin:28px auto}.catalog-hero{border-radius:26px;padding:30px 34px;background:linear-gradient(135deg,#173b73,#2f74e9 65%,#6f65ef);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:22px;box-shadow:var(--shadow)}.eyebrow{font-size:12px;font-weight:900;letter-spacing:1.4px;opacity:.78}.catalog-hero h1,.admin-titlebar h1{font-size:clamp(30px,5vw,46px);margin:8px 0 8px}.catalog-hero p,.admin-titlebar p{margin:0;line-height:1.55}.hero-orb{width:98px;height:98px;border-radius:28px;background:rgba(255,255,255,.15);display:grid;place-items:center;font-size:46px;transform:rotate(10deg)}
.catalog-apps{display:grid;gap:20px;margin-top:22px}.catalog-app{background:#fff;border:1px solid var(--line);border-radius:22px;overflow:hidden;box-shadow:var(--shadow)}.catalog-app-head{padding:18px 20px;background:linear-gradient(135deg,#2d6fe8,#6f5de8);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px}.catalog-app-name{font-size:22px;font-weight:900}.catalog-app-link{color:#fff;text-decoration:none;font-size:12px;font-weight:800;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.12);border-radius:9px;padding:7px 10px}.catalog-products{padding:16px;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:13px}.product-card{border:1px solid #f0ddcc;border-radius:17px;padding:17px;background:linear-gradient(145deg,#fffaf7,#fff);display:flex;flex-direction:column;min-height:175px}.product-name{font-weight:900;font-size:17px;color:#9a4318}.product-duration{font-size:12px;color:#7c6f68;margin-top:8px}.product-price{font-size:23px;font-weight:950;margin:16px 0}.product-card .btn{margin-top:auto}.empty-state{padding:34px;text-align:center;border:1px dashed #cbd8e8;border-radius:18px;background:#fff;color:var(--muted)}
.admin-titlebar{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:20px}.admin-titlebar h1{font-size:34px;color:var(--text)}.admin-titlebar .eyebrow{color:#2d6fe8}.admin-toolbar{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.admin-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:22px;box-shadow:var(--shadow);margin-bottom:20px}.admin-card h2{margin:0 0 8px}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.section-head p{margin:5px 0 0;color:var(--muted);font-size:13px}.inline-actions{display:flex;gap:8px;flex-wrap:wrap}.form-columns{display:grid;grid-template-columns:1fr 1fr;gap:13px}.admin-card label,.modal-box label,.stack-form label{display:grid;gap:6px;font-size:13px;font-weight:800;color:#405978}.admin-card input,.modal-box input,.stack-form input{height:45px;border:1px solid #cbd8e7;border-radius:10px;padding:0 12px;outline:none;background:#fff}.admin-card input:focus,.modal-box input:focus,.stack-form input:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(45,111,232,.1)}.status,.notice{font-size:13px;color:var(--muted);margin-top:12px;min-height:18px}.status.dirty{color:#a76612}.status.ok,.notice.ok{color:#14734a}.notice.error{color:#b2332e}
.btn{border:0;border-radius:10px;padding:10px 14px;font-weight:850;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.btn.primary{background:var(--blue);color:#fff}.btn.soft{background:#edf3fa;color:var(--text)}.btn.green{background:var(--green);color:#fff}.btn.orange{background:#fff0e4;color:#9c4a0e}.btn.danger{background:#fdeceb;color:#a72f2c}.btn.small{padding:7px 9px;font-size:12px}.btn.wide{width:100%}.upload-label{cursor:pointer}
.admin-apps{display:grid;gap:14px;margin-top:17px}.app-admin{border:1px solid var(--line);border-radius:16px;overflow:hidden}.app-admin-head{padding:14px;background:#f7faff;display:flex;justify-content:space-between;align-items:center;gap:14px}.app-name-chip{font-weight:900;font-size:18px}.app-link{font-size:12px;color:var(--muted);margin-top:4px;word-break:break-all}.row-actions{display:flex;gap:6px;flex-wrap:wrap}.admin-products{padding:10px 14px}.product-admin{display:grid;grid-template-columns:minmax(150px,1.3fr) minmax(100px,.6fr) minmax(100px,.6fr) auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #edf1f6}.product-admin:last-child{border-bottom:0}.product-name-chip{font-weight:850}.meta{font-size:12px;color:var(--muted)}.preview-bg{background:#f4f6fa;border-radius:15px;padding:12px}.preview-bg .catalog-apps{margin:0}.code{width:100%;min-height:260px;border:1px solid #cad7e7;border-radius:12px;padding:13px;font-family:Consolas,monospace;font-size:12px;margin-top:14px;resize:vertical}
.modal{position:fixed;inset:0;background:rgba(9,20,38,.52);display:grid;place-items:center;padding:16px;z-index:100}.modal-box{position:relative;width:min(500px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:20px;padding:24px;box-shadow:0 28px 70px rgba(10,30,60,.25)}.modal-box h3{margin:0 0 17px}.modal-x{position:absolute;right:12px;top:10px;width:34px;height:34px;border:0;border-radius:9px;background:#edf3fa;color:#294a70;font-size:22px}.stack-form{display:grid;gap:11px}.captcha-row{display:grid;grid-template-columns:1fr auto;gap:8px}.captcha-code{height:46px;border:1px solid #c8d7e8;border-radius:10px;background:repeating-linear-gradient(-25deg,#e7f0ff 0,#e7f0ff 7px,#fafcff 7px,#fafcff 14px);display:grid;place-items:center;font-size:23px;font-weight:950;letter-spacing:7px;color:#173f72;user-select:none}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px;flex-wrap:wrap}.order-total{margin-top:15px;padding:13px;border-radius:12px;background:#f4f8fd;display:flex;justify-content:space-between;align-items:center}.order-total strong{font-size:24px}.pay-label{font-weight:800;margin-top:15px}.qris{display:block;max-width:260px;max-height:280px;margin:10px auto;border-radius:13px;border:1px solid var(--line)}.no-qris{text-align:center;color:var(--muted);padding:18px}.login-box{width:min(420px,100%)}footer{text-align:center;padding:20px;color:#7588a0;font-size:12px}
@media(max-width:820px){.admin-titlebar{flex-direction:column}.admin-toolbar{justify-content:flex-start}.form-columns{grid-template-columns:1fr}.product-admin{grid-template-columns:1fr 1fr}.product-admin .row-actions{grid-column:1/-1}.catalog-app-head{align-items:flex-start;flex-direction:column}}
@media(max-width:560px){.shop-topbar{padding:10px 12px;height:auto}.shop-brand small{display:none}.catalog-page,.admin-page{width:calc(100% - 18px);margin:16px auto}.catalog-hero{padding:22px 18px;border-radius:18px}.hero-orb{display:none}.catalog-products{grid-template-columns:1fr;padding:11px}.admin-card{padding:16px}.section-head{flex-direction:column}.product-admin{grid-template-columns:1fr}.product-admin .row-actions{grid-column:auto}.app-admin-head{align-items:flex-start;flex-direction:column}.admin-toolbar{display:grid;grid-template-columns:1fr 1fr;width:100%}.admin-toolbar .btn{width:100%}.modal{padding:8px}.modal-box{border-radius:15px;padding:20px 14px}}

/* ===== v4.4 Ecommerce responsive refinements ===== */
.catalog-app-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:36px;
  white-space:nowrap;
}
.playstore-icon{width:20px;height:20px;display:block;flex:0 0 20px;background:#fff;border-radius:5px;padding:2px;box-shadow:0 1px 4px rgba(0,0,0,.15)}

/* Produk tunggal tetap seukuran kartu produk biasa, tidak melebar memenuhi baris. */
.catalog-products.single-product{
  grid-template-columns:minmax(220px,280px);
  justify-content:start;
}
.catalog-products.single-product .product-card{width:100%;max-width:280px}
.product-card .order-btn{width:100%;min-height:44px}

/* Penyesuaian bertahap untuk desktop kecil/tablet/HP. */
@media(max-width:900px){
  .catalog-page,.admin-page{width:min(100% - 22px,1160px);margin:20px auto}
  .catalog-hero{padding:26px 24px}
  .catalog-app-head{padding:16px 17px;flex-wrap:wrap}
  .catalog-products{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));padding:14px}
  .catalog-products.single-product{grid-template-columns:minmax(200px,280px)}
}

@media(max-width:680px){
  .shop-topbar{height:auto;min-height:64px;padding:10px 14px;gap:10px;flex-wrap:wrap}
  .shop-brand{min-width:0}
  .shop-brand b{font-size:15px}
  .shop-top-actions{margin-left:auto}
  .catalog-hero{padding:22px 18px;border-radius:18px}
  .catalog-hero h1{font-size:32px}
  .catalog-hero p{font-size:14px}
  .catalog-app-name{font-size:20px}
  .catalog-app-link{font-size:11px;padding:7px 9px}
  .catalog-products{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:11px}
  .catalog-products.single-product{grid-template-columns:minmax(0,280px)}
  .product-card{min-height:165px;padding:14px}
  .product-name{font-size:15px}
  .product-price{font-size:21px;margin:13px 0}
}

@media(max-width:520px){
  .catalog-page,.admin-page{width:calc(100% - 16px);margin:12px auto}
  .catalog-hero{padding:18px 15px}
  .hero-orb{display:none}
  .catalog-app{border-radius:16px}
  .catalog-app-head{align-items:flex-start;flex-direction:column;gap:9px;padding:14px}
  .catalog-app-link{align-self:flex-start;max-width:100%;white-space:normal;text-align:left}
  .catalog-products,.catalog-products.single-product{grid-template-columns:1fr}
  .catalog-products.single-product .product-card{max-width:none}
  .product-card{min-height:auto}
  .product-card .order-btn{min-height:42px}
}

@media(max-width:360px){
  .shop-logo{width:36px;height:36px;border-radius:10px}
  .mini-btn{padding:7px 10px;font-size:12px}
  .catalog-hero h1{font-size:28px}
  .catalog-app-name{font-size:18px}
  .playstore-icon{width:18px;height:18px;flex-basis:18px}
}
