/* v6-legacy.css — brings the remaining older screens onto the v6 charcoal system:
   club Members (players.js) + Chip bank (chipdesk.js) inside the club lobby,
   Settings & security (settings.js, V6Settings / V6Security) and the admin
   console (admin.js). Prefix lg-. */

/* ---------- shared atoms ---------- */
.lg-wrap, .lg-page, .lg-sh { font-family: Manrope, sans-serif; color: #F2EFEA; }
.lg-wrap *, .lg-page *, .lg-sh * { box-sizing: border-box; }
.lg-wrap button, .lg-page button, .lg-sh button,
.lg-page input, .lg-page select, .lg-sh input, .lg-sh select, .lg-wrap input { font-family: Manrope, sans-serif; }

.lg-skel { height: 64px; margin: 0 16px 10px; border-radius: 16px; background: #1B1B1E; border: 1px solid #26262A; }
.lg-empty { margin: 0 16px; padding: 22px 16px; border-radius: 16px; background: #1F1F22; border: 1px dashed #2E2E33; text-align: center; font-size: 13px; color: #8A8178; }
.lg-empty.in { margin: 0; border: 0; background: transparent; }

.lg-cap, .lg-sect { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 16px 8px; }
.lg-cap span, .lg-sect span { font-size: 10px; font-weight: 800; letter-spacing: 0.2em; color: #8A8178; }
.lg-cap em, .lg-sect em { font-style: normal; font-size: 11.5px; font-weight: 800; color: #E3C998; font-variant-numeric: tabular-nums; }

.lg-card { margin: 0 16px; border-radius: 16px; background: #1F1F22; border: 1px solid #2E2E33; }
.lg-list { padding: 0 14px; }

/* avatars + role pills */
.lg-av { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(255,255,255,0.16); box-shadow: inset 0 1px 0 rgba(255,255,255,0.15); font-weight: 800; color: #F2EFEA; letter-spacing: 0.02em; }
.lg-role { display: inline-block; flex-shrink: 0; font-size: 9px; font-weight: 800; letter-spacing: 0.12em; line-height: 1; color: #A79F94; border: 1px solid #3A3A40; border-radius: 5px; padding: 3px 6px; }
.lg-role.owner { color: #15120D; background: #D4B98A; border-color: #D4B98A; }
.lg-role.agent { color: #E3C998; border-color: rgba(212,185,138,0.55); background: rgba(212,185,138,0.10); }

/* list rows (Reports "top members" style) */
.lg-row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 0; border-bottom: 1px solid #26262A; color: #F2EFEA; text-decoration: none; }
.lg-row:last-child { border-bottom: 0; }
.cl-root a.lg-row, a.lg-row { color: #F2EFEA; }
.lg-row-x { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lg-row-n { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-row-n.sm { font-size: 13.5px; }
.lg-row-s { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 11.5px; color: #8A8178; white-space: nowrap; overflow: hidden; }
.lg-row-s span:not(.lg-role) { overflow: hidden; text-overflow: ellipsis; }
.lg-row-v { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 800; color: #F2EFEA; font-variant-numeric: tabular-nums; }
.lg-row-v i { font-style: normal; font-size: 11px; font-weight: 700; color: #8A8178; }
.lg-row > svg { flex-shrink: 0; }
.lg-amt { flex-shrink: 0; font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lg-amt.in { color: #22F08A; }
.lg-amt.out { color: #FF3B4E; }
.lg-dotic { flex-shrink: 0; width: 10px; height: 10px; margin: 0 6px; border-radius: 50%; background: #D4B98A; box-shadow: 0 0 0 4px rgba(212,185,138,0.14); }
.lg-mv { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.lg-mv.in { color: #22F08A; background: rgba(61,220,151,0.10); border: 1px solid rgba(61,220,151,0.35); }
.lg-mv.out { color: #FF3B4E; background: rgba(229,72,77,0.08); border: 1px solid rgba(229,72,77,0.4); }

/* stat tiles (Reports KPI row) */
.lg-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 16px; }
.lg-stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
.lg-stat { min-width: 0; padding: 11px 12px; border-radius: 14px; background: #1F1F22; border: 1px solid #2E2E33; }
.lg-stat b { display: block; font-size: 19px; font-weight: 800; color: #F2EFEA; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-stat b.gold { color: #E3C998; }
.lg-stat b.sm { font-size: 15px; line-height: 23px; }
.lg-stat span { display: block; margin-top: 3px; font-size: 11.5px; color: #8A8178; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lg-search { margin: 10px 16px 0; height: 42px; border-radius: 12px; background: #1F1F22; border: 1px solid #2E2E33; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); display: flex; align-items: center; gap: 8px; padding: 0 14px; color: #8A8178; }
.lg-search input { flex-grow: 1; min-width: 0; border: 0; background: transparent; color: #F2EFEA; font: 500 14px Manrope, sans-serif; outline: none; }

/* member detail */
.cl-root a.lg-backlink, a.lg-backlink { display: inline-flex; align-items: center; gap: 4px; margin: 2px 16px 10px; font-size: 13px; font-weight: 800; color: #E3C998; }
.lg-hero { position: relative; display: flex; align-items: center; gap: 14px; margin: 0 16px 8px; padding: 16px; border-radius: 18px; background: linear-gradient(160deg, #26262A 0%, #1C1C1F 100%); border: 1px solid #34343A; box-shadow: 0 14px 28px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06); overflow: hidden; }
.lg-hero-x { min-width: 0; flex-grow: 1; }
.lg-hero-n { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 600; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-hero-s { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; font-size: 12px; color: #A79F94; }

/* chip bank */
.lg-bank { position: relative; margin: 0 16px; padding: 14px 16px; border-radius: 18px; background: radial-gradient(120% 140% at 100% 0%, rgba(212,185,138,0.16), rgba(212,185,138,0) 60%), #1F1F22; border: 1px solid rgba(212,185,138,0.35); box-shadow: 0 14px 28px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06); }
.lg-bank-k { font-size: 10px; font-weight: 800; letter-spacing: 0.2em; color: #A79F94; }
.lg-bank-v { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 600; line-height: 1; color: #E3C998; }
.lg-bank-sub { margin-top: 8px; font-size: 11.5px; color: #8A8178; }
.lg-acts { display: flex; gap: 8px; margin: 10px 16px 0; }
.lg-btn { flex: 1; height: 46px; padding: 0 14px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.lg-btn.gold { border: 1px solid #8C7444; background: linear-gradient(180deg, #E3C998, #C9A96E); color: #15120D; box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); }
.lg-btn.red, .lg-btn.danger { border: 1px solid rgba(229,72,77,0.45); background: rgba(229,72,77,0.08); color: #F07A7A; }
.lg-btn.ghost { border: 1px solid #2E2E33; background: #1F1F22; color: #F2EFEA; }
.lg-btn.full { flex: none; width: 100%; }
.lg-btn:active { transform: translateY(1px); }
.lg-seg { display: flex; margin: 14px 16px 10px; padding: 3px; border-radius: 12px; background: #1F1F22; border: 1px solid #2E2E33; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); }
.lg-seg button { flex: 1; min-width: 0; height: 34px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: #A79F94; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.lg-seg button[aria-selected="true"] { background: rgba(212,185,138,0.16); border-color: rgba(212,185,138,0.5); color: #E3C998; }
.lg-seg .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #E5484D; color: #fff; font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* bottom sheet content (PF.sheet) */
.lg-sh { padding: 6px 16px 10px; display: flex; flex-direction: column; gap: 12px; }
.lg-shh { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 2px 2px; }
.lg-shh span { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 600; }
.lg-shh em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #8A8178; }
.lg-fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lg-fld > span { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; color: #8A8178; }
.lg-fld input, .lg-fld select { width: 100%; height: 44px; border-radius: 11px; background: #161618; border: 1px solid #2E2E33; color: #F2EFEA; padding: 0 12px; font-size: 14.5px; font-weight: 600; outline: none; -webkit-appearance: none; appearance: none; }
.lg-fld select { background-image: linear-gradient(45deg, transparent 50%, #8A8178 50%), linear-gradient(135deg, #8A8178 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.lg-fld input:focus, .lg-fld select:focus { border-color: rgba(212,185,138,0.7); }
.lg-quick { display: flex; gap: 6px; margin-top: -4px; }
.lg-quick button { flex: 1; height: 32px; border-radius: 9px; border: 1px solid #2E2E33; background: #1F1F22; color: #E3C998; font-size: 12.5px; font-weight: 800; cursor: pointer; }

/* ---------- full pages: settings + admin ---------- */
main[data-view="settings"].on, main[data-view="admin"].on { display: block; height: 100%; background: #161618; }
.lg-page { position: relative; height: 100%; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #161618; }
.lg-top { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; }
.lg-bk { flex-shrink: 0; width: 36px; height: 36px; border-radius: 18px; background: #1F1F22; border: 1px solid #2E2E33; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; }
.lg-top h1 { margin: 0; flex-grow: 1; min-width: 0; font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 600; color: #F2EFEA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-psub { flex-shrink: 0; margin: -2px 16px 0 64px; font-size: 12px; color: #8A8178; }
.lg-pscroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; overscroll-behavior: contain; padding-bottom: 28px; }
.lg-pscroll::-webkit-scrollbar { display: none; }

/* theme grid */
.lg-themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 0 16px; }
.lg-theme { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px 10px; border-radius: 14px; background: #1F1F22; border: 1px solid #2E2E33; }
.lg-theme.on { background: rgba(212,185,138,0.10); border-color: rgba(212,185,138,0.7); }
.lg-felt { width: 58px; height: 30px; border-radius: 15px; border: 3.5px solid; box-shadow: inset 0 2px 6px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.4); }
.lg-theme .n { margin-top: 4px; max-width: 100%; font-size: 11px; font-weight: 800; color: #F2EFEA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-theme .s { font-size: 10.5px; font-weight: 700; color: #8A8178; }
.lg-theme.on .s { color: #E3C998; }

/* settings card + rows */
.lg-scard { margin: 0 16px; padding: 0 14px; border-radius: 16px; background: #1F1F22; border: 1px solid #2E2E33; }
.lg-srow { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 0; border-bottom: 1px solid #26262A; }
.lg-srow:last-child { border-bottom: 0; }
.lg-srow.col { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 0; }
.lg-srow[role="button"] { cursor: pointer; }
.lg-srow-x { flex-grow: 1; min-width: 0; }
.lg-srow-x .a { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #F2EFEA; min-width: 0; }
.lg-srow-x .a.sm { font-size: 13.5px; }
.lg-srow-x .b { display: block; margin-top: 2px; font-size: 11.5px; color: #A79F94; overflow: hidden; text-overflow: ellipsis; }
.lg-srow-v { flex-shrink: 0; font-size: 12.5px; font-weight: 700; color: #A79F94; font-variant-numeric: tabular-nums; }
.lg-via { display: inline-flex; align-items: center; gap: 7px; }
.lg-this { font-size: 9px; font-weight: 800; letter-spacing: 0.12em; color: #22F08A; border: 1px solid rgba(61,220,151,0.4); border-radius: 5px; padding: 2px 5px; }
.lg-tag { font-size: 9px; font-weight: 800; letter-spacing: 0.12em; color: #E3C998; border: 1px solid rgba(212,185,138,0.5); border-radius: 5px; padding: 2px 5px; }
.lg-tag.red { color: #F07A7A; border-color: rgba(229,72,77,0.5); }
.lg-green { color: #22F08A; }
.lg-dev { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; background: rgba(212,185,138,0.10); border: 1px solid rgba(212,185,138,0.28); color: #E3C998; display: flex; align-items: center; justify-content: center; }

/* switch (V6 toggle) */
.lg-sw { flex-shrink: 0; position: relative; width: 46px; height: 26px; padding: 0; border-radius: 13px; background: #2E2E33; border: 1px solid #34343A; cursor: pointer; }
.lg-sw i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 10px; background: #8A8178; transition: left .18s ease, background .18s ease; }
.lg-sw.on { background: #D4B98A; border-color: #D4B98A; }
.lg-sw.on i { left: 22px; background: #15120D; }

.lg-segs { display: flex; padding: 3px; border-radius: 11px; background: #161618; border: 1px solid #2E2E33; }
.lg-segs button { flex: 1; min-width: 0; height: 32px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: #A79F94; font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-segs button.on { background: rgba(212,185,138,0.16); border-color: rgba(212,185,138,0.5); color: #E3C998; }

.lg-mini { flex-shrink: 0; height: 30px; padding: 0 12px; border-radius: 9px; border: 1px solid #3A3A40; background: #26262A; color: #F2EFEA; font-size: 12px; font-weight: 800; cursor: pointer; }
.lg-link { border: 0; background: transparent; padding: 0; color: #E3C998; font-size: 13px; font-weight: 800; cursor: pointer; }
.lg-link:disabled { color: #5F5A54; cursor: default; }
.lg-sublink { margin: 8px 16px 0; text-align: right; }

/* security control card (V6Security) */
.lg-ctl { display: flex; gap: 12px; align-items: flex-start; margin: 0 16px; padding: 14px; border-radius: 14px; background: #1F1F22; border: 1px solid #2E2E33; }
.lg-ic { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: rgba(212,185,138,0.10); border: 1px solid rgba(212,185,138,0.28); color: #E3C998; display: flex; align-items: center; justify-content: center; }
.lg-ctl-x { flex: 1; min-width: 0; }
.lg-ctl-x .t { font-size: 14.5px; font-weight: 800; }
.lg-ctl-x .d { margin-top: 3px; font-size: 12px; line-height: 1.4; color: #A79F94; }
.lg-ctl-x .m { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; font-weight: 700; color: #8A8178; }
.lg-ctl-x .m .ok { font-size: 10.5px; font-weight: 800; color: #22F08A; }
.lg-ctl-x .m .off { font-size: 10.5px; font-weight: 800; color: #8A8178; }
.lg-ctl-r { align-self: center; }

/* inline panes (MFA enroll, codes, delete confirm, admin grant) */
.lg-pane { display: flex; flex-direction: column; gap: 12px; margin: 8px 16px 0; padding: 14px; border-radius: 14px; background: #1B1B1E; border: 1px solid rgba(212,185,138,0.35); }
.lg-pane.solo { margin-top: 0; background: #1F1F22; border-color: #2E2E33; }
.lg-pane.danger { border-color: rgba(229,72,77,0.45); background: rgba(229,72,77,0.05); }
.lg-pane-t { font-size: 12.5px; line-height: 1.45; color: #A79F94; }
.lg-qr { align-self: center; padding: 8px; border-radius: 12px; background: #fff; line-height: 0; }
.lg-qr img { display: block; width: 170px; height: 170px; }
.lg-key { font-size: 11.5px; color: #8A8178; word-break: break-all; text-align: center; }
.lg-key code, .lg-codes code { font-family: ui-monospace, Menlo, monospace; color: #E3C998; }
.lg-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.lg-codes code { padding: 7px 8px; border-radius: 8px; background: #161618; border: 1px solid #2E2E33; font-size: 12.5px; text-align: center; }
.lg-code { display: flex; gap: 8px; align-items: flex-end; }
.lg-code .lg-fld { flex: 1; }
.lg-code .lg-btn { flex: none; height: 44px; }
.lg-fld2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }

.lg-btns { display: flex; gap: 8px; margin: 16px 16px 0; }
.lg-foot { margin: 18px 16px 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.lg-foot .v { font-size: 10.5px; font-weight: 700; letter-spacing: 0.2em; color: #8A8178; }
.lg-foot .l { font-size: 10.5px; line-height: 1.5; color: #7A7268; }

@media (max-width: 380px) {
  .lg-stat { padding: 10px; }
  .lg-stat b { font-size: 17px; }
  .lg-felt { width: 50px; }
  .lg-theme { padding-left: 2px; padding-right: 2px; }
  .lg-theme .n { font-size: 9.5px; letter-spacing: -0.01em; }
  .lg-segs button { font-size: 11.5px; }
}

/* join request actions (Members) */
.lg-mini { flex: none; height: 30px; padding: 0 12px; border-radius: 9px; font: 800 12px 'Manrope', sans-serif; cursor: pointer; margin-left: 6px; }
.lg-mini.yes { background: linear-gradient(180deg, #E7C873, #C9A162); border: 1px solid #E7C873; color: #1A1406; }
.lg-mini.no { width: 30px; padding: 0; background: #232327; border: 1px solid #2E2E33; color: #A8A29A; }

/* chip requests (Chip bank > Requests) */
.lg-seg.sm { margin: 0 16px 10px; }
.lg-bulk { display: flex; justify-content: flex-end; gap: 8px; margin: 0 16px 10px; }
.lg-mini.wide { width: auto; padding: 0 14px; }
.lg-st { padding: 1px 7px; border-radius: 5px; font: 800 9.5px 'Manrope', sans-serif; letter-spacing: .04em; }
.lg-st.p { background: rgba(231,200,115,.15); color: #E7C873; }
.lg-st.a { background: rgba(34,180,100,.15); color: #4ADE80; }
.lg-st.r { background: rgba(229,72,77,.15); color: #F87171; }
