:root {
  --bg: #fff5e6;
  --bg-card: #ffffff;
  --bg-card-2: #ffe066;
  --border: #000000;
  --text: #111111;
  --text-dim: #333333;
  --accent: #ff4d6d;
  --accent-2: #00d9a5;
  --danger: #ff3b5c;
  --warn: #ffb020;
  --shadow: 4px 4px 0 #000;
  --shadow-sm: 2px 2px 0 #000;
  --radius: 8px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image: radial-gradient(#00000012 1px, transparent 1px);
  background-size: 20px 20px;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.navbar {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 3px solid #000;
  box-shadow: 0 4px 0 #000;
}
.navbar-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
}
.brand { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; text-transform: uppercase; }
.brand span { background: #ff4d6d; padding: 0 6px; border: 2px solid #000; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  background: #fff; border: 3px solid #000; color: #000;
  padding: 8px 14px; border-radius: 6px; font-size: 14px; font-weight: 800;
  display: flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: transform .08s, box-shadow .08s;
}
.nav-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #000; }
.nav-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #000; }
.nav-btn.active { background: #ff4d6d; color: #fff; }
.nav-avatar { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; border: 2px solid #000; }

main#app { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; min-height: 70vh; }

.section-title { 
  font-size: 20px; font-weight: 900; margin: 24px 0 12px; 
  text-transform: uppercase; letter-spacing: -0.5px;
  border-bottom: 3px solid #000; display: inline-block; padding-bottom: 4px;
}

/* Category tabs */
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.cat-tab {
  background: #fff; border: 3px solid #000; color: #000;
  padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.cat-tab:hover { background: #ffe066; }
.cat-tab.active { background: #ff4d6d; color: #fff; }

/* Product grid */
.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: stretch;
}
@media (max-width: 560px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.product-card {
  background: #fff; border: 3px solid #000; border-radius: 8px;
  overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .08s, box-shadow .08s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }
.product-card img, .product-card .pc-img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: 3px solid #000; background: #ffe066;
}
.pc-body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; }
.pc-name { font-weight: 900; font-size: 14px; margin: 0 0 4px; text-transform: uppercase; }
.pc-price { font-weight: 800; color: #000; font-size: 15px; margin-top: auto; }
.pc-price small { color: #ff4d6d; }

/* Buttons */
.btn {
  background: #ff4d6d; color: #fff; border: 3px solid #000;
  padding: 10px 16px; border-radius: 6px; font-weight: 800; font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #000; }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn.secondary { background: #fff; color: #000; }
.btn.success { background: #00d9a5; color: #000; }
.btn.danger { background: #ff3b5c; color: #fff; }
.btn.block { width: 100%; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: #fff; border: 4px solid #000; border-radius: 10px;
  max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 8px 8px 0 #000; padding: 20px; position: relative;
}
.modal-close {
  position: absolute; top: 10px; right: 10px;
  background: #ff4d6d; color: #fff; border: 2px solid #000;
  width: 32px; height: 32px; border-radius: 4px; font-weight: 900; font-size: 16px;
}

/* Form */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 800; font-size: 13px; margin-bottom: 4px; text-transform: uppercase; }
.field input, .field select, textarea {
  width: 100%; padding: 10px 12px; border: 3px solid #000; border-radius: 6px;
  background: #fff; color: #000; font-size: 14px; font-weight: 600;
  box-shadow: 2px 2px 0 #000;
}
.field input:focus, .field select:focus { outline: none; background: #fffde6; }
.error-msg { color: #ff3b5c; font-weight: 700; font-size: 13px; margin: 6px 0; }
.success-msg { color: #00a86b; font-weight: 700; font-size: 13px; margin: 6px 0; }

/* Profile */
.profile-header { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.avatar-wrap { position: relative; }
.avatar-wrap img { width: 80px; height: 80px; border: 4px solid #000; border-radius: 8px; object-fit: cover; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab-btn {
  background: #fff; border: 3px solid #000; padding: 8px 14px; border-radius: 6px;
  font-weight: 800; font-size: 13px; box-shadow: var(--shadow-sm);
}
.tab-btn.active { background: #ff4d6d; color: #fff; }

.tx-card {
  display: flex; gap: 12px; background: #fff; border: 3px solid #000; border-radius: 8px;
  padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.tx-card img { width: 48px; height: 48px; object-fit: cover; border: 2px solid #000; border-radius: 4px; }
.tx-title { font-weight: 800; }
.tx-sub { font-size: 12px; color: #444; }
.tx-key { font-family: monospace; font-size: 12px; background: #ffe066; padding: 6px 8px; border: 2px solid #000; margin-top: 6px; word-break: break-all; }

/* Admin */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card {
  background: #fff; border: 3px solid #000; border-radius: 8px; padding: 14px;
  box-shadow: var(--shadow-sm);
}
.stat-card .num { font-size: 24px; font-weight: 900; }
.stat-card .lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { padding: 8px 10px; border-bottom: 2px solid #000; text-align: left; }
th { background: #ffe066; font-weight: 900; text-transform: uppercase; }
.table-wrap { overflow-x: auto; background: #fff; border: 3px solid #000; border-radius: 8px; box-shadow: var(--shadow-sm); }

.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.form-row .field { margin-bottom: 0; min-width: 160px; flex: 1; }

.toggle-badge { padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: 800; cursor: pointer; border: 2px solid #000; }
.toggle-badge.on { background: #00d9a5; color: #000; }
.toggle-badge.off { background: #ff3b5c; color: #fff; }

.empty-state { text-align: center; color: #333; padding: 40px 10px; font-size: 14px; font-weight: 700; }
.footer { text-align: center; padding: 20px; color: #333; font-size: 12px; border-top: 3px solid #000; background: #fff; font-weight: 700; }

/* WhatsApp float */
.wa-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  border: 3px solid #000; box-shadow: 4px 4px 0 #000;
  transition: transform .08s;
}
.wa-float:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }
.wa-float svg { width: 30px; height: 30px; }

/* Status pills */
.status-pill { padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 800; border: 2px solid #000; }
.status-pill.pending { background: #ffe066; }
.status-pill.completed, .status-pill.paid { background: #00d9a5; }
.status-pill.failed, .status-pill.canceled { background: #ff3b5c; color: #fff; }
