/* assets/pages/perms/perms.css */

:root {
  --lp2-border: rgba(255, 255, 255, 0.08);
  --lp2-soft: rgba(255, 255, 255, 0.06);
  --lp2-soft2: rgba(255, 255, 255, 0.04);
}

.navSpacer {
  height: 12px;
}
.homeButton--solo {
  margin-bottom: 6px;
}

.permsPage {
  padding-top: 18px;
}
.permsHeader {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}
.permsTitle {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.2px;
}
.permsSubtitle {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
}
.permsHeaderRight {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.permsField {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.permsLabel {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.35px;
  color: rgba(255, 255, 255, 0.65);
}

.topActions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.seg {
  display: flex;
  border: 1px solid var(--lp2-border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}
.segBtn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  padding: 10px 14px;
  font-weight: 950;
  cursor: pointer;
}
.segBtn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.lp2 {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
  min-height: 720px;
}
.lp2Nav {
  border: 1px solid var(--lp2-border);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.lp2Tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.lp2Tab {
  flex: 1;
  border: 1px solid var(--lp2-border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 10px 10px;
  font-weight: 950;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}
.lp2Tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.lp2SearchRow {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.lp2SearchRow input {
  flex: 1;
}

.lp2List {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--lp2-border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  padding: 6px;
}
.lp2Item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
}
.lp2Item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.lp2Item.active {
  background: rgba(255, 255, 255, 0.11);
}
.lp2ItemTitle {
  font-weight: 950;
}
.lp2ItemSub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 3px;
}
.lp2ItemRight {
  display: flex;
  gap: 8px;
  align-items: center;
}
.lp2Chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--lp2-border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.lp2Hint {
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.58);
}

.lp2Main {
  border: 1px solid var(--lp2-border);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.serverPick {
  padding: 12px;
}
.serverPick .card {
  border-radius: 18px;
}
.lp2MainHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--lp2-border);
  background: rgba(255, 255, 255, 0.03);
}
.lp2SelTitle {
  font-size: 18px;
  font-weight: 1000;
}
.lp2SelMeta {
  margin-top: 4px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.65);
}
.lp2HeadBtns {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lp2MainTabs {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--lp2-border);
}
.lp2MainTab {
  border: 1px solid var(--lp2-border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 9px 12px;
  font-weight: 950;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}
.lp2MainTab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.lp2Panel {
  padding: 12px;
  overflow: auto;
  flex: 1;
}
.lp2Cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lp2Card {
  padding: 12px;
}
.lp2CardTitle {
  font-weight: 1000;
  margin-bottom: 10px;
}
.lp2Grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lp2Preview {
  margin-top: 12px;
}

.lp2Toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.lp2ToolbarLeft {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.lp2ToolbarLeft input {
  min-width: 220px;
}

.lp2Table {
  width: 100%;
  border-collapse: collapse;
}
.lp2Table th {
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--lp2-border);
  font-size: 12.5px;
  letter-spacing: 0.25px;
}
.lp2Table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}
.lp2PermNode {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12.5px;
}
.lp2PermActions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.lp2BadgeTrue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(69, 255, 147, 0.12);
  border: 1px solid rgba(69, 255, 147, 0.22);
  font-weight: 950;
}
.lp2BadgeFalse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 99, 99, 0.12);
  border: 1px solid rgba(255, 99, 99, 0.22);
  font-weight: 950;
}
.lp2BadgeUnset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--lp2-border);
  font-weight: 950;
  color: rgba(255, 255, 255, 0.75);
}

