:root {
  --bg0: #090909;
  --bg1: #111214;
  --bg2: #1a1b1f;
  --text: #eceef2;
  --muted: #9aa0aa;
  --blue: #ff9f45;
  --cyan: #ff7a3d;
  --violet: #ffd166;
  --line: rgba(166, 173, 185, 0.2);
  --panel: rgba(24, 26, 30, 0.9);
  --shadow: 0 18px 42px rgba(3, 8, 24, 0.55);
  --glass-fill: rgba(38, 41, 48, 0.62);
  --glass-fill-strong: rgba(30, 33, 39, 0.74);
  --glass-line: rgba(203, 210, 224, 0.2);
  --glass-inner: rgba(255, 255, 255, 0.06);
  --tone-gold: #f6c86d;
  --tone-blue: #ff9f45;
  --tone-orange: #ffb264;
  --tone-green: #ff5b45;
  --tone-violet: #ffd166;
  --tone-red: #ff4d3f;
  --accent-primary: #ff9f45;
  --accent-hot: #ff5b45;
  --accent-warn: #ffd166;
  --accent-soft: rgba(255, 159, 69, 0.22);
  --sidebar-w: 258px;
  --sidebar-collapsed: 88px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Rajdhani", sans-serif;
  background:
    radial-gradient(1200px 720px at 8% -20%, rgba(255, 145, 56, 0.14), transparent 58%),
    radial-gradient(920px 560px at 92% 4%, rgba(255, 86, 62, 0.12), transparent 54%),
    radial-gradient(760px 520px at 50% 118%, rgba(255, 196, 90, 0.09), transparent 60%),
    linear-gradient(168deg, #050506 0%, #0d0f12 48%, #13161b 100%);
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(156, 162, 173, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(156, 162, 173, 0.022) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 14%, black 22%, transparent 86%);
}

.glow {
  position: fixed;
  width: 960px;
  height: 960px;
  border-radius: 50%;
  filter: blur(84px);
  opacity: 0.29;
  pointer-events: none;
  z-index: -2;
}

.glow-a {
  background: #0093ff;
  top: -180px;
  left: -110px;
}

.glow-b {
  background: #839dff;
  right: -140px;
  bottom: -180px;
}

.container {
  width: min(100% - 2.2rem, 1260px);
  margin-inline: auto;
}

.app-layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 12px;
  left: 12px;
  bottom: 12px;
  width: var(--sidebar-w);
  border: 1px solid rgba(255, 169, 84, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(165deg, rgba(10, 12, 16, 0.92), rgba(15, 17, 22, 0.74)),
    radial-gradient(circle at 15% 0%, rgba(255, 159, 69, 0.14), transparent 40%);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 140, 58, 0.08);
  backdrop-filter: blur(18px) saturate(118%);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
  z-index: 60;
  display: grid;
  grid-template-rows: auto auto 1fr;
  transition: width 0.22s ease;
}

.sidebar-top {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
  padding: 0.58rem 0.74rem 0.5rem;
  border-bottom: 1px solid rgba(138, 146, 160, 0.16);
}

.sidebar-brand {
  display: inline-flex;
  align-items: center;
}

.sidebar-quick {
  margin: 0.5rem 0.62rem 0;
}

.quick-card {
  border: 1px solid rgba(136, 145, 159, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 146, 72, 0.22), transparent 40%),
    radial-gradient(circle at 86% 100%, rgba(255, 88, 64, 0.18), transparent 38%),
    linear-gradient(165deg, rgba(34, 37, 44, 0.72), rgba(26, 28, 33, 0.68));
  padding: 0.5rem 0.58rem 0.52rem;
  display: grid;
  gap: 0.42rem;
}

.quick-user {
  display: flex;
  align-items: center;
  gap: 0.46rem;
  padding-bottom: 0.34rem;
  border-bottom: 1px solid rgba(128, 137, 151, 0.18);
}

.quick-avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-block;
  border: 1px solid rgba(146, 155, 169, 0.36);
  background: radial-gradient(circle at 32% 28%, rgba(157, 165, 178, 0.76), rgba(118, 126, 140, 0.24) 50%, rgba(98, 104, 116, 0.2));
  box-shadow: inset 0 0 8px rgba(130, 138, 151, 0.3), 0 0 8px rgba(100, 108, 121, 0.16);
}

.sidebar-quick span {
  color: #9da5b2;
  font-size: 0.63rem;
  letter-spacing: 0.03em;
}

.sidebar-quick strong {
  display: block;
  margin-top: 0.02rem;
  font-family: "Orbitron", sans-serif;
  font-size: 0.74rem;
  color: #e3e7ee;
}

.quick-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.36rem;
}

.quick-meta p {
  margin: 0;
  border: 1px solid rgba(135, 144, 159, 0.2);
  border-radius: 8px;
  background: rgba(33, 36, 43, 0.62);
  padding: 0.28rem 0.36rem;
}

.sidebar-nav {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.86rem 0.62rem 1rem;
  display: grid;
  gap: 0.9rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 144, 226, 0.32) transparent;
}

.nav-group {
  display: grid;
  gap: 0.3rem;
  border-top: 1px solid rgba(123, 131, 145, 0.16);
  padding-top: 0.7rem;
}

