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

:root {
  --bg: #0c0c16;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e0e0f0;
  --muted: #6060a0;
  --green: #00c896;
  --blue: #4488ff;
  --gold: #f0b429;
  --radius: 16px;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
}

.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.32; }
.glow-1 { width: 560px; height: 560px; background: radial-gradient(var(--green), transparent); top: -120px; left: -100px; }
.glow-2 { width: 480px; height: 480px; background: radial-gradient(var(--blue), transparent); bottom: -80px; right: -60px; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 0.85rem; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand h1 {
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--green), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand p { font-size: 0.82rem; color: var(--muted); }

.badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.badge {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 200, 150, 0.3);
  background: rgba(0, 200, 150, 0.1);
  color: var(--green);
}
.badge.blue {
  border-color: rgba(68, 136, 255, 0.3);
  background: rgba(68, 136, 255, 0.1);
  color: #6699ff;
}

.grid {
  display: grid;
  grid-template-columns: 340px 1fr 280px;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  backdrop-filter: blur(16px);
}

.card h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
}

form { display: grid; gap: 0.85rem; }
label { display: grid; gap: 0.35rem; font-size: 0.8rem; color: var(--muted); }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

input, select, button { font: inherit; }
input, select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.62rem 0.8rem;
}

.input-group { display: flex; align-items: stretch; }
.input-group input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}
.input-group span {
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 10px 10px 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-family: 'JetBrains Mono', monospace;
}

input:focus, select:focus {
  outline: none;
  border-color: rgba(0, 200, 150, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.12);
}

.actions { display: grid; gap: 0.55rem; margin-top: 0.25rem; }

button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 0.72rem 1rem;
  font-weight: 600;
  transition: transform 0.15s, opacity 0.15s;
}
button:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--green), #00a67a);
  color: #041510;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
}

.summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.summary-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
}
.summary-item.highlight {
  grid-column: 1 / -1;
  background: rgba(0, 200, 150, 0.08);
  border-color: rgba(0, 200, 150, 0.25);
}
.summary-item .label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.summary-item .value {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.summary-item.highlight .value { font-size: 1.55rem; color: var(--green); }
.summary-item .value.blue { color: #6699ff; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 420px;
}

table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
th, td { padding: 0.6rem 0.75rem; text-align: right; border-bottom: 1px solid var(--border); }
th:first-child, td:first-child { text-align: left; }
th {
  position: sticky;
  top: 0;
  background: #12121f;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.history-list { display: grid; gap: 0.5rem; max-height: 520px; overflow-y: auto; }
.history-item {
  text-align: left;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  color: var(--text);
}
.history-item:hover { border-color: rgba(0, 200, 150, 0.35); }
.history-item.active { border-color: rgba(0, 200, 150, 0.5); background: rgba(0, 200, 150, 0.08); }
.history-item .title { font-weight: 600; font-size: 0.88rem; margin-bottom: 0.2rem; }
.history-item .meta { font-size: 0.72rem; color: var(--muted); font-family: 'JetBrains Mono', monospace; }

.empty {
  text-align: center;
  padding: 1.5rem 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(0, 200, 150, 0.15);
  border: 1px solid rgba(0, 200, 150, 0.4);
  color: var(--green);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateY(0); }

footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.76rem;
  color: #303050;
}
