/* ============================================================
   NEWBOT — visual system
   ============================================================ */

:root {
  --bg: #05060a;
  --bg-soft: #080a11;
  --panel: rgba(13, 16, 25, 0.72);
  --panel-2: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf8;
  --muted: #8b94aa;
  --dim: #5b6377;
  --cyan: #22e5ff;
  --violet: #8b5cf6;
  --pink: #ff3d81;
  --lime: #a8ff3e;
  --amber: #ffb020;
  --danger: #ff5470;
  --grad: linear-gradient(118deg, #22e5ff 0%, #8b5cf6 48%, #ff3d81 100%);
  --grad-soft: linear-gradient(118deg, rgba(34, 229, 255, 0.14), rgba(139, 92, 246, 0.12) 48%, rgba(255, 61, 129, 0.1));
  --r-lg: 22px;
  --r: 16px;
  --r-sm: 11px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); background-clip: padding-box; }

a { color: inherit; }

/* ------------------------------------------------------------ background */

#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  filter: blur(80px) saturate(150%);
  opacity: 0.55;
}
.aurora span {
  position: absolute;
  display: block;
  border-radius: 50%;
  mix-blend-mode: screen;
}
.aurora span:nth-child(1) {
  width: 46vw; height: 46vw; left: -12vw; top: -16vw;
  background: radial-gradient(circle at 40% 40%, rgba(34, 229, 255, 0.55), transparent 62%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(2) {
  width: 52vw; height: 52vw; right: -16vw; top: 4vh;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.5), transparent 64%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.aurora span:nth-child(3) {
  width: 40vw; height: 40vw; left: 32vw; bottom: -22vw;
  background: radial-gradient(circle at 50% 50%, rgba(255, 61, 129, 0.38), transparent 64%);
  animation: drift3 38s ease-in-out infinite alternate;
}

@keyframes drift1 { to { transform: translate3d(10vw, 8vh, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-8vw, 12vh, 0) scale(1.08); } }
@keyframes drift3 { to { transform: translate3d(6vw, -10vh, 0) scale(1.2); } }

#app { position: relative; z-index: 1; }

/* ------------------------------------------------------------ primitives */

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ico { width: 16px; height: 16px; flex: none; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.tiny { font-size: 11.5px; }
.small { font-size: 12.5px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.row-between.small { gap: 8px; }
.row-between.small > span { white-space: nowrap; }
.row-between.small > b { white-space: nowrap; text-align: right; font-size: 11.5px; }
.row-end { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > * { min-width: 0; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 15.5px; }
p { margin: 0; }

.eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 600;
}

/* buttons */
.btn {
  --btn-bg: rgba(255, 255, 255, 0.045);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--btn-bg);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.22s ease, border-color 0.2s ease, background 0.2s ease;
  overflow: hidden;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.07); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn svg { width: 15px; height: 15px; flex: none; }

.btn-primary {
  border: none;
  background: var(--grad);
  background-size: 180% 180%;
  color: #04060c;
  box-shadow: 0 10px 34px -12px rgba(139, 92, 246, 0.85);
  animation: gradShift 8s ease infinite;
}
.btn-primary:hover { box-shadow: 0 14px 40px -10px rgba(34, 229, 255, 0.6); background: var(--grad); background-size: 180% 180%; }

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

.btn-danger { border-color: rgba(255, 84, 112, 0.3); color: #ff8fa1; background: rgba(255, 84, 112, 0.08); }
.btn-danger:hover { background: rgba(255, 84, 112, 0.16); border-color: rgba(255, 84, 112, 0.5); }

.btn-sm { padding: 7px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { padding: 13px 22px; font-size: 14.5px; border-radius: 13px; }
.btn-block { width: 100%; }

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.55) 48%, transparent 62%);
  transform: translateX(-120%);
}
.btn-primary:hover::after { animation: sheen 0.9s ease; }

@keyframes sheen { to { transform: translateX(120%); } }
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* inputs */
.input, .select, .textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(34, 229, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 229, 255, 0.1);
  background: rgba(0, 0, 0, 0.45);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b94aa' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}
.select option { background: #0c0f17; color: var(--text); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.hint { font-size: 11.5px; color: var(--dim); line-height: 1.5; }

/* badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.ok { color: #6df5b2; border-color: rgba(109, 245, 178, 0.24); background: rgba(109, 245, 178, 0.08); }
.badge.warn { color: var(--amber); border-color: rgba(255, 176, 32, 0.24); background: rgba(255, 176, 32, 0.08); }
.badge.bad { color: #ff8fa1; border-color: rgba(255, 84, 112, 0.28); background: rgba(255, 84, 112, 0.08); }
.badge.info { color: #8fdcff; border-color: rgba(34, 229, 255, 0.24); background: rgba(34, 229, 255, 0.08); }
.badge.violet { color: #c4b5fd; border-color: rgba(139, 92, 246, 0.28); background: rgba(139, 92, 246, 0.1); }
.badge.plain::before { display: none; }

/* cards */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 229, 255, 0.1), transparent 62%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card-pad { padding: 20px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}
.card-body { padding: 20px; }

/* ------------------------------------------------------------ auth */

.auth {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: 64px clamp(32px, 6vw, 96px);
  overflow: hidden;
}

.auth-brand .logo { display: flex; align-items: center; gap: 12px; }
.auth-brand .logo-mark {
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--grad);
  display: grid; place-items: center;
  font-weight: 700; font-size: 19px; color: #04060c;
  box-shadow: 0 0 30px rgba(34, 229, 255, 0.35);
}
.auth-brand .logo span { font-size: 15px; letter-spacing: 0.32em; font-weight: 600; }

.auth-title {
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0;
}
.auth-title em { font-style: normal; display: block; }

.auth-lede { color: var(--muted); font-size: 15px; max-width: 460px; line-height: 1.7; }

.auth-points { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.auth-point .dot {
  width: 22px; height: 22px; border-radius: 7px; flex: none; margin-top: 1px;
  display: grid; place-items: center;
  background: rgba(34, 229, 255, 0.1);
  border: 1px solid rgba(34, 229, 255, 0.22);
  color: var(--cyan);
}
.auth-point .dot svg { width: 12px; height: 12px; }
.auth-point b { color: var(--text); font-weight: 600; }

.auth-orbit {
  position: absolute;
  right: -140px;
  top: 50%;
  width: 460px;
  height: 460px;
  transform: translateY(-50%);
  opacity: 0.55;
  pointer-events: none;
}
.auth-orbit .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(34, 229, 255, 0.2);
  animation: spin 22s linear infinite;
}
.auth-orbit .ring:nth-child(2) { inset: 46px; border-color: rgba(139, 92, 246, 0.24); animation-duration: 15s; animation-direction: reverse; }
.auth-orbit .ring:nth-child(3) { inset: 92px; border-color: rgba(255, 61, 129, 0.2); animation-duration: 30s; }
.auth-orbit .ring::after {
  content: ""; position: absolute; top: -3px; left: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 14px var(--cyan);
}
.auth-orbit .ring:nth-child(2)::after { background: var(--violet); box-shadow: 0 0 14px var(--violet); }
.auth-orbit .ring:nth-child(3)::after { background: var(--pink); box-shadow: 0 0 14px var(--pink); }

@keyframes spin { to { transform: rotate(360deg); } }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px clamp(20px, 4vw, 60px);
  border-left: 1px solid var(--line);
  background: rgba(6, 8, 14, 0.5);
  backdrop-filter: blur(22px);
}
.auth-card { width: min(410px, 100%); display: flex; flex-direction: column; gap: 22px; }

