:root {
  --bg: #050b1c;
  --bg-soft: #070f27;
  --panel: rgba(12, 20, 44, 0.9);
  --panel-2: rgba(16, 28, 62, 0.85);
  --panel-3: rgba(20, 32, 66, 0.75);
  --line: rgba(130, 144, 210, 0.2);
  --line-strong: rgba(130, 144, 210, 0.38);
  --ink: #f7f9ff;
  --ink-soft: rgba(247, 249, 255, 0.72);
  --muted: #9aa6d0;
  --brand: #7c7fff;
  --brand-soft: rgba(124, 127, 255, 0.2);
  --accent: #48e5ff;
  --danger: #ff7a9e;
  --surface-hover: rgba(124, 127, 255, 0.12);
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-lg: 0 36px 70px rgba(4, 10, 30, 0.55);
  --shadow-md: 0 24px 48px rgba(8, 14, 40, 0.45);
  --shadow-sm: 0 14px 32px rgba(5, 12, 30, 0.32);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.24), transparent 42%),
              radial-gradient(circle at 85% 15%, rgba(8, 145, 178, 0.18), transparent 46%),
              linear-gradient(180deg, var(--bg) 0%, #020617 100%);
  color: var(--ink);
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
body::after {
  content: "";
  position: fixed;
  inset: 18% auto auto 62%;
  width: 32vw;
  max-width: 480px;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(72, 229, 255, 0.13), transparent 65%);
  filter: blur(0px);
  opacity: 0.8;
  pointer-events: none;
  z-index: -1;
}
body.noScroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 28px;
  padding: 32px clamp(18px, 5vw, 48px) 40px;
  position: relative;
}

.sidebar {
  background: linear-gradient(165deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px 20px 24px;
  position: sticky;
  top: 32px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  backdrop-filter: blur(22px);
  max-height: calc(100vh - 64px);
  overflow: hidden auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 235, 0.25) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 235, 0.24);
  border-radius: 999px;
}
.sidebar::-webkit-scrollbar-track { background: transparent; }

