/* design tokens — cyber HUD: void navy + electric cyan + signal magenta */
:root {
  --rgb-a: 0, 245, 255;
  --rgb-m: 255, 45, 166;
  --rgb-navy: 6, 11, 26;

  --accent: rgb(var(--rgb-a));
  --accent-2: rgb(var(--rgb-m));
  --accent-deep: #007ea8;
  --accent-ink: #001015;

  --cyan: var(--accent);
  --cyan-dim: rgba(var(--rgb-a), 0.45);

  --bg: #010208;
  --panel: #060c18;
  --card: #0a1222;
  --line: rgba(var(--rgb-a), 0.2);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text: #e9f3ff;
  --muted: #5c6e85;

  --danger: #ff3d5c;
  --green: #00e8b8;

  --font-display: "Exo 2", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 18px;
  --radius-2xl: 20px;

  --shadow-card:
    0 0 0 1px rgba(var(--rgb-a), 0.08) inset,
    0 20px 56px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(var(--rgb-a), 0.08),
    inset 0 -30px 50px rgba(var(--rgb-m), 0.025);
  --shadow-float:
    0 0 0 1px rgba(var(--rgb-a), 0.12) inset,
    0 28px 90px rgba(0, 0, 0, 0.65),
    0 0 70px rgba(var(--rgb-m), 0.08);
  --shadow-toast:
    0 0 0 1px rgba(var(--rgb-a), 0.12) inset,
    0 22px 55px rgba(0, 0, 0, 0.55),
    0 0 42px rgba(var(--rgb-a), 0.15);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 160ms;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 8% 5%, rgba(var(--rgb-a), 0.18), transparent 48%),
    radial-gradient(ellipse 70% 55% at 92% 88%, rgba(var(--rgb-m), 0.14), transparent 50%),
    linear-gradient(185deg, #010205 0%, #070f1c 38%, #020308 100%);
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* HUD grid + micro-noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(var(--rgb-a), 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--rgb-a), 0.075) 1px, transparent 1px),
    linear-gradient(rgba(var(--rgb-a), 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--rgb-a), 0.028) 1px, transparent 1px);
  background-size: 56px 56px, 56px 56px, 10px 10px, 10px 10px;
  background-position: -1px -1px, -1px -1px, 0 0, 0 0;
  mask-image: radial-gradient(ellipse 72% 62% at 48% 38%, #000 15%, transparent 72%);
  opacity: 0.95;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 3px,
    rgba(var(--rgb-a), 0.022) 3px,
    rgba(var(--rgb-a), 0.022) 4px
  );
  mix-blend-mode: overlay;
  opacity: 0.55;
}

::selection {
  background: rgba(var(--rgb-a), 0.35);
  color: var(--text);
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

/* sidebar */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px 22px;
  background: linear-gradient(195deg, rgba(var(--rgb-navy), 0.99) 0%, rgba(2, 6, 16, 0.97) 100%);
  border-right: 1px solid rgba(var(--rgb-a), 0.14);
  box-shadow:
    6px 0 48px rgba(0, 0, 0, 0.55),
    inset -1px 0 0 rgba(var(--rgb-a), 0.18);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  display: flex;
  flex-direction: column;
  z-index: 2;
  isolation: isolate;
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(var(--rgb-a), 0.35) 22%,
    var(--accent) 48%,
    var(--accent-2) 52%,
    rgba(var(--rgb-a), 0.35) 78%,
    transparent
  );
  background-size: 100% 220%;
  animation: sidebar-flow 4.5s linear infinite;
  opacity: 0.7;
  pointer-events: none;
  box-shadow: 0 0 16px rgba(var(--rgb-a), 0.35);
}

@keyframes sidebar-flow {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 100%;
  }
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}

