/* ============================================================
   LAVISH AVENUE MANILA — CLEANED PRODUCTION CSS
   ============================================================ */

/* Core theme colors */
:root {
  --bg: #2B1E12;
  --panel: #3A2A1D;
  --card: #4A3827;
  --accent: #C8A951;
  --muted: #F2E9D0;
  --gold: #d4af37;
  --soft-border: rgba(200,169,81,0.18);
}

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Montserrat:wght@300;400;500;600&display=swap');

* { box-sizing: border-box; }
body {
  margin:0;
  background: var(--bg);
  color: var(--muted);
  font-family: 'Montserrat', sans-serif;
}

/* ============================================================
   SIDEBAR (ADMIN ONLY)
   ============================================================ */
.sidebar {
  width: 270px;
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  background: var(--panel);
  padding: 25px;
  border-right: 1px solid var(--soft-border);
  display:flex;
  flex-direction:column;
  align-items:center;
  z-index: 9000;
}
.sidebar-logo-img {
  width: 260px;
  margin: 20px auto 30px;
}
.welcome-line {
  border:0;
  border-top:1px solid #5a4633;
  margin:20px 0;
  width:100%;
}

.nav-item {
  background: none;
  border:none;
  width:100%;
  padding:10px 0;
  color: var(--muted);
  cursor:pointer;
  text-align:left;
  border-radius:6px;
  margin:4px 0;
}
.nav-item:hover { color: var(--gold); background: rgba(212,175,55,0.03); }
.nav-active { color: var(--gold); font-weight:600; background: rgba(212,175,55,0.06); }

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.main { margin-left:300px; padding:25px; }

.top-center-logo {
  width: 380px;
  display:block;
  margin:30px auto 40px;
}

/* ============================================================
   HEADINGS
   ============================================================ */
h1,h2,h3 {
  font-family: 'Playfair Display', serif;
  color: var(--accent);
  margin-top:0;
}

/* ============================================================
   INPUTS & BUTTONS
   ============================================================ */
input, select {
  width:100%;
  padding:10px;
  margin:5px 0;
  background:#2f2218;
  border:1px solid var(--soft-border);
  color:var(--muted);
  border-radius:6px;
  font-size:14px;
}

button {
  background: var(--accent);
  border:none;
  padding:10px 18px;
  margin-top:8px;
  color:#2B1E12;
  font-weight:700;
  cursor:pointer;
  border-radius:6px;
}
button:hover { background: var(--gold); }

/* ============================================================
   MEMBER LIST + MEMBER CARDS
   ============================================================ */
#member-list,
#member-list-balance {
  padding:12px;
  border:1px solid var(--soft-border);
  border-radius:12px;
  max-height:420px;
  overflow-y:auto;
  background: rgba(255,255,255,0.02);
}