.nav-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.nav-group p {
  margin: 0;
  color: #8f97a5;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0 0.48rem 0.14rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.68rem;
  min-height: 40px;
  text-decoration: none;
  border-radius: 11px;
  border: 1px solid rgba(0, 0, 0, 0);
  color: #b4bcc8;
  padding: 0.38rem 0.52rem;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(180deg, #a2aab9, #7d8490);
  box-shadow: 0 0 8px rgba(136, 145, 160, 0.34);
  transition: opacity 0.18s ease;
}

.nav-item:hover {
  color: #eef0f3;
  border-color: rgba(255, 170, 90, 0.3);
  background: linear-gradient(120deg, rgba(42, 27, 18, 0.44), rgba(36, 24, 18, 0.34));
  transform: translateX(1px);
}

.nav-item.active {
  color: #ffffff;
  border-color: rgba(255, 174, 96, 0.68);
  background: linear-gradient(120deg, rgba(118, 54, 22, 0.5), rgba(82, 32, 22, 0.42));
  box-shadow: inset 0 0 0 1px rgba(255, 201, 141, 0.2), 0 10px 22px rgba(0, 0, 0, 0.38);
}

.nav-item.active::before {
  opacity: 1;
  background: linear-gradient(180deg, #ff9f45, #ff5b45);
  box-shadow: 0 0 10px rgba(255, 126, 72, 0.45);
}

.nav-item[href^="/dashboard/market"]::before {
  background: linear-gradient(180deg, #ffd166, #ff9f45);
  box-shadow: 0 0 10px rgba(255, 194, 102, 0.4);
}

.nav-item[href^="/dashboard/maquinas"]::before {
  background: linear-gradient(180deg, #ffb264, #ff7a3d);
}

.nav-item[href^="/dashboard/upgrades"]::before {
  background: linear-gradient(180deg, #ff8f5a, #ff4d3f);
}

.nav-item[href^="/dashboard/depositar"]::before,
.nav-item[href^="/dashboard/sacar"]::before,
.nav-item[href^="/dashboard/historico"]::before {
  background: linear-gradient(180deg, #ffd166, #ff8f5a);
}

.nav-item.danger {
  color: #e6b7c4;
}

.nav-item.danger:hover {
  border-color: rgba(255, 136, 167, 0.24);
  background: rgba(68, 24, 42, 0.26);
  color: #ffd8e2;
}

.nav-icon {
  /* width: 0px; */
  /* height: 24px; */
  /* border-radius: 9px; */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* border: 1px solid rgba(100, 162, 241, 0.28); */
  background: transparent;
  color: #c6ceda;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
  border: 0;
  box-shadow: none;
  opacity: 0.92;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: rgb(198 206 218);
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

.nav-item:hover .nav-icon {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(139, 148, 162, 0.28));
}

.nav-item:hover .nav-icon svg {
  transform: translateX(1px);
  stroke: #e5ecf8;
}

.nav-item.active .nav-icon {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(149, 158, 172, 0.34));
}

.nav-item.active .nav-icon svg {
  stroke: #fff1de;
}

.nav-item.danger .nav-icon {
  color: #f0bfcf;
  border-color: transparent;
  background: transparent;
}

.nav-item.danger:hover .nav-icon {
  color: #ffd9e4;
  border-color: transparent;
  background: transparent;
}

.nav-label {
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(136, 145, 159, 0.34);
  background: rgba(45, 49, 58, 0.46);
  color: #d9dee6;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.icon-btn:hover {
  border-color: rgba(153, 162, 177, 0.44);
  color: #edf0f4;
  background: rgba(58, 62, 71, 0.6);
}

#sidebar-toggle {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(137, 145, 160, 0.28);
  background: rgba(39, 43, 52, 0.66);
  color: #b6beca;
  font-size: 0.75rem;
}

.content-shell {
  margin-left: calc(var(--sidebar-w) + 24px);
  min-height: 100vh;
  padding-left: 12px;
  padding-right: 12px;
  transition: margin-left 0.22s ease;
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 40;
  margin-bottom: 0.72rem;
  width: min(100% - 2.2rem, 1260px);
  margin-inline: auto;
  border: 1px solid rgb(0 0 0);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% -70%, rgb(0 0 0 / 68%), transparent 50%),
    radial-gradient(circle at 82% -45%, rgba(255, 87, 58, 0.14), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    rgba(18, 21, 27, 0.72);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px) saturate(115%);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
}

.topbar .container {
  width: 100%;
}

.topbar-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.56rem 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.76rem;
  padding-left: 0.55rem;
}

.topbar-title {
  display: grid;
  gap: 0.12rem;
}

.topbar-eyebrow {
  margin: 0;
  color: #9da5b2;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.63rem;
  font-weight: 700;
}

.topbar-title h1 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
}

.topbar-title small {
  color: #a0a7b4;
  font-size: 0.8rem;
}

.topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding-left: 0.82rem;
  padding-right: 0.55rem;
  border-left: 1px solid rgba(159, 169, 185, 0.18);
}

.topbar-pills {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin-right: 0.2rem;
}

.topbar-pills article {
  border: 1px solid rgb(0 0 0 / 0%);
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(8, 10, 14, 0.96), rgba(12, 15, 21, 0.9));
  padding: 0.34rem 0.62rem;
  min-width: 138px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.topbar-pills article:first-child {
  border-color: rgba(64, 231, 183, 0.38);
  box-shadow: inset 0 1px 0 rgba(131, 255, 222, 0.1), 0 0 0 1px rgba(64, 231, 183, 0.1);
}

.topbar-pills article:last-child {
  border-color: rgb(255 255 255 / 0%);
  box-shadow: inset 0 1px 0 rgba(143, 226, 255, 0.1), 0 0 0 1px rgba(55, 198, 255, 0.1);
}

