/* ============================================================
     Design tokens
     ============================================================ */
:root {
  --bg-color: #f0f4ff;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-solid: #ffffff;
  --border: rgba(255, 255, 255, 0.6);
  --border-strong: rgba(59, 130, 246, 0.45);

  --topbar-bg: rgba(255, 255, 255, 0.75);
  --topbar-border: rgba(255, 255, 255, 0.9);

  --accent: #3b82f6;
  --accent-deep: #1e40af;
  --accent-soft: #93c5fd;
  --lavender: #bfdbfe;
  --lavender-pale: #eff6ff;

  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;

  --good: #10b981;
  --bad: #f43f5e;

  --shadow-sm: 0 4px 12px -2px rgba(30, 41, 59, 0.05);
  --shadow-md: 0 12px 24px -6px rgba(109, 40, 217, 0.12);
  --shadow-lg: 0 24px 48px -12px rgba(109, 40, 217, 0.25);
  --glow:
    0 0 0 4px rgba(139, 92, 246, 0.2), 0 20px 40px -10px rgba(139, 92, 246, 0.4);

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;

  --ease: cubic-bezier(0.25, 1, 0.35, 1); /* Bouncy / springy ease */
}

[data-theme="dark"] {
  --bg-color: #0f172a;
  --surface: rgba(30, 41, 59, 0.65);
  --surface-solid: #1e293b;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(59, 130, 246, 0.45);

  --topbar-bg: rgba(15, 23, 42, 0.75);
  --topbar-border: rgba(255, 255, 255, 0.08);

  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #475569;
  --shadow-sm: 0 4px 12px -2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 24px -6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family:
    "Outfit",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--text);
  background-color: var(--bg-color);
  background-image:
    radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 0) 0, transparent 50%),
    radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 0) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 0) 0, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Animated Mesh Gradient Background */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: -1;
  background:
    radial-gradient(
      circle at 15% 50%,
      rgba(147, 197, 253, 0.5),
      transparent 35%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(96, 165, 250, 0.4),
      transparent 35%
    ),
    radial-gradient(
      circle at 50% 80%,
      rgba(167, 139, 250, 0.2),
      transparent 35%
    );
  animation: drift 20s infinite alternate ease-in-out;
}

@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(2%, 3%) scale(1.05);
  }
  100% {
    transform: translate(-2%, -3%) scale(1);
  }
}

.num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ============================================================
     Top bar
     ============================================================ */
.topbar {
  /*position: sticky;*/
  top: 0;
  z-index: 40;
}
.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 86px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: auto;
}
.brand-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  /* box-shadow: 0 4px 12px rgba(0,0,0,0.05); */
  transition: transform 0.3s var(--ease);
}

.brand h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.brand p {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.search {
  position: relative;
  flex: 1 1 240px;
  max-width: 380px;
}
.search input {
  width: 100%;
  border: 1.5px solid var(--accent-soft);
  background: var(--surface);
  backdrop-filter: blur(8px);
  padding: 12px 16px 12px 44px;
  border-radius: 999px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  color: var(--text);
  transition: all 0.3s var(--ease);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}
.search input::placeholder {
  color: var(--muted-2);
  font-weight: 400;
}
.search input:focus {
  background: var(--surface-solid);
  border-color: var(--accent-soft);
  box-shadow:
    0 0 0 4px rgba(139, 92, 246, 0.15),
    0 8px 16px -4px rgba(30, 41, 59, 0.05);
}
.search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  transition: color 0.3s ease;
}
.search input:focus + svg,
.search input:focus ~ svg {
  color: var(--accent-deep);
}

/* ============================================================
     Salary balance hero card
     ============================================================ */
