/* ================================================
   CONSORCIADO PANEL – Responsive Styles
   ================================================ */

/* ── LOGIN ── */
.member-login {
  min-height: 100dvh;
  background: linear-gradient(160deg, #1A1209 0%, #2C1F0A 55%, #1A1209 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  position: relative;
  overflow-y: auto;
}
.member-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 30%, rgba(201,168,76,.12), transparent);
  pointer-events: none;
}
.member-login-box {
  position: relative;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 24px;
  padding: 36px 28px;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.member-login-logo { text-align: center; margin-bottom: 32px; }
.member-login-logo .logo-gems { font-size: 44px; margin-bottom: 10px; display: block; }
.member-login-logo h1 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--white);
}
.member-login-logo h1 span { color: var(--gold); }
.member-login-logo p { font-size: 11px; color: rgba(255,255,255,.35); margin-top: 4px; letter-spacing: .5px; }

.login-form .form-label { color: rgba(255,255,255,.55); }
.login-form .form-control {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.11);
  color: var(--white);
}
.login-form .form-control::placeholder { color: rgba(255,255,255,.22); }
.login-form .form-control:focus { border-color: var(--gold); background: rgba(255,255,255,.11); }

/* ── APP SHELL ── */
.member-app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

/* ── MOBILE HEADER ── */
.mobile-header {
  background: var(--dark);
  padding: 14px 18px;
  padding-top: max(14px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 100;
}
.mobile-logo {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}
.mobile-logo span { color: var(--gold); }
.mobile-header-right { display: flex; align-items: center; gap: 8px; }
.mobile-avatar {
  width: 34px; height: 34px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  flex-shrink: 0;
}

/* ── SCROLLABLE CONTENT ── */
.member-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 14px;
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
  background: #F4F0E8;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  /* On very large screens, center nicely */
  align-self: center;
  align-self: stretch;
}

/* ── SECTIONS ── */
.member-section { display: none; }
.member-section.active { display: block; animation: fadeUp .3s ease; }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  flex-shrink: 0;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 9px 4px;
  cursor: pointer;
  transition: var(--transition);
  color: rgba(255,255,255,.38);
  border: none;
  background: none;
  gap: 3px;
  min-height: 56px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.bottom-nav-item .nav-emoji { font-size: 20px; line-height: 1; }
.bottom-nav-item .nav-label { font-size: 10px; font-weight: 600; letter-spacing: .2px; }
.bottom-nav-item.active { color: var(--gold); }

/* ── HERO CARD ── */
.hero-card {
  background: linear-gradient(135deg, var(--dark), var(--dark2));
  border-radius: 20px;
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  color: var(--white);
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -15%;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(201,168,76,.18), transparent);
  pointer-events: none;
}
.hero-greeting { font-size: 12px; color: rgba(255,255,255,.45); margin-bottom: 3px; }
.hero-name     { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 900; margin-bottom: 18px; }
.hero-stats    { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-stat-label { font-size: 9px; color: rgba(255,255,255,.38); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.hero-stat-value { font-size: 17px; font-weight: 700; }
.hero-stat-value.gold { color: var(--gold); }
.hero-badge {
  position: absolute;
  top: 18px; right: 16px;
  background: rgba(201,168,76,.18);
  border: 1px solid rgba(201,168,76,.36);
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .4px;
}

/* ── PROGRESS SECTION ── */
.progress-section {
  background: var(--white);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.progress-title  { font-size: 13px; font-weight: 700; }
.progress-percent{ font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 900; color: var(--gold); }
.progress-bar-lg { height: 11px; background: var(--light); border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.progress-fill-lg {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  border-radius: 6px;
  transition: width 1s ease;
}
.progress-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--mid); }

/* ── QUICK ACTIONS ── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.quick-action-btn {
  background: var(--white);
  border-radius: 12px;
  padding: 14px 6px;
  text-align: center;
  cursor: pointer;
  border: 1px solid rgba(201,168,76,.1);
  box-shadow: var(--shadow);
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.quick-action-btn:active { transform: scale(.96); border-color: var(--gold); }
.quick-action-btn .qa-icon  { font-size: 20px; margin-bottom: 5px; }
.quick-action-btn .qa-label { font-size: 9px; font-weight: 600; color: var(--mid); letter-spacing: .2px; }

/* ── PAYMENT ITEMS ── */
.payment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--light);
  gap: 10px;
}
.payment-item:last-child { border-bottom: none; }
.payment-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.payment-icon.paid    { background: rgba(76,175,122,.14); }
.payment-icon.pending { background: rgba(201,168,76,.14); }
.payment-info { flex: 1; min-width: 0; }
.payment-label { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.payment-date  { font-size: 11px; color: var(--mid); }
.payment-amount { font-weight: 700; font-size: 13px; white-space: nowrap; }
.payment-amount.paid    { color: var(--success); }
.payment-amount.pending { color: var(--gold-dark); }

/* ── CONTRACT ── */
.contract-card {
  background: var(--white);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
}
.contract-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid var(--light);
  font-size: 13px;
  gap: 8px;
}
.contract-row:last-child { border-bottom: none; }
.contract-row-label { color: var(--mid); flex-shrink: 0; }
.contract-row-value { font-weight: 600; text-align: right; word-break: break-word; }

