@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #06080c;
  --bg-sidebar: #040508;
  --panel: #0b0f19;
  --panel-2: #111726;
  --line: #1c253b;
  --line-light: #283452;
  --text: #f0f4f8;
  --muted: #8496a8;
  
  --accent: #0084ff;
  --accent-hover: #1a91ff;
  --accent-glow: rgba(0, 132, 255, 0.15);
  
  --success: #00ffd5;
  --success-glow: rgba(0, 255, 213, 0.15);
  
  --warn: #ff9d00;
  --warn-glow: rgba(255, 157, 0, 0.15);
  
  --danger: #ff4b4b;
  --danger-glow: rgba(255, 75, 75, 0.15);
  
  --info: #00d2ff;
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--line-light);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--text);
  margin-top: 0;
}

/* Layout */
.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg-sidebar);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  position: sticky;
  top: 0;
}

.main {
  min-width: 0;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-body {
  flex: 1;
}

/* Header */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.main-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  width: 220px;
  height: 38px;
}

.search-bar svg {
  color: var(--muted);
  margin-right: 8px;
  flex-shrink: 0;
}

.search-bar input {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}

.search-bar input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.header-action-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s ease;
}

.notification-icon {
  position: relative;
}

.notification-icon::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--info);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.admin-access-btn {
  background: linear-gradient(135deg, rgba(0, 132, 255, 0.95), rgba(0, 210, 255, 0.82)) !important;
  color: #031019 !important;
  box-shadow: 0 10px 26px rgba(0, 132, 255, 0.16);
}

.header-action-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.admin-avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--accent);
  background: var(--panel-2);
}

.admin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Brand logo and title */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.brand-text span {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* User profile details in sidebar */
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-email {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
  align-self: start;
}

.role-admin {
  background: rgba(255, 75, 75, 0.15);
  border-color: var(--danger);
  color: var(--danger);
}

.role-user {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

/* Navigation buttons */
.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  text-align: left;
  font-weight: 500;
  font-size: 13.5px;
  transition: all 0.2s ease;
  width: 100%;
}

.nav button svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.nav button:hover {
  background: var(--panel);
  color: var(--text);
}

.nav button:hover svg {
  opacity: 1;
}

.nav button.active {
  background: var(--accent-glow);
  border-color: rgba(0, 132, 255, 0.3);
  color: var(--accent);
  font-weight: 600;
}

.nav button.active svg {
  opacity: 1;
  color: var(--accent);
}

/* Sidebar footer stats & controls */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-indicator.online {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-text {
  display: flex;
  flex-direction: column;
}

.status-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
}

.status-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
}

.footer-stats {
  display: flex;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
}

.footer-stat {
  display: flex;
  flex-direction: column;
}

.footer-stat span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-stat strong {
  font-family: var(--font-title);
  font-size: 12px;
  color: var(--text);
  margin-top: 1px;
}

.footer-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 20px;
  padding: 0 4px;
}

.sparkline-bar {
  width: 8%;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  opacity: 0.6;
}

.animate-bar-1 { height: 40%; animation: pulse-bar 1.5s infinite alternate; }
.animate-bar-2 { height: 75%; animation: pulse-bar 1.2s infinite alternate; }
.animate-bar-3 { height: 50%; animation: pulse-bar 1.8s infinite alternate; }
.animate-bar-4 { height: 90%; animation: pulse-bar 1.1s infinite alternate; }
.animate-bar-5 { height: 60%; animation: pulse-bar 1.6s infinite alternate; }
.animate-bar-6 { height: 80%; animation: pulse-bar 1.3s infinite alternate; }
.animate-bar-7 { height: 45%; animation: pulse-bar 1.7s infinite alternate; }

@keyframes pulse-bar {
  0% { transform: scaleY(0.7); opacity: 0.4; }
  100% { transform: scaleY(1.1); opacity: 0.8; }
}

.sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-access-btn {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--danger) 0%, #b32d2d 100%);
  border: 0 !important;
  color: white !important;
  font-weight: 600 !important;
  text-align: center;
  justify-content: center;
  height: 36px;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.admin-access-btn:hover {
  box-shadow: 0 0 12px var(--danger-glow);
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  font-size: 11px;
  background: var(--panel);
  border-color: var(--line);
  color: var(--muted);
  font-weight: 500;
}

.action-btn:hover {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line-light);
}

.logout-btn:hover {
  color: var(--danger);
  border-color: rgba(255, 75, 75, 0.4);
  background: var(--danger-glow);
}

/* Grid & Panels */
.grid {
  display: grid;
  gap: 18px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  min-width: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease;
}

.panel:hover {
  border-color: var(--line-light);
}

.panel h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.2px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-header h3 {
  margin-bottom: 0;
}

.view-all-btn {
  font-size: 11px;
  height: 26px;
  padding: 0 10px;
  border-color: var(--line);
  background: transparent;
  color: var(--accent);
  border-radius: 4px;
}

.view-all-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
}

/* Stat Cards */
.stat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 20px;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.stat-data {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 2px 0;
}

.stat-subtitle {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.8;
}

