/* ═══════════════════════════════════════════════════════════════
   DARKNET WEB PANEL — ADMIN STYLES
   User management, sessions, activity, settings
   ═══════════════════════════════════════════════════════════════ */

/* ─── Announcement Bar ─── */
#announcementBar {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  background: linear-gradient(90deg, rgba(217,70,239,.15), rgba(255,45,120,.12));
  border-bottom: 1px solid rgba(217,70,239,.3);
  font-size: 12px;
  font-weight: 600;
  color: var(--lilac);
  font-family: 'Exo 2', sans-serif;
  flex-shrink: 0;
  gap: 12px;
  position: relative;
  z-index: 10;
}
#announcementBar button {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--sub);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
}
#announcementBar button:hover { color: var(--text); }

/* ─── User Badge in Topbar ─── */
#userBadge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255,45,120,.07);
  border: 1px solid var(--border);
  border-radius: 20px;
  flex-shrink: 0;
  cursor: default;
}

/* ─── Admin Sub-tab Navigation ─── */
.adm-subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 5px;
  width: fit-content;
  flex-wrap: wrap;
}
.adm-subtab {
  padding: 8px 18px;
  border-radius: 10px;
  border: none;
  background: none;
  color: var(--sub);
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.adm-subtab:hover { color: var(--text); background: rgba(255,45,120,.06); }
.adm-subtab-active {
  background: linear-gradient(135deg, rgba(255,45,120,.2), rgba(217,70,239,.15));
  color: var(--gold2);
  border: 1px solid rgba(255,45,120,.3);
  box-shadow: 0 0 14px rgba(255,45,120,.15);
}

/* ─── Overview Grid ─── */
.adm-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.adm-stat-card {
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  border: 1px solid rgba(from var(--c) r g b / 0.2);
  border-radius: 18px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease);
}
.adm-stat-card:hover { transform: translateY(-4px); }
.adm-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--c);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 0 14px var(--c);
}
.adm-stat-num {
  font-size: 46px;
  font-weight: 900;
  font-family: 'Orbitron', sans-serif;
  color: var(--c);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -2px;
}
.adm-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--sub);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Orbitron', sans-serif;
}

/* ─── Section Layout ─── */
.adm-section-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
.adm-half {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.adm-section-hdr {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sub);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Orbitron', sans-serif;
}
.adm-section-hdr::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ─── Table ─── */
.adm-user-table-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: auto;
  margin-bottom: 16px;
}
.adm-table {
  width: 100%;
  border-collapse: collapse;
}
.adm-table th {
  padding: 11px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sub);
  text-align: left;
  background: var(--bg3);
  font-family: 'Orbitron', sans-serif;
  white-space: nowrap;
}
.adm-table td {
  padding: 13px 16px;
  font-size: 13px;
  border-top: 1px solid rgba(255,45,120,.04);
  vertical-align: middle;
}
.adm-table tbody tr {
  transition: background 0.1s;
  cursor: default;
}
.adm-table tbody tr:hover { background: rgba(255,45,120,.04); }

/* ─── Role Badge ─── */
.adm-role-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  font-family: 'Orbitron', sans-serif;
  white-space: nowrap;
}

/* ─── Status Dot ─── */
.adm-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 6px currentColor;
}

/* ─── Toggle Switch ─── */
.adm-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}
.adm-toggle input { opacity: 0; width: 0; height: 0; }
.adm-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 22px;
  transition: 0.25s;
}
.adm-toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--sub);
  border-radius: 50%;
  transition: 0.25s var(--ease-bounce);
}
.adm-toggle input:checked + .adm-toggle-slider {
  background: rgba(255,45,120,.2);
  border-color: rgba(255,45,120,.5);
  box-shadow: 0 0 10px rgba(255,45,120,.3);
}
.adm-toggle input:checked + .adm-toggle-slider::before {
  left: calc(100% - 17px);
  background: var(--gold);
  box-shadow: 0 0 8px rgba(255,45,120,.6);
}

/* ─── Buttons ─── */
.adm-btn {
  padding: 8px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--sub);
  font-family: 'Exo 2', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.adm-btn:hover { color: var(--text); border-color: var(--border2); background: rgba(255,45,120,.1); }
.adm-btn-primary {
  background: linear-gradient(135deg, rgba(255,45,120,.2), rgba(217,70,239,.15));
  border-color: rgba(255,45,120,.4);
  color: var(--gold2);
}
.adm-btn-primary:hover {
  background: linear-gradient(135deg, rgba(255,45,120,.35), rgba(217,70,239,.28));
  box-shadow: var(--glow-sm);
  color: #fff;
}
.adm-btn-danger { background: rgba(255,69,96,.07); border-color: rgba(255,69,96,.22); color: var(--rose); }
.adm-btn-danger:hover { background: rgba(255,69,96,.2); box-shadow: 0 0 14px rgba(255,69,96,.25); }

