/* NVM member-area + admin styles (lead). Loaded after app.css — edit here, not in app.css. */

/* Member sidebar layout (desktop): dashboard, profile, billing. Brand in sidebar, top header hidden. */
.bottomnav .bottomnav__brand,.bottomnav__sub,.profile-meta{display:none}
@media(min-width:960px){
  .is-member-side .topbar{display:none}
  .is-member-side .page{padding-top:32px}
  .is-member-side .page{padding-left:260px}
  .is-member-side .page>.wrap{width:auto;max-width:1320px;margin-inline:auto;padding-inline:clamp(24px,3vw,44px)}
  .is-member-side .bottomnav{position:fixed;z-index:24;left:0;right:auto;top:0;bottom:0;width:260px;max-width:none;margin:0;padding:22px 16px;border:0;border-right:1px solid var(--line-strong);border-radius:0;overflow-y:auto;overscroll-behavior:contain}
  .is-member-side .bottomnav__in{grid-template-columns:1fr!important;gap:5px}
  .is-member-side .bottomnav a{min-height:58px;flex-direction:row;justify-content:flex-start;gap:11px;padding:9px 12px;border-radius:13px;font-size:.95rem}
  .is-member-side .bottomnav a:hover{background:rgba(142,46,126,.1)}
  .is-member-side .bottomnav svg{width:34px;height:28px;padding:5px 8px}
  .is-member-side .bottomnav .bottomnav__brand{display:flex;align-items:center;gap:11px;min-height:0;margin:0 0 12px;padding:4px 6px 16px;border-radius:0;border-bottom:1px solid var(--line);color:var(--ink)}
  .is-member-side .bottomnav .bottomnav__brand:hover{background:none}
  .bottomnav__brand img{width:40px;height:40px;border-radius:50%;background:var(--paper);box-shadow:0 0 0 2px rgba(220,162,203,.25)}
  .bottomnav__brand span{display:flex;flex-direction:column;line-height:1.1}
  .bottomnav__brand b{font:800 .95rem var(--font-display);letter-spacing:.02em}
  .bottomnav__brand small{margin-top:3px;font-weight:600;font-size:.62rem;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}

  .is-member-profile .profile-layout{display:grid;grid-template-columns:minmax(300px,360px) minmax(0,1fr);grid-template-areas:"head form";gap:20px 24px;align-items:stretch}
  .is-member-profile .profile-meta{display:block;margin-top:22px;padding-top:20px;border-top:1px solid var(--line);text-align:left}
  .profile-meta__tags{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px}
  .profile-meta dl{display:grid;gap:10px;margin:0}
  .profile-meta dl>div{display:flex;justify-content:space-between;gap:12px;font-size:.82rem}
  .profile-meta dt{color:var(--muted)}.profile-meta dd{margin:0;font-weight:600;text-align:right}
  .profile-meta__sig{margin-top:18px}
  .profile-meta__sig span{display:block;margin-bottom:8px;color:var(--muted);font-size:.72rem;text-transform:uppercase;letter-spacing:.12em}
  .profile-meta__sig img{display:block;width:100%;height:84px;object-fit:contain;padding:10px;border-radius:14px;background:#fff}
  .profile-meta .btn{margin-top:18px}
  .is-member-profile .profile-head{grid-area:head;margin:0!important;padding:28px 20px;border:1px solid var(--line);border-radius:22px;background:var(--g-card);box-shadow:var(--shadow-1)}
  .is-member-profile .profile-form{grid-area:form;padding:26px 28px}
  .is-member-profile .profile-links{display:none}
  .is-member-profile .profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}
  .is-member-profile .profile-fields .field:first-child{grid-column:1/-1}
  .is-member-billing .page>.wrap>*,.is-member-card .page>.wrap>*,.is-member-downloads .page>.wrap>*,.is-member-password .page>.wrap>*{max-width:900px}
  .is-member-side .chat-page{padding-block:28px}
  .is-member-side .chat-wrap{max-width:1320px}
  .is-member-side .chat-card{height:calc(100dvh - 56px);max-height:none}
  .is-member-side .bottomnav__sub{display:grid;gap:2px;margin:2px 0 4px 28px;padding-left:12px;border-left:1px solid var(--line)}
  .is-member-side .bottomnav .bottomnav__sub a,.is-member-side .bottomnav__sub button{display:block;min-height:0;width:100%;padding:9px 12px;border:0;border-radius:10px;background:none;color:var(--muted);font:600 .86rem var(--font-body,inherit);text-align:left;cursor:pointer}
  .is-member-side .bottomnav .bottomnav__sub a:hover,.is-member-side .bottomnav__sub button:hover{background:rgba(142,46,126,.1);color:var(--ink)}
  .is-member-side .bottomnav .bottomnav__sub a[aria-current="page"]{color:var(--ink);background:rgba(142,46,126,.16)}
  .is-member-side .bottomnav__sub form{margin:0}
  .is-member-side .bottomnav__sub button{color:#f08a8a}
}

/* Member chat: locked state for non-active members. */
.chat-locked{max-width:560px;margin:40px auto;padding:40px 28px;text-align:center}
.chat-locked__icon{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 16px;border-radius:50%;background:var(--g-brand);box-shadow:var(--glow);color:#fff}
.chat-locked__icon svg{width:28px;height:28px}
.chat-locked h1{margin:0 0 10px}.chat-locked p{margin:0 0 22px;line-height:1.6}

/* Profile: status notice above the two columns. */
.profile-notice{margin-bottom:14px}
@media(min-width:960px){
  .is-member-profile .profile-layout:has(.profile-notice){grid-template-areas:"notice notice" "head form"}
  .is-member-profile .profile-notice{grid-area:notice;margin:0}
}

/* Mobile member header: status chip + settings on the right; greeting gear hidden (now in header). */
.topbar__status{font-size:.7rem;white-space:nowrap}
@media(max-width:959px){.is-member-dashboard .greet .icon-btn{display:none}}

/* PayPal panel: single subscribe button, no white strip; icons in hint text stay small. */
.paypal-box{max-width:420px;margin-top:10px;border-radius:10px;overflow:hidden;color-scheme:normal}
.hint svg,.small svg{width:16px;height:16px;vertical-align:-3px;flex:none}

/* Member chat: NVM Team (admin) messages stand out. */
.chat-message.is-admin .chat-bubble{border-color:#f8b018;background:linear-gradient(145deg,rgba(248,176,24,.14),rgba(248,108,0,.06))}
.chat-message.is-admin .chat-meta{color:#f8b018;opacity:1}
.chat-message.is-admin .avatar{background:linear-gradient(135deg,#f8b018,#f86c00);color:#1c0b19;font-size:.62rem}
/* Admin chat inline edit. */
.chat-edit summary{list-style:none;cursor:pointer}.chat-edit summary::-webkit-details-marker{display:none}
/* Subscription: change plan list. */
.plan-switch{display:grid;gap:10px}
.plan-switch__item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
@media(min-width:760px){.plan-switch{grid-template-columns:repeat(3,minmax(0,1fr))}.plan-switch__item{flex-direction:column;align-items:flex-start}}

/* Admin: full conversation view of member chat. */
.admin-chat{height:clamp(460px,calc(100dvh - 300px),900px)}
.admin-chat .chat-head .small{margin:4px 0 0;color:var(--muted)}
.admin-chat .chat-bubble{background:#fff;border-color:var(--line);color:var(--ink);max-width:min(78%,640px)}
.admin-chat .chat-message.is-admin .chat-bubble{background:#5e1251;border-color:#5e1251;color:#fff}
.admin-chat .chat-message.is-admin .chat-meta{color:#f8d9a0}
.admin-chat .chat-message.is-removed .chat-bubble{opacity:.55}
.chat-actions{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:8px;padding-top:6px;border-top:1px solid rgba(0,0,0,.06)}
.chat-message.is-admin .chat-actions{border-top-color:rgba(255,255,255,.15)}
.chat-actions form{margin:0;display:inline}
.chat-actions button,.chat-actions summary{padding:0;border:0;background:none;color:var(--muted);font:600 .72rem var(--font-body,inherit);cursor:pointer}
.chat-message.is-admin .chat-actions button,.chat-message.is-admin .chat-actions summary{color:#ecc9e2}
.chat-actions button:hover,.chat-actions summary:hover{text-decoration:underline}
.chat-actions details[open]{flex-basis:100%}
.chat-actions details form{display:grid;gap:6px;margin-top:6px}
.chat-actions details textarea{width:100%;min-height:70px;color:var(--ink);background:#fff}
.muted-list summary{list-style:none}.muted-list summary::-webkit-details-marker{display:none}

/* Admin members: clickable stat boxes (filters) and rows. */
.stats button.stat{appearance:none;-webkit-appearance:none;width:100%;font:inherit;text-align:left;cursor:pointer;transition:transform .15s,box-shadow .15s}
.stats button.stat:hover{transform:translateY(-2px)}
.stats button.stat.is-on{outline:3px solid var(--plum-400);outline-offset:2px}
[data-row][data-href]{cursor:pointer}
[data-row][data-href]:hover td{background:rgba(142,46,126,.06)}
[data-row] .who a{color:inherit}

/* Admin QR log: the CLEAR confirmation box looks like an input. */
.admin .qv-clear{background:#fff;color:var(--ink);border:1px solid var(--line-strong)}
.admin .qv-clear::placeholder{color:#a08c9b}