.hero-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 24px 0;
  display: flex;
  justify-content: center;
}
.hero-card {
  width: 100%;
  max-width: 560px;
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: #fff;
  box-shadow: 0 20px 40px -12px rgba(99, 102, 241, 0.45);
  transition: all 0.3s var(--ease);
}
.hero-card.is-source {
  opacity: 0.85;
}
.hero-top {
  display: flex;
  align-items: center;
  gap: 20px;
}
.hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.hero-info {
  display: flex;
  flex-direction: column;
  margin-right: auto;
}
.hero-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.85;
}
.hero-amt-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-amt {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-edit-btn {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
}
.hero-edit-btn:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: scale(1.08);
}
.hero-stats {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-stat strong {
  font-size: 18px;
  font-weight: 800;
}
.hero-stat span {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.hero-drag {
  width: 100%;
  border: 1.5px dashed rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: grab;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  transition: all 0.3s var(--ease);
  user-select: none;
}
.hero-drag:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}
.hero-drag.dragging {
  cursor: grabbing;
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.28);
}
.hero-drag .emoji {
  display: flex;
  transition: transform 0.3s var(--ease);
}
.hero-drag:hover .emoji {
  transform: translateX(3px) rotate(-10deg) scale(1.1);
}
body.is-dragging,
body.is-dragging * {
  cursor: grabbing !important;
}

.theme-toggle {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-sm);
  margin-left: 8px;
}
.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.theme-toggle .sun-icon {
  display: none;
}
[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}
[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border-radius: 999px;
  transition: all 0.3s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn:hover::after {
  opacity: 1;
}
.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  color: #fff;
  padding: 12px 22px;
  font-size: 15px;
  box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(99, 102, 241, 0.6);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
  padding: 12px 22px;
  font-size: 15px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  background: transparent;
  color: var(--accent-deep);
  padding: 12px 22px;
  font-size: 15px;
  border: 1.5px solid var(--accent);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
  border-color: var(--accent-deep);
}

/* Layout */
.layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-label h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.section-label .hint {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* People board */
.board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  padding: 24px 12px;
}

.board::-webkit-scrollbar {
  width: 6px;
}
.board::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 99px;
}
.board::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

.card {
  position: relative;
  background: var(--surface-solid);
  border: none;
  box-shadow: var(--shadow-sm);
  border-radius: 28px;
  padding: 28px;
  transition: all 0.4s var(--ease);
  will-change: transform;
}

/* Drop-target glow (dragging the salary handle over a category) */
.card.drop-ready {
  box-shadow: var(--glow);
  transform: translateY(-4px) scale(1.03);
  background: rgba(255, 255, 255, 0.9);
}
.card.drop-ready::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(
    120% 120% at 50% 0%,
    rgba(139, 92, 246, 0.15),
    transparent 60%
  );
  pointer-events: none;
  animation: pulseGlow 1.5s infinite alternate ease-in-out;
}
@keyframes pulseGlow {
  0% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

.card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
.card-name {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}
.card-meta {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}

.balance-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.balance-amt {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.balance-cap {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-delete {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  background: var(--surface-solid);
  border: none;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s var(--ease);
}
.card-delete:hover {
  color: #fff;
  background: var(--bad);
  transform: scale(1.08);
}

/* Add-expense button */
.money {
  margin-top: 24px;
  width: 100%;
  border: 1.5px dashed rgba(139, 92, 246, 0.4);
  background: transparent;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  color: #6366f1;
  font-family: inherit;
  transition: all 0.3s var(--ease);
  user-select: none;
  position: relative;
  z-index: 1;
}
.money:hover {
  background: rgba(139, 92, 246, 0.05);
  border-color: #8b5cf6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.05);
}
.money .emoji {
  font-size: 20px;
  transition: transform 0.3s var(--ease);
}
.money:hover .emoji {
  transform: translateX(3px) rotate(-10deg) scale(1.1);
}

/* ============================================================
     Transaction history
     ============================================================ */
.history {
  position: sticky;
  top: 100px;
  background: var(--surface-solid);
  border-radius: 24px;
  padding: 32px 24px;
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
}
.history .section-label h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}
.history .section-label .hint {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.export-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.icon-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  background: rgba(139, 92, 246, 0.04);
  color: #6366f1;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.icon-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: #8b5cf6;
  transform: translateY(-1px);
}

.history-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}
.history-list::-webkit-scrollbar {
  width: 6px;
}
.history-list::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 99px;
}
.history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

