@font-face {
  font-family: 'Aeonik Bold';
  src: url('/fonts/aeonik-bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Aeonik';
  src: url('/fonts/aeonik-regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Aeonik Air';
  src: url('/fonts/aeonik-air.ttf') format('truetype');
}
@font-face {
  font-family: 'Aeonik Light';
  src: url('/fonts/aeonik-light.ttf') format('truetype');
}
@font-face {
  font-family: 'Aeonik Black';
  src: url('/fonts/aeonik-black.ttf') format('truetype');
}
@font-face {
  font-family: 'Aeonik Medium';
  src: url('/fonts/aeonik-medium.ttf') format('truetype');
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body,
html {
  font-family: 'Plus Jakarta Sans', 'Inter', Aeonik, 'Aeonik Bold', 'Helvetica Neue', Helvetica, Arial, Roboto, sans-serif;
  height: 100vh;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  background: #f8fafc;
  color: #0f172a;
}
.password-strength {
  display: none;
  margin-top: 0.375rem;
}
.password-strength-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}
.password-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.password-strength-fill.strength-weak {
  background-color: #dc2626;
}
.password-strength-fill.strength-good {
  background-color: #d97706;
}
.password-strength-fill.strength-strong {
  background-color: #059669;
}
.password-strength-text {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: #5e6b7a;
}
.setup-gate-blurred,
.wallet-gate-blurred {
  filter: blur(4px);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}
page-gate:not([data-ready]) {
  visibility: hidden;
}
.setup-gate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 4rem 1rem;
}
.setup-gate-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 480px;
  width: 100%;
}
.setup-gate-icon {
  font-size: 2.5rem;
  color: #15803d;
  margin-bottom: 1rem;
}
.setup-gate-title {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
}
.setup-gate-desc {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  color: #5e6b7a;
  line-height: 1.5;
}
.setup-gate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  background: #15803d;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 200ms ease;
}
.setup-gate-btn:hover {
  background: #166534;
}
.layout-content {
  position: relative;
}
.scope-toggle {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.25rem;
  gap: 0.25rem;
  margin: 0 0 1.25rem;
  max-width: 100%;
}
.scope-toggle .scope-toggle-btn {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  transition: all 200ms ease;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scope-toggle .scope-toggle-btn:hover:not(.is-active) {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}
.scope-toggle .scope-toggle-btn.is-active {
  background: #15803d;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.scope-toggle .scope-toggle-btn.is-active:hover {
  background: #166534;
  color: #fff;
}
.wallet-gate-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  margin: 0 0 1rem;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #78350f;
}
.wallet-gate-banner .wallet-gate-banner-icon {
  font-size: 1rem;
  color: #b45309;
  flex: 0 0 auto;
}
.wallet-gate-banner .wallet-gate-banner-text {
  flex: 1 1 auto;
}
.wallet-gate-banner .wallet-gate-banner-link {
  color: #b45309;
  font-weight: 600;
  text-decoration: underline;
}
.wallet-gate-banner .wallet-gate-banner-link:hover {
  color: #78350f;
}
.connection-error-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.connection-error-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  max-width: 26rem;
  width: 90%;
  padding: 2.5rem;
  text-align: center;
}
.connection-error-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.connection-error-icon i {
  font-size: 1.5rem;
  color: #dc2626;
}
.connection-error-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
}
.connection-error-desc {
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}
.connection-error-retry {
  width: 100%;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #15803d;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  gap: 1rem;
  color: #475569;
  font-size: 0.875rem;
}
.page-loading p {
  margin: 0;
}
.page-loading--inline {
  padding: 2rem 0;
  gap: 0.75rem;
}
.copy-popup {
  position: absolute;
  z-index: 1100;
  transform: translate(-50%, calc(-100% - 0.5rem));
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: #0f172a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.copy-popup--visible {
  opacity: 1;
}
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10001;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  max-width: 26rem;
  pointer-events: none;
}
#toast-container--alert {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 26rem;
  max-width: calc(100vw - 2rem);
  pointer-events: none;
}
@media (max-width: 768px) {
  #toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
  #toast-container--alert {
    top: 1rem;
    left: 1rem;
    right: 1rem;
    transform: none;
    width: auto;
    max-width: none;
  }
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(226, 232, 240, 0.4);
  animation: toast-slide-in 0.3s ease;
  cursor: default;
}
.toast--goal_milestone,
.toast--goal_completed {
  border-left-color: #15803d;
}
.toast--deposit_received,
.toast--transfer_completed {
  border-left-color: #15803d;
}
.toast--bank_account_failed,
.toast--transfer_failed {
  border-left-color: #dc2626;
}
.toast--invite_received {
  border-left-color: #2563eb;
}
.toast--error {
  border-left-color: #dc2626;
  background: #fceeee;
}
.toast--error .toast-title {
  color: #b91c1c;
}
.toast--warning {
  border-left-color: #d97706;
  background: #fbf1e6;
}
.toast--success {
  border-left-color: #059669;
}
.toast--info {
  border-left-color: #2563eb;
}
.toast--dismissing {
  animation: toast-slide-out 0.3s ease forwards;
}
.toast-body--clickable {
  cursor: pointer;
}
.toast-body {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.toast-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
}
.toast-message {
  display: block;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.45;
  margin-top: 0.125rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
.toast-time {
  display: block;
  font-size: 0.6875rem;
  color: #5e6b7a;
  margin-top: 0.25rem;
}
.toast-close {
  background: none;
  border: none;
  padding: 0;
  font-size: 1.125rem;
  line-height: 1;
  color: #5e6b7a;
  cursor: pointer;
  transition: color 200ms ease;
  flex-shrink: 0;
}
.toast-close:hover {
  color: #0f172a;
}
@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toast-slide-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(1rem);
  }
}
.field-error,
.form-control.field-error,
.form-input.field-error,
.form-select.field-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}
.field-error:focus,
.form-control.field-error:focus,
.form-input.field-error:focus,
.form-select.field-error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}
.field-error-msg {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: #dc2626;
}
.field-error-msg:empty {
  display: none;
}
.account-conflict-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(2px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: accountConflictFadeIn 0.15s ease-out;
}
.account-conflict-modal {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  max-width: 420px;
  width: 100%;
  padding: 2rem 1.75rem 1.5rem;
  text-align: center;
  animation: accountConflictPopIn 0.2s ease-out;
}
.account-conflict-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(21, 128, 61, 0.12);
  color: #15803d;
  font-size: 1.5rem;
}
.account-conflict-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
}
.account-conflict-body {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 1.5rem 0;
}
.account-conflict-body strong {
  color: #0f172a;
  font-weight: 600;
}
.account-conflict-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}
.account-conflict-btn {
  flex: 1;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
  font-family: inherit;
  border: 1px solid transparent;
}
.account-conflict-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.account-conflict-btn--cancel {
  background: transparent;
  color: #0f172a;
  border-color: #e2e8f0;
}
.account-conflict-btn--cancel:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #475569;
}
.account-conflict-btn--logout {
  background: #15803d;
  color: #fff;
}
.account-conflict-btn--logout:hover:not(:disabled) {
  background: #166534;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.35);
}
@keyframes accountConflictFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes accountConflictPopIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
