
/* ══════════════════════════════════════════════
   MEMBER SYSTEM
══════════════════════════════════════════════ */

/* Auth Forms */
.hb-member-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; background: var(--hb-sand); }
.hb-form-card { background: #fff; border-radius: 16px; padding: 40px; box-shadow: 0 4px 32px rgba(0,0,0,.10); width: 100%; max-width: 520px; }
.hb-form-card__logo { text-align: center; margin-bottom: 24px; }
.hb-form-card__logo .hb-logo-text { font-size: 28px; font-weight: 800; color: var(--hb-forest); }
.hb-form-card__logo .hb-logo-text span { color: var(--hb-teal); }
.hb-form-card__title { font-size: 22px; font-weight: 700; color: var(--hb-forest); margin: 0 0 6px; text-align: center; }
.hb-form-card__sub { text-align: center; color: var(--hb-gray-500); margin: 0 0 28px; font-size: 14px; }
.hb-form-card__sub a { color: var(--hb-teal); font-weight: 600; }

/* Form elements */
.hb-form .hb-form-group { margin-bottom: 18px; }
.hb-form label { display: block; font-size: 13px; font-weight: 600; color: var(--hb-forest); margin-bottom: 6px; }
.hb-form label .req { color: #e44; }
.hb-form input[type="text"],
.hb-form input[type="email"],
.hb-form input[type="tel"],
.hb-form input[type="url"],
.hb-form input[type="password"],
.hb-form select,
.hb-form textarea { width: 100%; padding: 10px 14px; border: 1.5px solid #dde3ea; border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--hb-forest); background: #f9fafb; transition: border-color .15s, box-shadow .15s; box-sizing: border-box; }
.hb-form input:focus, .hb-form select:focus, .hb-form textarea:focus { outline: none; border-color: var(--hb-teal); box-shadow: 0 0 0 3px rgba(14,124,123,.12); background: #fff; }
.hb-form textarea { resize: vertical; min-height: 120px; }
.hb-form small { display: block; font-size: 12px; color: var(--hb-gray-500); margin-top: 4px; }
.hb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hb-form__section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--hb-teal); margin-bottom: 16px; }
.hb-form__legal { font-size: 12px; color: var(--hb-gray-500); text-align: center; margin: 16px 0 0; }
.hb-form__legal a { color: var(--hb-teal); }
.hb-form-check { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 20px; }
.hb-form-check a { color: var(--hb-teal); font-weight: 600; }

/* Buttons extra */
.hb-btn--full { width: 100%; justify-content: center; }
.hb-btn--lg   { padding: 14px 28px; font-size: 15px; }
.hb-btn--sm   { padding: 6px 14px; font-size: 13px; }
.hb-btn--outline { border: 1.5px solid var(--hb-teal); background: transparent; color: var(--hb-teal); }
.hb-btn--outline:hover { background: var(--hb-teal-50); }
.hb-btn--danger { background: #fee2e2; color: #dc2626; border: 1.5px solid #fca5a5; }
.hb-btn--danger:hover { background: #dc2626; color: #fff; }

/* Alerts */
.hb-alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 20px; }
.hb-alert--error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.hb-alert--success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.hb-alert--warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }

/* Member Layout */
.hb-member-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.hb-member-sidebar { background: var(--hb-forest); color: #fff; padding: 28px 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.hb-sidebar-user { display: flex; align-items: center; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.15); margin-bottom: 24px; }
.hb-sidebar-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--hb-teal); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex-shrink: 0; }
.hb-sidebar-name { font-weight: 600; font-size: 14px; }
.hb-sidebar-biz  { font-size: 12px; opacity: .65; margin-top: 2px; }
.hb-sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.hb-sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: rgba(255,255,255,.8); font-size: 14px; font-weight: 500; text-decoration: none; transition: all .15s; }
.hb-sidebar-nav a:hover, .hb-sidebar-nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.hb-sidebar-nav a i { font-size: 18px; }
.hb-member-main { padding: 36px 40px; background: var(--hb-sand); min-height: 100vh; }

