@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&family=Rajdhani:wght@400;500;600;700&display=swap");

:root {
  --bg: #040a10;
  --bg-2: #061019;
  --surface: rgba(9, 18, 28, 0.82);
  --surface-2: rgba(11, 24, 36, 0.88);
  --line: rgba(45, 94, 74, 0.5);
  --line-soft: rgba(45, 94, 74, 0.3);
  --text: #e9f5ef;
  --muted: #7f9a8f;
  --blue: #2f8cff;
  --green: #24e06e;
  --green-soft: #1bb055;
  --red: #ff354d;
  --yellow: #ffcf31;
  --monster: #ff8a1f;
  --noise-a: rgba(188, 255, 212, 0.035);
  --noise-b: rgba(36, 224, 110, 0.02);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 85%, rgba(36, 224, 110, 0.15), transparent 35%),
    linear-gradient(to top, rgba(36, 224, 110, 0.08) 0%, transparent 32%),
    repeating-linear-gradient(90deg, rgba(36, 224, 110, 0.02), rgba(36, 224, 110, 0.02) 1px, transparent 1px, transparent 42px),
    repeating-linear-gradient(0deg, rgba(36, 224, 110, 0.014), rgba(36, 224, 110, 0.014) 1px, transparent 1px, transparent 36px),
    radial-gradient(circle at 12% 8%, rgba(36, 224, 110, 0.18), transparent 45%),
    radial-gradient(circle at 78% 22%, rgba(36, 224, 110, 0.12), transparent 35%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-2) 60%, #03080e 100%);
  color: var(--text);
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  letter-spacing: 0.2px;
}

button,
input,
select {
  font: inherit;
}

/* Fixed-height app shell: the sidebar and main pane each scroll
   internally (below) instead of the whole page growing past the
   viewport and forcing an outer scroll to reach the bottom of either. */
.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.sidebar {
  background:
    radial-gradient(circle at 78% 54%, rgba(36, 224, 110, 0.18), transparent 35%),
    repeating-linear-gradient(90deg, rgba(36, 224, 110, 0.022), rgba(36, 224, 110, 0.022) 1px, transparent 1px, transparent 24px),
    linear-gradient(180deg, rgba(8, 16, 24, 0.95) 0%, rgba(6, 14, 22, 0.95) 100%),
    radial-gradient(circle at 20% 16%, rgba(36, 224, 110, 0.08), transparent 60%);
  border-right: 1px solid var(--line-soft);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  overflow-y: auto;
  position: relative;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(36, 224, 110, 0.09), transparent 28%),
    repeating-linear-gradient(0deg, rgba(36, 224, 110, 0.03), rgba(36, 224, 110, 0.03) 1px, transparent 1px, transparent 32px);
  opacity: 0.65;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.auth-gate {
  display: none;
  position: relative;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(4, 7, 5, 0.55) 0%, rgba(4, 7, 5, 0.3) 45%, rgba(4, 7, 5, 0.75) 100%),
    url("assets/login-bg.png") center center / cover no-repeat fixed;
}

.auth-hero {
  position: absolute;
  top: 32px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.auth-hero img {
  width: 68px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(58, 240, 109, 0.55));
}

.auth-hero-text {
  display: grid;
  gap: 4px;
}

.auth-hero strong {
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.auth-hero span {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--green);
}

.auth-status {
  position: absolute;
  top: 36px;
  right: 40px;
  display: grid;
  gap: 10px;
  min-width: 180px;
}