.tx-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--bg-color);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  animation: slideIn 0.5s var(--ease);
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.tx-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}
.tx-item .arrow-ico {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  flex-shrink: 0;
  background: var(--surface-solid);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 18px;
}
.tx-body {
  flex: 1;
  min-width: 0;
}
.tx-route {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-route b {
  color: var(--text);
  font-weight: 800;
}
.tx-time {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}
.tx-amt {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 50px 10px;
  line-height: 1.6;
}
.empty .big {
  font-size: 36px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.8;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ============================================================
     Floating drag preview + flying coins
     ============================================================ */
#drag-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transform: translate(-9999px, -9999px);
  transition: opacity 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 48px -12px rgba(109, 40, 217, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-weight: 800;
  color: var(--accent-deep);
  font-size: 15px;
}
#drag-preview .pe {
  display: flex;
  animation: wob 0.6s ease-in-out infinite;
}
@keyframes wob {
  0%,
  100% {
    transform: rotate(-10deg) scale(1);
  }
  50% {
    transform: rotate(10deg) scale(1.1);
  }
}

.coin {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 190;
  pointer-events: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: radial-gradient(circle at 30% 30%, #fffbe0, #fbbf24 60%, #d97706);
  box-shadow:
    0 8px 16px -4px rgba(217, 119, 6, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.8);
  transform-origin: center;
}

/* ============================================================
     Modal
     ============================================================ */
.close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s var(--ease);
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 50%;
}
.close-btn:hover {
  color: var(--text);
  background: rgba(128, 128, 128, 0.1);
}
.features-list {
  padding-left: 20px;
  margin: 0 0 24px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
.features-list li {
  margin-bottom: 12px;
}
.features-list strong {
  color: var(--text);
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s var(--ease),
    visibility 0.3s;
}
.overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  width: 100%;
  max-width: 640px;
  background: var(--surface-solid);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  transform: translateY(24px) scale(0.95);
  opacity: 0;
  transition:
    transform 0.4s var(--ease),
    opacity 0.4s var(--ease);
}
.overlay.open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.modal.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes shake {
  10%,
  90% {
    transform: translateX(-2px);
  }
  20%,
  80% {
    transform: translateX(4px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-8px);
  }
  40%,
  60% {
    transform: translateX(8px);
  }
}
.modal h3 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.modal .sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 32px;
  font-weight: 500;
}

.field {
  margin-bottom: 24px;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.input-wrap {
  position: relative;
}
.input-wrap .cur {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  font-weight: 800;
  font-size: 18px;
}
.field input {
  width: 100%;
  border: 1.5px solid transparent;
  background: var(--bg-color);
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  outline: none;
  transition: all 0.3s var(--ease);
}
.field input.with-cur {
  padding-left: 44px;
  font-size: 18px;
}
.field input:focus {
  border-color: var(--accent);
  background: var(--surface-solid);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}
.field select {
  width: 100%;
  border: 1.5px solid transparent;
  background: var(--bg-color);
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.field select:focus {
  border-color: var(--accent);
  background: var(--surface-solid);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.form-error {
  font-size: 13.5px;
  color: var(--bad);
  font-weight: 600;
  min-height: 18px;
  margin: -6px 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-actions {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}
.modal-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 16px;
  font-size: 16px;
}
.modal-actions .btn-ghost {
  background: #ffffff;
  border: none;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.modal-actions .btn-primary {
  background: #7c3aed;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  border: none;
}

.quick-amts {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.quick-amts button {
  flex: 1;
  border: 1px solid rgba(139, 92, 246, 0.15);
  background: rgba(139, 92, 246, 0.04);
  cursor: pointer;
  border-radius: 999px;
  padding: 12px;
  font-size: 15px;
  font-weight: 800;
  color: #6366f1;
  font-family: inherit;
  transition: all 0.2s var(--ease);
}
.quick-amts button:hover {
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.1);
  border-color: #8b5cf6;
}

/* ============================================================
     Toast
     ============================================================ */
#toasts {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  padding: 14px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: toastIn 0.5s var(--ease);
}
.toast.error {
  background: rgba(225, 29, 72, 0.95);
}
.toast .dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.2);
}
.toast.leaving {
  animation: toastOut 0.4s var(--ease) forwards;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
