:root {
    --background: 0 0% 100%;
    --foreground: 0 0% 20%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 20%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 20%;
    --primary: 47 100% 50%;
    --primary-foreground: 0 0% 20%;
    --secondary: 188 100% 50%;
    --secondary-foreground: 0 0% 100%;
    --muted: 0 0% 90%;
    --muted-foreground: 0 0% 50%;
    --accent: 188 100% 50%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 0 0% 85%;
    --input: 0 0% 95%;
    --ring: 47 100% 50%;
    --radius: 0.25rem;
}

.dark {
    --background: 0 0% 15%;
    --foreground: 0 0% 95%;
    --card: 0 0% 20%;
    --card-foreground: 0 0% 95%;
    --popover: 0 0% 20%;
    --popover-foreground: 0 0% 95%;
    --primary: 47 100% 50%;
    --primary-foreground: 0 0% 20%;
    --secondary: 188 100% 50%;
    --secondary-foreground: 0 0% 100%;
    --muted: 0 0% 30%;
    --muted-foreground: 0 0% 70%;
    --accent: 188 100% 50%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 95%;
    --border: 0 0% 25%;
    --input: 0 0% 25%;
    --ring: 47 100% 50%;
}

* {
    box-sizing: border-box;
    border-color: hsl(var(--border));
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
}

body {
    min-height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

p, span, li, h1, h2, h3, h4, h5, h6, a, button, label, td, th {
    overflow-wrap: anywhere;
    word-break: break-word;
}

pre, code {
    overflow-x: auto;
    white-space: pre;
}

/* Gradient utilities */
.bg-gradient-to-br {
    background: linear-gradient(to bottom right, hsl(var(--background)), hsl(var(--muted)));
}

.bg-gradient-to-r {
    background: linear-gradient(to right, hsl(var(--primary)), hsla(var(--primary), 0.9));
}

.from-primary {
    --tw-gradient-from: hsl(var(--primary));
}

.to-primary-90 {
    --tw-gradient-to: hsla(var(--primary), 0.9);
}

.from-gray-50 {
    --tw-gradient-from: rgb(249, 250, 251);
}

.to-gray-100 {
    --tw-gradient-to: rgb(243, 244, 246);
}

/* Color utilities */
.bg-white {
    background-color: white;
}

.bg-primary {
    background-color: hsl(var(--primary));
}

.bg-secondary {
    background-color: hsl(var(--secondary));
}

.bg-gray-50 {
    background-color: rgb(249, 250, 251);
}

.bg-gray-100 {
    background-color: rgb(243, 244, 246);
}

.bg-primary-foreground {
    background-color: hsl(var(--primary-foreground));
}

.bg-secondary-foreground {
    background-color: hsl(var(--secondary-foreground));
}

.text-primary-foreground {
    color: hsl(var(--primary-foreground));
}

.text-primary {
    color: hsl(var(--primary));
}

.text-secondary-foreground {
    color: hsl(var(--secondary-foreground));
}

.text-gray-700 {
    color: rgb(55, 65, 81);
}

.text-gray-800 {
    color: rgb(31, 41, 55);
}

/* Border utilities */
.border {
    border: 1px solid hsl(var(--border));
}

.border-t {
    border-top: 1px solid hsl(var(--border));
}

.border-b {
    border-bottom: 1px solid hsl(var(--border));
}

.border-primary-20 {
    border-color: hsla(var(--primary), 0.2);
}

.border-gray-200 {
    border-color: rgb(229, 231, 235);
}

.border-gray-300 {
    border-color: rgb(209, 213, 219);
}

/* Spacing utilities */
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.ml-auto {
    margin-left: auto;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-5 {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-7 {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-10 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.pt-8 {
    padding-top: 2rem;
}

.p-6 {
    padding: 1.5rem;
}

/* Rounded corners */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

/* Flexbox utilities */
.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-baseline {
    align-items: baseline;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.flex-1 {
    flex: 1 1 0%;
}

.inline-flex {
    display: inline-flex;
}

/* Grid utilities */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.min-w-min {
    min-width: min-content;
}

/* Shadow and border */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.hover\:shadow-lg:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Overflow utilities */
.overflow-x-auto {
    overflow-x: auto;
    overflow-y: hidden;
}

.overflow-hidden {
    overflow: hidden;
}

/* Button styles */
button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.2s ease;
}

button:hover {
    opacity: 0.9;
}

.bg-primary {
    color: hsl(var(--primary-foreground));
}

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

.bg-secondary:hover {
    background-color: hsla(var(--secondary), 0.9);
}

.bg-primary-90 {
    background-color: hsla(var(--primary), 0.9);
}

.bg-secondary-90 {
    background-color: hsla(var(--secondary), 0.9);
}

.bg-primary-10 {
    background-color: hsla(var(--primary), 0.1);
}

.bg-red-50 {
    background-color: rgb(254, 242, 242);
}

.bg-gray-100:hover {
    background-color: rgb(243, 244, 246);
}

/* Input styles */
input[type="text"],
input[type="number"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    width: 100%;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    ring: 2px;
    ring-color: hsl(var(--secondary));
    border-color: transparent;
}

/* Typography */
.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Shrink utility */
.shrink-0 {
    flex-shrink: 0;
}

/* Pre/code styles */
pre {
    font-family: monospace;
    line-height: 1.5;
}

.font-mono {
    font-family: monospace;
}

.leading-relaxed {
    line-height: 1.625;
}

.whitespace-pre-wrap {
    white-space: pre-wrap;
}

.break-words {
    word-break: break-word;
}

/* Text color utilities */
.text-gray-600 {
    color: rgb(75, 85, 99);
}

.text-red-500 {
    color: rgb(239, 68, 68);
}

.text-red-700 {
    color: rgb(185, 28, 28);
}

.hover\:text-red-700:hover {
    color: rgb(185, 28, 28);
}

.text-center {
    text-align: center;
}

.text-primary-foreground {
    color: hsl(var(--primary-foreground));
}

/* Toast styles */
#toastContainer {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    background-color: white;
    border: 1px solid hsl(var(--border));
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-color: rgb(34, 197, 94);
    color: rgb(20, 83, 45);
}

.toast.error {
    border-color: rgb(239, 68, 68);
    color: rgb(127, 29, 29);
}

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

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.fade-out {
    animation: slideOut 0.3s ease-out forwards;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .sm\:py-7 {
        padding-top: 1.75rem;
        padding-bottom: 1.75rem;
    }

    .sm\:py-10 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .sm\:p-8 {
        padding: 2rem;
    }

    .sm\:text-3xl {
        font-size: 1.875rem;
    }

    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 640px) {
    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .sm\:py-7 {
        padding-top: 1.75rem;
        padding-bottom: 1.75rem;
    }

    .sm\:py-10 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .sm\:p-8 {
        padding: 2rem;
    }

    .sm\:text-3xl {
        font-size: 1.875rem;
    }

    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.max-w-7xl {
    max-width: 80rem;
}

.transition-all {
    transition: all 0.2s ease;
}

.transition-opacity {
    transition: opacity 0.2s ease;
}

.transition-colors {
    transition: color 0.2s ease, background-color 0.2s ease;
}

.mt-1 {
    margin-top: 0.25rem;
}

.text-xs {
    font-size: 0.75rem;
}

.z-50 {
    z-index: 50;
}