.inheritList,
.metaList,
.historyList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rowLine {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--lp2-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}
.rowLine .left {
  display: flex;
  flex-direction: column;
}
.rowLine .title {
  font-weight: 950;
}
.rowLine .sub {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}
.rowLine .right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lp2Modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}
.lp2Modal[aria-hidden="false"] {
  display: flex;
}
.lp2ModalCard {
  width: min(760px, 100%);
  border-radius: 18px;
  border: 1px solid var(--lp2-border);
  background: rgba(18, 22, 30, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.lp2ModalHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px;
  border-bottom: 1px solid var(--lp2-border);
}
.lp2ModalTitle {
  font-weight: 1000;
}
.lp2ModalBody {
  padding: 12px;
}
.lp2ModalFoot {
  padding: 12px;
  border-top: 1px solid var(--lp2-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modalGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modalGrid .full {
  grid-column: 1/-1;
}
.ctxRow {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ctxRow input {
  flex: 1;
}

@media (max-width: 1100px) {
  .lp2 {
    grid-template-columns: 1fr;
  }
  .lp2Cards {
    grid-template-columns: 1fr;
  }
}

.permsPage {
  padding: 0;
  font-size: 14px;
}

/* ── Header ── */
.permsHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.permsTitle {
  font-size: 20px !important;
  font-weight: 950;
  margin: 0;
  letter-spacing: 0.3px;
}
.permsSubtitle {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 3px;
}
.permsHeaderRight {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.permsLabel {
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 5px;
}

/* ── Scope seg ── */
.seg {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
}
.segBtn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  padding: 7px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
}
.segBtn.active {
  background: rgba(178, 210, 53, 0.18);
  color: #d4f7a0;
}

/* ── Main layout ── */
.lp2 {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 12px;
  min-height: 600px;
}
@media (max-width: 900px) {
  .lp2 {
    grid-template-columns: 1fr;
  }
  .permsHeader {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Left nav ── */
.lp2Nav {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lp2Tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 2px;
}
.lp2Tab {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 9px;
  padding: 7px 6px;
  font-weight: 700;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition:
    background 0.12s,
    border-color 0.12s,
    color 0.12s;
  text-align: center;
}
.lp2Tab.active {
  background: rgba(178, 210, 53, 0.14);
  border-color: rgba(178, 210, 53, 0.35);
  color: #d4f7a0;
}
.lp2Tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.lp2SearchRow {
  display: flex;
  gap: 7px;
  align-items: center;
}
.lp2SearchRow input {
  flex: 1;
  font-size: 13px !important;
  padding: 8px 10px !important;
  border-radius: 9px !important;
}
.lp2List {
  flex: 1;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.14);
  padding: 5px;
  min-height: 200px;
}
.lp2Item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.1s;
  font-size: 13px;
}
.lp2Item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.lp2Item.active {
  background: rgba(178, 210, 53, 0.12);
}
.lp2ItemTitle {
  font-weight: 800;
  font-size: 13px;
}
.lp2ItemSub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}
.lp2Chip {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}
.lp2Hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.4;
  padding: 4px 2px;
}

/* ── Right main ── */
.lp2Main {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lp2MainHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  gap: 10px;
  flex-wrap: wrap;
}
.lp2SelTitle {
  font-size: 15px !important;
  font-weight: 900;
}
.lp2SelMeta {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.48);
  margin-top: 2px;
}
.lp2HeadBtns {
  display: flex;
  gap: 8px;
  align-items: center;
}
.lp2MainTabs {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-wrap: wrap;
}
.lp2MainTab {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 9px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition:
    background 0.12s,
    border-color 0.12s,
    color 0.12s;
}
.lp2MainTab.active {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(96, 165, 250, 0.35);
  color: #bfdbfe;
}
.lp2MainTab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.lp2Panel {
  padding: 14px;
  overflow: auto;
  flex: 1;
}
.lp2Cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 700px) {
  .lp2Cards {
    grid-template-columns: 1fr;
  }
}
.lp2Card {
  padding: 12px !important;
  border-radius: 12px !important;
}
.lp2CardTitle {
  font-weight: 900 !important;
  font-size: 13px !important;
  margin-bottom: 10px !important;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
}
.lp2CardTitle::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: rgba(178, 210, 53, 0.7);
}
.lp2Grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lp2Grid2 > div > .muted {
  font-size: 11px !important;
  margin-bottom: 4px;
  display: block;
}
.lp2Grid2 input,
.lp2Grid2 select {
  font-size: 13px !important;
  padding: 7px 9px !important;
  border-radius: 9px !important;
}

/* ── Toolbar ── */
.lp2Toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.lp2ToolbarLeft {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.lp2ToolbarLeft input {
  font-size: 13px !important;
  padding: 7px 10px !important;
  border-radius: 9px !important;
  min-width: 180px;
}
.lp2ToolbarLeft select {
  font-size: 13px !important;
  padding: 7px 10px !important;
  border-radius: 9px !important;
}

/* ── Table ── */
.lp2Table th {
  font-size: 11px !important;
  padding: 9px 10px !important;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45) !important;
}
.lp2Table td {
  font-size: 13px !important;
  padding: 9px 10px !important;
}
.lp2BadgeTrue,
.lp2BadgeFalse,
.lp2BadgeUnset {
  font-size: 11px !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
}

