:root {
  --c1: #f8fbff;
  --c2: #d9ecff;
  --c3: #9bc8ff;
  --c4: #3b78c8;
  --c5: #1a2340;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--c5);
  background: linear-gradient(160deg, var(--c1) 0%, var(--c2) 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

/* fundo futurista */
.grid-bg {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(59,120,200,.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,120,200,.28) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 35%, rgba(0,0,0,.35) 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, rgba(0,0,0,.35) 100%);
  animation: gridPulse 5s ease-in-out infinite;
}
/* faixa de luz que varre a grade */
.grid-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(59,120,200,.9) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,120,200,.9) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(115deg, transparent 40%, #000 50%, transparent 60%);
  -webkit-mask-image: linear-gradient(115deg, transparent 40%, #000 50%, transparent 60%);
  mask-size: 250% 250%;
  -webkit-mask-size: 250% 250%;
  animation: gridSweep 7s linear infinite;
}
@keyframes gridPulse { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes gridSweep {
  from { mask-position: 100% 100%; -webkit-mask-position: 100% 100%; }
  to   { mask-position: 0% 0%; -webkit-mask-position: 0% 0%; }
}
.grid-bg { z-index: -2; }
.orb { z-index: -2; }
.trail { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.orb {
  position: fixed; border-radius: 50%; filter: blur(70px); opacity: .55;
  animation: float 14s ease-in-out infinite;
}
.orb-a { width: 380px; height: 380px; background: var(--c3); top: -100px; left: -80px; }
.orb-b { width: 320px; height: 320px; background: var(--c4); opacity: .3; bottom: -100px; right: -60px; animation-delay: -7s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 30px); }
}

.login { position: relative; z-index: 1; width: 100%; padding: 24px; display: grid; place-items: center; }

.card {
  width: 100%; max-width: 400px;
  padding: 44px 36px 32px;
  text-align: center;
  background: rgba(248, 251, 255, .7);
  border: 1px solid rgba(155, 200, 255, .7);
  border-radius: 24px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(26, 35, 64, .12), inset 0 1px 0 #fff;
  animation: rise .8s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.logo {
  width: 72px; height: 72px; margin: 0 auto 22px;
  display: grid; place-items: center;
  color: var(--c4);
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, var(--c2));
  border: 1px solid var(--c3);
  box-shadow: 0 0 0 6px rgba(155, 200, 255, .2), 0 8px 24px rgba(59, 120, 200, .25);
}

.eyebrow {
  font-size: .72rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--c4); margin-bottom: 8px;
}
h1 { font-size: 2.1rem; font-weight: 300; letter-spacing: .04em; }
h1 span { font-weight: 700; color: var(--c4); }
.sub { margin: 12px 0 30px; font-size: .95rem; color: rgba(26, 35, 64, .7); line-height: 1.5; }

/* Botão Discord — estilo do site de referência, nas cores do projeto */
.btn-discord {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0;
  border: 1px solid var(--c4);
  border-radius: 14px;
  background: var(--c1);
  color: var(--c5);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s, box-shadow .3s, border-color .3s, color .3s;
  animation: pulse 2.6s ease-out infinite;
}
.btn-bg {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, var(--c4), var(--c5));
  /* repouso: recolhido na direita. No hover cresce a partir da esquerda;
     ao sair, encolhe em direção à direita (sempre esquerda → direita) */
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .45s cubic-bezier(.7, 0, .2, 1);
}
.btn-content {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  gap: .75rem;
  padding: 1rem 1.6rem;
}
.btn-discord:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 120, 200, .4);
  color: var(--c1);
  animation: none;
}
.btn-discord:hover .btn-bg { transform: scaleX(1); transform-origin: left center; }
.btn-discord:active { transform: translateY(0) scale(.98); }
.btn-discord:focus-visible { outline: 3px solid var(--c3); outline-offset: 3px; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(59, 120, 200, .45); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(59, 120, 200, 0); }
}

.btn-discord .icon { width: 24px; height: 24px; transition: transform .4s; }
.btn-discord:hover .icon { transform: rotate(-12deg) scale(1.1); }

.spinner, .check { display: none; width: 22px; height: 22px; }
.spinner {
  border: 3px solid rgba(248, 251, 255, .3);
  border-top-color: var(--c1);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress {
  position: absolute; left: 0; bottom: 0;
  height: 3px; width: 0;
  background: var(--c3);
  box-shadow: 0 0 10px var(--c3);
}

/* Estados */
.btn-discord.loading, .btn-discord.success { animation: none; pointer-events: none; color: var(--c1); }
.btn-discord.loading .btn-bg, .btn-discord.success .btn-bg { transform: scaleX(1); transform-origin: left center; }
.btn-discord.loading .icon { display: none; }
.btn-discord.loading .spinner { display: block; }
.btn-discord.loading .progress { animation: load 2.6s ease-in-out forwards; }
@keyframes load { to { width: 100%; } }

.btn-discord.success { border-color: var(--c3); }
.btn-discord.success .icon, .btn-discord.success .spinner { display: none; }
.btn-discord.success .check { display: block; stroke-dasharray: 30; animation: draw .5s ease forwards; }
@keyframes draw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }

.msg { min-height: 1.3em; margin-top: 16px; font-size: .85rem; color: var(--c4); }
.msg.error { color: #b3261e; }
.foot { margin-top: 18px; font-size: .75rem; color: rgba(26, 35, 64, .5); }

/* painel */
.panel .card { max-width: 440px; }
.avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--c3);
  box-shadow: 0 0 0 6px rgba(155, 200, 255, .25), 0 8px 24px rgba(59, 120, 200, .3);
  margin-bottom: 18px;
}
.btn-ghost {
  margin-top: 26px; padding: 12px 24px;
  font: inherit; font-weight: 600; color: var(--c4);
  background: transparent; border: 1px solid var(--c3); border-radius: 12px; cursor: pointer;
  transition: background .2s;
}
.btn-ghost:hover { background: var(--c2); }