.topbar-pills span {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  color: #1bffb1;
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.topbar-pills span svg {
  width: 11px;
  height: 11px;
}

.topbar-pills strong {
  display: block;
  margin-top: 0.04rem;
  font-family: "Orbitron", sans-serif;
  font-size: 0.88rem;
  color: #f5f8ff;
}

.pill-balance strong {
  text-shadow: 0 0 10px rgba(80, 238, 193, 0.2);
}

.pill-era strong {
  text-shadow: 0 0 10px rgba(80, 191, 255, 0.2);
}

.toolbar-btn {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(84, 96, 116, 0.36);
  background: linear-gradient(165deg, rgba(8, 10, 14, 0.96), rgba(12, 15, 21, 0.9));
  color: #f4f7ff;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  padding: 0.36rem 0.8rem;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
  position: relative;
}

.toolbar-btn svg {
  width: 14px;
  height: 14px;
}

.toolbar-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(123, 138, 162, 0.48);
  background: linear-gradient(165deg, rgba(10, 13, 18, 1), rgba(16, 20, 28, 0.94));
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.3);
}

.toolbar-alert {
  border-color: rgba(255, 166, 73, 0.78);
  color: #ffe8c8;
  box-shadow: inset 0 0 0 1px rgba(255, 171, 88, 0.2);
}

.toolbar-alert:hover {
  border-color: rgba(255, 182, 106, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 184, 110, 0.25), 0 10px 20px rgba(0, 0, 0, 0.3);
}

.alert-ping {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ffad43;
  box-shadow: 0 0 8px rgba(255, 173, 67, 0.7);
  animation: statusPulse 1.4s ease-in-out infinite;
}

.mobile-only {
  display: none;
}

.mobile-brand {
  display: none;
}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 20px rgba(255, 157, 69, 0.48));
}

.topbar-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.topbar-status article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(14, 21, 42, 0.8);
  min-width: 160px;
  padding: 0.52rem 0.66rem;
}

.topbar-status span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.topbar-status strong {
  display: block;
  margin-top: 0.1rem;
  font-family: "Orbitron", sans-serif;
  font-size: 0.9rem;
}

.topbar-status .highlight strong {
  color: #ffe7c9;
  text-shadow: 0 0 14px rgba(255, 160, 76, 0.45);
}

.topbar-status .era-badge strong {
  color: #ffe5c5;
}

.avatar-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-left: 0.42rem;
  background: #ff9f45;
  box-shadow: 0 0 10px rgba(255, 159, 69, 0.8);
}

.dashboard {
  padding: 1.1rem 0 2.3rem;
  display: grid;
  gap: 0.86rem;
}

.dashboard > section {
  animation: sectionIn 0.55s ease both;
}

.dashboard > section:nth-child(2) {
  animation-delay: 0.06s;
}

.dashboard > section:nth-child(3) {
  animation-delay: 0.12s;
}

.dashboard > section:nth-child(4) {
  animation-delay: 0.18s;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.68rem;
}

.kpi-card,
.panel,
.machine-card {
  border: 1px solid rgb(255 255 255 / 39%);
  border-radius: 18px;
  background: linear-gradient(175deg, rgba(10, 12, 16, 0.9), rgb(0 0 0 / 87%)), rgb(30 33 39);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgb(255 255 255 / 93%), inset 0 0 0 1px rgba(255, 140, 58, 0.06);
  backdrop-filter: blur(14px) saturate(112%);
  -webkit-backdrop-filter: blur(14px) saturate(112%);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card::before,
.panel::before,
.machine-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015) 34%, transparent 58%),
    radial-gradient(circle at 14% 8%, rgb(255 168 90 / 0%), transparent 36%);
}

.kpi-card:hover,
.panel:hover,
.machine-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 174, 96, 0.34);
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(255, 146, 64, 0.08);
}

.kpi-card {
  padding: 0.82rem;
}

.kpi-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  opacity: 0.65;
  background: linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.85) 50%, transparent 100%);
}

.kpi-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.kpi-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
}

.kpi-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(189, 198, 215, 0.82);
  box-shadow: 0 0 0 0 rgba(189, 198, 215, 0.38);
  animation: kpiDotPulse 2.6s ease-in-out infinite;
}

.kpi-label i,
.kpi-label svg {
  width: 14px;
  height: 14px;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.18));
}

.kpi-card strong {
  display: block;
  margin-top: 0.2rem;
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
}

.kpi-card small {
  display: block;
  margin-top: 0.3rem;
  color: #ffc88f;
  font-size: 0.8rem;
}

.kpi-card strong {
  color: #f0f2f5;
}

.kpi-balance {
  border-color: rgba(44, 233, 169, 0.68);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(44, 233, 169, 0.22);
}

.kpi-balance::after {
  background: linear-gradient(90deg, transparent, rgba(44, 233, 169, 0.98), transparent);
}

.kpi-balance .kpi-label,
.kpi-balance .kpi-label svg,
.kpi-balance small {
  color: #52f0ba;
}

.kpi-balance .kpi-label::before {
  background: #48e6b0;
  box-shadow: 0 0 0 0 rgba(44, 233, 169, 0.4);
}

.kpi-balance strong {
  color: #effff8;
  text-shadow: 0 0 10px rgba(44, 233, 169, 0.22);
}

.kpi-hash {
  border-color: rgba(57, 157, 255, 0.62);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(57, 157, 255, 0.2);
}

.kpi-hash::after {
  background: linear-gradient(90deg, transparent, rgba(57, 157, 255, 0.98), transparent);
}

.kpi-hash .kpi-label,
.kpi-hash .kpi-label svg,
.kpi-hash small {
  color: #5cb6ff;
}

.kpi-hash .kpi-label::before {
  background: #42abff;
  box-shadow: 0 0 0 0 rgba(66, 171, 255, 0.4);
}

.kpi-hash strong {
  color: #f2f7ff;
  text-shadow: 0 0 10px rgba(116, 194, 255, 0.22);
}

.kpi-energy {
  border-color: rgba(37, 225, 255, 0.64);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(37, 225, 255, 0.22);
}

