:root {
  --bg: #000;
  --bg2: #0c1222;
  --bg3: #111827;
  --panel: #0f172a;
  --panel2: #1f2937;
  --line: #1f2937;
  --text: #f3f4f6;
  --muted: #cbd5e1;
  --muted2: #94a3b8;
  --brand: #4681ff;
  --brand2: #8aa8ff;
  --accent: #4681ff;
  --red: #EF4444;
  --orange: #F59E0B;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-weight: 400;
  font-size: 14px;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }

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

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 15px;
  width: 100%;
  transition: all 0.2s;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(70, 129, 255, 0.15);
  background: var(--panel);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted2);
  opacity: 0.7;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-base);
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: -0.01em;
}

.btn.sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 10px;
}

.btn.icon {
  padding: 8px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(120deg, #4681ff, #8aa8ff);
  color: #fff;
  box-shadow: 0 4px 14px rgba(70, 129, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(70, 129, 255, 0.4);
}

.btn-primary:hover::after {
  opacity: 1;
}

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

.btn-ghost {
  background: var(--bg2);
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--red);
  color: #fff;
}

.auth {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% -20%, rgba(70, 129, 255, 0.18), transparent 60%),
    var(--bg);
  padding: 20px;
  z-index: 5;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.auth-card .logo {
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-card .logo span {
  background: linear-gradient(120deg, var(--brand), var(--brand2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-card h1 {
  font-size: 26px;
  margin-bottom: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-card p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.auth-card label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  margin: 20px 0 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-card .err {
  color: var(--red);
  font-size: 13px;
  margin-top: 14px;
  min-height: 16px;
  font-weight: 500;
}

.auth-card .foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

.auth-card .link {
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  transition: color var(--transition-base);
  letter-spacing: -0.01em;
}

.auth-card .link:hover {
  color: var(--brand2);
}

.auth-logo-wrap {
  display: block;
  text-align: center;
  border: none;
  background: none;
  padding: 0;
  box-shadow: none;
}

.auth-logo {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eye {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.dropdown-bg {
  position: absolute;
  inset: 0;
}

.field {
  flex: 1;
  min-width: 180px;
}

.field-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.field-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--text);
  transition: all var(--transition-base);
}

.field-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(70, 129, 255, 0.12);
}

.input-group {
  position: relative;
  margin-bottom: 4px;
}

.input-group input {
  width: 100%;
  padding-left: 44px;
  padding-right: 44px;
}

.input-group .ic {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
  transition: color var(--transition-base);
}

.input-group input:focus + .ic {
  color: var(--brand);
}

.toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.toggle-pass:hover {
  color: var(--brand);
  background: var(--bg2);
}

.toggle-pass svg {
  width: 18px;
  height: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.topbar .right {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.dropdown {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  display: none;
}

body.nav-open .dropdown {
  display: block;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 282px;
  max-width: 84vw;
  z-index: 56;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 4px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.4);
}

body.nav-open .sidebar {
  transform: none;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 18px;
}

.sidebar-logo {
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  letter-spacing: -0.03em;
}

.sidebar-logo span {
  background: linear-gradient(120deg, var(--brand), var(--brand2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sidebar button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--muted);
  padding: 13px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-base);
}

.sidebar button:hover {
  background: rgba(70, 129, 255, 0.12);
  color: var(--text);
}

.sidebar button.active {
  background: linear-gradient(120deg, rgba(70, 129, 255, 0.22), rgba(114, 91, 255, 0.15));
  color: #4681ff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand);
}

.sidebar button .ic {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: currentColor;
}

.sidebar-section {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 10px 6px;
}

.sidebar-parent {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--muted);
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-base);
  cursor: pointer;
}

.sidebar-parent:hover {
  background: rgba(70, 129, 255, 0.12);
  color: var(--text);
}

.sidebar-parent.active {
  background: linear-gradient(120deg, rgba(70, 129, 255, 0.22), rgba(114, 91, 255, 0.15));
  color: #4681ff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand);
}

.sidebar-parent .chevron {
  flex: 0 0 16px;
  transition: transform var(--transition-base);
}

.sidebar-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 12px;
  margin-bottom: 4px;
}

.sidebar-sub.open {
  display: flex;
}

.sidebar-sub button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-base);
}

.sidebar-sub button:hover {
  background: rgba(70, 129, 255, 0.12);
  color: var(--text);
}

.sidebar-sub button.active {
  background: rgba(70, 129, 255, 0.15);
  color: #4681ff;
  font-weight: 600;
}

.wallet-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: all 0.15s;
}

