/* Riung Keluarga Modern Design Tokens & Styling */
:root {
  --primary: #0F5132;
  --primary-dark: #0A3622;
  --primary-light: #D1E7DD;
  --accent: #D4AF37;
  --accent-hover: #B89628;
  --bg-gradient: linear-gradient(135deg, #062617 0%, #0F5132 50%, #198754 100%);
  --surface: #FFFFFF;
  --surface-secondary: #F8F9FA;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 15px 35px rgba(0,0,0,0.15);
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  padding: 20px 12px;
  line-height: 1.5;
}

.container {
  max-width: 640px;
  margin: 0 auto;
}

/* Header Banner */
.header-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.header-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.location-card-link {
  text-decoration: none;
  display: block;
  margin-top: 14px;
}

.location-card {
  background: var(--surface-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.25 ease;
  text-align: left;
}

.location-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.location-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.location-info {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
}

.location-pin-icon {
  font-size: 1.3rem;
}

.location-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-dark);
}

.location-sub {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 2px;
}

.header-logo {
  width: 72px;
  max-width: 72px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-card h1 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.header-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Form Card */
.form-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--surface-secondary);
}

.section-title .step-num {
  background: var(--primary);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-group label span.req {
  color: #DC2626;
}

.input-control, select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background: var(--surface);
  transition: all 0.2s ease;
}

.input-control:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 81, 50, 0.12);
}

/* Stepper Control for Count */
.stepper-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stepper-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface-secondary);
  color: var(--primary-dark);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.stepper-btn:hover:not(:disabled) {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.stepper-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stepper-input {
  text-align: center;
  font-weight: 700;
  font-size: 1.2rem;
  width: 70px;
}

/* Dynamic Participant Cards */
.participant-card {
  background: var(--surface-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  transition: all 0.3s ease;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.participant-card-header {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-dark);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.participant-badge {
  background: #E2E8F0;
  color: #475569;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
}

/* Summary Card & Payment */
.summary-card {
  background: #F0FDF4;
  border: 1.5px solid #BBF7D0;
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.95rem;
}

.summary-row.total {
  border-top: 1.5px stroke #BBF7D0;
  margin-top: 8px;
  padding-top: 12px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.payment-section {
  text-align: center;
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 20px;
}

.infaq-notice-box {
  background: #FEF3C7;
  border: 1.5px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 14px 0;
  text-align: left;
}

.qris-img {
  max-width: 240px;
  width: 100%;
  border-radius: var(--radius-md);
  border: 3px solid white;
  box-shadow: var(--shadow-md);
  margin: 14px 0;
}

.bank-info-box {
  background: white;
  border: 1px dashed #CBD5E1;
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 14px 0;
  text-align: left;
}

.bank-info-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.bank-account-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.btn-copy {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

/* Action Buttons */
.btn-submit {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-wa {
  width: 100%;
  background: #25D366;
  color: white;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  margin-top: 14px;
}

.btn-wa:hover {
  background: #1EBE5D;
}

.btn-edit {
  width: 100%;
  background: var(--surface-secondary);
  color: var(--text-main);
  border: 1.5px solid var(--border);
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  margin-top: 10px;
  cursor: pointer;
}

/* Admin Styles */
.admin-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.table-responsive {
  overflow-x: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface-secondary);
  font-weight: 700;
  color: var(--primary-dark);
}

.badge-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-lunas { background: #D1E7DD; color: #0A3622; }
.badge-infaq { background: #E0E7FF; color: #3730A3; }

/* Toast Feedback */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1E293B;
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 100;
}