.kpi-energy::after {
  background: linear-gradient(90deg, transparent, rgba(37, 225, 255, 0.98), transparent);
}

.kpi-energy .kpi-label,
.kpi-energy .kpi-label svg,
.kpi-energy small {
  color: #47eeff;
}

.kpi-energy .kpi-label::before {
  background: #2fe6ff;
  box-shadow: 0 0 0 0 rgba(37, 225, 255, 0.38);
}

.kpi-energy strong {
  color: #f1fdff;
  text-shadow: 0 0 10px rgba(37, 225, 255, 0.22);
}

.kpi-profit {
  border-color: rgba(255, 232, 33, 0.66);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(255, 232, 33, 0.22);
}

.kpi-profit::after {
  background: linear-gradient(90deg, transparent, rgba(255, 232, 33, 0.98), transparent);
}

.kpi-profit .kpi-label,
.kpi-profit .kpi-label svg,
.kpi-profit small {
  color: #fff14f;
}

.kpi-profit .kpi-label::before {
  background: #ffeb24;
  box-shadow: 0 0 0 0 rgba(255, 232, 33, 0.38);
}

.kpi-profit strong {
  color: #fffef0;
  text-shadow: 0 0 10px rgba(255, 232, 33, 0.2);
}

.kpi-machines {
  border-color: rgba(181, 124, 255, 0.66);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(181, 124, 255, 0.24);
}

.kpi-machines::after {
  background: linear-gradient(90deg, transparent, rgba(181, 124, 255, 0.98), transparent);
}

.kpi-machines .kpi-label,
.kpi-machines .kpi-label svg,
.kpi-machines small {
  color: #bf92ff;
}

.kpi-machines .kpi-label::before {
  background: #b67eff;
  box-shadow: 0 0 0 0 rgba(181, 124, 255, 0.38);
}

.kpi-machines strong {
  color: #f7f1ff;
  text-shadow: 0 0 10px rgba(181, 124, 255, 0.22);
}

.kpi-card strong.is-live {
  animation: valuePulse 2.2s ease-in-out infinite;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 0.68rem;
}

.panel {
  padding: 0.88rem;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.panel-head h2 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
}

.panel-head span {
  color: var(--muted);
  font-size: 0.84rem;
}

.era-current {
  margin: 0.34rem 0 0;
  font-size: 0.8rem;
  color: #ffd8a8;
}

#cycle-timer {
  color: #ffd68f;
  font-family: "Orbitron", sans-serif;
  font-size: 0.88rem;
  text-shadow: 0 0 12px rgba(255, 173, 79, 0.38);
}

#productionChart {
  width: 100%;
  height: auto;
  margin-top: 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(184, 192, 206, 0.2);
  background: linear-gradient(180deg, rgba(175, 183, 198, 0.07), rgba(110, 118, 132, 0.02));
  transition: border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 171, 90, 0.08);
}

.production-panel {
  position: relative;
  transition: border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
  isolation: isolate;
  --mx: 18%;
  --my: 8%;
  background:
    linear-gradient(165deg, rgb(7 12 30), rgba(15, 10, 24, 0.9)),
    radial-gradient(800px 260px at 20% 0%, rgb(63 212 255 / 45%), #000000 62%);
}

.production-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 220px at var(--mx) var(--my), rgb(63 212 255 / 12%), transparent 68%),
    radial-gradient(440px 210px at calc(100% - var(--mx)) calc(var(--my) + 4%), rgb(0 0 0 / 8%), #000000 68%);
  opacity: 1;
  z-index: 0;
}

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

.production-panel.metric-hash {
  border-color: rgb(0 0 0 / 0%);
  box-shadow: 0 24px 48px rgb(0 0 0 / 83%), inset 0 1px 0 rgb(255 255 255 / 0%), 0 0 0 1px rgb(63 212 255 / 0%);
}

.production-panel.metric-profit {
  border-color: rgb(255 79 191 / 0%);
  box-shadow: 0 24px 48px rgb(0 0 0 / 82%), inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 0 1px rgb(255 79 191 / 0%);
}

.production-panel.metric-efficiency {
  border-color: rgb(0 0 0 / 0%);
  box-shadow: 0 24px 48px rgb(0 0 0 / 85%), inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 0 1px rgb(139 255 79 / 0%);
}

.production-panel.metric-hash #productionChart {
  border-color: rgba(63, 212, 255, 0.64);
  background: linear-gradient(180deg, rgba(24, 88, 132, 0.28), rgba(20, 58, 84, 0.14));
  box-shadow: inset 0 0 0 1px rgba(98, 219, 255, 0.2), 0 0 24px rgba(63, 212, 255, 0.18);
}

.production-panel.metric-profit #productionChart {
  border-color: rgba(255, 79, 191, 0.64);
  background: linear-gradient(180deg, rgba(104, 22, 82, 0.28), rgba(72, 18, 58, 0.14));
  box-shadow: inset 0 0 0 1px rgba(255, 109, 202, 0.2), 0 0 24px rgba(255, 79, 191, 0.18);
}

.production-panel.metric-efficiency #productionChart {
  border-color: rgba(139, 255, 79, 0.64);
  background: linear-gradient(180deg, rgba(48, 116, 19, 0.3), rgba(26, 63, 12, 0.16));
  box-shadow: inset 0 0 0 1px rgba(171, 255, 132, 0.22), 0 0 24px rgba(139, 255, 79, 0.18);
}

