/* ============================================================
   SubNess — painel administrativo (adm24.html)
   ============================================================ */
.admin-body { background: radial-gradient(900px 620px at 10% -8%, rgba(124, 77, 255, .12), transparent 60%), radial-gradient(760px 520px at 100% 0%, rgba(255, 61, 113, .07), transparent 60%), #050911; }

/* ---------------- login ---------------- */
.admin-gate { position: relative; min-height: 100vh; display: flex; flex-direction: column; padding: 20px 22px 30px; overflow: hidden; }
.admin-gate[hidden] { display: none; }
.ag-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ag-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(126, 162, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 162, 255, .045) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(62% 55% at 50% 12%, #000, transparent 78%);
  mask-image: radial-gradient(62% 55% at 50% 12%, #000, transparent 78%);
}
.ag-orb { position: absolute; border-radius: 50%; filter: blur(90px); }
.ag-orb.o1 { width: 470px; height: 470px; left: -6%; top: -12%; background: rgba(124, 77, 255, .22); }
.ag-orb.o2 { width: 380px; height: 380px; right: -5%; top: 24%; background: rgba(47, 128, 255, .16); }
.ag-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1120px; width: 100%; margin: 0 auto; }
.ag-top .brand { font-size: 18px; }
.ag-top .brand-mark { width: 34px; height: 34px; }
.ag-top .brand-mark svg { width: 16px; height: 16px; }
.ag-wrap { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 34px 0 10px; }
.ag-card {
  width: min(430px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(126, 162, 255, .18);
  background: radial-gradient(100% 60% at 50% 0%, rgba(124, 77, 255, .1), transparent 60%), linear-gradient(180deg, rgba(13, 22, 41, .96), rgba(6, 11, 21, .98));
  box-shadow: 0 34px 90px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: 27px 26px 20px;
  position: relative;
  overflow: hidden;
  animation: agIn .5s var(--ease);
}
@keyframes agIn { from { opacity: 0; transform: translateY(16px) scale(.99); } to { opacity: 1; transform: none; } }
.ag-card::before { content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 2px; background: linear-gradient(90deg, transparent, #7c4dff, #2f80ff, transparent); }
.ag-head { text-align: center; display: grid; justify-items: center; gap: 4px; margin-bottom: 21px; }
.ag-shield {
  width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .14), transparent 60%), linear-gradient(145deg, rgba(124, 77, 255, .32), rgba(47, 128, 255, .18));
  border: 1px solid rgba(160, 130, 255, .4);
  color: #d9ccff;
  box-shadow: 0 0 40px rgba(124, 77, 255, .22);
  margin-bottom: 7px;
}
.ag-kicker { font-size: 8px; font-weight: 800; letter-spacing: .2em; color: #8e7bd0; }
.ag-head h1 { font-size: 25px; letter-spacing: -.035em; }
.ag-head p { font-size: 11.5px; color: #8494b3; line-height: 1.6; max-width: 330px; margin-top: 5px; }
.ag-fields { display: grid; gap: 13px; }
.ag-fields .field > label { font-size: 10.5px; }
.ag-fields .input-wrap { position: relative; }
.ag-fields .input-wrap > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #5b6b8a; pointer-events: none; }
.ag-fields .input-wrap input { width: 100%; min-height: 48px; padding: 0 44px 0 40px; border-radius: 12px; border: 1px solid rgba(126, 162, 255, .18); background: rgba(5, 10, 20, .82); color: var(--txt); font-size: 13px; outline: none; transition: border-color .18s, box-shadow .18s; }
.ag-fields .input-wrap input:focus { border-color: rgba(124, 77, 255, .65); box-shadow: 0 0 0 3px rgba(124, 77, 255, .14); }
.ag-fields .input-wrap input::placeholder { color: #4c5c7a; }
.toggle-pass { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: #647491; display: grid; place-items: center; }
.toggle-pass:hover { color: #c5d3ea; background: rgba(255, 255, 255, .05); }
.toggle-pass svg { width: 16px; height: 16px; }
.ag-error { display: none; padding: 9px 11px; border-radius: 9px; background: rgba(255, 71, 87, .08); border: 1px solid rgba(255, 71, 87, .24); color: #ff9aa3; font-size: 11px; line-height: 1.5; }
.ag-error.show { display: block; animation: shake .3s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.ag-default { margin-top: 16px; padding: 13px; border-radius: 12px; border: 1px dashed rgba(255, 196, 61, .28); background: rgba(255, 196, 61, .035); display: grid; gap: 10px; }
.ag-default[hidden] { display: none; }
.agd-head { display: flex; align-items: flex-start; gap: 8px; }
.agd-head > svg { color: #ffd77a; margin-top: 1px; flex: none; }
.agd-head b { display: block; font-size: 11px; color: #ffe3a8; }
.agd-head p { font-size: 9.5px; color: #9a8a63; line-height: 1.45; margin-top: 1px; }
.agd-rows { display: flex; gap: 7px; flex-wrap: wrap; }
.agd-rows span { flex: 1; min-width: 120px; padding: 7px 9px; border-radius: 8px; background: rgba(2, 6, 12, .45); border: 1px solid rgba(255, 196, 61, .12); font-size: 8.5px; color: #9a8a63; }
.agd-rows b { display: block; font-family: ui-monospace, monospace; font-size: 10.5px; color: #ffe3a8; margin-top: 2px; word-break: break-all; }
.ag-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 19px; padding-top: 14px; border-top: 1px solid rgba(126, 162, 255, .09); font-size: 9px; color: #566784; flex-wrap: wrap; }
.ag-foot span, .ag-foot a { display: inline-flex; align-items: center; gap: 5px; }
.ag-foot a:hover { color: #a9b9d8; }
.ag-note { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; color: #4f5f7c; text-align: center; }
.ag-note svg { flex: none; }

/* ---------------- shell ---------------- */
.admin-badge { height: 19px; padding: 0 7px; font-size: 7.5px; letter-spacing: .1em; }
.admin-live { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 99px; border: 1px solid rgba(46, 230, 168, .18); background: rgba(46, 230, 168, .05); font-size: 9px; color: #6fb9a4; white-space: nowrap; }
.admin-live .dot { width: 5px; height: 5px; }
.admin-health { border-color: rgba(124, 77, 255, .18); }
.sb-item .notif-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #ff3d71; box-shadow: 0 0 8px #ff3d71; }
.sb-item .notif-dot[hidden] { display: none; }

/* ---------------- toolbar ---------------- */
.admin-toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; flex-wrap: wrap; }
.admin-toolbar .searchbox { max-width: 360px; }
.admin-toolbar .links-meta { margin-left: auto; }
.admin-toolbar .btn { flex: none; }

/* ---------------- tabelas ---------------- */
.admin-table-wrap { border-radius: 15px; border: 1px solid var(--line); background: rgba(8, 13, 24, .45); overflow: hidden; }
.admin-table-wrap .table { min-width: 880px; }
.table .cell-avatar { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.table .cell-avatar .avatar { flex: none; box-shadow: 0 0 0 2px rgba(47, 128, 255, .18); }
.table .cell-avatar b { display: block; font-size: 12.5px; color: #e2e9fa; font-weight: 600; line-height: 1.25; }
.table .cell-avatar small { display: block; font-size: 10px; color: #61708f; margin-top: 2px; }
.table .owner-cell { display: flex; align-items: center; gap: 7px; min-width: 130px; }
.table .owner-cell .avatar { flex: none; }
.table .owner-cell b { font-size: 11.5px; font-weight: 600; color: #cfdcf3; }
.table .handle { font-size: 11px; color: #7f95ba; }
.table .muted-cell { color: #647391; font-size: 11px; }
.table .status-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; }
.table .status-dot i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.table .status-dot.on { color: #63e8bb; }
.table .status-dot.off { color: #8b9ab8; }
.table .status-dot.blocked { color: #ff8b95; }
.table .row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.table .row-actions .btn-icon { width: 30px; height: 30px; border-radius: 8px; }
.table .row-actions .btn-icon svg { width: 14px; height: 14px; }
.table .mini-thumb { width: 34px; height: 34px; border-radius: 8px; background-size: cover; background-position: center; display: grid; place-items: center; color: #fff; flex: none; border: 1px solid rgba(255, 255, 255, .12); overflow: hidden; }
.table .mini-thumb svg { width: 14px; height: 14px; }
.table .num.green { color: #6ee9c0; }
.table .num.gold { color: #ffd77a; }
.table .cell-dest { max-width: 210px; font-size: 10px; color: #61708f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-wrap .empty { border: 0; }

/* ---------------- dashboard ---------------- */
.admin-split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 13px; }
.health-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.health-cell { padding: 11px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, .018); display: grid; gap: 2px; }
.health-cell span { font-size: 8.5px; color: #61708f; text-transform: uppercase; letter-spacing: .06em; }
.health-cell b { font-family: var(--font-display); font-size: 19px; letter-spacing: -.02em; }
.health-cell small { font-size: 8.5px; color: #566784; }
.health-cell.green b { color: #63e8bb; }
.health-cell.pink b { color: #ff9bb3; }
.health-cell.gold b { color: #ffd77a; }
.health-cell.blue b { color: #8fc0ff; }

.mini-list { display: grid; gap: 5px; }
.mini-row { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-radius: 9px; transition: background .15s; }
.mini-row:hover { background: rgba(126, 162, 255, .04); }
.mini-row .mr-medal { width: 22px; text-align: center; font-size: 10px; font-weight: 800; color: #61708f; flex: none; }
.mini-row .mr-medal.gold { color: #ffd77a; }
.mini-row .mr-medal.silver { color: #c9d6ea; }
.mini-row .mr-medal.bronze { color: #f0a46e; }
.mini-row .avatar { flex: none; }
.mini-row .mr-body { flex: 1; min-width: 0; }
.mini-row .mr-body b { display: block; font-size: 11.5px; color: #dce5f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row .mr-body span { display: block; font-size: 9px; color: #5f7090; margin-top: 1px; }
.mini-row .mr-val { text-align: right; flex: none; }
.mini-row .mr-val b { display: block; font-size: 11.5px; color: #ffd77a; }
.mini-row .mr-val span { font-size: 8px; color: #5c6c89; }

/* ---------------- atividade ---------------- */
.activity-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.as-box { padding: 12px 13px; border-radius: 13px; border: 1px solid var(--line); background: rgba(8, 13, 24, .5); display: flex; align-items: center; gap: 10px; }
.as-box .as-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: rgba(47, 128, 255, .09); border: 1px solid rgba(47, 128, 255, .2); color: #7fb0ff; }
.as-box .as-ic svg { width: 15px; height: 15px; }
.as-box.pink .as-ic { background: rgba(255, 61, 113, .08); border-color: rgba(255, 61, 113, .2); color: #ff8ba0; }
.as-box.green .as-ic { background: rgba(46, 230, 168, .08); border-color: rgba(46, 230, 168, .2); color: #63e8bb; }
.as-box.gold .as-ic { background: rgba(255, 196, 61, .08); border-color: rgba(255, 196, 61, .22); color: #ffd77a; }
.as-box b { display: block; font-family: var(--font-display); font-size: 17px; line-height: 1; }
.as-box span { display: block; font-size: 8.5px; color: #61708f; margin-top: 3px; }

.event-feed { display: grid; gap: 4px; }
.ev-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.ev-row:hover { background: rgba(126, 162, 255, .035); border-color: var(--line); }
.ev-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: rgba(47, 128, 255, .09); border: 1px solid rgba(47, 128, 255, .2); color: #7fb0ff; }
.ev-ic svg { width: 15px; height: 15px; }
.ev-row.unlock .ev-ic { background: rgba(46, 230, 168, .08); border-color: rgba(46, 230, 168, .2); color: #63e8bb; }
.ev-body { flex: 1; min-width: 0; }
.ev-body b { display: block; font-size: 11.5px; color: #dce5f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-body b span { color: #8fb3e8; }
.ev-body small { display: block; font-size: 9px; color: #5f7090; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-time { text-align: right; flex: none; font-size: 9px; color: #566784; }
.ev-time b { display: block; font-size: 9px; font-weight: 600; color: #8494b3; }
.ev-type { flex: none; height: 19px; padding: 0 6px; border-radius: 5px; display: inline-flex; align-items: center; font-size: 7.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.ev-type.view { color: #8fc0ff; background: rgba(47, 128, 255, .1); border: 1px solid rgba(47, 128, 255, .22); }
.ev-type.unlock { color: #7df0c6; background: rgba(46, 230, 168, .09); border: 1px solid rgba(46, 230, 168, .22); }

/* ---------------- ranking ---------------- */
.admin-rank-table { margin-top: 16px; }
.admin-rank-table .table { min-width: 760px; }
.rank-pos { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; font-family: var(--font-display); font-size: 10px; font-weight: 800; color: #8fa3c7; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.rank-pos.p1 { color: #2a1900; background: linear-gradient(145deg, #ffd77a, #ff9d2e); border-color: transparent; }
.rank-pos.p2 { color: #0a1120; background: linear-gradient(145deg, #dfe9f8, #9db5d6); border-color: transparent; }
.rank-pos.p3 { color: #2a1508; background: linear-gradient(145deg, #f0a46e, #c97544); border-color: transparent; }

/* ---------------- configurações ---------------- */
.settings-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 13px; align-items: start; }
.settings-stack { display: grid; gap: 13px; }
.permission-list { display: grid; gap: 6px; }
.permission-row { display: flex; align-items: flex-start; gap: 8px; font-size: 10.5px; color: #8494b3; line-height: 1.5; }
.permission-row svg { width: 13px; height: 13px; color: #63e8bb; margin-top: 2px; flex: none; }
.permission-row.warn svg { color: #ffd77a; }
.sys-list { display: grid; gap: 0; }
.sys-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(126, 162, 255, .07); font-size: 10.5px; }
.sys-row:last-child { border-bottom: 0; }
.sys-row span { color: #61708f; flex: none; }
.sys-row b { color: #b7c6e4; font-weight: 600; text-align: right; word-break: break-all; font-family: ui-monospace, monospace; font-size: 10px; }
.backup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.backup-grid .btn { justify-content: flex-start; }
.settings-note { font-size: 9.5px; color: #5f7090; line-height: 1.55; margin-top: 8px; }

/* ---------------- responsivo ---------------- */
@media (max-width: 1180px) {
  .admin-split, .settings-grid { grid-template-columns: 1fr; }
  .activity-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .admin-gate { padding: 14px 12px 22px; }
  .ag-top .pill { display: none; }
  .ag-card { padding: 23px 17px 17px; }
  .ag-head h1 { font-size: 22px; }
  .admin-live { display: none; }
  .admin-toolbar .links-meta { margin-left: 0; width: 100%; }
  .health-grid, .backup-grid { grid-template-columns: 1fr; }
  .activity-summary { grid-template-columns: 1fr; }
  .ev-type { display: none; }
}
@media (max-width: 480px) {
  .ag-foot { justify-content: center; }
  .admin-toolbar .searchbox { max-width: none; }
  .admin-toolbar .filter-tabs { flex: 1; }
  .admin-toolbar .filter-tabs button { flex: 1; padding: 0 5px; }
}

/* impressão do relatório administrativo */
@media print {
  .sidebar, .app-topbar, .admin-toolbar, .view-actions, .row-actions, .sb-overlay { display: none !important; }
  .app-main { margin-left: 0; }
  .app-content { padding: 0; max-width: none; }
  body { background: #fff !important; color: #111 !important; }
  .panel-box, .admin-table-wrap, .stat-card { border-color: #ccc !important; background: #fff !important; box-shadow: none !important; }
  .table th, .table td { color: #111 !important; border-color: #ddd !important; }
}
