:root {
  --bg: #0b1020;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.10);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --good: rgba(46, 204, 113, 1);
  --bad: rgba(231, 76, 60, 1);
  --warn: rgba(241, 196, 15, 1);
  --primary: rgba(90, 120, 255, 1);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(90, 120, 255, 0.20), transparent 50%),
    radial-gradient(900px 500px at 80% 20%, rgba(46, 204, 113, 0.14), transparent 55%),
    radial-gradient(700px 500px at 60% 90%, rgba(241, 196, 15, 0.10), transparent 55%),
    var(--bg);
  color: var(--text);
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  background: linear-gradient(
    180deg,
    var(--panel-2),
    var(--panel)
  );
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

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

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(
    135deg,
    rgba(90, 120, 255, 0.9),
    rgba(46, 204, 113, 0.7)
  );
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.brand-text .title {
  font-size: 16px;
  font-weight: 700;
}

.brand-text .subtitle {
  font-size: 12px;
  color: var(--muted);
}

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

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  border: 1px solid var(--stroke);
  background: linear-gradient(
    180deg,
    var(--panel-2),
    var(--panel)
  );
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  backdrop-filter: blur(10px);
}

.span-2 {
  grid-column: span 2;
}

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

.card h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.pill {
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.15);
  color: var(--muted);
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

label {
  min-width: 160px;
  font-size: 12px;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  outline: none;
}

/* ===============================
   TEXTAREA (Recipients + Amounts) - UPDATED
   =============================== */

textarea {
  min-height: 240px;
  max-height: 360px;
  resize: none;
  line-height: 1.55;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(
    180deg,
    rgba(14, 20, 28, 0.95),
    rgba(10, 14, 20, 0.95)
  );
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

input:focus,
textarea:focus {
  border-color: rgba(90, 120, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(90, 120, 255, 0.12);
}

/* ===============================
   TEXTAREA SCROLLBAR (CHROME / EDGE / SAFARI)
   =============================== */

textarea::-webkit-scrollbar {
  width: 10px;
}

textarea::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 999px;
}

textarea::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(90, 120, 255, 0.55),
    rgba(46, 204, 113, 0.35)
  );
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.25);
}

textarea::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(90, 120, 255, 0.75),
    rgba(46, 204, 113, 0.55)
  );
}

/* ===============================
   TEXTAREA SCROLLBAR (FIREFOX)
   =============================== */

textarea {
  scrollbar-width: thin;
  scrollbar-color:
    rgba(90, 120, 255, 0.65)
    rgba(0, 0, 0, 0.22);
}

.btn {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.08s ease,
    background 0.18s ease,
    border-color 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.10);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: rgba(90, 120, 255, 0.24);
  border-color: rgba(90, 120, 255, 0.45);
}

.btn.primary:hover {
  background: rgba(90, 120, 255, 0.32);
}

.btn.danger {
  background: rgba(231, 76, 60, 0.18);
  border-color: rgba(231, 76, 60, 0.45);
}

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

/* ===============================
   TABLE WRAP (SCROLL + STICKY HEAD)
   =============================== */

.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 420px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.14);
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

thead th {
  font-size: 12px;
  color: var(--muted);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(6px);
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  vertical-align: top;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

/* ===============================
   SCROLLBAR (CHROME / EDGE / SAFARI)
   =============================== */

.table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-wrap::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(90, 120, 255, 0.55),
    rgba(46, 204, 113, 0.35)
  );
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.25);
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(90, 120, 255, 0.75),
    rgba(46, 204, 113, 0.55)
  );
}

/* ===============================
   SCROLLBAR (FIREFOX)
   =============================== */

.table-wrap {
  scrollbar-width: thin;
  scrollbar-color:
    rgba(90, 120, 255, 0.65)
    rgba(0, 0, 0, 0.22);
}

.small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}

.small code {
  color: rgba(255, 255, 255, 0.85);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  color: var(--muted);
  font-size: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.muted {
  color: var(--muted);
}

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

  .span-2 {
    grid-column: span 1;
  }

  label {
    min-width: 120px;
  }

  table {
    min-width: 560px;
  }

  .table-wrap {
    max-height: 360px;
  }
}

@media (max-width: 560px) {
  .row {
    flex-direction: column;
    align-items: stretch;
  }

  label {
    min-width: unset;
  }

  .actions {
    width: 100%;
    justify-content: flex-end;
  }

  table {
    min-width: 520px;
  }

  .table-wrap {
    max-height: 300px;
  }
}