/* ── CONTEMPLATION BANNER ── */
.contemplation-banner {
  background: linear-gradient(135deg, #1a5a2e, #2d8a50);
  border-radius: 16px;
  padding: 18px;
  color: var(--white);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.cont-icon   { font-size: 32px; flex-shrink: 0; }
.cont-title  { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.cont-desc   { font-size: 12px; opacity: .8; }
.cont-credit { font-size: 20px; font-weight: 900; color: #7FE8A0; margin-top: 4px; }

/* ── PIX MODAL ── */
.pix-card {
  background: var(--dark);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  color: var(--white);
}
.pix-qr {
  width: 140px; height: 140px;
  background: var(--white);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 16px auto;
  font-size: 11px;
  color: var(--mid);
  position: relative;
  overflow: hidden;
}
.pix-qr::after {
  content: '⬛⬛⬛\A⬛⬜⬛\A⬛⬛⬛';
  white-space: pre;
  font-size: 18px;
  line-height: 1.4;
  color: var(--dark);
}
.pix-key {
  background: rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 11px;
  font-size: 12px;
  word-break: break-all;
  margin: 10px 0;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.13);
  transition: var(--transition);
}
.pix-key:hover { background: rgba(255,255,255,.15); }

/* ── NOTIFICATION ITEMS ── */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--white);
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: var(--transition);
}
.notif-item:hover { transform: translateX(3px); }
.notif-item.unread { border-left: 4px solid var(--gold); }
.notif-icon-wrap { width: 36px; height: 36px; border-radius: 50%; background: rgba(201,168,76,.14); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.notif-body  { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.notif-text  { font-size: 11px; color: var(--mid); line-height: 1.5; }
.notif-time  { font-size: 10px; color: var(--mid); margin-top: 4px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Wide screens: cap content width and center */
@media (min-width: 641px) {
  .member-content {
    padding-left: 24px;
    padding-right: 24px;
  }
  .hero-name { font-size: 24px; }
  .hero-stat-value { font-size: 20px; }
}

/* Mobile medium */
@media (max-width: 480px) {
  .member-login-box { padding: 28px 20px; }
  .hero-card { padding: 18px 16px; }
  .hero-name { font-size: 18px; margin-bottom: 14px; }
  .hero-stat-value { font-size: 15px; }
  .hero-badge { font-size: 9px; padding: 4px 9px; top: 14px; right: 12px; }
  .progress-section { padding: 16px; }
  .contract-card { padding: 16px; }
}

/* Mobile small (≤380px) → quick actions 2 cols */
@media (max-width: 380px) {
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .member-login-box { padding: 24px 16px; }
  .hero-card { padding: 16px 14px; }
  .bottom-nav-item .nav-emoji { font-size: 18px; }
  .bottom-nav-item .nav-label { font-size: 9px; }
}

/* Very small (≤320px) */
@media (max-width: 320px) {
  .hero-stats { grid-template-columns: 1fr; gap: 10px; }
  .hero-badge { display: none; }
  .cont-icon  { display: none; }
  .member-content { padding-left: 10px; padding-right: 10px; }
}
