/* ── UNHOLY · foundations ──────────────────────────────────── */
:root {
  --bg: #07080a;
  --bg-soft: #0a0b0e;
  --sidebar: #08090b;
  --panel: #101115;
  --panel-2: #14151a;
  --panel-3: #191a20;
  --panel-hover: #1c1d23;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #f4f5f7;
  --text-soft: #c7c9d1;
  --muted: #8b8d98;
  --muted-2: #5f626d;
  --blue: #4d8dff;
  --blue-bright: #6ba1ff;
  --blue-deep: #2b6bea;
  --orange: #ff7a18;
  --orange-soft: #ff9d4a;
  --green: #35c9a3;
  --red: #ea5b49;
  --gold: #f4b92d;
  --pink: #e772c4;
  --violet: #9c7bff;
  --cyan: #51d5f0;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-panel: 0 24px 60px rgba(0, 0, 0, 0.28);
  --font: "Inter", "SF Pro Display", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 800px at 78% -10%, rgba(50, 80, 160, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

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

img,
svg {
  display: block;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(77, 141, 255, 0.4);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #282a32;
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: #373a45;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #282a32 transparent;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.i {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.i-xs {
  width: 14px;
  height: 14px;
}
.i-sm {
  width: 17px;
  height: 17px;
}
.i-lg {
  width: 24px;
  height: 24px;
}
.i-xl {
  width: 30px;
  height: 30px;
}

.i-fill {
  fill: currentColor;
  stroke: none;
}

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

/* ── common controls ───────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 650;
  font-size: 14px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s var(--ease),
    color 0.18s ease,
    box-shadow 0.18s ease;
  user-select: none;
}

.btn:active:not(:disabled) {
  transform: scale(0.985);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(97, 153, 255, 0.8);
  outline-offset: 2px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #689eff 0%, #4d8dff 55%, #3e7ff2 100%);
  box-shadow:
    0 10px 28px rgba(54, 119, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #7aabff 0%, #5b97ff 55%, #4787fb 100%);
  box-shadow:
    0 14px 34px rgba(54, 119, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: #18191f;
  border-color: var(--line);
  color: var(--text);
}
.btn-secondary:hover:not(:disabled) {
  background: #202128;
  border-color: var(--line-strong);
}

.btn-ghost {
  color: var(--muted);
}
.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  background: rgba(234, 91, 73, 0.12);
  border-color: rgba(234, 91, 73, 0.22);
  color: #ff8a7c;
}
.btn-danger:hover:not(:disabled) {
  background: rgba(234, 91, 73, 0.2);
}

.btn-discord {
  background: #5865f2;
  color: #fff;
  box-shadow: 0 12px 30px rgba(88, 101, 242, 0.28);
}
.btn-discord:hover:not(:disabled) {
  background: #6671f5;
}

.btn-block {
  width: 100%;
}
.btn-lg {
  height: 54px;
  border-radius: 14px;
  font-size: 15px;
}
.btn-sm {
  height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12.5px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--muted);
  border: 1px solid transparent;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}
.icon-btn:hover {
  color: var(--text);
  background: #17181e;
  border-color: var(--line);
}
.icon-btn.is-active {
  color: var(--text);
  background: #1a1b22;
  border-color: var(--line-strong);
}

.coin {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.coin svg {
  width: 100%;
  height: 100%;
}
.coin-lg {
  width: 22px;
  height: 22px;
}

.coin-pill {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 12px;
  background: #131419;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.coin-pill .plus {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  color: #ffb15f;
  background: rgba(255, 121, 24, 0.12);
}

.b-pill {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 12px;
  background: #10131b;
  border: 1px solid rgba(92, 140, 255, 0.15);
  color: #d9e4ff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.b-mark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(145deg, #79a6ff, #426cff);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(77, 141, 255, 0.3);
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #1b1c22;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-orange {
  color: #ffb06b;
  background: rgba(255, 122, 24, 0.11);
  border-color: rgba(255, 122, 24, 0.16);
}
.badge-blue {
  color: #9bc0ff;
  background: rgba(77, 141, 255, 0.11);
  border-color: rgba(77, 141, 255, 0.18);
}
.badge-green {
  color: #83edd2;
  background: rgba(53, 201, 163, 0.1);
  border-color: rgba(53, 201, 163, 0.16);
}
.badge-red {
  color: #ff9e92;
  background: rgba(234, 91, 73, 0.1);
  border-color: rgba(234, 91, 73, 0.16);
}

.panel {
  background: linear-gradient(180deg, rgba(20, 21, 26, 0.92), rgba(15, 16, 20, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-panel);
}

.muted {
  color: var(--muted);
}
.text-soft {
  color: var(--text-soft);
}
.text-orange {
  color: var(--orange-soft);
}
.text-green {
  color: var(--green);
}
.text-blue {
  color: var(--blue-bright);
}
.nowrap {
  white-space: nowrap;
}
.mono {
  font-variant-numeric: tabular-nums;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-title h2 {
  font-size: 19px;
  letter-spacing: -0.025em;
}
.section-title .eyebrow {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}
.field-label .val {
  color: var(--text-soft);
  font-weight: 650;
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0c0d10;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.input-shell:focus-within {
  border-color: rgba(77, 141, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(77, 141, 255, 0.09);
}
.input-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.input-shell input::placeholder {
  color: var(--muted-2);
}
.input-shell .suffix {
  color: var(--muted);
  font-size: 12px;
}

.input-plain {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: #0c0d10;
}
.input-plain:focus {
  border-color: rgba(77, 141, 255, 0.45);
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 18px 0;
}

/* ── avatars ───────────────────────────────────────────────── */
.avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(140deg, #324467, #1a2233);
  color: #dbe8ff;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 10px;
}
.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 20px;
}
.avatar-xl {
  width: 96px;
  height: 96px;
  font-size: 24px;
}
.avatar[data-accent="blue"] {
  background: linear-gradient(140deg, #3763b8, #172647);
}
.avatar[data-accent="violet"] {
  background: linear-gradient(140deg, #7457c8, #2a1f4d);
}
.avatar[data-accent="orange"] {
  background: linear-gradient(140deg, #c66e32, #432413);
}
.avatar[data-accent="green"] {
  background: linear-gradient(140deg, #2b9b7f, #10352d);
}
.avatar[data-accent="red"] {
  background: linear-gradient(140deg, #b94e43, #3b1715);
}
.avatar[data-accent="pink"] {
  background: linear-gradient(140deg, #bd5a9f, #421b37);
}
.avatar[data-accent="gold"] {
  background: linear-gradient(140deg, #b3892e, #392b10);
}
.avatar[data-accent="cyan"] {
  background: linear-gradient(140deg, #3491a8, #112f38);
}
.avatar[data-accent="rose"] {
  background: linear-gradient(140deg, #c45c76, #421925);
}
.avatar[data-accent="indigo"] {
  background: linear-gradient(140deg, #556ad1, #1c2350);
}
.avatar[data-accent="teal"] {
  background: linear-gradient(140deg, #2c9a9a, #0d3838);
}
.avatar[data-accent="lime"] {
  background: linear-gradient(140deg, #7ea436, #26360e);
}
.avatar-ring {
  box-shadow:
    0 0 0 2px #101115,
    0 0 0 3px rgba(255, 255, 255, 0.15);
}
.online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #101115;
  box-shadow: 0 0 8px rgba(53, 201, 163, 0.7);
}

/* ── tabs ──────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  background: #0c0d10;
  border-radius: 13px;
  width: fit-content;
}
.tab {
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}
.tab:hover {
  color: var(--text-soft);
}
.tab.is-active {
  color: var(--text);
  background: #1a1b21;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── toast ─────────────────────────────────────────────────── */
.toast-stack {
  position: fixed;
  z-index: 1000;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 15px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: rgba(22, 23, 29, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
  animation: toast-in 0.35s var(--ease) both;
  pointer-events: auto;
}
.toast.is-out {
  animation: toast-out 0.25s ease forwards;
}
.toast-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(77, 141, 255, 0.12);
  color: var(--blue-bright);
  flex: 0 0 auto;
}
.toast-success .toast-icon {
  background: rgba(53, 201, 163, 0.12);
  color: var(--green);
}
.toast-error .toast-icon {
  background: rgba(234, 91, 73, 0.12);
  color: #ff8a7c;
}
.toast-warning .toast-icon {
  background: rgba(244, 185, 45, 0.12);
  color: var(--gold);
}
.toast-content {
  min-width: 0;
}
.toast-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}
.toast-text {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* ── modal ─────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 4, 6, 0.72);
  backdrop-filter: blur(10px);
  animation: fade-in 0.2s ease both;
}
.modal {
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #17181e, #101116);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
  animation: modal-in 0.35s var(--ease) both;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.modal-head h3 {
  font-size: 20px;
  letter-spacing: -0.03em;
}
.modal-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.modal-actions .btn {
  flex: 1;
}
.modal-close {
  width: 34px;
  height: 34px;
  margin: -5px -5px 0 0;
  border-radius: 9px;
  color: var(--muted);
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.modal-visual {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 18px;
  border-radius: 20px;
  background: rgba(255, 122, 24, 0.1);
  border: 1px solid rgba(255, 122, 24, 0.14);
}
.modal-visual .i {
  width: 34px;
  height: 34px;
  color: var(--orange-soft);
}
.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.order-row:last-child {
  border-bottom: 0;
}
.order-row span {
  color: var(--muted);
}
.order-row b {
  font-weight: 650;
}

/* ── skeletons / empty ─────────────────────────────────────── */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #17181e;
  border-radius: 10px;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent);
  animation: shimmer 1.6s infinite;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 54px 24px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.012);
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  border-radius: 17px;
  background: #17181e;
  border: 1px solid var(--line);
  color: var(--muted);
}
.empty h3 {
  font-size: 16px;
}
.empty p {
  margin-top: 5px;
  max-width: 420px;
  color: var(--muted);
  font-size: 13px;
}

/* ── animations ────────────────────────────────────────────── */
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes pulse-soft {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}
@keyframes flicker {
  0%,
  100% {
    transform: scaleY(0.92) scaleX(0.95);
    opacity: 0.8;
  }
  35% {
    transform: scaleY(1.08) scaleX(1.04);
    opacity: 1;
  }
  65% {
    transform: scaleY(0.97) scaleX(0.98);
    opacity: 0.9;
  }
}
@keyframes crash-flash {
  0% {
    opacity: 0;
  }
  16% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
  }
}

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