/* Painel administrativo organizado por janelas. */
.admin-nav-btn { position:relative; }
.admin-nav-btn::after {
  content:'ADMIN';
  position:absolute;
  right:8px;
  top:7px;
  padding:2px 5px;
  border-radius:4px;
  font-size:8px;
  line-height:1;
  font-weight:900;
  color:#211805;
  background:#e8bb48;
  box-shadow:0 1px 4px #0008;
}

.admin-view {
  width:min(1280px, calc(100vw - 230px));
  max-width:1280px;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.admin-main-title { margin-bottom:12px; }
.admin-badge {
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin-top:8px;
  padding:5px 10px;
  border:1px solid #d7aa3c;
  border-radius:999px;
  color:#ffe4a1;
  background:#4c3719;
  font-size:10px;
  font-weight:900;
  letter-spacing:.6px;
  white-space:nowrap;
}

/* Jogador sempre visível acima das janelas. */
.admin-player-bar {
  display:grid;
  grid-template-columns:minmax(190px,.65fr) minmax(240px,1fr) minmax(360px,1.25fr);
  align-items:center;
  gap:12px;
  margin-bottom:10px;
  padding:10px 12px;
  border:1px solid #6c5c3d;
  border-radius:10px;
  background:linear-gradient(180deg,#302b23,#221f1a);
  box-shadow:0 6px 18px #0004;
}
.admin-player-bar-label {
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  color:#f1d389;
}
.admin-player-bar-label > span { font-size:22px; }
.admin-player-bar-label div { min-width:0; }
.admin-player-bar-label small,
.admin-player-mini-stats small {
  display:block;
  color:#a9a18f;
  font-size:9px;
  font-weight:800;
  letter-spacing:.45px;
  text-transform:uppercase;
}
.admin-player-bar-label strong {
  display:block;
  overflow:hidden;
  color:#fff0c2;
  font-size:14px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.admin-player-select,
.admin-form-row input,
.admin-form-row select,
.admin-setting-control input,
.admin-console-input {
  width:100%;
  min-width:0;
  min-height:38px;
  border:1px solid #4e5965;
  border-radius:7px;
  color:#eef2f6;
  background:#101419;
  padding:8px 10px;
  outline:none;
}
.admin-player-select:focus,
.admin-form-row input:focus,
.admin-form-row select:focus,
.admin-setting-control input:focus,
.admin-console-input:focus {
  border-color:#d6aa45;
  box-shadow:0 0 0 2px #d6aa4526;
}
.admin-player-mini-stats {
  display:grid;
  grid-template-columns:.55fr .75fr 1.35fr;
  gap:7px;
}
.admin-player-mini-stats span {
  min-width:0;
  padding:6px 8px;
  border:1px solid #474137;
  border-radius:7px;
  background:#17191b;
}
.admin-player-mini-stats strong {
  display:block;
  overflow:hidden;
  margin-top:2px;
  color:#f4deb0;
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Navegação principal em separadores. */
.admin-tabs {
  display:flex;
  gap:6px;
  overflow-x:auto;
  margin-bottom:10px;
  padding:7px;
  border:1px solid #655b49;
  border-radius:10px;
  background:#181b1f;
  box-shadow:0 4px 14px #0003;
}
.admin-tab-btn {
  display:flex;
  flex:1 0 auto;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:125px;
  min-height:38px;
  padding:7px 12px;
  border:1px solid #3d444c;
  border-radius:7px;
  color:#c8cdd3;
  background:linear-gradient(#2a3036,#20252a);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  transition:transform .12s ease,border-color .12s ease,background .12s ease,color .12s ease;
}
.admin-tab-btn:hover {
  transform:translateY(-1px);
  border-color:#8c7440;
  color:#f1d389;
}
.admin-tab-btn.active {
  border-color:#d5a946;
  color:#2c210d;
  background:linear-gradient(#f0cf7b,#c9942e);
  box-shadow:inset 0 1px #fff6,0 2px 8px #0005;
}
.admin-tab-icon { font-size:15px; }
.admin-tab-content { min-height:350px; }

/* Janela ativa. */
.admin-window {
  overflow:hidden;
  border:1px solid #665a45;
  border-radius:11px;
  background:#1a1f25;
  box-shadow:0 8px 24px #0005;
}
.admin-window-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 14px;
  border-bottom:1px solid #665a45;
  background:linear-gradient(#3b3429,#2c2822);
}
.admin-window-title > div:first-child {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.admin-window-title h3 {
  margin:0;
  color:#f2d184;
  font-size:15px;
}
.admin-window-title p {
  margin:2px 0 0;
  color:#b8ae9b;
  font-size:10px;
}
.admin-window-icon { font-size:22px; }
.admin-window-body { padding:14px; }
.admin-window-body-flush { padding:0; }
.admin-note {
  margin:0 0 10px;
  color:#aeb6c0;
  font-size:12px;
  line-height:1.5;
}
.admin-note-highlight {
  padding:9px 11px;
  border-left:3px solid #bd9236;
  border-radius:4px;
  background:#11161b;
}

/* Resumo e atalhos. */
.admin-target-card {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}
.admin-stat {
  min-width:0;
  padding:9px 10px;
  border:1px solid #3b434d;
  border-radius:8px;
  background:#12161b;
}
.admin-stat small { display:block; color:#9099a5; font-size:9px; text-transform:uppercase; letter-spacing:.3px; }
.admin-stat strong {
  display:block;
  overflow:hidden;
  margin-top:4px;
  color:#f1e3bd;
  font-size:12px;
  line-height:1.35;
  text-overflow:ellipsis;
}
.admin-overview-actions {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}
.admin-shortcut {
  display:grid;
  grid-template-columns:34px 1fr;
  grid-template-rows:auto auto;
  gap:2px 8px;
  min-height:72px;
  padding:11px;
  border:1px solid #4b535d;
  border-radius:9px;
  color:#e8edf1;
  background:linear-gradient(145deg,#252b31,#171b20);
  text-align:left;
  cursor:pointer;
}
.admin-shortcut:hover { border-color:#c49b42; background:linear-gradient(145deg,#303238,#1b1d21); }
.admin-shortcut > span { grid-row:1 / 3; align-self:center; font-size:25px; text-align:center; }
.admin-shortcut strong { align-self:end; color:#f0d28d; font-size:12px; }
.admin-shortcut small { color:#9da7b0; font-size:9px; line-height:1.3; }

/* Recursos, tropas, ferramentas e equipamentos. */
.admin-control-groups {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:11px;
}
.admin-control-card {
  min-width:0;
  padding:12px;
  border:1px solid #3a434c;
  border-radius:9px;
  background:#13181d;
}
.admin-control-card-full { grid-column:1 / -1; }
.admin-control-card h4 {
  margin:0 0 9px;
  color:#ecd18f;
  font-size:12px;
}
.admin-control-card .admin-equipment-admin {
  margin-top:0;
  padding-top:0;
  border-top:0;
}
.admin-control-card .admin-equipment-admin > h4,
.admin-control-card .admin-equipment-admin > p { display:none; }
.admin-form-row {
  display:grid;
  grid-template-columns:minmax(130px,1fr) minmax(90px,.65fr) auto;
  gap:8px;
  align-items:end;
}
.admin-form-row.two { grid-template-columns:minmax(160px,1fr) auto; }
.admin-form-row.coords { grid-template-columns:1fr 1fr auto; }
.admin-danger-zone {
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:10px;
  margin-top:12px;
  padding:10px 12px;
  border:1px solid #72413c;
  border-radius:8px;
  background:#29191a;
}
.admin-danger-zone strong { color:#f0b1aa; font-size:12px; }
.admin-danger-zone > span { color:#bca7a5; font-size:10px; }
.admin-danger-row { display:flex; flex-wrap:wrap; gap:7px; }

/* Progresso. */
.admin-setting-list { display:grid; gap:9px; }
.admin-setting-row {
  display:grid;
  grid-template-columns:minmax(210px,1fr) minmax(260px,.8fr);
  align-items:center;
  gap:18px;
  padding:12px;
  border:1px solid #39424b;
  border-radius:8px;
  background:#13181d;
}
.admin-setting-row strong { display:block; color:#f0d28d; font-size:13px; }
.admin-setting-row small { display:block; margin-top:3px; color:#9da7b0; font-size:10px; }
.admin-setting-control {
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
}
.admin-setting-coords { grid-template-columns:1fr 1fr auto; }
.admin-setting-coords label {
  display:grid;
  grid-template-columns:20px 1fr;
  align-items:center;
  gap:4px;
  color:#d8c38f;
  font-size:11px;
  font-weight:900;
}

/* Acessos. */
.admin-access-state {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  border:1px solid rgba(214,184,111,.38);
  border-radius:8px;
  background:rgba(23,30,35,.65);
}
.admin-access-state.has-access { border-color:rgba(99,183,117,.55); }
.admin-access-state.no-access { border-color:rgba(185,103,91,.45); }
.admin-access-state span { flex:1; color:#d5dadd; font-size:12px; line-height:1.4; }

/* Consola. */
.admin-console {
  overflow:hidden;
  border:1px solid #414a54;
  border-radius:8px;
  background:#0d1115;
}
.admin-console-head { display:flex; gap:8px; padding:10px; border-bottom:1px solid #333c45; }
.admin-console-head .admin-console-input { flex:1; font-family:Consolas,'Courier New',monospace; }
.admin-console-output {
  min-height:145px;
  max-height:245px;
  overflow:auto;
  padding:11px;
  color:#cbd6c7;
  white-space:pre-wrap;
  font:12px/1.5 Consolas,'Courier New',monospace;
}
.admin-command-help {
  margin-top:10px;
  border:1px solid #3b434c;
  border-radius:8px;
  background:#11161b;
}
.admin-command-help summary {
  padding:9px 11px;
  color:#e5c77d;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.admin-help {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px 12px;
  padding:0 11px 11px;
}
.admin-help code {
  overflow:hidden;
  color:#c9d0d6;
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Registo. */
.admin-window-title-actions > button { flex:0 0 auto; }
.admin-log-header,
.admin-log {
  display:grid;
  grid-template-columns:140px minmax(110px,.65fr) minmax(120px,.75fr) 1.5fr;
  gap:8px;
  align-items:center;
}
.admin-log-header {
  padding:8px 10px;
  border-bottom:1px solid #404852;
  color:#9fa9b1;
  background:#101419;
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
}
.admin-logs { max-height:390px; overflow:auto; }
.admin-log {
  padding:8px 10px;
  border-bottom:1px solid #303842;
  color:#c5ccd2;
  font-size:10px;
}
.admin-log:nth-child(even) { background:#ffffff04; }
.admin-log strong { color:#e8ce91; }

@media(max-width:1220px) {
  .admin-view { width:min(1050px, calc(100vw - 210px)); }
  .admin-player-bar { grid-template-columns:180px minmax(220px,1fr); }
  .admin-player-mini-stats { grid-column:1 / -1; }
  .admin-target-card { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .admin-overview-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:900px) {
  .admin-view { width:calc(100vw - 165px); }
  .admin-player-bar { grid-template-columns:1fr; }
  .admin-player-mini-stats { grid-column:auto; }
  .admin-control-groups { grid-template-columns:1fr; }
  .admin-control-card-full { grid-column:auto; }
  .admin-target-card { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-setting-row { grid-template-columns:1fr; gap:9px; }
  .admin-danger-zone { grid-template-columns:1fr; }
  .admin-log-header,
  .admin-log { grid-template-columns:110px minmax(90px,.6fr) minmax(100px,.7fr) 1.4fr; }
}
@media(max-width:650px) {
  .admin-view { width:calc(100vw - 26px); }
  .admin-player-mini-stats { grid-template-columns:1fr; }
  .admin-target-card,
  .admin-overview-actions,
  .admin-help { grid-template-columns:1fr; }
  .admin-form-row,
  .admin-setting-control,
  .admin-setting-coords { grid-template-columns:1fr; }
  .admin-setting-coords label { grid-template-columns:20px 1fr; }
  .admin-console-head { flex-direction:column; }
  .admin-log-header { display:none; }
  .admin-log { grid-template-columns:1fr; gap:2px; }
}