/* painel: perfil vinculado */
.avatar-wrap { display: grid; place-items: center; margin-bottom: 6px; }
.avatar-wrap .avatar { grid-area: 1 / 1; margin-bottom: 12px; }
.avatar[hidden] { display: none; }
.avatar-ph { background: linear-gradient(120deg, var(--c2), var(--c3), var(--c2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.p-name { font-size: 1.7rem; font-weight: 600; letter-spacing: .01em; overflow-wrap: anywhere; }
.profile-card .sub { margin: 6px 0 4px; }
.sync { min-height: 1.2em; font-size: .75rem; color: rgba(26, 35, 64, .5); }
.linked {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 24px; padding: 7px 14px;
  font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  color: var(--c4); background: var(--c1);
  border: 1px solid var(--c3); border-radius: 999px;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2fb36b; animation: livePulse 2s ease-out infinite; }
.linked.offline .live-dot { background: #d9a400; animation: none; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(47, 179, 107, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(47, 179, 107, 0); } }

.foot code { display: inline-block; margin-top: 6px; padding: 4px 8px; font-size: .75rem; color: var(--c5); background: var(--c2); border-radius: 6px; user-select: all; word-break: break-all; }

/* ===== Painel (dashboard): barra lateral única, sem quadrados ===== */
body.dash { display: block; overflow: hidden; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 2;
  width: 340px; max-width: 100%;
  display: flex; flex-direction: column;
  padding: 30px 30px 26px;
  background: rgba(248, 251, 255, .78);
  border-right: 1px solid rgba(155, 200, 255, .7);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 10px 0 50px rgba(26, 35, 64, .08);
  overflow-y: auto;
  animation: slideIn .7s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.stage { position: fixed; inset: 0 0 0 340px; pointer-events: none; }

.brand { font-size: 1.15rem; font-weight: 300; letter-spacing: .06em; }
.brand span { font-weight: 700; color: var(--c4); }

.side-profile { text-align: center; padding: 34px 0 26px; border-bottom: 1px solid rgba(155, 200, 255, .7); }
.dash .avatar-wrap { margin: 0 0 16px; }
.avatar.big { width: 104px; height: 104px; margin: 0; }
.hello { font-size: 1.55rem; font-weight: 300; overflow-wrap: anywhere; line-height: 1.25; }
.hello span { font-weight: 700; color: var(--c4); }
.handle { margin-top: 6px; font-size: .98rem; color: var(--c4); font-weight: 600; overflow-wrap: anywhere; }

.side-list { margin: 0; }
.row { padding: 16px 0; border-bottom: 1px solid rgba(155, 200, 255, .55); }
.row dt { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--c4); margin-bottom: 6px; }
.row dd { margin: 0; font-weight: 600; font-size: .98rem; overflow-wrap: anywhere; }
.side-list .linked { display: inline-flex; margin: 0; padding: 6px 12px; font-size: .74rem; }

.dash .sync { margin-top: 16px; text-align: left; }
.side-logout { margin-top: auto; align-self: stretch; }
.dash .side-profile ~ .sync + .side-logout { margin-top: auto; }

@media (max-width: 760px) {
  body.dash { overflow-y: auto; }
  .sidebar { position: relative; width: 100%; inset: auto; min-height: 100vh; border-right: 0; }
  .stage { display: none; }
}

/* Botão Sair do painel: fica vermelho ao pressionar */
.side-logout { transition: background .2s, color .2s, border-color .2s, transform .15s; }
.side-logout:hover { border-color: #e5484d; color: #c62828; background: rgba(229, 72, 77, .08); }
.side-logout:active {
  background: #d32f2f; border-color: #d32f2f; color: #fff;
  transform: scale(.98);
  box-shadow: 0 6px 18px rgba(211, 47, 47, .4);
}

/* ===== Admin ===== */
.code-input {
  width: 100%; padding: 16px 14px; margin-bottom: 14px;
  font: 600 1.6rem/1 "Cascadia Mono", Consolas, monospace; letter-spacing: .3em; text-align: center; text-transform: uppercase;
  color: var(--c5); background: var(--c1);
  border: 1px solid var(--c3); border-radius: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.code-input::placeholder { color: rgba(26, 35, 64, .25); letter-spacing: .3em; }
.code-input:focus { border-color: var(--c4); box-shadow: 0 0 0 4px rgba(155, 200, 255, .35); }
.code-input.shake { animation: shake .4s; border-color: #d32f2f; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.timer { height: 4px; border-radius: 4px; background: var(--c2); overflow: hidden; }
.timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--c3), var(--c4)); transition: width 1s linear; }
.timer-txt { margin: 8px 0 20px; font-size: .78rem; color: rgba(26, 35, 64, .6); }
.side-act { margin-top: auto; align-self: stretch; }
.side-act + .side-logout { margin-top: 12px; }
.side-profile .eyebrow { margin-bottom: 10px; }

/* Admin: tabelas em linhas (sem quadrados) */
.stage.admin-stage { pointer-events: auto; overflow-y: auto; padding: 38px 44px 60px; z-index: 1; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(155, 200, 255, .7); }
.sec-head h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: .02em; display: flex; align-items: baseline; gap: 12px; }
.count { font-size: 2.4rem; font-weight: 300; line-height: 1; color: var(--c4); }
.sec-gap { margin-top: 48px; }
.tbl { display: grid; gap: 16px; align-items: center; padding: 13px 4px; }
.tbl.cols-3 { grid-template-columns: 1.6fr 1.2fr 1.2fr; }
.tbl.cols-5 { grid-template-columns: 1.3fr .7fr 1.3fr 1.6fr 1fr; }
.tbl.head { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--c4); border-bottom: 1px solid rgba(155, 200, 255, .5); }
.tbl-body { list-style: none; margin: 0; padding: 0; }
.tbl-body li { border-bottom: 1px solid rgba(155, 200, 255, .35); font-size: .9rem; transition: background .2s; }
.tbl-body li:hover { background: rgba(155, 200, 255, .15); }
.tbl span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .strong { font-weight: 600; }
.tbl .ip { font-family: "Cascadia Mono", Consolas, monospace; font-size: .84rem; }
.tag { justify-self: start; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; border: 1px solid var(--c3); }
.tag.admin { color: #fff; background: var(--c5); border-color: var(--c5); }
.tag.member { color: var(--c4); background: var(--c1); }
.acc-empty { margin-top: 20px; color: rgba(26, 35, 64, .55); }
.mini-menu select {
  font: inherit; font-size: .8rem; font-weight: 600; color: var(--c5);
  padding: 5px 26px 5px 10px; background: var(--c1); border: 1px solid var(--c3); border-radius: 8px; cursor: pointer; outline: none;
}
.mini-menu select:focus-visible { border-color: var(--c4); box-shadow: 0 0 0 3px rgba(155, 200, 255, .4); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.privacy { margin-top: 10px; font-size: .7rem; }
@media (max-width: 760px) {
  .stage.admin-stage { position: static; padding: 24px 20px; }
  .tbl.head { display: none; }
  .tbl.cols-3, .tbl.cols-5 { grid-template-columns: 1fr 1fr; }
}

/* Legibilidade: fundo translúcido com blur sobre a chuva/grade + texto mais forte */
.stage.admin-stage {
  background: rgba(248, 251, 255, .62);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  color: var(--c5);
}
.stage.admin-stage .sec-head h2 { font-size: 1.3rem; color: var(--c5); }
.tbl.head { color: #2a5a9e; font-weight: 700; font-size: .72rem; }
.tbl-body li { font-size: .96rem; color: var(--c5); border-bottom-color: rgba(59, 120, 200, .25); }
.tbl-body li:hover { background: rgba(155, 200, 255, .3); }
.tbl .strong { font-weight: 700; }
.tbl .ip { font-size: .9rem; }
.tag { font-size: .76rem; padding: 3px 12px; }
.tag.member { color: #2a5a9e; background: #fff; border-color: var(--c4); }
.acc-empty { color: rgba(26, 35, 64, .75); }
.count { color: #2a5a9e; }
.sidebar { background: rgba(248, 251, 255, .7); }
.row dt { color: #2a5a9e; font-weight: 700; }
.row dd { color: var(--c5); }
.handle, .sync { color: rgba(26, 35, 64, .75); }

/* Barra de status inferior (menu): só o item sob o mouse se expande */
.statusbar {
  position: fixed; left: 340px; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px;
  background: rgba(248, 251, 255, .72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(155, 200, 255, .7);
}
.sb-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 14px; border-radius: 999px;
  color: var(--c5); font-size: .84rem; font-weight: 600;
  border: 1px solid transparent; cursor: default; outline: none;
  transition: background .25s, border-color .25s;
}
.sb-ico { color: var(--c4); flex: none; }
.sb-label { white-space: nowrap; }
.sb-val {
  display: inline-block; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0;
  color: #2a5a9e; font-weight: 700;
  transition: max-width .4s cubic-bezier(.22, 1, .36, 1), opacity .3s, margin .4s;
}
.sb-item:hover, .sb-item:focus-visible { background: var(--c1); border-color: var(--c3); }
.sb-item:hover .sb-val, .sb-item:focus-visible .sb-val { max-width: 260px; opacity: 1; margin-left: 4px; }
.sb-item.offline .live-dot { background: #d9a400; animation: none; }
.stage.admin-stage { padding-bottom: 96px; }
@media (max-width: 760px) { .statusbar { left: 0; flex-wrap: wrap; } }

/* Menu lateral do painel admin */
.side-menu { display: flex; flex-direction: column; margin: 18px 0 16px; }
.side-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 8px;
  font: inherit; font-size: .95rem; font-weight: 600; text-align: left;
  color: var(--c5); background: transparent;
  border: 0; border-bottom: 1px solid rgba(155, 200, 255, .55); border-radius: 0;
  cursor: pointer;
  transition: background .2s, color .2s, padding-left .25s;
}
.side-btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--c4); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.side-btn:hover { background: rgba(155, 200, 255, .25); padding-left: 14px; }
.side-btn:focus-visible { outline: 2px solid var(--c4); outline-offset: -2px; }
.side-btn.active { color: var(--c4); background: rgba(155, 200, 255, .2); box-shadow: inset 3px 0 0 var(--c4); }
.side-btn.active svg { stroke: var(--c4); }
.toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 5; transform: translate(-50%, 12px);
  padding: 10px 18px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  color: var(--c1); background: var(--c5); box-shadow: 0 8px 24px rgba(26, 35, 64, .3);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sec-gap.alone { margin-top: 0; }
.admin-stage [hidden] { display: none !important; }
.acc-empty code { padding: 1px 6px; background: var(--c2); border-radius: 5px; font-size: .85em; }

/* Manutenção */
.maint-dot { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: #d32f2f; box-shadow: 0 0 0 0 rgba(211, 47, 47, .6); display: none; }
.side-btn.maint-on .maint-dot { display: block; animation: maintPulse 1.6s ease-out infinite; }
@keyframes maintPulse { 0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(211, 47, 47, 0); } }
.maint-badge { padding: 5px 14px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #2a5a9e; background: #fff; border: 1px solid var(--c3); }
.maint-badge.on { color: #fff; background: #d32f2f; border-color: #d32f2f; }
.maint-info { margin: 20px 0 24px; max-width: 640px; line-height: 1.6; color: var(--c5); }
.field { display: block; margin-bottom: 8px; font-weight: 700; font-size: .9rem; color: var(--c5); }
.field small { font-weight: 400; color: rgba(26, 35, 64, .65); }
.maint-text {
  width: 100%; max-width: 640px; padding: 12px 14px; resize: vertical;
  font: inherit; color: var(--c5); background: rgba(255, 255, 255, .85);
  border: 1px solid var(--c3); border-radius: 12px; outline: none;
}
.maint-text:focus { border-color: var(--c4); box-shadow: 0 0 0 4px rgba(155, 200, 255, .35); }
.maint-btn {
  display: block; margin-top: 20px; padding: 14px 28px;
  font: inherit; font-weight: 700; font-size: 1rem; color: #fff; cursor: pointer;
  background: #d32f2f; border: 0; border-radius: 12px;
  box-shadow: 0 8px 22px rgba(211, 47, 47, .3);
  transition: transform .15s, box-shadow .2s, background .2s;
}
.maint-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(211, 47, 47, .4); }
.maint-btn:active { transform: scale(.98); }
.maint-btn.on { background: #2f9e62; box-shadow: 0 8px 22px rgba(47, 158, 98, .3); }
.maint-btn.on:hover { box-shadow: 0 12px 28px rgba(47, 158, 98, .4); }
.maint-since { margin-top: 14px; font-size: .88rem; color: rgba(26, 35, 64, .75); }

/* Página de manutenção: contador e loading */
.countdown { margin: 4px 0 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cd-label { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: #2a5a9e; font-weight: 700; }
.cd-time { font: 300 2.6rem/1.1 "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; color: var(--c5); }
.cd-end { font-size: .8rem; color: rgba(26, 35, 64, .7); min-height: 1.1em; }
.loader { position: relative; height: 8px; border-radius: 8px; background: var(--c2); overflow: hidden; }
.loader i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--c3), var(--c4)); transition: width 1s linear; }
.loader.indeterminate i { width: 40%; animation: loadSlide 1.4s ease-in-out infinite; transition: none; }
@keyframes loadSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.loader-txt { margin-top: 10px; font-size: .82rem; color: rgba(26, 35, 64, .75); }

/* Manutenção: data de término + contador no painel */
.until-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 640px; margin-bottom: 4px; }
.maint-text.until { width: auto; flex: 0 1 230px; }
.maint-text:disabled, .chip:disabled { opacity: .55; cursor: not-allowed; }
.chip, .tchip {
  padding: 9px 14px; font: inherit; font-size: .82rem; font-weight: 700; color: #2a5a9e;
  background: var(--c1); border: 1px solid var(--c3); border-radius: 999px; cursor: pointer; transition: background .2s;
}
.chip:not(:disabled):hover, .tchip:hover { background: var(--c2); }
.maint-live { max-width: 640px; margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(155, 200, 255, .7); display: flex; flex-direction: column; gap: 6px; }
.maint-live .cd-time { font-size: 2.2rem; }
.maint-live .loader { margin-top: 6px; }
.maint-live .loader-txt { margin-top: 4px; }

/* ===== Botão de tema ===== */
.theme-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 10;
  width: 42px; height: 42px; display: grid; place-items: center;
  color: var(--c4); background: var(--c1);
  border: 1px solid var(--c3); border-radius: 50%; cursor: pointer;
  box-shadow: 0 6px 20px rgba(26, 35, 64, .18);
  transition: transform .25s, background .2s, box-shadow .2s;
}
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle:hover { transform: rotate(18deg) scale(1.08); box-shadow: 0 8px 24px rgba(59, 120, 200, .35); }
.theme-toggle:focus-visible { outline: 3px solid var(--c3); outline-offset: 3px; }

/* ===== Modo escuro ===== */
html[data-theme="dark"] {
  color-scheme: dark;
  --c1: #121a33;   /* superfícies */
  --c2: #1c2850;
  --c3: #9bc8ff;
  --c4: #7db4f5;   /* azul de destaque, mais claro para ler no escuro */
  --c5: #eef4ff;   /* texto */
}
html[data-theme="dark"] .grid-bg {
  background-image:
    linear-gradient(rgba(155,200,255,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155,200,255,.14) 1px, transparent 1px);
}
html[data-theme="dark"] .grid-bg::after {
  background-image:
    linear-gradient(rgba(155,200,255,.75) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155,200,255,.75) 1px, transparent 1px);
}
html[data-theme="dark"] .orb-a { opacity: .28; }
html[data-theme="dark"] .orb-b { opacity: .22; }

/* vidro */
html[data-theme="dark"] .card { background: rgba(18, 26, 51, .72); border-color: rgba(155, 200, 255, .22); box-shadow: 0 20px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06); }
html[data-theme="dark"] .sidebar { background: rgba(14, 20, 42, .78); border-right-color: rgba(155, 200, 255, .22); box-shadow: 10px 0 50px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .statusbar { background: rgba(14, 20, 42, .8); border-top-color: rgba(155, 200, 255, .22); }
html[data-theme="dark"] .stage.admin-stage { background: rgba(14, 20, 42, .6); }
html[data-theme="dark"] .logo { background: linear-gradient(145deg, #243063, #141c3a); box-shadow: 0 0 0 6px rgba(155, 200, 255, .1), 0 8px 24px rgba(0, 0, 0, .4); }

/* linhas divisórias */
html[data-theme="dark"] .side-profile,
html[data-theme="dark"] .sec-head,
html[data-theme="dark"] .maint-live { border-bottom-color: rgba(155, 200, 255, .22); border-top-color: rgba(155, 200, 255, .22); }
html[data-theme="dark"] .row,
html[data-theme="dark"] .side-btn,
html[data-theme="dark"] .tbl.head,
html[data-theme="dark"] .tbl-body li { border-bottom-color: rgba(155, 200, 255, .16); }
html[data-theme="dark"] .tbl-body li:hover,
html[data-theme="dark"] .side-btn:hover { background: rgba(155, 200, 255, .1); }
html[data-theme="dark"] .side-btn.active { background: rgba(155, 200, 255, .12); }

/* textos suaves */
html[data-theme="dark"] .sub,
html[data-theme="dark"] .foot,
html[data-theme="dark"] .sync,
html[data-theme="dark"] .handle,
html[data-theme="dark"] .timer-txt,
html[data-theme="dark"] .acc-empty,
html[data-theme="dark"] .field small,
html[data-theme="dark"] .maint-since,
html[data-theme="dark"] .cd-end,
html[data-theme="dark"] .loader-txt { color: rgba(238, 244, 255, .72); }
html[data-theme="dark"] .code-input::placeholder { color: rgba(238, 244, 255, .28); }

/* azuis escuros que precisam clarear */
html[data-theme="dark"] .tbl.head,
html[data-theme="dark"] .count,
html[data-theme="dark"] .row dt,
html[data-theme="dark"] .sb-val,
html[data-theme="dark"] .cd-label,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .tchip,
html[data-theme="dark"] .maint-badge,
html[data-theme="dark"] .tag.member { color: var(--c3); }

/* elementos com fundo branco fixo */
html[data-theme="dark"] .tag.member,
html[data-theme="dark"] .maint-badge { background: var(--c1); border-color: rgba(155, 200, 255, .4); }
html[data-theme="dark"] .tag.admin { color: #121a33; background: var(--c3); border-color: var(--c3); }
html[data-theme="dark"] .maint-badge.on { color: #fff; background: #d32f2f; border-color: #d32f2f; }
html[data-theme="dark"] .maint-text { background: rgba(18, 26, 51, .85); }
html[data-theme="dark"] .maint-text.until { color-scheme: dark; }
html[data-theme="dark"] .toast { box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .theme-toggle { box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .side-logout:hover { color: #ff7b7b; border-color: #ff7b7b; background: rgba(255, 123, 123, .1); }

/* Botão de tema dentro da barra de status (paineladmin): fixo no canto direito da barra */
.theme-toggle.in-bar {
  position: static; margin-left: auto; flex: none;
  width: 38px; height: 38px; box-shadow: none;
}
.theme-toggle.in-bar:hover { box-shadow: 0 4px 14px rgba(59, 120, 200, .3); }
html[data-theme="dark"] .theme-toggle.in-bar { box-shadow: none; }

/* Tokens: botões pequenos na tabela */
.tbl .tchip { padding: 4px 10px; font-size: .74rem; }
select.maint-text { cursor: pointer; }

/* Conta: selo "Vinculado" + dias de VIP lado a lado */
.conta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vip-chip {
  padding: 6px 12px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap;
  color: #fff; background: linear-gradient(135deg, var(--c4), #5a9be0); border: 1px solid var(--c4);
  box-shadow: 0 2px 10px rgba(59, 120, 200, .35);
}
.vip-chip[hidden] { display: none; }

/* Usuário: ao passar o mouse, mostra o nickname no lugar do @ */
.swap { cursor: default; display: grid; }
.swap > span { grid-area: 1 / 1; transition: opacity .2s, transform .2s; }
.swap .swap-b { opacity: 0; transform: translateY(6px); color: var(--c4); }
.swap:hover .swap-a, .swap:focus-visible .swap-a { opacity: 0; transform: translateY(-6px); }
.swap:hover .swap-b, .swap:focus-visible .swap-b { opacity: 1; transform: none; }
.swap:focus-visible { outline: none; }

/* o atributo hidden precisa vencer o display do menu/selo/abas */
.side-menu[hidden], .vip-chip[hidden], .stage [hidden] { display: none !important; }
.vip-chip.free { color: #2a5a9e; background: var(--c1); border-color: var(--c3); box-shadow: none; }
html[data-theme="dark"] .vip-chip.free { color: var(--c3); background: rgba(155, 200, 255, .1); }


/* Comandos Bot: lista + prévia no estilo do Discord */
#cmd-badge.on { color: #fff; background: #1f9d55; border-color: #1f9d55; }
.cmd-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 22px; max-width: 640px; }
.cmd { padding-bottom: 22px; border-bottom: 1px solid rgba(59, 120, 200, .25); overflow-wrap: anywhere; }
.cmd-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.cmd-head strong { font-family: "Cascadia Mono", Consolas, monospace; font-size: 1.1rem; color: var(--c4); }
.cmd-head span { font-size: .92rem; }
.cmd-prev { margin: 14px 0 8px; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: #2a5a9e; font-weight: 700; }
.dc-msg { display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px; background: #313338; color: #dbdee1; font-family: "Segoe UI", system-ui, sans-serif; }
.dc-av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--c4); }
.dc-body { min-width: 0; flex: 1; }
.dc-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.dc-top b { color: #fff; font-size: .95rem; }
.dc-top i { font-style: normal; font-size: .6rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: #5865f2; color: #fff; }
.dc-embed { max-width: 420px; margin-top: 6px; padding: 10px 14px 12px; border-radius: 4px; background: #2b2d31; border-left: 4px solid var(--c4); }
.dc-et { font-weight: 700; color: #fff; margin-bottom: 4px; }
.dc-ed { font-size: .9rem; white-space: pre-wrap; }
.dc-field { margin-top: 8px; font-size: .86rem; }
.dc-field b { display: block; color: #fff; }
.dc-ef { margin-top: 8px; font-size: .72rem; color: #949ba4; }
.maint-info code { font-family: "Cascadia Mono", Consolas, monospace; font-size: .86em; padding: 1px 6px; border-radius: 5px; background: rgba(155, 200, 255, .3); }

/* BOTS TOKEN: saída do bot */
#bt-badge.on { color: #fff; background: #1f9d55; border-color: #1f9d55; }
.bt-log {
  max-width: 760px; max-height: 260px; overflow: auto; margin: 6px 0 0; padding: 12px 14px; border-radius: 10px;
  font: .8rem/1.5 "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere;
  color: #dbdee1; background: #1e2130; border: 1px solid rgba(59, 120, 200, .35);
}

/* Comandos Bot: enviar para um canal */
.send-box { max-width: 640px; margin-top: 20px; padding-bottom: 8px; }
.send-box select { cursor: pointer; }

/* ===== Boas-vindas: editor + preview ===== */
.wl-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 6px; }
.wl-tabs .chip.on { background: var(--c4); color: #fff; border-color: var(--c4); }
.wl-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 460px); gap: 28px; align-items: start; margin-top: 10px; }
@media (max-width: 1000px) { .wl-grid { grid-template-columns: 1fr; } }
.wl-form { min-width: 0; }
.wl-form .field { margin-top: 14px; }
.wl-in { width: 100%; box-sizing: border-box; display: block; margin-top: 6px; resize: vertical; font-family: inherit; }
.wl-color { display: block; width: 64px; height: 36px; margin-top: 6px; padding: 0; border: 1px solid rgba(59, 120, 200, .35); border-radius: 8px; background: none; cursor: pointer; }
.wl-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .92rem; cursor: pointer; }
.wl-item { margin-top: 10px; padding: 12px; border: 1px solid rgba(59, 120, 200, .25); border-radius: 10px; display: grid; gap: 8px; justify-items: start; }
.wl-item .wl-in { margin-top: 0; }
.wl-item .wl-check { margin-top: 0; }
.wl-form > .chip { margin-top: 10px; }
.wl-side { position: sticky; top: 8px; min-width: 0; }
.wl-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 26px; }
.wl-emojis { max-height: 260px; overflow: auto; }
.wl-quick { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.wl-emo { width: 36px; height: 36px; display: grid; place-items: center; font-size: 1.2rem; border: 1px solid rgba(59, 120, 200, .25); border-radius: 8px; background: transparent; cursor: pointer; padding: 0; }
.wl-emo:hover { background: rgba(59, 120, 200, .15); }
.wl-emo img { width: 24px; height: 24px; }
.wl-gname { margin: 10px 0 6px; font-size: .78rem; font-weight: 700; opacity: .75; }
/* preview estilo Discord */
#wl-preview .dc-msg { max-width: 460px; }
.wl-embed { display: flex; gap: 12px; max-width: 440px; }
.dc-em-main { min-width: 0; flex: 1; }
.dc-thumb { flex: none; width: 64px; }
.dc-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.dc-eauth { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: .85rem; font-weight: 700; color: #fff; }
.dc-fields { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.dc-fields .dc-field { flex: 1 1 100%; }
.dc-fields .dc-field.inl { flex: 1 1 30%; min-width: 110px; }
.dc-eimg { display: block; max-width: 100%; max-height: 240px; margin-top: 10px; border-radius: 6px; }
.dc-ef { display: flex; align-items: center; gap: 6px; }
.dc-circle { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-weight: 700; }
.dc-circle.usr { background: linear-gradient(135deg, #9bc8ff, #3b78c8); }
.dc-circle.srv { background: #5865f2; }
.dc-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.dc-msg code, .dc-embed code { background: #1e1f22; border-radius: 3px; padding: 0 4px; font-size: .85em; }
.dc-msg a { color: #00a8fc; text-decoration: none; }
.emo { width: 1.375em; height: 1.375em; vertical-align: -0.3em; object-fit: contain; }
.dc-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 4px; background: #4e5058; color: #fff; font-size: .85rem; font-weight: 600; }
.dc-bemo { display: inline-flex; align-items: center; }
.dc-bext { font-size: .75rem; opacity: .8; }
.wl-empty { opacity: .6; font-style: italic; }
#wl-badge.on { color: #1b7a43; }

.dc-inside { margin-top: 10px; }

.dc-embed.card { background: #2b2d31; border-radius: 8px; padding: 14px 16px; }
.dc-sep { height: 1px; background: rgba(255,255,255,.12); margin: 10px 0 2px; }
.dc-embed.card .dc-btns { margin-top: 10px; }

/* ===== Autorole ===== */
.ar-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 10px; }
.ar-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 10px; border: 1px solid rgba(59, 120, 200, .35); border-radius: 999px; font-size: .9rem; }
.ar-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ar-x { width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(59, 120, 200, .18); color: inherit; cursor: pointer; line-height: 1; font-size: 1rem; }
.ar-x:hover { background: rgba(200, 60, 60, .35); }
#ar-badge.on { color: #1b7a43; }
#view-autorole .wl-check { margin-top: 18px; }

/* ===== Lock ===== */
.lk-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 8px; }
.lk-list { max-height: 340px; overflow: auto; max-width: 560px; border: 1px solid rgba(59, 120, 200, .25); border-radius: 10px; padding: 6px 12px 10px; margin-bottom: 8px; }
.lk-cat { margin: 12px 0 4px; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.lk-row { display: flex; align-items: center; gap: 10px; padding: 5px 4px; border-radius: 6px; cursor: pointer; }
.lk-row:hover { background: rgba(59, 120, 200, .1); }
.lk-row.locked span { opacity: .85; }
.lk-tag { margin-left: auto; font-style: normal; font-size: .78rem; opacity: .75; }
.lk-row.locked .lk-tag { color: #c0392b; opacity: 1; font-weight: 700; }
#lk-badge.on { color: #c0392b; }
#view-lock .wl-check { margin-top: 16px; }

.lk-sub { margin: 34px 0 6px; font-size: 1.05rem; }
#lk-editor-slot { margin-top: 6px; }

/* ===== Presence ===== */
.pr-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, 380px); gap: 28px; align-items: start; margin-top: 14px; }
@media (max-width: 900px) { .pr-grid { grid-template-columns: 1fr; } }
.pr-side .chip { margin-top: 10px; }
.pr-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: #2b2d31; color: #dbdee1; font-family: "Segoe UI", system-ui, sans-serif; }
.pr-av { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--c4); display: grid; place-items: center; color: #fff; font-weight: 700; }
.pr-av i { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid #2b2d31; background: #3ba55d; }
.pr-txt { display: grid; min-width: 0; }
.pr-txt b { color: #fff; font-size: .95rem; }
.pr-act { font-size: .82rem; color: #b5bac1; overflow-wrap: anywhere; }
.pr-item { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.pr-item input[type=text] { flex: 1 1 220px; min-width: 0; }
#pr-badge.on { color: #1b7a43; }
#view-presence .wl-check { margin-top: 14px; }

/* ===== Cargos por botão ===== */
.dc-btn.rr-s-primary { background: #5865f2; }
.dc-btn.rr-s-success { background: #248046; }
.dc-btn.rr-s-danger { background: #da373c; }
.dc-btn.rr-s-secondary { background: #4e5058; }
#rr-badge.on { color: #1b7a43; }
#rr-form .wl-item .wl-in { max-width: 100%; }

.rr-eph { margin-top: 6px; font-size: .75rem; color: #949ba4; }
#rr-replies .dc-msg { max-width: 460px; }

/* ===== Biblioteca de emojis ===== */
.em-add { max-width: 640px; margin-top: 16px; }
.em-add .until-row { margin-top: 8px; }
.em-prev { width: 48px; height: 48px; object-fit: contain; border: 1px solid rgba(59, 120, 200, .3); border-radius: 8px; padding: 2px; }
.em-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; margin-top: 22px; }
.em-card { border: 1px solid rgba(59, 120, 200, .3); border-radius: 12px; padding: 12px; display: grid; gap: 10px; align-content: start; }
.em-top { display: flex; align-items: center; gap: 12px; }
.em-img { width: 48px; height: 48px; object-fit: contain; flex: none; }
.em-name { flex: 1; min-width: 0; }
.em-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.em-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(59, 120, 200, .3); opacity: .8; }
.em-tag.on { background: rgba(59, 120, 200, .15); opacity: 1; }
.em-tag .ar-x { width: 18px; height: 18px; font-size: .8rem; }
.em-acts { display: flex; flex-wrap: wrap; gap: 6px; }
#em-badge.on { color: #1b7a43; }

/* ===== Menu lateral em grupos ===== */
.side-group { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 14px; padding: 8px 8px 6px; font: inherit; font-size: .68rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #2a5a9e; background: transparent; border: 0; border-bottom: 1px solid rgba(155, 200, 255, .55); cursor: pointer; }
.side-group:first-child { margin-top: 0; }
.side-group i { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.side-group[aria-expanded="false"] i { transform: rotate(-45deg); }
.side-group:hover { color: var(--c4); }
html[data-theme="dark"] .side-group { color: #9bc8ff; }
.side-grp { display: flex; flex-direction: column; }

/* ===== Menu de comandos ===== */
.cm-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0 6px; }
.cm-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-cats .chip.on { background: var(--c4); color: #fff; border-color: var(--c4); }
.cm-warn { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(224, 160, 48, .6); background: rgba(224, 160, 48, .12); font-size: .9rem; max-width: 760px; }
.cm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-top: 16px; max-width: 1100px; }
.cm-card { border: 1px solid rgba(59, 120, 200, .3); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
.cm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-name { font-family: "Cascadia Mono", Consolas, monospace; font-size: 1.1rem; font-weight: 700; color: var(--c4); }
.cm-cat, .cm-perm, .cm-reg { font-size: .72rem; padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(59, 120, 200, .3); }
.cm-reg.ok { border-color: rgba(27, 122, 67, .5); color: #1b7a43; }
.cm-reg.warn { border-color: rgba(224, 160, 48, .7); color: #a36a00; }
.cm-desc { margin: 0; font-size: .92rem; }
.cm-line { margin: 0; font-size: .85rem; }
.cm-subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .84rem; }
.cm-subs code, .cm-param { font-family: "Cascadia Mono", Consolas, monospace; font-size: .8rem; }
.cm-param { padding: 0 5px; margin-left: 4px; border-radius: 4px; background: rgba(59, 120, 200, .14); }
.cm-sd { opacity: .8; }
.cm-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
#cm-badge.on { color: #1b7a43; }

/* --- correções: título dos grupos do menu e linhas dos subcomandos --- */
.side-group { -webkit-appearance: none; appearance: none; border: 0; border-bottom: 1px solid rgba(155, 200, 255, .55); border-radius: 0; background: transparent; box-shadow: none; outline: none; text-align: left; }
.side-group i { display: none; }
.side-group::after { content: "\25BE"; font-size: .95rem; letter-spacing: 0; line-height: 1; transition: color .2s; }
.side-group[aria-expanded="false"]::after { content: "\25B8"; }
.side-group:hover { background: rgba(155, 200, 255, .12); }
.side-group:focus-visible { outline: 2px solid var(--c4); outline-offset: -2px; }
.cm-list { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.cm-card { min-width: 0; overflow-wrap: anywhere; }
.cm-subs { gap: 10px; }
.cm-sub { display: grid; gap: 3px; padding-bottom: 8px; border-bottom: 1px dashed rgba(59, 120, 200, .2); }
.cm-sub:last-child { border-bottom: 0; padding-bottom: 0; }
.cm-sub .cm-cmd { justify-self: start; font-weight: 700; }
.cm-sub .cm-params { display: flex; flex-wrap: wrap; gap: 4px; }
.cm-sub .cm-param { margin-left: 0; }
.cm-sub .cm-sd { opacity: .75; font-size: .82rem; }

/* garante que qualquer elemento com o atributo hidden realmente suma (inclusive os grupos do menu lateral) */
[hidden] { display: none !important; }

/* ===== Tickets ===== */
.tk-h { margin: 26px 0 4px; font-size: 1.02rem; }
.tk-prev { margin-bottom: 16px; }
.tk-prev-t { margin: 0 0 6px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.tk-menu { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 9px 12px; border-radius: 6px; background: #1e1f22; color: #b5bac1; font-size: .85rem; border: 1px solid #3f4147; }
.tk-opts { margin-top: 8px; border-radius: 6px; background: #1e1f22; border: 1px solid #3f4147; overflow: hidden; }
.tk-opt { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid #2b2d31; font-size: .85rem; }
.tk-opt:last-child { border-bottom: 0; }
.tk-opt b { display: block; color: #fff; font-weight: 600; }
.tk-opt span { color: #949ba4; font-size: .76rem; }
.tk-oe { font-size: 1.1rem; min-width: 22px; text-align: center; }
.tk-summary { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid rgba(59, 120, 200, .3); border-radius: 10px; font-size: .9rem; }
.tk-line { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .08); }
.tk-line:first-of-type { border-top: 0; }
#tk-badge.on { color: #1b7a43; }
#tk-pages { margin-top: 18px; }
#tk-pages .chip.on { background: var(--c4); color: #fff; border-color: var(--c4); }

.dc-ef.tk-head { margin: 8px 0 2px; }

/* ===== Simulação interativa do ticket ===== */
.tk-sim { display: grid; gap: 10px; }
.tk-simbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .78rem; opacity: .85; }
.tk-simbar span { flex: 1 1 200px; }
.tk-click { cursor: pointer; }
.tk-click.dc-btn:hover { filter: brightness(1.12); }
.tk-click.dc-btn:active { transform: translateY(1px); }
.tk-menu.tk-click:hover { border-color: #5865f2; }
.tk-drop { margin-top: 6px; border-radius: 6px; background: #1e1f22; border: 1px solid #3f4147; overflow: hidden; max-height: 260px; overflow-y: auto; }
.tk-drop-i { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #2b2d31; font-size: .85rem; color: #dbdee1; }
.tk-drop-i:last-child { border-bottom: 0; }
.tk-drop-i.tk-click:hover { background: #35373c; }
.tk-drop-i b { color: #fff; font-weight: 600; display: block; }
.tk-drop-i span:not(.tk-oe) { color: #949ba4; font-size: .76rem; display: block; }
.tk-bub .dc-ed { white-space: normal; }
.tk-tag { margin-left: 6px; font-size: .62rem; padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .12); color: #b5bac1; }
.tk-eph { border-left: 3px solid #5865f2; padding-left: 8px; }
.tk-x { margin-top: 6px; background: transparent; border: 0; color: #00a8fc; cursor: pointer; font-size: .78rem; padding: 0; }
.tk-closed { padding: 10px 14px; border-radius: 8px; background: rgba(217, 83, 79, .15); border: 1px solid rgba(217, 83, 79, .45); font-size: .85rem; }

.tk-chip { display: grid; gap: 6px; }
.tk-chip-t { margin: 4px 0 0; font-size: .7rem; opacity: .7; }

.ct-list { display: grid; gap: 14px; margin: 12px 0; }
.ct-card { border: 1px solid rgba(59, 120, 200, .3); border-radius: 14px; padding: 14px; background: color-mix(in srgb, var(--c2) 45%, transparent); color: var(--c5); display: grid; gap: 6px; }
.ct-card .field { color: var(--c5); }
.ct-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ct-card .maint-text { width: 100%; box-sizing: border-box; }
.ct-prev { padding: 10px; border-radius: 10px; background: #313338; }
.ct-chan { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 6px; background: #404249; color: #dbdee1; font: 500 .95rem/1.2 system-ui, sans-serif; }
.ct-chan i { font-style: normal; opacity: .7; }

.sp-note-row { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.sp-note-row > div { flex: 1; min-width: 0; }
.sp-note-row img { width: 84px; height: 84px; object-fit: contain; border-radius: 8px; flex: none; }

.bot-pick { margin: 10px 0 4px; display: grid; gap: 4px; }
.bot-pick .eyebrow { font-size: .62rem; }
.bot-pick select { width: 100%; box-sizing: border-box; padding: 8px 10px; }
.cl-pre { margin: 8px 0; padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, .25); color: inherit; overflow-x: auto; user-select: all; font-size: .85rem; }

.tk-txt .tk-inline { margin-top: 10px; }
.tk-txt .until-row { margin-top: 8px; align-items: center; }

/* Registro: cada mensagem com o editor de um lado e o preview do outro */
.rg-msgrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin: 14px 0; padding: 12px; border: 1px solid rgba(155, 200, 255, .22); border-radius: 14px; }
.rg-msgedit, .rg-msgprev { min-width: 0; }
.rg-msgedit .until-row { margin-top: 8px; }
.rg-msgprev { position: sticky; top: 12px; }
@media (max-width: 960px) { .rg-msgrow { grid-template-columns: 1fr; } .rg-msgprev { position: static; } }

/* ===== Login em duas colunas: formulário à esquerda, painel com a pintura em ASCII à direita ===== */
body.split { display: block; overflow: hidden; }
body.split .login { display: grid; grid-template-columns: minmax(340px, 42%) 1fr; place-items: stretch; min-height: 100vh; padding: 0; }
.login-side { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 28px clamp(20px, 4vw, 56px); position: relative; }
.brand-row { position: absolute; top: 28px; left: clamp(20px, 3vw, 44px); display: flex; align-items: center; gap: 9px; font-weight: 300; letter-spacing: .04em; color: var(--c5); }
.brand-row b { font-weight: 700; color: var(--c4); }
.brand-row svg { color: var(--c4); }
/* quadrado de vidro (blur transparente) atrás do login: os quadrados do fundo não atrapalham o texto */
body.split .card {
  max-width: 400px; padding: 40px 34px 30px; border-radius: 24px;
  background: rgba(255, 255, 255, .45); border: 1px solid rgba(59, 120, 200, .28);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 18px 50px rgba(26, 35, 64, .14), inset 0 1px 0 rgba(255, 255, 255, .7);
}
html[data-theme="dark"] body.split .card {
  background: rgba(14, 22, 44, .5); border-color: rgba(155, 200, 255, .22);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
}
body.split .logo { display: none; }
body.split .foot { margin-top: 18px; }

.art-panel {
  position: relative; overflow: hidden; margin: 14px 14px 14px 0; border-radius: 22px; min-height: calc(100vh - 28px);
  background: linear-gradient(165deg, #e4efff, #b9d6fb); border: 1px solid rgba(59, 120, 200, .3);
}
.art-panel canvas, .art-real { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.art-real {
  inset: 7% 2% 19% 2%; width: 96%; height: 74%;   /* mesma folga do arte.js; fica ATRÁS das letras */
  background-size: contain; background-position: center; background-repeat: no-repeat; --mx: 50%; --my: 38%;
  filter: grayscale(1) sepia(1) hue-rotate(172deg) saturate(2.6) brightness(1.15) contrast(.95);
  -webkit-mask-image: radial-gradient(circle 120px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, .9) 50%, transparent 100%);
          mask-image: radial-gradient(circle 120px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, .9) 50%, transparent 100%);
}
body.art-ready .art-panel canvas { opacity: 1; }
.art-real { transition: opacity .25s ease; }
body.art-ready .art-real.on { opacity: 1; }   /* a lente só aparece com o mouse em cima do painel */
.art-tag {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 24px 30px; text-align: center; font-size: clamp(1rem, 1.7vw, 1.4rem); font-weight: 600; line-height: 1.35; color: #fff;
  background: linear-gradient(to top, rgba(10, 18, 40, .78), transparent); text-shadow: 0 2px 14px rgba(0, 0, 0, .5); pointer-events: none;
}
html[data-theme="dark"] .art-panel { background: linear-gradient(165deg, #0d1426, #070a14); border-color: rgba(155, 200, 255, .16); }
html[data-theme="dark"] .art-real { filter: grayscale(1) sepia(1) hue-rotate(172deg) saturate(3.2) brightness(.95) contrast(1.05); }
html[data-theme="dark"] .brand-row { color: #eef4ff; }
html[data-theme="dark"] .brand-row b, html[data-theme="dark"] .brand-row svg { color: #9bc8ff; }

@media (max-aspect-ratio: 1/1), (max-width: 820px) {
  body.split { overflow: auto; }
  body.split .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .art-panel { order: -1; min-height: 42vh; margin: 12px 12px 0; }
  .login-side { padding: 28px 22px 34px; }
  .brand-row { display: none; }
  body.split .foot { display: block; }
}

/* nome no canto: onda leve passando pelas letras (sempre ligada: é um movimento pequeno e suave) */
.brand-row .wave span { display: inline-block; animation: brandWave 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.16s); }
@keyframes brandWave {
  0%, 100% { transform: translateY(3px); opacity: .75; }
  50%      { transform: translateY(-3px); opacity: 1; }
}

/* painel em forma de terminal: barra no topo e texto digitado embaixo (a arte continua igual) */
.term-bar { position: absolute; top: 0; left: 0; right: 0; height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 14px;
  background: rgba(8, 14, 30, .72); border-bottom: 1px solid rgba(155, 200, 255, .15); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 2; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; opacity: .85; }
.term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font: 12px/1 ui-monospace, Consolas, "Courier New", monospace; color: rgba(190, 215, 255, .7); letter-spacing: .02em; }
.term { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2; padding: 12px 16px; border-radius: 12px; min-height: 92px;
  background: rgba(8, 14, 30, .78); border: 1px solid rgba(155, 200, 255, .2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 13px/1.65 ui-monospace, Consolas, "Courier New", monospace; color: #bcd6ff; text-align: left; pointer-events: none; }
.term .p { color: #5eead4; margin-right: 8px; } .term .ok { color: #4ade80; margin-right: 8px; }
.term .ln { white-space: pre-wrap; }
.term .cur { display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -.18em; background: #9bc8ff; animation: curBlink 1s steps(1) infinite; }
@keyframes curBlink { 50% { opacity: 0; } }
@media (max-aspect-ratio: 1/1), (max-width: 820px) { .term { font-size: 11.5px; padding: 9px 12px; min-height: 0; } .term-bar { height: 30px; } }

/* voltou do Discord: confirmando a conta (botão parado) e, logo depois, só o símbolo do Discord fica verde */
.btn-discord.verifying, .btn-discord.dc-ok { animation: none; pointer-events: none; }
.btn-discord.dc-ok .icon { color: #22c55e; filter: drop-shadow(0 0 7px rgba(34, 197, 94, .75)); animation: linkPop .7s cubic-bezier(.2, .9, .3, 1.4) both; }
@keyframes linkPop { 0% { transform: scale(1); } 45% { transform: scale(1.35) rotate(-8deg); } 100% { transform: scale(1.1); } }
body { transition: opacity .45s ease, transform .45s ease; }
body.leaving { opacity: 0; transform: scale(.985); }

/* terminal da página de login do admin: a senha é digitada no próprio terminal */
.term.term-live { pointer-events: auto; cursor: text; }
.term .typed { color: #fff; font-weight: 600; letter-spacing: .06em; white-space: pre; }
.term .bad { color: #f87171; margin-right: 8px; }
.term .dim { color: rgba(188, 214, 255, .55); }
.term input.hid { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; pointer-events: none; }
.term.shake { animation: termShake .35s; }
@keyframes termShake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.term .ln:has(.paste) { display: flex; align-items: center; }
.term .paste { margin-left: auto; padding: 0 2px; border: 0; background: transparent; cursor: pointer; font: inherit; color: rgba(155, 200, 255, .6); transition: color .2s; }
.term .paste:hover, .term .paste:focus-visible { color: #9bc8ff; text-decoration: underline; outline: none; }

/* botão de tema (sol/lua): fora do terminal, no canto inferior ESQUERDO, nas páginas de entrada e de admin */
body.split .theme-toggle { right: auto; left: 20px; bottom: 20px; }
@media (max-aspect-ratio: 1/1), (max-width: 820px) { body.split .login { padding-bottom: 76px; } }   /* espaço para o botão de tema não cobrir o cartão */

/* ===== Terminal do painel do membro (mesmo estilo do terminal da página de entrada) ===== */
.tw { max-width: 860px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(155, 200, 255, .22);
  background: rgba(8, 14, 30, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(8, 14, 30, .35); }
.tw-bar { height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: rgba(8, 14, 30, .92); border-bottom: 1px solid rgba(155, 200, 255, .15); }
.tw-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; opacity: .85; }
.tw-bar i:nth-child(2) { background: #febc2e; } .tw-bar i:nth-child(3) { background: #28c840; }
.tw-bar span { margin-left: 10px; font: 12px/1 ui-monospace, Consolas, "Courier New", monospace; color: rgba(190, 215, 255, .7); letter-spacing: .02em; }
.tw-body { padding: 18px 22px 22px; min-height: 340px; font: 13.5px/1.8 ui-monospace, Consolas, "Courier New", monospace; color: #bcd6ff; text-align: left; }
.tw .grp { margin-bottom: 10px; }
.tw .ln { white-space: pre-wrap; overflow-wrap: anywhere; }
.tw .res { padding-left: 2ch; animation: twIn .35s ease both; }
@keyframes twIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.tw .p { color: #5eead4; }
.tw .ok { color: #4ade80; } .tw .bad { color: #f87171; } .tw .dim { color: rgba(188, 214, 255, .55); }
.tw .k { display: inline-block; min-width: 13ch; color: #7db4f5; }
.tw .k::after { content: " :"; opacity: .6; }
.tw .v { color: #fff; } .tw .v.strong { font-weight: 700; }
.tw .cmd { color: #fff; }
.tw .cur { display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -.18em; background: #9bc8ff; animation: curBlink 1s steps(1) infinite; }
@media (max-width: 640px) { .tw-body { font-size: 12.5px; padding: 14px 14px 18px; } .tw .k { min-width: 0; display: block; } .tw .k::after { content: ""; } }

/* neofetch: foto de perfil à esquerda e as informações ao lado */
.tw .nf { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; margin-top: 4px; }
.tw .nf-pic { flex: 0 0 168px; }
.tw .nf-pic img, .tw .nf-ph { width: 168px; height: 168px; border-radius: 12px; display: block; object-fit: cover; border: 1px solid rgba(155, 200, 255, .35);
  box-shadow: 0 0 0 4px rgba(155, 200, 255, .08), 0 10px 30px rgba(0, 0, 0, .4); }
.tw .nf-ph { display: grid; place-items: center; font-size: 3rem; color: rgba(155, 200, 255, .4); background: rgba(155, 200, 255, .06); }
.tw .nf-ph[hidden], .tw .nf-pic img[hidden] { display: none; }
.tw .nf-info { flex: 1 1 320px; min-width: 0; }
.tw .nf-head { font-size: 1.05em; }
.tw .nf-head .v { color: #9bc8ff; } .tw .nf-host { color: #5eead4 !important; }
.tw .nf-rule { height: 0; border-top: 1px dashed rgba(155, 200, 255, .35); margin: 4px 0 8px; }
.tw .nf-pal { display: flex; gap: 0; margin-top: 12px; }
.tw .nf-pal i { width: 26px; height: 16px; }
.tw .nf-pal i:nth-child(1) { background: #0b1226; } .tw .nf-pal i:nth-child(2) { background: #1d3a73; } .tw .nf-pal i:nth-child(3) { background: #2f5fb3; }
.tw .nf-pal i:nth-child(4) { background: #3b78c8; } .tw .nf-pal i:nth-child(5) { background: #5eb0ff; } .tw .nf-pal i:nth-child(6) { background: #9bc8ff; }
.tw .nf-pal i:nth-child(7) { background: #5eead4; } .tw .nf-pal i:nth-child(8) { background: #4ade80; }
@media (max-width: 640px) { .tw .nf-pic { flex-basis: 100%; } .tw .nf-pic img, .tw .nf-ph { width: 120px; height: 120px; } }

/* prompt de ativação do terminal do membro */
.tw .tw-prompt { display: flex; align-items: center; cursor: text; }
.tw .tw-prompt[hidden] { display: none; }
.tw .typed { color: #fff; font-weight: 600; letter-spacing: .04em; white-space: pre; margin-left: .2em; }
.tw .ghost { margin-left: .5ch; color: rgba(188, 214, 255, .4); }
.tw .ghost[hidden] { display: none; }
.tw .paste { margin-left: auto; padding: 0 2px; border: 0; background: transparent; cursor: pointer; font: inherit; color: rgba(155, 200, 255, .6); transition: color .2s; }
.tw .paste:hover, .tw .paste:focus-visible { color: #9bc8ff; text-decoration: underline; outline: none; }
.tw input.hid { position: absolute; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; pointer-events: none; }
.tw-body { position: relative; }
.tw .tw-prompt .p { margin-right: 1ch; }

/* menu estilo terminal (páginas VIP 1, 2 e 3) */
.tw .tw-menu { margin: 2px 0 4px 2ch; outline: none; }
.tw .tw-menu[hidden], .tw .tw-hint[hidden], .tw .ln[hidden] { display: none; }
.tw .mi { display: flex; gap: .6ch; padding: 1px 10px 1px 4px; width: max-content; min-width: 17ch; border-radius: 6px; cursor: pointer; color: rgba(188, 214, 255, .6); transition: background .15s, color .15s; }
.tw .mi .mk { display: inline-block; width: 1.2ch; color: #5eead4; }
.tw .mi .n { color: #7db4f5; }
.tw .mi.on { color: #fff; background: rgba(155, 200, 255, .13); }
.tw .tw-menu:focus-visible .mi.on { outline: 1px solid rgba(155, 200, 255, .45); }
.tw .tw-hint { margin-left: 2ch; font-size: .92em; }
.tw .cmd { padding: 0; border: 0; overflow-wrap: normal; }   /* o estilo global .cmd (lista de comandos do admin) não vale aqui */
