:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #0ea5e9;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-body: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-sidebar: #1e1b4b;
    
    --text-main: #111827;
    --text-muted: #6b7280;
    --text-light: #e5e7eb;
    
    --border: #e5e7eb;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --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);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
    .col-span-2, .col-span-3 { grid-column: span 1; }
    .sidebar { display: none; }
    .hidden-mobile { display: none; }
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

/* Layout Structure */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    flex-shrink: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #9ca3af;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    margin-bottom: 4px;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Components */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg-body);
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary { background: #e0e7ff; color: var(--primary); }
.badge-success { background: #d1fae5; color: var(--success); }
.badge-warning { background: #fef3c7; color: var(--warning); }
.badge-danger { background: #fee2e2; color: var(--danger); }

/* Inputs */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.875rem; }
.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    font-size: 1rem;
    transition: border-color 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Specific Component Styles */
.stat-card {
    display: flex;
    flex-direction: column;
}
.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin: 8px 0;
    color: var(--text-main);
}
.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}
.progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 4px;
}
.progress-fill.warning { background: var(--warning); }
.progress-fill.primary { background: var(--primary); }

.job-card {
    border-left: 4px solid var(--primary);
}

.chart-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, rgba(243, 244, 246, 0) 0%, rgba(79, 70, 229, 0.05) 100%);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding-bottom: 0;
}

.chart-bar {
    width: 12%;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
    opacity: 0.8;
}
.chart-bar:nth-child(even) { background: var(--secondary); }

.icon {
    width: 20px;
    height: 20px;
    background-color: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    display: inline-block;
}

/* Landing specific */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    padding: 24px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
}

/* Timeline Styles */
.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 40px;
    border-left: 2px solid var(--border);
}
.timeline-item:last-child {
    border-left: 2px solid transparent;
}
.timeline-marker {
    position: absolute;
    left: -11px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--border);
}
.timeline-item.active .timeline-marker {
    border-color: var(--primary);
    background: var(--primary);
}
.timeline-item.future .timeline-marker {
    border-color: var(--accent);
    border-style: dashed;
}

/* Color Utilities */
.bg-yellow-50 { background-color: #fffbeb; }
.border-yellow-100 { border-color: #fcd34d; }

.bg-blue-50 { background-color: #eff6ff; }
.border-blue-100 { border-color: #bfdbfe; }

.bg-green-50 { background-color: #ecfdf5; }
.border-green-100 { border-color: #a7f3d0; }

.bg-red-50 { background-color: #fef2f2; }
.border-red-100 { border-color: #fecaca; }

.bg-indigo-50 { background-color: #eef2ff; }
.border-indigo-100 { border-color: #c7d2fe; }

.rounded { border-radius: var(--radius-sm); }
.border { border-width: 1px; border-style: solid; }