.chart-tabs {
  margin-top: 0.56rem;
  display: inline-flex;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.chart-tab {
  border: 1px solid rgba(132, 156, 198, 0.28);
  border-radius: 999px;
  background: rgba(20, 24, 31, 0.72);
  color: #d5d9e0;
  min-height: 30px;
  padding: 0.28rem 0.6rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.chart-tab:hover {
  border-color: rgba(174, 201, 255, 0.52);
  color: #fff0db;
  transform: translateY(-1px);
}

.chart-tab.active {
  color: #ffffff;
  border-color: rgba(63, 212, 255, 0.48);
  background: linear-gradient(130deg, rgba(34, 80, 138, 0.5), rgba(54, 34, 128, 0.42));
  box-shadow: inset 0 0 0 1px rgba(142, 206, 255, 0.22);
}

.chart-tab.tab-hash.active {
  border-color: rgba(63, 212, 255, 0.62);
  background: linear-gradient(130deg, rgba(28, 116, 170, 0.56), rgba(24, 78, 128, 0.44));
  box-shadow: inset 0 0 0 1px rgba(129, 223, 255, 0.28), 0 0 14px rgba(63, 212, 255, 0.22);
}

.chart-tab.tab-profit.active {
  border-color: rgba(255, 79, 191, 0.62);
  background: linear-gradient(130deg, rgba(148, 30, 110, 0.52), rgba(114, 24, 86, 0.42));
  box-shadow: inset 0 0 0 1px rgba(255, 144, 216, 0.24), 0 0 14px rgba(255, 79, 191, 0.22);
}

.chart-tab.tab-efficiency.active {
  border-color: rgba(139, 255, 79, 0.62);
  background: linear-gradient(130deg, rgba(64, 142, 24, 0.54), rgba(40, 112, 20, 0.42));
  box-shadow: inset 0 0 0 1px rgba(188, 255, 164, 0.24), 0 0 14px rgba(139, 255, 79, 0.2);
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(132, 200, 255, 0.32);
  border-radius: 10px;
  background: rgba(20, 23, 29, 0.94);
  color: #ffe9cf;
  padding: 0.46rem 0.56rem;
  font-size: 0.76rem;
  box-shadow: 0 10px 20px rgba(2, 8, 26, 0.45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.1s ease, transform 0.1s ease;
  z-index: 3;
  min-width: 156px;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 0.26rem;
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
}

.chart-tooltip p {
  margin: 0.15rem 0 0;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.chart-tooltip p span {
  color: #9dd7ff;
}

.chart-tooltip p b {
  color: #ffe6c7;
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
}

.chart-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.panel-legend {
  margin-top: 0.62rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.66rem;
  color: var(--muted);
}

.panel-legend span {
  transition: color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
  opacity: 0.72;
}

.panel-legend span.active {
  opacity: 1;
  color: #eaf6ff;
  transform: translateY(-1px);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 0.35rem;
}

.dot.cyan {
  background: #3fd4ff;
}

.dot.violet {
  background: #ff4fbf;
}

.dot.blue {
  background: #8bff4f;
}

.dot.green {
  background: #ffb264;
}

.dot.orange {
  background: #ff7a3d;
}

.era-panel {
  position: relative;
  isolation: isolate;
  --mx: 78%;
  --my: 18%;
  border-color: rgb(0 0 0 / 0%);
  background:
    radial-gradient(540px 240px at 50% -10%, rgb(63 212 255 / 0%), #00000000 66%),
    radial-gradient(500px 260px at 92% 10%, rgb(0 0 0), #000000 68%),
    linear-gradient(170deg, rgba(13, 16, 22, 0.94), rgba(9, 11, 16, 0.88));
  box-shadow: 0 24px 48px rgb(5 6 14 / 92%), inset 0 1px 0 rgb(255 255 255 / 0%), 0 0 0 1px rgb(110 159 255 / 0%);
}

.era-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px 220px at var(--mx) var(--my), rgb(255 79 191 / 0%), transparent 70%);
  z-index: 0;
}

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

.era-progress {
  margin-top: 0.9rem;
}

.bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(44, 52, 68, 0.72);
  position: relative;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3fd4ff, #8b7bff, #ff4fbf);
  box-shadow: 0 0 14px rgba(116, 158, 255, 0.34);
  position: relative;
}

.bar span::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 86px;
  right: -24px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(226, 243, 255, 0.55), rgba(255, 255, 255, 0));
  filter: blur(0.4px);
  animation: progressShine 2.8s linear infinite;
}

.era-track {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.42rem;
}

.era-track li {
  border: 1px solid rgba(167, 176, 196, 0.34);
  border-radius: 999px;
  padding: 0.3rem 0.58rem;
  color: var(--muted);
  font-size: 0.82rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.38rem;
  position: relative;
}

.era-track li:hover {
  transform: translateX(2px);
  border-color: rgba(136, 194, 255, 0.54);
  box-shadow: inset 0 0 0 1px rgba(149, 212, 255, 0.14);
}

.era-track li::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 100%;
  width: 1px;
  height: 10px;
  background: rgba(130, 138, 153, 0.34);
}

.era-track li:last-child::after {
  display: none;
}

.era-track li svg {
  width: 13px;
  height: 13px;
  opacity: 0.86;
}

.era-track li.done {
  color: #e2f7ff;
  border-color: rgba(93, 216, 255, 0.64);
  background: linear-gradient(120deg, rgba(24, 84, 126, 0.46), rgba(20, 62, 94, 0.36));
  box-shadow: inset 0 0 0 1px rgba(134, 226, 255, 0.24);
}

.era-track li.active {
  color: #ffeaff;
  border-color: rgba(255, 79, 191, 0.7);
  background: linear-gradient(120deg, rgba(106, 30, 90, 0.52), rgba(132, 36, 112, 0.4));
  box-shadow: 0 0 14px rgba(255, 79, 191, 0.34), inset 0 0 0 1px rgba(255, 160, 224, 0.24);
  transform: translateX(2px);
  animation: eraActivePulse 2.2s ease-in-out infinite;
}