/* Colors for specific stat cards */
.card-subscriptions .stat-icon-wrapper { color: var(--accent); border-color: rgba(0, 132, 255, 0.3); background: var(--accent-glow); }
.card-servers .stat-icon-wrapper { color: #b55dff; border-color: rgba(181, 93, 255, 0.3); background: rgba(181, 93, 255, 0.1); }
.card-sessions .stat-icon-wrapper { color: var(--success); border-color: rgba(0, 255, 213, 0.3); background: var(--success-glow); }
.card-detections .stat-icon-wrapper { color: var(--danger); border-color: rgba(255, 75, 75, 0.3); background: var(--danger-glow); }

.stat-card:hover .stat-icon-wrapper {
  transform: scale(1.05);
}

/* Forms and Inputs */
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  padding: 8px 12px;
  font-size: 13.5px;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

input,
select {
  height: 38px;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  padding: 0 !important;
  margin: 0;
  min-height: auto !important;
  accent-color: var(--accent);
  cursor: pointer;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--panel);
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.row > * {
  flex: 1;
}

/* Buttons */
button {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 16px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:hover {
  background: var(--panel);
  border-color: var(--line-light);
  color: white;
}

button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 600;
}

button.primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 12px var(--accent-glow);
}

button.danger {
  border-color: var(--danger);
  background: var(--danger-glow);
  color: #ffcccc;
}

button.danger:hover {
  background: var(--danger);
  color: white;
  box-shadow: 0 0 12px var(--danger-glow);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Auth (Login / Register) Design */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, #0e1628 0%, #06080c 100%);
  padding: 24px;
}

.login-container {
  width: 100%;
  max-width: 440px;
}

.login-panel {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-header {
  text-align: center;
  margin-bottom: 12px;
}

.auth-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: #fff;
  letter-spacing: 0.5px;
}

.auth-subtitle {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 4px 0 0 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-wrapper {
  position: relative;
}

.auth-btn {
  width: 100%;
  height: 42px;
  font-size: 14px;
  border-radius: 8px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line);
}

.auth-divider:not(:empty)::before {
  margin-right: .5em;
}

.auth-divider:not(:empty)::after {
  margin-left: .5em;
}

.secondary-btn {
  background: var(--bg);
  border-color: var(--line);
  color: var(--muted);
}

.secondary-btn:hover {
  background: var(--panel-2);
  color: white;
}

/* Notice Bar (Success / Error notification) */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13.5px;
  animation: slide-down 0.25s ease;
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  min-width: min(560px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38), 0 0 28px rgba(0, 132, 255, 0.14);
  overflow: hidden;
}

@keyframes slide-down {
  from { transform: translate(-50%, -10px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.error-notice {
  border-color: rgba(255, 75, 75, 0.4);
  background: rgba(255, 75, 75, 0.08);
  color: #ffcccc;
}

.error-notice svg {
  color: var(--danger);
}

.info-notice {
  border-color: rgba(0, 132, 255, 0.4);
  background: rgba(0, 132, 255, 0.08);
  color: #cce6ff;
}

.info-notice svg {
  color: var(--accent);
}

.close-notice-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  margin-left: auto;
  height: 24px;
  width: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-notice-btn:hover {
  color: white;
}

.notice-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: currentColor;
  opacity: 0.8;
  transform-origin: left center;
  animation: notice-countdown 5.2s linear forwards;
}

.notice-bar:hover .notice-progress {
  animation-play-state: paused;
}

@keyframes notice-countdown {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.notice.error {
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 4px;
  text-align: center;
}

/* Tables */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  font-size: 13px;
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  background: var(--panel);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--line);
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

td.code {
  font-family: Consolas, "Liberation Mono", Courier, monospace;
  font-size: 12px;
  color: var(--info);
  word-break: break-all;
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin: 12px 0 14px;
}

.filter-toolbar label,
.filter-panel label {
  min-width: 150px;
}

.filter-grow {
  flex: 1 1 260px;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 14px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 8, 14, 0.42);
}

.filter-group {
  display: grid;
  gap: 8px;
  min-width: 250px;
}

.filter-group > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-width: 0 !important;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.inline-check input {
  width: auto;
  margin: 0;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 8, 14, 0.42);
}

