
html {
  min-height: 100%;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #1a1a1a;
  color: #1a1a1a;
  margin: 0;
  min-height: 100vh;
}
/* ── Auth pages (login, signup, forgot password) ──────────── */
.member_page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(127deg, #5d0505 0%, #000000 50%, #893232 100%);
 

}

.member_card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}

.member_card_wide {
  max-width: 780px;
}

.member_card_header {
  background-color: #1a1a1a;
  padding: 32px 40px 24px 40px;
  text-align: center;
}

.member_logo {
  height: 50px;
  margin-bottom: 16px;
}

.member_card_header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.member_card_header p {
  font-size: 13px;
  color: #aaaaaa;
}

.member_card_body {
  padding: 32px 40px;
}

.member_section_label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #999;
  margin: 20px 0 12px 0;
}

.member_section_label:first-child {
  margin-top: 0;
}

.optional {
  font-size: 11px;
  color: #aaa;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.member_row {
  display: flex;
  gap: 16px;
}

.member_row .member_field {
  flex: 1;
}

.member_field {
  margin-bottom: 16px;
}

.member_field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.member_field input,
.member_field select,
.member_field textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  color: #1a1a1a;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.member_field input:focus,
.member_field select:focus,
.member_field textarea:focus {
  border-color: #b60000;
  background: #fff;
}

.member_field textarea {
  resize: vertical;
  min-height: 100px;
}
.member_email_hint {
  font-size: 12px;
  color: #888;
  margin: -8px 0 16px 0;
}
.member_btn {
  width: 100%;
  padding: 12px;
  background-color: #b60000;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s;
}

.member_btn:hover   { opacity: 0.88; }
.member_btn:disabled { opacity: 0.6; cursor: not-allowed; }

.member_links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 13px;
  color: #888;
}

.member_links a {
  color: #b60000;
  text-decoration: none;
  font-weight: 600;
}

.member_links a:hover { text-decoration: underline; }

/* ── Portal page background wrapper ──────────────────────── */
.member_portal_page {
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #5b2929 0%, #2d0000 50%, #893232 100%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}


/* ── Portal layout (dashboard, track, book, messages) ─────── */
.member_portal_cont {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 1200px;
}

.member_sidebar {
  width: 220px;
  min-width: 220px;
  background-color: #1a1a1a;
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar_logo {
  height: 44px;
  margin: 0 auto 32px auto;
  display: block;
}

.sidebar_link {
  display: block;
  padding: 14px 24px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.sidebar_link:hover,
.sidebar_link.active {
  background-color: #b60000;
  color: #ffffff;
}

.sidebar_logout {
  margin: auto 16px 0 16px;
  padding: 10px;
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.sidebar_logout:hover {
  border-color: #b60000;
  color: #b60000;
}

.member_content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  background-color: #f4f4f4;
  min-width: 0;
}

.member_content_header {
  margin-bottom: 24px;
}

.member_content_header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.member_content_header p {
  font-size: 13px;
  color: #888;
}

/* ── Cards ────────────────────────────────────────────────── */
.member_form_card,
.member_info_card {
  background: #fff;
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  margin-bottom: 24px;
}

.member_info_card h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #999;
  margin-bottom: 16px;
}

/* ── Reward cards ─────────────────────────────────────────── */
.rewards_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.reward_card {
  background: #f1f1f1;;
  border-radius: 10px;
  border-left: 5px solid #b60000;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.reward_card.expired   { border-left-color: #999; opacity: 0.6; }
.reward_card.redeemed  { border-left-color: #4CAF50; }

.reward_card_label {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.reward_card_expiry {
  font-size: 11px;
  color: #b60000;
  font-weight: 600;
  margin-bottom: 4px;
}

.reward_card_status {
  font-size: 11px;
  color: #888;
}

/* ── Milestone progress bar ───────────────────────────────── */
.milestone_bar_cont {
  background: #fff;
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  margin-bottom: 24px;
}

.milestone_bar_cont h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #999;
  margin-bottom: 16px;
}

.milestone_steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 10px;
}

.milestone_step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background-color: #ddd;
  flex-shrink: 0;
}

.milestone_step.done { background-color: #b60000; }

.milestone_line {
  flex: 1;
  height: 4px;
  background-color: #ddd;
}

.milestone_line.done { background-color: #b60000; }

.milestone_caption {
  font-size: 12px;
  color: #888;
  margin-top: 8px;
}

/* ── Appointment track cards ──────────────────────────────── */
.track_card {
  background: #fff;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.track_card_info p {
  font-size: 13px;
  color: #555;
  margin: 2px 0;
}

.track_badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ── Locked reward card ───────────────────────────────────── */
.reward_card.locked {
  border-left: 5px solid #999;
  background: #f1f1f1;
  opacity: 0.85;
  text-align: center;
  padding: 20px;
  margin-bottom: 20px;
}

.reward_lock_icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.reward_unlock_hint {
  font-size: 11px;
  color: #b60000;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 6px 0 8px 0;
  background: #fff0f0;
  border-radius: 20px;
  padding: 3px 10px;
  display: inline-block;
}

/* ── Booking hint ─────────────────────────────────────────── */
.book_reward_hint {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
  line-height: 1.5;
}

.badge_included   { background: #e8f5e9; color: #2e7d32; }
.badge_excluded   { background: #f5f5f5; color: #777; }
.badge_pending    { background: #fff8e1; color: #f59e0b; }
.badge_missing    { background: #fce4e4; color: #b60000; }
.badge_working    { background: #fff3e0; color: #e65100; }
.badge_upcoming   { background: #e3f2fd; color: #1565c0; }
.badge_redemption { background: #f3e5f5; color: #6a1b9a; }

@media (max-width: 768px) {
  .member_row         { flex-direction: column; gap: 0; }
  .member_card_body   { padding: 24px 20px; }
  .member_card_header { padding: 24px 20px 18px 20px; }
  .member_portal_cont { flex-direction: column; max-width: 100%; }
  .member_content     { padding: 20px 16px; }

  /* ── Mobile bottom nav bar ──────────────────────────── */
  .member_sidebar {
    width: 100%;
    min-width: unset;
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 0;
    background-color: #1a1a1a;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
    height: 64px;
    align-items: stretch;
  }

  .sidebar_logo { display: none; }

  .sidebar_link {
    flex: 1;
    padding: 0;
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
    text-align: center;
    line-height: 1.2;
  }

  .sidebar_link::before {
    font-size: 20px;
    display: block;
  }

  .sidebar_link[href="/member/dashboard"]::before  { content: "🏠"; }
  .sidebar_link[href="/member/track"]::before      { content: "📋"; }
  .sidebar_link[href="/member/book"]::before       { content: "📅"; }
  .sidebar_link[href="/member/messages"]::before   { content: "💬"; }

  .sidebar_link:hover,
  .sidebar_link.active {
    background-color: rgba(182, 0, 0, 0.2);
    color: #ff4444;
  }

  .sidebar_logout {
    flex: 0 0 auto;
    width: 64px;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-left: 1px solid rgba(255,255,255,0.08);
    border-radius: 0;
    color: rgba(255,255,255,0.4);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: color 0.2s, background 0.2s;
  }

  .sidebar_logout::before {
    content: "🚪";
    font-size: 20px;
    display: block;
  }

  .sidebar_logout:hover {
    background: rgba(182,0,0,0.2);
    color: #ff4444;
    border-color: transparent;
  }

  /* Add padding so content doesn't hide behind fixed nav */
  .member_content {
    padding-bottom: 80px;
  }
}