/* ============================================================
   Paycheck Vault — theme
   Palette sampled from the user's reference dashboard photo:
   near-black neutrals, a single blue primary accent, a
   blue-violet gradient pair, muted mint (gains), muted red
   (losses) and a soft gold used only as a rare highlight.
   ============================================================ */

:root {
  --bg-app: #0b0e14;
  --bg-panel: #10141c;
  --bg-card: rgba(20, 25, 36, 0.75);
  --bg-card-solid: #141924;
  --bg-well: #0d1119;

  --border: #232a3a;
  --border-soft: #1b202c;

  --text-primary: #eef1f7;
  --text-secondary: #8891a5;
  --text-muted: #576078;

  --accent-blue: #2f8fe0;
  --accent-blue-light: #5aa8ea;
  --accent-blue-violet: #5b6fce;
  --accent-violet: #6f62b8;

  --accent-mint: #4fd1ae;
  --accent-mint-soft: rgba(79, 209, 174, 0.14);
  --accent-red: #dc4045;
  --accent-red-soft: rgba(220, 64, 69, 0.14);
  --accent-gold: #d3a256;
  --accent-gold-soft: rgba(211, 162, 86, 0.14);
}

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

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  padding-bottom: 90px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.glow-top {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(circle, rgba(47, 143, 224, 0.12) 0%, rgba(11, 14, 20, 0) 70%);
  pointer-events-none;
  z-index: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  margin-bottom: 16px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 20px;
}

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

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #060a11;
  font-size: 16px;
}

.btn-secondary {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.hero-card {
  background: linear-gradient(145deg, rgba(20, 25, 36, 0.95), rgba(20, 25, 36, 0.7));
  border: 1px solid rgba(47, 143, 224, 0.25);
  position: relative;
  overflow: hidden;
}

.hero-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-blue);
}

.hero-amount {
  font-size: 42px;
  font-weight: 900;
  color: var(--text-primary);
  margin: 8px 0 16px 0;
  letter-spacing: -0.02em;
}

.flow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.flow-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flow-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.flow-in { background: var(--accent-mint-soft); color: var(--accent-mint); }
.flow-out { background: var(--accent-red-soft); color: var(--accent-red); }

.sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

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

.bar-container {
  width: 100%;
  height: 10px;
  background: var(--bg-well);
  border: 1px solid var(--border-soft);
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  margin-top: 10px;
}

.legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 11px;
}

.legend-pill {
  background: var(--bg-well);
  border: 1px solid var(--border-soft);
  padding: 4px 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

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

.type-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-well);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 12px;
}

.type-btn {
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.type-btn.active-exp {
  background: var(--accent-red);
  color: #fff;
}

.type-btn.active-inc {
  background: var(--accent-mint);
  color: #06251d;
}

.type-btn.inactive {
  background: transparent;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  background: var(--bg-well);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border 0.15s;
}

.form-input:focus {
  border-color: var(--accent-blue);
}

.chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: var(--bg-well);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.chip.active {
  background: var(--accent-blue);
  color: #060a11;
  border-color: var(--accent-blue);
}

.btn-submit {
  width: 100%;
  background: var(--accent-blue);
  color: #060a11;
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.1s, background 0.15s;
}

.btn-submit:hover { background: var(--accent-blue-light); }
.btn-submit:active { transform: scale(0.98); }

.tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-well);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  margin-bottom: 8px;
}

.tx-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tx-bar {
  width: 4px;
  height: 32px;
  border-radius: 9999px;
}

.del-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  font-size: 13px;
}

.del-btn:hover { color: var(--accent-red); }

nav.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(11, 14, 20, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 20px 20px 0 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  gap: 4px;
}

.nav-item.active { color: var(--accent-blue); }

#statusToast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 60;
}