/* ─── Action Buttons (table inline) ─── */
.adm-act-btn {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--sub);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.adm-act-edit:hover { background: rgba(255,45,120,.15); border-color: rgba(255,45,120,.4); color: var(--gold2); }
.adm-act-del:hover  { background: rgba(255,69,96,.15);  border-color: rgba(255,69,96,.4);  color: var(--rose); }

/* ─── Search Bar ─── */
.adm-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.adm-search-bar:focus-within { border-color: var(--gold); box-shadow: var(--glow-sm); }

/* ─── Activity Log ─── */
.adm-activity-list { display: flex; flex-direction: column; gap: 5px; }
.adm-act-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg3);
  border-radius: 8px;
  font-size: 11px;
  flex-wrap: wrap;
}
.adm-activity-full { display: flex; flex-direction: column; gap: 5px; }
.adm-act-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 11px;
  flex-wrap: wrap;
  transition: background 0.1s;
}
.adm-act-card:hover { background: rgba(255,45,120,.04); }
.adm-act-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  font-family: 'Orbitron', sans-serif;
  white-space: nowrap;
}
.adm-act-danger  { background: rgba(255,69,96,.15);   color: var(--rose); }
.adm-act-success { background: rgba(0,229,160,.12);   color: var(--mint); }
.adm-act-warning { background: rgba(255,200,0,.1);    color: #ffd600; }
.adm-act-info    { background: rgba(56,189,248,.12);  color: var(--sky); }
.adm-act-user    { font-family: 'Share Tech Mono', monospace; font-weight: 700; color: var(--gold2); min-width: 80px; }
.adm-act-target  { color: var(--sub); flex: 1; }
.adm-act-time    { font-family: 'Share Tech Mono', monospace; color: var(--dim); font-size: 10px; white-space: nowrap; }

/* ─── Session row ─── */
.adm-session-list { display: flex; flex-direction: column; gap: 6px; }
.adm-sess-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg3);
  border-radius: 10px;
  font-size: 12px;
}
.adm-sess-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: statusBlink 2s infinite;
  flex-shrink: 0;
}
.adm-sess-user { font-weight: 700; font-family: 'Share Tech Mono', monospace; color: var(--text); }
.adm-sess-meta { font-size: 10px; color: var(--sub); }

/* ─── Settings Card ─── */
.adm-settings-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
}
.adm-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.adm-set-lbl { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.adm-set-sub { font-size: 11px; color: var(--sub); }

/* ─── Permissions Matrix ─── */
.adm-perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,45,120,.06);
}
.adm-perm-row:last-child { border-bottom: none; }
.adm-perm-lbl { font-size: 12px; color: var(--text); }
#admModalPerms { margin: 14px 0; }

/* ─── Admin User Modal ─── */
#admUserModal .modal { max-width: 520px; }
.adm-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.adm-modal-grid .fl { margin-top: 8px; }
.adm-modal-grid .fi { margin-bottom: 0; }

/* ─── Empty State ─── */
.adm-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--dim);
  font-size: 13px;
  font-style: italic;
}

/* ─── Responsive ─── */
@media (max-width: 1023px) {
  .adm-overview-grid  { grid-template-columns: repeat(2, 1fr); }
  .adm-section-row    { grid-template-columns: 1fr; }
  .adm-modal-grid     { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .adm-overview-grid  { grid-template-columns: repeat(2, 1fr); }
  .adm-section-row    { grid-template-columns: 1fr; }
  .adm-modal-grid     { grid-template-columns: 1fr; }
  .adm-user-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 640px) {
  .adm-overview-grid  { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .adm-subtabs        { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .adm-subtab         { flex-shrink: 0; text-align: center; padding: 8px 10px; font-size: 9px; }
  .adm-stat-card      { padding: 14px; }
  .adm-stat-num       { font-size: 30px; letter-spacing: -1.5px; }
  .adm-stat-lbl       { font-size: 9px; }
  .adm-settings-row   { flex-direction: column; align-items: flex-start; gap: 10px; }
  .adm-act-row        { flex-wrap: wrap; gap: 5px; }
  .adm-act-card       { flex-wrap: wrap; gap: 6px; }
  .adm-sess-row       { flex-wrap: wrap; gap: 6px; }
  .adm-half           { padding: 12px; }
  #admUserModal .modal { max-width: 100%; }
}

@media (max-width: 480px) {
  .adm-overview-grid  { gap: 6px; }
  .adm-stat-num       { font-size: 26px; }
  .adm-subtab         { padding: 7px 8px; font-size: 8.5px; }
  .adm-btn            { padding: 7px 12px; font-size: 11px; }
  .adm-search-bar     { padding: 8px 12px; }
}