/* ── Buttons ── */
.btn-primary {
  font-size: 13px !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
}
.btn-ghost {
  font-size: 13px !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
}

/* ── Server pick card ── */
.serverPick .card {
  font-size: 13px;
  border-radius: 12px !important;
  padding: 14px !important;
}
.serverPick select {
  font-size: 13px !important;
  padding: 8px 10px !important;
  border-radius: 9px !important;
}

/* ── Row lines ── */
.rowLine {
  font-size: 13px;
  padding: 8px 10px !important;
  border-radius: 10px !important;
}
.rowLine .title {
  font-size: 13px !important;
}
.rowLine .sub {
  font-size: 11px !important;
}

/* ── Modal ── */
.lp2ModalCard {
  border-radius: 14px !important;
}
.lp2ModalTitle {
  font-size: 15px !important;
  font-weight: 900;
}
.lp2ModalBody {
  font-size: 13px;
}

/* ── Misc ── */
.muted {
  color: rgba(255, 255, 255, 0.48) !important;
  font-size: 12px;
}
.permsPage h1 {
  font-size: 20px !important;
}


/* ---------------------------light mode--------------------------------------------- */

/* ============================================================
   LIGHT MODE — HGN-Perm (perms.css addition)
   Paste at the very bottom of assets/pages/perms/perms.css
   ============================================================ */

/* ── Root overrides ── */
.light {
  --lp2-border: rgba(0, 0, 0, 0.10);
  --lp2-soft:   rgba(0, 0, 0, 0.05);
  --lp2-soft2:  rgba(0, 0, 0, 0.03);
}

/* ── Page shell ── */
.light .permsPage {
  color: #111;
}

/* ── Header ── */
.light .permsHeader {
  border-bottom-color: rgba(0, 0, 0, 0.10);
}
.light .permsTitle {
  color: #111 !important;
}
.light .permsSubtitle {
  color: #555 !important;
}
.light .permsLabel {
  color: #555 !important;
}

/* ── Scope seg buttons ── */
.light .seg {
  background: #e8eaef;
  border-color: rgba(0, 0, 0, 0.13);
}
.light .segBtn {
  color: #444;
}
.light .segBtn:hover {
  background: rgba(0, 0, 0, 0.06);
}
.light .segBtn.active {
  background: rgba(178, 210, 53, 0.28);
  color: #1e4000;
}

/* ── Left nav panel ── */
.light .lp2Nav {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.10);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

/* Left nav tabs (Net Ranks / Srv Ranks / Tracks / Players) */
.light .lp2Tabs {
  background: #f0f2f7;
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
}
.light .lp2Tab {
  color: #555;
  background: transparent;
  border-color: transparent;
}
.light .lp2Tab:hover:not(.active) {
  background: rgba(0, 0, 0, 0.06);
  color: #222;
}
.light .lp2Tab.active {
  background: rgba(178, 210, 53, 0.22);
  border-color: rgba(178, 210, 53, 0.50);
  color: #1e4000;
}

/* Search row */
.light .lp2SearchRow input {
  background: #f5f7fa;
  border-color: rgba(0, 0, 0, 0.13);
  color: #111;
}
.light .lp2SearchRow input::placeholder {
  color: #888;
}

/* Left list */
.light .lp2List {
  background: #f5f7fa;
  border-color: rgba(0, 0, 0, 0.09);
}
.light .lp2Item {
  color: #111;
}
.light .lp2Item:hover {
  background: rgba(0, 0, 0, 0.05);
}
.light .lp2Item.active {
  background: rgba(178, 210, 53, 0.18);
}
.light .lp2ItemTitle {
  color: #111;
}
.light .lp2ItemSub {
  color: #666 !important;
}
.light .lp2Chip {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  color: #555;
}
.light .lp2Hint {
  color: #888 !important;
}

/* ── Right main panel ── */
.light .lp2Main {
  background: #eef0f5;
  border-color: rgba(0, 0, 0, 0.10);
}

