:root{
  --bg:#0b0614;
  --card:#140a2a;
  --card2:#1b0f3a;

  --text:#eee7ff;
  --muted:#bca7ff;

  --accent:#a855f7;
  --accent2:#7c3aed;

  --border:rgba(168,85,247,.22);
  --shadow:0 12px 40px rgba(0,0,0,.35);

  --danger:#ef4444;
  --ok:#22c55e;
}

*{ box-sizing:border-box; }

html, body{
  height:100%;
}

body{
  margin:0;
  min-height:100vh;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);

  /* FIX: background full layar + nggak "kepotong" */
  background:
    radial-gradient(1200px 700px at 20% 0%, #2a0a57 0%, var(--bg) 55%),
    radial-gradient(900px 600px at 80% 20%, #1c0a3a 0%, var(--bg) 60%),
    linear-gradient(180deg, #070310 0%, var(--bg) 100%);
  background-attachment: fixed;
}

a{
  color:var(--muted);
  text-decoration:none;
}
a:hover{ color:#ffffff; }

.container{
  max-width:1000px;
  margin:0 auto;
  padding:30px 18px;
}

/* NAV */
.nav{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;

  padding:14px 18px;
  border-radius:18px;

  background:rgba(20,10,42,.72);
  border:1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.brand{
  font-weight:900;
  letter-spacing:.4px;
}

/* badge (saldo / tag) */
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;

  padding:8px 14px;
  border-radius:999px;

  background:rgba(168,85,247,.14);
  border:1px solid rgba(168,85,247,.25);
  color:var(--text);
  font-weight:700;
  font-size:13px;
}

/* LAYOUT */
.grid{ display:grid; gap:16px; }

.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media(max-width:700px){
  .row{ grid-template-columns: 1fr; }
}

/* CARD */
.card{
  background:linear-gradient(180deg, rgba(20,10,42,.92), rgba(27,15,58,.78));
  border:1px solid var(--border);
  border-radius:22px;
  padding:18px;
  box-shadow: var(--shadow);
}

.h1{
  font-size:22px;
  font-weight:900;
  margin:0 0 10px;
}

.muted{
  color:var(--muted);
  font-size:13px;
}

/* INPUT + BUTTON */
.input, .btn, .smallbtn{
  border-radius:14px;
  border:1px solid rgba(168,85,247,.22);
  background:rgba(7,4,16,.65);
  color:var(--text);
  outline:none;
}

.input{
  width:100%;
  padding:12px 14px;
}

.input:focus{
  border-color:rgba(168,85,247,.55);
  box-shadow: 0 0 0 4px rgba(168,85,247,.12);
}

.btn{
  width:100%;
  padding:12px 14px;
  cursor:pointer;
  border:none;
  font-weight:900;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
}
.btn:hover{ filter:brightness(1.05); }

.smallbtn{
  padding:8px 12px;
  cursor:pointer;
  font-weight:800;
}
.smallbtn:hover{
  border-color:rgba(168,85,247,.5);
}

/* TABLE */
.table{
  width:100%;
  border-collapse:collapse;
  overflow:hidden;
  border-radius:16px;
  border:1px solid rgba(168,85,247,.15);
}

.table th, .table td{
  padding:10px 12px;
  border-bottom:1px solid rgba(168,85,247,.12);
  text-align:left;
  font-size:14px;
}

.table th{
  color:#f2ecff;
  font-weight:900;
  background:rgba(168,85,247,.08);
}

.table tr:hover td{
  background:rgba(168,85,247,.06);
}

/* STATUS */
.status{ font-weight:900; }
.status.ok{ color:var(--ok); }
.status.bad{ color:var(--danger); }

/* gambar QR biar rapih */
img{
  max-width:100%;
  height:auto;
}

.auth-wrap{
max-width:520px;
margin:auto;
}

.alert-card{
padding:30px;
border-radius:24px;
text-align:center;
margin-bottom:20px;
}

.error-card{
background:#111;
border:1px solid rgba(255,0,0,.2);
}

.alert-icon{
font-size:40px;
color:#ff3b3b;
margin-bottom:10px;
}

.alert-title{
font-size:22px;
font-weight:700;
color:#fff;
}

.alert-text{
color:#ccc;
}

.grid{
display:grid;
grid-template-columns:1fr 1fr;
gap:12px;
}

@media(max-width:700px){

.grid{
grid-template-columns:1fr;
}

.table{
display:block;
overflow-x:auto;
}

.product-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-box{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:90px;
  padding:16px;
  border-radius:18px;
  text-align:center;
  font-weight:800;
  color:var(--text);
  background:linear-gradient(180deg, rgba(20,10,42,.92), rgba(27,15,58,.78));
  border:1px solid rgba(168,85,247,.22);
  box-shadow: var(--shadow);
}

.product-box span{
  display:block;
}

.product-list{
  grid-template-columns: 1fr;
}

.product-card{
  padding:16px;
}

.product-name{
  font-size:16px;
  font-weight:800;
  line-height:1.4;
}

.price{
  font-size:20px;
  font-weight:900;
}

@media(max-width:700px){
  .product-grid{
    grid-template-columns: 1fr 1fr;
  }
}

.product-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-box{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:90px;
  padding:16px;
  border-radius:18px;
  text-align:center;
  font-weight:800;
  color:var(--text);
  background:linear-gradient(180deg, rgba(20,10,42,.92), rgba(27,15,58,.78));
  border:1px solid rgba(168,85,247,.22);
  box-shadow: var(--shadow);
}

.product-box span{
  display:block;
}

.product-list{
  grid-template-columns: 1fr;
}

.product-card{
  padding:16px;
}

.product-name{
  font-size:16px;
  font-weight:800;
  line-height:1.4;
}

.price{
  font-size:20px;
  font-weight:900;
}

@media(max-width:700px){
  .product-grid{
    grid-template-columns: 1fr 1fr;
  }
}

.product-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-box{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:90px;
  padding:16px;
  border-radius:18px;
  text-align:center;
  font-weight:800;
  color:var(--text);
  background:linear-gradient(180deg, rgba(20,10,42,.92), rgba(27,15,58,.78));
  border:1px solid rgba(168,85,247,.22);
  box-shadow: var(--shadow);
}

.product-box span{
  display:block;
}

.subcategory-wrap{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.subcategory-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:800;
  color:var(--text);
  background:rgba(168,85,247,.10);
  border:1px solid rgba(168,85,247,.22);
}

.subcategory-chip.active{
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  border:none;
}

.product-list{
  grid-template-columns: 1fr;
}

.product-card{
  padding:16px;
}

.product-name{
  font-size:16px;
  font-weight:800;
  line-height:1.4;
}

.price{
  font-size:20px;
  font-weight:900;
}

@media(max-width:700px){
  .product-grid{
    grid-template-columns: 1fr 1fr;
  }
}