.auth-status-title {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-status-state {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-status-state.is-online {
  color: var(--green);
  text-shadow: 0 0 12px rgba(58, 240, 109, 0.6);
}

.auth-status-state.is-offline {
  color: var(--red);
  text-shadow: 0 0 12px rgba(255, 53, 77, 0.5);
}

.auth-status-rows {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.auth-status-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-status-row span:last-child {
  color: var(--text);
  font-weight: 600;
}

.auth-footer-tag {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 32px 30px;
  background: rgba(10, 18, 15, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(58, 240, 109, 0.28);
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 50px rgba(58, 240, 109, 0.08);
  overflow: hidden;
}

/* Thin glowing accent line across the top edge - the one ornamental touch
   that reads as "premium panel" without tipping into the gold/ornate
   over-styling that was previously rejected for this dashboard. */
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0.7;
}

.auth-card-title {
  font-size: 22px;
  margin: 4px 0 22px;
}

.auth-card .field {
  margin: 16px 0;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
  background: rgba(8, 13, 20, 0.65);
  border-color: rgba(58, 240, 109, 0.22);
  padding: 11px 13px;
  font-size: 14px;
  text-transform: none;
}

.auth-card input[type="text"]:focus,
.auth-card input[type="password"]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(58, 240, 109, 0.15);
}

.auth-card .button-row {
  margin-top: 22px;
}

.auth-error {
  display: block;
  margin-top: 10px;
  color: var(--red);
  min-height: 15px;
}

.dashboard-account {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.dashboard-account small {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.brand img {
  width: 40px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(58, 240, 109, 0.5));
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.brand span,
.eyebrow,
small {
  color: var(--muted);
}

.nav-label {
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 4px;
  font-family: "Orbitron", sans-serif;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 10px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  background-image:
    repeating-linear-gradient(90deg, rgba(36, 224, 110, 0.012), rgba(36, 224, 110, 0.012) 1px, transparent 1px, transparent 18px);
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.nav-item:hover {
  background: rgba(21, 38, 46, 0.4);
  border-color: var(--line-soft);
  color: var(--text);
}

.nav-item.is-active {
  background: linear-gradient(90deg, rgba(26, 64, 42, 0.34), rgba(9, 22, 30, 0.5));
  border-color: var(--line);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(36, 224, 110, 0.18), 0 0 16px rgba(36, 224, 110, 0.08);
}

.nav-item.is-active::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--green);
  box-shadow: 0 0 10px rgba(36, 224, 110, 0.9);
}

.bot-card,
.panel-block,
.stat,
.table-shell,
.log-panel {
  background:
    radial-gradient(circle at 88% 86%, rgba(36, 224, 110, 0.16), transparent 34%),
    radial-gradient(circle at 12% 18%, rgba(36, 224, 110, 0.07), transparent 45%),
    repeating-linear-gradient(90deg, rgba(36, 224, 110, 0.014), rgba(36, 224, 110, 0.014) 1px, transparent 1px, transparent 36px),
    linear-gradient(180deg, rgba(9, 19, 30, 0.88) 0%, rgba(8, 15, 24, 0.9) 100%);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(24, 66, 52, 0.25), 0 8px 24px rgba(0, 0, 0, 0.28);
}

.bot-card {
  margin-top: auto;
  padding: 14px;
}

.bot-card strong {
  font-size: 22px;
}

.bot-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--green);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}

.main {
  min-width: 0;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  background-image:
    radial-gradient(circle at 55% 62%, rgba(36, 224, 110, 0.1), transparent 40%),
    radial-gradient(circle at 15% 22%, rgba(36, 224, 110, 0.1), transparent 35%),
    radial-gradient(circle at 75% 78%, rgba(36, 224, 110, 0.09), transparent 38%),
    repeating-linear-gradient(0deg, rgba(36, 224, 110, 0.03), rgba(36, 224, 110, 0.03) 1px, transparent 1px, transparent 46px),
    repeating-linear-gradient(90deg, rgba(36, 224, 110, 0.018), rgba(36, 224, 110, 0.018) 1px, transparent 1px, transparent 56px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(8, 17, 27, 0.76);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--green);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(36, 224, 110, 0.22);
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(8, 18, 28, 0.82);
}

.topbar-status-text {
  display: grid;
  gap: 2px;
}

.topbar-status .auth-status-title {
  letter-spacing: 1.6px;
  font-family: "Orbitron", sans-serif;
}

.topbar-status .auth-status-state {
  font-size: 15px;
}

.sparkline {
  width: 70px;
  height: 26px;
  overflow: visible;
}

.sparkline polyline {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(58, 240, 109, 0.6));
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0.6px;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 17px;
}

.command-strip,
.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 6px;
  color: white;
  padding: 10px 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  font-family: "Rajdhani", sans-serif;
  letter-spacing: 0.3px;
  text-transform: none;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(36, 224, 110, 0.24);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(36, 224, 110, 0.3), 0 0 18px rgba(36, 224, 110, 0.3);
}

.btn:active {
  transform: translateY(0);
  box-shadow: inset 0 0 0 1px rgba(168, 255, 196, 0.35), 0 0 20px rgba(36, 224, 110, 0.34);
}

.btn-primary,
.btn-secondary {
  background:
    linear-gradient(180deg, rgba(18, 56, 38, 0.9) 0%, rgba(10, 31, 22, 0.94) 100%);
  border-color: rgba(47, 140, 255, 0.3);
}

.btn-secondary {
  background:
    linear-gradient(180deg, rgba(16, 28, 38, 0.88) 0%, rgba(9, 18, 24, 0.95) 100%);
  border-color: var(--line-soft);
}