.seg {
  display: flex;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  gap: 4px;
}
.seg button {
  flex: 1;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.seg button.active { background: rgba(255, 255, 255, 0.09); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }

.auth-foot { font-size: 11.5px; color: var(--dim); line-height: 1.6; }

@media (max-width: 940px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { min-height: 100vh; border-left: 0; }
}

/* ------------------------------------------------------------ shell */

.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }

/* mobile drawer scrim: never participates in the desktop grid */
.nav-scrim { display: none; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: rgba(5, 7, 12, 0.62);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  z-index: 40;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--grad);
  display: grid; place-items: center;
  font-weight: 700; color: #04060c; font-size: 16px;
  box-shadow: 0 0 24px rgba(34, 229, 255, 0.32);
  flex: none;
}
.brand-text b { display: block; font-size: 13.5px; letter-spacing: 0.2em; line-height: 1.2; }
.brand-text span { font-size: 10px; color: var(--dim); letter-spacing: 0.16em; text-transform: uppercase; }

.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #454d60; padding: 0 12px 8px; font-weight: 600; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-item svg { width: 16px; height: 16px; opacity: 0.85; flex: none; }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(34, 229, 255, 0.13), rgba(139, 92, 246, 0.09) 55%, transparent);
  box-shadow: inset 0 0 0 1px rgba(34, 229, 255, 0.14);
}
.nav-item.active svg { color: var(--cyan); opacity: 1; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -16px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 17px;
  border-radius: 0 3px 3px 0;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(34, 229, 255, 0.8);
}
.nav-item .badge { margin-left: auto; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.avatar {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(34, 229, 255, 0.22), rgba(139, 92, 246, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 700; font-size: 13px; color: #dff6ff;
}
.side-user .who { min-width: 0; }
.side-user .who b { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who span { font-size: 10.5px; color: var(--dim); letter-spacing: 0.06em; text-transform: uppercase; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 12, 0.66);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.crumb { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.crumb .sep { color: #333b4d; }
.crumb b { color: var(--text); font-weight: 600; }

.balance-pill {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 13px 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(34, 229, 255, 0.22);
  background: linear-gradient(120deg, rgba(34, 229, 255, 0.1), rgba(139, 92, 246, 0.1));
  font-size: 12.5px;
  color: #b9f4ff;
  box-shadow: 0 0 24px -8px rgba(34, 229, 255, 0.55);
  text-decoration: none;
  transition: 0.2s;
}
.balance-pill:hover { border-color: rgba(34, 229, 255, 0.45); box-shadow: 0 0 30px -6px rgba(34, 229, 255, 0.7); }
.balance-pill svg { width: 14px; height: 14px; }
.balance-pill b { font-family: var(--mono); font-size: 12.5px; color: #fff; }
.balance-pill .unit { color: var(--dim); font-size: 10.5px; letter-spacing: 0.08em; }

.icon-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06); }
.icon-btn svg { width: 16px; height: 16px; }

.view { padding: clamp(18px, 3vw, 34px); display: flex; flex-direction: column; gap: 18px; max-width: 1440px; width: 100%; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.view-head .sub { color: var(--muted); font-size: 13px; margin-top: 5px; }

.menu-btn { display: none; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 260px;
    transform: translateX(-104%);
    transition: transform 0.28s cubic-bezier(0.22, 0.9, 0.3, 1);
    box-shadow: 40px 0 80px rgba(0, 0, 0, 0.6);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .nav-scrim { display: none; }
  body.nav-open .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(3, 4, 8, 0.6);
    z-index: 35;
    backdrop-filter: blur(3px);
  }
  .menu-btn { display: grid; }
}

/* ------------------------------------------------------------ dashboard */

.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; }
.grid-2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

@media (max-width: 1180px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .grid-2, .grid-2-even { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .grid-4 { grid-template-columns: 1fr; } }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 176, 32, 0.22);
  background: rgba(255, 176, 32, 0.07);
  color: #ffd68a;
  font-size: 12.5px;
  line-height: 1.6;
}
.notice svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(1200px circle at -10% -40%, rgba(34, 229, 255, 0.16), transparent 55%),
    radial-gradient(900px circle at 105% 130%, rgba(255, 61, 129, 0.14), transparent 55%),
    linear-gradient(160deg, rgba(20, 24, 38, 0.9), rgba(9, 11, 18, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 80px -40px rgba(34, 229, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(34, 229, 255, 0.55), rgba(139, 92, 246, 0.4) 40%, rgba(255, 61, 129, 0.35) 70%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.75;
}
.hero .sheen {
  position: absolute;
  top: -60%; left: -30%;
  width: 52%; height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: rotate(12deg);
  animation: heroSheen 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes heroSheen {
  0%, 100% { transform: translateX(-20%) rotate(12deg); opacity: 0; }
  35% { opacity: 1; }
  70% { transform: translateX(320%) rotate(12deg); opacity: 0; }
}

.hero .eyebrow { color: #8ba3bd; }
.balance-amount {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 8px 0 6px;
  font-family: var(--mono);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.balance-amount .unit { font-size: 13px; letter-spacing: 0.14em; color: #7c8aa0; font-family: var(--font); font-weight: 600; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 7px 18px; color: #90a0b8; font-size: 12.5px; }
.hero-meta b { color: #dbe9ff; font-family: var(--mono); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }

.orb-wrap { position: relative; width: 168px; height: 168px; flex: none; }
.orb {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(34, 229, 255, 0.9), rgba(139, 92, 246, 0.85), rgba(255, 61, 129, 0.8), rgba(34, 229, 255, 0.9));
  filter: blur(22px);
  opacity: 0.42;
  animation: spin 14s linear infinite;
}
.orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.orb-ring.r1 { inset: 8px; border-color: rgba(34, 229, 255, 0.28); animation: spin 18s linear infinite; }
.orb-ring.r1::after { content: ""; position: absolute; top: -3px; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.orb-ring.r2 { inset: 30px; border-color: rgba(139, 92, 246, 0.3); animation: spin 11s linear infinite reverse; }
.orb-ring.r2::after { content: ""; position: absolute; bottom: -2px; left: 30%; width: 4px; height: 4px; border-radius: 50%; background: #a78bfa; box-shadow: 0 0 12px #a78bfa; }
.orb-ring.r3 { inset: 52px; border-color: rgba(255, 61, 129, 0.26); animation: spin 24s linear infinite; }
.orb-core {
  position: absolute; inset: 62px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.16), rgba(9, 12, 20, 0.9) 70%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--mono);
  font-size: 22px;
  color: #e6fbff;
  text-shadow: 0 0 18px rgba(34, 229, 255, 0.8);
  box-shadow: inset 0 0 24px rgba(34, 229, 255, 0.16);
}
@media (max-width: 720px) { .orb-wrap { display: none; } .hero { grid-template-columns: 1fr; } }

.stat {
  position: relative;
  padding: 16px 17px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.stat:hover { border-color: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }
.stat .label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); letter-spacing: 0.02em; }
.stat .label svg { width: 15px; height: 15px; color: var(--dim); }
.stat .value { margin-top: 9px; font-family: var(--mono); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.stat .value small { font-size: 11px; color: var(--dim); font-family: var(--font); margin-left: 4px; letter-spacing: 0.08em; }
.stat .foot { margin-top: 6px; font-size: 11.5px; color: var(--dim); }
.stat.accent::after {
  content: ""; position: absolute; right: -30px; top: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 229, 255, 0.16), transparent 70%);
}
.stat.pink::after { background: radial-gradient(circle, rgba(255, 61, 129, 0.18), transparent 70%); }
.stat.violet::after { background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%); }
.stat.lime::after { background: radial-gradient(circle, rgba(168, 255, 62, 0.14), transparent 70%); }

.chart-wrap { position: relative; padding: 6px 8px 0; }
.chart-empty {
  position: absolute;
  inset: 0 0 30px;
  display: grid;
  place-items: center;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-labels { display: flex; justify-content: space-between; padding: 4px 10px 12px; font-size: 10.5px; color: var(--dim); font-family: var(--mono); }
.chart-line { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 1.4s cubic-bezier(0.3, 0.9, 0.3, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.mini-list { display: flex; flex-direction: column; }
.mini-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12.5px;
}
.mini-item:last-child { border-bottom: 0; }
.mini-item .ico {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
}
.mini-item .ico svg { width: 14px; height: 14px; }
.mini-item .body { min-width: 0; flex: 1; }
.mini-item .body b { display: block; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-item .body span { font-size: 11px; color: var(--dim); font-family: var(--mono); }
.mini-item .cost { font-family: var(--mono); font-size: 12px; color: #9be7ff; }

/* ------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.035); vertical-align: middle; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.022); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.table .empty-row td { padding: 34px; text-align: center; color: var(--dim); font-size: 12.5px; }

/* ------------------------------------------------------------ keys */

.key-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.key-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.key-card.revoked { opacity: 0.58; }
.key-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.key-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.key-hint {
  margin-top: 7px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  font-family: var(--mono);
  font-size: 11.5px;
  color: #9fb0c9;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.key-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.key-stats div { display: flex; flex-direction: column; gap: 1px; }
.key-stats span { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.key-stats b { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: #cfe3ff; }
.key-actions { display: flex; gap: 7px; margin-top: auto; }

.secret-box {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(34, 229, 255, 0.25);
  font-family: var(--mono);
  font-size: 12.5px;
  color: #b7f6ff;
  word-break: break-all;
  line-height: 1.6;
}

/* ------------------------------------------------------------ topup */

.amount-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 620px) { .amount-grid { grid-template-columns: repeat(3, 1fr); } }
.amount-chip {
  padding: 11px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s;
}
.amount-chip:hover { border-color: var(--line-strong); color: var(--text); }
.amount-chip.active {
  color: #eafcff;
  border-color: rgba(34, 229, 255, 0.5);
  background: rgba(34, 229, 255, 0.1);
  box-shadow: 0 0 20px -6px rgba(34, 229, 255, 0.6);
}

.pay-card { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.pay-amount { font-family: var(--mono); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.pay-amount span { font-size: 12px; color: var(--dim); letter-spacing: 0.12em; }
.addr-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--line);
}
.addr-row code { flex: 1; font-family: var(--mono); font-size: 11.5px; color: #a8e9ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn {
  display: grid; place-items: center;
  width: 28px; height: 28px; flex: none;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: 0.18s;
}
.copy-btn:hover { color: #fff; border-color: rgba(34, 229, 255, 0.4); background: rgba(34, 229, 255, 0.1); }
.copy-btn svg { width: 13px; height: 13px; }

.qr-box {
  position: relative;
  width: 168px; height: 168px;
  border-radius: 14px;
  padding: 9px;
  background: #0b0e15;
  border: 1px solid var(--line);
  margin: 0 auto;
  display: grid; place-items: center;
}
.qr-box img {
  position: absolute;
  left: 9px; top: 9px;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  border-radius: 8px;
  display: block;
  background: #0b0e15;
}
.qr-fallback {
  position: absolute; inset: 9px;
  display: none;
  place-items: center;
  font-family: var(--mono); font-size: 10px; color: var(--dim);
  text-align: center; padding: 10px; line-height: 1.7;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 6px, transparent 6px 12px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 6px, transparent 6px 12px);
}

.countdown { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--amber); }
.countdown svg { width: 12px; height: 12px; }

.pay-status {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}
.pay-status.pending { border-color: rgba(255, 176, 32, 0.22); background: rgba(255, 176, 32, 0.06); color: #ffd68a; }
.pay-status.paid { border-color: rgba(109, 245, 178, 0.24); background: rgba(109, 245, 178, 0.07); color: #8fffc4; }
.pay-status > svg { width: 15px; height: 15px; flex: none; }
.pay-status .spinner { width: 13px; height: 13px; }
.spinner {
  width: 13px; height: 13px; flex: none;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: currentColor;
  animation: spin 0.8s linear infinite;
}

/* ------------------------------------------------------------ playground */

.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .play-grid { grid-template-columns: 1fr; } }

.chat-card { display: flex; flex-direction: column; min-height: 620px; }
.chat-card .card-head .row b { white-space: nowrap; }
.chat-log {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  max-height: calc(100vh - 300px);
  min-height: 340px;
}
.msg { display: flex; gap: 11px; max-width: 86%; animation: up 0.3s ease both; }
.msg.user { margin-left: auto; flex-direction: row-reverse; }
.msg .ava {
  width: 28px; height: 28px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
}
.msg.user .ava { background: linear-gradient(135deg, rgba(34,229,255,.22), rgba(139,92,246,.26)); color: #dff6ff; border-color: rgba(34,229,255,.25); }
.msg .text {
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.68;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.msg.user .text { background: linear-gradient(135deg, rgba(34, 229, 255, 0.12), rgba(139, 92, 246, 0.14)); border-color: rgba(34, 229, 255, 0.2); }
.msg .meta { font-size: 10px; color: var(--dim); margin-top: 5px; font-family: var(--mono); }
.cursor-blink::after { content: "▍"; color: var(--cyan); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.composer { border-top: 1px solid var(--line); padding: 14px; display: flex; gap: 10px; align-items: flex-end; }
.composer textarea {
  flex: 1; min-height: 46px; max-height: 160px; resize: none;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.32); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: 13.5px; line-height: 1.5; outline: none; transition: 0.2s;
}
.composer textarea:focus { border-color: rgba(34, 229, 255, 0.45); box-shadow: 0 0 0 3px rgba(34, 229, 255, 0.08); }
.send-btn { width: 46px; height: 46px; border-radius: 12px; padding: 0; flex: none; }
.send-btn svg { width: 17px; height: 17px; }

.typing-dots { display: inline-flex; gap: 4px; align-items: center; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: bounce 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

.empty-chat {
  margin: auto;
  text-align: center;
  color: var(--dim);
  font-size: 12.5px;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.empty-chat .glyph { font-family: var(--mono); font-size: 30px; color: #2c3446; }

/* ------------------------------------------------------------ prompts / docs */

.prompt-card { padding: 17px; display: flex; flex-direction: column; gap: 10px; }
.prompt-preview {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: #7f8ca3;
  max-height: 92px;
  overflow: hidden;
  mask-image: linear-gradient(#000 55%, transparent);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  white-space: pre-wrap;
}
pre.code {
  margin: 0;
  padding: 15px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--line);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  color: #b8c8dd;
}
pre.code .c { color: #5d6b80; }
pre.code .k { color: #ff9ec4; }
pre.code .s { color: #9ef0b8; }
pre.code .f { color: #8fd8ff; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.code-head .lang { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-weight: 600; }

.doc-block { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.doc-block h3 { display: flex; align-items: center; gap: 9px; }
.doc-block h3 .n {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: grid; place-items: center;
  background: rgba(34, 229, 255, 0.1);
  border: 1px solid rgba(34, 229, 255, 0.22);
  font-family: var(--mono); font-size: 11px; color: var(--cyan);
}
.doc-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.85; }
.doc-list code, .inline-code {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #a9e8ff;
}

/* ------------------------------------------------------------ admin */

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); overflow-x: auto; }
.tabs button {
  padding: 8px 14px; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: 0.18s;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { background: rgba(255, 255, 255, 0.08); color: #fff; }

.switch { position: relative; display: inline-block; width: 38px; height: 21px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; cursor: pointer; border-radius: 99px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line-strong); transition: 0.22s;
}
.switch span::before {
  content: ""; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px;
  border-radius: 50%; background: #7d879c; transition: 0.22s;
}
.switch input:checked + span { background: rgba(34, 229, 255, 0.22); border-color: rgba(34, 229, 255, 0.5); }
.switch input:checked + span::before { transform: translateX(17px); background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }

/* ------------------------------------------------------------ modal / toast */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: 18px;
  background: rgba(3, 4, 8, 0.72);
  backdrop-filter: blur(7px);
  animation: fade 0.2s ease both;
}
.modal {
  width: min(560px, 100%);
  max-height: 88vh;
  display: flex; flex-direction: column;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #10131d, #0a0c13);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
  overflow: hidden;
}
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 20px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); }

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 9px; max-width: min(360px, calc(100vw - 40px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(14, 17, 26, 0.95);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  font-size: 12.5px;
  line-height: 1.55;
  animation: toastIn 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}
.toast.out { animation: toastOut 0.25s ease forwards; }
.toast .bar { width: 3px; align-self: stretch; border-radius: 3px; background: var(--cyan); flex: none; }
.toast.ok .bar { background: #6df5b2; }
.toast.err .bar { background: var(--danger); }
.toast.warn .bar { background: var(--amber); }
.toast b { display: block; font-weight: 600; margin-bottom: 1px; }
.toast p { color: var(--muted); }

/* ------------------------------------------------------------ misc */

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 46px 20px; text-align: center; color: var(--dim); font-size: 12.5px;
}
.empty svg { width: 26px; height: 26px; opacity: 0.5; }

.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.divider { height: 1px; background: var(--line); margin: 2px 0; }
.hr-glow { height: 1px; background: linear-gradient(90deg, transparent, rgba(34,229,255,.35), rgba(139,92,246,.3), transparent); }

.copy-inline { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.copy-inline:hover { color: var(--cyan); }

.loader-line { height: 2px; background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }

.toast-region { position: relative; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(0.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px) scale(0.97); } }

.view > * { animation: up 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.view > *:nth-child(1) { animation-delay: 0.02s; }
.view > *:nth-child(2) { animation-delay: 0.06s; }
.view > *:nth-child(3) { animation-delay: 0.1s; }
.view > *:nth-child(4) { animation-delay: 0.14s; }
.view > *:nth-child(5) { animation-delay: 0.18s; }
.view > *:nth-child(6) { animation-delay: 0.22s; }

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

@media (max-width: 620px) {
  .topbar { padding: 10px 14px; }
  .view { padding: 14px; gap: 14px; }
  .balance-pill { padding: 6px 10px; }
  .balance-pill .unit { display: none; }
  .card-head { padding: 14px; }
  .card-body { padding: 15px; }
  .key-actions { flex-wrap: wrap; }
  h1 { font-size: 22px; }
}

/* ------------------------------------------------------------ admin console */

.admin-shell .brand-mark {
  background: linear-gradient(135deg, #ffb020, #ff3d81);
  box-shadow: 0 0 24px rgba(255, 176, 32, 0.34);
}
.admin-shell .nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 176, 32, 0.15), rgba(255, 61, 129, 0.09) 55%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 32, 0.2);
}
.admin-shell .nav-item.active svg { color: #ffb020; opacity: 1; }
.admin-shell .nav-item.active::before {
  content: "";
  position: absolute;
  left: -16px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 17px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #ffb020, #ff3d81);
  box-shadow: 0 0 14px rgba(255, 176, 32, 0.8);
}
.admin-shell .avatar {
  background: linear-gradient(135deg, rgba(255, 176, 32, 0.28), rgba(255, 61, 129, 0.26));
  border-color: rgba(255, 176, 32, 0.32);
  color: #ffe6b8;
}
.admin-badge {
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 4px 10px;
}
@media (max-width: 560px) {
  .admin-badge { display: none; }
}