.era-track li.future {
  color: #acb4c5;
  border-style: dashed;
  border-color: rgba(128, 138, 158, 0.52);
  background: linear-gradient(120deg, rgba(42, 45, 52, 0.72), rgba(32, 35, 41, 0.76));
}

.era-track li[data-era="retro"] {
  border-color: rgba(63, 212, 255, 0.38);
}

.era-track li[data-era="gamer"] {
  border-color: rgba(132, 139, 255, 0.38);
}

.era-track li[data-era="rigs"] {
  border-color: rgba(255, 79, 191, 0.44);
}

.era-track li[data-era="mobile"] {
  border-color: rgba(139, 255, 79, 0.38);
}

.era-track li[data-era="future"] {
  border-color: rgba(120, 170, 255, 0.4);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.6rem;
}

.section-head h2 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 1.08rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.machines-grid {
  margin-top: 0.66rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.68rem;
}

.machine-card {
  padding: 0.86rem;
}

.machine-card::after {
  content: "";
  position: absolute;
  inset: auto 10% -26px 10%;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(128, 170, 237, 0.2), transparent 72%);
  pointer-events: none;
}

.machine-card:hover .machine-top h3 {
  color: #f2f7ff;
  text-shadow: 0 0 10px rgba(145, 181, 244, 0.22);
}

.machine-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.machine-top h3 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 0.94rem;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
}

.machine-top span {
  border: 1px solid rgba(136, 147, 162, 0.45);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  color: #dde2ea;
  background: rgba(76, 82, 95, 0.34);
  font-size: 0.74rem;
}

.machine-category {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(163, 172, 188, 0.34);
  border-radius: 999px;
  padding: 0.08rem 0.32rem;
  color: #b7c0d0;
  background: rgba(54, 58, 68, 0.56);
}

.machine-card[data-category="pcs"] {
  border-color: rgba(131, 174, 230, 0.3);
}

.machine-card[data-category="pcs"]::after {
  background: radial-gradient(circle at 50% 50%, rgba(126, 184, 255, 0.24), transparent 72%);
}

.machine-card[data-category="pcs"] .machine-category {
  border-color: rgba(255, 178, 100, 0.36);
  color: #ffd19a;
}

.machine-card[data-category="rigs"] {
  border-color: rgba(255, 132, 132, 0.24);
}

.machine-card[data-category="rigs"]::after {
  background: radial-gradient(circle at 50% 50%, rgba(255, 121, 128, 0.2), transparent 72%);
}

.machine-card[data-category="rigs"] .machine-category {
  border-color: rgba(255, 132, 132, 0.32);
  color: #ff9ea0;
}

.machine-card[data-category="mobile"] {
  border-color: rgba(108, 226, 171, 0.28);
}

.machine-card[data-category="mobile"]::after {
  background: radial-gradient(circle at 50% 50%, rgba(108, 226, 171, 0.22), transparent 72%);
}

.machine-card[data-category="mobile"] .machine-category {
  border-color: rgba(255, 209, 102, 0.34);
  color: #ffe2a6;
}

.machine-card ul {
  list-style: none;
  margin: 0.66rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.machine-card li {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.meta-label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.meta-label svg {
  width: 12px;
  height: 12px;
  stroke: #a6adb8;
  opacity: 0.9;
}

.machine-card li strong {
  color: #e6e9ee;
  font-family: "Orbitron", sans-serif;
  font-size: 0.78rem;
  transition: color 0.18s ease;
}

.machine-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.72rem;
}

.machine-status .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: statusPulse 1.7s ease-in-out infinite;
}

.machine-status .status-text {
  line-height: 1;
}

.status-online {
  color: #ffd8a8;
  border-color: rgba(255, 159, 69, 0.5);
  background: rgba(92, 52, 20, 0.32);
}

.status-syncing {
  color: #ffeab5;
  border-color: rgba(255, 209, 102, 0.5);
  background: rgba(96, 74, 22, 0.32);
}

.status-syncing .status-dot,
.status-upgrading .status-dot {
  animation-duration: 1s;
}

.status-upgrading {
  color: #ffcfb8;
  border-color: rgba(255, 124, 72, 0.52);
  background: rgba(108, 46, 24, 0.34);
}

.status-offline {
  color: #ffb7ad;
  border-color: rgba(255, 77, 63, 0.58);
  background: rgba(118, 30, 22, 0.34);
}

.efficiency {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.24rem 0.5rem;
}

.efficiency > span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.machine-efficiency-value {
  font-family: "Orbitron", sans-serif;
  font-size: 0.76rem;
  color: #dcf3ff;
}

.efficiency > span svg {
  width: 12px;
  height: 12px;
  stroke: #9fb5e8;
}

.eff-bar {
  grid-column: 1 / -1;
  margin-top: 0;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(84, 91, 104, 0.46);
}

.eff-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7d98b9, #8e8ea1);
  box-shadow: 0 0 8px rgba(132, 147, 168, 0.28);
}

.machine-extra {
  margin-top: 0.56rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.34rem;
}

.machine-extra p {
  margin: 0;
  border: 1px solid rgba(109, 142, 231, 0.2);
  border-radius: 8px;
  background: rgba(13, 20, 40, 0.52);
  padding: 0.28rem 0.36rem;
}

.machine-extra span {
  display: block;
  color: #8fa0ca;
  font-size: 0.64rem;
}

.machine-extra strong {
  display: block;
  margin-top: 0.06rem;
  color: #ffe3c1;
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
}

.machine-temp.temp-cool {
  color: #ffd166;
}

.machine-temp.temp-warm {
  color: #ff9f45;
}

