/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f9fafb;
  color: #1a1a2e;
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px;
}

.container-wide {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ===== CARD ===== */
.card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  margin-bottom: 16px;
}

/* ===== FORM ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== BUTTON ===== */
.btn {
  display: inline-block;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
  text-decoration: none;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.btn-secondary:hover {
  background: #e5e7eb;
  text-decoration: none;
}

.btn-danger {
  background: #dc2626;
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
  text-decoration: none;
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  width: auto;
}

/* ===== HEADER ===== */
.header {
  background: white;
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header h1 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
}

.header .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

/* ===== ALERT ===== */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.alert-info {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* ===== BADGE MEMBERSHIP ===== */
.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-member {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.badge-silver {
  background: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 100%);
  color: #1f2937;
}

.badge-gold {
  background: linear-gradient(135deg, #fde047 0%, #eab308 100%);
  color: #422006;
}

.badge-black {
  background: linear-gradient(135deg, #1f2937 0%, #000000 100%);
  color: white;
}

/* ===== PAKET CARD ===== */
.package-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
  margin-bottom: 12px;
}

.package-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.package-card .category {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.package-card .description {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}

.package-card .price {
  font-size: 20px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 4px;
}

.package-card .duration {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 12px;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: white;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #9ca3af;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

/* ===== TAB ===== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 12px;
}

.tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.tab.active {
  background: white;
  color: #2563eb;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-fill {
  height: 100%;
  background: #2563eb;
  border-radius: 999px;
  transition: width 0.3s;
}

.progress-fill.green {
  background: #16a34a;
}

/* ===== TEXT HELPERS ===== */
.text-center { text-align: center; }
.text-muted { color: #6b7280; }
.text-small { font-size: 13px; }
.text-bold { font-weight: 700; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

/* ===== LOADING ===== */
.loading {
  text-align: center;
  padding: 40px;
  color: #9ca3af;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .container, .container-wide {
    padding: 16px 12px;
  }
  .card {
    padding: 20px 16px;
  }
  .header {
    padding: 12px 16px;
  }
}