.brand {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand::after {
  content: "Administration";
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(247, 249, 255, 0.36);
  margin-left: auto;
}
@media (max-width: 960px) {
  .brand::after { display: none; }
}
body > .topbar .brand::after,
.topbar .brand::after { display: none; }

.menu { display: flex; flex-direction: column; gap: 6px; }
.menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--muted);
  font-weight: 700;
  border: 1px solid transparent;
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease, transform 0.25s ease;
  position: relative;
}
.menu a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top right, rgba(124, 127, 255, 0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.menu a:hover {
  color: var(--ink);
  background: var(--surface-hover);
  border-color: var(--brand-soft);
  transform: translateX(4px);
}
.menu a:hover::after { opacity: 1; }
.menu a.active {
  color: #050d24;
  background: linear-gradient(135deg, rgba(124, 127, 255, 0.94) 0%, rgba(72, 229, 255, 0.82) 100%);
  border-color: transparent;
  box-shadow: 0 20px 36px rgba(76, 132, 255, 0.45);
}
.menu a.active::after { display: none; }
.menu .btn { margin-top: 12px; width: 100%; justify-content: center; }

.content {
  background: linear-gradient(180deg, rgba(16, 26, 58, 0.92) 0%, rgba(8, 14, 32, 0.9) 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 34px clamp(18px, 4vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  overflow: hidden;
}
.content::before {
  content: "";
  position: absolute;
  inset: -160px -40px auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(124, 127, 255, 0.22), transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}
.content > * { position: relative; z-index: 1; }

body > .topbar { display: none; }
.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(12, 20, 48, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.topbar .hamb {
  font-size: 22px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(124, 127, 255, 0.16);
  color: var(--ink);
  cursor: pointer;
  border: 1px solid rgba(124, 127, 255, 0.32);
}

.h1 {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.page-eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(154, 166, 208, 0.72);
}
.page-lead {
  margin-top: 10px;
  max-width: 540px;
  color: var(--ink-soft);
  font-size: 15px;
}
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(154, 166, 208, 0.7);
  font-weight: 800;
}
.kpi-meta {
  font-size: 12px;
  color: rgba(154, 166, 208, 0.68);
  font-weight: 600;
}
.trend-up { color: #4ade80; font-weight: 700; }
.trend-neutral { color: rgba(154, 166, 208, 0.8); font-weight: 600; }
.trend-down { color: var(--danger); font-weight: 700; }
.section-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.list-plain li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 235, 0.18);
  background: rgba(15, 24, 52, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
.list-plain li .meta {
  font-size: 12px;
  color: rgba(154, 166, 208, 0.78);
  font-weight: 600;
}
.list-plain li.empty { display: block; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(124, 127, 255, 0.28);
  background: rgba(124, 127, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.quick-link {
  flex: 1;
  min-width: 160px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 127, 255, 0.2);
  background: rgba(20, 32, 66, 0.72);
  color: var(--ink);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}
.quick-link:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 127, 255, 0.36);
  background: rgba(124, 127, 255, 0.18);
}
.quick-link span { font-size: 12px; color: rgba(247, 249, 255, 0.7); letter-spacing: 0.08em; text-transform: uppercase; }
.quick-link strong { display: block; font-size: 15px; letter-spacing: -0.01em; }
.quick-link i {
  font-style: normal;
  font-size: 18px;
  opacity: 0.75;
  transition: transform 0.2s ease;
}
.quick-link:hover i { transform: translateX(4px); opacity: 1; }
.empty {
  padding: 18px;
  text-align: center;
  color: rgba(154, 166, 208, 0.72);
  border: 1px dashed rgba(148, 163, 235, 0.2);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.card {
  background: linear-gradient(160deg, rgba(16, 28, 62, 0.9) 0%, rgba(11, 20, 44, 0.85) 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: -40px -60px auto auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(124, 127, 255, 0.16), transparent 70%);
  opacity: 0.7;
  pointer-events: none;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
}
.card .subtle { margin-top: 2px; }

.kpi {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  margin: 6px 0 4px;
  color: var(--ink);
}

.subtle {
  color: rgba(154, 166, 208, 0.75);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(124, 127, 255, 0.32);
  background: rgba(124, 127, 255, 0.12);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.col-12 { grid-column: span 12; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

@media (max-width: 1024px) {
  .col-6, .col-4, .col-3 { grid-column: span 6; }
}
@media (max-width: 760px) {
  .grid { gap: 14px; }
  .col-6, .col-4, .col-3 { grid-column: span 12; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, rgba(124, 127, 255, 0.96) 0%, rgba(72, 229, 255, 0.9) 100%);
  color: #050b1f;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(72, 229, 255, 0.28);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn.danger {
  background: rgba(255, 122, 158, 0.16);
  color: #fecdd3;
  border: 1px solid rgba(255, 122, 158, 0.3);
  box-shadow: 0 10px 24px rgba(255, 122, 158, 0.18);
}
.btn.small { padding: 7px 12px; font-size: 12px; }

input, select, textarea {
  width: 100%;
  background: rgba(12, 20, 48, 0.72);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(124, 127, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 127, 255, 0.15);
}
label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--ink-soft); }

.tplCard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(12, 20, 48, 0.82);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.tplL { display: flex; align-items: center; gap: 12px; }
.thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  display: block;
}
.ttl { font-weight: 800; }
.sub { color: rgba(154, 166, 208, 0.78); font-weight: 600; }

.table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
}
.table th, .table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(148, 163, 235, 0.16);
}
.table th {
  text-align: left;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(154, 166, 208, 0.85);
}
.table tbody tr:hover { background: rgba(124, 127, 255, 0.08); }

.metrics-row .metric-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-sub {
  font-size: 13px;
  color: rgba(154, 166, 208, 0.78);
  font-weight: 600;
}
.metric-delta {
  color: #4ade80;
  font-weight: 700;
}

.podium {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.podium-card {
  flex: 1;
  min-width: 220px;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 127, 255, 0.24);
  background: linear-gradient(160deg, rgba(29, 41, 86, 0.92) 0%, rgba(16, 27, 60, 0.86) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  display: flex;
  gap: 14px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.podium-card::after {
  content: "";
  position: absolute;
  inset: -40px -40px auto auto;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(72, 229, 255, 0.28), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}
.podium-card.lead {
  border-color: rgba(72, 229, 255, 0.6);
  box-shadow: 0 18px 42px rgba(72, 229, 255, 0.16);
}
.podium-rank {
  font-size: 32px;
  font-weight: 900;
  color: rgba(247, 249, 255, 0.86);
  line-height: 1;
  min-width: 48px;
}
.podium-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.podium-name {
  font-weight: 800;
  font-size: 16px;
}
.podium-meta {
  font-size: 13px;
  color: rgba(154, 166, 208, 0.76);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.leaderboard-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.leaderboard-controls .search {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.leaderboard-controls input[type="search"] {
  width: 100%;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
}
.leaderboard-table thead tr {
  background: rgba(15, 24, 52, 0.78);
}
.leaderboard-table th,
.leaderboard-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(124, 127, 255, 0.16);
  text-align: left;
}
.leaderboard-table th {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(154, 166, 208, 0.82);
  font-weight: 800;
}
.leaderboard-table tbody tr:hover {
  background: rgba(124, 127, 255, 0.1);
}
.leaderboard-table .player {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.leaderboard-table .player .sub {
  display: block;
  font-size: 12px;
  color: rgba(154, 166, 208, 0.72);
  font-weight: 600;
}
.rank-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(124, 127, 255, 0.18);
  border: 1px solid rgba(124, 127, 255, 0.32);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 127, 255, 0.32) 0%, rgba(72, 229, 255, 0.28) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  border: 1px solid rgba(124, 127, 255, 0.38);
  overflow: hidden;
}
.avatar.has-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 24, 52, 0.82);
  border: 1px solid rgba(124, 127, 255, 0.24);
  gap: 4px;
}
.segmented-btn {
  border: none;
  background: transparent;
  color: rgba(247, 249, 255, 0.72);
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.segmented-btn.active {
  background: linear-gradient(135deg, rgba(124, 127, 255, 0.8) 0%, rgba(72, 229, 255, 0.72) 100%);
  color: #050b1f;
  box-shadow: 0 10px 20px rgba(72, 229, 255, 0.25);
}

.table-wrap {
  overflow-x: auto;
}

.leaderboard-empty {
  text-align: center;
  padding: 24px 12px;
  color: rgba(154, 166, 208, 0.72);
  font-weight: 600;
}

.leaderboard-meta {
  font-size: 13px;
  color: rgba(154, 166, 208, 0.7);
  font-weight: 600;
}

@media (max-width: 720px) {
  .podium {
    flex-direction: column;
  }
  .leaderboard-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .leaderboard-controls .search {
    max-width: 100%;
  }
  .segmented {
    width: 100%;
    justify-content: space-between;
  }
  .segmented-btn {
    flex: 1;
    text-align: center;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 127, 255, 0.18);
  background: rgba(12, 20, 48, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.field-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-weight: 800;
  letter-spacing: 0.01em;
}
.field-hint {
  margin: 0;
  font-size: 12px;
  color: rgba(154, 166, 208, 0.7);
  line-height: 1.4;
}

.switch {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: rgba(124, 127, 255, 0.24);
  border: 1px solid rgba(124, 127, 255, 0.35);
  display: inline-flex;
  align-items: center;
  transition: background 0.2s ease, border 0.2s ease;
}
.switch.on {
  background: linear-gradient(135deg, rgba(124, 127, 255, 0.6) 0%, rgba(72, 229, 255, 0.55) 100%);
  border-color: rgba(72, 229, 255, 0.6);
}
.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.switch-handle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(247, 249, 255, 0.86);
  box-shadow: 0 3px 10px rgba(8, 14, 40, 0.45);
  transform: translateX(4px);
  transition: transform 0.2s ease;
}
.switch input:checked + .switch-handle {
  transform: translateX(26px);
}
.switch input:checked ~ .switch-handle {
  transform: translateX(26px);
}
.switch input:checked ~ .switch-handle,
.switch input:checked + .switch-handle {
  background: #050b1f;
  box-shadow: 0 6px 16px rgba(72, 229, 255, 0.28);
}
.switch input:checked ~ .switch-handle::after,
.switch input:checked + .switch-handle::after {
  background: linear-gradient(135deg, rgba(124, 127, 255, 0.9) 0%, rgba(72, 229, 255, 0.85) 100%);
}
.switch-handle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(247, 249, 255, 0.95) 0%, rgba(231, 238, 255, 0.9) 100%);
  pointer-events: none;
}
.switch-field {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.switch-field .field-head {
  max-width: 68%;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.form-status {
  font-size: 13px;
  color: rgba(154, 166, 208, 0.76);
  font-weight: 600;
}
.form-status[data-tone="success"] { color: #4ade80; }
.form-status[data-tone="error"] { color: var(--danger); }
.form-status[data-tone="warn"] { color: #facc15; }

.mining-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
}
.mining-table th,
.mining-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(124, 127, 255, 0.16);
}
.mining-table th {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(154, 166, 208, 0.78);
  font-weight: 800;
}
.mining-table tbody tr:hover {
  background: rgba(124, 127, 255, 0.1);
}
.mining-tier {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124, 127, 255, 0.18);
  border: 1px solid rgba(124, 127, 255, 0.3);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.tier-label {
  font-weight: 700;
  color: rgba(247, 249, 255, 0.85);
}
.preview-text {
  font-size: 12px;
  color: rgba(154, 166, 208, 0.72);
  font-weight: 600;
}

.api-callouts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.api-callouts code {
  background: rgba(15, 24, 52, 0.72);
  border: 1px solid rgba(124, 127, 255, 0.25);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
}

.note-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(154, 166, 208, 0.78);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.code-block {
  position: relative;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(12, 20, 48, 0.7);
  border: 1px solid rgba(124, 127, 255, 0.22);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  color: rgba(226, 232, 255, 0.92);
  overflow-x: auto;
}
.code-block code { white-space: pre; display: block; }

.button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.signal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.signal-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 127, 255, 0.22);
  background: rgba(15, 24, 52, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
}
.signal-card::after {
  content: "";
  position: absolute;
  inset: -40px -40px auto auto;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(124, 127, 255, 0.14), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}
.signal-severity {
  min-width: 86px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(124, 127, 255, 0.2);
  border: 1px solid rgba(124, 127, 255, 0.35);
  text-align: center;
}
.signal-severity.high { background: rgba(255, 122, 158, 0.22); border-color: rgba(255, 122, 158, 0.38); color: #fecdd3; }
.signal-severity.medium { background: rgba(250, 204, 21, 0.18); border-color: rgba(250, 204, 21, 0.35); color: #facc15; }
.signal-severity.low { background: rgba(74, 222, 128, 0.18); border-color: rgba(74, 222, 128, 0.32); color: #4ade80; }
.signal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.signal-summary {
  font-weight: 800;
  font-size: 15px;
}
.signal-meta {
  font-size: 13px;
  color: rgba(154, 166, 208, 0.75);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.signal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.watchlist {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.watchlist-form {
  flex: 1;
  min-width: 260px;
  max-width: 320px;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 127, 255, 0.22);
  background: rgba(12, 20, 48, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.watchlist-form h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
}
.watchlist-form form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.watchlist-items {
  flex: 2;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.watchlist-items h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.watchlist-history-title {
  margin-top: 12px !important;
}
.watchlist-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.watchlist-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 127, 255, 0.18);
  background: rgba(15, 24, 52, 0.64);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.watchlist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.watchlist-user {
  font-weight: 800;
  font-size: 15px;
}
.watchlist-reason {
  color: rgba(154, 166, 208, 0.78);
  font-weight: 600;
}
.watchlist-meta {
  font-size: 12px;
  color: rgba(154, 166, 208, 0.65);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.watchlist-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.severity-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.severity-dot.high { background: rgba(255, 122, 158, 0.18); color: #fecdd3; }
.severity-dot.medium { background: rgba(250, 204, 21, 0.18); color: #facc15; }
.severity-dot.low { background: rgba(74, 222, 128, 0.18); color: #4ade80; }

.queue-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 820px) {
  .watchlist {
    flex-direction: column;
  }
  .watchlist-form,
  .watchlist-items {
    width: 100%;
    max-width: none;
  }
}
@media (max-width: 720px) {
  .switch-field {
    flex-direction: column;
    align-items: flex-start;
  }
  .switch-field .field-head {
    max-width: 100%;
  }
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.55);
  z-index: 120;
  backdrop-filter: blur(2px);
}
.overlay.show { display: block; }

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 20px;
    padding: 26px clamp(16px, 5vw, 32px) 30px;
  }
}
@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 20px 18px 28px;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    max-width: min(320px, 82vw);
    width: 100%;
    transform: translateX(-105%);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    top: 0;
    max-height: 100vh;
    z-index: 140;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  body > .topbar,
  .content .topbar {
    display: flex;
  }
  .content {
    padding: 22px 20px 26px;
  }
  .content .topbar {
    margin: -22px -20px 12px;
    border-radius: var(--radius-lg) var(--radius-lg) 16px 16px;
  }
}
@media (max-width: 560px) {
  .btn { width: 100%; }
  .page-actions { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