.machine-temp.temp-hot {
  color: #ff4d3f;
}

.machine-upgrade-cooldown.is-running {
  color: #ffdcb4;
}

.machine-actions {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.46rem;
}

.machine-actions .btn {
  min-height: 40px;
  font-size: 0.92rem;
  letter-spacing: 0.015em;
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #edf5ff;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

.btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.92;
}

.btn:hover {
  transform: translateY(-1px) scale(1.01);
  filter: brightness(1.04);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #fff5e8;
  border-color: rgba(255, 166, 86, 0.42);
  background: linear-gradient(135deg, rgba(52, 33, 20, 0.86), rgba(39, 25, 18, 0.9));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 217, 173, 0.2);
}

.btn-alt {
  border-color: rgba(255, 159, 69, 0.28);
  background: linear-gradient(135deg, rgba(28, 20, 17, 0.76), rgba(24, 18, 16, 0.72));
}

.btn-ghost {
  border-color: rgba(255, 162, 80, 0.24);
  background: rgba(19, 22, 28, 0.76);
}

.global-actions .btn-primary {
  border-color: rgba(255, 159, 69, 0.52);
}

.global-actions .btn-alt {
  color: #ffe6cc;
}

.machine-actions .btn-alt {
  border-color: rgba(255, 118, 78, 0.56);
  background: linear-gradient(135deg, rgb(65 183 143), rgb(71 224 172));
  color: #120f0fc7;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 91%), 0 8px 16px rgb(0 0 0 / 45%);
}

.machine-actions .btn-ghost {
  border-color: rgb(255 255 255 / 0%);
  background: linear-gradient(135deg, rgb(0 0 0), rgb(0 0 0));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 57%), 0 8px 16px rgb(2 1 1);
}

.btn-collect,
#collect-all {
  border-color: rgb(255 255 255 / 60%);
  background: linear-gradient(135deg, rgb(0 0 0 / 94%), rgb(0 0 0 / 92%));
  color: #fff2df;
  box-shadow: inset 0 1px 0 rgba(255, 224, 176, 0.24), 0 10px 18px rgba(0, 0, 0, 0.28);
}

.btn-buy,
#buy-machine {
  border-color: rgb(20 154 255 / 62%);
  background: linear-gradient(135deg, rgb(0 0 0), rgb(0 0 0));
  color: #fff3de;
  box-shadow: inset 0 1px 0 rgba(255, 234, 186, 0.24), 0 10px 18px rgba(0, 0, 0, 0.28);
}

.btn-upgrade,
#upgrade-all {
  border-color: rgba(255, 112, 86, 0.62);
  background: linear-gradient(135deg, rgb(69 208 160), rgb(68 206 159));
  color: #1d382e;
  box-shadow: inset 0 1px 0 rgba(255, 196, 178, 0.24), 0 10px 18px rgba(0, 0, 0, 0.3);
}

.btn-expand,
#expand-op {
  border-color: rgb(0 0 0 / 57%);
  background: linear-gradient(135deg, rgb(114 146 217), rgb(71 107 191));
  color: #214437;
  box-shadow: inset 0 1px 0 rgba(255, 224, 172, 0.22), 0 10px 18px rgba(0, 0, 0, 0.28);
}

.btn.action-hit {
  animation: actionHit 0.42s ease;
}

.btn.action-hit-strong {
  animation: actionHitStrong 0.52s ease;
}

.btn.is-cooldown {
  opacity: 0.58;
  cursor: not-allowed;
  pointer-events: none;
}

.metric-flash {
  animation: metricFlash 0.55s ease;
}

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  display: grid;
  gap: 0.56rem;
  width: min(360px, calc(100% - 1.4rem));
}

.toast {
  border: 1px solid rgba(255, 149, 68, 0.46);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(45, 20, 12, 0.92), rgba(38, 16, 10, 0.9));
  color: #fff0de;
  padding: 0.62rem 0.72rem;
  box-shadow: 0 14px 30px rgba(2, 8, 26, 0.5);
  transform: translateY(14px);
  opacity: 0;
  animation: toastIn 0.28s ease forwards;
}

.toast strong {
  display: block;
  font-family: "Orbitron", sans-serif;
  font-size: 0.82rem;
}

.toast p {
  margin: 0.16rem 0 0;
  color: #ffd9ba;
  font-size: 0.86rem;
}

@keyframes toastIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes valuePulse {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(255, 159, 69, 0);
  }
  50% {
    text-shadow: 0 0 12px rgba(255, 159, 69, 0.35);
  }
}

@keyframes kpiDotPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.22);
  }
}

@keyframes metricFlash {
  0% {
    transform: scale(1);
    color: #e8edff;
  }
  50% {
    transform: scale(1.04);
    color: #d9f4ff;
  }
  100% {
    transform: scale(1);
    color: #e8edff;
  }
}

@keyframes actionHit {
  0% {
    box-shadow: 0 0 0 rgba(255, 159, 69, 0);
  }
  60% {
    box-shadow: 0 0 20px rgba(255, 159, 69, 0.35);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 159, 69, 0);
  }
}

@keyframes actionHitStrong {
  0% {
    box-shadow: 0 0 0 rgba(255, 91, 69, 0);
  }
  60% {
    box-shadow: 0 0 24px rgba(255, 91, 69, 0.45);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 91, 69, 0);
  }
}

@keyframes sectionIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardPing {
  0% {
    box-shadow: var(--shadow);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(255, 150, 72, 0.45), 0 20px 40px rgba(28, 12, 4, 0.6);
  }
  100% {
    box-shadow: var(--shadow);
  }
}