.member-card {
  background: var(--card);
  padding:12px 16px;
  border:1px solid var(--soft-border);
  border-radius:8px;
  margin-bottom:10px;
  cursor:pointer;
  transition: transform 0.15s, background 0.15s;
}
.member-card:hover {
  background:#5a4430;
  border-color: rgba(200,169,81,0.45);
  transform: translateY(-2px);
}
.member-card-title { font-size:16px; font-weight:600; color:#f2e6c9; }

/* MATCH SELECTED MEMBER BADGE */
.member-card-tier {
  margin-top:8px;
}

/* ============================================================
   TIER BADGES (GLOBAL)
   ============================================================ */
.tier-badge {
  display:inline-block;
  padding:6px 14px;
  border-radius:18px;
  font-weight:700;
  font-size:0.82rem;
  min-width:90px;
  text-align:center;
}
.tier-gold {
  background: linear-gradient(180deg,#d6b24a,#c79f2e);
  color:#2b1d13;
}
.tier-platinum {
  background: linear-gradient(180deg,#f1f1f1,#dcdcdc);
  color:#1b1b1b;
}
.tier-diamond {
  background: linear-gradient(180deg,#9ff0ff,#00eaff);
  color:#052028;
}

/* ============================================================
   SELECTED MEMBER PANEL
   ============================================================ */
#selected-member {
  background: var(--panel);
  padding:12px;
  border:1px solid var(--soft-border);
  border-radius:6px;
}

.selected-member-row {
  display:flex;
  gap:18px;
  margin-bottom:20px;
}

/* Right-side change tier box */
.selected-member-right {
  flex:0 0 250px;
  background:rgba(0,0,0,0.1);
  padding:14px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.08);
}
.tier-select { margin-bottom:10px; }

/* ============================================================
   TABLES (Logs)
   ============================================================ */
table { width:100%; border-collapse:collapse; background:var(--panel); border-radius:6px; }
table th {
  background:#4A3827;
  padding:10px;
  color:var(--accent);
  text-align:left;
  font-family:'Playfair Display', serif;
}
table td {
  padding:8px;
  border-top:1px solid rgba(200,169,81,0.12);
}

/* ============================================================
   CHANGE PIN BOX
   ============================================================ */
.change-pin-box {
  margin-top:12px;
  background:rgba(255,255,255,0.04);
  padding:12px;
  border-radius:10px;
  border:1px solid rgba(200,169,81,0.12);
}

/* ============================================================
   USER MANAGEMENT — Compact List
   ============================================================ */
.user-card {
  background: var(--panel);
  padding:14px;
  border-radius:10px;
  border:1px solid var(--soft-border);
  margin-bottom:12px;
}
.user-card h4 { margin:0 0 6px 0; color:var(--gold); }
.user-card small { color:#e6d7ad; }

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
#global-loading {
  position:fixed;
  top:0; left:0;
  width:100%; height:100%;
  background:rgba(0,0,0,0.7);
  backdrop-filter:blur(3px);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

/* ============================================================
   MOBILE RESPONSIVE
   Simplified but all important rules preserved
   ============================================================ */
@media (max-width:768px){
  .sidebar-logo-img {
    width: 70%;
    height: auto;
    margin: 10px auto 25px;
  }

  #mobile-menu-btn {
    position:fixed;
    top:12px; left:12px;
    z-index:9999;
    font-size:28px;
    color:var(--gold);
    background:rgba(0,0,0,0.35);
    padding:8px 12px;
    border-radius:8px;
  }

  .sidebar {
    left:-260px;
    transition:left 0.3s ease;
    width:230px;
  }
  .sidebar.sidebar-open { left:0; }

  .main { margin-left:0; padding:18px; }

  .top-center-logo { width:260px; }

  .selected-member-row { flex-direction:column; }
  .selected-member-right { width:100%; }
}

/* Header separator line below the logo */
.header-separator {
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin: 10px 0 25px 0;
}

/* USER LIST CARDS */
.user-list {
  margin-top: 20px;
  max-width: 750px;
}

.user-item {
  background: var(--card);
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid rgba(200,169,81,0.18);
  margin-bottom: 12px;
}

.user-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
}

.user-item-sub {
  font-size: 13px;
  color: var(--muted);
}

.pin-edit-btn {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
}

/* Collapsible pin input fields */
.user-pin-box {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border: 1px solid rgba(200,169,81,0.14);
}

/* Make Update Balance list match the main Members list */
.balance-member-list-wrapper {
  max-width: 650px;   /* match your real membership list width */
  width: 100%;
}

/* Remove any inline overrides & unify height with main list */
#member-list-balance {
  padding: 12px;
  max-height: 420px !important;
  width: 100% !important;
  overflow-y: auto;
}

/* ============================================================
   CLEAN SELECTED MEMBER PANEL
   ============================================================ */

.selected-member-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  margin-top: 20px;
  margin-bottom: 14px;
}

/* Entire group */
.selected-member-panel {
  display: flex;
  gap: 22px;
  background: var(--panel);
  border: 1px solid var(--soft-border);
  padding: 18px;
  border-radius: 12px;
  align-items: flex-start;
}

/* Left side (member details) */
.selected-member-left { flex: 1; }

.selected-member-box {
  background: var(--card);
  border: 1px solid var(--soft-border);
  padding: 14px;
  border-radius: 10px;
}

.selected-member-actions {
  margin-top: 12px;
}

.selected-tier-display {
  margin-top: 10px;
}

/* Right side (change tier) */
.clean-tier-box {
  width: 260px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 18px;
  border-radius: 12px;
}

.clean-tier-box h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-family: 'Playfair Display', serif;
  color: var(--accent);
}

.clean-tier-box select {
  width: 100%;
  margin-bottom: 12px;
}

.clean-tier-box button {
  width: 100%;
}

/* Balance Panel Selected Member */
#selected-member-balance {
  background: var(--card);
  padding: 14px;
  border: 1px solid var(--soft-border);
  border-radius: 10px;
  font-size: 15px;
}