/* ═══════════════════════════════════════════
   Throttle Fitness — Components
   Buttons, Cards, Forms, Alerts, Tables, Badges
   ═══════════════════════════════════════════ */

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 1.5rem; border-radius: var(--radius-md); font-weight: 600;
  font-size: 0.9rem; transition: all var(--transition); border: 2px solid transparent;
  white-space: nowrap; text-decoration: none; cursor: pointer;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 4px 15px rgba(var(--primary-rgb),0.4); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-secondary:hover { background: var(--border); }
.btn-outline { border-color: var(--border); color: var(--text-primary); background: transparent; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-glow); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-warning { background: var(--warning); color: #000; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0.5rem; width: 40px; height: 40px; border-radius: var(--radius-full); }
.btn[disabled], .btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-google { background: #fff; color: #333; border: 1px solid var(--border); gap: 0.6rem; }
.btn-google:hover { background: #f8f8f8; box-shadow: var(--shadow-md); color: #333; }
.btn-google img { width: 20px; height: 20px; }

/* ── Alerts ── */
.alert {
  padding: 0.9rem 1.2rem; border-radius: var(--radius-md); margin-bottom: 1.2rem;
  font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 0.5rem;
  animation: fadeIn 0.3s ease; border-left: 4px solid;
}
.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.alert-error { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: var(--info); }

/* ── Cards ── */
.card {
  background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow-card); transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-card-hover); }
.card-header { padding-bottom: 1rem; border-bottom: 1px solid var(--border-light); margin-bottom: 1rem; }
.card-title { font-size: 1.1rem; font-weight: 700; }
.card-body { }
.card-footer { padding-top: 1rem; border-top: 1px solid var(--border-light); margin-top: 1rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: 0.85rem; color: var(--text-primary); }
.form-control {
  width: 100%; padding: 0.65rem 0.9rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-md); background: var(--bg-input); color: var(--text-primary);
  font-size: 0.9rem; transition: all var(--transition-fast); outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-control::placeholder { color: var(--text-tertiary); }
.form-control[readonly] { opacity: 0.7; cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-select {
  width: 100%; padding: 0.65rem 2.5rem 0.65rem 0.9rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-md); background: var(--bg-input) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%236B7280' d='M6 8L1 3h10z'/%3e%3c/svg%3e") no-repeat right 0.75rem center;
  appearance: none; color: var(--text-primary); font-size: 0.9rem; cursor: pointer; outline: none;
  transition: all var(--transition-fast);
}
.form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-card); }
.form-text, .form-group small { font-size: 0.78rem; color: var(--text-tertiary); margin-top: 0.25rem; display: block; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.4rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; cursor: pointer; padding: 0.3rem; border-radius: var(--radius-sm); transition: background var(--transition-fast); }
.checkbox-label:hover { background: var(--bg-secondary); }
.checkbox-label input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }

/* ── Tables ── */
.table-responsive { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-light); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table thead { background: var(--bg-secondary); }
.data-table th { padding: 0.75rem 1rem; text-align: left; font-weight: 600; color: var(--text-secondary); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-light); color: var(--text-primary); vertical-align: middle; }
.data-table tbody tr { transition: background var(--transition-fast); }
.data-table tbody tr:hover { background: var(--bg-card-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ── Status Badges ── */
.status-badge {
  display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 600; text-transform: capitalize;
  background: color-mix(in srgb, var(--badge-color, #6b7280) 15%, transparent);
  color: var(--badge-color, #6b7280); border: 1px solid color-mix(in srgb, var(--badge-color, #6b7280) 30%, transparent);
}
.badge { padding: 0.35rem 0.8rem; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; }
.badge-verified { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.badge-review { background: #fef3c7; color: #d97706; border: 1px solid #fcd34d; }
.badge-pending { background: #fef3c7; color: #d97706; border: 1px solid #fcd34d; }
.badge-rejected { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }
[data-theme="dark"] .badge-verified { background: #064e3b; color: #6ee7b7; border-color: #065f46; }
[data-theme="dark"] .badge-review { background: #78350f; color: #fcd34d; border-color: #92400e; }
[data-theme="dark"] .badge-pending { background: #78350f; color: #fcd34d; border-color: #92400e; }
[data-theme="dark"] .badge-rejected { background: #7f1d1d; color: #fca5a5; border-color: #991b1b; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; padding: 1rem; }
.page-info { font-size: 0.85rem; color: var(--text-secondary); }

/* ── Empty State ── */
.empty-state-card {
  text-align: center; padding: 3rem 2rem; background: var(--bg-card); border: 2px dashed var(--border);
  border-radius: var(--radius-lg); color: var(--text-secondary);
}
.empty-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.empty-state-card p { font-size: 0.95rem; }

/* ── Coming Soon ── */
.coming-soon-section { text-align: center; padding: 5rem 2rem; }
.coming-soon-icon { font-size: 4rem; display: block; margin-bottom: 1rem; }
.coming-soon-text { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin: 0.5rem 0; }

/* ── Detail Cards ── */
.detail-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-card); }
.detail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.5rem; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.detail-item label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); font-weight: 600; display: block; margin-bottom: 0.2rem; }
.detail-item span { font-size: 0.95rem; color: var(--text-primary); font-weight: 500; }
.detail-item.full-width { grid-column: 1 / -1; }
.detail-action { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-light); }

/* ── Verify Form Section ── */
.verify-form-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 2px solid var(--border); }
.verify-form-section h2 { margin-bottom: 1rem; }
.read-only-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.verification-status-card { margin-top: 1.5rem; padding: 1.2rem; border-radius: var(--radius-md); background: var(--bg-secondary); border-left: 4px solid var(--primary); }

/* ── Testimonials Grid ── */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.testimonial-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 1.5rem; transition: all var(--transition); }
.testimonial-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.testimonial-avatar { width: 48px; height: 48px; border-radius: var(--radius-full); overflow: hidden; margin-bottom: 0.75rem; background: var(--primary-glow); display: flex; align-items: center; justify-content: center; }
.testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial-content { font-style: italic; color: var(--text-secondary); line-height: 1.7; margin-bottom: 1rem; font-size: 0.9rem; }
.testimonial-meta strong { display: block; color: var(--text-primary); }
.testimonial-meta span { font-size: 0.8rem; color: var(--text-tertiary); text-transform: capitalize; }

/* ── Cards Grid ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.plan-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 1.5rem; transition: all var(--transition); }
.plan-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.plan-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.plan-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 0.75rem; }
.plan-cover { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 1rem; }
.plan-meta { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.8rem; }
.plan-meta span { background: var(--bg-secondary); padding: 0.2rem 0.6rem; border-radius: var(--radius-full); color: var(--text-secondary); }

/* ── Suggest Plan Section ── */
.suggest-plan-section { margin-bottom: 1.5rem; }
.suggest-plan-section > summary { cursor: pointer; list-style: none; }
.suggest-plan-section > summary::-webkit-details-marker { display: none; }
.mt-half { margin-top: 0.25rem; }

/* ── Profile Photo Section ── */
.profile-photo-section { display: flex; align-items: flex-start; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.current-photo { width: 100px; height: 100px; border-radius: var(--radius-full); object-fit: cover; border: 3px solid var(--primary-glow); }

/* ── Loading Skeleton ── */
.skeleton { background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-md); }
.skeleton-text { height: 1em; margin-bottom: 0.5rem; }
.skeleton-card { height: 120px; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: var(--bg-overlay); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal { background: var(--bg-card); border-radius: var(--radius-lg); padding: 2rem; max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-xl); transform: scale(0.95); transition: transform var(--transition); }
.modal-overlay.active .modal { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h2 { font-size: 1.2rem; }
.modal-close { font-size: 1.5rem; cursor: pointer; color: var(--text-tertiary); transition: color var(--transition-fast); background: none; border: none; }
.modal-close:hover { color: var(--text-primary); }

/* ── Text Danger ── */
.text-danger { color: var(--error) !important; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .profile-photo-section { flex-direction: column; align-items: center; }
}
@media (max-width: 480px) {
  .detail-grid { grid-template-columns: 1fr; }
  .btn-lg { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
  .checkbox-grid { grid-template-columns: 1fr; }
}