.pagination-summary {
  color: var(--muted);
  font-size: 12px;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pagination-controls span {
  color: var(--muted);
  font-size: 12px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  border-radius: 4px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.online,
.badge.active {
  border-color: rgba(0, 255, 213, 0.3);
  background: rgba(0, 255, 213, 0.08);
  color: var(--success);
}

.badge.offline {
  border-color: var(--line);
  background: var(--panel);
  color: var(--muted);
}

.badge.high,
.badge.critical,
.badge.banned {
  border-color: rgba(255, 75, 75, 0.3);
  background: rgba(255, 75, 75, 0.08);
  color: var(--danger);
}

.badge.medium,
.badge.warning {
  border-color: rgba(255, 157, 0, 0.3);
  background: rgba(255, 157, 0, 0.08);
  color: var(--warn);
}

.badge.whitelisted {
  border-color: rgba(0, 210, 255, 0.3);
  background: rgba(0, 210, 255, 0.08);
  color: var(--info);
}

/* Code Pre */
pre {
  max-height: 180px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: #a5b4fc;
  font-family: Consolas, monospace;
  font-size: 11.5px;
  white-space: pre-wrap;
}

p.code {
  font-family: Consolas, monospace;
  font-size: 12px;
  color: var(--info);
  word-break: break-all;
  margin: 0 0 12px;
  background: var(--bg);
  padding: 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 8, 0.75);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 999;
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1.5px solid var(--line-light);
  animation: zoom-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoom-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.modal-close-btn {
  background: transparent;
  border: 0;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  height: 28px;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: white;
}

/* Footer */
.footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

/* Custom styles for columns */
.whitelist-btn {
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 4px;
  border-color: var(--line);
  background: var(--panel-2);
}

.whitelist-btn:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

/* Atomic Shield SaaS dashboard refresh */
body {
  background:
    linear-gradient(180deg, #070b12 0%, #05070b 42%, #030407 100%);
}

.main {
  background:
    linear-gradient(180deg, rgba(10, 21, 35, 0.54) 0%, rgba(5, 7, 11, 0) 34%),
    var(--bg);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(0, 132, 255, 0.07) 0%, rgba(4, 5, 8, 0) 34%),
    rgba(4, 5, 8, 0.96);
}

.brand-logo,
.auth-logo {
  filter: drop-shadow(0 0 16px rgba(0, 210, 255, 0.2));
}

.header-kicker,
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: none;
  display: inline-block;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 14px rgba(0, 255, 213, 0.55);
}

.success-text {
  color: var(--success) !important;
}

.header-mini-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 92px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 15, 25, 0.82);
}

.header-mini-metric span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.header-mini-metric strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.overview-hero {
  min-height: 184px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: stretch;
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 132, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 132, 255, 0.16) 0%, rgba(0, 255, 213, 0.06) 42%, rgba(11, 15, 25, 0.78) 100%),
    var(--panel);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.28);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 820px;
}

.hero-copy h1 {
  margin: 10px 0 8px;
  font-size: 42px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 720px;
  margin: 0;
  color: #a8b8c9;
  font-size: 15px;
}

.hero-signal-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(0, 210, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 9, 15, 0.7);
}

.hero-signal-card img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  flex-shrink: 0;
}

.hero-signal-card div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-signal-card span,
.hero-signal-card small {
  color: var(--muted);
  font-size: 12px;
}

.hero-signal-card strong {
  color: #fff;
  font-family: var(--font-title);
  font-size: 26px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(39, 52, 82, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
    rgba(11, 15, 25, 0.92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.metric-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.metric-badge {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(0, 210, 255, 0.22);
  border-radius: 999px;
  color: var(--info);
  background: rgba(0, 210, 255, 0.07);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.metric-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.65px;
  text-transform: uppercase;
}

.metric-value {
  color: var(--text);
  font-size: 32px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
}

.metric-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.metric-detail svg {
  flex: 0 0 auto;
  color: var(--info);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 20px;
  margin-top: 20px;
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
    rgba(11, 15, 25, 0.94);
  border-radius: 8px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-heading h3 {
  margin-bottom: 4px;
}

.panel-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.bar-chart {
  height: 284px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  padding-top: 8px;
}

.bar-column {
  min-width: 0;
  display: grid;
  grid-template-rows: 22px 1fr 20px;
  gap: 8px;
  align-items: end;
  text-align: center;
}

.bar-value {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.bar-track {
  width: 100%;
  min-height: 160px;
  display: flex;
  align-items: end;
  justify-content: center;
  border: 1px solid rgba(40, 52, 82, 0.7);
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.44);
  overflow: hidden;
}

.bar-track span {
  width: 100%;
  min-height: 8px;
  border-radius: 9px 9px 0 0;
  background: linear-gradient(180deg, var(--success), var(--accent));
  box-shadow: 0 0 18px rgba(0, 210, 255, 0.24);
}

.bar-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.detection-types {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.donut-chart {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background:
    conic-gradient(
      var(--danger) 0 calc(var(--critical) * 1%),
      #ff7a45 calc(var(--critical) * 1%) calc((var(--critical) + var(--high)) * 1%),
      var(--warn) calc((var(--critical) + var(--high)) * 1%) calc((var(--critical) + var(--high) + var(--medium)) * 1%),
      var(--info) calc((var(--critical) + var(--high) + var(--medium)) * 1%) 100%
    );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: var(--panel);
}

.donut-chart strong,
.donut-chart span {
  position: relative;
  z-index: 1;
}

.donut-chart strong {
  align-self: end;
  color: #fff;
  font-size: 24px;
}

.donut-chart span {
  align-self: start;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.type-list,
.server-status-list,
.action-feed {
  display: grid;
  gap: 10px;
}

.type-row,
.server-status-row,
.action-feed-row,
.health-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(40, 52, 82, 0.68);
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.34);
}

.type-row span,
.server-status-row div,
.action-feed-row div {
  min-width: 0;
}

.type-row span,
.server-status-row span,
.action-feed-row small,
.action-feed-row time {
  color: var(--muted);
  font-size: 12px;
}

.type-row span,
.action-feed-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.type-row strong,
.server-status-row strong,
.action-feed-row strong,
.health-item strong {
  color: #fff;
  font-size: 13px;
}

.type-row small {
  min-width: 38px;
  color: var(--muted);
  text-align: right;
}

.severity-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
  flex: 0 0 auto;
}

.severity-dot.critical,
.severity-dot.high {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 75, 75, 0.4);
}

.severity-dot.medium {
  background: var(--warn);
  box-shadow: 0 0 12px rgba(255, 157, 0, 0.35);
}

.severity-dot.warning,
.severity-dot.online {
  background: var(--info);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.35);
}

.server-status-row div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.health-item {
  min-height: 78px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.health-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.health-item strong {
  font-family: var(--font-title);
  font-size: 22px;
}

.action-feed-row time {
  margin-left: auto;
  white-space: nowrap;
}

.action-feed-row div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  border: 1px dashed rgba(40, 52, 82, 0.9);
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.32);
}