.wallet-item:hover {
  border-color: var(--brand);
}

.wallet-icon {
  width: 32px;
  height: 20px;
  border-radius: 4px;
  background: var(--bg2);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-foot button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}

.sidebar-foot button:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.sidebar-foot button .ic {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  stroke: currentColor;
}

.sidebar-foot .support {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.sidebar-foot .support:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(70, 129, 255, 0.06);
}

.dash {
  padding: 20px 14px;
}

.layout {
  display: block;
}

.content {
  min-width: 0;
  padding: 18px 0 0;
}

.section {
  display: none;
  animation: fadeIn 0.25s ease;
}

.section.active {
  display: block;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.topbar:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.15s;
  background: transparent;
}

.menu-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(70, 129, 255, 0.06);
}

.topbar-logo {
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0;
}

.topbar-logo span {
  color: var(--brand);
}

.topbar-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.topbar-logo-wrap:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(70, 129, 255, 0.08);
}

.topbar-sub {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-ava {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.topbar-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-chip {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.topbar-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(70, 129, 255, 0.06);
}

.topbar-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  cursor: pointer;
}

.topbar-icon:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(70, 129, 255, 0.06);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  border: 1px solid var(--line);
  transition: all 0.15s;
  cursor: default;
}

.topbar-user:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(70, 129, 255, 0.06);
}

.welcome {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.welcome .sub {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  display: block;
  margin-top: 4px;
  width: 100%;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 18px 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(120deg, var(--brand), var(--brand2));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover::before {
  opacity: 1;
}

.card .n {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.card .l {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.card .ic {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 24px;
}

.chip {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 14px;
  transition: all 0.15s;
}

.chip:hover {
  border-color: var(--brand);
}

.chip b {
  font-weight: 700;
  color: var(--text);
}

.box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.box h3 {
  font-size: 16px;
  margin-bottom: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.row > * {
  flex: 1;
  min-width: 180px;
}

.tx {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px 0;
}

.tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  font-size: 14px;
}

.tx-item:hover {
  border-color: var(--brand);
  transform: translateX(2px);
}

.tx-item .pos {
  color: var(--accent);
  font-weight: 700;
}

.tx-item .neg {
  color: var(--red);
  font-weight: 700;
}

.tx-item .meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  font-weight: 500;
}

.tx-empty {
  text-align: center;
  color: var(--muted);
  padding: 24px;
  font-size: 14px;
}

.hidden {
  display: none;
}

.badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge.active {
  background: rgba(52, 211, 153, 0.14);
  color: #34d399;
}

.badge.active::before {
  background: #34d399;
}

.badge.blocked {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

.badge.blocked::before {
  background: var(--red);
}

.badge.frozen {
  background: rgba(245, 158, 11, 0.12);
  color: var(--orange);
}

.badge.frozen::before {
  background: var(--orange);
}

.msg {
  font-size: 13px;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 500;
}

.project-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.project-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.project-info h2 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-info h2 .arrow {
  color: var(--muted);
  font-size: 12px;
}

.project-info span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.project-header .right {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 18px;
  align-items: center;
}

.filter-chip {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.filter-chip.active {
  background: var(--bg2);
  color: var(--text);
  border-color: var(--line);
}

.filter-chip .filter-active {
  color: var(--brand);
  font-weight: 700;
}

.filter-chip .filter-inactive {
  color: var(--muted);
}

.filter-field {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-field:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.balance-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 18px 0;
}

.balance-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.balance-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
  opacity: 0.7;
}

.balance-ico {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex: 0 0 44px;
}

.balance-card .n {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.balance-card .l {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  font-weight: 500;
}

.balance-card .status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.balance-card .status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

.method-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.method-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.method-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
  opacity: 0;
  transition: opacity 0.15s;
}

.method-card:hover::before {
  opacity: 1;
}

.method-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.method-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.method-card-title .ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex: 0 0 36px;
}

.method-card-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.method-card-meta b {
  color: var(--text);
  font-weight: 600;
}

.method-card-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  background: var(--bg2);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--text);
  border: 1px solid var(--line);
}

.commission-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.commission-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.commission-center {
  flex: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.commission-total {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.commission-track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--bg2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.commission-fill-center {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--line);
  z-index: 2;
}

.commission-fill-left {
  position: absolute;
  top: 0;
  right: 50%;
  height: 100%;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, transparent, var(--brand));
  transition: width 0.3s ease;
}

.commission-fill-right {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, var(--orange), transparent);
  transition: width 0.3s ease;
}