@keyframes eraActivePulse {
  0%,
  100% {
    box-shadow: 0 0 14px rgba(255, 126, 72, 0.2), inset 0 0 0 1px rgba(255, 186, 132, 0.16);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 126, 72, 0.34), inset 0 0 0 1px rgba(255, 186, 132, 0.24);
  }
}

.machine-card.card-collected,
.machine-card.card-upgrading {
  animation: cardPing 0.55s ease;
}

@keyframes statusPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.65;
  }
}

@keyframes progressShine {
  0% {
    transform: translateX(-120px);
    opacity: 0.35;
  }
  35% {
    opacity: 0.75;
  }
  100% {
    transform: translateX(180px);
    opacity: 0.25;
  }
}

.global-actions {
  margin-top: 0.12rem;
  padding: 0.66rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 165, 82, 0.18);
  background:
    linear-gradient(160deg, rgba(13, 16, 22, 0.92), rgba(14, 16, 20, 0.86)),
    radial-gradient(circle at 10% 0%, rgba(255, 154, 68, 0.08), transparent 34%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 224, 187, 0.1);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.62rem;
}

.global-actions .btn {
  min-height: 44px;
  border-radius: 13px;
  font-size: 1rem;
  letter-spacing: 0.012em;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}

.global-actions .btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.global-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 220, 178, 0.24);
}

.sidebar-backdrop {
  display: none;
}

body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed);
  overflow: hidden;
}

body.sidebar-collapsed .content-shell {
  margin-left: calc(var(--sidebar-collapsed) + 24px);
}

body.sidebar-collapsed .nav-group p,
body.sidebar-collapsed .nav-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

body.sidebar-collapsed .sidebar-quick {
  display: none;
}

body.sidebar-collapsed .nav-item {
  justify-content: center;
  width: 48px;
  min-height: 44px;
  padding: 0;
  gap: 0;
  margin-inline: auto;
  border-radius: 12px;
  border-color: rgba(145, 154, 169, 0.22);
  background: rgba(52, 57, 67, 0.44);
  transform: none;
}

body.sidebar-collapsed .sidebar-top {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-brand {
  width: 0;
  opacity: 0;
  overflow: hidden;
}

body.sidebar-collapsed .sidebar-nav {
  padding: 0.72rem 0.4rem 1rem;
  gap: 1rem;
  justify-items: center;
  align-content: start;
}

body.sidebar-collapsed .nav-group {
  width: 100%;
  justify-items: center;
  gap: 0.42rem;
  padding-top: 0.76rem;
}

body.sidebar-collapsed .nav-group:first-child {
  padding-top: 0;
}

body.sidebar-collapsed .nav-item::before {
  left: 4px;
  top: 8px;
  bottom: 8px;
}

body.sidebar-collapsed .nav-item:hover {
  border-color: rgba(165, 173, 188, 0.34);
  background: rgba(64, 69, 81, 0.54);
}

body.sidebar-collapsed .nav-item.active {
  border-color: rgba(166, 177, 195, 0.92);
  background: linear-gradient(140deg, rgba(118, 58, 30, 0.88), rgba(86, 34, 22, 0.72));
  box-shadow: inset 0 0 0 1px rgba(196, 205, 220, 0.3), 0 8px 18px rgba(0, 0, 0, 0.52);
}

body.sidebar-collapsed .nav-icon {
  width: 20px;
  height: 20px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.sidebar-collapsed .nav-icon svg {
  width: 19px;
  height: 19px;
}

body.sidebar-collapsed .sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

body.sidebar-collapsed .sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

body.sidebar-collapsed .sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 152, 70, 0.34);
  border-radius: 999px;
}

body.sidebar-collapsed .nav-item[data-tooltip]:hover::after {
  content: none;
  display: none;
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 920px) {
  .sidebar {
    top: 8px;
    bottom: 8px;
    left: 8px;
    transform: translateX(calc(-100% - 18px));
    transition: transform 0.22s ease;
    width: min(84vw, 300px);
  }

  .content-shell {
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .mobile-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-brand {
    display: block;
  }

  #sidebar-toggle {
    display: none;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(4, 8, 18, 0.56);
    z-index: 55;
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .topbar {
    top: 8px;
    margin-bottom: 0.62rem;
  }

  .topbar-inner {
    min-height: 70px;
    padding: 0.5rem 0.62rem;
  }

  .topbar-right {
    display: none;
  }

  .topbar-title small {
    display: none;
  }

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

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 1.3rem, 1260px);
  }

  .topbar {
    width: min(100% - 1.3rem, 1260px);
  }

  .brand-logo {
    height: 32px;
  }

  .topbar-title h1 {
    font-size: 0.94rem;
  }

  .kpi-grid,
  .machines-grid,
  .global-actions {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .machine-actions {
    grid-template-columns: 1fr;
  }

  .machine-extra {
    grid-template-columns: 1fr;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar,
  .topbar,
  .kpi-card,
  .panel,
  .machine-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(34, 37, 44, 0.9);
  }
}

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

/* Responsive Hardening */
.content-shell,
.topbar,
.topbar-inner,
.panel,
.kpi-card,
.machine-card {
  min-width: 0;
}

@media (max-width: 920px) {
  .topbar-left {
    min-width: 0;
    width: 100%;
    padding-left: 0;
  }

  .topbar-title {
    min-width: 0;
  }

  .topbar-title h1 {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 700px) {
  .section-head p {
    max-width: 100%;
  }

  .panel {
    padding: 0.72rem;
  }

  .machine-card {
    padding: 0.66rem;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(100% - 1rem, 1260px);
  }

  .topbar {
    width: min(100% - 1rem, 1260px);
  }

  .topbar-inner {
    padding: 0.46rem 0.52rem;
  }

  .kpi-card strong {
    font-size: 0.9rem;
  }
}
