/* =========================================================
   INPRESIVE BARBERSHOP — MOBILE MEMBER PORTAL CSS
   Clean, Modern, Mobile-First Barbershop Aesthetic
   ========================================================= */

:root {
  --bg-app: #f6f5f1;
  --bg-card: #ffffff;
  --bg-dark: #141210;
  --bg-dark-card: #1e1b18;
  --primary: #141210;
  --primary-hover: #26221e;
  --accent: #d97706;
  --accent-light: #fef3c7;
  --accent-gold: #c28b49;
  --text-main: #1c1917;
  --text-muted: #6b7280;
  --text-subtle: #9ca3af;
  --border: #e7e5e0;
  --border-focus: #d97706;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-card: 0 4px 12px rgba(20, 18, 16, 0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #eceae5;
  color: var(--text-main);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
}

/* Mobile Frame Wrapper (Max 480px) */
#appWrapper {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 30px rgba(0,0,0,0.08);
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 245, 241, 0.92);
  backdrop-filter: blur(12px);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--bg-dark);
  color: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.5px;
  border: 1px solid var(--accent);
}

.brand-text-title {
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.05em;
  color: var(--primary);
  line-height: 1.1;
}

.brand-text-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 16px 16px 88px 16px; /* 88px bottom space for nav */
  overflow-y: auto;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px calc(8px + var(--safe-bottom)) 4px;
  z-index: 90;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.04);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  transition: all 0.2s ease;
  border-radius: var(--radius-sm);
}

.nav-item .nav-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.nav-item.active {
  color: var(--accent);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
}

/* =========================================================
   VIRTUAL MEMBER CARD (EXECUTIVE & QR CODE AT TOP)
   ========================================================= */
.member-card-wrapper {
  margin-bottom: 20px;
}

.virtual-card {
  background: linear-gradient(145deg, #181512 0%, #292119 55%, #3d2f21 100%);
  border-radius: var(--radius-xl);
  padding: 20px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(24, 21, 18, 0.35);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.card-club-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #e0c9a6;
  text-transform: uppercase;
}

.card-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.tier-badge.silver {
  background: rgba(229, 231, 235, 0.2);
  color: #f3f4f6;
  border: 1px solid rgba(229, 231, 235, 0.4);
}

.tier-badge.gold {
  background: rgba(217, 119, 6, 0.28);
  color: #fef3c7;
  border: 1px solid rgba(245, 158, 11, 0.6);
}

.tier-badge.platinum {
  background: rgba(147, 51, 234, 0.28);
  color: #f3e8ff;
  border: 1px solid rgba(168, 85, 247, 0.6);
}

/* Central Static QR Code Box */
.card-qr-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 12px auto 14px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 200px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.card-qr-box:active {
  transform: scale(0.98);
}

#memberQrContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 130px;
  min-width: 130px;
}

#memberQrContainer img,
#memberQrContainer canvas {
  display: block;
  margin: 0 auto;
}

.qr-scan-instruction {
  font-size: 10px;
  font-weight: 800;
  color: #141210;
  letter-spacing: 0.06em;
  margin-top: 6px;
  text-align: center;
}

.qr-member-id-tag {
  font-size: 12px;
  font-weight: 900;
  color: #d97706;
  letter-spacing: 0.08em;
  font-family: monospace;
}

.card-bottom-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 12px;
  margin-top: 12px;
}

.card-member-name {
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.card-member-phone {
  font-size: 11.5px;
  color: #d6cfc5;
  font-family: monospace;
  margin-top: 2px;
}

/* Points & Tier Progress Section */
.points-summary-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

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

.points-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.points-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.points-unit {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-left: 4px;
}

/* Progress Bar */
.tier-progress-box {
  margin-top: 12px;
  background: var(--bg-app);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.tier-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #e2dfd9;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #b4793f, #d97706);
  border-radius: 10px;
  transition: width 0.4s ease;
}

.tier-hint {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Quick Action Grid */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.quick-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.quick-btn:active {
  transform: translateY(2px);
  border-color: var(--accent);
}

.quick-btn .btn-icon {
  font-size: 22px;
}

.quick-btn .btn-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
}

/* Section Title */
.section-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--primary);
}

/* Card Lists & Items */
.card-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.tx-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.tx-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.tx-total {
  font-size: 14px;
  font-weight: 900;
  color: var(--primary);
}

.tx-meta {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 8px;
}

.tx-services {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-app);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

/* Feedback in Transaction Card */
.feedback-box-reviewed {
  background: #fdf8f0;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
}

.admin-reply-box {
  margin-top: 6px;
  padding: 6px 10px;
  background: #f0fdf4;
  border-left: 3px solid var(--success);
  border-radius: 4px;
  font-size: 11.5px;
  color: #166534;
}

/* Form Styles */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 750;
  color: var(--text-main);
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 11px 13px;
  font-size: 13.5px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 750;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

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

.btn.primary {
  background: var(--accent);
  color: #ffffff;
}

.btn.primary:active {
  background: #b45309;
}

.btn.dark {
  background: var(--bg-dark);
  color: #ffffff;
}

.btn.dark:active {
  background: #2b2520;
}

.btn.outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-main);
}

.btn.outline:active {
  background: var(--bg-app);
}

.btn.sm {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn.block {
  width: 100%;
}

.btn.danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fca5a5;
}

/* Modal Bottom-Sheet */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px 18px calc(24px + var(--safe-bottom)) 18px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: #d1d5db;
  border-radius: 4px;
  margin: 0 auto 16px auto;
}

.modal-title {
  font-size: 17px;
  font-weight: 850;
  margin-bottom: 6px;
  color: var(--primary);
}

.modal-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

/* Star Rating Controls */
.star-rating-box {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 10px 0;
}

.star-btn {
  background: none;
  border: none;
  font-size: 32px;
  color: #d1d5db;
  cursor: pointer;
  transition: transform 0.1s ease, color 0.15s ease;
}

.star-btn.active {
  color: #f59e0b;
  transform: scale(1.1);
}

.rating-badge-preview {
  text-align: center;
  font-size: 12.5px;
  font-weight: 750;
  min-height: 24px;
  margin-bottom: 14px;
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(20, 18, 16, 0.95);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 12.5px;
  font-weight: 700;
  z-index: 200;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90%;
  text-align: center;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
}

/* Helper Utilities */
.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-center { text-align: center; }
.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; }