.commission-value.merchant {
  color: var(--brand);
}

.commission-value.buyer {
  color: var(--orange);
}

.method-card-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
}

.analytics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 18px 0;
}

.analytics-controls {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin: 16px 0;
  flex-wrap: nowrap;
  align-items: center;
}

.analytics-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.analytics-switcher {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 0;
}

.analytic-tab {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.analytic-tab:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.analytic-tab.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(70, 129, 255, 0.15);
}

.analytic-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
  opacity: 0;
  transition: opacity 0.15s;
}

.analytic-tab:hover::before {
  opacity: 1;
}

.analytic-tab .val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.analytic-tab .lbl {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}

.analytic-tab .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.chart-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chart-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chart-canvas {
  width: 100%;
  height: 320px;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.chart-canvas svg {
  display: block;
}

.status-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
}

.status-dot.active {
  background: var(--accent);
}

.status-dot.frozen {
  background: var(--orange);
}

.status-dot.blocked {
  background: var(--red);
}

.status-dot.online {
  background: var(--brand);
}

.status-dot.pulse {
  animation: pulse 2s ease-in-out infinite;
}

.keys {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.keys b {
  color: var(--text);
  font-weight: 600;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.icon-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(70, 129, 255, 0.06);
}

.lang-btn {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.lang-btn:hover {
  border-color: var(--brand);
  background: rgba(70, 129, 255, 0.06);
  color: var(--brand);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.modal-body {
  padding: 20px 24px 24px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.modal-close:hover {
  border-color: var(--red);
  color: var(--red);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--bg2);
  color: var(--brand);
}

.menu-item.active {
  background: var(--bg2);
  color: var(--brand);
  font-weight: 600;
}

.menu-item.selected {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.menu-item.danger {
  color: var(--red);
}

.menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #fff;
}

.menu-item.danger svg {
  stroke: currentColor;
}

.period-option.active,
.lang-option.active {
  background: var(--bg2);
  color: var(--brand);
}

.first-login-banner {
  background: linear-gradient(120deg, rgba(70, 129, 255, 0.12), rgba(114, 91, 255, 0.08));
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.first-login-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 8px;
  flex-wrap: wrap;
}

.first-login-icon {
  font-size: 22px;
  flex: 0 0 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.first-login-text {
  flex: 1;
  min-width: 200px;
}

.first-login-text strong {
  font-size: 14px;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.first-login-text span {
  font-size: 13px;
  color: var(--muted);
}

.first-login-btn {
  background: linear-gradient(120deg, var(--brand), var(--brand2));
  color: #fff;
  border: 0;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: all 0.2s;
}

.first-login-btn:hover {
  filter: brightness(1.07);
}

.help-text {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.6;
}

*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(70, 129, 255, 0.18);
}

::selection {
  background: rgba(70, 129, 255, 0.35);
  color: #fff;
}

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

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.first-login-banner {
  background: linear-gradient(120deg, rgba(70, 129, 255, 0.12), rgba(114, 91, 255, 0.08));
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.first-login-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 8px;
  flex-wrap: wrap;
}

.first-login-icon {
  font-size: 22px;
  flex: 0 0 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.first-login-text {
  flex: 1;
  min-width: 200px;
}

.first-login-text strong {
  font-size: 14px;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.first-login-text span {
  font-size: 13px;
  color: var(--muted);
}

.first-login-btn {
  background: linear-gradient(120deg, var(--brand), var(--brand2));
  color: #fff;
  border: 0;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: all 0.2s;
}

.first-login-btn:hover {
  filter: brightness(1.07);
}