/* Main head (title row + delete/save) */
.light .lp2MainHead {
  background: #fff;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
.light .lp2SelTitle {
  color: #111 !important;
}
.light .lp2SelMeta {
  color: #666 !important;
}

/* Main tabs (Summary / Permissions / etc.) */
.light .lp2MainTabs {
  border-bottom-color: rgba(0, 0, 0, 0.08);
  background: #f0f2f7;
}
.light .lp2MainTab {
  color: #555;
  background: transparent;
  border-color: transparent;
}
.light .lp2MainTab:hover:not(.active) {
  background: rgba(0, 0, 0, 0.06);
  color: #222;
}
.light .lp2MainTab.active {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.42);
  color: #1a2e7a;
}

/* ── Panel content ── */
.light .lp2Panel {
  color: #111;
}

/* Cards (Basics / Chat Formatting) */
.light .lp2Card {
  background: #fff !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
}
.light .lp2CardTitle {
  color: #111 !important;
}
.light .lp2CardTitle::before {
  background: rgba(178, 210, 53, 0.80);
}

/* Labels / muted inside panels */
.light .lp2Panel .muted,
.light .lp2Grid2 .muted,
.light .lp2Cards .muted {
  color: #666 !important;
}

/* Inputs inside panels */
.light .lp2Panel input,
.light .lp2Panel select,
.light .lp2Panel textarea,
.light .lp2Cards input,
.light .lp2Cards select {
  background: #f5f7fa;
  border-color: rgba(0, 0, 0, 0.13);
  color: #111;
}
.light .lp2Panel input::placeholder,
.light .lp2Cards input::placeholder {
  color: #999;
}
.light .lp2Panel input:focus,
.light .lp2Cards input:focus,
.light .lp2Panel select:focus {
  border-color: rgba(178, 210, 53, 0.55);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(178, 210, 53, 0.16);
}

/* ── Toolbar ── */
.light .lp2Toolbar {
  color: #111;
}
.light .lp2ToolbarLeft input,
.light .lp2ToolbarLeft select {
  background: #f5f7fa;
  border-color: rgba(0, 0, 0, 0.13);
  color: #111;
}

/* ── Permission table ── */
.light .lp2Table {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.10);
  border-radius: 10px;
  overflow: hidden;
}
.light .lp2Table th {
  background: #f5f7fa;
  color: #666 !important;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
.light .lp2Table td {
  color: #111 !important;
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
.light .lp2Table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}
.light .lp2PermNode {
  color: #1a2e7a;
}

/* Value badges */
.light .lp2BadgeTrue {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.40);
  color: #14532d;
}
.light .lp2BadgeFalse {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.38);
  color: #7f1d1d;
}
.light .lp2BadgeUnset {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.13);
  color: #555;
}

/* ── Inheritance / meta / history rows ── */
.light .rowLine {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.10);
}
.light .rowLine .title {
  color: #111 !important;
}
.light .rowLine .sub {
  color: #666 !important;
}

/* ── Muted text (global override for this page) ── */
.light .permsPage .muted {
  color: #666 !important;
}

/* ── Buttons ── */
.light .btn-primary {
  background: linear-gradient(180deg, rgba(178, 210, 53, 0.95), rgba(140, 170, 34, 0.92));
  border-color: rgba(140, 170, 34, 0.55);
  color: #1e3a00;
}
.light .btn-primary:hover {
  box-shadow: 0 0 0 3px rgba(178, 210, 53, 0.22);
}
.light .btn-ghost {
  background: #f0f2f7;
  border-color: rgba(0, 0, 0, 0.13);
  color: #333;
}
.light .btn-ghost:hover {
  background: #e4e6ed;
  border-color: rgba(0, 0, 0, 0.20);
}

/* ── Server pick card ── */
.light .serverPick .card {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.10);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  color: #111;
}
.light .serverPick .muted {
  color: #666 !important;
}
.light #serverPickSelect,
.light #serverSelect {
  background: #f5f7fa;
  border-color: rgba(0, 0, 0, 0.13);
  color: #111;
}