.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: 0.85;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-deep) 95%);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.04em;
  flex-shrink: 0;
  clip-path: polygon(12% 0, 100% 0, 100% 88%, 88% 100%, 0 100%, 0 12%);
  box-shadow:
    0 0 28px rgba(var(--rgb-a), 0.55),
    0 0 52px rgba(var(--rgb-m), 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  animation: logo-pulse 4s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%,
  100% {
    box-shadow:
      0 0 28px rgba(var(--rgb-a), 0.55),
      0 0 52px rgba(var(--rgb-m), 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    box-shadow:
      0 0 40px rgba(var(--rgb-a), 0.75),
      0 0 72px rgba(var(--rgb-m), 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }
}

.brand h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.25;
  text-shadow: 0 0 32px rgba(var(--rgb-a), 0.35);
}

.brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

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

.sidebar nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.nav {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: #dbe8ff;
  font-size: 14px;
  font-weight: 750;
  text-align: left;
  padding: 10px 14px 10px 16px;
  cursor: pointer;
  position: relative;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.nav::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 14px rgba(var(--rgb-a), 0.65);
  transform: translateY(-50%);
  opacity: 0;
  transition: height var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

.nav:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav:hover::before {
  opacity: 0.5;
  height: 18px;
}

.nav:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.nav.active {
  background: linear-gradient(
    90deg,
    rgba(var(--rgb-a), 0.2) 0%,
    rgba(var(--rgb-m), 0.07) 55%,
    rgba(255, 255, 255, 0.02) 100%
  );
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(var(--rgb-a), 0.38),
    inset 0 0 28px rgba(var(--rgb-a), 0.08);
  text-shadow: 0 0 22px rgba(var(--rgb-a), 0.45);
}

.nav.active::before {
  opacity: 1;
  height: 22px;
}

.side-note {
  margin-top: auto;
  padding: 16px 16px 15px;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(var(--rgb-a), 0.07), rgba(var(--rgb-m), 0.03));
  border: 1px solid rgba(var(--rgb-a), 0.22);
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 28px rgba(var(--rgb-a), 0.06);
}

.side-note::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--rgb-a), 0.75), rgba(var(--rgb-m), 0.45), transparent);
}

.side-note b {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.side-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

/* main */
.main {
  padding: 26px 28px 36px;
  min-width: 0;
  position: relative;
}

.main::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 28px;
  width: min(320px, 42vw);
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--rgb-a), 0.15),
    rgba(var(--rgb-a), 0.65),
    rgba(var(--rgb-m), 0.55),
    transparent
  );
  opacity: 0.85;
  pointer-events: none;
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(var(--rgb-a), 0.25);
}

.hidden {
  display: none !important;
}

/* login */
.login-card {
  max-width: 440px;
  margin: 10vh auto;
  padding: 34px 32px 32px;
  border-radius: var(--radius-2xl);
  background: linear-gradient(168deg, rgba(14, 28, 52, 0.96), rgba(4, 10, 22, 0.94));
  border: 1px solid rgba(var(--rgb-a), 0.22);
  box-shadow: var(--shadow-float);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  opacity: 0.95;
  z-index: 0;
}

.login-card::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(var(--rgb-a), 0.22) 0%, rgba(var(--rgb-m), 0.08) 40%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

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

.login-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-card p {
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 22px;
  font-size: 14px;
}

.login-card input {
  margin-bottom: 4px;
}

.login-card .primary {
  width: 100%;
  margin-top: 18px;
  height: 46px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.login-card .muted {
  margin-top: 18px;
  display: block;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

/* work area */
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(200px, 35%);
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: 0.75;
}

.topbar h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(95deg, #fff 0%, rgba(200, 246, 255, 0.94) 38%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(var(--rgb-a), 0.28));
}

.topbar p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 520px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.card {
  border-radius: var(--radius-xl);
  background: linear-gradient(172deg, rgba(16, 28, 52, 0.88), rgba(5, 12, 26, 0.95));
  border: 1px solid rgba(var(--rgb-a), 0.24);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(var(--rgb-a), 0.2) 18%,
    var(--accent) 45%,
    var(--accent-2) 55%,
    rgba(var(--rgb-a), 0.2) 82%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

.card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  background:
    radial-gradient(ellipse 85% 55% at 100% -25%, rgba(var(--rgb-a), 0.12), transparent 55%),
    linear-gradient(var(--accent), var(--accent)) 12px 10px / 20px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 12px 10px / 2px 20px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) calc(100% - 12px) calc(100% - 10px) / 18px 2px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) calc(100% - 12px) calc(100% - 10px) / 2px 18px no-repeat;
  opacity: 1;
  z-index: 0;
}

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

.card h3 {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(220, 242, 255, 0.72);
}

/* tabs */
.tab {
  display: none;
  animation: tab-in 280ms var(--ease);
}

.tab.active {
  display: block;
}

@keyframes tab-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tab {
    animation: none;
  }

  .nav,
  .ghost,
  .small-btn {
    transition: none;
  }

  .primary {
    transition: none;
    animation: none;
    background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  }

  .toast {
    animation: none;
  }

  .logo {
    animation: none;
  }

  .sidebar::after {
    animation: none;
    opacity: 0.45;
  }
}

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  border-radius: 20px;
  background: linear-gradient(158deg, rgba(var(--rgb-a), 0.09), rgba(0, 0, 0, 0.22));
  border: 1px solid rgba(var(--rgb-a), 0.2);
  padding: 18px 18px 20px;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
  position: relative;
}