.empty-state-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 210, 255, 0.22);
  border-radius: 8px;
  color: var(--info);
  background: rgba(0, 210, 255, 0.06);
}

.empty-state strong {
  color: #fff;
  font-size: 14px;
}

.empty-state span {
  max-width: 320px;
  color: var(--muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 1320px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: sticky;
    top: 0;
    z-index: 100;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
    gap: 16px;
  }

  .sidebar-footer,
  .user-profile,
  .footer-chart {
    display: none;
  }

  .nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
  }

  .nav button {
    width: auto;
    white-space: nowrap;
    height: 36px;
    padding: 0 12px;
  }

  .main {
    padding: 20px;
  }

  .grid.cols-2,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .main-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .header-mini-metric {
    flex: 1 1 120px;
  }

  .search-bar {
    flex: 1 1 180px;
    width: auto;
  }

  .overview-hero,
  .overview-grid,
  .metric-grid,
  .detection-types {
    grid-template-columns: 1fr;
  }

  .hero-signal-card {
    align-items: flex-start;
  }

  .bar-chart {
    height: 230px;
    gap: 8px;
  }

  .donut-chart {
    justify-self: center;
  }
}

@media (max-width: 560px) {
  .overview-hero {
    padding: 20px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .hero-signal-card {
    flex-direction: column;
  }

  .metric-card {
    padding: 16px;
  }

  .health-grid {
    grid-template-columns: 1fr;
  }

  .bar-value {
    display: none;
  }

  .bar-chart {
    grid-template-rows: 1fr;
  }

  .action-feed-row {
    align-items: flex-start;
  }

  .action-feed-row time {
    display: none;
  }
}

/* Final layout polish */
.nav button {
  justify-content: flex-start;
  gap: 12px;
  padding: 0 14px;
}

.nav button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.nav button span {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.sidebar {
  width: 270px;
}

.sidebar .brand,
.sidebar .user-profile,
.sidebar-footer {
  width: 100%;
}

.admin-access-btn {
  background: linear-gradient(135deg, rgba(0, 132, 255, 0.98), rgba(0, 210, 255, 0.88)) !important;
  color: #031019 !important;
  border: 0 !important;
  box-shadow: 0 10px 26px rgba(0, 132, 255, 0.18) !important;
}

.admin-access-btn:hover {
  box-shadow: 0 12px 30px rgba(0, 132, 255, 0.26) !important;
}

.detection-table-wrap table {
  min-width: 760px;
}

.admin-detection-table {
  min-width: 1180px;
}

.customer-detection-table {
  min-width: 720px;
}

.table-subtext {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.inner-panel {
  background: rgba(5, 7, 11, 0.35);
  box-shadow: none;
}

.server-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.server-settings-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 8, 14, 0.56);
}

.server-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.server-card-head strong,
.server-card-head span {
  display: block;
}

.server-card-head strong {
  font-family: var(--font-title);
  font-size: 15px;
}

.server-card-head span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.toggle-row {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  color: var(--text);
}

.toggle-row input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.option-card {
  padding: 14px;
  border: 1px solid rgba(0, 210, 255, 0.18);
  border-radius: 10px;
  background: rgba(4, 20, 42, 0.68);
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-actions button {
  flex: 1 1 120px;
}

.server-key-table {
  min-width: 1120px;
  table-layout: fixed;
}

.server-key-table .server-col-name {
  width: 18%;
}

.server-key-table .server-col-ip {
  width: 13%;
}

.server-key-table .server-col-key {
  width: 36%;
}

.server-key-table .server-col-subscription {
  width: 20%;
}

.server-key-table .server-col-status {
  width: 8%;
}

.server-key-table .server-col-action {
  width: 72px;
}

.server-key-table td,
.server-key-table th {
  overflow: hidden;
}

.server-key-cell,
.server-subscription-cell {
  min-width: 0;
}

.secret-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.secret-reveal {
  display: block;
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  filter: blur(5px);
  opacity: 0.72;
  transition: filter 150ms ease, opacity 150ms ease;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.secret-reveal:hover,
.secret-reveal:focus {
  filter: blur(0);
  opacity: 1;
}

.icon-copy-btn,
.kebab-btn {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border-radius: 10px;
}

.icon-copy-btn svg,
.kebab-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.kebab-btn svg {
  fill: currentColor;
  stroke: none;
}

.actions-menu-cell {
  position: relative;
  width: 78px;
}

.row-action-menu {
  position: absolute;
  z-index: 20;
  top: 40px;
  right: 8px;
  display: grid;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 10, 20, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

.row-action-menu button {
  justify-content: flex-start;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
}

.row-action-menu button:hover {
  background: rgba(0, 210, 255, 0.1);
}

.row-action-menu button.danger {
  color: var(--danger);
}

.config-page {
  display: grid;
  gap: 18px;
}

.config-intro-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.inline-help-box {
  padding: 12px 14px;
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(0, 210, 255, 0.08), rgba(24, 92, 255, 0.05));
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.panel-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--info);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.config-code-card {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
  padding: 14px;
  border: 1px solid rgba(0, 210, 255, 0.24);
  border-radius: 10px;
  background: rgba(0, 132, 255, 0.08);
}

.config-code-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.config-code-card code {
  color: var(--text);
  white-space: nowrap;
}

.config-server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 14px;
  align-items: start;
}

.server-config-card {
  display: grid;
  gap: 18px;
}

.config-server-grid .server-config-card.is-open {
  grid-column: 1 / -1;
}

.server-config-card.is-collapsed {
  gap: 0;
}

.server-config-card.is-collapsed .server-config-header {
  align-items: center;
}

.server-config-details {
  display: grid;
  gap: 18px;
  overflow: hidden;
  animation: configSlideDown 180ms ease-out both;
  transform-origin: top;
}

@keyframes configSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px) scaleY(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.server-config-header,
.config-save-row,
.config-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.server-config-header h3 {
  margin: 0;
}

.config-card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.compact-settings-actions {
  justify-content: flex-end;
}

.config-toggle-row {
  min-height: 76px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(5, 8, 14, 0.42);
}

.config-section {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.config-section-title strong,
.config-section-title span {
  display: block;
}

.config-section-title span,
.config-save-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.action-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.action-config-grid label small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
}

.runtime-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.runtime-config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 8, 14, 0.46);
}