.btn-start {
  background: linear-gradient(180deg, #1cbf5f 0%, #149347 100%);
  border-color: rgba(36, 224, 110, 0.6);
  box-shadow: 0 0 18px rgba(36, 224, 110, 0.22);
}

.btn-stop {
  background: linear-gradient(180deg, #d52a44 0%, #a71f34 100%);
  border-color: rgba(255, 53, 77, 0.45);
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  min-height: 70px;
}

.stat .stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(58, 240, 109, 0.1);
  color: var(--green);
}

.stat .stat-icon-blue {
  background: rgba(47, 140, 255, 0.12);
  color: var(--blue);
}

.stat .stat-icon-green {
  background: rgba(58, 240, 109, 0.12);
  color: var(--green);
}

.stat .stat-icon-red {
  background: rgba(255, 53, 77, 0.12);
  color: var(--red);
}

.stat .stat-icon-orange {
  background: rgba(255, 138, 31, 0.12);
  color: var(--monster);
}

.stat .stat-icon-yellow {
  background: rgba(255, 207, 49, 0.12);
  color: var(--yellow);
}

.stat .stat-icon-cyan {
  background: rgba(60, 220, 255, 0.12);
  color: #3cdcff;
}

.stat .stat-icon svg {
  width: 18px;
  height: 18px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 36px;
  line-height: 1;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.stat-delta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #ffcf31;
  min-height: 15px;
}

.live-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 10px;
}

.map-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 420px;
  min-width: 0;
}

.map-column .map-panel {
  flex: 1;
  min-height: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.panel-header h2 {
  margin: 0;
}

.panel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--green);
  box-shadow: 0 0 10px rgba(36, 224, 110, 0.9);
}

.map-panel {
  height: 420px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(36, 224, 110, 0.09) 1px, transparent 1px),
    repeating-linear-gradient(0deg, rgba(36, 224, 110, 0.03), rgba(36, 224, 110, 0.03) 1px, transparent 1px, transparent 34px),
    repeating-linear-gradient(90deg, rgba(36, 224, 110, 0.02), rgba(36, 224, 110, 0.02) 1px, transparent 1px, transparent 34px),
    radial-gradient(circle at 50% 50%, rgba(36, 224, 110, 0.03), transparent 60%),
    #040c14;
  background-size: 48px 48px, auto, auto, auto, auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.map-legend {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(10, 19, 28, 0.76);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
}

.map-legend span {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.map-legend .marker {
  box-shadow: 0 0 6px currentColor;
}

.map-legend .marker-friendly { color: var(--green); }
.map-legend .marker-resource { color: var(--yellow); }
.map-legend .marker-hostile { color: var(--red); }
.map-legend .marker-monster { color: var(--monster); }
.map-legend .marker-other { color: var(--muted); }

.marker-other {
  background: var(--muted);
}

#liveMap {
  width: 100%;
  height: 100%;
  display: block;
}

.map-hud {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(8, 18, 27, 0.82);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--muted);
}

.map-hud input[type="range"] {
  max-width: 240px;
  width: min(240px, 34vw);
}

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

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.panel-block,
.log-panel {
  padding: 14px;
}

.panel-block h2,
.log-panel h2 {
  margin-bottom: 14px;
}

.state-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(45, 94, 74, 0.26);
}

.state-row:last-child {
  border-bottom: 0;
}

.state-row span,
.field,
.toggle {
  color: var(--muted);
}

.marker {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.marker-hostile {
  background: var(--red);
}

.marker-friendly {
  background: var(--green);
}

.marker-resource {
  background: var(--yellow);
}

.marker-monster {
  background: var(--monster);
}

.activity-panel {
  margin-top: 10px;
}

.activity-log {
  min-height: 0;
  height: 160px;
  overflow-y: auto;
  font-size: 13px;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(45, 94, 74, 0.24);
  background-color: rgba(4, 12, 18, 0.9);
  background-image:
    radial-gradient(circle at 100% 20%, rgba(36, 224, 110, 0.12), transparent 45%),
    linear-gradient(rgba(58, 240, 109, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 240, 109, 0.05) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
  color: #4eea89;
  text-shadow: 0 0 8px rgba(78, 234, 137, 0.18);
}

.field,
.toggle {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}

.toggle {
  grid-template-columns: auto 1fr;
  align-items: center;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 16, 24, 0.94) 0%, rgba(6, 12, 20, 0.98) 100%),
    repeating-linear-gradient(90deg, rgba(36, 224, 110, 0.02), rgba(36, 224, 110, 0.02) 1px, transparent 1px, transparent 20px);
  color: var(--text);
  padding: 10px 11px;
  color-scheme: dark;
}

select option {
  background: #07141f;
  color: #cde5d7;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
  outline: none;
  border-color: rgba(36, 224, 110, 0.75);
  box-shadow: 0 0 0 3px rgba(36, 224, 110, 0.16);
}

/* Table cells are tight on space and don't need the full-width settings-form
   sizing above - narrow, inline-sized inputs read better next to Delete/
   checkbox columns than a field stretched to the cell's full width. */
td input[type="text"],
td input[type="number"],
td input[type="date"] {
  width: auto;
  min-width: 70px;
  padding: 7px 9px;
}

.table-shell {
  overflow: auto;
}

