/* =========================================
   TORNADO APPS - Style
   ========================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

body {
  background: #0f0f14;
  color: #eee;
  padding: 16px;
  padding-bottom: 90px;
  min-height: 100vh;
}

/* ---------- HEADER ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #2a2a35;
}

header h1 {
  font-size: 17px;
  font-weight: 700;
}

header a {
  font-size: 12px;
  color: #4ade80;
  text-decoration: none;
  font-weight: 600;
}

/* ---------- GRID PRODUK ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.card {
  background: #1a1a22;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #2a2a35;
  transition: transform 0.15s;
}

.card:active {
  transform: scale(0.98);
}

.card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
  aspect-ratio: 1;
  object-fit: cover;
}

.card h3 {
  font-size: 14px;
  margin-bottom: 6px;
  line-height: 1.3;
}

.card p {
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
  line-height: 1.4;
  min-height: 34px;
}

.card .price {
  color: #4ade80;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
}

/* ---------- BUTTON ---------- */
button {
  background: #6366f1;
  color: white;
  border: none;
  padding: 11px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  transition: background 0.15s;
  font-family: inherit;
}

button:hover { background: #4f46e5; }
button:active { transform: scale(0.98); }
button:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
}

button.btn-success {
  background: #4ade80;
  color: #0a0a0a;
}
button.btn-success:hover { background: #22c55e; }

/* ---------- MODAL ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  overflow-y: auto;
}

.modal-content {
  background: #1a1a22;
  padding: 22px;
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
}

.modal-content h2 {
  font-size: 17px;
  margin-bottom: 8px;
  padding-right: 30px;
}

.modal-content h3 {
  font-size: 14px;
  margin: 16px 0 8px;
  color: #bbb;
}

.modal-content .close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 26px;
  cursor: pointer;
  color: #888;
  line-height: 1;
  background: none;
  border: none;
  padding: 0;
  width: auto;
}

.modal-content .close:hover {
  color: #fff;
  background: none;
}

/* ---------- FORM ---------- */
input[type="file"],
input[type="number"],
input[type="text"],
textarea {
  width: 100%;
  padding: 11px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #2a2a35;
  background: #0f0f14;
  color: #eee;
  font-size: 14px;
  font-family: inherit;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #6366f1;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

label {
  display: block;
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
  margin-top: 10px;
}

/* ---------- UTIL ---------- */
.hidden { display: none !important; }

#qrisImg {
  width: 100%;
  border-radius: 10px;
  margin: 12px 0;
  background: white;
}

#danaBox {
  background: #0f0f14;
  border: 1px solid #2a2a35;
  border-radius: 8px;
  padding: 14px;
  margin: 10px 0;
}

#danaBox p {
  font-size: 13px;
  margin-bottom: 8px;
  color: #ccc;
}

#danaBox b {
  color: #fff;
  font-size: 15px;
}

.pay-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

/* ---------- FLOAT BUTTON (WA) ---------- */
.float-btn {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  width: auto;
  background: #4ade80;
  color: #0a0a0a;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(74, 222, 128, 0.3);
}

.float-btn:hover { background: #22c55e; }

/* ---------- BADGE STATUS ---------- */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pending { background: #fbbf24; color: #000; }
.status-delivered { background: #4ade80; color: #000; }

/* ---------- TRACK RESULT ---------- */
#trackResult {
  margin-top: 14px;
  padding: 14px;
  background: #0f0f14;
  border-radius: 8px;
  border: 1px solid #2a2a35;
  font-size: 13px;
  line-height: 1.7;
}

#trackResult hr {
  margin: 12px 0;
  border: none;
  border-top: 1px solid #2a2a35;
}

#trackResult h4 {
  font-size: 13px;
  margin-bottom: 8px;
  color: #4ade80;
}

#trackResult img {
  width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}

/* ---------- TEXT UTIL ---------- */
.info-text {
  font-size: 13px;
  color: #aaa;
  margin: 6px 0;
  line-height: 1.5;
}

.big-price {
  font-size: 20px;
  color: #4ade80;
  font-weight: 700;
  margin-bottom: 6px;
}

.loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 14px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 400px) {
  .card h3 { font-size: 13px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 12px; }
}