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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f4f8;
  color: #334155;
  min-height: 100vh;
  transition: background 0.4s ease;
}

body.bd-mist        { background: #f0f4f8; }
body.bd-lavender    { background: linear-gradient(135deg, #e0e7ff, #f3e8ff); }
body.bd-sunset      { background: linear-gradient(135deg, #fde68a, #fca5a5, #c4b5fd); }
body.bd-ocean       { background: linear-gradient(135deg, #a5f3fc, #6ee7b7); }
body.bd-midnight    { background: linear-gradient(135deg, #1e293b, #334155); color: #e2e8f0; }
body.bd-rose        { background: linear-gradient(135deg, #ffe4e6, #fecdd3); }
body.bd-forest      { background: linear-gradient(135deg, #d1fae5, #a7f3d0, #6ee7b7); }
body.bd-slate       { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); }
body.bd-aurora      { background: linear-gradient(135deg, #a78bfa, #06b6d4, #34d399); }
body.bd-peach       { background: linear-gradient(135deg, #fed7aa, #fca5a5); }
body.bd-storm       { background: linear-gradient(135deg, #475569, #64748b, #475569); color: #e2e8f0; }
body.bd-candy       { background: linear-gradient(135deg, #f9a8d4, #c084fc, #818cf8); }
body.bd-sahara      { background: linear-gradient(135deg, #fde68a, #d97706, #92400e); color: #e2e8f0; }
body.bd-arctic      { background: linear-gradient(135deg, #e0f2fe, #bae6fd, #7dd3fc); }
body.bd-berry       { background: linear-gradient(135deg, #831843, #be185d, #e11d48); color: #e2e8f0; }
body.bd-moss        { background: linear-gradient(135deg, #365314, #4d7c0f, #65a30d); color: #e2e8f0; }

/* Dark backdrop overrides */
body.bd-midnight header h1,
body.bd-midnight h2,
body.bd-midnight .goal-name,
body.bd-midnight .summary-value,
body.bd-storm header h1,
body.bd-storm h2,
body.bd-storm .goal-name,
body.bd-storm .summary-value,
body.bd-sahara header h1,
body.bd-sahara h2,
body.bd-sahara .goal-name,
body.bd-sahara .summary-value,
body.bd-berry header h1,
body.bd-berry h2,
body.bd-berry .goal-name,
body.bd-berry .summary-value,
body.bd-moss header h1,
body.bd-moss h2,
body.bd-moss .goal-name,
body.bd-moss .summary-value { color: #f1f5f9; }

body.bd-midnight .subtitle,
body.bd-midnight .goal-date,
body.bd-midnight .goal-percent,
body.bd-midnight .account-select-group label,
body.bd-storm .subtitle,
body.bd-storm .goal-date,
body.bd-storm .goal-percent,
body.bd-storm .account-select-group label,
body.bd-sahara .subtitle,
body.bd-sahara .goal-date,
body.bd-sahara .goal-percent,
body.bd-sahara .account-select-group label,
body.bd-berry .subtitle,
body.bd-berry .goal-date,
body.bd-berry .goal-percent,
body.bd-berry .account-select-group label,
body.bd-moss .subtitle,
body.bd-moss .goal-date,
body.bd-moss .goal-percent,
body.bd-moss .account-select-group label { color: #cbd5e1; }

.app {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2rem;
  color: #1e293b;
}

.subtitle {
  color: #64748b;
  margin-top: 0.25rem;
}

/* Personalize Bar */
.personalize-bar {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.picker-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.picker-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

/* Backdrop Picker */
.backdrop-picker {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Font Picker */
.font-picker {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

.font-btn {
  padding: 0.3rem 0.65rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.3;
}

.font-btn:hover {
  border-color: #a5b4fc;
  color: #6366f1;
}

.font-btn.active {
  border-color: #6366f1;
  background: #eef2ff;
  color: #6366f1;
}

/* Font families applied to body */
body.font-system   { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body.font-inter    { font-family: 'Inter', sans-serif; }
body.font-nunito   { font-family: 'Nunito', sans-serif; }
body.font-quicksand { font-family: 'Quicksand', sans-serif; }
body.font-merriweather { font-family: 'Merriweather', Georgia, serif; }
body.font-playfair { font-family: 'Playfair Display', Georgia, serif; }
body.font-mono     { font-family: 'Space Mono', 'Courier New', monospace; }

.backdrop-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
  position: relative;
}

.backdrop-swatch:hover {
  transform: scale(1.2);
}

.backdrop-swatch.active {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.backdrop-swatch[title]::after {
  content: attr(title);
  position: absolute;
  bottom: -1.6rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: #64748b;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.backdrop-swatch:hover::after {
  opacity: 1;
}

h2 {
  font-size: 1.25rem;
  color: #1e293b;
  margin-bottom: 1rem;
}

/* Account Bar */
.account-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.account-select-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.account-select-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #475569;
  white-space: nowrap;
}

.account-select-group select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: #1e293b;
  min-width: 160px;
  cursor: pointer;
}

.account-select-group select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-outline {
  background: #fff;
  color: #6366f1;
  border: 1px solid #c7d2fe;
}

.btn-outline:hover {
  background: #eef2ff;
}

.btn-delete-account {
  background: none;
  color: #94a3b8;
  font-size: 1.2rem;
  padding: 0.3rem 0.5rem;
}

.btn-delete-account:hover {
  color: #ef4444;
}

/* Account Summary */
.account-summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-card {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.summary-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.summary-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
}

.summary-value.green {
  color: #10b981;
}

.summary-value.indigo {
  color: #6366f1;
}

/* Forms */
.new-goal-section {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #475569;
}

.form-group input {
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn {
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #6366f1;
  color: #fff;
}

.btn-primary:hover {
  background: #4f46e5;
}

.btn-small {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-add {
  background: #10b981;
  color: #fff;
}

.btn-add:hover {
  background: #059669;
}

.btn-delete {
  background: none;
  color: #94a3b8;
  padding: 0.4rem 0.6rem;
}

.btn-delete:hover {
  color: #ef4444;
}

/* Goals */
.goals-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.empty-state {
  text-align: center;
  color: #94a3b8;
  padding: 3rem 1rem;
  font-size: 1.05rem;
}

.goal-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s;
}

.goal-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.goal-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
}

.goal-date {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.goal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.goal-amounts {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.goal-saved {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6366f1;
}

.goal-target {
  font-size: 0.95rem;
  color: #94a3b8;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  transition: width 0.5s ease;
}

.progress-fill.complete {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.goal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.goal-percent {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

.goal-per-week {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f59e0b;
  background: #fffbeb;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  text-align: center;
}

.goal-per-week.overdue {
  color: #ef4444;
  background: #fef2f2;
}

.goal-complete-badge {
  display: inline-block;
  background: #d1fae5;
  color: #059669;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.modal h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #1e293b;
}

.modal .form-group {
  margin-bottom: 1rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #475569;
}

.history-section {
  margin-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

.history-section h4 {
  font-size: 0.95rem;
  color: #475569;
  margin-bottom: 0.75rem;
}

.history-section ul {
  list-style: none;
}

.history-section li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.history-amount {
  font-weight: 600;
  color: #10b981;
}

.history-note {
  color: #94a3b8;
  font-size: 0.8rem;
}

.history-date {
  color: #94a3b8;
  font-size: 0.8rem;
}

.history-delete {
  background: none;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.25rem;
}

.history-delete:hover {
  color: #ef4444;
}

.history-empty {
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.5rem 0;
}

/* Data Export/Import */
.data-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.data-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.import-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

/* AI Earnings Advisor */
.ai-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45), 0 0 0 0 rgba(139, 92, 246, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  z-index: 90;
}

.ai-fab:hover {
  transform: scale(1.12) rotate(-5deg);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.55);
}

.ai-fab:active {
  transform: scale(0.95);
}

.ai-fab.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  transform: rotate(0deg);
}

.ai-fab-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.5);
  animation: ai-pulse-ring 2.5s ease-out infinite;
  pointer-events: none;
}

.ai-fab.active .ai-fab-pulse {
  display: none;
}

@keyframes ai-pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Panel */
.ai-panel {
  position: fixed;
  bottom: 6rem;
  right: 1.5rem;
  width: 400px;
  max-height: 540px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 95;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ai-slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-panel.hidden {
  display: none;
}

@keyframes ai-slide-up {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.ai-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
  color: #fff;
}

.ai-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.ai-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-panel-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
  letter-spacing: -0.01em;
}

.ai-panel-subtitle {
  font-size: 0.65rem;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

.ai-panel-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  line-height: 1;
  padding: 0.35rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.ai-panel-close:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Chat Body */
.ai-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 200px;
  max-height: 360px;
  background: #f8fafc;
}

.ai-panel-body::-webkit-scrollbar {
  width: 5px;
}

.ai-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.ai-panel-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

/* Messages */
.ai-msg {
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  font-size: 0.83rem;
  line-height: 1.55;
  animation: ai-fade-in 0.35s ease-out;
  max-width: 95%;
}

@keyframes ai-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-msg.agent {
  background: #fff;
  color: #334155;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
}

.ai-msg.user {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  font-weight: 600;
  max-width: 80%;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.ai-msg h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #6366f1;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ai-msg p {
  margin-bottom: 0.4rem;
}

.ai-msg p:last-child {
  margin-bottom: 0;
}

.ai-msg ul {
  margin: 0.35rem 0 0.25rem 0;
  padding-left: 1.05rem;
}

.ai-msg li {
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

.ai-msg .earn-amount {
  display: inline-block;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #047857;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  margin-left: 0.2rem;
  letter-spacing: -0.01em;
}

.ai-msg .urgency-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.ai-msg .urgency-tag.urgent {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.ai-msg .urgency-tag.moderate {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.ai-msg .urgency-tag.relaxed {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.ai-msg .goal-analysis {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #6366f1;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.45rem;
}

.ai-msg .goal-analysis-name {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.8rem;
}

.ai-msg .goal-analysis-detail {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.15rem;
}

/* Input Area */
.ai-panel-input-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.ai-panel-input-area input[type="text"] {
  flex: 1;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  font-size: 0.83rem;
  background: #f8fafc;
  color: #334155;
  min-width: 0;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ai-panel-input-area input[type="text"]:focus {
  outline: none;
  border-color: #818cf8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ai-panel-input-area input[type="text"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.ai-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 12px rgba(99, 102, 241, 0.4);
}

.ai-send-btn:active {
  transform: scale(0.95);
}

.ai-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Typing Indicator */
.ai-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.75rem 1rem;
  background: #fff;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
}

.ai-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a5b4fc;
  animation: ai-bounce 1.4s ease-in-out infinite;
}

.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Responsive */
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
  }

  .goal-amounts {
    flex-direction: column;
    gap: 0.15rem;
  }

  .goal-saved {
    font-size: 1.3rem;
  }

  .account-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .account-select-group select {
    flex: 1;
    min-width: 0;
  }

  .account-actions {
    justify-content: flex-end;
  }

  .account-summary {
    flex-direction: column;
    gap: 0.5rem;
  }

  .personalize-bar {
    gap: 1.25rem;
  }

  .ai-panel {
    right: 0.5rem;
    left: 0.5rem;
    bottom: 5.5rem;
    width: auto;
    max-height: 70vh;
    border-radius: 16px;
  }

  .ai-fab {
    bottom: 1rem;
    right: 1rem;
    width: 52px;
    height: 52px;
  }

  .ai-panel-body {
    max-height: 50vh;
  }
}