.stat::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent), 0 0 4px var(--accent-2);
  opacity: 0.85;
}

.stat:hover {
  border-color: rgba(var(--rgb-a), 0.5);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.32),
    0 0 40px rgba(var(--rgb-a), 0.12),
    0 0 28px rgba(var(--rgb-m), 0.06);
  transform: translateY(-2px);
}

.stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat b {
  display: block;
  margin-top: 10px;
  font-size: 32px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  background: linear-gradient(125deg, #ffffff 0%, var(--accent) 48%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(var(--rgb-a), 0.35));
}

/* steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.steps div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 14px 12px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(var(--rgb-a), 0.06), rgba(var(--rgb-m), 0.02));
  border: 1px solid rgba(var(--rgb-a), 0.18);
  font-size: 13px;
  line-height: 1.45;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.steps b {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 4px;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow:
    0 0 18px rgba(var(--rgb-a), 0.5),
    0 0 12px rgba(var(--rgb-m), 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* forms */
label {
  display: block;
  margin: 14px 0 7px;
  color: #e7efff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

label:first-of-type,
.card h3 + * {
  margin-top: 0;
}

input,
select,
textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(2, 8, 18, 0.72);
  color: var(--text);
  outline: none;
  padding: 12px 14px;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease);
}

input::placeholder,
textarea::placeholder {
  color: rgba(159, 177, 211, 0.65);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(var(--rgb-a), 0.7);
  background: rgba(4, 14, 32, 0.9);
  box-shadow:
    0 0 0 3px rgba(var(--rgb-a), 0.14),
    0 0 32px rgba(var(--rgb-a), 0.14),
    0 0 20px rgba(var(--rgb-m), 0.08),
    inset 0 1px 0 rgba(var(--rgb-a), 0.1);
}

select option {
  color: #111;
  background: #fff;
}

textarea {
  min-height: 148px;
  resize: vertical;
  line-height: 1.65;
}

input[type="file"] {
  padding: 10px 12px;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

input[type="file"]::file-selector-button:hover {
  background: rgba(var(--rgb-a), 0.18);
  border-color: rgba(var(--rgb-a), 0.45);
  box-shadow: 0 0 14px rgba(var(--rgb-a), 0.15);
}

/* buttons */
.primary,
.ghost {
  border: 0;
  border-radius: var(--radius-md);
  height: 42px;
  padding: 0 18px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), filter var(--duration) var(--ease);
}

