:root {
    --background: 0 0% 3.9%;
    --foreground: 0 0% 98%;
    --card: 0 0% 3.9%;
    --card-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 14.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 0 0% 14.9%;
    --muted-foreground: 0 0% 63.9%;
    --accent: 0 0% 14.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 14.9%;
    --radius: 0.5rem;
    --ring: 0 0% 83.1%;
    --input: 0 0% 14.9%;
}

* { box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: hsl(var(--background)); color: hsl(var(--foreground)); margin: 0; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }

nav { border-bottom: 1px solid hsl(var(--border)); background-color: hsl(var(--background) / 0.8); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 50; }
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; height: 64px; align-items: center; padding: 0 24px; justify-content: space-between; }
.nav-left { display: flex; align-items: center; gap: 32px; }
.logo { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; color: inherit; }
.nav-menu { display: flex; gap: 20px; }
.nav-link { font-size: 0.875rem; font-weight: 500; color: hsl(var(--muted-foreground)); text-decoration: none; transition: color 0.2s; cursor: pointer; }
.nav-link:hover, .nav-link.active { color: hsl(var(--foreground)); }

.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); font-size: 0.875rem; font-weight: 600; padding: 10px 20px; cursor: pointer; border: none; transition: opacity 0.2s; background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); text-decoration: none; gap: 8px; }
.btn:hover { opacity: 0.9; }
.btn-secondary { background-color: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); border: 1px solid hsl(var(--border)); }
.btn-destructive { background-color: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }

input.field, select.field, textarea.field { 
    background-color: transparent; 
    border: 1px solid hsl(var(--border)); 
    border-radius: var(--radius); 
    padding: 10px 12px; 
    color: hsl(var(--foreground)); 
    font-size: 0.875rem; 
    outline: none;
    transition: all 0.2s;
}
input.field:focus, select.field:focus, textarea.field:focus { 
    border-color: hsl(var(--ring)); 
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.1);
    background-color: hsl(var(--secondary) / 0.1);
}

.badge { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 9999px; background-color: hsl(var(--secondary)); border: 1px solid hsl(var(--border)); }
.badge.ai-badge { background-color: #8b5cf6; color: white; border-color: #a78bfa; }
.badge.qm-badge { background-color: #f59e0b; color: white; border-color: #fbbf24; }

#toast { position: fixed; bottom: 24px; right: 24px; background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); padding: 12px 20px; border-radius: var(--radius); font-size: 0.875rem; font-weight: 600; display: none; z-index: 100; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5); }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

footer { text-align: center; padding: 48px; font-size: 0.75rem; color: hsl(var(--muted-foreground)); border-top: 1px solid hsl(var(--border)); margin-top: 40px; }
footer a { color: inherit; text-decoration: none; }
