:root {
    /* Color Palette - Light (Stripe/Linear Inspired) */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-surface: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-color: #4f46e5;
    --accent-hover: #4338ca;
    --accent-light: #e0e7ff;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-surface: #1f2937;
    --border-color: #374151;
    --border-hover: #4b5563;
    
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-color: #6366f1;
    --accent-hover: #818cf8;
    --accent-light: #1e1b4b;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Header & Glassmorphism */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .app-header {
    background: rgba(15, 23, 42, 0.85);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.875rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-badge {
    background: var(--accent-color);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.brand-title {
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

/* View Switcher Controls */
.view-switcher {
    display: flex;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    gap: 2px;
}

.nav-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-btn:hover {
    color: var(--text-primary);
}

.nav-btn.active {
    background: var(--bg-surface);
    color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

/* Controls & Filter Panel */
.main-layout {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.625rem 0.875rem 0.625rem 2.375rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.select-control {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

/* Priority Badges */
.badge-priority-critical { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }
.badge-priority-high { background: #fff7ed; color: #ea580c; border: 1px solid #fdba74; }
.badge-priority-medium { background: #fefce8; color: #ca8a04; border: 1px solid #fde047; }
.badge-priority-low { background: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }

/* Empty & Skeleton States */
.empty-state-box {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-surface);
    border: 1px border-dash var(--border-color);
    border-radius: var(--radius-lg);
}

.empty-icon { font-size: 2.5rem; display: block; margin-bottom: 1rem; }

/* Dropdown Menu */
.dropdown-menu { position: relative; display: inline-block; }
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10;
    min-width: 200px;
}
.dropdown-menu:hover .dropdown-content { display: block; }
.dropdown-content button {
    width: 100%;
    padding: 0.625rem 1rem;
    border: none;
    background: transparent;
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
}
.dropdown-content button:hover { background: var(--bg-secondary); }