@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --color-bg: #FFFFFF;
  --color-surface: #F3F4F6;
  --color-surface-hover: #E5E7EB;
  --color-border: #E5E7EB;
  
  --gradient-brand: linear-gradient(135deg, #8761f6, #377cec, #40c891, #33b7b1, #3495d3);
  --gradient-brand-angle: linear-gradient(135deg, #8761f6, #377cec, #40c891, #33b7b1, #3495d3);
  --color-primary: #377cec;
  --color-primary-dark: #8761f6;
  --color-primary-light: #EFF6FF;
  
  --color-text-primary: #111827;
  --color-text-secondary: #6B7280;
  
  /* Status Colors */
  --status-open: #3B82F6;
  --status-in-progress: #EF4444;
  --status-waiting: #F59E0B;
  --status-closed: #10B981;
  --status-cancelled: #111827;
  
  /* Priority Colors */
  --priority-low: #10B981;
  --priority-medium: #F59E0B;
  --priority-high: #EF4444;
  --priority-critical: #7C3AED;

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
}

/* CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  font-weight: 400;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography utilities */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

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

/* Animation Keyframes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

@keyframes finishwebGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-text-animated {
  background: linear-gradient(90deg, #A855F7, #38BDF8, #A855F7);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: finishwebGradient 3s linear infinite;
}

/* New Utilities */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-8 { width: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.opacity-80 { opacity: 0.8; }

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* ══════════════════════════════════════════════════════════════════════
   DARK MODE CSS VARIABLES — Applied via [data-theme="dark"] on <html>
   Component-level dark overrides are in layout.css
══════════════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  /* Backgrounds */
  --color-bg:            #0F172A;
  --color-bg-secondary:  #1E293B;
  --color-surface:       #1E293B;
  --color-surface-hover: #334155;
  --color-card-bg:       #1E293B;
  --color-card-border:   #334155;
  --color-border:        #334155;
  --color-input-bg:      #0F172A;

  /* Text */
  --color-text:          #F8FAFC;
  --color-text-primary:  #F8FAFC;
  --color-text-secondary:#94A3B8;
  --color-text-muted:    #64748B;

  /* Topbar / Sidebar */
  --color-topbar-bg:     #1E293B;
  --color-topbar-border: #334155;
}