/* Dashboard */
.hb-dash-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; }
.hb-dash-header h1 { font-size: 24px; font-weight: 700; color: var(--hb-forest); margin: 0; }
.hb-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.hb-stat-box { background: #fff; border-radius: 12px; padding: 20px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.hb-stat-box__n { font-size: 36px; font-weight: 800; color: var(--hb-forest); }
.hb-stat-box__l { font-size: 13px; color: var(--hb-gray-500); margin-top: 4px; }
.hb-stat-box--green .hb-stat-box__n { color: #059669; }
.hb-stat-box--yellow .hb-stat-box__n { color: #d97706; }

/* Listing Table */
.hb-listing-table { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.06); margin-bottom: 24px; }
.hb-listing-table__head { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 12px; padding: 12px 20px; background: var(--hb-forest); color: rgba(255,255,255,.75); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.hb-listing-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 12px; padding: 14px 20px; align-items: center; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.hb-listing-row:last-child { border-bottom: none; }
.hb-listing-row:hover { background: #f9fafb; }
.hb-listing-row__name { font-weight: 600; color: var(--hb-forest); display: flex; align-items: center; gap: 8px; }
.hb-listing-row__date { color: var(--hb-gray-500); font-size: 13px; }
.hb-listing-row__actions { display: flex; gap: 6px; }
.hb-row-view { color: var(--hb-teal); font-size: 14px; }
.hb-badge-premium { font-size: 14px; }

/* Status & CPT Badges */
.hb-status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.hb-status--success { background: #d1fae5; color: #065f46; }
.hb-status--warning { background: #fef9c3; color: #854d0e; }
.hb-status--neutral { background: #f0f0f0; color: #555; }
.hb-status--danger  { background: #fee2e2; color: #b91c1c; }
.hb-cpt-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; background: var(--hb-teal-50); color: var(--hb-teal); border-radius: 999px; font-size: 12px; font-weight: 600; }

/* Empty state */
.hb-empty-state { text-align: center; padding: 60px 20px; background: #fff; border-radius: 12px; }
.hb-empty-state i { font-size: 48px; color: #ccc; display: block; margin-bottom: 16px; }
.hb-empty-state h3 { font-size: 18px; color: var(--hb-forest); margin: 0 0 8px; }
.hb-empty-state p { color: var(--hb-gray-500); margin: 0 0 24px; }

/* Premium CTA */
.hb-premium-cta { display: flex; align-items: center; gap: 20px; background: linear-gradient(135deg, #fefce8, #fef9c3); border: 1.5px solid #fde68a; border-radius: 12px; padding: 20px 24px; }
.hb-premium-cta__icon { font-size: 32px; color: #d97706; flex-shrink: 0; }
.hb-premium-cta__text { flex: 1; }
.hb-premium-cta__text strong { display: block; font-size: 15px; color: var(--hb-forest); margin-bottom: 4px; }
.hb-premium-cta__text span { font-size: 13px; color: var(--hb-gray-500); }

/* Listing Form */
.hb-form--listing .hb-form-card.hb-form-section { margin-bottom: 20px; padding: 28px; }
.hb-form--listing .hb-form-card.hb-form-section { max-width: 100%; }
.hb-section-title { font-size: 15px; font-weight: 700; color: var(--hb-forest); margin: 0 0 20px; display: flex; align-items: center; gap: 8px; }
.hb-section-title i { color: var(--hb-teal); }
.hb-form-submit-row { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; }
.hb-form-submit-row .hb-form__legal { margin: 0; text-align: left; }

/* Halal radio cards */
.hb-radio-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hb-radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid #dde3ea; border-radius: 10px; cursor: pointer; transition: all .15s; }
.hb-radio-card input[type="radio"]:checked ~ span,
.hb-radio-card input[type="radio"]:checked { accent-color: var(--hb-teal); }
.hb-radio-card.selected, .hb-radio-card:focus-within { border-color: var(--hb-teal); background: var(--hb-teal-50); }
.hb-radio-card input { margin-top: 3px; accent-color: var(--hb-teal); flex-shrink: 0; }
.hb-radio-card span strong { font-size: 13px; color: var(--hb-forest); display: block; margin-bottom: 2px; }
.hb-radio-card span small { font-size: 12px; color: var(--hb-gray-500); }

/* Responsive */
@media (max-width: 900px) {
  .hb-member-layout { grid-template-columns: 1fr; }
  .hb-member-sidebar { position: static; height: auto; }
  .hb-member-main { padding: 24px 16px; }
  .hb-form-row { grid-template-columns: 1fr; }
  .hb-radio-group { grid-template-columns: 1fr; }
  .hb-listing-table__head { display: none; }
  .hb-listing-row { grid-template-columns: 1fr; gap: 6px; }
  .hb-stat-row { grid-template-columns: 1fr 1fr 1fr; }
  .hb-form-submit-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hb-premium-cta { flex-direction: column; text-align: center; }
}

/* ══════════════════════════════════════════════
   MEDIA UPLOAD UI
══════════════════════════════════════════════ */

/* Type picker */
.hb-type-picker { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.hb-type-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border: 2px solid #dde3ea; border-radius: 10px; cursor: pointer; transition: all .15s; text-align: center; }
.hb-type-opt input { display: none; }
.hb-type-opt__icon { font-size: 28px; }
.hb-type-opt__label { font-size: 13px; font-weight: 600; color: var(--hb-forest); }
.hb-type-opt:hover { border-color: var(--hb-teal); background: var(--hb-teal-50); }
.hb-type-opt.active { border-color: var(--hb-teal); background: var(--hb-teal-50); }

/* Upload zone */
.hb-upload-zone { border: 2px dashed #ccd5dc; border-radius: 10px; padding: 28px 20px; text-align: center; cursor: pointer; transition: all .2s; color: #6b7280; }
.hb-upload-zone i { font-size: 32px; display: block; margin-bottom: 8px; color: #b0b8c1; }
.hb-upload-zone span { display: block; font-size: 14px; font-weight: 600; color: var(--hb-forest); margin-bottom: 4px; }
.hb-upload-zone small { font-size: 12px; }
.hb-upload-zone:hover, .hb-upload-zone.drag-over { border-color: var(--hb-teal); background: var(--hb-teal-50); }
.hb-upload-zone.has-file { border-color: #059669; background: #f0fdf4; }
.hb-upload-zone--small { padding: 14px; margin-top: 12px; }
.hb-upload-zone--small i { font-size: 20px; margin-bottom: 4px; }

/* Preview: featured */
.hb-preview-feat { display: block; width: 100%; max-width: 340px; border-radius: 8px; margin-top: 12px; object-fit: cover; aspect-ratio: 3/2; }
.hb-preview-single { margin-top: 0; }

/* Preview: gallery grid */
.hb-preview-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 12px; }
.hb-preview-item { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; background: #f0f0f0; }
.hb-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-upload-count { font-size: 12px; color: #6b7280; margin-top: 6px; }

/* Existing gallery */
.hb-existing-gallery { margin-bottom: 12px; }
.hb-existing-item { border: 2px solid transparent; }
.hb-existing-item[style*="opacity"] { border-color: #dc2626; }
.hb-remove-gal-btn { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; padding: 0; }
.hb-remove-gal-btn:hover { background: #dc2626; }

/* Existing featured */
.hb-existing-media { margin-bottom: 12px; }
.hb-existing-feat { display: block; width: 200px; border-radius: 8px; object-fit: cover; aspect-ratio: 3/2; margin-bottom: 8px; }
.hb-remove-check { font-size: 13px; color: #dc2626; cursor: pointer; display: flex; align-items: center; gap: 6px; }

/* YouTube preview */
.hb-yt-preview { margin-top: 8px; }

@media (max-width: 900px) {
  .hb-type-picker { grid-template-columns: repeat(2,1fr); }
  .hb-preview-grid { grid-template-columns: repeat(3,1fr); }
}
