:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.7);
  --text: #f8fafc;
  --text-dim: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --success: #22c55e;
  --error: #ef4444;
  --glass: rgba(255, 255, 255, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  padding-top: 96px;
  padding-bottom: 24px;
}

.container {
  width: 100%;
  max-width: 720px;
  padding: 24px;
  z-index: 1;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
  background: linear-gradient(to right, #6366f1, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header p {
  color: var(--text-dim);
  font-size: 14px;
}
.outgoing-funds-tip {
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 13px;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-completed {
  background-color: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.status-draft {
  background-color: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.status-pending {
  background-color: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.status-revoked {
  background-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.outgoing-funds-table-wrap {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: min(46vh, 420px);
  border: 1px solid var(--border);
  border-radius: 14px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.38) transparent;
}

.outgoing-funds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

.outgoing-funds-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-dim);
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
}

.outgoing-funds-table tbody td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.outgoing-funds-table tbody tr {
  cursor: pointer;
}

.outgoing-funds-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.08);
}

.outgoing-funds-table th:nth-child(1),
.outgoing-funds-table td:nth-child(1) {
  width: 15%;
}

.outgoing-funds-table th:nth-child(2),
.outgoing-funds-table td:nth-child(2) {
  width: 30%;
}

.outgoing-funds-table th:nth-child(3),
.outgoing-funds-table td:nth-child(3) {
  width: 20%;
}

.outgoing-funds-table th:nth-child(4),
.outgoing-funds-table td:nth-child(4) {
  width: 20%;
}

.outgoing-funds-table th:nth-child(5),
.outgoing-funds-table td:nth-child(5) {
  width: 15%;
}

body {
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.75) rgba(255, 255, 255, 0.08);
}

body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

body::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(99, 102, 241, 0.9),
    rgba(79, 70, 229, 0.9)
  );
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.45);
}

body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(129, 140, 248, 0.95),
    rgba(99, 102, 241, 0.95)
  );
}

.outgoing-funds-table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.outgoing-funds-table-wrap::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
  margin-block: 6px;
}

.outgoing-funds-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.outgoing-funds-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(129, 140, 248, 0.46);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.input-group {
  margin-bottom: 24px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.balance {
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s;
}

.balance:hover {
  color: var(--primary);
}

.input-wrapper {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--primary);
}

input {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 12px 16px;
  font-size: 20px;
  font-weight: 600;
  width: 100%;
  outline: none;
}

.token-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-right: 8px;
  color: var(--text);
}

.btn {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
}

.steps {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  position: relative;
  padding: 0 10px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--glass);
  border: 2px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.3s;
}

.step.active .circle {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.step.completed .circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
}

.step.active .step-label {
  color: var(--text);
}

.connector {
  position: absolute;
  top: 16px;
  left: 50px;
  right: 50px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.connector-progress {
  height: 100%;
  background: var(--success);
  width: 0%;
  transition: width 0.3s;
}

#status {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  min-height: 20px;
}

.success-msg {
  color: var(--success);
}

.error-msg {
  color: var(--error);
}

.info-msg {
  color: var(--text-dim);
}

.loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 8%;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(to right, #6366f1, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.btn-launch {
  background: var(--primary);
  color: white;
  padding: 10px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-launch:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

@media (max-width: 480px) {
  .card {
    padding: 24px;
  }
}