.table-shell::-webkit-scrollbar,
.activity-log::-webkit-scrollbar,
.main::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-shell::-webkit-scrollbar-thumb,
.activity-log::-webkit-scrollbar-thumb,
.main::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(36, 224, 110, 0.35);
  border-radius: 20px;
}

.table-shell::-webkit-scrollbar-track,
.activity-log::-webkit-scrollbar-track,
.main::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: rgba(4, 12, 18, 0.6);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(45, 94, 74, 0.24);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(45, 94, 74, 0.2);
}

tbody tr {
  background: rgba(7, 14, 22, 0.6);
}

tbody tr:hover {
  background: linear-gradient(90deg, rgba(18, 50, 33, 0.4), rgba(8, 18, 24, 0.85));
}

tbody tr.is-selected,
tbody tr[aria-selected="true"] {
  background: linear-gradient(90deg, rgba(22, 72, 44, 0.56), rgba(9, 22, 30, 0.95));
  box-shadow: inset 0 0 0 1px rgba(36, 224, 110, 0.24);
}

th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(9, 19, 29, 0.88);
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

progress {
  width: 180px;
  accent-color: var(--blue);
}

.quest-requirement {
  white-space: nowrap;
}

.quest-requirement + .quest-requirement {
  margin-top: 4px;
}

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

.log-toolbar input[type="text"] {
  width: 200px;
}

.log-toolbar select {
  width: auto;
  min-width: 120px;
}

.log-toolbar-toggle {
  grid-template-columns: auto auto;
  margin: 0;
  color: var(--muted);
}

.log-output {
  padding: 16px;
  max-height: 60vh;
  overflow-y: auto;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.55;
}

.log-line {
  display: block;
  white-space: pre-wrap;
}

.log-line.log-stderr {
  color: var(--red);
}

.log-line.log-stdout {
  color: #c7d3e1;
}

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

pre {
  min-height: 300px;
  margin: 0;
  white-space: pre-wrap;
  color: #54ed8f;
  font-family: "Consolas", "Courier New", monospace;
  line-height: 1.55;
}

.dashboard-account,
.table-shell,
.map-panel,
.panel-block,
.log-panel,
.bot-card,
.stat {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  position: relative;
}

.dashboard-account::before,
.table-shell::before,
.map-panel::before,
.panel-block::before,
.log-panel::before,
.bot-card::before,
.stat::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(36, 224, 110, 0.45), transparent);
  pointer-events: none;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(36, 224, 110, 0.9), rgba(178, 200, 186, 0.8));
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #75ff9f;
  border: 2px solid #0a1b15;
  box-shadow: 0 0 12px rgba(36, 224, 110, 0.75);
  cursor: pointer;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 rgba(36, 224, 110, 0);
  }
  50% {
    box-shadow: 0 0 14px rgba(36, 224, 110, 0.28);
  }
  100% {
    box-shadow: 0 0 0 rgba(36, 224, 110, 0);
  }
}

.status-dot,
.panel-dot {
  animation: pulseGlow 2.6s ease-in-out infinite;
}

.auth-card {
  background:
    radial-gradient(circle at 85% 85%, rgba(36, 224, 110, 0.13), transparent 40%),
    linear-gradient(180deg, rgba(10, 18, 15, 0.78) 0%, rgba(6, 14, 20, 0.86) 100%);
}

.auth-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 5, 8, 0.1), rgba(1, 4, 7, 0.48));
}

.toast,
.notification,
.toast-success,
.toast-error {
  background:
    linear-gradient(180deg, rgba(6, 20, 14, 0.92) 0%, rgba(7, 14, 20, 0.95) 100%),
    radial-gradient(circle at 0% 50%, rgba(36, 224, 110, 0.22), transparent 30%);
  border: 1px solid rgba(36, 224, 110, 0.35);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32), inset 3px 0 0 rgba(36, 224, 110, 0.75);
}

.overlay,
.scrim,
.modal-backdrop {
  background: linear-gradient(180deg, rgba(1, 5, 8, 0.56), rgba(1, 5, 8, 0.72));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

@media (max-width: 1100px) {
  /* Below this width the shell stacks into a single scrolling column
     instead of two independently-scrolling panes - undo the fixed-height
     app-shell sizing from above so the page scrolls normally again. */
  html,
  body {
    height: auto;
    overflow: visible;
  }

  .app-shell {
    height: auto;
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow-y: visible;
  }

  .main {
    height: auto;
    overflow-y: visible;
  }

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

  .bot-card {
    margin-top: 0;
  }

  .stats-grid,
  .live-layout,
  .settings-grid,
  .logs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .main,
  .sidebar {
    padding: 14px;
  }

  .topbar,
  .table-header,
  .map-hud {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .command-strip .btn,
  .button-row .btn {
    flex: 1 1 120px;
  }
}
