/* =====================================================
   PowerZone Gym — Stylesheet Premium (Mobile First)
   ===================================================== */

:root {
  --pz-primary: #FF3B30;
  --pz-primary-dark: #E62E24;
  --pz-secondary: #111111;
  --pz-dark-card: #1B1B1F;
  --pz-bg: #F5F5F7;
  --pz-white: #FFFFFF;
  --pz-success: #00D26A;
  --pz-warning: #FFB020;
  --pz-text: #16161A;
  --pz-text-muted: #6B6B76;
  --pz-border: #E9E9EF;
  --pz-radius-lg: 22px;
  --pz-radius-md: 16px;
  --pz-radius-sm: 12px;
  --pz-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --pz-shadow-strong: 0 16px 40px rgba(0, 0, 0, 0.14);
  --pz-font-heading: 'Poppins', sans-serif;
  --pz-font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--pz-font-body);
  background: var(--pz-bg);
  color: var(--pz-text);
  padding-bottom: 88px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--pz-font-heading);
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.2;
}

p { margin: 0 0 12px; color: var(--pz-text-muted); line-height: 1.55; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.pz-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

@media (min-width: 640px) {
  .pz-container { max-width: 560px; padding: 24px; }
}

/* ---------- Topbar ---------- */
.pz-topbar {
  background: var(--pz-secondary);
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.pz-topbar-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pz-logo {
  color: var(--pz-white);
  font-family: var(--pz-font-heading);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.pz-logo span { color: var(--pz-primary); }
.pz-avatar-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--pz-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--pz-font-heading);
  font-weight: 700;
  font-size: 15px;
}

/* ---------- Bottom Nav ---------- */
.pz-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--pz-white);
  border-top: 1px solid var(--pz-border);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 40;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.06);
}
.pz-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
  color: var(--pz-text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 12px;
  min-width: 52px;
  flex: 1;
}
.pz-nav-item.active { color: var(--pz-primary); background: #FFF1F0; }
.pz-nav-icon { font-size: 20px; }
.pz-nav-logout { color: #A0A0A8; }

/* ---------- Cards ---------- */
.pz-card {
  background: var(--pz-white);
  border-radius: var(--pz-radius-lg);
  box-shadow: var(--pz-shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.pz-card-dark {
  background: var(--pz-secondary);
  color: var(--pz-white);
}
.pz-card-dark p { color: #C7C7CE; }

.pz-hero {
  background: linear-gradient(135deg, #191919 0%, #000000 100%);
  color: var(--pz-white);
  border-radius: var(--pz-radius-lg);
  padding: 26px 20px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.pz-hero::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,59,48,0.35), transparent 70%);
}
.pz-hero h1 { font-size: 24px; margin-bottom: 6px; }
.pz-hero p { color: #D6D6DC; margin-bottom: 0; }
.pz-hero-tag {
  display: inline-block;
  background: var(--pz-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

/* ---------- Buttons ---------- */
.pz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 18px;
  border-radius: var(--pz-radius-md);
  font-family: var(--pz-font-heading);
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
  text-align: center;
}
.pz-btn:active { transform: scale(0.97); }
.pz-btn-primary { background: var(--pz-primary); color: #fff; box-shadow: 0 10px 24px rgba(255,59,48,0.32); }
.pz-btn-primary:hover { background: var(--pz-primary-dark); }
.pz-btn-dark { background: var(--pz-secondary); color: #fff; }
.pz-btn-outline { background: transparent; color: var(--pz-secondary); border: 2px solid var(--pz-border); }
.pz-btn-wa { background: #25D366; color: #fff; }
.pz-btn-success { background: var(--pz-success); color: #fff; }
.pz-btn-sm { padding: 10px 14px; font-size: 13px; width: auto; }
.pz-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pz-btn-block-group { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Forms ---------- */
.pz-field { margin-bottom: 16px; }
.pz-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--pz-text);
}
.pz-input, .pz-select, .pz-textarea {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid var(--pz-border);
  border-radius: var(--pz-radius-sm);
  font-family: var(--pz-font-body);
  font-size: 15px;
  background: var(--pz-white);
  color: var(--pz-text);
  outline: none;
  transition: border-color 0.15s ease;
}
.pz-input:focus, .pz-select:focus, .pz-textarea:focus {
  border-color: var(--pz-primary);
}
.pz-textarea { resize: vertical; min-height: 90px; }
.pz-hint { font-size: 12px; color: var(--pz-text-muted); margin-top: 4px; }
.pz-error-text { font-size: 12px; color: var(--pz-primary); margin-top: 4px; font-weight: 600; }

/* ---------- Auth screen ---------- */
.pz-auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(180deg, #111111 0%, #111111 220px, var(--pz-bg) 220px);
}
.pz-auth-logo { text-align: center; margin-bottom: 22px; }
.pz-auth-logo .pz-emoji { font-size: 40px; }
.pz-auth-logo h1 { color: #fff; font-size: 22px; margin-top: 6px; }
.pz-auth-logo p { color: #C7C7CE; font-size: 13px; }
.pz-auth-card { max-width: 420px; margin: 0 auto; width: 100%; }
.pz-auth-switch { text-align: center; margin-top: 14px; font-size: 14px; }
.pz-auth-switch a { color: var(--pz-primary); font-weight: 700; }
.pz-tab-group { display: flex; background: #F0F0F3; border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.pz-tab { flex: 1; text-align: center; padding: 10px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--pz-text-muted); }
.pz-tab.active { background: var(--pz-secondary); color: #fff; }

/* ---------- Flash ---------- */
.pz-flash {
  position: fixed;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  max-width: 90%;
  box-shadow: var(--pz-shadow-strong);
  animation: pzFadeInDown 0.25s ease;
}
.pz-flash-success { background: var(--pz-success); color: #fff; }
.pz-flash-error { background: var(--pz-primary); color: #fff; }
.pz-flash-info { background: var(--pz-secondary); color: #fff; }
@keyframes pzFadeInDown { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Badges & chips ---------- */
.pz-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.pz-badge-success { background: #DFF9EC; color: #048A4E; }
.pz-badge-warning { background: #FFF3DC; color: #A9660A; }
.pz-badge-danger { background: #FFE2E0; color: #C0261C; }
.pz-badge-dark { background: #EDEDF0; color: #46464E; }

.pz-chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.pz-chip {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--pz-border);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.pz-chip.active { background: var(--pz-secondary); color: #fff; border-color: var(--pz-secondary); }

/* ---------- Section titles ---------- */
.pz-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 12px;
}
.pz-section-title h2 { font-size: 17px; margin: 0; }
.pz-section-title a { font-size: 13px; font-weight: 700; color: var(--pz-primary); }

/* ---------- List items ---------- */
.pz-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--pz-radius-md);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--pz-shadow);
}
.pz-list-item-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: #FFF1F0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.pz-list-item-body { flex: 1; min-width: 0; }
.pz-list-item-title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.pz-list-item-sub { font-size: 12px; color: var(--pz-text-muted); }

/* ---------- Empty state ---------- */
.pz-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--pz-text-muted);
}
.pz-empty-emoji { font-size: 40px; margin-bottom: 10px; }
.pz-empty h3 { font-size: 15px; color: var(--pz-text); margin-bottom: 6px; }

/* ---------- Stat grid ---------- */
.pz-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.pz-stat-card {
  background: #fff;
  border-radius: var(--pz-radius-md);
  padding: 14px;
  box-shadow: var(--pz-shadow);
}
.pz-stat-value { font-family: var(--pz-font-heading); font-size: 22px; font-weight: 800; }
.pz-stat-label { font-size: 12px; color: var(--pz-text-muted); font-weight: 600; }

/* ---------- Progress bar ---------- */
.pz-progressbar-track {
  width: 100%; height: 10px;
  background: #EFEFF2;
  border-radius: 999px;
  overflow: hidden;
}
.pz-progressbar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pz-primary), #FF6B35);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ---------- Table (admin) ---------- */
.pz-table-wrap { overflow-x: auto; border-radius: var(--pz-radius-md); box-shadow: var(--pz-shadow); background: #fff; }
.pz-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.pz-table th, .pz-table td { padding: 12px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--pz-border); }
.pz-table th { background: #FAFAFB; font-weight: 700; color: var(--pz-text-muted); text-transform: uppercase; font-size: 11px; letter-spacing: 0.4px; }
.pz-table tr:last-child td { border-bottom: none; }

/* ---------- Checklist ---------- */
.pz-checklist-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: var(--pz-radius-md);
  padding: 14px; margin-bottom: 10px; box-shadow: var(--pz-shadow);
}
.pz-checklist-item.done { background: #F1FCF6; }
.pz-check-circle {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--pz-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 14px; color: #fff;
}
.pz-check-circle.done { background: var(--pz-success); border-color: var(--pz-success); }

/* ---------- Footer ---------- */
.pz-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--pz-text-muted);
}
.pz-footer p { margin: 0; color: inherit; }

/* ---------- Installer specific ---------- */
.pz-installer-step {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--pz-radius-sm);
  background: #fff; margin-bottom: 8px; box-shadow: var(--pz-shadow);
  font-size: 13px; font-weight: 600;
}
.pz-installer-progress { display: flex; gap: 6px; margin-bottom: 20px; }
.pz-installer-progress span { flex: 1; height: 5px; border-radius: 999px; background: var(--pz-border); }
.pz-installer-progress span.active { background: var(--pz-primary); }

/* ---------- Utility ---------- */
.pz-mt-0 { margin-top: 0; }
.pz-text-center { text-align: center; }
.pz-flex-between { display: flex; align-items: center; justify-content: space-between; }
.pz-gap-8 { gap: 8px; }
.pz-w-full { width: 100%; }
