/* Member area — admin-style shell with pink accents */

.member-body { background: #f7eef1; }

.member {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.member__sidebar {
  width: 236px;
  flex: 0 0 236px;
  background: #17121a;
  color: #cbbcc6;
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.member__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem 1.2rem;
  color: #f4efe4;
  text-decoration: none;
}
.member__brand .brand__mark { color: #e8b53c; font-size: 1.05rem; }
.member__brand-word {
  font-family: "Didot", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.86rem;
}

.member__nav { display: flex; flex-direction: column; gap: 0.15rem; }

.member__nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: none;
  border-left: 4px solid transparent;
  background: none;
  color: #cbbcc6;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1.2rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.member__nav-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.member__nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.member__nav-item[hidden] { display: none; }
.member__nav-item.is-active {
  background: linear-gradient(90deg, #c96f74, #b0566a);
  color: #fff;
  border-left-color: #ffd0d6;
}

.member__switch {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.65rem 1.2rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.member__switch[hidden] { display: none; }
.member__switch-label {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9b8d97;
  white-space: nowrap;
}
.member__switch-select {
  flex: 1 1 auto;
  min-width: 0;
  background: #231c26;
  color: #f4efe4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.member-plan { margin: 0.15rem 0 0; font-size: 0.72rem; color: #9b7d87; }
.member__titles { min-width: 0; }

.live-timer {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  background: rgba(10, 8, 12, 0.72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.member__side-foot { margin-top: auto; padding: 1rem 1.2rem 0.4rem; }
.member__back { color: #9b8d97; font-size: 0.82rem; text-decoration: none; }
.member__back:hover { color: #fff; }

/* ---------- Main ---------- */
.member__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.member__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border-bottom: 1px solid #eddfe3;
  padding: 0.9rem 1.6rem;
}

.member__title {
  font-size: 1.3rem;
  color: #b0566a;
  margin: 0;
  font-family: "Didot", Georgia, serif;
}

.member__user { display: flex; align-items: center; gap: 0.6rem; }
.member__user .member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #c96f74 center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.member__user .member-name { font-size: 0.88rem; color: #5a4148; font-weight: 600; }

.member__content { flex: 1; padding: clamp(1.1rem, 3vw, 1.8rem); }

.member-panel { display: none; }
.member-panel.is-active { display: block; }

.member-panel__head { margin-bottom: 1.2rem; }
.member-panel__head h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: #b0566a;
  margin: 0 0 0.3rem;
}
.member-panel__head p { color: #8a6d75; font-size: 0.92rem; margin: 0; }

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.member-empty {
  grid-column: 1 / -1;
  border: 2px dashed #e2c9d0;
  border-radius: 14px;
  background: #fff;
  color: #b08a94;
  text-align: center;
  padding: 3rem 1.2rem;
  font-size: 0.95rem;
}

.member-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  color: #b08a94;
  padding: 3rem 1.2rem;
  font-size: 0.95rem;
}
.member-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #e2c9d0;
  border-top-color: #c96f74;
  border-radius: 50%;
  animation: memberSpin 0.8s linear infinite;
}
@keyframes memberSpin { to { transform: rotate(360deg); } }

/* ---------- Locked VIP card (used later) ---------- */
.member-card {
  position: relative;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(120, 60, 70, 0.08);
}
.member-card__media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #f6e2dc, #f0d4d0);
}
.member-card__lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(23, 18, 26, 0.45);
  color: #fff;
  text-align: center;
  padding: 1rem;
}
.member-card__lock svg {
  width: 30px; height: 30px; fill: none; stroke: #fff;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.member-card__lock span { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .member { flex-direction: column; }
  .member__sidebar { width: 100%; flex: 0 0 auto; padding: 0.6rem 0; }
  .member__brand { padding: 0.4rem 1rem 0.8rem; }
  .member__nav { flex-direction: row; overflow: visible; gap: 0; }
  .member__nav-item {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.55rem 0.2rem;
    font-size: 0.62rem;
    letter-spacing: 0;
    border-left: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    justify-content: center;
    overflow: hidden;
  }
  .member__nav-item svg { width: 19px; height: 19px; }
  .member__nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .member__nav-item.is-active { border-bottom-color: #ffd0d6; }
  .member__side-foot { display: none; }
  .member__switch { padding: 0.5rem 1rem; margin-top: 0.2rem; }
}
/* ---------- Account menu ---------- */
.member__account { position: relative; }

.member__user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: 1px solid #eddfe3;
  border-radius: 999px;
  padding: 0.28rem 0.7rem 0.28rem 0.28rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.member__user:hover { border-color: #d9b7c0; background: #fdf7f5; }

.member-caret { color: #b08a94; font-size: 0.66rem; line-height: 1; }

.member__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 170px;
  background: #fff;
  border: 1px solid #eddfe3;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(120, 60, 70, 0.18);
  padding: 0.35rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.member__menu[hidden] { display: none; }

.member__menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.88rem;
  color: #5a4148;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.member__menu-item:hover { background: #f7eef1; color: #b0566a; }

/* ---------- Locked feature panel ---------- */
.member-locked {
  background: #fff;
  border: 1px solid #eddfe3;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(120, 60, 70, 0.08);
  text-align: center;
  padding: clamp(2rem, 6vw, 3.5rem) 1.4rem;
  max-width: 560px;
}
.member-locked svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: #c96f74;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 0.6rem;
}
.member-locked h3 { color: #b0566a; font-size: 1.35rem; margin: 0 0 0.4rem; }
.member-locked p { color: #8a6d75; font-size: 0.95rem; margin: 0 0 1.3rem; }

/* Content cards inside the tabs */
.member-card { cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.member-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(120, 60, 70, 0.16); }
.member-card__media { position: relative; }
.member-card__play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
}
.member-card__body { padding: 0.9rem 1rem 1.1rem; }
.member-card__badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}
.member-card__badge.is-free { background: rgba(201, 111, 116, 0.16); color: #b0566a; }
.member-card__badge.is-vip { background: #17121a; color: #f3b6b6; }
.member-card__title { font-size: 1.05rem; color: #43282e; margin: 0 0 0.25rem; }
.member-card__caption { color: #8a6d75; font-size: 0.85rem; margin: 0 0 0.5rem; }
.member-card__meta { color: #b0566a; font-size: 0.78rem; letter-spacing: 0.03em; }
.member-card__date { color: #a49e90; font-size: 0.75rem; letter-spacing: 0.02em; margin: 0 0 0.55rem; }

/* ---------- Uploader (admins) ---------- */
.upload-form { display: flex; flex-direction: column; gap: 0.9rem; max-width: 560px; }
.upload-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.upload-row .field { flex: 1 1 180px; }
.field__hint { color: #8a6d75; font-size: 0.8rem; }
.upload-form select {
  width: 100%;
  border: 1px solid rgba(176, 86, 106, 0.28);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  color: #2a1c20;
  background: #fdf7f5;
}
.upload-form select:focus {
  outline: none;
  border-color: #c96f74;
  box-shadow: 0 0 0 3px rgba(201, 111, 116, 0.18);
}
.upload-form input[type="file"] { font-size: 0.85rem; color: #7a4b4b; }
.upload-preview { border-radius: 12px; overflow: hidden; max-width: 320px; }
.upload-preview img, .upload-preview video { width: 100%; display: block; }

.member-card__del {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(23, 18, 26, 0.72);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.member-card__del:hover { background: #c0392b; }

.member-card__tier {
  display: inline-block;
  margin-top: 0.55rem;
  border: 1px solid rgba(176, 138, 148, 0.55);
  background: rgba(201, 111, 116, 0.1);
  color: #8c4a56;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.member-card__tier:hover { background: rgba(201, 111, 116, 0.2); }
.member-card__tier:disabled { opacity: 0.5; cursor: default; }
.member-card__tier.is-danger {
  color: #b03a3a;
  border-color: rgba(176, 58, 58, 0.45);
  background: rgba(176, 58, 58, 0.08);
}
.member-card__tier.is-danger:hover { background: rgba(176, 58, 58, 0.18); }
.member-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.member-card__actions .member-card__tier { margin-top: 0; }

/* Top bar: "Back to Home" next to the account */
.member__account { display: flex; align-items: center; gap: 0.6rem; }
.member__home {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #b08a94;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
}
.member__home svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.member__home:hover { color: #b0566a; background: #f7eef1; }

/* Bottom: "Back to Home" on every tab */
.member__backbar { margin-top: 2.2rem; text-align: center; }
.member-back-home {
  display: inline-block;
  color: #b0566a;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid #e2c9d0;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.member-back-home:hover { background: #b0566a; color: #fff; border-color: #b0566a; }

@media (max-width: 640px) {
  .member__topbar { padding: 0.7rem 0.9rem; gap: 0.5rem; }
  .member__title { font-size: 1.05rem; }
  .member__account { gap: 0.4rem; }
  .member__home { font-size: 0.74rem; padding: 0.28rem 0.45rem; gap: 0.28rem; }
  .member__home svg { width: 14px; height: 14px; }
}

/* ---------- Home layout (admins) ---------- */
.home-layout { display: flex; flex-direction: column; gap: 0.65rem; }
.home-layout__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #eddfe3;
  border-radius: 14px;
  padding: 0.6rem 0.7rem;
  box-shadow: 0 8px 22px rgba(120, 60, 70, 0.06);
}
.home-layout__row.is-pinned { border-color: #c96f74; }
.home-layout__thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: #f3e6e2 center/cover no-repeat;
  flex: 0 0 auto;
}
.home-layout__body { flex: 1 1 180px; min-width: 0; }
.home-layout__title {
  margin: 0;
  color: #43282e;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-layout__meta { color: #8a6d75; font-size: 0.75rem; margin: 0.15rem 0 0; }
.home-layout__badge {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #b0566a;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.home-layout__actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.3rem; flex-wrap: wrap; }
.home-layout__btn {
  border: 1px solid rgba(176, 86, 106, 0.28);
  background: #fdf7f5;
  color: #7a4b4b;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.home-layout__btn:hover { border-color: #c96f74; color: #b0566a; }
.home-layout__btn:disabled { opacity: 0.35; cursor: default; }
.home-layout__btn.is-pin { border-color: #c96f74; color: #b0566a; }
.home-layout__empty { color: #8a6d75; font-size: 0.9rem; margin: 0.2rem 0; }
.member-panel__shortcut {
  display: inline-block;
  margin-top: 0.55rem;
  border: 1px solid #c96f74;
  background: #fff;
  color: #b0566a;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.member-panel__shortcut:hover { background: #b0566a; color: #fff; }
