/* Base styles and variables */
:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 3.9%;
  --card: 0 0% 100%;
  --card-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; /* 8px */
}

/* Dark mode variables */
.dark {
  --background: 0 0% 0.98%; /* Deep black background */
  --foreground: 0 0% 98%;
  --card: 0 0% 1.5%; /* Slightly lighter for cards */
  --card-foreground: 0 0% 98%;
  --primary: 0 0% 98%;
  --primary-foreground: 0 0% 9%;
  --secondary: 0 0% 8%; /* Darker secondary */
  --secondary-foreground: 0 0% 98%;
  --muted: 0 0% 8%; /* Darker muted */
  --muted-foreground: 0 0% 63.9%;
  --accent: 0 0% 8%; /* Darker accent */
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --border: 0 0% 8%; /* Darker border */
  --input: 0 0% 8%; /* Darker input */
  --ring: 0 0% 83.1%;
}

/* General styles */
body {
  font-family: "Inter", Arial, Helvetica, sans-serif;
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

/* Utility classes */
.min-h-screen {
  min-height: 100vh;
}
.bg-background {
  background-color: hsl(var(--background));
}
.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.p-4 {
  padding: 1rem; /* 16px */
}
.w-full {
  width: 100%;
}
.max-w-md {
  max-width: 28rem; /* 448px */
}
.text-center {
  text-align: center;
}
.mb-4 {
  margin-bottom: 1rem;
}
.p-3 {
  padding: 0.75rem; /* 12px */
}
.bg-primary-10 {
  background-color: hsla(var(--primary), 0.1); /* Primary with 10% opacity */
}
.rounded-full {
  border-radius: 9999px;
}
.h-8 {
  height: 2rem;
}
.w-8 {
  width: 2rem;
}
.text-primary {
  color: hsl(var(--primary));
}
.text-2xl {
  font-size: 1.5rem; /* 24px */
  line-height: 2rem;
}
.font-bold {
  font-weight: 700;
}
.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}
.card-content {
  padding: 1.5rem; /* 24px */
}
.space-y-4 > *:not(:first-child) {
  margin-top: 1rem;
}
.rounded-lg {
  border-radius: var(--radius);
}
.border {
  border-width: 1px;
  border-color: hsl(var(--border));
}
.text-lg {
  font-size: 1.125rem; /* 18px */
  line-height: 1.75rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.text-green-500 {
  color: hsl(142.1 76.2% 36.3%); /* A green from shadcn */
}
.text-amber-500 {
  color: hsl(36 100% 50%); /* A yellow/amber from shadcn */
}
.text-xs {
  font-size: 0.75rem; /* 12px */
  line-height: 1rem;
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-4 {
  margin-top: 1rem;
}
.space-y-3 > *:not(:first-child) {
  margin-top: 0.75rem;
}
.text-sm {
  font-size: 0.875rem; /* 14px */
  line-height: 1.25rem;
}
.font-medium {
  font-weight: 500;
}
.space-x-2 > *:not(:first-child) {
  margin-left: 0.5rem;
}
.h-4 {
  height: 1rem;
}
.w-4 {
  width: 1rem;
}
.animate-spin {
  animation: spin 1s linear infinite;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.mb-4 {
  margin-bottom: 1rem;
}
.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.hidden {
  display: none;
}
.block {
  display: block;
}
.relative {
  position: relative;
}
.z-10 {
  z-index: 10;
}
.z-50 {
  z-index: 50;
}
.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.absolute {
  position: absolute;
}
.bg-black-50 {
  background-color: rgba(0, 0, 0, 0.5);
}
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}
.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.h-12 {
  height: 3rem;
}
.w-12 {
  width: 3rem;
}
.min-h-\[65px\] {
  min-height: 65px;
}
.text-destructive {
  color: hsl(var(--destructive));
}

/* Custom Card styles */
.card {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
}

/* Custom Button styles */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: 0.875rem; /* text-sm */
  font-weight: 500; /* font-medium */
  height: 2.5rem; /* h-10 */
  padding: 0 1rem; /* px-4 py-2 */
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: 1px solid hsl(var(--primary));
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.button:hover {
  background-color: hsla(var(--primary), 0.9);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-sm {
  height: 2rem; /* h-8 */
  padding: 0 0.75rem; /* px-3 */
  font-size: 0.8125rem; /* text-sm */
}

/* Custom Input styles */
.input {
  display: flex;
  height: 2.5rem; /* h-10 */
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  padding: 0 0.75rem; /* px-3 py-2 */
  font-size: 0.875rem; /* text-sm */
  color: hsl(var(--foreground));
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder {
  color: hsl(var(--muted-foreground));
}

.input:focus-visible {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsla(var(--ring), 0.2);
}

.input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Keyframes */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Toast styles */
#toast-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none; /* Allow clicks to pass through */
}

.toast {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  min-width: 250px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  pointer-events: auto; /* Re-enable clicks for the toast itself */
  animation: slideIn 0.3s ease-out forwards;
}

.toast.success {
  border-left: 4px solid hsl(142.1 76.2% 36.3%); /* Green */
}

.toast.error {
  border-left: 4px solid hsl(0 84.2% 60.2%); /* Destructive red */
}

.toast-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.toast-description {
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