/* ── Modal ── */
.light .lp2Modal {
  background: rgba(0, 0, 0, 0.42);
}
.light .lp2ModalCard {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.20);
}
.light .lp2ModalHead {
  background: #f5f7fa;
  border-bottom-color: rgba(0, 0, 0, 0.09);
}
.light .lp2ModalTitle {
  color: #111 !important;
}
.light .lp2ModalBody {
  color: #333;
}
.light .lp2ModalBody .muted {
  color: #666 !important;
}
.light .lp2ModalBody input,
.light .lp2ModalBody select,
.light .lp2ModalBody textarea {
  background: #f5f7fa;
  border-color: rgba(0, 0, 0, 0.13);
  color: #111;
}
.light .lp2ModalBody input:focus,
.light .lp2ModalBody select:focus {
  border-color: rgba(178, 210, 53, 0.55);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(178, 210, 53, 0.16);
}
.light .lp2ModalFoot {
  background: #f5f7fa;
  border-top-color: rgba(0, 0, 0, 0.09);
}

/* ── Minecraft preview inside Chat Formatting card ── */
.light .mcSceneSmall {
  background: #1a1a2e;
  border-color: rgba(0, 0, 0, 0.18);
}
.light .mcChatBar {
  background: rgba(0, 0, 0, 0.60);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ── Server Pick Modal select — dark mode ── */
#serverPickModal .lp2ModalBody select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(0, 0, 0, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e7eaf2;
  padding: 10px 36px 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}
#serverPickModal .lp2ModalBody select:focus {
  border-color: rgba(178, 210, 53, 0.55);
  box-shadow: 0 0 0 3px rgba(178, 210, 53, 0.16);
  outline: none;
}
#serverPickModal .lp2ModalBody select option {
  background-color: #1e2330;
  color: #e7eaf2;
  padding: 8px 12px;
}
#serverPickModal .lp2ModalBody select option:checked,
#serverPickModal .lp2ModalBody select option:hover {
  background-color: rgba(96, 165, 250, 0.18);
   color: #1a2e7a;
}

/* ── Server Pick Modal select — light mode ── */
.light #serverPickModal .lp2ModalBody select {
  background-color: #f5f7fa;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(0,0,0,0.45)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  border-color: rgba(0, 0, 0, 0.13);
  color: #111;
}
.light #serverPickModal .lp2ModalBody select:focus {
  border-color: rgba(178, 210, 53, 0.55);
  box-shadow: 0 0 0 3px rgba(178, 210, 53, 0.16);
  background-color: #fff;
}
.light #serverPickModal .lp2ModalBody select option {
  background-color: #ffffff;
  color: #111;
}
.light #serverPickModal .lp2ModalBody select option:checked {
  background-color: rgba(178, 210, 53, 0.18);
  color: #1e4000;
}

/* ── Server Pick Modal card — dark ── */
#serverPickModal .lp2ModalCard {
  background: rgba(22, 27, 38, 0.97);
}
#serverPickModal .lp2ModalHead {
  background: rgba(0, 0, 0, 0.28);
}

/* ── Server Pick Modal card — light ── */
.light #serverPickModal .lp2ModalCard {
  background: #fff;
}
.light #serverPickModal .lp2ModalHead {
  background: #f5f7fa;
}
.light #serverPickModal .lp2ModalTitle {
  color: #111 !important;
}
.light #serverPickModal .lp2ModalBody {
  color: #333;
}
.light #serverPickModal .lp2ModalBody .muted {
  color: #666 !important;
}
.light #serverPickModal .lp2ModalFoot {
  background: #f5f7fa;
  border-top-color: rgba(0, 0, 0, 0.09);
}


/* ── Plugin filter select — dark ── */
#permPluginFilter {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(0, 0, 0, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e7eaf2;
  padding: 10px 36px 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}
#permPluginFilter option {
  background-color: #1e2330;
  color: #e7eaf2;
}
#permPluginFilter option:checked {
  background-color: rgba(96, 165, 250, 0.25);
  color: #bfdbfe;
}

/* ── Plugin filter select — light ── */
.light #permPluginFilter {
  background-color: #f5f7fa;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(0,0,0,0.45)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  border-color: rgba(0, 0, 0, 0.13);
  color: #111;
}
.light #permPluginFilter option {
  background-color: #ffffff;
  color: #111;
}
.light #permPluginFilter option:checked {
  background-color: rgba(96, 165, 250, 0.18);
  color: #1a2e7a;
}