:root {
  --bg: #080d16;
  --bg2: #0d1422;
  --panel: rgba(18, 25, 40, .88);
  --panel2: rgba(24, 33, 53, .92);
  --panel3: rgba(12, 18, 31, .78);
  --border: rgba(148, 163, 184, .18);
  --border2: rgba(148, 163, 184, .28);
  --text: #eef4ff;
  --muted: #98a6bd;
  --green: #28d472;
  --red: #ff4054;
  --orange: #ffb02e;
  --blue: #4f7cff;
  --purple: #795cff;
  --cyan: #20d4ff;
  --shadow: 0 22px 70px rgba(0, 0, 0, .45);
  --radius: 16px;
  --sidebar: 284px;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
}

html { color-scheme: dark; }

body {
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% -10%, rgba(79, 124, 255, .25), transparent 28%),
    radial-gradient(circle at 82% 5%, rgba(121, 92, 255, .20), transparent 30%),
    radial-gradient(circle at 65% 85%, rgba(255, 64, 84, .13), transparent 34%),
    linear-gradient(145deg, #070b12 0%, #0a101b 45%, #05080e 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(13, 20, 34, .97), rgba(8, 13, 22, .94));
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  overflow: auto;
  overflow-x: hidden;
  isolation: isolate;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .035), transparent);
  transform: translateX(-110%);
  animation: sidebarSheen 9s linear infinite;
  pointer-events: none;
}