.primary {
  background: linear-gradient(105deg, var(--accent) 0%, var(--accent-deep) 42%, var(--accent-2) 52%, var(--accent-deep) 65%, var(--accent) 100%);
  background-size: 220% 220%;
  color: var(--accent-ink);
  margin-top: 14px;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow:
    0 0 28px rgba(var(--rgb-a), 0.45),
    0 0 48px rgba(var(--rgb-m), 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  animation: btn-sheen 5s ease-in-out infinite;
}

@keyframes btn-sheen {
  0%,
  100% {
    background-position: 12% 50%;
  }
  50% {
    background-position: 88% 50%;
  }
}

.primary:hover {
  filter: brightness(1.08) saturate(1.05);
  box-shadow:
    0 0 36px rgba(var(--rgb-a), 0.55),
    0 0 60px rgba(var(--rgb-m), 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

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

.primary:focus-visible,
.ghost:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.primary.big {
  height: 48px;
  font-size: 15px;
  margin-top: 18px;
}

.ghost {
  background: rgba(var(--rgb-a), 0.05);
  border: 1px solid rgba(var(--rgb-a), 0.22);
  color: #dff6ff;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
}

.ghost:hover {
  background: rgba(var(--rgb-a), 0.12);
  border-color: rgba(var(--rgb-a), 0.42);
  box-shadow: 0 0 24px rgba(var(--rgb-a), 0.14);
}

.ghost.danger {
  color: #ffd1d7;
  border-color: rgba(255, 99, 117, 0.35);
}

.ghost.danger:hover {
  background: rgba(255, 99, 117, 0.12);
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.mt {
  margin-top: 18px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* lists */
.list {
  display: grid;
  gap: 10px;
}

.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: rgba(var(--rgb-navy), 0.35);
  border: 1px solid rgba(var(--rgb-a), 0.12);
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.item:hover {
  background: rgba(var(--rgb-a), 0.07);
  border-color: rgba(var(--rgb-a), 0.28);
  box-shadow: 0 0 20px rgba(var(--rgb-a), 0.06);
}

.item b {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* tables */
.table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
  -webkit-overflow-scrolling: touch;
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.table th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px 10px;
}

.table tbody tr {
  transition: opacity var(--duration) var(--ease);
}

.table tbody tr:hover td {
  background: rgba(var(--rgb-a), 0.09);
}

.table td {
  background: rgba(2, 12, 26, 0.55);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 12px;
  font-size: 13px;
  vertical-align: middle;
}

.table td:first-child {
  border-left: 1px solid var(--line);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.table td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.link-cell {
  max-width: min(340px, 40vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(184, 232, 255, 0.95);
}

.small-btn {
  height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(var(--rgb-a), 0.22);
  border-radius: var(--radius-sm);
  background: rgba(var(--rgb-a), 0.06);
  color: #e8f7ff;
  font-weight: 750;
  font-size: 12px;
  cursor: pointer;
  margin: 2px 6px 2px 0;
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.small-btn:hover {
  background: rgba(var(--rgb-a), 0.14);
  border-color: rgba(var(--rgb-a), 0.4);
  box-shadow: 0 0 14px rgba(var(--rgb-a), 0.12);
}

.small-btn:active {
  transform: scale(0.97);
}

.small-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.small-btn.red {
  color: #ffd1d7;
  border-color: rgba(255, 99, 117, 0.35);
}

.small-btn.red:hover {
  background: rgba(255, 99, 117, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.select-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 12px;
}

.select-actions .ghost {
  margin-top: 0;
  height: 38px;
  font-size: 13px;
}

.checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  max-height: 288px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(2, 10, 22, 0.65);
  box-shadow: inset 0 0 0 1px rgba(var(--rgb-a), 0.06);
}

.checks::-webkit-scrollbar {
  width: 6px;
}

.checks::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.check:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.check:focus-within {
  border-color: rgba(var(--rgb-a), 0.45);
}

.check input {
  width: auto;
  margin: 0;
  accent-color: var(--cyan);
  cursor: pointer;
}

.table-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.table-head h3 {
  margin: 0;
}

.table-head input {
  max-width: 320px;
  flex: 1;
  min-width: 200px;
}

/* toast */
.toast {
  position: fixed;
  right: 24px;
  top: 24px;
  z-index: 30;
  display: none;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 16px 14px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(105deg, rgba(10, 24, 48, 0.99), rgba(6, 14, 32, 0.97));
  border: 1px solid rgba(var(--rgb-a), 0.2);
  border-left: 3px solid var(--accent);
  box-shadow:
    var(--shadow-toast),
    -8px 0 28px rgba(var(--rgb-m), 0.12);
  color: #fff;
  line-height: 1.55;
  font-size: 14px;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  animation: tech-toast-in 240ms var(--ease);
}

@keyframes tech-toast-in {
  from {
    opacity: 0;
    transform: translateX(12px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

.toast.show {
  display: block;
}

.status {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(var(--rgb-a), 0.14);
  color: #b5f7ff;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(var(--rgb-a), 0.3);
  box-shadow: 0 0 18px rgba(var(--rgb-a), 0.12);
}

.status.off {
  background: rgba(255, 99, 117, 0.12);
  color: #ffd1d7;
  border-color: rgba(255, 99, 117, 0.35);
  box-shadow: 0 0 16px rgba(255, 99, 117, 0.08);
}

.status.ok {
  background: rgba(82, 255, 186, 0.12);
  color: #d3ffee;
  border-color: rgba(82, 255, 186, 0.3);
  box-shadow: 0 0 16px rgba(82, 255, 186, 0.08);
}

/* responsive */
@media (max-width: 1050px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: relative;
    padding-bottom: 22px;
  }

  .side-note {
    margin-top: 8px;
  }

  .stats,
  .steps,
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .stats,
  .steps,
  .grid.two,
  .form-row,
  .checks {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .actions {
    width: 100%;
  }

  .actions .ghost {
    flex: 1;
    min-width: 0;
  }

  .main {
    padding: 16px 16px 28px;
  }

  .main::before {
    display: none;
  }

  .login-card {
    margin: 6vh 16px;
    padding: 26px 22px;
  }

  .link-cell {
    max-width: 200px;
  }
}
