:root {
  --bg: #0b0714;
  --bg-elevated: #140c22;
  --tile: rgba(28, 16, 48, 0.72);
  --tile-border: rgba(168, 85, 247, 0.22);
  --text: #f3e8ff;
  --muted: #a78bbf;
  --accent: #a855f7;
  --accent-strong: #7c3aed;
  --accent-soft: rgba(168, 85, 247, 0.16);
  --danger: #f87171;
  --radius: 22px;
  --glow: 0 0 40px rgba(124, 58, 237, 0.35);
  --font: "Outfit", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}

body {
  position: relative;
  overflow-x: hidden;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: #e9d5ff;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 15% -10%, rgba(124, 58, 237, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(168, 85, 247, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(88, 28, 135, 0.25), transparent 55%);
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.shell-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  width: 100%;
}

.shell-login .main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-alone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
}

.login-alone-error {
  margin: 0;
  text-align: center;
  max-width: 22rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.topbar-end {
  justify-content: flex-end;
}

.gear-menu {
  position: relative;
}

.gear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.28);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.gear-btn:hover,
.gear-btn[aria-expanded="true"] {
  color: var(--text);
  background: var(--accent-soft);
  border-color: rgba(168, 85, 247, 0.45);
}

.gear-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: 10rem;
  padding: 0.4rem;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.28);
  background: rgba(20, 12, 34, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.gear-dropdown a,
.gear-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
}

.gear-dropdown a:hover,
.gear-dropdown button:hover {
  background: var(--accent-soft);
}

.gear-dropdown form {
  margin: 0;
}

.install-card a.accent-link {
  font-weight: 600;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.45);
}

.brand-text {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.brand-hub {
  color: var(--text);
}

.brand-dot {
  margin: 0 0.35rem;
  color: var(--accent);
}

.brand-velx {
  color: #d8b4fe;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--accent-soft);
}

.inline-form {
  display: inline;
  margin: 0;
}

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

.tile {
  background: var(--tile);
  border: 1px solid var(--tile-border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: rise 0.55s ease both;
}

.tile:nth-child(2) { animation-delay: 0.06s; }
.tile:nth-child(3) { animation-delay: 0.12s; }
.tile:nth-child(4) { animation-delay: 0.18s; }

.tile-span-2 {
  grid-column: span 2;
}

.eyebrow {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

.hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-lead,
.tile-sub {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 1rem;
}

.accent {
  color: var(--accent);
  text-shadow: 0 0 28px rgba(168, 85, 247, 0.45);
}

.accent-link {
  color: var(--accent);
  font-weight: 600;
}

.accent-link:hover {
  text-decoration: underline;
}

.tile-title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.tile-head .tile-title {
  margin: 0;
}

.tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(168, 85, 247, 0.28);
  background: rgba(8, 4, 18, 0.65);
  color: var(--text);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0.75rem 1.15rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #fff;
}

.btn-glow {
  box-shadow: var(--glow);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(168, 85, 247, 0.28);
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--danger);
}

.btn-sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 12px;
}

.form-error {
  margin: 0.75rem 0 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.form-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.steps-list {
  margin: 0.9rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.7;
}

.link-box {
  border: 1px solid rgba(168, 85, 247, 0.28);
  background: rgba(8, 4, 18, 0.55);
  border-radius: 16px;
  padding: 1rem;
  overflow-x: auto;
}

.link-box code {
  word-break: break-all;
  font-size: 0.88rem;
}

.install-grid {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.install-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(8, 4, 18, 0.45);
  border: 1px solid rgba(168, 85, 247, 0.16);
}

.install-card strong {
  display: block;
  margin-bottom: 0.25rem;
}

.install-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.install-num {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  min-width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

.admin-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.field-span-2 {
  grid-column: span 2;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.user-card {
  border: 1px solid rgba(168, 85, 247, 0.18);
  background: rgba(8, 4, 18, 0.45);
  border-radius: 16px;
  padding: 1rem;
}

.user-card-top {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.55rem;
}

.user-comment,
.user-link {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.user-link {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #d8b4fe;
}

.user-card-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

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

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

@media (max-width: 760px) {
  .shell {
    width: min(100% - 1.25rem, 1120px);
  }

  .bento,
  .admin-form .form-grid {
    grid-template-columns: 1fr;
  }

  .tile-span-2,
  .field-span-2 {
    grid-column: span 1;
  }

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

  .topnav {
    width: 100%;
    flex-wrap: wrap;
  }
}
