:root {
  --primary: #0088cc;
  --primary-dark: #006699;
  --success: #4caf50;
  --danger: #f44336;
  --warning: #ff9800;
  --bg: #f5f5f5;
  --card: #ffffff;
  --text: #333333;
  --text-secondary: #666666;
  --border: #e0e0e0;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: 80px;
}

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

/* Header */
.header {
  background: var(--primary);
  color: white;
  padding: 16px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header h1 { font-size: 20px; font-weight: 600; }
.header-back {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  text-decoration: none;
  font-size: 16px;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn:active { opacity: 0.8; }
.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-sm { padding: 8px 16px; font-size: 14px; width: auto; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-secondary);
}
.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--primary); }
.form-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  min-height: 100px;
  resize: vertical;
}
.form-select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  background: white;
}

/* Event Cards */
.event-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 12px;
}
.event-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--border);
}
.event-card-body { padding: 16px; }
.event-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.event-card-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.event-card-meta i { margin-right: 4px; }
.event-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.event-fee {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

/* Tags */
.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.tag-pending { background: #fff3e0; color: #e65100; }
.tag-confirmed { background: #e8f5e9; color: #2e7d32; }
.tag-cancelled { background: #fbe9e7; color: #c62828; }
.tag-draft { background: #f3e5f5; color: #6a1b9a; }
.tag-approved { background: #e8f5e9; color: #2e7d32; }
.tag-ongoing { background: #e3f2fd; color: #1565c0; }
.tag-ended { background: #eceff1; color: #37474f; }

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  display: flex;
  border-top: 1px solid var(--border);
  z-index: 100;
}
.bottom-nav a {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
}
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a i {
  display: block;
  font-size: 20px;
  margin-bottom: 2px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  justify-content: center;
  align-items: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 360px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

/* Toast */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 300;
  display: none;
  font-size: 14px;
}
.toast.show { display: block; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* Misc */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }

/* Wallet */
.wallet-card {
  text-align: center;
  padding: 32px 16px;
}
.wallet-balance {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
}
.wallet-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.wallet-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* Login */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px;
  text-align: center;
}
.login-logo {
  width: 80px;
  height: 80px;
  background: var(--primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 36px;
  color: white;
}
.login-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.login-subtitle { color: var(--text-secondary); margin-bottom: 32px; }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  -webkit-overflow-scrolling: touch;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 14px;
  cursor: pointer;
}
.filter-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