.runtime-config-row strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 13px;
}

.runtime-config-row p {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.switch-control {
  display: inline-flex;
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 48px;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-control span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.switch-control span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s ease, background 0.18s ease;
}

.switch-control input:checked + span {
  border-color: rgba(0, 210, 255, 0.46);
  background: rgba(0, 210, 255, 0.18);
}

.switch-control input:checked + span::after {
  transform: translateX(20px);
  background: var(--info);
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.36);
}

.number-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 142px;
}

.number-control input {
  width: 96px;
  text-align: right;
}

.number-control small {
  color: var(--muted);
  font-size: 11px;
}

.evidence-btn {
  height: 30px;
  padding: 0 10px;
  color: var(--info);
  border-color: rgba(0, 210, 255, 0.32);
  background: rgba(0, 210, 255, 0.08);
}

.evidence-btn:hover {
  color: #041016;
  background: var(--info);
  border-color: var(--info);
}

.screenshot-modal {
  width: min(1180px, calc(100vw - 32px));
}

.screenshot-preview {
  display: block;
  width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
}

.screenshot-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.button-like {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 14px;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.button-like.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.loading-evidence {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

.loading-evidence strong {
  color: var(--text);
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(0, 132, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.compact-btn {
  height: 28px;
  padding: 0 9px;
  font-size: 11px;
  white-space: nowrap;
}

.admin-detection-list {
  display: grid;
  gap: 8px;
}

.admin-detection-row {
  display: grid;
  grid-template-columns: 70px 78px minmax(0, 1.45fr) minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.7fr) 64px 90px minmax(0, 0.85fr) 92px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 8, 14, 0.52);
  font-size: 12px;
}

.admin-detection-head {
  min-height: 38px;
  background: var(--panel);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-detection-row .truncate {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-detection-row .code {
  font-family: Consolas, "Liberation Mono", Courier, monospace;
  color: var(--info);
}

.strong-cell {
  color: var(--text);
  font-weight: 700;
}

.stack-cell {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.stack-cell strong,
.stack-cell small {
  min-width: 0;
}

.stack-cell small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metadata-modal {
  width: min(860px, calc(100vw - 32px));
}

.metadata-modal pre {
  max-height: calc(100vh - 210px);
}

@media (max-width: 992px) {
  .sidebar {
    width: 100%;
  }

  .nav button {
    flex: 0 0 auto;
  }

  .config-intro-panel,
  .server-config-header,
  .config-card-actions,
  .config-save-row,
  .config-section-title,
  .runtime-config-row {
    align-items: stretch;
    flex-direction: column;
  }

  .number-control {
    flex-basis: auto;
  }

  .admin-detection-row,
  .admin-detection-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-detection-head {
    display: none;
  }
}

/* Atomic Shield dashboard redesign */
body {
  background:
    linear-gradient(135deg, rgba(0, 132, 255, 0.08) 0 1px, transparent 1px 72px),
    linear-gradient(45deg, rgba(0, 210, 255, 0.05) 0 1px, transparent 1px 88px),
    #050813;
  letter-spacing: 0;
}

.layout {
  grid-template-columns: 288px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(0, 210, 255, 0.03), transparent 34%),
    linear-gradient(180deg, #06101d 0%, #050813 48%, #04060b 100%);
}

.sidebar {
  width: auto;
  gap: 18px;
  padding: 22px 18px;
  background:
    linear-gradient(180deg, rgba(0, 132, 255, 0.08), transparent 38%),
    rgba(3, 7, 14, 0.96);
  border-right: 1px solid rgba(0, 210, 255, 0.16);
  overflow-y: auto;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 12px 10px auto auto;
  width: 58px;
  height: 72px;
  border: 1px solid rgba(0, 210, 255, 0.14);
  clip-path: polygon(50% 0, 100% 16%, 88% 78%, 50% 100%, 12% 78%, 0 16%);
  pointer-events: none;
}

.brand {
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 210, 255, 0.12);
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.brand-text strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand-text span {
  color: var(--info);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.user-profile {
  border-radius: 8px;
  border-color: rgba(0, 210, 255, 0.14);
  background: rgba(8, 16, 30, 0.72);
}

.nav {
  gap: 4px;
}

.nav button {
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 12px;
  border-radius: 8px;
  color: #9eb1c4;
  text-align: left;
}

.nav button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.nav button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav button.active {
  color: #eefbff;
  border-color: rgba(0, 210, 255, 0.38);
  background: linear-gradient(90deg, rgba(0, 132, 255, 0.28), rgba(0, 210, 255, 0.1));
  box-shadow: inset 3px 0 0 var(--info);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 210, 255, 0.12);
}

.shield-note {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(0, 210, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 132, 255, 0.07);
}

.shield-note strong,
.shield-note span {
  display: block;
}

.shield-note strong {
  color: var(--text);
  font-size: 12px;
}

.shield-note span {
  color: var(--muted);
  font-size: 11px;
}

.sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sidebar-actions .admin-access-btn {
  grid-column: 1 / -1;
}

.main {
  padding: 24px clamp(18px, 2.6vw, 34px);
}

.main-header {
  align-items: flex-start;
  padding: 0 0 18px;
  margin-bottom: 22px;
  border-bottom-color: rgba(0, 210, 255, 0.14);
}

.header-left {
  min-width: 0;
}

.header-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--info);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.main-title {
  margin: 0 0 5px;
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: 0;
  -webkit-text-fill-color: currentColor;
  background: none;
}

.main-subtitle {
  max-width: 760px;
  color: #91a5b8;
}

.header-right {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-action-btn,
.header-action-icon,
.action-btn,
.admin-access-btn,
.view-all-btn,
.secondary-btn,
button {
  border-radius: 8px;
}

.header-action-btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--text);
  border: 1px solid rgba(0, 210, 255, 0.18);
  background: rgba(8, 16, 30, 0.72);
}

.header-action-btn:hover {
  border-color: rgba(0, 210, 255, 0.46);
  background: rgba(0, 132, 255, 0.16);
}

.header-mini-metric,
.footer-stats,
.footer-chart,
.system-status,
.search-bar,
.notification-icon {
  display: none !important;
}

.panel {
  border-radius: 8px;
  border: 1px solid rgba(0, 210, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(0, 132, 255, 0.045), transparent 42%),
    rgba(8, 14, 26, 0.86);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
}

.panel::before {
  border-radius: 8px;
}

.section-head,
.panel-header,
.panel-heading {
  gap: 14px;
  align-items: flex-start;
}

.section-head h3,
.panel-header h3,
.panel-heading h3 {
  margin-bottom: 3px;
}

.data-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(0, 210, 255, 0.18);
  border-radius: 999px;
  color: var(--info);
  background: rgba(0, 210, 255, 0.07);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.data-page {
  display: grid;
  gap: 14px;
}

.filter-toolbar {
  align-items: end;
}

.data-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(4, minmax(145px, 180px)) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(0, 210, 255, 0.12);
  border-radius: 8px;
  background: rgba(3, 7, 14, 0.38);
}

.quick-search-toolbar {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.data-filter-toolbar label,
.data-filter-panel label,
.filter-group {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #91a5b8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-filter-toolbar input,
.data-filter-toolbar select,
.data-filter-panel input,
.data-filter-panel select {
  width: 100%;
  height: 38px;
  min-width: 0;
}

.filter-grow {
  min-width: 0;
}

.filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.filter-actions button {
  height: 38px;
  white-space: nowrap;
}

.data-filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(0, 210, 255, 0.1);
  border-radius: 8px;
  background: rgba(8, 16, 30, 0.5);
}

.filter-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.severity-filter {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #b8c7d6;
  cursor: pointer;
}

.severity-filter input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.severity-filter:has(input:checked),
.severity-filter.selected {
  color: var(--text);
  border-color: rgba(0, 210, 255, 0.38);
  background: rgba(0, 132, 255, 0.16);
}

.table-wrap {
  border-radius: 8px;
  border: 1px solid rgba(0, 210, 255, 0.12);
  background: rgba(3, 7, 14, 0.34);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  color: #95a9bc;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

td,
th {
  vertical-align: middle;
}

tbody tr:hover {
  background: rgba(0, 132, 255, 0.055);
}

.data-table {
  table-layout: fixed;
}

.customer-detection-table th:nth-child(1),
.customer-detection-table td:nth-child(1) {
  width: 118px;
}

.customer-detection-table th:nth-child(2),
.customer-detection-table td:nth-child(2) {
  width: auto;
}

.customer-detection-table th:nth-child(3),
.customer-detection-table td:nth-child(3) {
  width: 180px;
}

.customer-detection-table th:nth-child(4),
.customer-detection-table td:nth-child(4) {
  width: 150px;
}

.customer-detection-table th:nth-child(5),
.customer-detection-table td:nth-child(5) {
  width: 190px;
}

.player-table {
  min-width: 1080px;
}

.player-table th:nth-child(1),
.player-table td:nth-child(1) {
  width: 190px;
}

.player-table th:nth-child(2),
.player-table td:nth-child(2) {
  width: 128px;
}

.player-table th:nth-child(4),
.player-table td:nth-child(4) {
  width: 260px;
}

.player-table th:nth-child(5),
.player-table td:nth-child(5) {
  width: 80px;
}

.player-table th:nth-child(6),
.player-table td:nth-child(6) {
  width: 168px;
}

.player-table th:nth-child(7),
.player-table td:nth-child(7) {
  width: 220px;
}

.code {
  overflow-wrap: anywhere;
}

.tiny-text {
  margin-top: 4px;
  font-size: 11px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-actions .compact-btn {
  min-width: 48px;
}

.pagination-bar {
  border-radius: 8px;
  border: 1px solid rgba(0, 210, 255, 0.12);
  background: rgba(3, 7, 14, 0.32);
}

.overview-hero {
  position: relative;
  overflow: hidden;
  min-height: auto;
  padding: clamp(18px, 2.4vw, 26px);
  border-radius: 8px;
  border-color: rgba(0, 210, 255, 0.15);
  background:
    linear-gradient(135deg, rgba(0, 132, 255, 0.16), rgba(0, 210, 255, 0.045)),
    rgba(8, 16, 30, 0.82);
}

.overview-hero::after {
  content: "";
  position: absolute;
  inset: 18px 22px auto auto;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(0, 210, 255, 0.16);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 48%, rgba(0, 210, 255, 0.18) 49% 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(0, 210, 255, 0.18) 49% 51%, transparent 52%);
  opacity: 0.65;
  pointer-events: none;
}

.metric-card {
  border-radius: 8px;
  border-color: rgba(0, 210, 255, 0.13);
}

.admin-detection-list {
  gap: 8px;
}

.admin-detection-row {
  grid-template-columns: 82px 88px minmax(180px, 1.35fr) minmax(130px, 0.8fr) minmax(160px, 1fr) minmax(150px, 1fr) 72px 76px 88px 138px 92px;
  border-color: rgba(0, 210, 255, 0.12);
  background: rgba(3, 7, 14, 0.38);
}

.admin-detection-head {
  background: rgba(8, 16, 30, 0.92);
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .data-filter-toolbar,
  .data-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-actions {
    align-items: stretch;
  }
}

@media (max-width: 900px) {
  .layout {
    display: block;
  }

  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
    padding: 16px;
  }

  .sidebar::before,
  .shield-note {
    display: none;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav button {
    flex: 0 0 auto;
    width: auto;
  }

  .sidebar-footer {
    margin-top: 4px;
  }

  .main {
    padding: 18px 14px 24px;
  }

  .main-header,
  .section-head,
  .panel-header,
  .panel-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .header-right {
    justify-content: flex-start;
  }

  .data-filter-toolbar,
  .data-filter-panel {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .overview-hero,
  .hero-signal-card {
    grid-template-columns: 1fr;
  }

  .overview-hero::after {
    display: none;
  }

  .admin-detection-row,
  .admin-detection-head {
    grid-template-columns: 1fr;
  }

  .admin-detection-row > span {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 8px;
  }

  .admin-detection-row > span::before {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .admin-detection-row > span:nth-child(1)::before { content: "Severity"; }
  .admin-detection-row > span:nth-child(2)::before { content: "Status"; }
  .admin-detection-row > span:nth-child(3)::before { content: "Title"; }
  .admin-detection-row > span:nth-child(4)::before { content: "Player"; }
  .admin-detection-row > span:nth-child(5)::before { content: "Server"; }
  .admin-detection-row > span:nth-child(6)::before { content: "User"; }
  .admin-detection-row > span:nth-child(7)::before { content: "Rule"; }
  .admin-detection-row > span:nth-child(8)::before { content: "Evidence"; }
  .admin-detection-row > span:nth-child(9)::before { content: "Meta"; }
  .admin-detection-row > span:nth-child(10)::before { content: "Time"; }
  .admin-detection-row > span:nth-child(11)::before { content: "Action"; }
}

@media (max-width: 560px) {
  .brand {
    align-items: flex-start;
  }

  .user-profile {
    align-items: flex-start;
  }

  .sidebar-actions,
  .filter-actions,
  .pagination-controls {
    grid-template-columns: 1fr;
  }

  .pagination-bar,
  .pagination-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .header-action-btn span {
    display: none;
  }
}

/* Dashboard polish: compact hero, real chart, quieter pagination */
.overview-hero {
  min-height: 132px;
  padding: 18px 20px;
  gap: 16px;
}

.hero-copy h1 {
  margin: 7px 0 5px;
  font-size: clamp(26px, 2.25vw, 32px);
  line-height: 1.08;
  color: var(--text);
}

.hero-copy p {
  max-width: 620px;
  font-size: 13px;
}

.hero-signal-card {
  padding: 13px;
}

.hero-signal-card img {
  width: 58px;
  height: 58px;
}

.hero-signal-card strong {
  font-size: 20px;
}

.trend-chart {
  height: 286px;
  min-height: 240px;
  padding: 6px 0 0;
}

.trend-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.trend-grid line {
  stroke: rgba(148, 163, 184, 0.15);
  stroke-width: 1;
}

.trend-area {
  fill: url(#trendAreaGradient);
}

.trend-line {
  fill: none;
  stroke: var(--info);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.28));
}

.trend-dot {
  fill: #07111e;
  stroke: var(--success);
  stroke-width: 3;
}

.trend-value,
.trend-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}

.trend-value {
  fill: var(--text);
  font-size: 12px;
}

.pagination-bar {
  margin-top: 6px;
  padding: 3px 2px;
  border: 0;
  background: transparent;
}

.pagination-summary,
.pagination-controls span {
  color: rgba(148, 163, 184, 0.64);
  font-size: 11px;
}

.pagination-controls button {
  height: 28px;
  padding: 0 9px;
  font-size: 11px;
}

.customer-player-table {
  min-width: 940px;
}

.customer-player-table th:nth-child(1),
.customer-player-table td:nth-child(1) {
  width: 180px;
}

.customer-player-table th:nth-child(2),
.customer-player-table td:nth-child(2) {
  width: 98px;
}

.customer-player-table th:nth-child(3),
.customer-player-table td:nth-child(3) {
  width: 170px;
}

.customer-player-table th:nth-child(4),
.customer-player-table td:nth-child(4) {
  width: 300px;
}

.customer-player-table th:nth-child(5),
.customer-player-table td:nth-child(5) {
  width: 160px;
}

.customer-player-table th:nth-child(6),
.customer-player-table td:nth-child(6) {
  width: 136px;
}

.bans-table {
  min-width: 1080px;
}

.bans-table th:nth-child(1),
.bans-table td:nth-child(1) {
  width: 210px;
}

.bans-table th:nth-child(2),
.bans-table td:nth-child(2) {
  width: 210px;
}

.bans-table th:nth-child(3),
.bans-table td:nth-child(3) {
  width: 170px;
}

.bans-table th:nth-child(4),
.bans-table td:nth-child(4) {
  width: auto;
}

.bans-table th:nth-child(5),
.bans-table td:nth-child(5) {
  width: 160px;
}

.bans-table th:nth-child(6),
.bans-table td:nth-child(6) {
  width: 165px;
}

.bans-table th:nth-child(7),
.bans-table td:nth-child(7) {
  width: 150px;
}

.admin-bans-table {
  min-width: 1220px;
}

.admin-bans-table th:nth-child(4),
.admin-bans-table td:nth-child(4) {
  width: 210px;
}

.admin-bans-table th:nth-child(5),
.admin-bans-table td:nth-child(5) {
  width: auto;
}

.admin-bans-table th:nth-child(6),
.admin-bans-table td:nth-child(6) {
  width: 160px;
}

.admin-bans-table th:nth-child(7),
.admin-bans-table td:nth-child(7) {
  width: 165px;
}

.admin-bans-table th:nth-child(8),
.admin-bans-table td:nth-child(8) {
  width: 150px;
}

.customer-player-table .table-actions,
.admin-player-table .table-actions {
  flex-wrap: nowrap;
}

.admin-player-table {
  min-width: 1120px;
}

.admin-player-table th:nth-child(1),
.admin-player-table td:nth-child(1) {
  width: 180px;
}

.admin-player-table th:nth-child(2),
.admin-player-table td:nth-child(2) {
  width: 100px;
}

.admin-player-table th:nth-child(3),
.admin-player-table td:nth-child(3) {
  width: 190px;
}

.admin-player-table th:nth-child(4),
.admin-player-table td:nth-child(4) {
  width: 230px;
}

.admin-player-table th:nth-child(5),
.admin-player-table td:nth-child(5) {
  width: 280px;
}

.admin-player-table th:nth-child(6),
.admin-player-table td:nth-child(6) {
  width: 170px;
}

.admin-player-table th:nth-child(7),
.admin-player-table td:nth-child(7) {
  width: 120px;
}

.compact-loading {
  min-height: 140px;
}

.panel-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-heading-row h3 {
  margin: 0 0 4px;
}

.key-copy-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.created-key-list {
  display: grid;
  gap: 8px;
}

.created-key-item,
.redeem-key-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.38);
}

.created-key-item small,
.redeem-key-summary span:last-child {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.redeem-choice-panel {
  border-color: rgba(34, 211, 238, 0.28);
  box-shadow: 0 18px 42px rgba(8, 145, 178, 0.1);
}

@media (max-width: 560px) {
  .trend-chart {
    height: 220px;
  }

  .trend-value {
    display: none;
  }

  .panel-heading-row,
  .created-key-item,
  .redeem-key-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .created-key-item small,
  .redeem-key-summary span:last-child {
    text-align: left;
  }
}