@keyframes sidebarSheen {
  0%, 78% { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.logo {
  width: 52px;
  height: 52px;
  background: url("https://i.ibb.co/twgFTPjz/rearmed-short-logo-1.png") center / contain no-repeat;
  flex: 0 0 auto;
}

.logo.large {
  width: 68px;
  height: 68px;
  margin-bottom: 8px;
}

.live-pill {
  margin-left: auto;
  font-size: 11px;
  color: #84f5b2;
  background: rgba(40, 212, 114, .12);
  border: 1px solid rgba(40, 212, 114, .3);
  padding: 4px 7px;
  border-radius: 7px;
}

.nav {
  display: grid;
  gap: 6px;
  padding-bottom: 18px;
}

.nav button {
  width: 100%;
  color: #cbd5e1;
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  transition: .15s ease;
  text-align: left;
}

.nav button:hover {
  background: rgba(255, 255, 255, .055);
  border-color: rgba(255, 255, 255, .08);
}

.nav button.active {
  background: linear-gradient(135deg, rgba(79, 124, 255, .30), rgba(121, 92, 255, .35));
  border-color: rgba(121, 92, 255, .45);
  color: #fff;
  box-shadow: 0 10px 25px rgba(79, 124, 255, .13);
}

.nav-icon { width: 22px; text-align: center; font-size: 17px; filter: saturate(.9); }

.badge {
  margin-left: auto;
  background: var(--purple);
  color: #fff;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}

.system-card {
  margin-top: auto;
  flex-shrink: 0;
  background: rgba(18, 25, 40, .72);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .32);
}

.system-card h4 {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.system-row b {
  color: #dbeafe;
  text-align: right;
  overflow-wrap: anywhere;
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(40, 212, 114, .55);
  animation: pulse 1.9s infinite;
}

.pulse.offline { background: var(--red); box-shadow: none; animation: none; }

@keyframes pulse {
  70% { box-shadow: 0 0 0 12px rgba(40, 212, 114, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 212, 114, 0); }
}

.main {
  min-width: 0;
  padding: 24px 28px 36px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.page-title { flex: 1; min-width: 0; }
.page-title h1 { margin: 0; font-size: 27px; letter-spacing: 0; }
.page-title p { margin: 4px 0 0; color: var(--muted); }

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.selector-group {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 25, 40, .72);
}

.selector-group > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.selector-group .input {
  height: 40px;
  min-height: 40px;
  border-width: 0 0 0 1px;
  border-radius: 0 11px 11px 0;
  background-color: rgba(7, 12, 22, .42);
  box-shadow: none;
}

.top-actions > .btn,
.top-actions > .status-chip,
.top-actions > form > .btn {
  min-height: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-actions > form {
  display: flex;
  align-items: center;
  margin: 0;
}

.status-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 25, 40, .72);
  color: #d8e2f3;
  font-size: 13px;
  white-space: nowrap;
}

.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.status-chip.connected .status-dot { background: var(--green); box-shadow: 0 0 0 5px rgba(40,212,114,.1); }
.status-chip.offline .status-dot { background: var(--red); }
.status-chip.reconnecting .status-dot { animation: statusBlink 1.4s ease-in-out infinite; }
@keyframes statusBlink { 50% { opacity: .35; } }

.health-value { font-weight: 750; }
.health-online { color: #8ff0b7 !important; }
.health-warning { color: #ffd080 !important; }
.health-offline { color: #ff98a3 !important; }

.btn,
.input,
select,
input,
textarea {
  border: 1px solid var(--border);
  background: rgba(7, 12, 22, .78);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.btn {
  background: rgba(18, 25, 40, .78);
  color: #dce7fa;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .13);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.btn:not(:disabled):hover { transform: translateY(-1px); border-color: var(--border2); }

.btn.primary {
  background: linear-gradient(135deg, #5b6dff, #795cff);
  border-color: rgba(121, 92, 255, .55);
  color: #fff;
  font-weight: 850;
}

.btn.danger {
  background: linear-gradient(135deg, #bf2738, #ff4054);
  border-color: rgba(255, 64, 84, .45);
  color: #fff;
}

.btn.good {
  background: linear-gradient(135deg, #18824a, #28d472);
  border-color: rgba(40, 212, 114, .45);
  color: #fff;
}

.btn.ghost { background: rgba(255, 255, 255, .055); }

select,
select.input {
  appearance: none;
  min-width: 150px;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23dce7fa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
}

.input:focus,
select:focus,
input:focus,
textarea:focus {
  border-color: rgba(121, 92, 255, .62);
  box-shadow: 0 0 0 3px rgba(121, 92, 255, .13);
}

textarea {
  min-height: 92px;
  resize: vertical;
  width: 100%;
}

.compact { min-height: 86px; }
.search-input { width: min(320px, 100%); }

.user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #25314c, #245a78);
  font-weight: 800;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.user small { display: block; color: var(--muted); font-size: 12px; }

.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(160px, 1fr)); margin-bottom: 18px; }

.stat,
.panel-card,
.card,
.data-row,
.alert-card {
  background: linear-gradient(180deg, rgba(18, 25, 40, .92), rgba(11, 17, 29, .92));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.stat {
  padding: 18px;
  min-height: 126px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.stat::after { content: ""; position: absolute; inset: auto -24px -48px auto; width: 120px; height: 120px; border-radius: 50%; background: currentColor; opacity: .06; }
.stat-icon { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 28px; flex: 0 0 auto; background: rgba(255,255,255,.07); }
.stat-copy { min-width: 0; }
.stat .num { font-size: 30px; font-weight: 860; line-height: 1.1; margin-top: 4px; }
.stat .label { color: #d7e2f7; font-weight: 750; }
.stat .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stat.accent-red { color: #ff7180; border-color: rgba(255,64,84,.24); }
.stat.accent-red .stat-icon { background: rgba(255,64,84,.14); }
.stat.accent-blue { color: #7d9cff; border-color: rgba(79,124,255,.24); }
.stat.accent-blue .stat-icon { background: rgba(79,124,255,.14); }
.stat.accent-purple { color: #a792ff; border-color: rgba(121,92,255,.26); }
.stat.accent-purple .stat-icon { background: rgba(121,92,255,.15); }
.stat.accent-orange { color: #ffc35e; border-color: rgba(255,176,46,.24); }
.stat.accent-orange .stat-icon { background: rgba(255,176,46,.14); }

.content-grid {
  display: grid;
  grid-template-columns: minmax(480px, 1fr) minmax(420px, .8fr);
  gap: 18px;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
  gap: 18px;
  align-items: start;
}

.overview-alerts { min-height: 520px; }
.recent-kills-panel { grid-column: 1 / -1; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.live-kills-panel { min-height: 520px; height: 100%; display: flex; flex-direction: column; }
.live-kills-panel .panel-body { flex: 1; min-height: 0; }
.live-kills { display: grid; align-content: start; gap: 9px; max-height: 450px; overflow: auto; }
.live-kill-item { padding: 12px; border: 1px solid rgba(148,163,184,.14); border-radius: 13px; background: linear-gradient(135deg, rgba(24,33,53,.74), rgba(12,18,31,.72)); }
.live-kill-item.is-new { animation: liveKillIn .32s ease both; }
.live-kill-main { display: flex; align-items: center; gap: 9px; }
.live-kill-main > div { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-width: 0; }
.live-kill-main span:not(.live-kill-icon) { color: var(--muted); font-size: 12px; }
.live-kill-icon { width: 30px; height: 30px; display: grid; place-items: center; background: rgba(255,64,84,.12); border-radius: 9px; flex: 0 0 auto; }
.live-kill-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 8px 0 0 39px; color: var(--muted); font-size: 11px; }
.live-kill-meta span, .live-kill-meta time { padding-right: 9px; border-right: 1px solid var(--border); }
@keyframes liveKillIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.new-row { animation: newRowIn 1.8s ease; }
@keyframes newRowIn { 0% { background: rgba(121,92,255,.22); transform: translateY(-4px); } 100% { background: transparent; transform: none; } }

.pager { padding: 12px 18px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.pager:empty { display: none; }
.pager > div { display: flex; align-items: center; gap: 10px; }
.pager .btn { margin: 0; }
.planned-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.planned-row > div:first-child { display: grid; gap: 6px; }

.panel-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-header h2 { font-size: 18px; margin: 0; }
.panel-body { padding: 18px; }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.split-grid,
.settings-grid,
.form-grid {
  display: grid;
  gap: 14px;
}

.split-grid,
.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full { grid-column: 1 / -1; }
.card { padding: 16px; }
.card h3 { margin: 0 0 12px; font-size: 16px; }
.card .btn { margin-top: 12px; }

.check {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  margin: 10px 0;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  font-size: 13px;
  vertical-align: top;
}

.data-table th {
  color: #dce7fa;
  font-size: 12px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .035);
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: rgba(121,92,255,.055); }

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #aeb9cc;
}

.data-list,
.settings-list {
  display: grid;
  gap: 10px;
}

.data-row {
  padding: 12px;
  color: #dbeafe;
  font-size: 13px;
}

.data-row small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.pill {
  font-size: 11px;
  text-transform: uppercase;
  padding: 4px 7px;
  border-radius: 7px;
  font-weight: 800;
  border: 1px solid transparent;
  display: inline-flex;
}

.pill.red { background: rgba(255, 64, 84, .18); color: #fff; border-color: rgba(255, 64, 84, .35); }
.pill.green { background: rgba(40, 212, 114, .18); color: #a7ffcb; border-color: rgba(40, 212, 114, .35); }
.pill.orange { background: rgba(255, 176, 46, .18); color: #ffd58a; border-color: rgba(255, 176, 46, .35); }
.pill.blue { background: rgba(79, 124, 255, .18); color: #cbd6ff; border-color: rgba(79, 124, 255, .35); }

.alert-card {
  position: relative;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 14px;
  padding: 16px;
  margin-bottom: 14px;
  overflow: hidden;
}

.alert-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--orange);
}

.alert-card.cleared::before { background: var(--green); }
.alert-card.banned::before { background: var(--red); }
.alert-card.whitelisted::before { background: var(--blue); }

.alert-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 820;
}

.meta {
  color: #cfdbed;
  font-size: 13px;
  line-height: 1.8;
}

.meta span { color: var(--muted); }

.link-btn {
  min-height: 32px;
  border-radius: 7px;
  border: 1px solid rgba(32, 212, 255, .42);
  background: rgba(32, 212, 255, .12);
  color: #dff8ff;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 9px;
  white-space: nowrap;
}

.player-link {
  display: inline;
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 3px;
}

.player-link:hover {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.player-link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  color: #fff;
}

.profile-header {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.4fr) auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  margin-bottom: 18px;
  border: 1px solid rgba(32, 212, 255, .26);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(79, 124, 255, .14), rgba(32, 212, 255, .06));
}

.profile-identity .eyebrow {
  display: block;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.profile-identity h2 { margin: 0 0 7px; font-size: 24px; overflow-wrap: anywhere; }
.profile-steam { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.btn.small { min-height: 28px; padding: 5px 8px; margin: 0; font-size: 11px; }

.profile-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-context > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 7px;
  background: rgba(7, 12, 22, .34);
}

.profile-context span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.profile-context b { display: block; font-size: 13px; overflow-wrap: anywhere; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.profile-loading { min-height: 150px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.loading-state { min-height: 110px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); border: 1px dashed rgba(148,163,184,.18); border-radius: 14px; background: linear-gradient(90deg, rgba(255,255,255,.025), rgba(121,92,255,.055), rgba(255,255,255,.025)); background-size: 220% 100%; animation: loadingSweep 1.8s ease-in-out infinite; }
.loading-spinner { width: 18px; height: 18px; border: 2px solid rgba(32,212,255,.22); border-top-color: var(--cyan); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes loadingSweep { 50% { background-position: 100% 0; } }
.profile-empty { line-height: 1.7; }
.error-state { border-color: rgba(255, 64, 84, .38); color: #ffd2d8; }

.settings-section {
  padding: 20px;
}

.settings-heading,
.subsection-header,
.settings-block-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.settings-heading { margin-bottom: 18px; }
.settings-heading h3,
.subsection-header h3,
.settings-block-header h4,
.subsection-header h4 { margin: 0; }
.settings-heading p,
.settings-block-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.scope-badge,
.mode-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.scope-badge.global { background: rgba(79,124,255,.15); color: #cbd6ff; border: 1px solid rgba(79,124,255,.3); }
.scope-badge.server { background: rgba(32,212,255,.1); color: #c9f7ff; border: 1px solid rgba(32,212,255,.25); }
.mode-badge { background: rgba(40,212,114,.12); color: #a7ffcb; border: 1px solid rgba(40,212,114,.28); }

.info-box,
.selected-server-box,
.example-box {
  border: 1px solid rgba(32,212,255,.2);
  background: rgba(32,212,255,.055);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: #cbd8ea;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 20px;
}

.selected-server-box { border-left: 3px solid var(--cyan); }
.example-box { margin: 18px 0 0; border-color: rgba(79,124,255,.2); background: rgba(79,124,255,.06); }
.settings-subsection + .settings-subsection { margin-top: 24px; }
.subsection-header { margin-bottom: 16px; }
.section-help { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 12px 0 18px; }

.settings-form { gap: 16px; }
.form-field { min-width: 0; }
.field-label { display: block; color: #e2ebfa; font-size: 13px; font-weight: 750; margin-bottom: 7px; }
.form-field > .input { width: 100%; }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 7px; }
.field-help code { color: #c9f7ff; }
.field-error { min-height: 0; color: #ff9aa5; font-size: 12px; line-height: 1.4; margin-top: 6px; }
.field-error:empty { display: none; }
.input.invalid { border-color: rgba(255,64,84,.7); box-shadow: 0 0 0 3px rgba(255,64,84,.1); }

.check-field { margin: 16px 0; }
.check-field .check { margin: 0; color: #e2ebfa; align-items: flex-start; }
.check-field .check input { margin-top: 3px; }
.check-field .field-help { margin-left: 24px; }

.settings-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.card .settings-actions .btn { margin-top: 0; }
.settings-divider { height: 1px; background: var(--border); margin: 20px 0; }
.compact-divider { margin: 18px 0; }

.settings-list { gap: 18px; }
.settings-block {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(7, 12, 22, .3);
}

.settings-block .settings-block-header { margin-bottom: 16px; }
.server-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.server-row .btn { flex: 0 0 auto; margin: 0; }

.empty-note {
  border: 1px dashed rgba(148, 163, 184, .25);
  background: rgba(255, 255, 255, .035);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
}

.muted { color: var(--muted); }

.page { display: none; animation: fade .16s ease; }
.page.active { display: block; }

@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  min-width: 270px;
  padding: 14px 16px;
  background: rgba(12, 18, 31, .96);
  border: 1px solid rgba(40, 212, 114, .35);
  border-radius: var(--radius);
  display: none;
  color: #dfffea;
  z-index: 20;
}

.toast.show { display: block; animation: fade .16s ease; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
  animation: loginGrid 18s linear infinite;
}

.login-panel {
  width: min(430px, 100%);
  position: relative;
  overflow: hidden;
  padding: 34px;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18,25,40,.94), rgba(8,13,22,.9));
  box-shadow: 0 28px 90px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.05);
  animation: loginCardIn .45s ease both;
}

.login-panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent, rgba(255,255,255,.085), transparent); transform: translateX(-120%); animation: loginSheen 5.8s ease-in-out infinite; pointer-events: none; }
@keyframes loginGrid { to { background-position: 46px 46px, 46px 46px; } }
@keyframes loginCardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes loginSheen { 0%, 72% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.login-panel .eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.login-panel h1 { margin: 0 0 12px; font-size: 34px; }
.btn.wide { width: 100%; display: inline-flex; justify-content: center; min-height: 48px; align-items: center; }

@media (max-width: 1180px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .nav { grid-template-columns: repeat(2, 1fr); }
  .system-card { margin-top: 18px; }
  .content-grid,
  .overview-layout,
  .split-grid,
  .settings-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .profile-header { grid-template-columns: 1fr; }
  .profile-actions { justify-content: flex-start; }
  .recent-kills-panel { grid-column: auto; }
  .live-kills-panel { min-height: 0; }
  .live-kills { max-height: 420px; }
}

@media (max-width: 720px) {
  .main { padding: 18px 14px 28px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; }
  .selector-group { flex: 1 1 160px; }
  .top-actions .input,
  .top-actions .btn { flex: 1 1 160px; }
  .nav,
  .stats,
  .form-grid,
  .alert-card { grid-template-columns: 1fr; }
  .settings-section { padding: 16px; }
  .settings-heading,
  .subsection-header,
  .settings-block-header { flex-direction: column; }
  .profile-context { grid-template-columns: 1fr; }
  .server-row { align-items: flex-start; flex-direction: column; }
  .pager, .planned-row { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
