:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 3.9%;
  --primary: 0 0% 9%;
  --primary-foreground: 0 0% 98%;
  --secondary: 0 0% 96.1%;
  --secondary-foreground: 0 0% 9%;
  --muted: 0 0% 96.1%;
  --muted-foreground: 0 0% 45.1%;
  --accent: 0 0% 96.1%;
  --accent-foreground: 0 0% 9%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 0 0% 89.8%;
  --input: 0 0% 89.8%;
  --ring: 0 0% 3.9%;
  --radius: 0.5rem;
}

html {
  scroll-behavior: smooth;
}

/* Smooth section scroll offset for sticky header */
section[id] {
  scroll-margin-top: 80px;
}

body {
  margin: 0;
  background: #ffffff;
  color: #0f172a;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Focus states */
*:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

svg.icon {
  display: inline-block;
  vertical-align: middle;
}

/* Toast notifications */
#toast-viewport {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  width: 100%;
  max-width: 420px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  overflow: hidden;
  border-radius: 0.375rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  padding: 1rem 1.5rem 1rem 1rem;
  animation: toast-in 0.25s ease-out;
}

.toast.destructive {
  border-color: #dc2626;
  background: #dc2626;
  color: #fef2f2;
}

.toast.closing {
  animation: toast-out 0.2s ease-in forwards;
}

.toast-close {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  border-radius: 0.375rem;
  padding: 0.25rem;
  color: rgb(15 23 42 / 0.5);
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 0;
}
.toast-close:hover {
  color: #0f172a;
}
.toast.destructive .toast-close {
  color: rgb(254 242 242 / 0.7);
}
.toast.destructive .toast-close:hover {
  color: #fef2f2;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
}
.toast-description {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-top: 0.125rem;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}
